pdf.combined.js 1.7 MB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798991001011021031041051061071081091101111121131141151161171181191201211221231241251261271281291301311321331341351361371381391401411421431441451461471481491501511521531541551561571581591601611621631641651661671681691701711721731741751761771781791801811821831841851861871881891901911921931941951961971981992002012022032042052062072082092102112122132142152162172182192202212222232242252262272282292302312322332342352362372382392402412422432442452462472482492502512522532542552562572582592602612622632642652662672682692702712722732742752762772782792802812822832842852862872882892902912922932942952962972982993003013023033043053063073083093103113123133143153163173183193203213223233243253263273283293303313323333343353363373383393403413423433443453463473483493503513523533543553563573583593603613623633643653663673683693703713723733743753763773783793803813823833843853863873883893903913923933943953963973983994004014024034044054064074084094104114124134144154164174184194204214224234244254264274284294304314324334344354364374384394404414424434444454464474484494504514524534544554564574584594604614624634644654664674684694704714724734744754764774784794804814824834844854864874884894904914924934944954964974984995005015025035045055065075085095105115125135145155165175185195205215225235245255265275285295305315325335345355365375385395405415425435445455465475485495505515525535545555565575585595605615625635645655665675685695705715725735745755765775785795805815825835845855865875885895905915925935945955965975985996006016026036046056066076086096106116126136146156166176186196206216226236246256266276286296306316326336346356366376386396406416426436446456466476486496506516526536546556566576586596606616626636646656666676686696706716726736746756766776786796806816826836846856866876886896906916926936946956966976986997007017027037047057067077087097107117127137147157167177187197207217227237247257267277287297307317327337347357367377387397407417427437447457467477487497507517527537547557567577587597607617627637647657667677687697707717727737747757767777787797807817827837847857867877887897907917927937947957967977987998008018028038048058068078088098108118128138148158168178188198208218228238248258268278288298308318328338348358368378388398408418428438448458468478488498508518528538548558568578588598608618628638648658668678688698708718728738748758768778788798808818828838848858868878888898908918928938948958968978988999009019029039049059069079089099109119129139149159169179189199209219229239249259269279289299309319329339349359369379389399409419429439449459469479489499509519529539549559569579589599609619629639649659669679689699709719729739749759769779789799809819829839849859869879889899909919929939949959969979989991000100110021003100410051006100710081009101010111012101310141015101610171018101910201021102210231024102510261027102810291030103110321033103410351036103710381039104010411042104310441045104610471048104910501051105210531054105510561057105810591060106110621063106410651066106710681069107010711072107310741075107610771078107910801081108210831084108510861087108810891090109110921093109410951096109710981099110011011102110311041105110611071108110911101111111211131114111511161117111811191120112111221123112411251126112711281129113011311132113311341135113611371138113911401141114211431144114511461147114811491150115111521153115411551156115711581159116011611162116311641165116611671168116911701171117211731174117511761177117811791180118111821183118411851186118711881189119011911192119311941195119611971198119912001201120212031204120512061207120812091210121112121213121412151216121712181219122012211222122312241225122612271228122912301231123212331234123512361237123812391240124112421243124412451246124712481249125012511252125312541255125612571258125912601261126212631264126512661267126812691270127112721273127412751276127712781279128012811282128312841285128612871288128912901291129212931294129512961297129812991300130113021303130413051306130713081309131013111312131313141315131613171318131913201321132213231324132513261327132813291330133113321333133413351336133713381339134013411342134313441345134613471348134913501351135213531354135513561357135813591360136113621363136413651366136713681369137013711372137313741375137613771378137913801381138213831384138513861387138813891390139113921393139413951396139713981399140014011402140314041405140614071408140914101411141214131414141514161417141814191420142114221423142414251426142714281429143014311432143314341435143614371438143914401441144214431444144514461447144814491450145114521453145414551456145714581459146014611462146314641465146614671468146914701471147214731474147514761477147814791480148114821483148414851486148714881489149014911492149314941495149614971498149915001501150215031504150515061507150815091510151115121513151415151516151715181519152015211522152315241525152615271528152915301531153215331534153515361537153815391540154115421543154415451546154715481549155015511552155315541555155615571558155915601561156215631564156515661567156815691570157115721573157415751576157715781579158015811582158315841585158615871588158915901591159215931594159515961597159815991600160116021603160416051606160716081609161016111612161316141615161616171618161916201621162216231624162516261627162816291630163116321633163416351636163716381639164016411642164316441645164616471648164916501651165216531654165516561657165816591660166116621663166416651666166716681669167016711672167316741675167616771678167916801681168216831684168516861687168816891690169116921693169416951696169716981699170017011702170317041705170617071708170917101711171217131714171517161717171817191720172117221723172417251726172717281729173017311732173317341735173617371738173917401741174217431744174517461747174817491750175117521753175417551756175717581759176017611762176317641765176617671768176917701771177217731774177517761777177817791780178117821783178417851786178717881789179017911792179317941795179617971798179918001801180218031804180518061807180818091810181118121813181418151816181718181819182018211822182318241825182618271828182918301831183218331834183518361837183818391840184118421843184418451846184718481849185018511852185318541855185618571858185918601861186218631864186518661867186818691870187118721873187418751876187718781879188018811882188318841885188618871888188918901891189218931894189518961897189818991900190119021903190419051906190719081909191019111912191319141915191619171918191919201921192219231924192519261927192819291930193119321933193419351936193719381939194019411942194319441945194619471948194919501951195219531954195519561957195819591960196119621963196419651966196719681969197019711972197319741975197619771978197919801981198219831984198519861987198819891990199119921993199419951996199719981999200020012002200320042005200620072008200920102011201220132014201520162017201820192020202120222023202420252026202720282029203020312032203320342035203620372038203920402041204220432044204520462047204820492050205120522053205420552056205720582059206020612062206320642065206620672068206920702071207220732074207520762077207820792080208120822083208420852086208720882089209020912092209320942095209620972098209921002101210221032104210521062107210821092110211121122113211421152116211721182119212021212122212321242125212621272128212921302131213221332134213521362137213821392140214121422143214421452146214721482149215021512152215321542155215621572158215921602161216221632164216521662167216821692170217121722173217421752176217721782179218021812182218321842185218621872188218921902191219221932194219521962197219821992200220122022203220422052206220722082209221022112212221322142215221622172218221922202221222222232224222522262227222822292230223122322233223422352236223722382239224022412242224322442245224622472248224922502251225222532254225522562257225822592260226122622263226422652266226722682269227022712272227322742275227622772278227922802281228222832284228522862287228822892290229122922293229422952296229722982299230023012302230323042305230623072308230923102311231223132314231523162317231823192320232123222323232423252326232723282329233023312332233323342335233623372338233923402341234223432344234523462347234823492350235123522353235423552356235723582359236023612362236323642365236623672368236923702371237223732374237523762377237823792380238123822383238423852386238723882389239023912392239323942395239623972398239924002401240224032404240524062407240824092410241124122413241424152416241724182419242024212422242324242425242624272428242924302431243224332434243524362437243824392440244124422443244424452446244724482449245024512452245324542455245624572458245924602461246224632464246524662467246824692470247124722473247424752476247724782479248024812482248324842485248624872488248924902491249224932494249524962497249824992500250125022503250425052506250725082509251025112512251325142515251625172518251925202521252225232524252525262527252825292530253125322533253425352536253725382539254025412542254325442545254625472548254925502551255225532554255525562557255825592560256125622563256425652566256725682569257025712572257325742575257625772578257925802581258225832584258525862587258825892590259125922593259425952596259725982599260026012602260326042605260626072608260926102611261226132614261526162617261826192620262126222623262426252626262726282629263026312632263326342635263626372638263926402641264226432644264526462647264826492650265126522653265426552656265726582659266026612662266326642665266626672668266926702671267226732674267526762677267826792680268126822683268426852686268726882689269026912692269326942695269626972698269927002701270227032704270527062707270827092710271127122713271427152716271727182719272027212722272327242725272627272728272927302731273227332734273527362737273827392740274127422743274427452746274727482749275027512752275327542755275627572758275927602761276227632764276527662767276827692770277127722773277427752776277727782779278027812782278327842785278627872788278927902791279227932794279527962797279827992800280128022803280428052806280728082809281028112812281328142815281628172818281928202821282228232824282528262827282828292830283128322833283428352836283728382839284028412842284328442845284628472848284928502851285228532854285528562857285828592860286128622863286428652866286728682869287028712872287328742875287628772878287928802881288228832884288528862887288828892890289128922893289428952896289728982899290029012902290329042905290629072908290929102911291229132914291529162917291829192920292129222923292429252926292729282929293029312932293329342935293629372938293929402941294229432944294529462947294829492950295129522953295429552956295729582959296029612962296329642965296629672968296929702971297229732974297529762977297829792980298129822983298429852986298729882989299029912992299329942995299629972998299930003001300230033004300530063007300830093010301130123013301430153016301730183019302030213022302330243025302630273028302930303031303230333034303530363037303830393040304130423043304430453046304730483049305030513052305330543055305630573058305930603061306230633064306530663067306830693070307130723073307430753076307730783079308030813082308330843085308630873088308930903091309230933094309530963097309830993100310131023103310431053106310731083109311031113112311331143115311631173118311931203121312231233124312531263127312831293130313131323133313431353136313731383139314031413142314331443145314631473148314931503151315231533154315531563157315831593160316131623163316431653166316731683169317031713172317331743175317631773178317931803181318231833184318531863187318831893190319131923193319431953196319731983199320032013202320332043205320632073208320932103211321232133214321532163217321832193220322132223223322432253226322732283229323032313232323332343235323632373238323932403241324232433244324532463247324832493250325132523253325432553256325732583259326032613262326332643265326632673268326932703271327232733274327532763277327832793280328132823283328432853286328732883289329032913292329332943295329632973298329933003301330233033304330533063307330833093310331133123313331433153316331733183319332033213322332333243325332633273328332933303331333233333334333533363337333833393340334133423343334433453346334733483349335033513352335333543355335633573358335933603361336233633364336533663367336833693370337133723373337433753376337733783379338033813382338333843385338633873388338933903391339233933394339533963397339833993400340134023403340434053406340734083409341034113412341334143415341634173418341934203421342234233424342534263427342834293430343134323433343434353436343734383439344034413442344334443445344634473448344934503451345234533454345534563457345834593460346134623463346434653466346734683469347034713472347334743475347634773478347934803481348234833484348534863487348834893490349134923493349434953496349734983499350035013502350335043505350635073508350935103511351235133514351535163517351835193520352135223523352435253526352735283529353035313532353335343535353635373538353935403541354235433544354535463547354835493550355135523553355435553556355735583559356035613562356335643565356635673568356935703571357235733574357535763577357835793580358135823583358435853586358735883589359035913592359335943595359635973598359936003601360236033604360536063607360836093610361136123613361436153616361736183619362036213622362336243625362636273628362936303631363236333634363536363637363836393640364136423643364436453646364736483649365036513652365336543655365636573658365936603661366236633664366536663667366836693670367136723673367436753676367736783679368036813682368336843685368636873688368936903691369236933694369536963697369836993700370137023703370437053706370737083709371037113712371337143715371637173718371937203721372237233724372537263727372837293730373137323733373437353736373737383739374037413742374337443745374637473748374937503751375237533754375537563757375837593760376137623763376437653766376737683769377037713772377337743775377637773778377937803781378237833784378537863787378837893790379137923793379437953796379737983799380038013802380338043805380638073808380938103811381238133814381538163817381838193820382138223823382438253826382738283829383038313832383338343835383638373838383938403841384238433844384538463847384838493850385138523853385438553856385738583859386038613862386338643865386638673868386938703871387238733874387538763877387838793880388138823883388438853886388738883889389038913892389338943895389638973898389939003901390239033904390539063907390839093910391139123913391439153916391739183919392039213922392339243925392639273928392939303931393239333934393539363937393839393940394139423943394439453946394739483949395039513952395339543955395639573958395939603961396239633964396539663967396839693970397139723973397439753976397739783979398039813982398339843985398639873988398939903991399239933994399539963997399839994000400140024003400440054006400740084009401040114012401340144015401640174018401940204021402240234024402540264027402840294030403140324033403440354036403740384039404040414042404340444045404640474048404940504051405240534054405540564057405840594060406140624063406440654066406740684069407040714072407340744075407640774078407940804081408240834084408540864087408840894090409140924093409440954096409740984099410041014102410341044105410641074108410941104111411241134114411541164117411841194120412141224123412441254126412741284129413041314132413341344135413641374138413941404141414241434144414541464147414841494150415141524153415441554156415741584159416041614162416341644165416641674168416941704171417241734174417541764177417841794180418141824183418441854186418741884189419041914192419341944195419641974198419942004201420242034204420542064207420842094210421142124213421442154216421742184219422042214222422342244225422642274228422942304231423242334234423542364237423842394240424142424243424442454246424742484249425042514252425342544255425642574258425942604261426242634264426542664267426842694270427142724273427442754276427742784279428042814282428342844285428642874288428942904291429242934294429542964297429842994300430143024303430443054306430743084309431043114312431343144315431643174318431943204321432243234324432543264327432843294330433143324333433443354336433743384339434043414342434343444345434643474348434943504351435243534354435543564357435843594360436143624363436443654366436743684369437043714372437343744375437643774378437943804381438243834384438543864387438843894390439143924393439443954396439743984399440044014402440344044405440644074408440944104411441244134414441544164417441844194420442144224423442444254426442744284429443044314432443344344435443644374438443944404441444244434444444544464447444844494450445144524453445444554456445744584459446044614462446344644465446644674468446944704471447244734474447544764477447844794480448144824483448444854486448744884489449044914492449344944495449644974498449945004501450245034504450545064507450845094510451145124513451445154516451745184519452045214522452345244525452645274528452945304531453245334534453545364537453845394540454145424543454445454546454745484549455045514552455345544555455645574558455945604561456245634564456545664567456845694570457145724573457445754576457745784579458045814582458345844585458645874588458945904591459245934594459545964597459845994600460146024603460446054606460746084609461046114612461346144615461646174618461946204621462246234624462546264627462846294630463146324633463446354636463746384639464046414642464346444645464646474648464946504651465246534654465546564657465846594660466146624663466446654666466746684669467046714672467346744675467646774678467946804681468246834684468546864687468846894690469146924693469446954696469746984699470047014702470347044705470647074708470947104711471247134714471547164717471847194720472147224723472447254726472747284729473047314732473347344735473647374738473947404741474247434744474547464747474847494750475147524753475447554756475747584759476047614762476347644765476647674768476947704771477247734774477547764777477847794780478147824783478447854786478747884789479047914792479347944795479647974798479948004801480248034804480548064807480848094810481148124813481448154816481748184819482048214822482348244825482648274828482948304831483248334834483548364837483848394840484148424843484448454846484748484849485048514852485348544855485648574858485948604861486248634864486548664867486848694870487148724873487448754876487748784879488048814882488348844885488648874888488948904891489248934894489548964897489848994900490149024903490449054906490749084909491049114912491349144915491649174918491949204921492249234924492549264927492849294930493149324933493449354936493749384939494049414942494349444945494649474948494949504951495249534954495549564957495849594960496149624963496449654966496749684969497049714972497349744975497649774978497949804981498249834984498549864987498849894990499149924993499449954996499749984999500050015002500350045005500650075008500950105011501250135014501550165017501850195020502150225023502450255026502750285029503050315032503350345035503650375038503950405041504250435044504550465047504850495050505150525053505450555056505750585059506050615062506350645065506650675068506950705071507250735074507550765077507850795080508150825083508450855086508750885089509050915092509350945095509650975098509951005101510251035104510551065107510851095110511151125113511451155116511751185119512051215122512351245125512651275128512951305131513251335134513551365137513851395140514151425143514451455146514751485149515051515152515351545155515651575158515951605161516251635164516551665167516851695170517151725173517451755176517751785179518051815182518351845185518651875188518951905191519251935194519551965197519851995200520152025203520452055206520752085209521052115212521352145215521652175218521952205221522252235224522552265227522852295230523152325233523452355236523752385239524052415242524352445245524652475248524952505251525252535254525552565257525852595260526152625263526452655266526752685269527052715272527352745275527652775278527952805281528252835284528552865287528852895290529152925293529452955296529752985299530053015302530353045305530653075308530953105311531253135314531553165317531853195320532153225323532453255326532753285329533053315332533353345335533653375338533953405341534253435344534553465347534853495350535153525353535453555356535753585359536053615362536353645365536653675368536953705371537253735374537553765377537853795380538153825383538453855386538753885389539053915392539353945395539653975398539954005401540254035404540554065407540854095410541154125413541454155416541754185419542054215422542354245425542654275428542954305431543254335434543554365437543854395440544154425443544454455446544754485449545054515452545354545455545654575458545954605461546254635464546554665467546854695470547154725473547454755476547754785479548054815482548354845485548654875488548954905491549254935494549554965497549854995500550155025503550455055506550755085509551055115512551355145515551655175518551955205521552255235524552555265527552855295530553155325533553455355536553755385539554055415542554355445545554655475548554955505551555255535554555555565557555855595560556155625563556455655566556755685569557055715572557355745575557655775578557955805581558255835584558555865587558855895590559155925593559455955596559755985599560056015602560356045605560656075608560956105611561256135614561556165617561856195620562156225623562456255626562756285629563056315632563356345635563656375638563956405641564256435644564556465647564856495650565156525653565456555656565756585659566056615662566356645665566656675668566956705671567256735674567556765677567856795680568156825683568456855686568756885689569056915692569356945695569656975698569957005701570257035704570557065707570857095710571157125713571457155716571757185719572057215722572357245725572657275728572957305731573257335734573557365737573857395740574157425743574457455746574757485749575057515752575357545755575657575758575957605761576257635764576557665767576857695770577157725773577457755776577757785779578057815782578357845785578657875788578957905791579257935794579557965797579857995800580158025803580458055806580758085809581058115812581358145815581658175818581958205821582258235824582558265827582858295830583158325833583458355836583758385839584058415842584358445845584658475848584958505851585258535854585558565857585858595860586158625863586458655866586758685869587058715872587358745875587658775878587958805881588258835884588558865887588858895890589158925893589458955896589758985899590059015902590359045905590659075908590959105911591259135914591559165917591859195920592159225923592459255926592759285929593059315932593359345935593659375938593959405941594259435944594559465947594859495950595159525953595459555956595759585959596059615962596359645965596659675968596959705971597259735974597559765977597859795980598159825983598459855986598759885989599059915992599359945995599659975998599960006001600260036004600560066007600860096010601160126013601460156016601760186019602060216022602360246025602660276028602960306031603260336034603560366037603860396040604160426043604460456046604760486049605060516052605360546055605660576058605960606061606260636064606560666067606860696070607160726073607460756076607760786079608060816082608360846085608660876088608960906091609260936094609560966097609860996100610161026103610461056106610761086109611061116112611361146115611661176118611961206121612261236124612561266127612861296130613161326133613461356136613761386139614061416142614361446145614661476148614961506151615261536154615561566157615861596160616161626163616461656166616761686169617061716172617361746175617661776178617961806181618261836184618561866187618861896190619161926193619461956196619761986199620062016202620362046205620662076208620962106211621262136214621562166217621862196220622162226223622462256226622762286229623062316232623362346235623662376238623962406241624262436244624562466247624862496250625162526253625462556256625762586259626062616262626362646265626662676268626962706271627262736274627562766277627862796280628162826283628462856286628762886289629062916292629362946295629662976298629963006301630263036304630563066307630863096310631163126313631463156316631763186319632063216322632363246325632663276328632963306331633263336334633563366337633863396340634163426343634463456346634763486349635063516352635363546355635663576358635963606361636263636364636563666367636863696370637163726373637463756376637763786379638063816382638363846385638663876388638963906391639263936394639563966397639863996400640164026403640464056406640764086409641064116412641364146415641664176418641964206421642264236424642564266427642864296430643164326433643464356436643764386439644064416442644364446445644664476448644964506451645264536454645564566457645864596460646164626463646464656466646764686469647064716472647364746475647664776478647964806481648264836484648564866487648864896490649164926493649464956496649764986499650065016502650365046505650665076508650965106511651265136514651565166517651865196520652165226523652465256526652765286529653065316532653365346535653665376538653965406541654265436544654565466547654865496550655165526553655465556556655765586559656065616562656365646565656665676568656965706571657265736574657565766577657865796580658165826583658465856586658765886589659065916592659365946595659665976598659966006601660266036604660566066607660866096610661166126613661466156616661766186619662066216622662366246625662666276628662966306631663266336634663566366637663866396640664166426643664466456646664766486649665066516652665366546655665666576658665966606661666266636664666566666667666866696670667166726673667466756676667766786679668066816682668366846685668666876688668966906691669266936694669566966697669866996700670167026703670467056706670767086709671067116712671367146715671667176718671967206721672267236724672567266727672867296730673167326733673467356736673767386739674067416742674367446745674667476748674967506751675267536754675567566757675867596760676167626763676467656766676767686769677067716772677367746775677667776778677967806781678267836784678567866787678867896790679167926793679467956796679767986799680068016802680368046805680668076808680968106811681268136814681568166817681868196820682168226823682468256826682768286829683068316832683368346835683668376838683968406841684268436844684568466847684868496850685168526853685468556856685768586859686068616862686368646865686668676868686968706871687268736874687568766877687868796880688168826883688468856886688768886889689068916892689368946895689668976898689969006901690269036904690569066907690869096910691169126913691469156916691769186919692069216922692369246925692669276928692969306931693269336934693569366937693869396940694169426943694469456946694769486949695069516952695369546955695669576958695969606961696269636964696569666967696869696970697169726973697469756976697769786979698069816982698369846985698669876988698969906991699269936994699569966997699869997000700170027003700470057006700770087009701070117012701370147015701670177018701970207021702270237024702570267027702870297030703170327033703470357036703770387039704070417042704370447045704670477048704970507051705270537054705570567057705870597060706170627063706470657066706770687069707070717072707370747075707670777078707970807081708270837084708570867087708870897090709170927093709470957096709770987099710071017102710371047105710671077108710971107111711271137114711571167117711871197120712171227123712471257126712771287129713071317132713371347135713671377138713971407141714271437144714571467147714871497150715171527153715471557156715771587159716071617162716371647165716671677168716971707171717271737174717571767177717871797180718171827183718471857186718771887189719071917192719371947195719671977198719972007201720272037204720572067207720872097210721172127213721472157216721772187219722072217222722372247225722672277228722972307231723272337234723572367237723872397240724172427243724472457246724772487249725072517252725372547255725672577258725972607261726272637264726572667267726872697270727172727273727472757276727772787279728072817282728372847285728672877288728972907291729272937294729572967297729872997300730173027303730473057306730773087309731073117312731373147315731673177318731973207321732273237324732573267327732873297330733173327333733473357336733773387339734073417342734373447345734673477348734973507351735273537354735573567357735873597360736173627363736473657366736773687369737073717372737373747375737673777378737973807381738273837384738573867387738873897390739173927393739473957396739773987399740074017402740374047405740674077408740974107411741274137414741574167417741874197420742174227423742474257426742774287429743074317432743374347435743674377438743974407441744274437444744574467447744874497450745174527453745474557456745774587459746074617462746374647465746674677468746974707471747274737474747574767477747874797480748174827483748474857486748774887489749074917492749374947495749674977498749975007501750275037504750575067507750875097510751175127513751475157516751775187519752075217522752375247525752675277528752975307531753275337534753575367537753875397540754175427543754475457546754775487549755075517552755375547555755675577558755975607561756275637564756575667567756875697570757175727573757475757576757775787579758075817582758375847585758675877588758975907591759275937594759575967597759875997600760176027603760476057606760776087609761076117612761376147615761676177618761976207621762276237624762576267627762876297630763176327633763476357636763776387639764076417642764376447645764676477648764976507651765276537654765576567657765876597660766176627663766476657666766776687669767076717672767376747675767676777678767976807681768276837684768576867687768876897690769176927693769476957696769776987699770077017702770377047705770677077708770977107711771277137714771577167717771877197720772177227723772477257726772777287729773077317732773377347735773677377738773977407741774277437744774577467747774877497750775177527753775477557756775777587759776077617762776377647765776677677768776977707771777277737774777577767777777877797780778177827783778477857786778777887789779077917792779377947795779677977798779978007801780278037804780578067807780878097810781178127813781478157816781778187819782078217822782378247825782678277828782978307831783278337834783578367837783878397840784178427843784478457846784778487849785078517852785378547855785678577858785978607861786278637864786578667867786878697870787178727873787478757876787778787879788078817882788378847885788678877888788978907891789278937894789578967897789878997900790179027903790479057906790779087909791079117912791379147915791679177918791979207921792279237924792579267927792879297930793179327933793479357936793779387939794079417942794379447945794679477948794979507951795279537954795579567957795879597960796179627963796479657966796779687969797079717972797379747975797679777978797979807981798279837984798579867987798879897990799179927993799479957996799779987999800080018002800380048005800680078008800980108011801280138014801580168017801880198020802180228023802480258026802780288029803080318032803380348035803680378038803980408041804280438044804580468047804880498050805180528053805480558056805780588059806080618062806380648065806680678068806980708071807280738074807580768077807880798080808180828083808480858086808780888089809080918092809380948095809680978098809981008101810281038104810581068107810881098110811181128113811481158116811781188119812081218122812381248125812681278128812981308131813281338134813581368137813881398140814181428143814481458146814781488149815081518152815381548155815681578158815981608161816281638164816581668167816881698170817181728173817481758176817781788179818081818182818381848185818681878188818981908191819281938194819581968197819881998200820182028203820482058206820782088209821082118212821382148215821682178218821982208221822282238224822582268227822882298230823182328233823482358236823782388239824082418242824382448245824682478248824982508251825282538254825582568257825882598260826182628263826482658266826782688269827082718272827382748275827682778278827982808281828282838284828582868287828882898290829182928293829482958296829782988299830083018302830383048305830683078308830983108311831283138314831583168317831883198320832183228323832483258326832783288329833083318332833383348335833683378338833983408341834283438344834583468347834883498350835183528353835483558356835783588359836083618362836383648365836683678368836983708371837283738374837583768377837883798380838183828383838483858386838783888389839083918392839383948395839683978398839984008401840284038404840584068407840884098410841184128413841484158416841784188419842084218422842384248425842684278428842984308431843284338434843584368437843884398440844184428443844484458446844784488449845084518452845384548455845684578458845984608461846284638464846584668467846884698470847184728473847484758476847784788479848084818482848384848485848684878488848984908491849284938494849584968497849884998500850185028503850485058506850785088509851085118512851385148515851685178518851985208521852285238524852585268527852885298530853185328533853485358536853785388539854085418542854385448545854685478548854985508551855285538554855585568557855885598560856185628563856485658566856785688569857085718572857385748575857685778578857985808581858285838584858585868587858885898590859185928593859485958596859785988599860086018602860386048605860686078608860986108611861286138614861586168617861886198620862186228623862486258626862786288629863086318632863386348635863686378638863986408641864286438644864586468647864886498650865186528653865486558656865786588659866086618662866386648665866686678668866986708671867286738674867586768677867886798680868186828683868486858686868786888689869086918692869386948695869686978698869987008701870287038704870587068707870887098710871187128713871487158716871787188719872087218722872387248725872687278728872987308731873287338734873587368737873887398740874187428743874487458746874787488749875087518752875387548755875687578758875987608761876287638764876587668767876887698770877187728773877487758776877787788779878087818782878387848785878687878788878987908791879287938794879587968797879887998800880188028803880488058806880788088809881088118812881388148815881688178818881988208821882288238824882588268827882888298830883188328833883488358836883788388839884088418842884388448845884688478848884988508851885288538854885588568857885888598860886188628863886488658866886788688869887088718872887388748875887688778878887988808881888288838884888588868887888888898890889188928893889488958896889788988899890089018902890389048905890689078908890989108911891289138914891589168917891889198920892189228923892489258926892789288929893089318932893389348935893689378938893989408941894289438944894589468947894889498950895189528953895489558956895789588959896089618962896389648965896689678968896989708971897289738974897589768977897889798980898189828983898489858986898789888989899089918992899389948995899689978998899990009001900290039004900590069007900890099010901190129013901490159016901790189019902090219022902390249025902690279028902990309031903290339034903590369037903890399040904190429043904490459046904790489049905090519052905390549055905690579058905990609061906290639064906590669067906890699070907190729073907490759076907790789079908090819082908390849085908690879088908990909091909290939094909590969097909890999100910191029103910491059106910791089109911091119112911391149115911691179118911991209121912291239124912591269127912891299130913191329133913491359136913791389139914091419142914391449145914691479148914991509151915291539154915591569157915891599160916191629163916491659166916791689169917091719172917391749175917691779178917991809181918291839184918591869187918891899190919191929193919491959196919791989199920092019202920392049205920692079208920992109211921292139214921592169217921892199220922192229223922492259226922792289229923092319232923392349235923692379238923992409241924292439244924592469247924892499250925192529253925492559256925792589259926092619262926392649265926692679268926992709271927292739274927592769277927892799280928192829283928492859286928792889289929092919292929392949295929692979298929993009301930293039304930593069307930893099310931193129313931493159316931793189319932093219322932393249325932693279328932993309331933293339334933593369337933893399340934193429343934493459346934793489349935093519352935393549355935693579358935993609361936293639364936593669367936893699370937193729373937493759376937793789379938093819382938393849385938693879388938993909391939293939394939593969397939893999400940194029403940494059406940794089409941094119412941394149415941694179418941994209421942294239424942594269427942894299430943194329433943494359436943794389439944094419442944394449445944694479448944994509451945294539454945594569457945894599460946194629463946494659466946794689469947094719472947394749475947694779478947994809481948294839484948594869487948894899490949194929493949494959496949794989499950095019502950395049505950695079508950995109511951295139514951595169517951895199520952195229523952495259526952795289529953095319532953395349535953695379538953995409541954295439544954595469547954895499550955195529553955495559556955795589559956095619562956395649565956695679568956995709571957295739574957595769577957895799580958195829583958495859586958795889589959095919592959395949595959695979598959996009601960296039604960596069607960896099610961196129613961496159616961796189619962096219622962396249625962696279628962996309631963296339634963596369637963896399640964196429643964496459646964796489649965096519652965396549655965696579658965996609661966296639664966596669667966896699670967196729673967496759676967796789679968096819682968396849685968696879688968996909691969296939694969596969697969896999700970197029703970497059706970797089709971097119712971397149715971697179718971997209721972297239724972597269727972897299730973197329733973497359736973797389739974097419742974397449745974697479748974997509751975297539754975597569757975897599760976197629763976497659766976797689769977097719772977397749775977697779778977997809781978297839784978597869787978897899790979197929793979497959796979797989799980098019802980398049805980698079808980998109811981298139814981598169817981898199820982198229823982498259826982798289829983098319832983398349835983698379838983998409841984298439844984598469847984898499850985198529853985498559856985798589859986098619862986398649865986698679868986998709871987298739874987598769877987898799880988198829883988498859886988798889889989098919892989398949895989698979898989999009901990299039904990599069907990899099910991199129913991499159916991799189919992099219922992399249925992699279928992999309931993299339934993599369937993899399940994199429943994499459946994799489949995099519952995399549955995699579958995999609961996299639964996599669967996899699970997199729973997499759976997799789979998099819982998399849985998699879988998999909991999299939994999599969997999899991000010001100021000310004100051000610007100081000910010100111001210013100141001510016100171001810019100201002110022100231002410025100261002710028100291003010031100321003310034100351003610037100381003910040100411004210043100441004510046100471004810049100501005110052100531005410055100561005710058100591006010061100621006310064100651006610067100681006910070100711007210073100741007510076100771007810079100801008110082100831008410085100861008710088100891009010091100921009310094100951009610097100981009910100101011010210103101041010510106101071010810109101101011110112101131011410115101161011710118101191012010121101221012310124101251012610127101281012910130101311013210133101341013510136101371013810139101401014110142101431014410145101461014710148101491015010151101521015310154101551015610157101581015910160101611016210163101641016510166101671016810169101701017110172101731017410175101761017710178101791018010181101821018310184101851018610187101881018910190101911019210193101941019510196101971019810199102001020110202102031020410205102061020710208102091021010211102121021310214102151021610217102181021910220102211022210223102241022510226102271022810229102301023110232102331023410235102361023710238102391024010241102421024310244102451024610247102481024910250102511025210253102541025510256102571025810259102601026110262102631026410265102661026710268102691027010271102721027310274102751027610277102781027910280102811028210283102841028510286102871028810289102901029110292102931029410295102961029710298102991030010301103021030310304103051030610307103081030910310103111031210313103141031510316103171031810319103201032110322103231032410325103261032710328103291033010331103321033310334103351033610337103381033910340103411034210343103441034510346103471034810349103501035110352103531035410355103561035710358103591036010361103621036310364103651036610367103681036910370103711037210373103741037510376103771037810379103801038110382103831038410385103861038710388103891039010391103921039310394103951039610397103981039910400104011040210403104041040510406104071040810409104101041110412104131041410415104161041710418104191042010421104221042310424104251042610427104281042910430104311043210433104341043510436104371043810439104401044110442104431044410445104461044710448104491045010451104521045310454104551045610457104581045910460104611046210463104641046510466104671046810469104701047110472104731047410475104761047710478104791048010481104821048310484104851048610487104881048910490104911049210493104941049510496104971049810499105001050110502105031050410505105061050710508105091051010511105121051310514105151051610517105181051910520105211052210523105241052510526105271052810529105301053110532105331053410535105361053710538105391054010541105421054310544105451054610547105481054910550105511055210553105541055510556105571055810559105601056110562105631056410565105661056710568105691057010571105721057310574105751057610577105781057910580105811058210583105841058510586105871058810589105901059110592105931059410595105961059710598105991060010601106021060310604106051060610607106081060910610106111061210613106141061510616106171061810619106201062110622106231062410625106261062710628106291063010631106321063310634106351063610637106381063910640106411064210643106441064510646106471064810649106501065110652106531065410655106561065710658106591066010661106621066310664106651066610667106681066910670106711067210673106741067510676106771067810679106801068110682106831068410685106861068710688106891069010691106921069310694106951069610697106981069910700107011070210703107041070510706107071070810709107101071110712107131071410715107161071710718107191072010721107221072310724107251072610727107281072910730107311073210733107341073510736107371073810739107401074110742107431074410745107461074710748107491075010751107521075310754107551075610757107581075910760107611076210763107641076510766107671076810769107701077110772107731077410775107761077710778107791078010781107821078310784107851078610787107881078910790107911079210793107941079510796107971079810799108001080110802108031080410805108061080710808108091081010811108121081310814108151081610817108181081910820108211082210823108241082510826108271082810829108301083110832108331083410835108361083710838108391084010841108421084310844108451084610847108481084910850108511085210853108541085510856108571085810859108601086110862108631086410865108661086710868108691087010871108721087310874108751087610877108781087910880108811088210883108841088510886108871088810889108901089110892108931089410895108961089710898108991090010901109021090310904109051090610907109081090910910109111091210913109141091510916109171091810919109201092110922109231092410925109261092710928109291093010931109321093310934109351093610937109381093910940109411094210943109441094510946109471094810949109501095110952109531095410955109561095710958109591096010961109621096310964109651096610967109681096910970109711097210973109741097510976109771097810979109801098110982109831098410985109861098710988109891099010991109921099310994109951099610997109981099911000110011100211003110041100511006110071100811009110101101111012110131101411015110161101711018110191102011021110221102311024110251102611027110281102911030110311103211033110341103511036110371103811039110401104111042110431104411045110461104711048110491105011051110521105311054110551105611057110581105911060110611106211063110641106511066110671106811069110701107111072110731107411075110761107711078110791108011081110821108311084110851108611087110881108911090110911109211093110941109511096110971109811099111001110111102111031110411105111061110711108111091111011111111121111311114111151111611117111181111911120111211112211123111241112511126111271112811129111301113111132111331113411135111361113711138111391114011141111421114311144111451114611147111481114911150111511115211153111541115511156111571115811159111601116111162111631116411165111661116711168111691117011171111721117311174111751117611177111781117911180111811118211183111841118511186111871118811189111901119111192111931119411195111961119711198111991120011201112021120311204112051120611207112081120911210112111121211213112141121511216112171121811219112201122111222112231122411225112261122711228112291123011231112321123311234112351123611237112381123911240112411124211243112441124511246112471124811249112501125111252112531125411255112561125711258112591126011261112621126311264112651126611267112681126911270112711127211273112741127511276112771127811279112801128111282112831128411285112861128711288112891129011291112921129311294112951129611297112981129911300113011130211303113041130511306113071130811309113101131111312113131131411315113161131711318113191132011321113221132311324113251132611327113281132911330113311133211333113341133511336113371133811339113401134111342113431134411345113461134711348113491135011351113521135311354113551135611357113581135911360113611136211363113641136511366113671136811369113701137111372113731137411375113761137711378113791138011381113821138311384113851138611387113881138911390113911139211393113941139511396113971139811399114001140111402114031140411405114061140711408114091141011411114121141311414114151141611417114181141911420114211142211423114241142511426114271142811429114301143111432114331143411435114361143711438114391144011441114421144311444114451144611447114481144911450114511145211453114541145511456114571145811459114601146111462114631146411465114661146711468114691147011471114721147311474114751147611477114781147911480114811148211483114841148511486114871148811489114901149111492114931149411495114961149711498114991150011501115021150311504115051150611507115081150911510115111151211513115141151511516115171151811519115201152111522115231152411525115261152711528115291153011531115321153311534115351153611537115381153911540115411154211543115441154511546115471154811549115501155111552115531155411555115561155711558115591156011561115621156311564115651156611567115681156911570115711157211573115741157511576115771157811579115801158111582115831158411585115861158711588115891159011591115921159311594115951159611597115981159911600116011160211603116041160511606116071160811609116101161111612116131161411615116161161711618116191162011621116221162311624116251162611627116281162911630116311163211633116341163511636116371163811639116401164111642116431164411645116461164711648116491165011651116521165311654116551165611657116581165911660116611166211663116641166511666116671166811669116701167111672116731167411675116761167711678116791168011681116821168311684116851168611687116881168911690116911169211693116941169511696116971169811699117001170111702117031170411705117061170711708117091171011711117121171311714117151171611717117181171911720117211172211723117241172511726117271172811729117301173111732117331173411735117361173711738117391174011741117421174311744117451174611747117481174911750117511175211753117541175511756117571175811759117601176111762117631176411765117661176711768117691177011771117721177311774117751177611777117781177911780117811178211783117841178511786117871178811789117901179111792117931179411795117961179711798117991180011801118021180311804118051180611807118081180911810118111181211813118141181511816118171181811819118201182111822118231182411825118261182711828118291183011831118321183311834118351183611837118381183911840118411184211843118441184511846118471184811849118501185111852118531185411855118561185711858118591186011861118621186311864118651186611867118681186911870118711187211873118741187511876118771187811879118801188111882118831188411885118861188711888118891189011891118921189311894118951189611897118981189911900119011190211903119041190511906119071190811909119101191111912119131191411915119161191711918119191192011921119221192311924119251192611927119281192911930119311193211933119341193511936119371193811939119401194111942119431194411945119461194711948119491195011951119521195311954119551195611957119581195911960119611196211963119641196511966119671196811969119701197111972119731197411975119761197711978119791198011981119821198311984119851198611987119881198911990119911199211993119941199511996119971199811999120001200112002120031200412005120061200712008120091201012011120121201312014120151201612017120181201912020120211202212023120241202512026120271202812029120301203112032120331203412035120361203712038120391204012041120421204312044120451204612047120481204912050120511205212053120541205512056120571205812059120601206112062120631206412065120661206712068120691207012071120721207312074120751207612077120781207912080120811208212083120841208512086120871208812089120901209112092120931209412095120961209712098120991210012101121021210312104121051210612107121081210912110121111211212113121141211512116121171211812119121201212112122121231212412125121261212712128121291213012131121321213312134121351213612137121381213912140121411214212143121441214512146121471214812149121501215112152121531215412155121561215712158121591216012161121621216312164121651216612167121681216912170121711217212173121741217512176121771217812179121801218112182121831218412185121861218712188121891219012191121921219312194121951219612197121981219912200122011220212203122041220512206122071220812209122101221112212122131221412215122161221712218122191222012221122221222312224122251222612227122281222912230122311223212233122341223512236122371223812239122401224112242122431224412245122461224712248122491225012251122521225312254122551225612257122581225912260122611226212263122641226512266122671226812269122701227112272122731227412275122761227712278122791228012281122821228312284122851228612287122881228912290122911229212293122941229512296122971229812299123001230112302123031230412305123061230712308123091231012311123121231312314123151231612317123181231912320123211232212323123241232512326123271232812329123301233112332123331233412335123361233712338123391234012341123421234312344123451234612347123481234912350123511235212353123541235512356123571235812359123601236112362123631236412365123661236712368123691237012371123721237312374123751237612377123781237912380123811238212383123841238512386123871238812389123901239112392123931239412395123961239712398123991240012401124021240312404124051240612407124081240912410124111241212413124141241512416124171241812419124201242112422124231242412425124261242712428124291243012431124321243312434124351243612437124381243912440124411244212443124441244512446124471244812449124501245112452124531245412455124561245712458124591246012461124621246312464124651246612467124681246912470124711247212473124741247512476124771247812479124801248112482124831248412485124861248712488124891249012491124921249312494124951249612497124981249912500125011250212503125041250512506125071250812509125101251112512125131251412515125161251712518125191252012521125221252312524125251252612527125281252912530125311253212533125341253512536125371253812539125401254112542125431254412545125461254712548125491255012551125521255312554125551255612557125581255912560125611256212563125641256512566125671256812569125701257112572125731257412575125761257712578125791258012581125821258312584125851258612587125881258912590125911259212593125941259512596125971259812599126001260112602126031260412605126061260712608126091261012611126121261312614126151261612617126181261912620126211262212623126241262512626126271262812629126301263112632126331263412635126361263712638126391264012641126421264312644126451264612647126481264912650126511265212653126541265512656126571265812659126601266112662126631266412665126661266712668126691267012671126721267312674126751267612677126781267912680126811268212683126841268512686126871268812689126901269112692126931269412695126961269712698126991270012701127021270312704127051270612707127081270912710127111271212713127141271512716127171271812719127201272112722127231272412725127261272712728127291273012731127321273312734127351273612737127381273912740127411274212743127441274512746127471274812749127501275112752127531275412755127561275712758127591276012761127621276312764127651276612767127681276912770127711277212773127741277512776127771277812779127801278112782127831278412785127861278712788127891279012791127921279312794127951279612797127981279912800128011280212803128041280512806128071280812809128101281112812128131281412815128161281712818128191282012821128221282312824128251282612827128281282912830128311283212833128341283512836128371283812839128401284112842128431284412845128461284712848128491285012851128521285312854128551285612857128581285912860128611286212863128641286512866128671286812869128701287112872128731287412875128761287712878128791288012881128821288312884128851288612887128881288912890128911289212893128941289512896128971289812899129001290112902129031290412905129061290712908129091291012911129121291312914129151291612917129181291912920129211292212923129241292512926129271292812929129301293112932129331293412935129361293712938129391294012941129421294312944129451294612947129481294912950129511295212953129541295512956129571295812959129601296112962129631296412965129661296712968129691297012971129721297312974129751297612977129781297912980129811298212983129841298512986129871298812989129901299112992129931299412995129961299712998129991300013001130021300313004130051300613007130081300913010130111301213013130141301513016130171301813019130201302113022130231302413025130261302713028130291303013031130321303313034130351303613037130381303913040130411304213043130441304513046130471304813049130501305113052130531305413055130561305713058130591306013061130621306313064130651306613067130681306913070130711307213073130741307513076130771307813079130801308113082130831308413085130861308713088130891309013091130921309313094130951309613097130981309913100131011310213103131041310513106131071310813109131101311113112131131311413115131161311713118131191312013121131221312313124131251312613127131281312913130131311313213133131341313513136131371313813139131401314113142131431314413145131461314713148131491315013151131521315313154131551315613157131581315913160131611316213163131641316513166131671316813169131701317113172131731317413175131761317713178131791318013181131821318313184131851318613187131881318913190131911319213193131941319513196131971319813199132001320113202132031320413205132061320713208132091321013211132121321313214132151321613217132181321913220132211322213223132241322513226132271322813229132301323113232132331323413235132361323713238132391324013241132421324313244132451324613247132481324913250132511325213253132541325513256132571325813259132601326113262132631326413265132661326713268132691327013271132721327313274132751327613277132781327913280132811328213283132841328513286132871328813289132901329113292132931329413295132961329713298132991330013301133021330313304133051330613307133081330913310133111331213313133141331513316133171331813319133201332113322133231332413325133261332713328133291333013331133321333313334133351333613337133381333913340133411334213343133441334513346133471334813349133501335113352133531335413355133561335713358133591336013361133621336313364133651336613367133681336913370133711337213373133741337513376133771337813379133801338113382133831338413385133861338713388133891339013391133921339313394133951339613397133981339913400134011340213403134041340513406134071340813409134101341113412134131341413415134161341713418134191342013421134221342313424134251342613427134281342913430134311343213433134341343513436134371343813439134401344113442134431344413445134461344713448134491345013451134521345313454134551345613457134581345913460134611346213463134641346513466134671346813469134701347113472134731347413475134761347713478134791348013481134821348313484134851348613487134881348913490134911349213493134941349513496134971349813499135001350113502135031350413505135061350713508135091351013511135121351313514135151351613517135181351913520135211352213523135241352513526135271352813529135301353113532135331353413535135361353713538135391354013541135421354313544135451354613547135481354913550135511355213553135541355513556135571355813559135601356113562135631356413565135661356713568135691357013571135721357313574135751357613577135781357913580135811358213583135841358513586135871358813589135901359113592135931359413595135961359713598135991360013601136021360313604136051360613607136081360913610136111361213613136141361513616136171361813619136201362113622136231362413625136261362713628136291363013631136321363313634136351363613637136381363913640136411364213643136441364513646136471364813649136501365113652136531365413655136561365713658136591366013661136621366313664136651366613667136681366913670136711367213673136741367513676136771367813679136801368113682136831368413685136861368713688136891369013691136921369313694136951369613697136981369913700137011370213703137041370513706137071370813709137101371113712137131371413715137161371713718137191372013721137221372313724137251372613727137281372913730137311373213733137341373513736137371373813739137401374113742137431374413745137461374713748137491375013751137521375313754137551375613757137581375913760137611376213763137641376513766137671376813769137701377113772137731377413775137761377713778137791378013781137821378313784137851378613787137881378913790137911379213793137941379513796137971379813799138001380113802138031380413805138061380713808138091381013811138121381313814138151381613817138181381913820138211382213823138241382513826138271382813829138301383113832138331383413835138361383713838138391384013841138421384313844138451384613847138481384913850138511385213853138541385513856138571385813859138601386113862138631386413865138661386713868138691387013871138721387313874138751387613877138781387913880138811388213883138841388513886138871388813889138901389113892138931389413895138961389713898138991390013901139021390313904139051390613907139081390913910139111391213913139141391513916139171391813919139201392113922139231392413925139261392713928139291393013931139321393313934139351393613937139381393913940139411394213943139441394513946139471394813949139501395113952139531395413955139561395713958139591396013961139621396313964139651396613967139681396913970139711397213973139741397513976139771397813979139801398113982139831398413985139861398713988139891399013991139921399313994139951399613997139981399914000140011400214003140041400514006140071400814009140101401114012140131401414015140161401714018140191402014021140221402314024140251402614027140281402914030140311403214033140341403514036140371403814039140401404114042140431404414045140461404714048140491405014051140521405314054140551405614057140581405914060140611406214063140641406514066140671406814069140701407114072140731407414075140761407714078140791408014081140821408314084140851408614087140881408914090140911409214093140941409514096140971409814099141001410114102141031410414105141061410714108141091411014111141121411314114141151411614117141181411914120141211412214123141241412514126141271412814129141301413114132141331413414135141361413714138141391414014141141421414314144141451414614147141481414914150141511415214153141541415514156141571415814159141601416114162141631416414165141661416714168141691417014171141721417314174141751417614177141781417914180141811418214183141841418514186141871418814189141901419114192141931419414195141961419714198141991420014201142021420314204142051420614207142081420914210142111421214213142141421514216142171421814219142201422114222142231422414225142261422714228142291423014231142321423314234142351423614237142381423914240142411424214243142441424514246142471424814249142501425114252142531425414255142561425714258142591426014261142621426314264142651426614267142681426914270142711427214273142741427514276142771427814279142801428114282142831428414285142861428714288142891429014291142921429314294142951429614297142981429914300143011430214303143041430514306143071430814309143101431114312143131431414315143161431714318143191432014321143221432314324143251432614327143281432914330143311433214333143341433514336143371433814339143401434114342143431434414345143461434714348143491435014351143521435314354143551435614357143581435914360143611436214363143641436514366143671436814369143701437114372143731437414375143761437714378143791438014381143821438314384143851438614387143881438914390143911439214393143941439514396143971439814399144001440114402144031440414405144061440714408144091441014411144121441314414144151441614417144181441914420144211442214423144241442514426144271442814429144301443114432144331443414435144361443714438144391444014441144421444314444144451444614447144481444914450144511445214453144541445514456144571445814459144601446114462144631446414465144661446714468144691447014471144721447314474144751447614477144781447914480144811448214483144841448514486144871448814489144901449114492144931449414495144961449714498144991450014501145021450314504145051450614507145081450914510145111451214513145141451514516145171451814519145201452114522145231452414525145261452714528145291453014531145321453314534145351453614537145381453914540145411454214543145441454514546145471454814549145501455114552145531455414555145561455714558145591456014561145621456314564145651456614567145681456914570145711457214573145741457514576145771457814579145801458114582145831458414585145861458714588145891459014591145921459314594145951459614597145981459914600146011460214603146041460514606146071460814609146101461114612146131461414615146161461714618146191462014621146221462314624146251462614627146281462914630146311463214633146341463514636146371463814639146401464114642146431464414645146461464714648146491465014651146521465314654146551465614657146581465914660146611466214663146641466514666146671466814669146701467114672146731467414675146761467714678146791468014681146821468314684146851468614687146881468914690146911469214693146941469514696146971469814699147001470114702147031470414705147061470714708147091471014711147121471314714147151471614717147181471914720147211472214723147241472514726147271472814729147301473114732147331473414735147361473714738147391474014741147421474314744147451474614747147481474914750147511475214753147541475514756147571475814759147601476114762147631476414765147661476714768147691477014771147721477314774147751477614777147781477914780147811478214783147841478514786147871478814789147901479114792147931479414795147961479714798147991480014801148021480314804148051480614807148081480914810148111481214813148141481514816148171481814819148201482114822148231482414825148261482714828148291483014831148321483314834148351483614837148381483914840148411484214843148441484514846148471484814849148501485114852148531485414855148561485714858148591486014861148621486314864148651486614867148681486914870148711487214873148741487514876148771487814879148801488114882148831488414885148861488714888148891489014891148921489314894148951489614897148981489914900149011490214903149041490514906149071490814909149101491114912149131491414915149161491714918149191492014921149221492314924149251492614927149281492914930149311493214933149341493514936149371493814939149401494114942149431494414945149461494714948149491495014951149521495314954149551495614957149581495914960149611496214963149641496514966149671496814969149701497114972149731497414975149761497714978149791498014981149821498314984149851498614987149881498914990149911499214993149941499514996149971499814999150001500115002150031500415005150061500715008150091501015011150121501315014150151501615017150181501915020150211502215023150241502515026150271502815029150301503115032150331503415035150361503715038150391504015041150421504315044150451504615047150481504915050150511505215053150541505515056150571505815059150601506115062150631506415065150661506715068150691507015071150721507315074150751507615077150781507915080150811508215083150841508515086150871508815089150901509115092150931509415095150961509715098150991510015101151021510315104151051510615107151081510915110151111511215113151141511515116151171511815119151201512115122151231512415125151261512715128151291513015131151321513315134151351513615137151381513915140151411514215143151441514515146151471514815149151501515115152151531515415155151561515715158151591516015161151621516315164151651516615167151681516915170151711517215173151741517515176151771517815179151801518115182151831518415185151861518715188151891519015191151921519315194151951519615197151981519915200152011520215203152041520515206152071520815209152101521115212152131521415215152161521715218152191522015221152221522315224152251522615227152281522915230152311523215233152341523515236152371523815239152401524115242152431524415245152461524715248152491525015251152521525315254152551525615257152581525915260152611526215263152641526515266152671526815269152701527115272152731527415275152761527715278152791528015281152821528315284152851528615287152881528915290152911529215293152941529515296152971529815299153001530115302153031530415305153061530715308153091531015311153121531315314153151531615317153181531915320153211532215323153241532515326153271532815329153301533115332153331533415335153361533715338153391534015341153421534315344153451534615347153481534915350153511535215353153541535515356153571535815359153601536115362153631536415365153661536715368153691537015371153721537315374153751537615377153781537915380153811538215383153841538515386153871538815389153901539115392153931539415395153961539715398153991540015401154021540315404154051540615407154081540915410154111541215413154141541515416154171541815419154201542115422154231542415425154261542715428154291543015431154321543315434154351543615437154381543915440154411544215443154441544515446154471544815449154501545115452154531545415455154561545715458154591546015461154621546315464154651546615467154681546915470154711547215473154741547515476154771547815479154801548115482154831548415485154861548715488154891549015491154921549315494154951549615497154981549915500155011550215503155041550515506155071550815509155101551115512155131551415515155161551715518155191552015521155221552315524155251552615527155281552915530155311553215533155341553515536155371553815539155401554115542155431554415545155461554715548155491555015551155521555315554155551555615557155581555915560155611556215563155641556515566155671556815569155701557115572155731557415575155761557715578155791558015581155821558315584155851558615587155881558915590155911559215593155941559515596155971559815599156001560115602156031560415605156061560715608156091561015611156121561315614156151561615617156181561915620156211562215623156241562515626156271562815629156301563115632156331563415635156361563715638156391564015641156421564315644156451564615647156481564915650156511565215653156541565515656156571565815659156601566115662156631566415665156661566715668156691567015671156721567315674156751567615677156781567915680156811568215683156841568515686156871568815689156901569115692156931569415695156961569715698156991570015701157021570315704157051570615707157081570915710157111571215713157141571515716157171571815719157201572115722157231572415725157261572715728157291573015731157321573315734157351573615737157381573915740157411574215743157441574515746157471574815749157501575115752157531575415755157561575715758157591576015761157621576315764157651576615767157681576915770157711577215773157741577515776157771577815779157801578115782157831578415785157861578715788157891579015791157921579315794157951579615797157981579915800158011580215803158041580515806158071580815809158101581115812158131581415815158161581715818158191582015821158221582315824158251582615827158281582915830158311583215833158341583515836158371583815839158401584115842158431584415845158461584715848158491585015851158521585315854158551585615857158581585915860158611586215863158641586515866158671586815869158701587115872158731587415875158761587715878158791588015881158821588315884158851588615887158881588915890158911589215893158941589515896158971589815899159001590115902159031590415905159061590715908159091591015911159121591315914159151591615917159181591915920159211592215923159241592515926159271592815929159301593115932159331593415935159361593715938159391594015941159421594315944159451594615947159481594915950159511595215953159541595515956159571595815959159601596115962159631596415965159661596715968159691597015971159721597315974159751597615977159781597915980159811598215983159841598515986159871598815989159901599115992159931599415995159961599715998159991600016001160021600316004160051600616007160081600916010160111601216013160141601516016160171601816019160201602116022160231602416025160261602716028160291603016031160321603316034160351603616037160381603916040160411604216043160441604516046160471604816049160501605116052160531605416055160561605716058160591606016061160621606316064160651606616067160681606916070160711607216073160741607516076160771607816079160801608116082160831608416085160861608716088160891609016091160921609316094160951609616097160981609916100161011610216103161041610516106161071610816109161101611116112161131611416115161161611716118161191612016121161221612316124161251612616127161281612916130161311613216133161341613516136161371613816139161401614116142161431614416145161461614716148161491615016151161521615316154161551615616157161581615916160161611616216163161641616516166161671616816169161701617116172161731617416175161761617716178161791618016181161821618316184161851618616187161881618916190161911619216193161941619516196161971619816199162001620116202162031620416205162061620716208162091621016211162121621316214162151621616217162181621916220162211622216223162241622516226162271622816229162301623116232162331623416235162361623716238162391624016241162421624316244162451624616247162481624916250162511625216253162541625516256162571625816259162601626116262162631626416265162661626716268162691627016271162721627316274162751627616277162781627916280162811628216283162841628516286162871628816289162901629116292162931629416295162961629716298162991630016301163021630316304163051630616307163081630916310163111631216313163141631516316163171631816319163201632116322163231632416325163261632716328163291633016331163321633316334163351633616337163381633916340163411634216343163441634516346163471634816349163501635116352163531635416355163561635716358163591636016361163621636316364163651636616367163681636916370163711637216373163741637516376163771637816379163801638116382163831638416385163861638716388163891639016391163921639316394163951639616397163981639916400164011640216403164041640516406164071640816409164101641116412164131641416415164161641716418164191642016421164221642316424164251642616427164281642916430164311643216433164341643516436164371643816439164401644116442164431644416445164461644716448164491645016451164521645316454164551645616457164581645916460164611646216463164641646516466164671646816469164701647116472164731647416475164761647716478164791648016481164821648316484164851648616487164881648916490164911649216493164941649516496164971649816499165001650116502165031650416505165061650716508165091651016511165121651316514165151651616517165181651916520165211652216523165241652516526165271652816529165301653116532165331653416535165361653716538165391654016541165421654316544165451654616547165481654916550165511655216553165541655516556165571655816559165601656116562165631656416565165661656716568165691657016571165721657316574165751657616577165781657916580165811658216583165841658516586165871658816589165901659116592165931659416595165961659716598165991660016601166021660316604166051660616607166081660916610166111661216613166141661516616166171661816619166201662116622166231662416625166261662716628166291663016631166321663316634166351663616637166381663916640166411664216643166441664516646166471664816649166501665116652166531665416655166561665716658166591666016661166621666316664166651666616667166681666916670166711667216673166741667516676166771667816679166801668116682166831668416685166861668716688166891669016691166921669316694166951669616697166981669916700167011670216703167041670516706167071670816709167101671116712167131671416715167161671716718167191672016721167221672316724167251672616727167281672916730167311673216733167341673516736167371673816739167401674116742167431674416745167461674716748167491675016751167521675316754167551675616757167581675916760167611676216763167641676516766167671676816769167701677116772167731677416775167761677716778167791678016781167821678316784167851678616787167881678916790167911679216793167941679516796167971679816799168001680116802168031680416805168061680716808168091681016811168121681316814168151681616817168181681916820168211682216823168241682516826168271682816829168301683116832168331683416835168361683716838168391684016841168421684316844168451684616847168481684916850168511685216853168541685516856168571685816859168601686116862168631686416865168661686716868168691687016871168721687316874168751687616877168781687916880168811688216883168841688516886168871688816889168901689116892168931689416895168961689716898168991690016901169021690316904169051690616907169081690916910169111691216913169141691516916169171691816919169201692116922169231692416925169261692716928169291693016931169321693316934169351693616937169381693916940169411694216943169441694516946169471694816949169501695116952169531695416955169561695716958169591696016961169621696316964169651696616967169681696916970169711697216973169741697516976169771697816979169801698116982169831698416985169861698716988169891699016991169921699316994169951699616997169981699917000170011700217003170041700517006170071700817009170101701117012170131701417015170161701717018170191702017021170221702317024170251702617027170281702917030170311703217033170341703517036170371703817039170401704117042170431704417045170461704717048170491705017051170521705317054170551705617057170581705917060170611706217063170641706517066170671706817069170701707117072170731707417075170761707717078170791708017081170821708317084170851708617087170881708917090170911709217093170941709517096170971709817099171001710117102171031710417105171061710717108171091711017111171121711317114171151711617117171181711917120171211712217123171241712517126171271712817129171301713117132171331713417135171361713717138171391714017141171421714317144171451714617147171481714917150171511715217153171541715517156171571715817159171601716117162171631716417165171661716717168171691717017171171721717317174171751717617177171781717917180171811718217183171841718517186171871718817189171901719117192171931719417195171961719717198171991720017201172021720317204172051720617207172081720917210172111721217213172141721517216172171721817219172201722117222172231722417225172261722717228172291723017231172321723317234172351723617237172381723917240172411724217243172441724517246172471724817249172501725117252172531725417255172561725717258172591726017261172621726317264172651726617267172681726917270172711727217273172741727517276172771727817279172801728117282172831728417285172861728717288172891729017291172921729317294172951729617297172981729917300173011730217303173041730517306173071730817309173101731117312173131731417315173161731717318173191732017321173221732317324173251732617327173281732917330173311733217333173341733517336173371733817339173401734117342173431734417345173461734717348173491735017351173521735317354173551735617357173581735917360173611736217363173641736517366173671736817369173701737117372173731737417375173761737717378173791738017381173821738317384173851738617387173881738917390173911739217393173941739517396173971739817399174001740117402174031740417405174061740717408174091741017411174121741317414174151741617417174181741917420174211742217423174241742517426174271742817429174301743117432174331743417435174361743717438174391744017441174421744317444174451744617447174481744917450174511745217453174541745517456174571745817459174601746117462174631746417465174661746717468174691747017471174721747317474174751747617477174781747917480174811748217483174841748517486174871748817489174901749117492174931749417495174961749717498174991750017501175021750317504175051750617507175081750917510175111751217513175141751517516175171751817519175201752117522175231752417525175261752717528175291753017531175321753317534175351753617537175381753917540175411754217543175441754517546175471754817549175501755117552175531755417555175561755717558175591756017561175621756317564175651756617567175681756917570175711757217573175741757517576175771757817579175801758117582175831758417585175861758717588175891759017591175921759317594175951759617597175981759917600176011760217603176041760517606176071760817609176101761117612176131761417615176161761717618176191762017621176221762317624176251762617627176281762917630176311763217633176341763517636176371763817639176401764117642176431764417645176461764717648176491765017651176521765317654176551765617657176581765917660176611766217663176641766517666176671766817669176701767117672176731767417675176761767717678176791768017681176821768317684176851768617687176881768917690176911769217693176941769517696176971769817699177001770117702177031770417705177061770717708177091771017711177121771317714177151771617717177181771917720177211772217723177241772517726177271772817729177301773117732177331773417735177361773717738177391774017741177421774317744177451774617747177481774917750177511775217753177541775517756177571775817759177601776117762177631776417765177661776717768177691777017771177721777317774177751777617777177781777917780177811778217783177841778517786177871778817789177901779117792177931779417795177961779717798177991780017801178021780317804178051780617807178081780917810178111781217813178141781517816178171781817819178201782117822178231782417825178261782717828178291783017831178321783317834178351783617837178381783917840178411784217843178441784517846178471784817849178501785117852178531785417855178561785717858178591786017861178621786317864178651786617867178681786917870178711787217873178741787517876178771787817879178801788117882178831788417885178861788717888178891789017891178921789317894178951789617897178981789917900179011790217903179041790517906179071790817909179101791117912179131791417915179161791717918179191792017921179221792317924179251792617927179281792917930179311793217933179341793517936179371793817939179401794117942179431794417945179461794717948179491795017951179521795317954179551795617957179581795917960179611796217963179641796517966179671796817969179701797117972179731797417975179761797717978179791798017981179821798317984179851798617987179881798917990179911799217993179941799517996179971799817999180001800118002180031800418005180061800718008180091801018011180121801318014180151801618017180181801918020180211802218023180241802518026180271802818029180301803118032180331803418035180361803718038180391804018041180421804318044180451804618047180481804918050180511805218053180541805518056180571805818059180601806118062180631806418065180661806718068180691807018071180721807318074180751807618077180781807918080180811808218083180841808518086180871808818089180901809118092180931809418095180961809718098180991810018101181021810318104181051810618107181081810918110181111811218113181141811518116181171811818119181201812118122181231812418125181261812718128181291813018131181321813318134181351813618137181381813918140181411814218143181441814518146181471814818149181501815118152181531815418155181561815718158181591816018161181621816318164181651816618167181681816918170181711817218173181741817518176181771817818179181801818118182181831818418185181861818718188181891819018191181921819318194181951819618197181981819918200182011820218203182041820518206182071820818209182101821118212182131821418215182161821718218182191822018221182221822318224182251822618227182281822918230182311823218233182341823518236182371823818239182401824118242182431824418245182461824718248182491825018251182521825318254182551825618257182581825918260182611826218263182641826518266182671826818269182701827118272182731827418275182761827718278182791828018281182821828318284182851828618287182881828918290182911829218293182941829518296182971829818299183001830118302183031830418305183061830718308183091831018311183121831318314183151831618317183181831918320183211832218323183241832518326183271832818329183301833118332183331833418335183361833718338183391834018341183421834318344183451834618347183481834918350183511835218353183541835518356183571835818359183601836118362183631836418365183661836718368183691837018371183721837318374183751837618377183781837918380183811838218383183841838518386183871838818389183901839118392183931839418395183961839718398183991840018401184021840318404184051840618407184081840918410184111841218413184141841518416184171841818419184201842118422184231842418425184261842718428184291843018431184321843318434184351843618437184381843918440184411844218443184441844518446184471844818449184501845118452184531845418455184561845718458184591846018461184621846318464184651846618467184681846918470184711847218473184741847518476184771847818479184801848118482184831848418485184861848718488184891849018491184921849318494184951849618497184981849918500185011850218503185041850518506185071850818509185101851118512185131851418515185161851718518185191852018521185221852318524185251852618527185281852918530185311853218533185341853518536185371853818539185401854118542185431854418545185461854718548185491855018551185521855318554185551855618557185581855918560185611856218563185641856518566185671856818569185701857118572185731857418575185761857718578185791858018581185821858318584185851858618587185881858918590185911859218593185941859518596185971859818599186001860118602186031860418605186061860718608186091861018611186121861318614186151861618617186181861918620186211862218623186241862518626186271862818629186301863118632186331863418635186361863718638186391864018641186421864318644186451864618647186481864918650186511865218653186541865518656186571865818659186601866118662186631866418665186661866718668186691867018671186721867318674186751867618677186781867918680186811868218683186841868518686186871868818689186901869118692186931869418695186961869718698186991870018701187021870318704187051870618707187081870918710187111871218713187141871518716187171871818719187201872118722187231872418725187261872718728187291873018731187321873318734187351873618737187381873918740187411874218743187441874518746187471874818749187501875118752187531875418755187561875718758187591876018761187621876318764187651876618767187681876918770187711877218773187741877518776187771877818779187801878118782187831878418785187861878718788187891879018791187921879318794187951879618797187981879918800188011880218803188041880518806188071880818809188101881118812188131881418815188161881718818188191882018821188221882318824188251882618827188281882918830188311883218833188341883518836188371883818839188401884118842188431884418845188461884718848188491885018851188521885318854188551885618857188581885918860188611886218863188641886518866188671886818869188701887118872188731887418875188761887718878188791888018881188821888318884188851888618887188881888918890188911889218893188941889518896188971889818899189001890118902189031890418905189061890718908189091891018911189121891318914189151891618917189181891918920189211892218923189241892518926189271892818929189301893118932189331893418935189361893718938189391894018941189421894318944189451894618947189481894918950189511895218953189541895518956189571895818959189601896118962189631896418965189661896718968189691897018971189721897318974189751897618977189781897918980189811898218983189841898518986189871898818989189901899118992189931899418995189961899718998189991900019001190021900319004190051900619007190081900919010190111901219013190141901519016190171901819019190201902119022190231902419025190261902719028190291903019031190321903319034190351903619037190381903919040190411904219043190441904519046190471904819049190501905119052190531905419055190561905719058190591906019061190621906319064190651906619067190681906919070190711907219073190741907519076190771907819079190801908119082190831908419085190861908719088190891909019091190921909319094190951909619097190981909919100191011910219103191041910519106191071910819109191101911119112191131911419115191161911719118191191912019121191221912319124191251912619127191281912919130191311913219133191341913519136191371913819139191401914119142191431914419145191461914719148191491915019151191521915319154191551915619157191581915919160191611916219163191641916519166191671916819169191701917119172191731917419175191761917719178191791918019181191821918319184191851918619187191881918919190191911919219193191941919519196191971919819199192001920119202192031920419205192061920719208192091921019211192121921319214192151921619217192181921919220192211922219223192241922519226192271922819229192301923119232192331923419235192361923719238192391924019241192421924319244192451924619247192481924919250192511925219253192541925519256192571925819259192601926119262192631926419265192661926719268192691927019271192721927319274192751927619277192781927919280192811928219283192841928519286192871928819289192901929119292192931929419295192961929719298192991930019301193021930319304193051930619307193081930919310193111931219313193141931519316193171931819319193201932119322193231932419325193261932719328193291933019331193321933319334193351933619337193381933919340193411934219343193441934519346193471934819349193501935119352193531935419355193561935719358193591936019361193621936319364193651936619367193681936919370193711937219373193741937519376193771937819379193801938119382193831938419385193861938719388193891939019391193921939319394193951939619397193981939919400194011940219403194041940519406194071940819409194101941119412194131941419415194161941719418194191942019421194221942319424194251942619427194281942919430194311943219433194341943519436194371943819439194401944119442194431944419445194461944719448194491945019451194521945319454194551945619457194581945919460194611946219463194641946519466194671946819469194701947119472194731947419475194761947719478194791948019481194821948319484194851948619487194881948919490194911949219493194941949519496194971949819499195001950119502195031950419505195061950719508195091951019511195121951319514195151951619517195181951919520195211952219523195241952519526195271952819529195301953119532195331953419535195361953719538195391954019541195421954319544195451954619547195481954919550195511955219553195541955519556195571955819559195601956119562195631956419565195661956719568195691957019571195721957319574195751957619577195781957919580195811958219583195841958519586195871958819589195901959119592195931959419595195961959719598195991960019601196021960319604196051960619607196081960919610196111961219613196141961519616196171961819619196201962119622196231962419625196261962719628196291963019631196321963319634196351963619637196381963919640196411964219643196441964519646196471964819649196501965119652196531965419655196561965719658196591966019661196621966319664196651966619667196681966919670196711967219673196741967519676196771967819679196801968119682196831968419685196861968719688196891969019691196921969319694196951969619697196981969919700197011970219703197041970519706197071970819709197101971119712197131971419715197161971719718197191972019721197221972319724197251972619727197281972919730197311973219733197341973519736197371973819739197401974119742197431974419745197461974719748197491975019751197521975319754197551975619757197581975919760197611976219763197641976519766197671976819769197701977119772197731977419775197761977719778197791978019781197821978319784197851978619787197881978919790197911979219793197941979519796197971979819799198001980119802198031980419805198061980719808198091981019811198121981319814198151981619817198181981919820198211982219823198241982519826198271982819829198301983119832198331983419835198361983719838198391984019841198421984319844198451984619847198481984919850198511985219853198541985519856198571985819859198601986119862198631986419865198661986719868198691987019871198721987319874198751987619877198781987919880198811988219883198841988519886198871988819889198901989119892198931989419895198961989719898198991990019901199021990319904199051990619907199081990919910199111991219913199141991519916199171991819919199201992119922199231992419925199261992719928199291993019931199321993319934199351993619937199381993919940199411994219943199441994519946199471994819949199501995119952199531995419955199561995719958199591996019961199621996319964199651996619967199681996919970199711997219973199741997519976199771997819979199801998119982199831998419985199861998719988199891999019991199921999319994199951999619997199981999920000200012000220003200042000520006200072000820009200102001120012200132001420015200162001720018200192002020021200222002320024200252002620027200282002920030200312003220033200342003520036200372003820039200402004120042200432004420045200462004720048200492005020051200522005320054200552005620057200582005920060200612006220063200642006520066200672006820069200702007120072200732007420075200762007720078200792008020081200822008320084200852008620087200882008920090200912009220093200942009520096200972009820099201002010120102201032010420105201062010720108201092011020111201122011320114201152011620117201182011920120201212012220123201242012520126201272012820129201302013120132201332013420135201362013720138201392014020141201422014320144201452014620147201482014920150201512015220153201542015520156201572015820159201602016120162201632016420165201662016720168201692017020171201722017320174201752017620177201782017920180201812018220183201842018520186201872018820189201902019120192201932019420195201962019720198201992020020201202022020320204202052020620207202082020920210202112021220213202142021520216202172021820219202202022120222202232022420225202262022720228202292023020231202322023320234202352023620237202382023920240202412024220243202442024520246202472024820249202502025120252202532025420255202562025720258202592026020261202622026320264202652026620267202682026920270202712027220273202742027520276202772027820279202802028120282202832028420285202862028720288202892029020291202922029320294202952029620297202982029920300203012030220303203042030520306203072030820309203102031120312203132031420315203162031720318203192032020321203222032320324203252032620327203282032920330203312033220333203342033520336203372033820339203402034120342203432034420345203462034720348203492035020351203522035320354203552035620357203582035920360203612036220363203642036520366203672036820369203702037120372203732037420375203762037720378203792038020381203822038320384203852038620387203882038920390203912039220393203942039520396203972039820399204002040120402204032040420405204062040720408204092041020411204122041320414204152041620417204182041920420204212042220423204242042520426204272042820429204302043120432204332043420435204362043720438204392044020441204422044320444204452044620447204482044920450204512045220453204542045520456204572045820459204602046120462204632046420465204662046720468204692047020471204722047320474204752047620477204782047920480204812048220483204842048520486204872048820489204902049120492204932049420495204962049720498204992050020501205022050320504205052050620507205082050920510205112051220513205142051520516205172051820519205202052120522205232052420525205262052720528205292053020531205322053320534205352053620537205382053920540205412054220543205442054520546205472054820549205502055120552205532055420555205562055720558205592056020561205622056320564205652056620567205682056920570205712057220573205742057520576205772057820579205802058120582205832058420585205862058720588205892059020591205922059320594205952059620597205982059920600206012060220603206042060520606206072060820609206102061120612206132061420615206162061720618206192062020621206222062320624206252062620627206282062920630206312063220633206342063520636206372063820639206402064120642206432064420645206462064720648206492065020651206522065320654206552065620657206582065920660206612066220663206642066520666206672066820669206702067120672206732067420675206762067720678206792068020681206822068320684206852068620687206882068920690206912069220693206942069520696206972069820699207002070120702207032070420705207062070720708207092071020711207122071320714207152071620717207182071920720207212072220723207242072520726207272072820729207302073120732207332073420735207362073720738207392074020741207422074320744207452074620747207482074920750207512075220753207542075520756207572075820759207602076120762207632076420765207662076720768207692077020771207722077320774207752077620777207782077920780207812078220783207842078520786207872078820789207902079120792207932079420795207962079720798207992080020801208022080320804208052080620807208082080920810208112081220813208142081520816208172081820819208202082120822208232082420825208262082720828208292083020831208322083320834208352083620837208382083920840208412084220843208442084520846208472084820849208502085120852208532085420855208562085720858208592086020861208622086320864208652086620867208682086920870208712087220873208742087520876208772087820879208802088120882208832088420885208862088720888208892089020891208922089320894208952089620897208982089920900209012090220903209042090520906209072090820909209102091120912209132091420915209162091720918209192092020921209222092320924209252092620927209282092920930209312093220933209342093520936209372093820939209402094120942209432094420945209462094720948209492095020951209522095320954209552095620957209582095920960209612096220963209642096520966209672096820969209702097120972209732097420975209762097720978209792098020981209822098320984209852098620987209882098920990209912099220993209942099520996209972099820999210002100121002210032100421005210062100721008210092101021011210122101321014210152101621017210182101921020210212102221023210242102521026210272102821029210302103121032210332103421035210362103721038210392104021041210422104321044210452104621047210482104921050210512105221053210542105521056210572105821059210602106121062210632106421065210662106721068210692107021071210722107321074210752107621077210782107921080210812108221083210842108521086210872108821089210902109121092210932109421095210962109721098210992110021101211022110321104211052110621107211082110921110211112111221113211142111521116211172111821119211202112121122211232112421125211262112721128211292113021131211322113321134211352113621137211382113921140211412114221143211442114521146211472114821149211502115121152211532115421155211562115721158211592116021161211622116321164211652116621167211682116921170211712117221173211742117521176211772117821179211802118121182211832118421185211862118721188211892119021191211922119321194211952119621197211982119921200212012120221203212042120521206212072120821209212102121121212212132121421215212162121721218212192122021221212222122321224212252122621227212282122921230212312123221233212342123521236212372123821239212402124121242212432124421245212462124721248212492125021251212522125321254212552125621257212582125921260212612126221263212642126521266212672126821269212702127121272212732127421275212762127721278212792128021281212822128321284212852128621287212882128921290212912129221293212942129521296212972129821299213002130121302213032130421305213062130721308213092131021311213122131321314213152131621317213182131921320213212132221323213242132521326213272132821329213302133121332213332133421335213362133721338213392134021341213422134321344213452134621347213482134921350213512135221353213542135521356213572135821359213602136121362213632136421365213662136721368213692137021371213722137321374213752137621377213782137921380213812138221383213842138521386213872138821389213902139121392213932139421395213962139721398213992140021401214022140321404214052140621407214082140921410214112141221413214142141521416214172141821419214202142121422214232142421425214262142721428214292143021431214322143321434214352143621437214382143921440214412144221443214442144521446214472144821449214502145121452214532145421455214562145721458214592146021461214622146321464214652146621467214682146921470214712147221473214742147521476214772147821479214802148121482214832148421485214862148721488214892149021491214922149321494214952149621497214982149921500215012150221503215042150521506215072150821509215102151121512215132151421515215162151721518215192152021521215222152321524215252152621527215282152921530215312153221533215342153521536215372153821539215402154121542215432154421545215462154721548215492155021551215522155321554215552155621557215582155921560215612156221563215642156521566215672156821569215702157121572215732157421575215762157721578215792158021581215822158321584215852158621587215882158921590215912159221593215942159521596215972159821599216002160121602216032160421605216062160721608216092161021611216122161321614216152161621617216182161921620216212162221623216242162521626216272162821629216302163121632216332163421635216362163721638216392164021641216422164321644216452164621647216482164921650216512165221653216542165521656216572165821659216602166121662216632166421665216662166721668216692167021671216722167321674216752167621677216782167921680216812168221683216842168521686216872168821689216902169121692216932169421695216962169721698216992170021701217022170321704217052170621707217082170921710217112171221713217142171521716217172171821719217202172121722217232172421725217262172721728217292173021731217322173321734217352173621737217382173921740217412174221743217442174521746217472174821749217502175121752217532175421755217562175721758217592176021761217622176321764217652176621767217682176921770217712177221773217742177521776217772177821779217802178121782217832178421785217862178721788217892179021791217922179321794217952179621797217982179921800218012180221803218042180521806218072180821809218102181121812218132181421815218162181721818218192182021821218222182321824218252182621827218282182921830218312183221833218342183521836218372183821839218402184121842218432184421845218462184721848218492185021851218522185321854218552185621857218582185921860218612186221863218642186521866218672186821869218702187121872218732187421875218762187721878218792188021881218822188321884218852188621887218882188921890218912189221893218942189521896218972189821899219002190121902219032190421905219062190721908219092191021911219122191321914219152191621917219182191921920219212192221923219242192521926219272192821929219302193121932219332193421935219362193721938219392194021941219422194321944219452194621947219482194921950219512195221953219542195521956219572195821959219602196121962219632196421965219662196721968219692197021971219722197321974219752197621977219782197921980219812198221983219842198521986219872198821989219902199121992219932199421995219962199721998219992200022001220022200322004220052200622007220082200922010220112201222013220142201522016220172201822019220202202122022220232202422025220262202722028220292203022031220322203322034220352203622037220382203922040220412204222043220442204522046220472204822049220502205122052220532205422055220562205722058220592206022061220622206322064220652206622067220682206922070220712207222073220742207522076220772207822079220802208122082220832208422085220862208722088220892209022091220922209322094220952209622097220982209922100221012210222103221042210522106221072210822109221102211122112221132211422115221162211722118221192212022121221222212322124221252212622127221282212922130221312213222133221342213522136221372213822139221402214122142221432214422145221462214722148221492215022151221522215322154221552215622157221582215922160221612216222163221642216522166221672216822169221702217122172221732217422175221762217722178221792218022181221822218322184221852218622187221882218922190221912219222193221942219522196221972219822199222002220122202222032220422205222062220722208222092221022211222122221322214222152221622217222182221922220222212222222223222242222522226222272222822229222302223122232222332223422235222362223722238222392224022241222422224322244222452224622247222482224922250222512225222253222542225522256222572225822259222602226122262222632226422265222662226722268222692227022271222722227322274222752227622277222782227922280222812228222283222842228522286222872228822289222902229122292222932229422295222962229722298222992230022301223022230322304223052230622307223082230922310223112231222313223142231522316223172231822319223202232122322223232232422325223262232722328223292233022331223322233322334223352233622337223382233922340223412234222343223442234522346223472234822349223502235122352223532235422355223562235722358223592236022361223622236322364223652236622367223682236922370223712237222373223742237522376223772237822379223802238122382223832238422385223862238722388223892239022391223922239322394223952239622397223982239922400224012240222403224042240522406224072240822409224102241122412224132241422415224162241722418224192242022421224222242322424224252242622427224282242922430224312243222433224342243522436224372243822439224402244122442224432244422445224462244722448224492245022451224522245322454224552245622457224582245922460224612246222463224642246522466224672246822469224702247122472224732247422475224762247722478224792248022481224822248322484224852248622487224882248922490224912249222493224942249522496224972249822499225002250122502225032250422505225062250722508225092251022511225122251322514225152251622517225182251922520225212252222523225242252522526225272252822529225302253122532225332253422535225362253722538225392254022541225422254322544225452254622547225482254922550225512255222553225542255522556225572255822559225602256122562225632256422565225662256722568225692257022571225722257322574225752257622577225782257922580225812258222583225842258522586225872258822589225902259122592225932259422595225962259722598225992260022601226022260322604226052260622607226082260922610226112261222613226142261522616226172261822619226202262122622226232262422625226262262722628226292263022631226322263322634226352263622637226382263922640226412264222643226442264522646226472264822649226502265122652226532265422655226562265722658226592266022661226622266322664226652266622667226682266922670226712267222673226742267522676226772267822679226802268122682226832268422685226862268722688226892269022691226922269322694226952269622697226982269922700227012270222703227042270522706227072270822709227102271122712227132271422715227162271722718227192272022721227222272322724227252272622727227282272922730227312273222733227342273522736227372273822739227402274122742227432274422745227462274722748227492275022751227522275322754227552275622757227582275922760227612276222763227642276522766227672276822769227702277122772227732277422775227762277722778227792278022781227822278322784227852278622787227882278922790227912279222793227942279522796227972279822799228002280122802228032280422805228062280722808228092281022811228122281322814228152281622817228182281922820228212282222823228242282522826228272282822829228302283122832228332283422835228362283722838228392284022841228422284322844228452284622847228482284922850228512285222853228542285522856228572285822859228602286122862228632286422865228662286722868228692287022871228722287322874228752287622877228782287922880228812288222883228842288522886228872288822889228902289122892228932289422895228962289722898228992290022901229022290322904229052290622907229082290922910229112291222913229142291522916229172291822919229202292122922229232292422925229262292722928229292293022931229322293322934229352293622937229382293922940229412294222943229442294522946229472294822949229502295122952229532295422955229562295722958229592296022961229622296322964229652296622967229682296922970229712297222973229742297522976229772297822979229802298122982229832298422985229862298722988229892299022991229922299322994229952299622997229982299923000230012300223003230042300523006230072300823009230102301123012230132301423015230162301723018230192302023021230222302323024230252302623027230282302923030230312303223033230342303523036230372303823039230402304123042230432304423045230462304723048230492305023051230522305323054230552305623057230582305923060230612306223063230642306523066230672306823069230702307123072230732307423075230762307723078230792308023081230822308323084230852308623087230882308923090230912309223093230942309523096230972309823099231002310123102231032310423105231062310723108231092311023111231122311323114231152311623117231182311923120231212312223123231242312523126231272312823129231302313123132231332313423135231362313723138231392314023141231422314323144231452314623147231482314923150231512315223153231542315523156231572315823159231602316123162231632316423165231662316723168231692317023171231722317323174231752317623177231782317923180231812318223183231842318523186231872318823189231902319123192231932319423195231962319723198231992320023201232022320323204232052320623207232082320923210232112321223213232142321523216232172321823219232202322123222232232322423225232262322723228232292323023231232322323323234232352323623237232382323923240232412324223243232442324523246232472324823249232502325123252232532325423255232562325723258232592326023261232622326323264232652326623267232682326923270232712327223273232742327523276232772327823279232802328123282232832328423285232862328723288232892329023291232922329323294232952329623297232982329923300233012330223303233042330523306233072330823309233102331123312233132331423315233162331723318233192332023321233222332323324233252332623327233282332923330233312333223333233342333523336233372333823339233402334123342233432334423345233462334723348233492335023351233522335323354233552335623357233582335923360233612336223363233642336523366233672336823369233702337123372233732337423375233762337723378233792338023381233822338323384233852338623387233882338923390233912339223393233942339523396233972339823399234002340123402234032340423405234062340723408234092341023411234122341323414234152341623417234182341923420234212342223423234242342523426234272342823429234302343123432234332343423435234362343723438234392344023441234422344323444234452344623447234482344923450234512345223453234542345523456234572345823459234602346123462234632346423465234662346723468234692347023471234722347323474234752347623477234782347923480234812348223483234842348523486234872348823489234902349123492234932349423495234962349723498234992350023501235022350323504235052350623507235082350923510235112351223513235142351523516235172351823519235202352123522235232352423525235262352723528235292353023531235322353323534235352353623537235382353923540235412354223543235442354523546235472354823549235502355123552235532355423555235562355723558235592356023561235622356323564235652356623567235682356923570235712357223573235742357523576235772357823579235802358123582235832358423585235862358723588235892359023591235922359323594235952359623597235982359923600236012360223603236042360523606236072360823609236102361123612236132361423615236162361723618236192362023621236222362323624236252362623627236282362923630236312363223633236342363523636236372363823639236402364123642236432364423645236462364723648236492365023651236522365323654236552365623657236582365923660236612366223663236642366523666236672366823669236702367123672236732367423675236762367723678236792368023681236822368323684236852368623687236882368923690236912369223693236942369523696236972369823699237002370123702237032370423705237062370723708237092371023711237122371323714237152371623717237182371923720237212372223723237242372523726237272372823729237302373123732237332373423735237362373723738237392374023741237422374323744237452374623747237482374923750237512375223753237542375523756237572375823759237602376123762237632376423765237662376723768237692377023771237722377323774237752377623777237782377923780237812378223783237842378523786237872378823789237902379123792237932379423795237962379723798237992380023801238022380323804238052380623807238082380923810238112381223813238142381523816238172381823819238202382123822238232382423825238262382723828238292383023831238322383323834238352383623837238382383923840238412384223843238442384523846238472384823849238502385123852238532385423855238562385723858238592386023861238622386323864238652386623867238682386923870238712387223873238742387523876238772387823879238802388123882238832388423885238862388723888238892389023891238922389323894238952389623897238982389923900239012390223903239042390523906239072390823909239102391123912239132391423915239162391723918239192392023921239222392323924239252392623927239282392923930239312393223933239342393523936239372393823939239402394123942239432394423945239462394723948239492395023951239522395323954239552395623957239582395923960239612396223963239642396523966239672396823969239702397123972239732397423975239762397723978239792398023981239822398323984239852398623987239882398923990239912399223993239942399523996239972399823999240002400124002240032400424005240062400724008240092401024011240122401324014240152401624017240182401924020240212402224023240242402524026240272402824029240302403124032240332403424035240362403724038240392404024041240422404324044240452404624047240482404924050240512405224053240542405524056240572405824059240602406124062240632406424065240662406724068240692407024071240722407324074240752407624077240782407924080240812408224083240842408524086240872408824089240902409124092240932409424095240962409724098240992410024101241022410324104241052410624107241082410924110241112411224113241142411524116241172411824119241202412124122241232412424125241262412724128241292413024131241322413324134241352413624137241382413924140241412414224143241442414524146241472414824149241502415124152241532415424155241562415724158241592416024161241622416324164241652416624167241682416924170241712417224173241742417524176241772417824179241802418124182241832418424185241862418724188241892419024191241922419324194241952419624197241982419924200242012420224203242042420524206242072420824209242102421124212242132421424215242162421724218242192422024221242222422324224242252422624227242282422924230242312423224233242342423524236242372423824239242402424124242242432424424245242462424724248242492425024251242522425324254242552425624257242582425924260242612426224263242642426524266242672426824269242702427124272242732427424275242762427724278242792428024281242822428324284242852428624287242882428924290242912429224293242942429524296242972429824299243002430124302243032430424305243062430724308243092431024311243122431324314243152431624317243182431924320243212432224323243242432524326243272432824329243302433124332243332433424335243362433724338243392434024341243422434324344243452434624347243482434924350243512435224353243542435524356243572435824359243602436124362243632436424365243662436724368243692437024371243722437324374243752437624377243782437924380243812438224383243842438524386243872438824389243902439124392243932439424395243962439724398243992440024401244022440324404244052440624407244082440924410244112441224413244142441524416244172441824419244202442124422244232442424425244262442724428244292443024431244322443324434244352443624437244382443924440244412444224443244442444524446244472444824449244502445124452244532445424455244562445724458244592446024461244622446324464244652446624467244682446924470244712447224473244742447524476244772447824479244802448124482244832448424485244862448724488244892449024491244922449324494244952449624497244982449924500245012450224503245042450524506245072450824509245102451124512245132451424515245162451724518245192452024521245222452324524245252452624527245282452924530245312453224533245342453524536245372453824539245402454124542245432454424545245462454724548245492455024551245522455324554245552455624557245582455924560245612456224563245642456524566245672456824569245702457124572245732457424575245762457724578245792458024581245822458324584245852458624587245882458924590245912459224593245942459524596245972459824599246002460124602246032460424605246062460724608246092461024611246122461324614246152461624617246182461924620246212462224623246242462524626246272462824629246302463124632246332463424635246362463724638246392464024641246422464324644246452464624647246482464924650246512465224653246542465524656246572465824659246602466124662246632466424665246662466724668246692467024671246722467324674246752467624677246782467924680246812468224683246842468524686246872468824689246902469124692246932469424695246962469724698246992470024701247022470324704247052470624707247082470924710247112471224713247142471524716247172471824719247202472124722247232472424725247262472724728247292473024731247322473324734247352473624737247382473924740247412474224743247442474524746247472474824749247502475124752247532475424755247562475724758247592476024761247622476324764247652476624767247682476924770247712477224773247742477524776247772477824779247802478124782247832478424785247862478724788247892479024791247922479324794247952479624797247982479924800248012480224803248042480524806248072480824809248102481124812248132481424815248162481724818248192482024821248222482324824248252482624827248282482924830248312483224833248342483524836248372483824839248402484124842248432484424845248462484724848248492485024851248522485324854248552485624857248582485924860248612486224863248642486524866248672486824869248702487124872248732487424875248762487724878248792488024881248822488324884248852488624887248882488924890248912489224893248942489524896248972489824899249002490124902249032490424905249062490724908249092491024911249122491324914249152491624917249182491924920249212492224923249242492524926249272492824929249302493124932249332493424935249362493724938249392494024941249422494324944249452494624947249482494924950249512495224953249542495524956249572495824959249602496124962249632496424965249662496724968249692497024971249722497324974249752497624977249782497924980249812498224983249842498524986249872498824989249902499124992249932499424995249962499724998249992500025001250022500325004250052500625007250082500925010250112501225013250142501525016250172501825019250202502125022250232502425025250262502725028250292503025031250322503325034250352503625037250382503925040250412504225043250442504525046250472504825049250502505125052250532505425055250562505725058250592506025061250622506325064250652506625067250682506925070250712507225073250742507525076250772507825079250802508125082250832508425085250862508725088250892509025091250922509325094250952509625097250982509925100251012510225103251042510525106251072510825109251102511125112251132511425115251162511725118251192512025121251222512325124251252512625127251282512925130251312513225133251342513525136251372513825139251402514125142251432514425145251462514725148251492515025151251522515325154251552515625157251582515925160251612516225163251642516525166251672516825169251702517125172251732517425175251762517725178251792518025181251822518325184251852518625187251882518925190251912519225193251942519525196251972519825199252002520125202252032520425205252062520725208252092521025211252122521325214252152521625217252182521925220252212522225223252242522525226252272522825229252302523125232252332523425235252362523725238252392524025241252422524325244252452524625247252482524925250252512525225253252542525525256252572525825259252602526125262252632526425265252662526725268252692527025271252722527325274252752527625277252782527925280252812528225283252842528525286252872528825289252902529125292252932529425295252962529725298252992530025301253022530325304253052530625307253082530925310253112531225313253142531525316253172531825319253202532125322253232532425325253262532725328253292533025331253322533325334253352533625337253382533925340253412534225343253442534525346253472534825349253502535125352253532535425355253562535725358253592536025361253622536325364253652536625367253682536925370253712537225373253742537525376253772537825379253802538125382253832538425385253862538725388253892539025391253922539325394253952539625397253982539925400254012540225403254042540525406254072540825409254102541125412254132541425415254162541725418254192542025421254222542325424254252542625427254282542925430254312543225433254342543525436254372543825439254402544125442254432544425445254462544725448254492545025451254522545325454254552545625457254582545925460254612546225463254642546525466254672546825469254702547125472254732547425475254762547725478254792548025481254822548325484254852548625487254882548925490254912549225493254942549525496254972549825499255002550125502255032550425505255062550725508255092551025511255122551325514255152551625517255182551925520255212552225523255242552525526255272552825529255302553125532255332553425535255362553725538255392554025541255422554325544255452554625547255482554925550255512555225553255542555525556255572555825559255602556125562255632556425565255662556725568255692557025571255722557325574255752557625577255782557925580255812558225583255842558525586255872558825589255902559125592255932559425595255962559725598255992560025601256022560325604256052560625607256082560925610256112561225613256142561525616256172561825619256202562125622256232562425625256262562725628256292563025631256322563325634256352563625637256382563925640256412564225643256442564525646256472564825649256502565125652256532565425655256562565725658256592566025661256622566325664256652566625667256682566925670256712567225673256742567525676256772567825679256802568125682256832568425685256862568725688256892569025691256922569325694256952569625697256982569925700257012570225703257042570525706257072570825709257102571125712257132571425715257162571725718257192572025721257222572325724257252572625727257282572925730257312573225733257342573525736257372573825739257402574125742257432574425745257462574725748257492575025751257522575325754257552575625757257582575925760257612576225763257642576525766257672576825769257702577125772257732577425775257762577725778257792578025781257822578325784257852578625787257882578925790257912579225793257942579525796257972579825799258002580125802258032580425805258062580725808258092581025811258122581325814258152581625817258182581925820258212582225823258242582525826258272582825829258302583125832258332583425835258362583725838258392584025841258422584325844258452584625847258482584925850258512585225853258542585525856258572585825859258602586125862258632586425865258662586725868258692587025871258722587325874258752587625877258782587925880258812588225883258842588525886258872588825889258902589125892258932589425895258962589725898258992590025901259022590325904259052590625907259082590925910259112591225913259142591525916259172591825919259202592125922259232592425925259262592725928259292593025931259322593325934259352593625937259382593925940259412594225943259442594525946259472594825949259502595125952259532595425955259562595725958259592596025961259622596325964259652596625967259682596925970259712597225973259742597525976259772597825979259802598125982259832598425985259862598725988259892599025991259922599325994259952599625997259982599926000260012600226003260042600526006260072600826009260102601126012260132601426015260162601726018260192602026021260222602326024260252602626027260282602926030260312603226033260342603526036260372603826039260402604126042260432604426045260462604726048260492605026051260522605326054260552605626057260582605926060260612606226063260642606526066260672606826069260702607126072260732607426075260762607726078260792608026081260822608326084260852608626087260882608926090260912609226093260942609526096260972609826099261002610126102261032610426105261062610726108261092611026111261122611326114261152611626117261182611926120261212612226123261242612526126261272612826129261302613126132261332613426135261362613726138261392614026141261422614326144261452614626147261482614926150261512615226153261542615526156261572615826159261602616126162261632616426165261662616726168261692617026171261722617326174261752617626177261782617926180261812618226183261842618526186261872618826189261902619126192261932619426195261962619726198261992620026201262022620326204262052620626207262082620926210262112621226213262142621526216262172621826219262202622126222262232622426225262262622726228262292623026231262322623326234262352623626237262382623926240262412624226243262442624526246262472624826249262502625126252262532625426255262562625726258262592626026261262622626326264262652626626267262682626926270262712627226273262742627526276262772627826279262802628126282262832628426285262862628726288262892629026291262922629326294262952629626297262982629926300263012630226303263042630526306263072630826309263102631126312263132631426315263162631726318263192632026321263222632326324263252632626327263282632926330263312633226333263342633526336263372633826339263402634126342263432634426345263462634726348263492635026351263522635326354263552635626357263582635926360263612636226363263642636526366263672636826369263702637126372263732637426375263762637726378263792638026381263822638326384263852638626387263882638926390263912639226393263942639526396263972639826399264002640126402264032640426405264062640726408264092641026411264122641326414264152641626417264182641926420264212642226423264242642526426264272642826429264302643126432264332643426435264362643726438264392644026441264422644326444264452644626447264482644926450264512645226453264542645526456264572645826459264602646126462264632646426465264662646726468264692647026471264722647326474264752647626477264782647926480264812648226483264842648526486264872648826489264902649126492264932649426495264962649726498264992650026501265022650326504265052650626507265082650926510265112651226513265142651526516265172651826519265202652126522265232652426525265262652726528265292653026531265322653326534265352653626537265382653926540265412654226543265442654526546265472654826549265502655126552265532655426555265562655726558265592656026561265622656326564265652656626567265682656926570265712657226573265742657526576265772657826579265802658126582265832658426585265862658726588265892659026591265922659326594265952659626597265982659926600266012660226603266042660526606266072660826609266102661126612266132661426615266162661726618266192662026621266222662326624266252662626627266282662926630266312663226633266342663526636266372663826639266402664126642266432664426645266462664726648266492665026651266522665326654266552665626657266582665926660266612666226663266642666526666266672666826669266702667126672266732667426675266762667726678266792668026681266822668326684266852668626687266882668926690266912669226693266942669526696266972669826699267002670126702267032670426705267062670726708267092671026711267122671326714267152671626717267182671926720267212672226723267242672526726267272672826729267302673126732267332673426735267362673726738267392674026741267422674326744267452674626747267482674926750267512675226753267542675526756267572675826759267602676126762267632676426765267662676726768267692677026771267722677326774267752677626777267782677926780267812678226783267842678526786267872678826789267902679126792267932679426795267962679726798267992680026801268022680326804268052680626807268082680926810268112681226813268142681526816268172681826819268202682126822268232682426825268262682726828268292683026831268322683326834268352683626837268382683926840268412684226843268442684526846268472684826849268502685126852268532685426855268562685726858268592686026861268622686326864268652686626867268682686926870268712687226873268742687526876268772687826879268802688126882268832688426885268862688726888268892689026891268922689326894268952689626897268982689926900269012690226903269042690526906269072690826909269102691126912269132691426915269162691726918269192692026921269222692326924269252692626927269282692926930269312693226933269342693526936269372693826939269402694126942269432694426945269462694726948269492695026951269522695326954269552695626957269582695926960269612696226963269642696526966269672696826969269702697126972269732697426975269762697726978269792698026981269822698326984269852698626987269882698926990269912699226993269942699526996269972699826999270002700127002270032700427005270062700727008270092701027011270122701327014270152701627017270182701927020270212702227023270242702527026270272702827029270302703127032270332703427035270362703727038270392704027041270422704327044270452704627047270482704927050270512705227053270542705527056270572705827059270602706127062270632706427065270662706727068270692707027071270722707327074270752707627077270782707927080270812708227083270842708527086270872708827089270902709127092270932709427095270962709727098270992710027101271022710327104271052710627107271082710927110271112711227113271142711527116271172711827119271202712127122271232712427125271262712727128271292713027131271322713327134271352713627137271382713927140271412714227143271442714527146271472714827149271502715127152271532715427155271562715727158271592716027161271622716327164271652716627167271682716927170271712717227173271742717527176271772717827179271802718127182271832718427185271862718727188271892719027191271922719327194271952719627197271982719927200272012720227203272042720527206272072720827209272102721127212272132721427215272162721727218272192722027221272222722327224272252722627227272282722927230272312723227233272342723527236272372723827239272402724127242272432724427245272462724727248272492725027251272522725327254272552725627257272582725927260272612726227263272642726527266272672726827269272702727127272272732727427275272762727727278272792728027281272822728327284272852728627287272882728927290272912729227293272942729527296272972729827299273002730127302273032730427305273062730727308273092731027311273122731327314273152731627317273182731927320273212732227323273242732527326273272732827329273302733127332273332733427335273362733727338273392734027341273422734327344273452734627347273482734927350273512735227353273542735527356273572735827359273602736127362273632736427365273662736727368273692737027371273722737327374273752737627377273782737927380273812738227383273842738527386273872738827389273902739127392273932739427395273962739727398273992740027401274022740327404274052740627407274082740927410274112741227413274142741527416274172741827419274202742127422274232742427425274262742727428274292743027431274322743327434274352743627437274382743927440274412744227443274442744527446274472744827449274502745127452274532745427455274562745727458274592746027461274622746327464274652746627467274682746927470274712747227473274742747527476274772747827479274802748127482274832748427485274862748727488274892749027491274922749327494274952749627497274982749927500275012750227503275042750527506275072750827509275102751127512275132751427515275162751727518275192752027521275222752327524275252752627527275282752927530275312753227533275342753527536275372753827539275402754127542275432754427545275462754727548275492755027551275522755327554275552755627557275582755927560275612756227563275642756527566275672756827569275702757127572275732757427575275762757727578275792758027581275822758327584275852758627587275882758927590275912759227593275942759527596275972759827599276002760127602276032760427605276062760727608276092761027611276122761327614276152761627617276182761927620276212762227623276242762527626276272762827629276302763127632276332763427635276362763727638276392764027641276422764327644276452764627647276482764927650276512765227653276542765527656276572765827659276602766127662276632766427665276662766727668276692767027671276722767327674276752767627677276782767927680276812768227683276842768527686276872768827689276902769127692276932769427695276962769727698276992770027701277022770327704277052770627707277082770927710277112771227713277142771527716277172771827719277202772127722277232772427725277262772727728277292773027731277322773327734277352773627737277382773927740277412774227743277442774527746277472774827749277502775127752277532775427755277562775727758277592776027761277622776327764277652776627767277682776927770277712777227773277742777527776277772777827779277802778127782277832778427785277862778727788277892779027791277922779327794277952779627797277982779927800278012780227803278042780527806278072780827809278102781127812278132781427815278162781727818278192782027821278222782327824278252782627827278282782927830278312783227833278342783527836278372783827839278402784127842278432784427845278462784727848278492785027851278522785327854278552785627857278582785927860278612786227863278642786527866278672786827869278702787127872278732787427875278762787727878278792788027881278822788327884278852788627887278882788927890278912789227893278942789527896278972789827899279002790127902279032790427905279062790727908279092791027911279122791327914279152791627917279182791927920279212792227923279242792527926279272792827929279302793127932279332793427935279362793727938279392794027941279422794327944279452794627947279482794927950279512795227953279542795527956279572795827959279602796127962279632796427965279662796727968279692797027971279722797327974279752797627977279782797927980279812798227983279842798527986279872798827989279902799127992279932799427995279962799727998279992800028001280022800328004280052800628007280082800928010280112801228013280142801528016280172801828019280202802128022280232802428025280262802728028280292803028031280322803328034280352803628037280382803928040280412804228043280442804528046280472804828049280502805128052280532805428055280562805728058280592806028061280622806328064280652806628067280682806928070280712807228073280742807528076280772807828079280802808128082280832808428085280862808728088280892809028091280922809328094280952809628097280982809928100281012810228103281042810528106281072810828109281102811128112281132811428115281162811728118281192812028121281222812328124281252812628127281282812928130281312813228133281342813528136281372813828139281402814128142281432814428145281462814728148281492815028151281522815328154281552815628157281582815928160281612816228163281642816528166281672816828169281702817128172281732817428175281762817728178281792818028181281822818328184281852818628187281882818928190281912819228193281942819528196281972819828199282002820128202282032820428205282062820728208282092821028211282122821328214282152821628217282182821928220282212822228223282242822528226282272822828229282302823128232282332823428235282362823728238282392824028241282422824328244282452824628247282482824928250282512825228253282542825528256282572825828259282602826128262282632826428265282662826728268282692827028271282722827328274282752827628277282782827928280282812828228283282842828528286282872828828289282902829128292282932829428295282962829728298282992830028301283022830328304283052830628307283082830928310283112831228313283142831528316283172831828319283202832128322283232832428325283262832728328283292833028331283322833328334283352833628337283382833928340283412834228343283442834528346283472834828349283502835128352283532835428355283562835728358283592836028361283622836328364283652836628367283682836928370283712837228373283742837528376283772837828379283802838128382283832838428385283862838728388283892839028391283922839328394283952839628397283982839928400284012840228403284042840528406284072840828409284102841128412284132841428415284162841728418284192842028421284222842328424284252842628427284282842928430284312843228433284342843528436284372843828439284402844128442284432844428445284462844728448284492845028451284522845328454284552845628457284582845928460284612846228463284642846528466284672846828469284702847128472284732847428475284762847728478284792848028481284822848328484284852848628487284882848928490284912849228493284942849528496284972849828499285002850128502285032850428505285062850728508285092851028511285122851328514285152851628517285182851928520285212852228523285242852528526285272852828529285302853128532285332853428535285362853728538285392854028541285422854328544285452854628547285482854928550285512855228553285542855528556285572855828559285602856128562285632856428565285662856728568285692857028571285722857328574285752857628577285782857928580285812858228583285842858528586285872858828589285902859128592285932859428595285962859728598285992860028601286022860328604286052860628607286082860928610286112861228613286142861528616286172861828619286202862128622286232862428625286262862728628286292863028631286322863328634286352863628637286382863928640286412864228643286442864528646286472864828649286502865128652286532865428655286562865728658286592866028661286622866328664286652866628667286682866928670286712867228673286742867528676286772867828679286802868128682286832868428685286862868728688286892869028691286922869328694286952869628697286982869928700287012870228703287042870528706287072870828709287102871128712287132871428715287162871728718287192872028721287222872328724287252872628727287282872928730287312873228733287342873528736287372873828739287402874128742287432874428745287462874728748287492875028751287522875328754287552875628757287582875928760287612876228763287642876528766287672876828769287702877128772287732877428775287762877728778287792878028781287822878328784287852878628787287882878928790287912879228793287942879528796287972879828799288002880128802288032880428805288062880728808288092881028811288122881328814288152881628817288182881928820288212882228823288242882528826288272882828829288302883128832288332883428835288362883728838288392884028841288422884328844288452884628847288482884928850288512885228853288542885528856288572885828859288602886128862288632886428865288662886728868288692887028871288722887328874288752887628877288782887928880288812888228883288842888528886288872888828889288902889128892288932889428895288962889728898288992890028901289022890328904289052890628907289082890928910289112891228913289142891528916289172891828919289202892128922289232892428925289262892728928289292893028931289322893328934289352893628937289382893928940289412894228943289442894528946289472894828949289502895128952289532895428955289562895728958289592896028961289622896328964289652896628967289682896928970289712897228973289742897528976289772897828979289802898128982289832898428985289862898728988289892899028991289922899328994289952899628997289982899929000290012900229003290042900529006290072900829009290102901129012290132901429015290162901729018290192902029021290222902329024290252902629027290282902929030290312903229033290342903529036290372903829039290402904129042290432904429045290462904729048290492905029051290522905329054290552905629057290582905929060290612906229063290642906529066290672906829069290702907129072290732907429075290762907729078290792908029081290822908329084290852908629087290882908929090290912909229093290942909529096290972909829099291002910129102291032910429105291062910729108291092911029111291122911329114291152911629117291182911929120291212912229123291242912529126291272912829129291302913129132291332913429135291362913729138291392914029141291422914329144291452914629147291482914929150291512915229153291542915529156291572915829159291602916129162291632916429165291662916729168291692917029171291722917329174291752917629177291782917929180291812918229183291842918529186291872918829189291902919129192291932919429195291962919729198291992920029201292022920329204292052920629207292082920929210292112921229213292142921529216292172921829219292202922129222292232922429225292262922729228292292923029231292322923329234292352923629237292382923929240292412924229243292442924529246292472924829249292502925129252292532925429255292562925729258292592926029261292622926329264292652926629267292682926929270292712927229273292742927529276292772927829279292802928129282292832928429285292862928729288292892929029291292922929329294292952929629297292982929929300293012930229303293042930529306293072930829309293102931129312293132931429315293162931729318293192932029321293222932329324293252932629327293282932929330293312933229333293342933529336293372933829339293402934129342293432934429345293462934729348293492935029351293522935329354293552935629357293582935929360293612936229363293642936529366293672936829369293702937129372293732937429375293762937729378293792938029381293822938329384293852938629387293882938929390293912939229393293942939529396293972939829399294002940129402294032940429405294062940729408294092941029411294122941329414294152941629417294182941929420294212942229423294242942529426294272942829429294302943129432294332943429435294362943729438294392944029441294422944329444294452944629447294482944929450294512945229453294542945529456294572945829459294602946129462294632946429465294662946729468294692947029471294722947329474294752947629477294782947929480294812948229483294842948529486294872948829489294902949129492294932949429495294962949729498294992950029501295022950329504295052950629507295082950929510295112951229513295142951529516295172951829519295202952129522295232952429525295262952729528295292953029531295322953329534295352953629537295382953929540295412954229543295442954529546295472954829549295502955129552295532955429555295562955729558295592956029561295622956329564295652956629567295682956929570295712957229573295742957529576295772957829579295802958129582295832958429585295862958729588295892959029591295922959329594295952959629597295982959929600296012960229603296042960529606296072960829609296102961129612296132961429615296162961729618296192962029621296222962329624296252962629627296282962929630296312963229633296342963529636296372963829639296402964129642296432964429645296462964729648296492965029651296522965329654296552965629657296582965929660296612966229663296642966529666296672966829669296702967129672296732967429675296762967729678296792968029681296822968329684296852968629687296882968929690296912969229693296942969529696296972969829699297002970129702297032970429705297062970729708297092971029711297122971329714297152971629717297182971929720297212972229723297242972529726297272972829729297302973129732297332973429735297362973729738297392974029741297422974329744297452974629747297482974929750297512975229753297542975529756297572975829759297602976129762297632976429765297662976729768297692977029771297722977329774297752977629777297782977929780297812978229783297842978529786297872978829789297902979129792297932979429795297962979729798297992980029801298022980329804298052980629807298082980929810298112981229813298142981529816298172981829819298202982129822298232982429825298262982729828298292983029831298322983329834298352983629837298382983929840298412984229843298442984529846298472984829849298502985129852298532985429855298562985729858298592986029861298622986329864298652986629867298682986929870298712987229873298742987529876298772987829879298802988129882298832988429885298862988729888298892989029891298922989329894298952989629897298982989929900299012990229903299042990529906299072990829909299102991129912299132991429915299162991729918299192992029921299222992329924299252992629927299282992929930299312993229933299342993529936299372993829939299402994129942299432994429945299462994729948299492995029951299522995329954299552995629957299582995929960299612996229963299642996529966299672996829969299702997129972299732997429975299762997729978299792998029981299822998329984299852998629987299882998929990299912999229993299942999529996299972999829999300003000130002300033000430005300063000730008300093001030011300123001330014300153001630017300183001930020300213002230023300243002530026300273002830029300303003130032300333003430035300363003730038300393004030041300423004330044300453004630047300483004930050300513005230053300543005530056300573005830059300603006130062300633006430065300663006730068300693007030071300723007330074300753007630077300783007930080300813008230083300843008530086300873008830089300903009130092300933009430095300963009730098300993010030101301023010330104301053010630107301083010930110301113011230113301143011530116301173011830119301203012130122301233012430125301263012730128301293013030131301323013330134301353013630137301383013930140301413014230143301443014530146301473014830149301503015130152301533015430155301563015730158301593016030161301623016330164301653016630167301683016930170301713017230173301743017530176301773017830179301803018130182301833018430185301863018730188301893019030191301923019330194301953019630197301983019930200302013020230203302043020530206302073020830209302103021130212302133021430215302163021730218302193022030221302223022330224302253022630227302283022930230302313023230233302343023530236302373023830239302403024130242302433024430245302463024730248302493025030251302523025330254302553025630257302583025930260302613026230263302643026530266302673026830269302703027130272302733027430275302763027730278302793028030281302823028330284302853028630287302883028930290302913029230293302943029530296302973029830299303003030130302303033030430305303063030730308303093031030311303123031330314303153031630317303183031930320303213032230323303243032530326303273032830329303303033130332303333033430335303363033730338303393034030341303423034330344303453034630347303483034930350303513035230353303543035530356303573035830359303603036130362303633036430365303663036730368303693037030371303723037330374303753037630377303783037930380303813038230383303843038530386303873038830389303903039130392303933039430395303963039730398303993040030401304023040330404304053040630407304083040930410304113041230413304143041530416304173041830419304203042130422304233042430425304263042730428304293043030431304323043330434304353043630437304383043930440304413044230443304443044530446304473044830449304503045130452304533045430455304563045730458304593046030461304623046330464304653046630467304683046930470304713047230473304743047530476304773047830479304803048130482304833048430485304863048730488304893049030491304923049330494304953049630497304983049930500305013050230503305043050530506305073050830509305103051130512305133051430515305163051730518305193052030521305223052330524305253052630527305283052930530305313053230533305343053530536305373053830539305403054130542305433054430545305463054730548305493055030551305523055330554305553055630557305583055930560305613056230563305643056530566305673056830569305703057130572305733057430575305763057730578305793058030581305823058330584305853058630587305883058930590305913059230593305943059530596305973059830599306003060130602306033060430605306063060730608306093061030611306123061330614306153061630617306183061930620306213062230623306243062530626306273062830629306303063130632306333063430635306363063730638306393064030641306423064330644306453064630647306483064930650306513065230653306543065530656306573065830659306603066130662306633066430665306663066730668306693067030671306723067330674306753067630677306783067930680306813068230683306843068530686306873068830689306903069130692306933069430695306963069730698306993070030701307023070330704307053070630707307083070930710307113071230713307143071530716307173071830719307203072130722307233072430725307263072730728307293073030731307323073330734307353073630737307383073930740307413074230743307443074530746307473074830749307503075130752307533075430755307563075730758307593076030761307623076330764307653076630767307683076930770307713077230773307743077530776307773077830779307803078130782307833078430785307863078730788307893079030791307923079330794307953079630797307983079930800308013080230803308043080530806308073080830809308103081130812308133081430815308163081730818308193082030821308223082330824308253082630827308283082930830308313083230833308343083530836308373083830839308403084130842308433084430845308463084730848308493085030851308523085330854308553085630857308583085930860308613086230863308643086530866308673086830869308703087130872308733087430875308763087730878308793088030881308823088330884308853088630887308883088930890308913089230893308943089530896308973089830899309003090130902309033090430905309063090730908309093091030911309123091330914309153091630917309183091930920309213092230923309243092530926309273092830929309303093130932309333093430935309363093730938309393094030941309423094330944309453094630947309483094930950309513095230953309543095530956309573095830959309603096130962309633096430965309663096730968309693097030971309723097330974309753097630977309783097930980309813098230983309843098530986309873098830989309903099130992309933099430995309963099730998309993100031001310023100331004310053100631007310083100931010310113101231013310143101531016310173101831019310203102131022310233102431025310263102731028310293103031031310323103331034310353103631037310383103931040310413104231043310443104531046310473104831049310503105131052310533105431055310563105731058310593106031061310623106331064310653106631067310683106931070310713107231073310743107531076310773107831079310803108131082310833108431085310863108731088310893109031091310923109331094310953109631097310983109931100311013110231103311043110531106311073110831109311103111131112311133111431115311163111731118311193112031121311223112331124311253112631127311283112931130311313113231133311343113531136311373113831139311403114131142311433114431145311463114731148311493115031151311523115331154311553115631157311583115931160311613116231163311643116531166311673116831169311703117131172311733117431175311763117731178311793118031181311823118331184311853118631187311883118931190311913119231193311943119531196311973119831199312003120131202312033120431205312063120731208312093121031211312123121331214312153121631217312183121931220312213122231223312243122531226312273122831229312303123131232312333123431235312363123731238312393124031241312423124331244312453124631247312483124931250312513125231253312543125531256312573125831259312603126131262312633126431265312663126731268312693127031271312723127331274312753127631277312783127931280312813128231283312843128531286312873128831289312903129131292312933129431295312963129731298312993130031301313023130331304313053130631307313083130931310313113131231313313143131531316313173131831319313203132131322313233132431325313263132731328313293133031331313323133331334313353133631337313383133931340313413134231343313443134531346313473134831349313503135131352313533135431355313563135731358313593136031361313623136331364313653136631367313683136931370313713137231373313743137531376313773137831379313803138131382313833138431385313863138731388313893139031391313923139331394313953139631397313983139931400314013140231403314043140531406314073140831409314103141131412314133141431415314163141731418314193142031421314223142331424314253142631427314283142931430314313143231433314343143531436314373143831439314403144131442314433144431445314463144731448314493145031451314523145331454314553145631457314583145931460314613146231463314643146531466314673146831469314703147131472314733147431475314763147731478314793148031481314823148331484314853148631487314883148931490314913149231493314943149531496314973149831499315003150131502315033150431505315063150731508315093151031511315123151331514315153151631517315183151931520315213152231523315243152531526315273152831529315303153131532315333153431535315363153731538315393154031541315423154331544315453154631547315483154931550315513155231553315543155531556315573155831559315603156131562315633156431565315663156731568315693157031571315723157331574315753157631577315783157931580315813158231583315843158531586315873158831589315903159131592315933159431595315963159731598315993160031601316023160331604316053160631607316083160931610316113161231613316143161531616316173161831619316203162131622316233162431625316263162731628316293163031631316323163331634316353163631637316383163931640316413164231643316443164531646316473164831649316503165131652316533165431655316563165731658316593166031661316623166331664316653166631667316683166931670316713167231673316743167531676316773167831679316803168131682316833168431685316863168731688316893169031691316923169331694316953169631697316983169931700317013170231703317043170531706317073170831709317103171131712317133171431715317163171731718317193172031721317223172331724317253172631727317283172931730317313173231733317343173531736317373173831739317403174131742317433174431745317463174731748317493175031751317523175331754317553175631757317583175931760317613176231763317643176531766317673176831769317703177131772317733177431775317763177731778317793178031781317823178331784317853178631787317883178931790317913179231793317943179531796317973179831799318003180131802318033180431805318063180731808318093181031811318123181331814318153181631817318183181931820318213182231823318243182531826318273182831829318303183131832318333183431835318363183731838318393184031841318423184331844318453184631847318483184931850318513185231853318543185531856318573185831859318603186131862318633186431865318663186731868318693187031871318723187331874318753187631877318783187931880318813188231883318843188531886318873188831889318903189131892318933189431895318963189731898318993190031901319023190331904319053190631907319083190931910319113191231913319143191531916319173191831919319203192131922319233192431925319263192731928319293193031931319323193331934319353193631937319383193931940319413194231943319443194531946319473194831949319503195131952319533195431955319563195731958319593196031961319623196331964319653196631967319683196931970319713197231973319743197531976319773197831979319803198131982319833198431985319863198731988319893199031991319923199331994319953199631997319983199932000320013200232003320043200532006320073200832009320103201132012320133201432015320163201732018320193202032021320223202332024320253202632027320283202932030320313203232033320343203532036320373203832039320403204132042320433204432045320463204732048320493205032051320523205332054320553205632057320583205932060320613206232063320643206532066320673206832069320703207132072320733207432075320763207732078320793208032081320823208332084320853208632087320883208932090320913209232093320943209532096320973209832099321003210132102321033210432105321063210732108321093211032111321123211332114321153211632117321183211932120321213212232123321243212532126321273212832129321303213132132321333213432135321363213732138321393214032141321423214332144321453214632147321483214932150321513215232153321543215532156321573215832159321603216132162321633216432165321663216732168321693217032171321723217332174321753217632177321783217932180321813218232183321843218532186321873218832189321903219132192321933219432195321963219732198321993220032201322023220332204322053220632207322083220932210322113221232213322143221532216322173221832219322203222132222322233222432225322263222732228322293223032231322323223332234322353223632237322383223932240322413224232243322443224532246322473224832249322503225132252322533225432255322563225732258322593226032261322623226332264322653226632267322683226932270322713227232273322743227532276322773227832279322803228132282322833228432285322863228732288322893229032291322923229332294322953229632297322983229932300323013230232303323043230532306323073230832309323103231132312323133231432315323163231732318323193232032321323223232332324323253232632327323283232932330323313233232333323343233532336323373233832339323403234132342323433234432345323463234732348323493235032351323523235332354323553235632357323583235932360323613236232363323643236532366323673236832369323703237132372323733237432375323763237732378323793238032381323823238332384323853238632387323883238932390323913239232393323943239532396323973239832399324003240132402324033240432405324063240732408324093241032411324123241332414324153241632417324183241932420324213242232423324243242532426324273242832429324303243132432324333243432435324363243732438324393244032441324423244332444324453244632447324483244932450324513245232453324543245532456324573245832459324603246132462324633246432465324663246732468324693247032471324723247332474324753247632477324783247932480324813248232483324843248532486324873248832489324903249132492324933249432495324963249732498324993250032501325023250332504325053250632507325083250932510325113251232513325143251532516325173251832519325203252132522325233252432525325263252732528325293253032531325323253332534325353253632537325383253932540325413254232543325443254532546325473254832549325503255132552325533255432555325563255732558325593256032561325623256332564325653256632567325683256932570325713257232573325743257532576325773257832579325803258132582325833258432585325863258732588325893259032591325923259332594325953259632597325983259932600326013260232603326043260532606326073260832609326103261132612326133261432615326163261732618326193262032621326223262332624326253262632627326283262932630326313263232633326343263532636326373263832639326403264132642326433264432645326463264732648326493265032651326523265332654326553265632657326583265932660326613266232663326643266532666326673266832669326703267132672326733267432675326763267732678326793268032681326823268332684326853268632687326883268932690326913269232693326943269532696326973269832699327003270132702327033270432705327063270732708327093271032711327123271332714327153271632717327183271932720327213272232723327243272532726327273272832729327303273132732327333273432735327363273732738327393274032741327423274332744327453274632747327483274932750327513275232753327543275532756327573275832759327603276132762327633276432765327663276732768327693277032771327723277332774327753277632777327783277932780327813278232783327843278532786327873278832789327903279132792327933279432795327963279732798327993280032801328023280332804328053280632807328083280932810328113281232813328143281532816328173281832819328203282132822328233282432825328263282732828328293283032831328323283332834328353283632837328383283932840328413284232843328443284532846328473284832849328503285132852328533285432855328563285732858328593286032861328623286332864328653286632867328683286932870328713287232873328743287532876328773287832879328803288132882328833288432885328863288732888328893289032891328923289332894328953289632897328983289932900329013290232903329043290532906329073290832909329103291132912329133291432915329163291732918329193292032921329223292332924329253292632927329283292932930329313293232933329343293532936329373293832939329403294132942329433294432945329463294732948329493295032951329523295332954329553295632957329583295932960329613296232963329643296532966329673296832969329703297132972329733297432975329763297732978329793298032981329823298332984329853298632987329883298932990329913299232993329943299532996329973299832999330003300133002330033300433005330063300733008330093301033011330123301333014330153301633017330183301933020330213302233023330243302533026330273302833029330303303133032330333303433035330363303733038330393304033041330423304333044330453304633047330483304933050330513305233053330543305533056330573305833059330603306133062330633306433065330663306733068330693307033071330723307333074330753307633077330783307933080330813308233083330843308533086330873308833089330903309133092330933309433095330963309733098330993310033101331023310333104331053310633107331083310933110331113311233113331143311533116331173311833119331203312133122331233312433125331263312733128331293313033131331323313333134331353313633137331383313933140331413314233143331443314533146331473314833149331503315133152331533315433155331563315733158331593316033161331623316333164331653316633167331683316933170331713317233173331743317533176331773317833179331803318133182331833318433185331863318733188331893319033191331923319333194331953319633197331983319933200332013320233203332043320533206332073320833209332103321133212332133321433215332163321733218332193322033221332223322333224332253322633227332283322933230332313323233233332343323533236332373323833239332403324133242332433324433245332463324733248332493325033251332523325333254332553325633257332583325933260332613326233263332643326533266332673326833269332703327133272332733327433275332763327733278332793328033281332823328333284332853328633287332883328933290332913329233293332943329533296332973329833299333003330133302333033330433305333063330733308333093331033311333123331333314333153331633317333183331933320333213332233323333243332533326333273332833329333303333133332333333333433335333363333733338333393334033341333423334333344333453334633347333483334933350333513335233353333543335533356333573335833359333603336133362333633336433365333663336733368333693337033371333723337333374333753337633377333783337933380333813338233383333843338533386333873338833389333903339133392333933339433395333963339733398333993340033401334023340333404334053340633407334083340933410334113341233413334143341533416334173341833419334203342133422334233342433425334263342733428334293343033431334323343333434334353343633437334383343933440334413344233443334443344533446334473344833449334503345133452334533345433455334563345733458334593346033461334623346333464334653346633467334683346933470334713347233473334743347533476334773347833479334803348133482334833348433485334863348733488334893349033491334923349333494334953349633497334983349933500335013350233503335043350533506335073350833509335103351133512335133351433515335163351733518335193352033521335223352333524335253352633527335283352933530335313353233533335343353533536335373353833539335403354133542335433354433545335463354733548335493355033551335523355333554335553355633557335583355933560335613356233563335643356533566335673356833569335703357133572335733357433575335763357733578335793358033581335823358333584335853358633587335883358933590335913359233593335943359533596335973359833599336003360133602336033360433605336063360733608336093361033611336123361333614336153361633617336183361933620336213362233623336243362533626336273362833629336303363133632336333363433635336363363733638336393364033641336423364333644336453364633647336483364933650336513365233653336543365533656336573365833659336603366133662336633366433665336663366733668336693367033671336723367333674336753367633677336783367933680336813368233683336843368533686336873368833689336903369133692336933369433695336963369733698336993370033701337023370333704337053370633707337083370933710337113371233713337143371533716337173371833719337203372133722337233372433725337263372733728337293373033731337323373333734337353373633737337383373933740337413374233743337443374533746337473374833749337503375133752337533375433755337563375733758337593376033761337623376333764337653376633767337683376933770337713377233773337743377533776337773377833779337803378133782337833378433785337863378733788337893379033791337923379333794337953379633797337983379933800338013380233803338043380533806338073380833809338103381133812338133381433815338163381733818338193382033821338223382333824338253382633827338283382933830338313383233833338343383533836338373383833839338403384133842338433384433845338463384733848338493385033851338523385333854338553385633857338583385933860338613386233863338643386533866338673386833869338703387133872338733387433875338763387733878338793388033881338823388333884338853388633887338883388933890338913389233893338943389533896338973389833899339003390133902339033390433905339063390733908339093391033911339123391333914339153391633917339183391933920339213392233923339243392533926339273392833929339303393133932339333393433935339363393733938339393394033941339423394333944339453394633947339483394933950339513395233953339543395533956339573395833959339603396133962339633396433965339663396733968339693397033971339723397333974339753397633977339783397933980339813398233983339843398533986339873398833989339903399133992339933399433995339963399733998339993400034001340023400334004340053400634007340083400934010340113401234013340143401534016340173401834019340203402134022340233402434025340263402734028340293403034031340323403334034340353403634037340383403934040340413404234043340443404534046340473404834049340503405134052340533405434055340563405734058340593406034061340623406334064340653406634067340683406934070340713407234073340743407534076340773407834079340803408134082340833408434085340863408734088340893409034091340923409334094340953409634097340983409934100341013410234103341043410534106341073410834109341103411134112341133411434115341163411734118341193412034121341223412334124341253412634127341283412934130341313413234133341343413534136341373413834139341403414134142341433414434145341463414734148341493415034151341523415334154341553415634157341583415934160341613416234163341643416534166341673416834169341703417134172341733417434175341763417734178341793418034181341823418334184341853418634187341883418934190341913419234193341943419534196341973419834199342003420134202342033420434205342063420734208342093421034211342123421334214342153421634217342183421934220342213422234223342243422534226342273422834229342303423134232342333423434235342363423734238342393424034241342423424334244342453424634247342483424934250342513425234253342543425534256342573425834259342603426134262342633426434265342663426734268342693427034271342723427334274342753427634277342783427934280342813428234283342843428534286342873428834289342903429134292342933429434295342963429734298342993430034301343023430334304343053430634307343083430934310343113431234313343143431534316343173431834319343203432134322343233432434325343263432734328343293433034331343323433334334343353433634337343383433934340343413434234343343443434534346343473434834349343503435134352343533435434355343563435734358343593436034361343623436334364343653436634367343683436934370343713437234373343743437534376343773437834379343803438134382343833438434385343863438734388343893439034391343923439334394343953439634397343983439934400344013440234403344043440534406344073440834409344103441134412344133441434415344163441734418344193442034421344223442334424344253442634427344283442934430344313443234433344343443534436344373443834439344403444134442344433444434445344463444734448344493445034451344523445334454344553445634457344583445934460344613446234463344643446534466344673446834469344703447134472344733447434475344763447734478344793448034481344823448334484344853448634487344883448934490344913449234493344943449534496344973449834499345003450134502345033450434505345063450734508345093451034511345123451334514345153451634517345183451934520345213452234523345243452534526345273452834529345303453134532345333453434535345363453734538345393454034541345423454334544345453454634547345483454934550345513455234553345543455534556345573455834559345603456134562345633456434565345663456734568345693457034571345723457334574345753457634577345783457934580345813458234583345843458534586345873458834589345903459134592345933459434595345963459734598345993460034601346023460334604346053460634607346083460934610346113461234613346143461534616346173461834619346203462134622346233462434625346263462734628346293463034631346323463334634346353463634637346383463934640346413464234643346443464534646346473464834649346503465134652346533465434655346563465734658346593466034661346623466334664346653466634667346683466934670346713467234673346743467534676346773467834679346803468134682346833468434685346863468734688346893469034691346923469334694346953469634697346983469934700347013470234703347043470534706347073470834709347103471134712347133471434715347163471734718347193472034721347223472334724347253472634727347283472934730347313473234733347343473534736347373473834739347403474134742347433474434745347463474734748347493475034751347523475334754347553475634757347583475934760347613476234763347643476534766347673476834769347703477134772347733477434775347763477734778347793478034781347823478334784347853478634787347883478934790347913479234793347943479534796347973479834799348003480134802348033480434805348063480734808348093481034811348123481334814348153481634817348183481934820348213482234823348243482534826348273482834829348303483134832348333483434835348363483734838348393484034841348423484334844348453484634847348483484934850348513485234853348543485534856348573485834859348603486134862348633486434865348663486734868348693487034871348723487334874348753487634877348783487934880348813488234883348843488534886348873488834889348903489134892348933489434895348963489734898348993490034901349023490334904349053490634907349083490934910349113491234913349143491534916349173491834919349203492134922349233492434925349263492734928349293493034931349323493334934349353493634937349383493934940349413494234943349443494534946349473494834949349503495134952349533495434955349563495734958349593496034961349623496334964349653496634967349683496934970349713497234973349743497534976349773497834979349803498134982349833498434985349863498734988349893499034991349923499334994349953499634997349983499935000350013500235003350043500535006350073500835009350103501135012350133501435015350163501735018350193502035021350223502335024350253502635027350283502935030350313503235033350343503535036350373503835039350403504135042350433504435045350463504735048350493505035051350523505335054350553505635057350583505935060350613506235063350643506535066350673506835069350703507135072350733507435075350763507735078350793508035081350823508335084350853508635087350883508935090350913509235093350943509535096350973509835099351003510135102351033510435105351063510735108351093511035111351123511335114351153511635117351183511935120351213512235123351243512535126351273512835129351303513135132351333513435135351363513735138351393514035141351423514335144351453514635147351483514935150351513515235153351543515535156351573515835159351603516135162351633516435165351663516735168351693517035171351723517335174351753517635177351783517935180351813518235183351843518535186351873518835189351903519135192351933519435195351963519735198351993520035201352023520335204352053520635207352083520935210352113521235213352143521535216352173521835219352203522135222352233522435225352263522735228352293523035231352323523335234352353523635237352383523935240352413524235243352443524535246352473524835249352503525135252352533525435255352563525735258352593526035261352623526335264352653526635267352683526935270352713527235273352743527535276352773527835279352803528135282352833528435285352863528735288352893529035291352923529335294352953529635297352983529935300353013530235303353043530535306353073530835309353103531135312353133531435315353163531735318353193532035321353223532335324353253532635327353283532935330353313533235333353343533535336353373533835339353403534135342353433534435345353463534735348353493535035351353523535335354353553535635357353583535935360353613536235363353643536535366353673536835369353703537135372353733537435375353763537735378353793538035381353823538335384353853538635387353883538935390353913539235393353943539535396353973539835399354003540135402354033540435405354063540735408354093541035411354123541335414354153541635417354183541935420354213542235423354243542535426354273542835429354303543135432354333543435435354363543735438354393544035441354423544335444354453544635447354483544935450354513545235453354543545535456354573545835459354603546135462354633546435465354663546735468354693547035471354723547335474354753547635477354783547935480354813548235483354843548535486354873548835489354903549135492354933549435495354963549735498354993550035501355023550335504355053550635507355083550935510355113551235513355143551535516355173551835519355203552135522355233552435525355263552735528355293553035531355323553335534355353553635537355383553935540355413554235543355443554535546355473554835549355503555135552355533555435555355563555735558355593556035561355623556335564355653556635567355683556935570355713557235573355743557535576355773557835579355803558135582355833558435585355863558735588355893559035591355923559335594355953559635597355983559935600356013560235603356043560535606356073560835609356103561135612356133561435615356163561735618356193562035621356223562335624356253562635627356283562935630356313563235633356343563535636356373563835639356403564135642356433564435645356463564735648356493565035651356523565335654356553565635657356583565935660356613566235663356643566535666356673566835669356703567135672356733567435675356763567735678356793568035681356823568335684356853568635687356883568935690356913569235693356943569535696356973569835699357003570135702357033570435705357063570735708357093571035711357123571335714357153571635717357183571935720357213572235723357243572535726357273572835729357303573135732357333573435735357363573735738357393574035741357423574335744357453574635747357483574935750357513575235753357543575535756357573575835759357603576135762357633576435765357663576735768357693577035771357723577335774357753577635777357783577935780357813578235783357843578535786357873578835789357903579135792357933579435795357963579735798357993580035801358023580335804358053580635807358083580935810358113581235813358143581535816358173581835819358203582135822358233582435825358263582735828358293583035831358323583335834358353583635837358383583935840358413584235843358443584535846358473584835849358503585135852358533585435855358563585735858358593586035861358623586335864358653586635867358683586935870358713587235873358743587535876358773587835879358803588135882358833588435885358863588735888358893589035891358923589335894358953589635897358983589935900359013590235903359043590535906359073590835909359103591135912359133591435915359163591735918359193592035921359223592335924359253592635927359283592935930359313593235933359343593535936359373593835939359403594135942359433594435945359463594735948359493595035951359523595335954359553595635957359583595935960359613596235963359643596535966359673596835969359703597135972359733597435975359763597735978359793598035981359823598335984359853598635987359883598935990359913599235993359943599535996359973599835999360003600136002360033600436005360063600736008360093601036011360123601336014360153601636017360183601936020360213602236023360243602536026360273602836029360303603136032360333603436035360363603736038360393604036041360423604336044360453604636047360483604936050360513605236053360543605536056360573605836059360603606136062360633606436065360663606736068360693607036071360723607336074360753607636077360783607936080360813608236083360843608536086360873608836089360903609136092360933609436095360963609736098360993610036101361023610336104361053610636107361083610936110361113611236113361143611536116361173611836119361203612136122361233612436125361263612736128361293613036131361323613336134361353613636137361383613936140361413614236143361443614536146361473614836149361503615136152361533615436155361563615736158361593616036161361623616336164361653616636167361683616936170361713617236173361743617536176361773617836179361803618136182361833618436185361863618736188361893619036191361923619336194361953619636197361983619936200362013620236203362043620536206362073620836209362103621136212362133621436215362163621736218362193622036221362223622336224362253622636227362283622936230362313623236233362343623536236362373623836239362403624136242362433624436245362463624736248362493625036251362523625336254362553625636257362583625936260362613626236263362643626536266362673626836269362703627136272362733627436275362763627736278362793628036281362823628336284362853628636287362883628936290362913629236293362943629536296362973629836299363003630136302363033630436305363063630736308363093631036311363123631336314363153631636317363183631936320363213632236323363243632536326363273632836329363303633136332363333633436335363363633736338363393634036341363423634336344363453634636347363483634936350363513635236353363543635536356363573635836359363603636136362363633636436365363663636736368363693637036371363723637336374363753637636377363783637936380363813638236383363843638536386363873638836389363903639136392363933639436395363963639736398363993640036401364023640336404364053640636407364083640936410364113641236413364143641536416364173641836419364203642136422364233642436425364263642736428364293643036431364323643336434364353643636437364383643936440364413644236443364443644536446364473644836449364503645136452364533645436455364563645736458364593646036461364623646336464364653646636467364683646936470364713647236473364743647536476364773647836479364803648136482364833648436485364863648736488364893649036491364923649336494364953649636497364983649936500365013650236503365043650536506365073650836509365103651136512365133651436515365163651736518365193652036521365223652336524365253652636527365283652936530365313653236533365343653536536365373653836539365403654136542365433654436545365463654736548365493655036551365523655336554365553655636557365583655936560365613656236563365643656536566365673656836569365703657136572365733657436575365763657736578365793658036581365823658336584365853658636587365883658936590365913659236593365943659536596365973659836599366003660136602366033660436605366063660736608366093661036611366123661336614366153661636617366183661936620366213662236623366243662536626366273662836629366303663136632366333663436635366363663736638366393664036641366423664336644366453664636647366483664936650366513665236653366543665536656366573665836659366603666136662366633666436665366663666736668366693667036671366723667336674366753667636677366783667936680366813668236683366843668536686366873668836689366903669136692366933669436695366963669736698366993670036701367023670336704367053670636707367083670936710367113671236713367143671536716367173671836719367203672136722367233672436725367263672736728367293673036731367323673336734367353673636737367383673936740367413674236743367443674536746367473674836749367503675136752367533675436755367563675736758367593676036761367623676336764367653676636767367683676936770367713677236773367743677536776367773677836779367803678136782367833678436785367863678736788367893679036791367923679336794367953679636797367983679936800368013680236803368043680536806368073680836809368103681136812368133681436815368163681736818368193682036821368223682336824368253682636827368283682936830368313683236833368343683536836368373683836839368403684136842368433684436845368463684736848368493685036851368523685336854368553685636857368583685936860368613686236863368643686536866368673686836869368703687136872368733687436875368763687736878368793688036881368823688336884368853688636887368883688936890368913689236893368943689536896368973689836899369003690136902369033690436905369063690736908369093691036911369123691336914369153691636917369183691936920369213692236923369243692536926369273692836929369303693136932369333693436935369363693736938369393694036941369423694336944369453694636947369483694936950369513695236953369543695536956369573695836959369603696136962369633696436965369663696736968369693697036971369723697336974369753697636977369783697936980369813698236983369843698536986369873698836989369903699136992369933699436995369963699736998369993700037001370023700337004370053700637007370083700937010370113701237013370143701537016370173701837019370203702137022370233702437025370263702737028370293703037031370323703337034370353703637037370383703937040370413704237043370443704537046370473704837049370503705137052370533705437055370563705737058370593706037061370623706337064370653706637067370683706937070370713707237073370743707537076370773707837079370803708137082370833708437085370863708737088370893709037091370923709337094370953709637097370983709937100371013710237103371043710537106371073710837109371103711137112371133711437115371163711737118371193712037121371223712337124371253712637127371283712937130371313713237133371343713537136371373713837139371403714137142371433714437145371463714737148371493715037151371523715337154371553715637157371583715937160371613716237163371643716537166371673716837169371703717137172371733717437175371763717737178371793718037181371823718337184371853718637187371883718937190371913719237193371943719537196371973719837199372003720137202372033720437205372063720737208372093721037211372123721337214372153721637217372183721937220372213722237223372243722537226372273722837229372303723137232372333723437235372363723737238372393724037241372423724337244372453724637247372483724937250372513725237253372543725537256372573725837259372603726137262372633726437265372663726737268372693727037271372723727337274372753727637277372783727937280372813728237283372843728537286372873728837289372903729137292372933729437295372963729737298372993730037301373023730337304373053730637307373083730937310373113731237313373143731537316373173731837319373203732137322373233732437325373263732737328373293733037331373323733337334373353733637337373383733937340373413734237343373443734537346373473734837349373503735137352373533735437355373563735737358373593736037361373623736337364373653736637367373683736937370373713737237373373743737537376373773737837379373803738137382373833738437385373863738737388373893739037391373923739337394373953739637397373983739937400374013740237403374043740537406374073740837409374103741137412374133741437415374163741737418374193742037421374223742337424374253742637427374283742937430374313743237433374343743537436374373743837439374403744137442374433744437445374463744737448374493745037451374523745337454374553745637457374583745937460374613746237463374643746537466374673746837469374703747137472374733747437475374763747737478374793748037481374823748337484374853748637487374883748937490374913749237493374943749537496374973749837499375003750137502375033750437505375063750737508375093751037511375123751337514375153751637517375183751937520375213752237523375243752537526375273752837529375303753137532375333753437535375363753737538375393754037541375423754337544375453754637547375483754937550375513755237553375543755537556375573755837559375603756137562375633756437565375663756737568375693757037571375723757337574375753757637577375783757937580375813758237583375843758537586375873758837589375903759137592375933759437595375963759737598375993760037601376023760337604376053760637607376083760937610376113761237613376143761537616376173761837619376203762137622376233762437625376263762737628376293763037631376323763337634376353763637637376383763937640376413764237643376443764537646376473764837649376503765137652376533765437655376563765737658376593766037661376623766337664376653766637667376683766937670376713767237673376743767537676376773767837679376803768137682376833768437685376863768737688376893769037691376923769337694376953769637697376983769937700377013770237703377043770537706377073770837709377103771137712377133771437715377163771737718377193772037721377223772337724377253772637727377283772937730377313773237733377343773537736377373773837739377403774137742377433774437745377463774737748377493775037751377523775337754377553775637757377583775937760377613776237763377643776537766377673776837769377703777137772377733777437775377763777737778377793778037781377823778337784377853778637787377883778937790377913779237793377943779537796377973779837799378003780137802378033780437805378063780737808378093781037811378123781337814378153781637817378183781937820378213782237823378243782537826378273782837829378303783137832378333783437835378363783737838378393784037841378423784337844378453784637847378483784937850378513785237853378543785537856378573785837859378603786137862378633786437865378663786737868378693787037871378723787337874378753787637877378783787937880378813788237883378843788537886378873788837889378903789137892378933789437895378963789737898378993790037901379023790337904379053790637907379083790937910379113791237913379143791537916379173791837919379203792137922379233792437925379263792737928379293793037931379323793337934379353793637937379383793937940379413794237943379443794537946379473794837949379503795137952379533795437955379563795737958379593796037961379623796337964379653796637967379683796937970379713797237973379743797537976379773797837979379803798137982379833798437985379863798737988379893799037991379923799337994379953799637997379983799938000380013800238003380043800538006380073800838009380103801138012380133801438015380163801738018380193802038021380223802338024380253802638027380283802938030380313803238033380343803538036380373803838039380403804138042380433804438045380463804738048380493805038051380523805338054380553805638057380583805938060380613806238063380643806538066380673806838069380703807138072380733807438075380763807738078380793808038081380823808338084380853808638087380883808938090380913809238093380943809538096380973809838099381003810138102381033810438105381063810738108381093811038111381123811338114381153811638117381183811938120381213812238123381243812538126381273812838129381303813138132381333813438135381363813738138381393814038141381423814338144381453814638147381483814938150381513815238153381543815538156381573815838159381603816138162381633816438165381663816738168381693817038171381723817338174381753817638177381783817938180381813818238183381843818538186381873818838189381903819138192381933819438195381963819738198381993820038201382023820338204382053820638207382083820938210382113821238213382143821538216382173821838219382203822138222382233822438225382263822738228382293823038231382323823338234382353823638237382383823938240382413824238243382443824538246382473824838249382503825138252382533825438255382563825738258382593826038261382623826338264382653826638267382683826938270382713827238273382743827538276382773827838279382803828138282382833828438285382863828738288382893829038291382923829338294382953829638297382983829938300383013830238303383043830538306383073830838309383103831138312383133831438315383163831738318383193832038321383223832338324383253832638327383283832938330383313833238333383343833538336383373833838339383403834138342383433834438345383463834738348383493835038351383523835338354383553835638357383583835938360383613836238363383643836538366383673836838369383703837138372383733837438375383763837738378383793838038381383823838338384383853838638387383883838938390383913839238393383943839538396383973839838399384003840138402384033840438405384063840738408384093841038411384123841338414384153841638417384183841938420384213842238423384243842538426384273842838429384303843138432384333843438435384363843738438384393844038441384423844338444384453844638447384483844938450384513845238453384543845538456384573845838459384603846138462384633846438465384663846738468384693847038471384723847338474384753847638477384783847938480384813848238483384843848538486384873848838489384903849138492384933849438495384963849738498384993850038501385023850338504385053850638507385083850938510385113851238513385143851538516385173851838519385203852138522385233852438525385263852738528385293853038531385323853338534385353853638537385383853938540385413854238543385443854538546385473854838549385503855138552385533855438555385563855738558385593856038561385623856338564385653856638567385683856938570385713857238573385743857538576385773857838579385803858138582385833858438585385863858738588385893859038591385923859338594385953859638597385983859938600386013860238603386043860538606386073860838609386103861138612386133861438615386163861738618386193862038621386223862338624386253862638627386283862938630386313863238633386343863538636386373863838639386403864138642386433864438645386463864738648386493865038651386523865338654386553865638657386583865938660386613866238663386643866538666386673866838669386703867138672386733867438675386763867738678386793868038681386823868338684386853868638687386883868938690386913869238693386943869538696386973869838699387003870138702387033870438705387063870738708387093871038711387123871338714387153871638717387183871938720387213872238723387243872538726387273872838729387303873138732387333873438735387363873738738387393874038741387423874338744387453874638747387483874938750387513875238753387543875538756387573875838759387603876138762387633876438765387663876738768387693877038771387723877338774387753877638777387783877938780387813878238783387843878538786387873878838789387903879138792387933879438795387963879738798387993880038801388023880338804388053880638807388083880938810388113881238813388143881538816388173881838819388203882138822388233882438825388263882738828388293883038831388323883338834388353883638837388383883938840388413884238843388443884538846388473884838849388503885138852388533885438855388563885738858388593886038861388623886338864388653886638867388683886938870388713887238873388743887538876388773887838879388803888138882388833888438885388863888738888388893889038891388923889338894388953889638897388983889938900389013890238903389043890538906389073890838909389103891138912389133891438915389163891738918389193892038921389223892338924389253892638927389283892938930389313893238933389343893538936389373893838939389403894138942389433894438945389463894738948389493895038951389523895338954389553895638957389583895938960389613896238963389643896538966389673896838969389703897138972389733897438975389763897738978389793898038981389823898338984389853898638987389883898938990389913899238993389943899538996389973899838999390003900139002390033900439005390063900739008390093901039011390123901339014390153901639017390183901939020390213902239023390243902539026390273902839029390303903139032390333903439035390363903739038390393904039041390423904339044390453904639047390483904939050390513905239053390543905539056390573905839059390603906139062390633906439065390663906739068390693907039071390723907339074390753907639077390783907939080390813908239083390843908539086390873908839089390903909139092390933909439095390963909739098390993910039101391023910339104391053910639107391083910939110391113911239113391143911539116391173911839119391203912139122391233912439125391263912739128391293913039131391323913339134391353913639137391383913939140391413914239143391443914539146391473914839149391503915139152391533915439155391563915739158391593916039161391623916339164391653916639167391683916939170391713917239173391743917539176391773917839179391803918139182391833918439185391863918739188391893919039191391923919339194391953919639197391983919939200392013920239203392043920539206392073920839209392103921139212392133921439215392163921739218392193922039221392223922339224392253922639227392283922939230392313923239233392343923539236392373923839239392403924139242392433924439245392463924739248392493925039251392523925339254392553925639257392583925939260392613926239263392643926539266392673926839269392703927139272392733927439275392763927739278392793928039281392823928339284392853928639287392883928939290392913929239293392943929539296392973929839299393003930139302393033930439305393063930739308393093931039311393123931339314393153931639317393183931939320393213932239323393243932539326393273932839329393303933139332393333933439335393363933739338393393934039341393423934339344393453934639347393483934939350393513935239353393543935539356393573935839359393603936139362393633936439365393663936739368393693937039371393723937339374393753937639377393783937939380393813938239383393843938539386393873938839389393903939139392393933939439395393963939739398393993940039401394023940339404394053940639407394083940939410394113941239413394143941539416394173941839419394203942139422394233942439425394263942739428394293943039431394323943339434394353943639437394383943939440394413944239443394443944539446394473944839449394503945139452394533945439455394563945739458394593946039461394623946339464394653946639467394683946939470394713947239473394743947539476394773947839479394803948139482394833948439485394863948739488394893949039491394923949339494394953949639497394983949939500395013950239503395043950539506395073950839509395103951139512395133951439515395163951739518395193952039521395223952339524395253952639527395283952939530395313953239533395343953539536395373953839539395403954139542395433954439545395463954739548395493955039551395523955339554395553955639557395583955939560395613956239563395643956539566395673956839569395703957139572395733957439575395763957739578395793958039581395823958339584395853958639587395883958939590395913959239593395943959539596395973959839599396003960139602396033960439605396063960739608396093961039611396123961339614396153961639617396183961939620396213962239623396243962539626396273962839629396303963139632396333963439635396363963739638396393964039641396423964339644396453964639647396483964939650396513965239653396543965539656396573965839659396603966139662396633966439665396663966739668396693967039671396723967339674396753967639677396783967939680396813968239683396843968539686396873968839689396903969139692396933969439695396963969739698396993970039701397023970339704397053970639707397083970939710397113971239713397143971539716397173971839719397203972139722397233972439725397263972739728397293973039731397323973339734397353973639737397383973939740397413974239743397443974539746397473974839749397503975139752397533975439755397563975739758397593976039761397623976339764397653976639767397683976939770397713977239773397743977539776397773977839779397803978139782397833978439785397863978739788397893979039791397923979339794397953979639797397983979939800398013980239803398043980539806398073980839809398103981139812398133981439815398163981739818398193982039821398223982339824398253982639827398283982939830398313983239833398343983539836398373983839839398403984139842398433984439845398463984739848398493985039851398523985339854398553985639857398583985939860398613986239863398643986539866398673986839869398703987139872398733987439875398763987739878398793988039881398823988339884398853988639887398883988939890398913989239893398943989539896398973989839899399003990139902399033990439905399063990739908399093991039911399123991339914399153991639917399183991939920399213992239923399243992539926399273992839929399303993139932399333993439935399363993739938399393994039941399423994339944399453994639947399483994939950399513995239953399543995539956399573995839959399603996139962399633996439965399663996739968399693997039971399723997339974399753997639977399783997939980399813998239983399843998539986399873998839989399903999139992399933999439995399963999739998399994000040001400024000340004400054000640007400084000940010400114001240013400144001540016400174001840019400204002140022400234002440025400264002740028400294003040031400324003340034400354003640037400384003940040400414004240043400444004540046400474004840049400504005140052400534005440055400564005740058400594006040061400624006340064400654006640067400684006940070400714007240073400744007540076400774007840079400804008140082400834008440085400864008740088400894009040091400924009340094400954009640097400984009940100401014010240103401044010540106401074010840109401104011140112401134011440115401164011740118401194012040121401224012340124401254012640127401284012940130401314013240133401344013540136401374013840139401404014140142401434014440145401464014740148401494015040151401524015340154401554015640157401584015940160401614016240163401644016540166401674016840169401704017140172401734017440175401764017740178401794018040181401824018340184401854018640187401884018940190401914019240193401944019540196401974019840199402004020140202402034020440205402064020740208402094021040211402124021340214402154021640217402184021940220402214022240223402244022540226402274022840229402304023140232402334023440235402364023740238402394024040241402424024340244402454024640247402484024940250402514025240253402544025540256402574025840259402604026140262402634026440265402664026740268402694027040271402724027340274402754027640277402784027940280402814028240283402844028540286402874028840289402904029140292402934029440295402964029740298402994030040301403024030340304403054030640307403084030940310403114031240313403144031540316403174031840319403204032140322403234032440325403264032740328403294033040331403324033340334403354033640337403384033940340403414034240343403444034540346403474034840349403504035140352403534035440355403564035740358403594036040361403624036340364403654036640367403684036940370403714037240373403744037540376403774037840379403804038140382403834038440385403864038740388403894039040391403924039340394403954039640397403984039940400404014040240403404044040540406404074040840409404104041140412404134041440415404164041740418404194042040421404224042340424404254042640427404284042940430404314043240433404344043540436404374043840439404404044140442404434044440445404464044740448404494045040451404524045340454404554045640457404584045940460404614046240463404644046540466404674046840469404704047140472404734047440475404764047740478404794048040481404824048340484404854048640487404884048940490404914049240493404944049540496404974049840499405004050140502405034050440505405064050740508405094051040511405124051340514405154051640517405184051940520405214052240523405244052540526405274052840529405304053140532405334053440535405364053740538405394054040541405424054340544405454054640547405484054940550405514055240553405544055540556405574055840559405604056140562405634056440565405664056740568405694057040571405724057340574405754057640577405784057940580405814058240583405844058540586405874058840589405904059140592405934059440595405964059740598405994060040601406024060340604406054060640607406084060940610406114061240613406144061540616406174061840619406204062140622406234062440625406264062740628406294063040631406324063340634406354063640637406384063940640406414064240643406444064540646406474064840649406504065140652406534065440655406564065740658406594066040661406624066340664406654066640667406684066940670406714067240673406744067540676406774067840679406804068140682406834068440685406864068740688406894069040691406924069340694406954069640697406984069940700407014070240703407044070540706407074070840709407104071140712407134071440715407164071740718407194072040721407224072340724407254072640727407284072940730407314073240733407344073540736407374073840739407404074140742407434074440745407464074740748407494075040751407524075340754407554075640757407584075940760407614076240763407644076540766407674076840769407704077140772407734077440775407764077740778407794078040781407824078340784407854078640787407884078940790407914079240793407944079540796407974079840799408004080140802408034080440805408064080740808408094081040811408124081340814408154081640817408184081940820408214082240823408244082540826408274082840829408304083140832408334083440835408364083740838408394084040841408424084340844408454084640847408484084940850408514085240853408544085540856408574085840859408604086140862408634086440865408664086740868408694087040871408724087340874408754087640877408784087940880408814088240883408844088540886408874088840889408904089140892408934089440895408964089740898408994090040901409024090340904409054090640907409084090940910409114091240913409144091540916409174091840919409204092140922409234092440925409264092740928409294093040931409324093340934409354093640937409384093940940409414094240943409444094540946409474094840949409504095140952409534095440955409564095740958409594096040961409624096340964409654096640967409684096940970409714097240973409744097540976409774097840979409804098140982409834098440985409864098740988409894099040991409924099340994409954099640997409984099941000410014100241003410044100541006410074100841009410104101141012410134101441015410164101741018410194102041021410224102341024410254102641027410284102941030410314103241033410344103541036410374103841039410404104141042410434104441045410464104741048410494105041051410524105341054410554105641057410584105941060410614106241063410644106541066410674106841069410704107141072410734107441075410764107741078410794108041081410824108341084410854108641087410884108941090410914109241093410944109541096410974109841099411004110141102411034110441105411064110741108411094111041111411124111341114411154111641117411184111941120411214112241123411244112541126411274112841129411304113141132411334113441135411364113741138411394114041141411424114341144411454114641147411484114941150411514115241153411544115541156411574115841159411604116141162411634116441165411664116741168411694117041171411724117341174411754117641177411784117941180411814118241183411844118541186411874118841189411904119141192411934119441195411964119741198411994120041201412024120341204412054120641207412084120941210412114121241213412144121541216412174121841219412204122141222412234122441225412264122741228412294123041231412324123341234412354123641237412384123941240412414124241243412444124541246412474124841249412504125141252412534125441255412564125741258412594126041261412624126341264412654126641267412684126941270412714127241273412744127541276412774127841279412804128141282412834128441285412864128741288412894129041291412924129341294412954129641297412984129941300413014130241303413044130541306413074130841309413104131141312413134131441315413164131741318413194132041321413224132341324413254132641327413284132941330413314133241333413344133541336413374133841339413404134141342413434134441345413464134741348413494135041351413524135341354413554135641357413584135941360413614136241363413644136541366413674136841369413704137141372413734137441375413764137741378413794138041381413824138341384413854138641387413884138941390413914139241393413944139541396413974139841399414004140141402414034140441405414064140741408414094141041411414124141341414414154141641417414184141941420414214142241423414244142541426414274142841429414304143141432414334143441435414364143741438414394144041441414424144341444414454144641447414484144941450414514145241453414544145541456414574145841459414604146141462414634146441465414664146741468414694147041471414724147341474414754147641477414784147941480414814148241483414844148541486414874148841489414904149141492414934149441495414964149741498414994150041501415024150341504415054150641507415084150941510415114151241513415144151541516415174151841519415204152141522415234152441525415264152741528415294153041531415324153341534415354153641537415384153941540415414154241543415444154541546415474154841549415504155141552415534155441555415564155741558415594156041561415624156341564415654156641567415684156941570415714157241573415744157541576415774157841579415804158141582415834158441585415864158741588415894159041591415924159341594415954159641597415984159941600416014160241603416044160541606416074160841609416104161141612416134161441615416164161741618416194162041621416224162341624416254162641627416284162941630416314163241633416344163541636416374163841639416404164141642416434164441645416464164741648416494165041651416524165341654416554165641657416584165941660416614166241663416644166541666416674166841669416704167141672416734167441675416764167741678416794168041681416824168341684416854168641687416884168941690416914169241693416944169541696416974169841699417004170141702417034170441705417064170741708417094171041711417124171341714417154171641717417184171941720417214172241723417244172541726417274172841729417304173141732417334173441735417364173741738417394174041741417424174341744417454174641747417484174941750417514175241753417544175541756417574175841759417604176141762417634176441765417664176741768417694177041771417724177341774417754177641777417784177941780417814178241783417844178541786417874178841789417904179141792417934179441795417964179741798417994180041801418024180341804418054180641807418084180941810418114181241813418144181541816418174181841819418204182141822418234182441825418264182741828418294183041831418324183341834418354183641837418384183941840418414184241843418444184541846418474184841849418504185141852418534185441855418564185741858418594186041861418624186341864418654186641867418684186941870418714187241873418744187541876418774187841879418804188141882418834188441885418864188741888418894189041891418924189341894418954189641897418984189941900419014190241903419044190541906419074190841909419104191141912419134191441915419164191741918419194192041921419224192341924419254192641927419284192941930419314193241933419344193541936419374193841939419404194141942419434194441945419464194741948419494195041951419524195341954419554195641957419584195941960419614196241963419644196541966419674196841969419704197141972419734197441975419764197741978419794198041981419824198341984419854198641987419884198941990419914199241993419944199541996419974199841999420004200142002420034200442005420064200742008420094201042011420124201342014420154201642017420184201942020420214202242023420244202542026420274202842029420304203142032420334203442035420364203742038420394204042041420424204342044420454204642047420484204942050420514205242053420544205542056420574205842059420604206142062420634206442065420664206742068420694207042071420724207342074420754207642077420784207942080420814208242083420844208542086420874208842089420904209142092420934209442095420964209742098420994210042101421024210342104421054210642107421084210942110421114211242113421144211542116421174211842119421204212142122421234212442125421264212742128421294213042131421324213342134421354213642137421384213942140421414214242143421444214542146421474214842149421504215142152421534215442155421564215742158421594216042161421624216342164421654216642167421684216942170421714217242173421744217542176421774217842179421804218142182421834218442185421864218742188421894219042191421924219342194421954219642197421984219942200422014220242203422044220542206422074220842209422104221142212422134221442215422164221742218422194222042221422224222342224422254222642227422284222942230422314223242233422344223542236422374223842239422404224142242422434224442245422464224742248422494225042251422524225342254422554225642257422584225942260422614226242263422644226542266422674226842269422704227142272422734227442275422764227742278422794228042281422824228342284422854228642287422884228942290422914229242293422944229542296422974229842299423004230142302423034230442305423064230742308423094231042311423124231342314423154231642317423184231942320423214232242323423244232542326423274232842329423304233142332423334233442335423364233742338423394234042341423424234342344423454234642347423484234942350423514235242353423544235542356423574235842359423604236142362423634236442365423664236742368423694237042371423724237342374423754237642377423784237942380423814238242383423844238542386423874238842389423904239142392423934239442395423964239742398423994240042401424024240342404424054240642407424084240942410424114241242413424144241542416424174241842419424204242142422424234242442425424264242742428424294243042431424324243342434424354243642437424384243942440424414244242443424444244542446424474244842449424504245142452424534245442455424564245742458424594246042461424624246342464424654246642467424684246942470424714247242473424744247542476424774247842479424804248142482424834248442485424864248742488424894249042491424924249342494424954249642497424984249942500425014250242503425044250542506425074250842509425104251142512425134251442515425164251742518425194252042521425224252342524425254252642527425284252942530425314253242533425344253542536425374253842539425404254142542425434254442545425464254742548425494255042551425524255342554425554255642557425584255942560425614256242563425644256542566425674256842569425704257142572425734257442575425764257742578425794258042581425824258342584425854258642587425884258942590425914259242593425944259542596425974259842599426004260142602426034260442605426064260742608426094261042611426124261342614426154261642617426184261942620426214262242623426244262542626426274262842629426304263142632426334263442635426364263742638426394264042641426424264342644426454264642647426484264942650426514265242653426544265542656426574265842659426604266142662426634266442665426664266742668426694267042671426724267342674426754267642677426784267942680426814268242683426844268542686426874268842689426904269142692426934269442695426964269742698426994270042701427024270342704427054270642707427084270942710427114271242713427144271542716427174271842719427204272142722427234272442725427264272742728427294273042731427324273342734427354273642737427384273942740427414274242743427444274542746427474274842749427504275142752427534275442755427564275742758427594276042761427624276342764427654276642767427684276942770427714277242773427744277542776427774277842779427804278142782427834278442785427864278742788427894279042791427924279342794427954279642797427984279942800428014280242803428044280542806428074280842809428104281142812428134281442815428164281742818428194282042821428224282342824428254282642827428284282942830428314283242833428344283542836428374283842839428404284142842428434284442845428464284742848428494285042851428524285342854428554285642857428584285942860428614286242863428644286542866428674286842869428704287142872428734287442875428764287742878428794288042881428824288342884428854288642887428884288942890428914289242893428944289542896428974289842899429004290142902429034290442905429064290742908429094291042911429124291342914429154291642917429184291942920429214292242923429244292542926429274292842929429304293142932429334293442935429364293742938429394294042941429424294342944429454294642947429484294942950429514295242953429544295542956429574295842959429604296142962429634296442965429664296742968429694297042971429724297342974429754297642977429784297942980429814298242983429844298542986429874298842989429904299142992429934299442995429964299742998429994300043001430024300343004430054300643007430084300943010430114301243013430144301543016430174301843019430204302143022430234302443025430264302743028430294303043031430324303343034430354303643037430384303943040430414304243043430444304543046430474304843049430504305143052430534305443055430564305743058430594306043061430624306343064430654306643067430684306943070430714307243073430744307543076430774307843079430804308143082430834308443085430864308743088430894309043091430924309343094430954309643097430984309943100431014310243103431044310543106431074310843109431104311143112431134311443115431164311743118431194312043121431224312343124431254312643127431284312943130431314313243133431344313543136431374313843139431404314143142431434314443145431464314743148431494315043151431524315343154431554315643157431584315943160431614316243163431644316543166431674316843169431704317143172431734317443175431764317743178431794318043181431824318343184431854318643187431884318943190431914319243193431944319543196431974319843199432004320143202432034320443205432064320743208432094321043211432124321343214432154321643217432184321943220432214322243223432244322543226432274322843229432304323143232432334323443235432364323743238432394324043241432424324343244432454324643247432484324943250432514325243253432544325543256432574325843259432604326143262432634326443265432664326743268432694327043271432724327343274432754327643277432784327943280432814328243283432844328543286432874328843289432904329143292432934329443295432964329743298432994330043301433024330343304433054330643307433084330943310433114331243313433144331543316433174331843319433204332143322433234332443325433264332743328433294333043331433324333343334433354333643337433384333943340433414334243343433444334543346433474334843349433504335143352433534335443355433564335743358433594336043361433624336343364433654336643367433684336943370433714337243373433744337543376433774337843379433804338143382433834338443385433864338743388433894339043391433924339343394433954339643397433984339943400434014340243403434044340543406434074340843409434104341143412434134341443415434164341743418434194342043421434224342343424434254342643427434284342943430434314343243433434344343543436434374343843439434404344143442434434344443445434464344743448434494345043451434524345343454434554345643457434584345943460434614346243463434644346543466434674346843469434704347143472434734347443475434764347743478434794348043481434824348343484434854348643487434884348943490434914349243493434944349543496434974349843499435004350143502435034350443505435064350743508435094351043511435124351343514435154351643517435184351943520435214352243523435244352543526435274352843529435304353143532435334353443535435364353743538435394354043541435424354343544435454354643547435484354943550435514355243553435544355543556435574355843559435604356143562435634356443565435664356743568435694357043571435724357343574435754357643577435784357943580435814358243583435844358543586435874358843589435904359143592435934359443595435964359743598435994360043601436024360343604436054360643607436084360943610436114361243613436144361543616436174361843619436204362143622436234362443625436264362743628436294363043631436324363343634436354363643637436384363943640436414364243643436444364543646436474364843649436504365143652436534365443655436564365743658436594366043661436624366343664436654366643667436684366943670436714367243673436744367543676436774367843679436804368143682436834368443685436864368743688436894369043691436924369343694436954369643697436984369943700437014370243703437044370543706437074370843709437104371143712437134371443715437164371743718437194372043721437224372343724437254372643727437284372943730437314373243733437344373543736437374373843739437404374143742437434374443745437464374743748437494375043751437524375343754437554375643757437584375943760437614376243763437644376543766437674376843769437704377143772437734377443775437764377743778437794378043781437824378343784437854378643787437884378943790437914379243793437944379543796437974379843799438004380143802438034380443805438064380743808438094381043811438124381343814438154381643817438184381943820438214382243823438244382543826438274382843829438304383143832438334383443835438364383743838438394384043841438424384343844438454384643847438484384943850438514385243853438544385543856438574385843859438604386143862438634386443865438664386743868438694387043871438724387343874438754387643877438784387943880438814388243883438844388543886438874388843889438904389143892438934389443895438964389743898438994390043901439024390343904439054390643907439084390943910439114391243913439144391543916439174391843919439204392143922439234392443925439264392743928439294393043931439324393343934439354393643937439384393943940439414394243943439444394543946439474394843949439504395143952439534395443955439564395743958439594396043961439624396343964439654396643967439684396943970439714397243973439744397543976439774397843979439804398143982439834398443985439864398743988439894399043991439924399343994439954399643997439984399944000440014400244003440044400544006440074400844009440104401144012440134401444015440164401744018440194402044021440224402344024440254402644027440284402944030440314403244033440344403544036440374403844039440404404144042440434404444045440464404744048440494405044051440524405344054440554405644057440584405944060440614406244063440644406544066440674406844069440704407144072440734407444075440764407744078440794408044081440824408344084440854408644087440884408944090440914409244093440944409544096440974409844099441004410144102441034410444105441064410744108441094411044111441124411344114441154411644117441184411944120441214412244123441244412544126441274412844129441304413144132441334413444135441364413744138441394414044141441424414344144441454414644147441484414944150441514415244153441544415544156441574415844159441604416144162441634416444165441664416744168441694417044171441724417344174441754417644177441784417944180441814418244183441844418544186441874418844189441904419144192441934419444195441964419744198441994420044201442024420344204442054420644207442084420944210442114421244213442144421544216442174421844219442204422144222442234422444225442264422744228442294423044231442324423344234442354423644237442384423944240442414424244243442444424544246442474424844249442504425144252442534425444255442564425744258442594426044261442624426344264442654426644267442684426944270442714427244273442744427544276442774427844279442804428144282442834428444285442864428744288442894429044291442924429344294442954429644297442984429944300443014430244303443044430544306443074430844309443104431144312443134431444315443164431744318443194432044321443224432344324443254432644327443284432944330443314433244333443344433544336443374433844339443404434144342443434434444345443464434744348443494435044351443524435344354443554435644357443584435944360443614436244363443644436544366443674436844369443704437144372443734437444375443764437744378443794438044381443824438344384443854438644387443884438944390443914439244393443944439544396443974439844399444004440144402444034440444405444064440744408444094441044411444124441344414444154441644417444184441944420444214442244423444244442544426444274442844429444304443144432444334443444435444364443744438444394444044441444424444344444444454444644447444484444944450444514445244453444544445544456444574445844459444604446144462444634446444465444664446744468444694447044471444724447344474444754447644477444784447944480444814448244483444844448544486444874448844489444904449144492444934449444495444964449744498444994450044501445024450344504445054450644507445084450944510445114451244513445144451544516445174451844519445204452144522445234452444525445264452744528445294453044531445324453344534445354453644537445384453944540445414454244543445444454544546445474454844549445504455144552445534455444555445564455744558445594456044561445624456344564445654456644567445684456944570445714457244573445744457544576445774457844579445804458144582445834458444585445864458744588445894459044591445924459344594445954459644597445984459944600446014460244603446044460544606446074460844609446104461144612446134461444615446164461744618446194462044621446224462344624446254462644627446284462944630446314463244633446344463544636446374463844639446404464144642446434464444645446464464744648446494465044651446524465344654446554465644657446584465944660446614466244663446644466544666446674466844669446704467144672446734467444675446764467744678446794468044681446824468344684446854468644687446884468944690446914469244693446944469544696446974469844699447004470144702447034470444705447064470744708447094471044711447124471344714447154471644717447184471944720447214472244723447244472544726447274472844729447304473144732447334473444735447364473744738447394474044741447424474344744447454474644747447484474944750447514475244753447544475544756447574475844759447604476144762447634476444765447664476744768447694477044771447724477344774447754477644777447784477944780447814478244783447844478544786447874478844789447904479144792447934479444795447964479744798447994480044801448024480344804448054480644807448084480944810448114481244813448144481544816448174481844819448204482144822448234482444825448264482744828448294483044831448324483344834448354483644837448384483944840448414484244843448444484544846448474484844849448504485144852448534485444855448564485744858448594486044861448624486344864448654486644867448684486944870448714487244873448744487544876448774487844879448804488144882448834488444885448864488744888448894489044891448924489344894448954489644897448984489944900449014490244903449044490544906449074490844909449104491144912449134491444915449164491744918449194492044921449224492344924449254492644927449284492944930449314493244933449344493544936449374493844939449404494144942449434494444945449464494744948449494495044951449524495344954449554495644957449584495944960449614496244963449644496544966449674496844969449704497144972449734497444975449764497744978449794498044981449824498344984449854498644987449884498944990449914499244993449944499544996449974499844999450004500145002450034500445005450064500745008450094501045011450124501345014450154501645017450184501945020450214502245023450244502545026450274502845029450304503145032450334503445035450364503745038450394504045041450424504345044450454504645047450484504945050450514505245053450544505545056450574505845059450604506145062450634506445065450664506745068450694507045071450724507345074450754507645077450784507945080450814508245083450844508545086450874508845089450904509145092450934509445095450964509745098450994510045101451024510345104451054510645107451084510945110451114511245113451144511545116451174511845119451204512145122451234512445125451264512745128451294513045131451324513345134451354513645137451384513945140451414514245143451444514545146451474514845149451504515145152451534515445155451564515745158451594516045161451624516345164451654516645167451684516945170451714517245173451744517545176451774517845179451804518145182451834518445185451864518745188451894519045191451924519345194451954519645197451984519945200452014520245203452044520545206452074520845209452104521145212452134521445215452164521745218452194522045221452224522345224452254522645227452284522945230452314523245233452344523545236452374523845239452404524145242452434524445245452464524745248452494525045251452524525345254452554525645257452584525945260452614526245263452644526545266452674526845269452704527145272452734527445275452764527745278452794528045281452824528345284452854528645287452884528945290452914529245293452944529545296452974529845299453004530145302453034530445305453064530745308453094531045311453124531345314453154531645317453184531945320453214532245323453244532545326453274532845329453304533145332453334533445335453364533745338453394534045341453424534345344453454534645347453484534945350453514535245353453544535545356453574535845359453604536145362453634536445365453664536745368453694537045371453724537345374453754537645377453784537945380453814538245383453844538545386453874538845389453904539145392453934539445395453964539745398453994540045401454024540345404454054540645407454084540945410454114541245413454144541545416454174541845419454204542145422454234542445425454264542745428454294543045431454324543345434454354543645437454384543945440454414544245443454444544545446454474544845449454504545145452454534545445455454564545745458454594546045461454624546345464454654546645467454684546945470454714547245473454744547545476454774547845479454804548145482454834548445485454864548745488454894549045491454924549345494454954549645497454984549945500455014550245503455044550545506455074550845509455104551145512455134551445515455164551745518455194552045521455224552345524455254552645527455284552945530455314553245533455344553545536455374553845539455404554145542455434554445545455464554745548455494555045551455524555345554455554555645557455584555945560455614556245563455644556545566455674556845569455704557145572455734557445575455764557745578455794558045581455824558345584455854558645587455884558945590455914559245593455944559545596455974559845599456004560145602456034560445605456064560745608456094561045611456124561345614456154561645617456184561945620456214562245623456244562545626456274562845629456304563145632456334563445635456364563745638456394564045641456424564345644456454564645647456484564945650456514565245653456544565545656456574565845659456604566145662456634566445665456664566745668456694567045671456724567345674456754567645677456784567945680456814568245683456844568545686456874568845689456904569145692456934569445695456964569745698456994570045701457024570345704457054570645707457084570945710457114571245713457144571545716457174571845719457204572145722457234572445725457264572745728457294573045731457324573345734457354573645737457384573945740457414574245743457444574545746457474574845749457504575145752457534575445755457564575745758457594576045761457624576345764457654576645767457684576945770457714577245773457744577545776457774577845779457804578145782457834578445785457864578745788457894579045791457924579345794457954579645797457984579945800458014580245803458044580545806458074580845809458104581145812458134581445815458164581745818458194582045821458224582345824458254582645827458284582945830458314583245833458344583545836458374583845839458404584145842458434584445845458464584745848458494585045851458524585345854458554585645857458584585945860458614586245863458644586545866458674586845869458704587145872458734587445875458764587745878458794588045881458824588345884458854588645887458884588945890458914589245893458944589545896458974589845899459004590145902459034590445905459064590745908459094591045911459124591345914459154591645917459184591945920459214592245923459244592545926459274592845929459304593145932459334593445935459364593745938459394594045941459424594345944459454594645947459484594945950459514595245953459544595545956459574595845959459604596145962459634596445965459664596745968459694597045971459724597345974459754597645977459784597945980459814598245983459844598545986459874598845989459904599145992459934599445995459964599745998459994600046001460024600346004460054600646007460084600946010460114601246013460144601546016460174601846019460204602146022460234602446025460264602746028460294603046031460324603346034460354603646037460384603946040460414604246043460444604546046460474604846049460504605146052460534605446055460564605746058460594606046061460624606346064460654606646067460684606946070460714607246073460744607546076460774607846079460804608146082460834608446085460864608746088460894609046091460924609346094460954609646097460984609946100461014610246103461044610546106461074610846109461104611146112461134611446115461164611746118461194612046121461224612346124461254612646127461284612946130461314613246133461344613546136461374613846139461404614146142461434614446145461464614746148461494615046151461524615346154461554615646157461584615946160461614616246163461644616546166461674616846169461704617146172461734617446175461764617746178461794618046181461824618346184461854618646187461884618946190461914619246193461944619546196461974619846199462004620146202462034620446205462064620746208462094621046211462124621346214462154621646217462184621946220462214622246223462244622546226462274622846229462304623146232462334623446235462364623746238462394624046241462424624346244462454624646247462484624946250462514625246253462544625546256462574625846259462604626146262462634626446265462664626746268462694627046271462724627346274462754627646277462784627946280462814628246283462844628546286462874628846289462904629146292462934629446295462964629746298462994630046301463024630346304463054630646307463084630946310463114631246313463144631546316463174631846319463204632146322463234632446325463264632746328463294633046331463324633346334463354633646337463384633946340463414634246343463444634546346463474634846349463504635146352463534635446355463564635746358463594636046361463624636346364463654636646367463684636946370463714637246373463744637546376463774637846379463804638146382463834638446385463864638746388463894639046391463924639346394463954639646397463984639946400464014640246403464044640546406464074640846409464104641146412464134641446415464164641746418464194642046421464224642346424464254642646427464284642946430464314643246433464344643546436464374643846439464404644146442464434644446445464464644746448464494645046451464524645346454464554645646457464584645946460464614646246463464644646546466464674646846469464704647146472464734647446475464764647746478464794648046481464824648346484464854648646487464884648946490464914649246493464944649546496464974649846499465004650146502465034650446505465064650746508465094651046511465124651346514465154651646517465184651946520465214652246523465244652546526465274652846529465304653146532465334653446535465364653746538465394654046541465424654346544465454654646547465484654946550465514655246553465544655546556465574655846559465604656146562465634656446565465664656746568465694657046571465724657346574465754657646577465784657946580465814658246583465844658546586465874658846589465904659146592465934659446595465964659746598465994660046601466024660346604466054660646607466084660946610466114661246613466144661546616466174661846619466204662146622466234662446625466264662746628466294663046631466324663346634466354663646637466384663946640466414664246643466444664546646466474664846649466504665146652466534665446655466564665746658466594666046661466624666346664466654666646667466684666946670466714667246673466744667546676466774667846679466804668146682466834668446685466864668746688466894669046691466924669346694466954669646697466984669946700467014670246703467044670546706467074670846709467104671146712467134671446715467164671746718467194672046721467224672346724467254672646727467284672946730467314673246733467344673546736467374673846739467404674146742467434674446745467464674746748467494675046751467524675346754467554675646757467584675946760467614676246763467644676546766467674676846769467704677146772467734677446775467764677746778467794678046781467824678346784467854678646787467884678946790467914679246793467944679546796467974679846799468004680146802468034680446805468064680746808468094681046811468124681346814468154681646817468184681946820468214682246823468244682546826468274682846829468304683146832468334683446835468364683746838468394684046841468424684346844468454684646847468484684946850468514685246853468544685546856468574685846859468604686146862468634686446865468664686746868468694687046871468724687346874468754687646877468784687946880468814688246883468844688546886468874688846889468904689146892468934689446895468964689746898468994690046901469024690346904469054690646907469084690946910469114691246913469144691546916469174691846919469204692146922469234692446925469264692746928469294693046931469324693346934469354693646937469384693946940469414694246943469444694546946469474694846949469504695146952469534695446955469564695746958469594696046961469624696346964469654696646967469684696946970469714697246973469744697546976469774697846979469804698146982469834698446985469864698746988469894699046991469924699346994469954699646997469984699947000470014700247003470044700547006470074700847009470104701147012470134701447015470164701747018470194702047021470224702347024470254702647027470284702947030470314703247033470344703547036470374703847039470404704147042470434704447045470464704747048470494705047051470524705347054470554705647057470584705947060470614706247063470644706547066470674706847069470704707147072470734707447075470764707747078470794708047081470824708347084470854708647087470884708947090470914709247093470944709547096470974709847099471004710147102471034710447105471064710747108471094711047111471124711347114471154711647117471184711947120471214712247123471244712547126471274712847129471304713147132471334713447135471364713747138471394714047141471424714347144471454714647147471484714947150471514715247153471544715547156471574715847159471604716147162471634716447165471664716747168471694717047171471724717347174471754717647177471784717947180471814718247183471844718547186471874718847189471904719147192471934719447195471964719747198471994720047201472024720347204472054720647207472084720947210472114721247213472144721547216472174721847219472204722147222472234722447225472264722747228472294723047231472324723347234472354723647237472384723947240472414724247243472444724547246472474724847249472504725147252472534725447255472564725747258472594726047261472624726347264
  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.281';
  23. PDFJS.build = 'c7c1639';
  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. constructPath: 91
  173. };
  174. // A notice for devs. These are good for things that are helpful to devs, such
  175. // as warning that Workers were disabled, which is important to devs but not
  176. // end users.
  177. function info(msg) {
  178. if (PDFJS.verbosity >= PDFJS.VERBOSITY_LEVELS.infos) {
  179. console.log('Info: ' + msg);
  180. }
  181. }
  182. // Non-fatal warnings.
  183. function warn(msg) {
  184. if (PDFJS.verbosity >= PDFJS.VERBOSITY_LEVELS.warnings) {
  185. console.log('Warning: ' + msg);
  186. }
  187. }
  188. // Fatal errors that should trigger the fallback UI and halt execution by
  189. // throwing an exception.
  190. function error(msg) {
  191. // If multiple arguments were passed, pass them all to the log function.
  192. if (arguments.length > 1) {
  193. var logArguments = ['Error:'];
  194. logArguments.push.apply(logArguments, arguments);
  195. console.log.apply(console, logArguments);
  196. // Join the arguments into a single string for the lines below.
  197. msg = [].join.call(arguments, ' ');
  198. } else {
  199. console.log('Error: ' + msg);
  200. }
  201. console.log(backtrace());
  202. UnsupportedManager.notify(UNSUPPORTED_FEATURES.unknown);
  203. throw new Error(msg);
  204. }
  205. function backtrace() {
  206. try {
  207. throw new Error();
  208. } catch (e) {
  209. return e.stack ? e.stack.split('\n').slice(2).join('\n') : '';
  210. }
  211. }
  212. function assert(cond, msg) {
  213. if (!cond) {
  214. error(msg);
  215. }
  216. }
  217. var UNSUPPORTED_FEATURES = PDFJS.UNSUPPORTED_FEATURES = {
  218. unknown: 'unknown',
  219. forms: 'forms',
  220. javaScript: 'javaScript',
  221. smask: 'smask',
  222. shadingPattern: 'shadingPattern',
  223. font: 'font'
  224. };
  225. var UnsupportedManager = PDFJS.UnsupportedManager =
  226. (function UnsupportedManagerClosure() {
  227. var listeners = [];
  228. return {
  229. listen: function (cb) {
  230. listeners.push(cb);
  231. },
  232. notify: function (featureId) {
  233. warn('Unsupported feature "' + featureId + '"');
  234. for (var i = 0, ii = listeners.length; i < ii; i++) {
  235. listeners[i](featureId);
  236. }
  237. }
  238. };
  239. })();
  240. // Combines two URLs. The baseUrl shall be absolute URL. If the url is an
  241. // absolute URL, it will be returned as is.
  242. function combineUrl(baseUrl, url) {
  243. if (!url) {
  244. return baseUrl;
  245. }
  246. if (/^[a-z][a-z0-9+\-.]*:/i.test(url)) {
  247. return url;
  248. }
  249. var i;
  250. if (url.charAt(0) == '/') {
  251. // absolute path
  252. i = baseUrl.indexOf('://');
  253. if (url.charAt(1) === '/') {
  254. ++i;
  255. } else {
  256. i = baseUrl.indexOf('/', i + 3);
  257. }
  258. return baseUrl.substring(0, i) + url;
  259. } else {
  260. // relative path
  261. var pathLength = baseUrl.length;
  262. i = baseUrl.lastIndexOf('#');
  263. pathLength = i >= 0 ? i : pathLength;
  264. i = baseUrl.lastIndexOf('?', pathLength);
  265. pathLength = i >= 0 ? i : pathLength;
  266. var prefixLength = baseUrl.lastIndexOf('/', pathLength);
  267. return baseUrl.substring(0, prefixLength + 1) + url;
  268. }
  269. }
  270. // Validates if URL is safe and allowed, e.g. to avoid XSS.
  271. function isValidUrl(url, allowRelative) {
  272. if (!url) {
  273. return false;
  274. }
  275. // RFC 3986 (http://tools.ietf.org/html/rfc3986#section-3.1)
  276. // scheme = ALPHA *( ALPHA / DIGIT / "+" / "-" / "." )
  277. var protocol = /^[a-z][a-z0-9+\-.]*(?=:)/i.exec(url);
  278. if (!protocol) {
  279. return allowRelative;
  280. }
  281. protocol = protocol[0].toLowerCase();
  282. switch (protocol) {
  283. case 'http':
  284. case 'https':
  285. case 'ftp':
  286. case 'mailto':
  287. return true;
  288. default:
  289. return false;
  290. }
  291. }
  292. PDFJS.isValidUrl = isValidUrl;
  293. function shadow(obj, prop, value) {
  294. Object.defineProperty(obj, prop, { value: value,
  295. enumerable: true,
  296. configurable: true,
  297. writable: false });
  298. return value;
  299. }
  300. var PasswordResponses = PDFJS.PasswordResponses = {
  301. NEED_PASSWORD: 1,
  302. INCORRECT_PASSWORD: 2
  303. };
  304. var PasswordException = (function PasswordExceptionClosure() {
  305. function PasswordException(msg, code) {
  306. this.name = 'PasswordException';
  307. this.message = msg;
  308. this.code = code;
  309. }
  310. PasswordException.prototype = new Error();
  311. PasswordException.constructor = PasswordException;
  312. return PasswordException;
  313. })();
  314. var UnknownErrorException = (function UnknownErrorExceptionClosure() {
  315. function UnknownErrorException(msg, details) {
  316. this.name = 'UnknownErrorException';
  317. this.message = msg;
  318. this.details = details;
  319. }
  320. UnknownErrorException.prototype = new Error();
  321. UnknownErrorException.constructor = UnknownErrorException;
  322. return UnknownErrorException;
  323. })();
  324. var InvalidPDFException = (function InvalidPDFExceptionClosure() {
  325. function InvalidPDFException(msg) {
  326. this.name = 'InvalidPDFException';
  327. this.message = msg;
  328. }
  329. InvalidPDFException.prototype = new Error();
  330. InvalidPDFException.constructor = InvalidPDFException;
  331. return InvalidPDFException;
  332. })();
  333. var MissingPDFException = (function MissingPDFExceptionClosure() {
  334. function MissingPDFException(msg) {
  335. this.name = 'MissingPDFException';
  336. this.message = msg;
  337. }
  338. MissingPDFException.prototype = new Error();
  339. MissingPDFException.constructor = MissingPDFException;
  340. return MissingPDFException;
  341. })();
  342. var NotImplementedException = (function NotImplementedExceptionClosure() {
  343. function NotImplementedException(msg) {
  344. this.message = msg;
  345. }
  346. NotImplementedException.prototype = new Error();
  347. NotImplementedException.prototype.name = 'NotImplementedException';
  348. NotImplementedException.constructor = NotImplementedException;
  349. return NotImplementedException;
  350. })();
  351. var MissingDataException = (function MissingDataExceptionClosure() {
  352. function MissingDataException(begin, end) {
  353. this.begin = begin;
  354. this.end = end;
  355. this.message = 'Missing data [' + begin + ', ' + end + ')';
  356. }
  357. MissingDataException.prototype = new Error();
  358. MissingDataException.prototype.name = 'MissingDataException';
  359. MissingDataException.constructor = MissingDataException;
  360. return MissingDataException;
  361. })();
  362. var XRefParseException = (function XRefParseExceptionClosure() {
  363. function XRefParseException(msg) {
  364. this.message = msg;
  365. }
  366. XRefParseException.prototype = new Error();
  367. XRefParseException.prototype.name = 'XRefParseException';
  368. XRefParseException.constructor = XRefParseException;
  369. return XRefParseException;
  370. })();
  371. function bytesToString(bytes) {
  372. var length = bytes.length;
  373. var MAX_ARGUMENT_COUNT = 8192;
  374. if (length < MAX_ARGUMENT_COUNT) {
  375. return String.fromCharCode.apply(null, bytes);
  376. }
  377. var strBuf = [];
  378. for (var i = 0; i < length; i += MAX_ARGUMENT_COUNT) {
  379. var chunkEnd = Math.min(i + MAX_ARGUMENT_COUNT, length);
  380. var chunk = bytes.subarray(i, chunkEnd);
  381. strBuf.push(String.fromCharCode.apply(null, chunk));
  382. }
  383. return strBuf.join('');
  384. }
  385. function stringToArray(str) {
  386. var length = str.length;
  387. var array = [];
  388. for (var i = 0; i < length; ++i) {
  389. array[i] = str.charCodeAt(i);
  390. }
  391. return array;
  392. }
  393. function stringToBytes(str) {
  394. var length = str.length;
  395. var bytes = new Uint8Array(length);
  396. for (var i = 0; i < length; ++i) {
  397. bytes[i] = str.charCodeAt(i) & 0xFF;
  398. }
  399. return bytes;
  400. }
  401. function string32(value) {
  402. return String.fromCharCode((value >> 24) & 0xff, (value >> 16) & 0xff,
  403. (value >> 8) & 0xff, value & 0xff);
  404. }
  405. function log2(x) {
  406. var n = 1, i = 0;
  407. while (x > n) {
  408. n <<= 1;
  409. i++;
  410. }
  411. return i;
  412. }
  413. function readInt8(data, start) {
  414. return (data[start] << 24) >> 24;
  415. }
  416. function readUint16(data, offset) {
  417. return (data[offset] << 8) | data[offset + 1];
  418. }
  419. function readUint32(data, offset) {
  420. return ((data[offset] << 24) | (data[offset + 1] << 16) |
  421. (data[offset + 2] << 8) | data[offset + 3]) >>> 0;
  422. }
  423. // Lazy test the endianness of the platform
  424. // NOTE: This will be 'true' for simulated TypedArrays
  425. function isLittleEndian() {
  426. var buffer8 = new Uint8Array(2);
  427. buffer8[0] = 1;
  428. var buffer16 = new Uint16Array(buffer8.buffer);
  429. return (buffer16[0] === 1);
  430. }
  431. Object.defineProperty(PDFJS, 'isLittleEndian', {
  432. configurable: true,
  433. get: function PDFJS_isLittleEndian() {
  434. return shadow(PDFJS, 'isLittleEndian', isLittleEndian());
  435. }
  436. });
  437. // Lazy test if the userAgant support CanvasTypedArrays
  438. function hasCanvasTypedArrays() {
  439. var canvas = document.createElement('canvas');
  440. canvas.width = canvas.height = 1;
  441. var ctx = canvas.getContext('2d');
  442. var imageData = ctx.createImageData(1, 1);
  443. return (typeof imageData.data.buffer !== 'undefined');
  444. }
  445. Object.defineProperty(PDFJS, 'hasCanvasTypedArrays', {
  446. configurable: true,
  447. get: function PDFJS_hasCanvasTypedArrays() {
  448. return shadow(PDFJS, 'hasCanvasTypedArrays', hasCanvasTypedArrays());
  449. }
  450. });
  451. var Uint32ArrayView = (function Uint32ArrayViewClosure() {
  452. function Uint32ArrayView(buffer, length) {
  453. this.buffer = buffer;
  454. this.byteLength = buffer.length;
  455. this.length = length === undefined ? (this.byteLength >> 2) : length;
  456. ensureUint32ArrayViewProps(this.length);
  457. }
  458. Uint32ArrayView.prototype = Object.create(null);
  459. var uint32ArrayViewSetters = 0;
  460. function createUint32ArrayProp(index) {
  461. return {
  462. get: function () {
  463. var buffer = this.buffer, offset = index << 2;
  464. return (buffer[offset] | (buffer[offset + 1] << 8) |
  465. (buffer[offset + 2] << 16) | (buffer[offset + 3] << 24)) >>> 0;
  466. },
  467. set: function (value) {
  468. var buffer = this.buffer, offset = index << 2;
  469. buffer[offset] = value & 255;
  470. buffer[offset + 1] = (value >> 8) & 255;
  471. buffer[offset + 2] = (value >> 16) & 255;
  472. buffer[offset + 3] = (value >>> 24) & 255;
  473. }
  474. };
  475. }
  476. function ensureUint32ArrayViewProps(length) {
  477. while (uint32ArrayViewSetters < length) {
  478. Object.defineProperty(Uint32ArrayView.prototype,
  479. uint32ArrayViewSetters,
  480. createUint32ArrayProp(uint32ArrayViewSetters));
  481. uint32ArrayViewSetters++;
  482. }
  483. }
  484. return Uint32ArrayView;
  485. })();
  486. var IDENTITY_MATRIX = [1, 0, 0, 1, 0, 0];
  487. var Util = PDFJS.Util = (function UtilClosure() {
  488. function Util() {}
  489. Util.makeCssRgb = function Util_makeCssRgb(rgb) {
  490. return 'rgb(' + rgb[0] + ',' + rgb[1] + ',' + rgb[2] + ')';
  491. };
  492. // Concatenates two transformation matrices together and returns the result.
  493. Util.transform = function Util_transform(m1, m2) {
  494. return [
  495. m1[0] * m2[0] + m1[2] * m2[1],
  496. m1[1] * m2[0] + m1[3] * m2[1],
  497. m1[0] * m2[2] + m1[2] * m2[3],
  498. m1[1] * m2[2] + m1[3] * m2[3],
  499. m1[0] * m2[4] + m1[2] * m2[5] + m1[4],
  500. m1[1] * m2[4] + m1[3] * m2[5] + m1[5]
  501. ];
  502. };
  503. // For 2d affine transforms
  504. Util.applyTransform = function Util_applyTransform(p, m) {
  505. var xt = p[0] * m[0] + p[1] * m[2] + m[4];
  506. var yt = p[0] * m[1] + p[1] * m[3] + m[5];
  507. return [xt, yt];
  508. };
  509. Util.applyInverseTransform = function Util_applyInverseTransform(p, m) {
  510. var d = m[0] * m[3] - m[1] * m[2];
  511. var xt = (p[0] * m[3] - p[1] * m[2] + m[2] * m[5] - m[4] * m[3]) / d;
  512. var yt = (-p[0] * m[1] + p[1] * m[0] + m[4] * m[1] - m[5] * m[0]) / d;
  513. return [xt, yt];
  514. };
  515. // Applies the transform to the rectangle and finds the minimum axially
  516. // aligned bounding box.
  517. Util.getAxialAlignedBoundingBox =
  518. function Util_getAxialAlignedBoundingBox(r, m) {
  519. var p1 = Util.applyTransform(r, m);
  520. var p2 = Util.applyTransform(r.slice(2, 4), m);
  521. var p3 = Util.applyTransform([r[0], r[3]], m);
  522. var p4 = Util.applyTransform([r[2], r[1]], m);
  523. return [
  524. Math.min(p1[0], p2[0], p3[0], p4[0]),
  525. Math.min(p1[1], p2[1], p3[1], p4[1]),
  526. Math.max(p1[0], p2[0], p3[0], p4[0]),
  527. Math.max(p1[1], p2[1], p3[1], p4[1])
  528. ];
  529. };
  530. Util.inverseTransform = function Util_inverseTransform(m) {
  531. var d = m[0] * m[3] - m[1] * m[2];
  532. return [m[3] / d, -m[1] / d, -m[2] / d, m[0] / d,
  533. (m[2] * m[5] - m[4] * m[3]) / d, (m[4] * m[1] - m[5] * m[0]) / d];
  534. };
  535. // Apply a generic 3d matrix M on a 3-vector v:
  536. // | a b c | | X |
  537. // | d e f | x | Y |
  538. // | g h i | | Z |
  539. // M is assumed to be serialized as [a,b,c,d,e,f,g,h,i],
  540. // with v as [X,Y,Z]
  541. Util.apply3dTransform = function Util_apply3dTransform(m, v) {
  542. return [
  543. m[0] * v[0] + m[1] * v[1] + m[2] * v[2],
  544. m[3] * v[0] + m[4] * v[1] + m[5] * v[2],
  545. m[6] * v[0] + m[7] * v[1] + m[8] * v[2]
  546. ];
  547. };
  548. // This calculation uses Singular Value Decomposition.
  549. // The SVD can be represented with formula A = USV. We are interested in the
  550. // matrix S here because it represents the scale values.
  551. Util.singularValueDecompose2dScale =
  552. function Util_singularValueDecompose2dScale(m) {
  553. var transpose = [m[0], m[2], m[1], m[3]];
  554. // Multiply matrix m with its transpose.
  555. var a = m[0] * transpose[0] + m[1] * transpose[2];
  556. var b = m[0] * transpose[1] + m[1] * transpose[3];
  557. var c = m[2] * transpose[0] + m[3] * transpose[2];
  558. var d = m[2] * transpose[1] + m[3] * transpose[3];
  559. // Solve the second degree polynomial to get roots.
  560. var first = (a + d) / 2;
  561. var second = Math.sqrt((a + d) * (a + d) - 4 * (a * d - c * b)) / 2;
  562. var sx = first + second || 1;
  563. var sy = first - second || 1;
  564. // Scale values are the square roots of the eigenvalues.
  565. return [Math.sqrt(sx), Math.sqrt(sy)];
  566. };
  567. // Normalize rectangle rect=[x1, y1, x2, y2] so that (x1,y1) < (x2,y2)
  568. // For coordinate systems whose origin lies in the bottom-left, this
  569. // means normalization to (BL,TR) ordering. For systems with origin in the
  570. // top-left, this means (TL,BR) ordering.
  571. Util.normalizeRect = function Util_normalizeRect(rect) {
  572. var r = rect.slice(0); // clone rect
  573. if (rect[0] > rect[2]) {
  574. r[0] = rect[2];
  575. r[2] = rect[0];
  576. }
  577. if (rect[1] > rect[3]) {
  578. r[1] = rect[3];
  579. r[3] = rect[1];
  580. }
  581. return r;
  582. };
  583. // Returns a rectangle [x1, y1, x2, y2] corresponding to the
  584. // intersection of rect1 and rect2. If no intersection, returns 'false'
  585. // The rectangle coordinates of rect1, rect2 should be [x1, y1, x2, y2]
  586. Util.intersect = function Util_intersect(rect1, rect2) {
  587. function compare(a, b) {
  588. return a - b;
  589. }
  590. // Order points along the axes
  591. var orderedX = [rect1[0], rect1[2], rect2[0], rect2[2]].sort(compare),
  592. orderedY = [rect1[1], rect1[3], rect2[1], rect2[3]].sort(compare),
  593. result = [];
  594. rect1 = Util.normalizeRect(rect1);
  595. rect2 = Util.normalizeRect(rect2);
  596. // X: first and second points belong to different rectangles?
  597. if ((orderedX[0] === rect1[0] && orderedX[1] === rect2[0]) ||
  598. (orderedX[0] === rect2[0] && orderedX[1] === rect1[0])) {
  599. // Intersection must be between second and third points
  600. result[0] = orderedX[1];
  601. result[2] = orderedX[2];
  602. } else {
  603. return false;
  604. }
  605. // Y: first and second points belong to different rectangles?
  606. if ((orderedY[0] === rect1[1] && orderedY[1] === rect2[1]) ||
  607. (orderedY[0] === rect2[1] && orderedY[1] === rect1[1])) {
  608. // Intersection must be between second and third points
  609. result[1] = orderedY[1];
  610. result[3] = orderedY[2];
  611. } else {
  612. return false;
  613. }
  614. return result;
  615. };
  616. Util.sign = function Util_sign(num) {
  617. return num < 0 ? -1 : 1;
  618. };
  619. // TODO(mack): Rename appendToArray
  620. Util.concatenateToArray = function concatenateToArray(arr1, arr2) {
  621. Array.prototype.push.apply(arr1, arr2);
  622. };
  623. Util.prependToArray = function concatenateToArray(arr1, arr2) {
  624. Array.prototype.unshift.apply(arr1, arr2);
  625. };
  626. Util.extendObj = function extendObj(obj1, obj2) {
  627. for (var key in obj2) {
  628. obj1[key] = obj2[key];
  629. }
  630. };
  631. Util.getInheritableProperty = function Util_getInheritableProperty(dict,
  632. name) {
  633. while (dict && !dict.has(name)) {
  634. dict = dict.get('Parent');
  635. }
  636. if (!dict) {
  637. return null;
  638. }
  639. return dict.get(name);
  640. };
  641. Util.inherit = function Util_inherit(sub, base, prototype) {
  642. sub.prototype = Object.create(base.prototype);
  643. sub.prototype.constructor = sub;
  644. for (var prop in prototype) {
  645. sub.prototype[prop] = prototype[prop];
  646. }
  647. };
  648. Util.loadScript = function Util_loadScript(src, callback) {
  649. var script = document.createElement('script');
  650. var loaded = false;
  651. script.setAttribute('src', src);
  652. if (callback) {
  653. script.onload = function() {
  654. if (!loaded) {
  655. callback();
  656. }
  657. loaded = true;
  658. };
  659. }
  660. document.getElementsByTagName('head')[0].appendChild(script);
  661. };
  662. return Util;
  663. })();
  664. /**
  665. * PDF page viewport created based on scale, rotation and offset.
  666. * @class
  667. * @alias PDFJS.PageViewport
  668. */
  669. var PageViewport = PDFJS.PageViewport = (function PageViewportClosure() {
  670. /**
  671. * @constructor
  672. * @private
  673. * @param viewBox {Array} xMin, yMin, xMax and yMax coordinates.
  674. * @param scale {number} scale of the viewport.
  675. * @param rotation {number} rotations of the viewport in degrees.
  676. * @param offsetX {number} offset X
  677. * @param offsetY {number} offset Y
  678. * @param dontFlip {boolean} if true, axis Y will not be flipped.
  679. */
  680. function PageViewport(viewBox, scale, rotation, offsetX, offsetY, dontFlip) {
  681. this.viewBox = viewBox;
  682. this.scale = scale;
  683. this.rotation = rotation;
  684. this.offsetX = offsetX;
  685. this.offsetY = offsetY;
  686. // creating transform to convert pdf coordinate system to the normal
  687. // canvas like coordinates taking in account scale and rotation
  688. var centerX = (viewBox[2] + viewBox[0]) / 2;
  689. var centerY = (viewBox[3] + viewBox[1]) / 2;
  690. var rotateA, rotateB, rotateC, rotateD;
  691. rotation = rotation % 360;
  692. rotation = rotation < 0 ? rotation + 360 : rotation;
  693. switch (rotation) {
  694. case 180:
  695. rotateA = -1; rotateB = 0; rotateC = 0; rotateD = 1;
  696. break;
  697. case 90:
  698. rotateA = 0; rotateB = 1; rotateC = 1; rotateD = 0;
  699. break;
  700. case 270:
  701. rotateA = 0; rotateB = -1; rotateC = -1; rotateD = 0;
  702. break;
  703. //case 0:
  704. default:
  705. rotateA = 1; rotateB = 0; rotateC = 0; rotateD = -1;
  706. break;
  707. }
  708. if (dontFlip) {
  709. rotateC = -rotateC; rotateD = -rotateD;
  710. }
  711. var offsetCanvasX, offsetCanvasY;
  712. var width, height;
  713. if (rotateA === 0) {
  714. offsetCanvasX = Math.abs(centerY - viewBox[1]) * scale + offsetX;
  715. offsetCanvasY = Math.abs(centerX - viewBox[0]) * scale + offsetY;
  716. width = Math.abs(viewBox[3] - viewBox[1]) * scale;
  717. height = Math.abs(viewBox[2] - viewBox[0]) * scale;
  718. } else {
  719. offsetCanvasX = Math.abs(centerX - viewBox[0]) * scale + offsetX;
  720. offsetCanvasY = Math.abs(centerY - viewBox[1]) * scale + offsetY;
  721. width = Math.abs(viewBox[2] - viewBox[0]) * scale;
  722. height = Math.abs(viewBox[3] - viewBox[1]) * scale;
  723. }
  724. // creating transform for the following operations:
  725. // translate(-centerX, -centerY), rotate and flip vertically,
  726. // scale, and translate(offsetCanvasX, offsetCanvasY)
  727. this.transform = [
  728. rotateA * scale,
  729. rotateB * scale,
  730. rotateC * scale,
  731. rotateD * scale,
  732. offsetCanvasX - rotateA * scale * centerX - rotateC * scale * centerY,
  733. offsetCanvasY - rotateB * scale * centerX - rotateD * scale * centerY
  734. ];
  735. this.width = width;
  736. this.height = height;
  737. this.fontScale = scale;
  738. }
  739. PageViewport.prototype = /** @lends PDFJS.PageViewport.prototype */ {
  740. /**
  741. * Clones viewport with additional properties.
  742. * @param args {Object} (optional) If specified, may contain the 'scale' or
  743. * 'rotation' properties to override the corresponding properties in
  744. * the cloned viewport.
  745. * @returns {PDFJS.PageViewport} Cloned viewport.
  746. */
  747. clone: function PageViewPort_clone(args) {
  748. args = args || {};
  749. var scale = 'scale' in args ? args.scale : this.scale;
  750. var rotation = 'rotation' in args ? args.rotation : this.rotation;
  751. return new PageViewport(this.viewBox.slice(), scale, rotation,
  752. this.offsetX, this.offsetY, args.dontFlip);
  753. },
  754. /**
  755. * Converts PDF point to the viewport coordinates. For examples, useful for
  756. * converting PDF location into canvas pixel coordinates.
  757. * @param x {number} X coordinate.
  758. * @param y {number} Y coordinate.
  759. * @returns {Object} Object that contains 'x' and 'y' properties of the
  760. * point in the viewport coordinate space.
  761. * @see {@link convertToPdfPoint}
  762. * @see {@link convertToViewportRectangle}
  763. */
  764. convertToViewportPoint: function PageViewport_convertToViewportPoint(x, y) {
  765. return Util.applyTransform([x, y], this.transform);
  766. },
  767. /**
  768. * Converts PDF rectangle to the viewport coordinates.
  769. * @param rect {Array} xMin, yMin, xMax and yMax coordinates.
  770. * @returns {Array} Contains corresponding coordinates of the rectangle
  771. * in the viewport coordinate space.
  772. * @see {@link convertToViewportPoint}
  773. */
  774. convertToViewportRectangle:
  775. function PageViewport_convertToViewportRectangle(rect) {
  776. var tl = Util.applyTransform([rect[0], rect[1]], this.transform);
  777. var br = Util.applyTransform([rect[2], rect[3]], this.transform);
  778. return [tl[0], tl[1], br[0], br[1]];
  779. },
  780. /**
  781. * Converts viewport coordinates to the PDF location. For examples, useful
  782. * for converting canvas pixel location into PDF one.
  783. * @param x {number} X coordinate.
  784. * @param y {number} Y coordinate.
  785. * @returns {Object} Object that contains 'x' and 'y' properties of the
  786. * point in the PDF coordinate space.
  787. * @see {@link convertToViewportPoint}
  788. */
  789. convertToPdfPoint: function PageViewport_convertToPdfPoint(x, y) {
  790. return Util.applyInverseTransform([x, y], this.transform);
  791. }
  792. };
  793. return PageViewport;
  794. })();
  795. var PDFStringTranslateTable = [
  796. 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
  797. 0x2D8, 0x2C7, 0x2C6, 0x2D9, 0x2DD, 0x2DB, 0x2DA, 0x2DC, 0, 0, 0, 0, 0, 0, 0,
  798. 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,
  799. 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,
  800. 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,
  801. 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0x2022, 0x2020, 0x2021, 0x2026, 0x2014,
  802. 0x2013, 0x192, 0x2044, 0x2039, 0x203A, 0x2212, 0x2030, 0x201E, 0x201C,
  803. 0x201D, 0x2018, 0x2019, 0x201A, 0x2122, 0xFB01, 0xFB02, 0x141, 0x152, 0x160,
  804. 0x178, 0x17D, 0x131, 0x142, 0x153, 0x161, 0x17E, 0, 0x20AC
  805. ];
  806. function stringToPDFString(str) {
  807. var i, n = str.length, strBuf = [];
  808. if (str[0] === '\xFE' && str[1] === '\xFF') {
  809. // UTF16BE BOM
  810. for (i = 2; i < n; i += 2) {
  811. strBuf.push(String.fromCharCode(
  812. (str.charCodeAt(i) << 8) | str.charCodeAt(i + 1)));
  813. }
  814. } else {
  815. for (i = 0; i < n; ++i) {
  816. var code = PDFStringTranslateTable[str.charCodeAt(i)];
  817. strBuf.push(code ? String.fromCharCode(code) : str.charAt(i));
  818. }
  819. }
  820. return strBuf.join('');
  821. }
  822. function stringToUTF8String(str) {
  823. return decodeURIComponent(escape(str));
  824. }
  825. function isEmptyObj(obj) {
  826. for (var key in obj) {
  827. return false;
  828. }
  829. return true;
  830. }
  831. function isBool(v) {
  832. return typeof v == 'boolean';
  833. }
  834. function isInt(v) {
  835. return typeof v == 'number' && ((v | 0) == v);
  836. }
  837. function isNum(v) {
  838. return typeof v == 'number';
  839. }
  840. function isString(v) {
  841. return typeof v == 'string';
  842. }
  843. function isNull(v) {
  844. return v === null;
  845. }
  846. function isName(v) {
  847. return v instanceof Name;
  848. }
  849. function isCmd(v, cmd) {
  850. return v instanceof Cmd && (!cmd || v.cmd == cmd);
  851. }
  852. function isDict(v, type) {
  853. if (!(v instanceof Dict)) {
  854. return false;
  855. }
  856. if (!type) {
  857. return true;
  858. }
  859. var dictType = v.get('Type');
  860. return isName(dictType) && dictType.name == type;
  861. }
  862. function isArray(v) {
  863. return v instanceof Array;
  864. }
  865. function isStream(v) {
  866. return typeof v == 'object' && v !== null && v !== undefined &&
  867. ('getBytes' in v);
  868. }
  869. function isArrayBuffer(v) {
  870. return typeof v == 'object' && v !== null && v !== undefined &&
  871. ('byteLength' in v);
  872. }
  873. function isRef(v) {
  874. return v instanceof Ref;
  875. }
  876. /**
  877. * Promise Capability object.
  878. *
  879. * @typedef {Object} PromiseCapability
  880. * @property {Promise} promise - A promise object.
  881. * @property {function} resolve - Fullfills the promise.
  882. * @property {function} reject - Rejects the promise.
  883. */
  884. /**
  885. * Creates a promise capability object.
  886. * @alias PDFJS.createPromiseCapability
  887. *
  888. * @return {PromiseCapability} A capability object contains:
  889. * - a Promise, resolve and reject methods.
  890. */
  891. function createPromiseCapability() {
  892. var capability = {};
  893. capability.promise = new Promise(function (resolve, reject) {
  894. capability.resolve = resolve;
  895. capability.reject = reject;
  896. });
  897. return capability;
  898. }
  899. PDFJS.createPromiseCapability = createPromiseCapability;
  900. /**
  901. * Polyfill for Promises:
  902. * The following promise implementation tries to generally implement the
  903. * Promise/A+ spec. Some notable differences from other promise libaries are:
  904. * - There currently isn't a seperate deferred and promise object.
  905. * - Unhandled rejections eventually show an error if they aren't handled.
  906. *
  907. * Based off of the work in:
  908. * https://bugzilla.mozilla.org/show_bug.cgi?id=810490
  909. */
  910. (function PromiseClosure() {
  911. if (globalScope.Promise) {
  912. // Promises existing in the DOM/Worker, checking presence of all/resolve
  913. if (typeof globalScope.Promise.all !== 'function') {
  914. globalScope.Promise.all = function (iterable) {
  915. var count = 0, results = [], resolve, reject;
  916. var promise = new globalScope.Promise(function (resolve_, reject_) {
  917. resolve = resolve_;
  918. reject = reject_;
  919. });
  920. iterable.forEach(function (p, i) {
  921. count++;
  922. p.then(function (result) {
  923. results[i] = result;
  924. count--;
  925. if (count === 0) {
  926. resolve(results);
  927. }
  928. }, reject);
  929. });
  930. if (count === 0) {
  931. resolve(results);
  932. }
  933. return promise;
  934. };
  935. }
  936. if (typeof globalScope.Promise.resolve !== 'function') {
  937. globalScope.Promise.resolve = function (value) {
  938. return new globalScope.Promise(function (resolve) { resolve(value); });
  939. };
  940. }
  941. if (typeof globalScope.Promise.reject !== 'function') {
  942. globalScope.Promise.reject = function (reason) {
  943. return new globalScope.Promise(function (resolve, reject) {
  944. reject(reason);
  945. });
  946. };
  947. }
  948. if (typeof globalScope.Promise.prototype.catch !== 'function') {
  949. globalScope.Promise.prototype.catch = function (onReject) {
  950. return globalScope.Promise.prototype.then(undefined, onReject);
  951. };
  952. }
  953. return;
  954. }
  955. var STATUS_PENDING = 0;
  956. var STATUS_RESOLVED = 1;
  957. var STATUS_REJECTED = 2;
  958. // In an attempt to avoid silent exceptions, unhandled rejections are
  959. // tracked and if they aren't handled in a certain amount of time an
  960. // error is logged.
  961. var REJECTION_TIMEOUT = 500;
  962. var HandlerManager = {
  963. handlers: [],
  964. running: false,
  965. unhandledRejections: [],
  966. pendingRejectionCheck: false,
  967. scheduleHandlers: function scheduleHandlers(promise) {
  968. if (promise._status == STATUS_PENDING) {
  969. return;
  970. }
  971. this.handlers = this.handlers.concat(promise._handlers);
  972. promise._handlers = [];
  973. if (this.running) {
  974. return;
  975. }
  976. this.running = true;
  977. setTimeout(this.runHandlers.bind(this), 0);
  978. },
  979. runHandlers: function runHandlers() {
  980. var RUN_TIMEOUT = 1; // ms
  981. var timeoutAt = Date.now() + RUN_TIMEOUT;
  982. while (this.handlers.length > 0) {
  983. var handler = this.handlers.shift();
  984. var nextStatus = handler.thisPromise._status;
  985. var nextValue = handler.thisPromise._value;
  986. try {
  987. if (nextStatus === STATUS_RESOLVED) {
  988. if (typeof(handler.onResolve) == 'function') {
  989. nextValue = handler.onResolve(nextValue);
  990. }
  991. } else if (typeof(handler.onReject) === 'function') {
  992. nextValue = handler.onReject(nextValue);
  993. nextStatus = STATUS_RESOLVED;
  994. if (handler.thisPromise._unhandledRejection) {
  995. this.removeUnhandeledRejection(handler.thisPromise);
  996. }
  997. }
  998. } catch (ex) {
  999. nextStatus = STATUS_REJECTED;
  1000. nextValue = ex;
  1001. }
  1002. handler.nextPromise._updateStatus(nextStatus, nextValue);
  1003. if (Date.now() >= timeoutAt) {
  1004. break;
  1005. }
  1006. }
  1007. if (this.handlers.length > 0) {
  1008. setTimeout(this.runHandlers.bind(this), 0);
  1009. return;
  1010. }
  1011. this.running = false;
  1012. },
  1013. addUnhandledRejection: function addUnhandledRejection(promise) {
  1014. this.unhandledRejections.push({
  1015. promise: promise,
  1016. time: Date.now()
  1017. });
  1018. this.scheduleRejectionCheck();
  1019. },
  1020. removeUnhandeledRejection: function removeUnhandeledRejection(promise) {
  1021. promise._unhandledRejection = false;
  1022. for (var i = 0; i < this.unhandledRejections.length; i++) {
  1023. if (this.unhandledRejections[i].promise === promise) {
  1024. this.unhandledRejections.splice(i);
  1025. i--;
  1026. }
  1027. }
  1028. },
  1029. scheduleRejectionCheck: function scheduleRejectionCheck() {
  1030. if (this.pendingRejectionCheck) {
  1031. return;
  1032. }
  1033. this.pendingRejectionCheck = true;
  1034. setTimeout(function rejectionCheck() {
  1035. this.pendingRejectionCheck = false;
  1036. var now = Date.now();
  1037. for (var i = 0; i < this.unhandledRejections.length; i++) {
  1038. if (now - this.unhandledRejections[i].time > REJECTION_TIMEOUT) {
  1039. var unhandled = this.unhandledRejections[i].promise._value;
  1040. var msg = 'Unhandled rejection: ' + unhandled;
  1041. if (unhandled.stack) {
  1042. msg += '\n' + unhandled.stack;
  1043. }
  1044. warn(msg);
  1045. this.unhandledRejections.splice(i);
  1046. i--;
  1047. }
  1048. }
  1049. if (this.unhandledRejections.length) {
  1050. this.scheduleRejectionCheck();
  1051. }
  1052. }.bind(this), REJECTION_TIMEOUT);
  1053. }
  1054. };
  1055. function Promise(resolver) {
  1056. this._status = STATUS_PENDING;
  1057. this._handlers = [];
  1058. try {
  1059. resolver.call(this, this._resolve.bind(this), this._reject.bind(this));
  1060. } catch (e) {
  1061. this._reject(e);
  1062. }
  1063. }
  1064. /**
  1065. * Builds a promise that is resolved when all the passed in promises are
  1066. * resolved.
  1067. * @param {array} array of data and/or promises to wait for.
  1068. * @return {Promise} New dependant promise.
  1069. */
  1070. Promise.all = function Promise_all(promises) {
  1071. var resolveAll, rejectAll;
  1072. var deferred = new Promise(function (resolve, reject) {
  1073. resolveAll = resolve;
  1074. rejectAll = reject;
  1075. });
  1076. var unresolved = promises.length;
  1077. var results = [];
  1078. if (unresolved === 0) {
  1079. resolveAll(results);
  1080. return deferred;
  1081. }
  1082. function reject(reason) {
  1083. if (deferred._status === STATUS_REJECTED) {
  1084. return;
  1085. }
  1086. results = [];
  1087. rejectAll(reason);
  1088. }
  1089. for (var i = 0, ii = promises.length; i < ii; ++i) {
  1090. var promise = promises[i];
  1091. var resolve = (function(i) {
  1092. return function(value) {
  1093. if (deferred._status === STATUS_REJECTED) {
  1094. return;
  1095. }
  1096. results[i] = value;
  1097. unresolved--;
  1098. if (unresolved === 0) {
  1099. resolveAll(results);
  1100. }
  1101. };
  1102. })(i);
  1103. if (Promise.isPromise(promise)) {
  1104. promise.then(resolve, reject);
  1105. } else {
  1106. resolve(promise);
  1107. }
  1108. }
  1109. return deferred;
  1110. };
  1111. /**
  1112. * Checks if the value is likely a promise (has a 'then' function).
  1113. * @return {boolean} true if value is thenable
  1114. */
  1115. Promise.isPromise = function Promise_isPromise(value) {
  1116. return value && typeof value.then === 'function';
  1117. };
  1118. /**
  1119. * Creates resolved promise
  1120. * @param value resolve value
  1121. * @returns {Promise}
  1122. */
  1123. Promise.resolve = function Promise_resolve(value) {
  1124. return new Promise(function (resolve) { resolve(value); });
  1125. };
  1126. /**
  1127. * Creates rejected promise
  1128. * @param reason rejection value
  1129. * @returns {Promise}
  1130. */
  1131. Promise.reject = function Promise_reject(reason) {
  1132. return new Promise(function (resolve, reject) { reject(reason); });
  1133. };
  1134. Promise.prototype = {
  1135. _status: null,
  1136. _value: null,
  1137. _handlers: null,
  1138. _unhandledRejection: null,
  1139. _updateStatus: function Promise__updateStatus(status, value) {
  1140. if (this._status === STATUS_RESOLVED ||
  1141. this._status === STATUS_REJECTED) {
  1142. return;
  1143. }
  1144. if (status == STATUS_RESOLVED &&
  1145. Promise.isPromise(value)) {
  1146. value.then(this._updateStatus.bind(this, STATUS_RESOLVED),
  1147. this._updateStatus.bind(this, STATUS_REJECTED));
  1148. return;
  1149. }
  1150. this._status = status;
  1151. this._value = value;
  1152. if (status === STATUS_REJECTED && this._handlers.length === 0) {
  1153. this._unhandledRejection = true;
  1154. HandlerManager.addUnhandledRejection(this);
  1155. }
  1156. HandlerManager.scheduleHandlers(this);
  1157. },
  1158. _resolve: function Promise_resolve(value) {
  1159. this._updateStatus(STATUS_RESOLVED, value);
  1160. },
  1161. _reject: function Promise_reject(reason) {
  1162. this._updateStatus(STATUS_REJECTED, reason);
  1163. },
  1164. then: function Promise_then(onResolve, onReject) {
  1165. var nextPromise = new Promise(function (resolve, reject) {
  1166. this.resolve = reject;
  1167. this.reject = reject;
  1168. });
  1169. this._handlers.push({
  1170. thisPromise: this,
  1171. onResolve: onResolve,
  1172. onReject: onReject,
  1173. nextPromise: nextPromise
  1174. });
  1175. HandlerManager.scheduleHandlers(this);
  1176. return nextPromise;
  1177. },
  1178. catch: function Promise_catch(onReject) {
  1179. return this.then(undefined, onReject);
  1180. }
  1181. };
  1182. globalScope.Promise = Promise;
  1183. })();
  1184. var StatTimer = (function StatTimerClosure() {
  1185. function rpad(str, pad, length) {
  1186. while (str.length < length) {
  1187. str += pad;
  1188. }
  1189. return str;
  1190. }
  1191. function StatTimer() {
  1192. this.started = {};
  1193. this.times = [];
  1194. this.enabled = true;
  1195. }
  1196. StatTimer.prototype = {
  1197. time: function StatTimer_time(name) {
  1198. if (!this.enabled) {
  1199. return;
  1200. }
  1201. if (name in this.started) {
  1202. warn('Timer is already running for ' + name);
  1203. }
  1204. this.started[name] = Date.now();
  1205. },
  1206. timeEnd: function StatTimer_timeEnd(name) {
  1207. if (!this.enabled) {
  1208. return;
  1209. }
  1210. if (!(name in this.started)) {
  1211. warn('Timer has not been started for ' + name);
  1212. }
  1213. this.times.push({
  1214. 'name': name,
  1215. 'start': this.started[name],
  1216. 'end': Date.now()
  1217. });
  1218. // Remove timer from started so it can be called again.
  1219. delete this.started[name];
  1220. },
  1221. toString: function StatTimer_toString() {
  1222. var i, ii;
  1223. var times = this.times;
  1224. var out = '';
  1225. // Find the longest name for padding purposes.
  1226. var longest = 0;
  1227. for (i = 0, ii = times.length; i < ii; ++i) {
  1228. var name = times[i]['name'];
  1229. if (name.length > longest) {
  1230. longest = name.length;
  1231. }
  1232. }
  1233. for (i = 0, ii = times.length; i < ii; ++i) {
  1234. var span = times[i];
  1235. var duration = span.end - span.start;
  1236. out += rpad(span['name'], ' ', longest) + ' ' + duration + 'ms\n';
  1237. }
  1238. return out;
  1239. }
  1240. };
  1241. return StatTimer;
  1242. })();
  1243. PDFJS.createBlob = function createBlob(data, contentType) {
  1244. if (typeof Blob !== 'undefined') {
  1245. return new Blob([data], { type: contentType });
  1246. }
  1247. // Blob builder is deprecated in FF14 and removed in FF18.
  1248. var bb = new MozBlobBuilder();
  1249. bb.append(data);
  1250. return bb.getBlob(contentType);
  1251. };
  1252. PDFJS.createObjectURL = (function createObjectURLClosure() {
  1253. // Blob/createObjectURL is not available, falling back to data schema.
  1254. var digits =
  1255. 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=';
  1256. return function createObjectURL(data, contentType) {
  1257. if (!PDFJS.disableCreateObjectURL &&
  1258. typeof URL !== 'undefined' && URL.createObjectURL) {
  1259. var blob = PDFJS.createBlob(data, contentType);
  1260. return URL.createObjectURL(blob);
  1261. }
  1262. var buffer = 'data:' + contentType + ';base64,';
  1263. for (var i = 0, ii = data.length; i < ii; i += 3) {
  1264. var b1 = data[i] & 0xFF;
  1265. var b2 = data[i + 1] & 0xFF;
  1266. var b3 = data[i + 2] & 0xFF;
  1267. var d1 = b1 >> 2, d2 = ((b1 & 3) << 4) | (b2 >> 4);
  1268. var d3 = i + 1 < ii ? ((b2 & 0xF) << 2) | (b3 >> 6) : 64;
  1269. var d4 = i + 2 < ii ? (b3 & 0x3F) : 64;
  1270. buffer += digits[d1] + digits[d2] + digits[d3] + digits[d4];
  1271. }
  1272. return buffer;
  1273. };
  1274. })();
  1275. function MessageHandler(name, comObj) {
  1276. this.name = name;
  1277. this.comObj = comObj;
  1278. this.callbackIndex = 1;
  1279. this.postMessageTransfers = true;
  1280. var callbacksCapabilities = this.callbacksCapabilities = {};
  1281. var ah = this.actionHandler = {};
  1282. ah['console_log'] = [function ahConsoleLog(data) {
  1283. console.log.apply(console, data);
  1284. }];
  1285. ah['console_error'] = [function ahConsoleError(data) {
  1286. console.error.apply(console, data);
  1287. }];
  1288. ah['_unsupported_feature'] = [function ah_unsupportedFeature(data) {
  1289. UnsupportedManager.notify(data);
  1290. }];
  1291. comObj.onmessage = function messageHandlerComObjOnMessage(event) {
  1292. var data = event.data;
  1293. if (data.isReply) {
  1294. var callbackId = data.callbackId;
  1295. if (data.callbackId in callbacksCapabilities) {
  1296. var callback = callbacksCapabilities[callbackId];
  1297. delete callbacksCapabilities[callbackId];
  1298. if ('error' in data) {
  1299. callback.reject(data.error);
  1300. } else {
  1301. callback.resolve(data.data);
  1302. }
  1303. } else {
  1304. error('Cannot resolve callback ' + callbackId);
  1305. }
  1306. } else if (data.action in ah) {
  1307. var action = ah[data.action];
  1308. if (data.callbackId) {
  1309. Promise.resolve().then(function () {
  1310. return action[0].call(action[1], data.data);
  1311. }).then(function (result) {
  1312. comObj.postMessage({
  1313. isReply: true,
  1314. callbackId: data.callbackId,
  1315. data: result
  1316. });
  1317. }, function (reason) {
  1318. comObj.postMessage({
  1319. isReply: true,
  1320. callbackId: data.callbackId,
  1321. error: reason
  1322. });
  1323. });
  1324. } else {
  1325. action[0].call(action[1], data.data);
  1326. }
  1327. } else {
  1328. error('Unknown action from worker: ' + data.action);
  1329. }
  1330. };
  1331. }
  1332. MessageHandler.prototype = {
  1333. on: function messageHandlerOn(actionName, handler, scope) {
  1334. var ah = this.actionHandler;
  1335. if (ah[actionName]) {
  1336. error('There is already an actionName called "' + actionName + '"');
  1337. }
  1338. ah[actionName] = [handler, scope];
  1339. },
  1340. /**
  1341. * Sends a message to the comObj to invoke the action with the supplied data.
  1342. * @param {String} actionName Action to call.
  1343. * @param {JSON} data JSON data to send.
  1344. * @param {Array} [transfers] Optional list of transfers/ArrayBuffers
  1345. */
  1346. send: function messageHandlerSend(actionName, data, transfers) {
  1347. var message = {
  1348. action: actionName,
  1349. data: data
  1350. };
  1351. this.postMessage(message, transfers);
  1352. },
  1353. /**
  1354. * Sends a message to the comObj to invoke the action with the supplied data.
  1355. * Expects that other side will callback with the response.
  1356. * @param {String} actionName Action to call.
  1357. * @param {JSON} data JSON data to send.
  1358. * @param {Array} [transfers] Optional list of transfers/ArrayBuffers.
  1359. * @returns {Promise} Promise to be resolved with response data.
  1360. */
  1361. sendWithPromise:
  1362. function messageHandlerSendWithPromise(actionName, data, transfers) {
  1363. var callbackId = this.callbackIndex++;
  1364. var message = {
  1365. action: actionName,
  1366. data: data,
  1367. callbackId: callbackId
  1368. };
  1369. var capability = createPromiseCapability();
  1370. this.callbacksCapabilities[callbackId] = capability;
  1371. try {
  1372. this.postMessage(message, transfers);
  1373. } catch (e) {
  1374. capability.reject(e);
  1375. }
  1376. return capability.promise;
  1377. },
  1378. /**
  1379. * Sends raw message to the comObj.
  1380. * @private
  1381. * @param message {Object} Raw message.
  1382. * @param transfers List of transfers/ArrayBuffers, or undefined.
  1383. */
  1384. postMessage: function (message, transfers) {
  1385. if (transfers && this.postMessageTransfers) {
  1386. this.comObj.postMessage(message, transfers);
  1387. } else {
  1388. this.comObj.postMessage(message);
  1389. }
  1390. }
  1391. };
  1392. function loadJpegStream(id, imageUrl, objs) {
  1393. var img = new Image();
  1394. img.onload = (function loadJpegStream_onloadClosure() {
  1395. objs.resolve(id, img);
  1396. });
  1397. img.src = imageUrl;
  1398. }
  1399. var DEFAULT_ICON_SIZE = 22; // px
  1400. var HIGHLIGHT_OFFSET = 4; // px
  1401. var SUPPORTED_TYPES = ['Link', 'Text', 'Widget'];
  1402. var Annotation = (function AnnotationClosure() {
  1403. // 12.5.5: Algorithm: Appearance streams
  1404. function getTransformMatrix(rect, bbox, matrix) {
  1405. var bounds = Util.getAxialAlignedBoundingBox(bbox, matrix);
  1406. var minX = bounds[0];
  1407. var minY = bounds[1];
  1408. var maxX = bounds[2];
  1409. var maxY = bounds[3];
  1410. if (minX === maxX || minY === maxY) {
  1411. // From real-life file, bbox was [0, 0, 0, 0]. In this case,
  1412. // just apply the transform for rect
  1413. return [1, 0, 0, 1, rect[0], rect[1]];
  1414. }
  1415. var xRatio = (rect[2] - rect[0]) / (maxX - minX);
  1416. var yRatio = (rect[3] - rect[1]) / (maxY - minY);
  1417. return [
  1418. xRatio,
  1419. 0,
  1420. 0,
  1421. yRatio,
  1422. rect[0] - minX * xRatio,
  1423. rect[1] - minY * yRatio
  1424. ];
  1425. }
  1426. function getDefaultAppearance(dict) {
  1427. var appearanceState = dict.get('AP');
  1428. if (!isDict(appearanceState)) {
  1429. return;
  1430. }
  1431. var appearance;
  1432. var appearances = appearanceState.get('N');
  1433. if (isDict(appearances)) {
  1434. var as = dict.get('AS');
  1435. if (as && appearances.has(as.name)) {
  1436. appearance = appearances.get(as.name);
  1437. }
  1438. } else {
  1439. appearance = appearances;
  1440. }
  1441. return appearance;
  1442. }
  1443. function Annotation(params) {
  1444. if (params.data) {
  1445. this.data = params.data;
  1446. return;
  1447. }
  1448. var dict = params.dict;
  1449. var data = this.data = {};
  1450. data.subtype = dict.get('Subtype').name;
  1451. var rect = dict.get('Rect') || [0, 0, 0, 0];
  1452. data.rect = Util.normalizeRect(rect);
  1453. data.annotationFlags = dict.get('F');
  1454. var color = dict.get('C');
  1455. if (isArray(color) && color.length === 3) {
  1456. // TODO(mack): currently only supporting rgb; need support different
  1457. // colorspaces
  1458. data.color = color;
  1459. } else {
  1460. data.color = [0, 0, 0];
  1461. }
  1462. // Some types of annotations have border style dict which has more
  1463. // info than the border array
  1464. if (dict.has('BS')) {
  1465. var borderStyle = dict.get('BS');
  1466. data.borderWidth = borderStyle.has('W') ? borderStyle.get('W') : 1;
  1467. } else {
  1468. var borderArray = dict.get('Border') || [0, 0, 1];
  1469. data.borderWidth = borderArray[2] || 0;
  1470. // TODO: implement proper support for annotations with line dash patterns.
  1471. var dashArray = borderArray[3];
  1472. if (data.borderWidth > 0 && dashArray) {
  1473. if (!isArray(dashArray)) {
  1474. // Ignore the border if dashArray is not actually an array,
  1475. // this is consistent with the behaviour in Adobe Reader.
  1476. data.borderWidth = 0;
  1477. } else {
  1478. var dashArrayLength = dashArray.length;
  1479. if (dashArrayLength > 0) {
  1480. // According to the PDF specification: the elements in a dashArray
  1481. // shall be numbers that are nonnegative and not all equal to zero.
  1482. var isInvalid = false;
  1483. var numPositive = 0;
  1484. for (var i = 0; i < dashArrayLength; i++) {
  1485. var validNumber = (+dashArray[i] >= 0);
  1486. if (!validNumber) {
  1487. isInvalid = true;
  1488. break;
  1489. } else if (dashArray[i] > 0) {
  1490. numPositive++;
  1491. }
  1492. }
  1493. if (isInvalid || numPositive === 0) {
  1494. data.borderWidth = 0;
  1495. }
  1496. }
  1497. }
  1498. }
  1499. }
  1500. this.appearance = getDefaultAppearance(dict);
  1501. data.hasAppearance = !!this.appearance;
  1502. data.id = params.ref.num;
  1503. }
  1504. Annotation.prototype = {
  1505. getData: function Annotation_getData() {
  1506. return this.data;
  1507. },
  1508. hasHtml: function Annotation_hasHtml() {
  1509. return false;
  1510. },
  1511. getHtmlElement: function Annotation_getHtmlElement(commonObjs) {
  1512. throw new NotImplementedException(
  1513. 'getHtmlElement() should be implemented in subclass');
  1514. },
  1515. // TODO(mack): Remove this, it's not really that helpful.
  1516. getEmptyContainer: function Annotation_getEmptyContainer(tagName, rect,
  1517. borderWidth) {
  1518. assert(!isWorker,
  1519. 'getEmptyContainer() should be called from main thread');
  1520. var bWidth = borderWidth || 0;
  1521. rect = rect || this.data.rect;
  1522. var element = document.createElement(tagName);
  1523. element.style.borderWidth = bWidth + 'px';
  1524. var width = rect[2] - rect[0] - 2 * bWidth;
  1525. var height = rect[3] - rect[1] - 2 * bWidth;
  1526. element.style.width = width + 'px';
  1527. element.style.height = height + 'px';
  1528. return element;
  1529. },
  1530. isInvisible: function Annotation_isInvisible() {
  1531. var data = this.data;
  1532. if (data && SUPPORTED_TYPES.indexOf(data.subtype) !== -1) {
  1533. return false;
  1534. } else {
  1535. return !!(data &&
  1536. data.annotationFlags && // Default: not invisible
  1537. data.annotationFlags & 0x1); // Invisible
  1538. }
  1539. },
  1540. isViewable: function Annotation_isViewable() {
  1541. var data = this.data;
  1542. return !!(!this.isInvisible() &&
  1543. data &&
  1544. (!data.annotationFlags ||
  1545. !(data.annotationFlags & 0x22)) && // Hidden or NoView
  1546. data.rect); // rectangle is nessessary
  1547. },
  1548. isPrintable: function Annotation_isPrintable() {
  1549. var data = this.data;
  1550. return !!(!this.isInvisible() &&
  1551. data &&
  1552. data.annotationFlags && // Default: not printable
  1553. data.annotationFlags & 0x4 && // Print
  1554. data.rect); // rectangle is nessessary
  1555. },
  1556. loadResources: function Annotation_loadResources(keys) {
  1557. return new Promise(function (resolve, reject) {
  1558. this.appearance.dict.getAsync('Resources').then(function (resources) {
  1559. if (!resources) {
  1560. resolve();
  1561. return;
  1562. }
  1563. var objectLoader = new ObjectLoader(resources.map,
  1564. keys,
  1565. resources.xref);
  1566. objectLoader.load().then(function() {
  1567. resolve(resources);
  1568. }, reject);
  1569. }, reject);
  1570. }.bind(this));
  1571. },
  1572. getOperatorList: function Annotation_getOperatorList(evaluator) {
  1573. if (!this.appearance) {
  1574. return Promise.resolve(new OperatorList());
  1575. }
  1576. var data = this.data;
  1577. var appearanceDict = this.appearance.dict;
  1578. var resourcesPromise = this.loadResources([
  1579. 'ExtGState',
  1580. 'ColorSpace',
  1581. 'Pattern',
  1582. 'Shading',
  1583. 'XObject',
  1584. 'Font'
  1585. // ProcSet
  1586. // Properties
  1587. ]);
  1588. var bbox = appearanceDict.get('BBox') || [0, 0, 1, 1];
  1589. var matrix = appearanceDict.get('Matrix') || [1, 0, 0, 1, 0 ,0];
  1590. var transform = getTransformMatrix(data.rect, bbox, matrix);
  1591. var self = this;
  1592. return resourcesPromise.then(function(resources) {
  1593. var opList = new OperatorList();
  1594. opList.addOp(OPS.beginAnnotation, [data.rect, transform, matrix]);
  1595. return evaluator.getOperatorList(self.appearance, resources, opList).
  1596. then(function () {
  1597. opList.addOp(OPS.endAnnotation, []);
  1598. self.appearance.reset();
  1599. return opList;
  1600. });
  1601. });
  1602. }
  1603. };
  1604. Annotation.getConstructor =
  1605. function Annotation_getConstructor(subtype, fieldType) {
  1606. if (!subtype) {
  1607. return;
  1608. }
  1609. // TODO(mack): Implement FreeText annotations
  1610. if (subtype === 'Link') {
  1611. return LinkAnnotation;
  1612. } else if (subtype === 'Text') {
  1613. return TextAnnotation;
  1614. } else if (subtype === 'Widget') {
  1615. if (!fieldType) {
  1616. return;
  1617. }
  1618. if (fieldType === 'Tx') {
  1619. return TextWidgetAnnotation;
  1620. } else {
  1621. return WidgetAnnotation;
  1622. }
  1623. } else {
  1624. return Annotation;
  1625. }
  1626. };
  1627. // TODO(mack): Support loading annotation from data
  1628. Annotation.fromData = function Annotation_fromData(data) {
  1629. var subtype = data.subtype;
  1630. var fieldType = data.fieldType;
  1631. var Constructor = Annotation.getConstructor(subtype, fieldType);
  1632. if (Constructor) {
  1633. return new Constructor({ data: data });
  1634. }
  1635. };
  1636. Annotation.fromRef = function Annotation_fromRef(xref, ref) {
  1637. var dict = xref.fetchIfRef(ref);
  1638. if (!isDict(dict)) {
  1639. return;
  1640. }
  1641. var subtype = dict.get('Subtype');
  1642. subtype = isName(subtype) ? subtype.name : '';
  1643. if (!subtype) {
  1644. return;
  1645. }
  1646. var fieldType = Util.getInheritableProperty(dict, 'FT');
  1647. fieldType = isName(fieldType) ? fieldType.name : '';
  1648. var Constructor = Annotation.getConstructor(subtype, fieldType);
  1649. if (!Constructor) {
  1650. return;
  1651. }
  1652. var params = {
  1653. dict: dict,
  1654. ref: ref,
  1655. };
  1656. var annotation = new Constructor(params);
  1657. if (annotation.isViewable() || annotation.isPrintable()) {
  1658. return annotation;
  1659. } else {
  1660. warn('unimplemented annotation type: ' + subtype);
  1661. }
  1662. };
  1663. Annotation.appendToOperatorList = function Annotation_appendToOperatorList(
  1664. annotations, opList, pdfManager, partialEvaluator, intent) {
  1665. function reject(e) {
  1666. annotationsReadyCapability.reject(e);
  1667. }
  1668. var annotationsReadyCapability = createPromiseCapability();
  1669. var annotationPromises = [];
  1670. for (var i = 0, n = annotations.length; i < n; ++i) {
  1671. if (intent === 'display' && annotations[i].isViewable() ||
  1672. intent === 'print' && annotations[i].isPrintable()) {
  1673. annotationPromises.push(
  1674. annotations[i].getOperatorList(partialEvaluator));
  1675. }
  1676. }
  1677. Promise.all(annotationPromises).then(function(datas) {
  1678. opList.addOp(OPS.beginAnnotations, []);
  1679. for (var i = 0, n = datas.length; i < n; ++i) {
  1680. var annotOpList = datas[i];
  1681. opList.addOpList(annotOpList);
  1682. }
  1683. opList.addOp(OPS.endAnnotations, []);
  1684. annotationsReadyCapability.resolve();
  1685. }, reject);
  1686. return annotationsReadyCapability.promise;
  1687. };
  1688. return Annotation;
  1689. })();
  1690. PDFJS.Annotation = Annotation;
  1691. var WidgetAnnotation = (function WidgetAnnotationClosure() {
  1692. function WidgetAnnotation(params) {
  1693. Annotation.call(this, params);
  1694. if (params.data) {
  1695. return;
  1696. }
  1697. var dict = params.dict;
  1698. var data = this.data;
  1699. data.fieldValue = stringToPDFString(
  1700. Util.getInheritableProperty(dict, 'V') || '');
  1701. data.alternativeText = stringToPDFString(dict.get('TU') || '');
  1702. data.defaultAppearance = Util.getInheritableProperty(dict, 'DA') || '';
  1703. var fieldType = Util.getInheritableProperty(dict, 'FT');
  1704. data.fieldType = isName(fieldType) ? fieldType.name : '';
  1705. data.fieldFlags = Util.getInheritableProperty(dict, 'Ff') || 0;
  1706. this.fieldResources = Util.getInheritableProperty(dict, 'DR') || Dict.empty;
  1707. // Building the full field name by collecting the field and
  1708. // its ancestors 'T' data and joining them using '.'.
  1709. var fieldName = [];
  1710. var namedItem = dict;
  1711. var ref = params.ref;
  1712. while (namedItem) {
  1713. var parent = namedItem.get('Parent');
  1714. var parentRef = namedItem.getRaw('Parent');
  1715. var name = namedItem.get('T');
  1716. if (name) {
  1717. fieldName.unshift(stringToPDFString(name));
  1718. } else {
  1719. // The field name is absent, that means more than one field
  1720. // with the same name may exist. Replacing the empty name
  1721. // with the '`' plus index in the parent's 'Kids' array.
  1722. // This is not in the PDF spec but necessary to id the
  1723. // the input controls.
  1724. var kids = parent.get('Kids');
  1725. var j, jj;
  1726. for (j = 0, jj = kids.length; j < jj; j++) {
  1727. var kidRef = kids[j];
  1728. if (kidRef.num == ref.num && kidRef.gen == ref.gen) {
  1729. break;
  1730. }
  1731. }
  1732. fieldName.unshift('`' + j);
  1733. }
  1734. namedItem = parent;
  1735. ref = parentRef;
  1736. }
  1737. data.fullName = fieldName.join('.');
  1738. }
  1739. var parent = Annotation.prototype;
  1740. Util.inherit(WidgetAnnotation, Annotation, {
  1741. isViewable: function WidgetAnnotation_isViewable() {
  1742. if (this.data.fieldType === 'Sig') {
  1743. warn('unimplemented annotation type: Widget signature');
  1744. return false;
  1745. }
  1746. return parent.isViewable.call(this);
  1747. }
  1748. });
  1749. return WidgetAnnotation;
  1750. })();
  1751. var TextWidgetAnnotation = (function TextWidgetAnnotationClosure() {
  1752. function TextWidgetAnnotation(params) {
  1753. WidgetAnnotation.call(this, params);
  1754. if (params.data) {
  1755. return;
  1756. }
  1757. this.data.textAlignment = Util.getInheritableProperty(params.dict, 'Q');
  1758. }
  1759. // TODO(mack): This dupes some of the logic in CanvasGraphics.setFont()
  1760. function setTextStyles(element, item, fontObj) {
  1761. var style = element.style;
  1762. style.fontSize = item.fontSize + 'px';
  1763. style.direction = item.fontDirection < 0 ? 'rtl': 'ltr';
  1764. if (!fontObj) {
  1765. return;
  1766. }
  1767. style.fontWeight = fontObj.black ?
  1768. (fontObj.bold ? 'bolder' : 'bold') :
  1769. (fontObj.bold ? 'bold' : 'normal');
  1770. style.fontStyle = fontObj.italic ? 'italic' : 'normal';
  1771. var fontName = fontObj.loadedName;
  1772. var fontFamily = fontName ? '"' + fontName + '", ' : '';
  1773. // Use a reasonable default font if the font doesn't specify a fallback
  1774. var fallbackName = fontObj.fallbackName || 'Helvetica, sans-serif';
  1775. style.fontFamily = fontFamily + fallbackName;
  1776. }
  1777. Util.inherit(TextWidgetAnnotation, WidgetAnnotation, {
  1778. hasHtml: function TextWidgetAnnotation_hasHtml() {
  1779. return !this.data.hasAppearance && !!this.data.fieldValue;
  1780. },
  1781. getHtmlElement: function TextWidgetAnnotation_getHtmlElement(commonObjs) {
  1782. assert(!isWorker, 'getHtmlElement() shall be called from main thread');
  1783. var item = this.data;
  1784. var element = this.getEmptyContainer('div');
  1785. element.style.display = 'table';
  1786. var content = document.createElement('div');
  1787. content.textContent = item.fieldValue;
  1788. var textAlignment = item.textAlignment;
  1789. content.style.textAlign = ['left', 'center', 'right'][textAlignment];
  1790. content.style.verticalAlign = 'middle';
  1791. content.style.display = 'table-cell';
  1792. var fontObj = item.fontRefName ?
  1793. commonObjs.getData(item.fontRefName) : null;
  1794. setTextStyles(content, item, fontObj);
  1795. element.appendChild(content);
  1796. return element;
  1797. },
  1798. getOperatorList: function TextWidgetAnnotation_getOperatorList(evaluator) {
  1799. if (this.appearance) {
  1800. return Annotation.prototype.getOperatorList.call(this, evaluator);
  1801. }
  1802. var opList = new OperatorList();
  1803. var data = this.data;
  1804. // Even if there is an appearance stream, ignore it. This is the
  1805. // behaviour used by Adobe Reader.
  1806. if (!data.defaultAppearance) {
  1807. return Promise.resolve(opList);
  1808. }
  1809. var stream = new Stream(stringToBytes(data.defaultAppearance));
  1810. return evaluator.getOperatorList(stream, this.fieldResources, opList).
  1811. then(function () {
  1812. return opList;
  1813. });
  1814. }
  1815. });
  1816. return TextWidgetAnnotation;
  1817. })();
  1818. var InteractiveAnnotation = (function InteractiveAnnotationClosure() {
  1819. function InteractiveAnnotation(params) {
  1820. Annotation.call(this, params);
  1821. }
  1822. Util.inherit(InteractiveAnnotation, Annotation, {
  1823. hasHtml: function InteractiveAnnotation_hasHtml() {
  1824. return true;
  1825. },
  1826. highlight: function InteractiveAnnotation_highlight() {
  1827. if (this.highlightElement &&
  1828. this.highlightElement.hasAttribute('hidden')) {
  1829. this.highlightElement.removeAttribute('hidden');
  1830. }
  1831. },
  1832. unhighlight: function InteractiveAnnotation_unhighlight() {
  1833. if (this.highlightElement &&
  1834. !this.highlightElement.hasAttribute('hidden')) {
  1835. this.highlightElement.setAttribute('hidden', true);
  1836. }
  1837. },
  1838. initContainer: function InteractiveAnnotation_initContainer() {
  1839. var item = this.data;
  1840. var rect = item.rect;
  1841. var container = this.getEmptyContainer('section', rect, item.borderWidth);
  1842. container.style.backgroundColor = item.color;
  1843. var color = item.color;
  1844. var rgb = [];
  1845. for (var i = 0; i < 3; ++i) {
  1846. rgb[i] = Math.round(color[i] * 255);
  1847. }
  1848. item.colorCssRgb = Util.makeCssRgb(rgb);
  1849. var highlight = document.createElement('div');
  1850. highlight.className = 'annotationHighlight';
  1851. highlight.style.left = highlight.style.top = -HIGHLIGHT_OFFSET + 'px';
  1852. highlight.style.right = highlight.style.bottom = -HIGHLIGHT_OFFSET + 'px';
  1853. highlight.setAttribute('hidden', true);
  1854. this.highlightElement = highlight;
  1855. container.appendChild(this.highlightElement);
  1856. return container;
  1857. }
  1858. });
  1859. return InteractiveAnnotation;
  1860. })();
  1861. var TextAnnotation = (function TextAnnotationClosure() {
  1862. function TextAnnotation(params) {
  1863. InteractiveAnnotation.call(this, params);
  1864. if (params.data) {
  1865. return;
  1866. }
  1867. var dict = params.dict;
  1868. var data = this.data;
  1869. var content = dict.get('Contents');
  1870. var title = dict.get('T');
  1871. data.content = stringToPDFString(content || '');
  1872. data.title = stringToPDFString(title || '');
  1873. if (data.hasAppearance) {
  1874. data.name = 'NoIcon';
  1875. } else {
  1876. data.rect[1] = data.rect[3] - DEFAULT_ICON_SIZE;
  1877. data.rect[2] = data.rect[0] + DEFAULT_ICON_SIZE;
  1878. data.name = dict.has('Name') ? dict.get('Name').name : 'Note';
  1879. }
  1880. if (dict.has('C')) {
  1881. data.hasBgColor = true;
  1882. }
  1883. }
  1884. var ANNOT_MIN_SIZE = 10;
  1885. Util.inherit(TextAnnotation, InteractiveAnnotation, {
  1886. getHtmlElement: function TextAnnotation_getHtmlElement(commonObjs) {
  1887. assert(!isWorker, 'getHtmlElement() shall be called from main thread');
  1888. var item = this.data;
  1889. var rect = item.rect;
  1890. // sanity check because of OOo-generated PDFs
  1891. if ((rect[3] - rect[1]) < ANNOT_MIN_SIZE) {
  1892. rect[3] = rect[1] + ANNOT_MIN_SIZE;
  1893. }
  1894. if ((rect[2] - rect[0]) < ANNOT_MIN_SIZE) {
  1895. rect[2] = rect[0] + (rect[3] - rect[1]); // make it square
  1896. }
  1897. var container = this.initContainer();
  1898. container.className = 'annotText';
  1899. var image = document.createElement('img');
  1900. image.style.height = container.style.height;
  1901. image.style.width = container.style.width;
  1902. var iconName = item.name;
  1903. image.src = PDFJS.imageResourcesPath + 'annotation-' +
  1904. iconName.toLowerCase() + '.svg';
  1905. image.alt = '[{{type}} Annotation]';
  1906. image.dataset.l10nId = 'text_annotation_type';
  1907. image.dataset.l10nArgs = JSON.stringify({type: iconName});
  1908. var contentWrapper = document.createElement('div');
  1909. contentWrapper.className = 'annotTextContentWrapper';
  1910. contentWrapper.style.left = Math.floor(rect[2] - rect[0] + 5) + 'px';
  1911. contentWrapper.style.top = '-10px';
  1912. var content = document.createElement('div');
  1913. content.className = 'annotTextContent';
  1914. content.setAttribute('hidden', true);
  1915. var i, ii;
  1916. if (item.hasBgColor) {
  1917. var color = item.color;
  1918. var rgb = [];
  1919. for (i = 0; i < 3; ++i) {
  1920. // Enlighten the color (70%)
  1921. var c = Math.round(color[i] * 255);
  1922. rgb[i] = Math.round((255 - c) * 0.7) + c;
  1923. }
  1924. content.style.backgroundColor = Util.makeCssRgb(rgb);
  1925. }
  1926. var title = document.createElement('h1');
  1927. var text = document.createElement('p');
  1928. title.textContent = item.title;
  1929. if (!item.content && !item.title) {
  1930. content.setAttribute('hidden', true);
  1931. } else {
  1932. var e = document.createElement('span');
  1933. var lines = item.content.split(/(?:\r\n?|\n)/);
  1934. for (i = 0, ii = lines.length; i < ii; ++i) {
  1935. var line = lines[i];
  1936. e.appendChild(document.createTextNode(line));
  1937. if (i < (ii - 1)) {
  1938. e.appendChild(document.createElement('br'));
  1939. }
  1940. }
  1941. text.appendChild(e);
  1942. var pinned = false;
  1943. var showAnnotation = function showAnnotation(pin) {
  1944. if (pin) {
  1945. pinned = true;
  1946. }
  1947. if (content.hasAttribute('hidden')) {
  1948. container.style.zIndex += 1;
  1949. content.removeAttribute('hidden');
  1950. }
  1951. };
  1952. var hideAnnotation = function hideAnnotation(unpin) {
  1953. if (unpin) {
  1954. pinned = false;
  1955. }
  1956. if (!content.hasAttribute('hidden') && !pinned) {
  1957. container.style.zIndex -= 1;
  1958. content.setAttribute('hidden', true);
  1959. }
  1960. };
  1961. var toggleAnnotation = function toggleAnnotation() {
  1962. if (pinned) {
  1963. hideAnnotation(true);
  1964. } else {
  1965. showAnnotation(true);
  1966. }
  1967. };
  1968. image.addEventListener('click', function image_clickHandler() {
  1969. toggleAnnotation();
  1970. }, false);
  1971. image.addEventListener('mouseover', function image_mouseOverHandler() {
  1972. showAnnotation();
  1973. }, false);
  1974. image.addEventListener('mouseout', function image_mouseOutHandler() {
  1975. hideAnnotation();
  1976. }, false);
  1977. content.addEventListener('click', function content_clickHandler() {
  1978. hideAnnotation(true);
  1979. }, false);
  1980. }
  1981. content.appendChild(title);
  1982. content.appendChild(text);
  1983. contentWrapper.appendChild(content);
  1984. container.appendChild(image);
  1985. container.appendChild(contentWrapper);
  1986. return container;
  1987. }
  1988. });
  1989. return TextAnnotation;
  1990. })();
  1991. var LinkAnnotation = (function LinkAnnotationClosure() {
  1992. function LinkAnnotation(params) {
  1993. InteractiveAnnotation.call(this, params);
  1994. if (params.data) {
  1995. return;
  1996. }
  1997. var dict = params.dict;
  1998. var data = this.data;
  1999. var action = dict.get('A');
  2000. if (action) {
  2001. var linkType = action.get('S').name;
  2002. if (linkType === 'URI') {
  2003. var url = action.get('URI');
  2004. if (isName(url)) {
  2005. // Some bad PDFs do not put parentheses around relative URLs.
  2006. url = '/' + url.name;
  2007. } else if (url) {
  2008. url = addDefaultProtocolToUrl(url);
  2009. }
  2010. // TODO: pdf spec mentions urls can be relative to a Base
  2011. // entry in the dictionary.
  2012. if (!isValidUrl(url, false)) {
  2013. url = '';
  2014. }
  2015. data.url = url;
  2016. } else if (linkType === 'GoTo') {
  2017. data.dest = action.get('D');
  2018. } else if (linkType === 'GoToR') {
  2019. var urlDict = action.get('F');
  2020. if (isDict(urlDict)) {
  2021. // We assume that the 'url' is a Filspec dictionary
  2022. // and fetch the url without checking any further
  2023. url = urlDict.get('F') || '';
  2024. }
  2025. // TODO: pdf reference says that GoToR
  2026. // can also have 'NewWindow' attribute
  2027. if (!isValidUrl(url, false)) {
  2028. url = '';
  2029. }
  2030. data.url = url;
  2031. data.dest = action.get('D');
  2032. } else if (linkType === 'Named') {
  2033. data.action = action.get('N').name;
  2034. } else {
  2035. warn('unrecognized link type: ' + linkType);
  2036. }
  2037. } else if (dict.has('Dest')) {
  2038. // simple destination link
  2039. var dest = dict.get('Dest');
  2040. data.dest = isName(dest) ? dest.name : dest;
  2041. }
  2042. }
  2043. // Lets URLs beginning with 'www.' default to using the 'http://' protocol.
  2044. function addDefaultProtocolToUrl(url) {
  2045. if (url && url.indexOf('www.') === 0) {
  2046. return ('http://' + url);
  2047. }
  2048. return url;
  2049. }
  2050. Util.inherit(LinkAnnotation, InteractiveAnnotation, {
  2051. hasOperatorList: function LinkAnnotation_hasOperatorList() {
  2052. return false;
  2053. },
  2054. getHtmlElement: function LinkAnnotation_getHtmlElement(commonObjs) {
  2055. var container = this.initContainer();
  2056. container.className = 'annotLink';
  2057. var item = this.data;
  2058. container.style.borderColor = item.colorCssRgb;
  2059. container.style.borderStyle = 'solid';
  2060. var link = document.createElement('a');
  2061. link.href = link.title = this.data.url || '';
  2062. container.appendChild(link);
  2063. return container;
  2064. }
  2065. });
  2066. return LinkAnnotation;
  2067. })();
  2068. /**
  2069. * The maximum allowed image size in total pixels e.g. width * height. Images
  2070. * above this value will not be drawn. Use -1 for no limit.
  2071. * @var {number}
  2072. */
  2073. PDFJS.maxImageSize = (PDFJS.maxImageSize === undefined ?
  2074. -1 : PDFJS.maxImageSize);
  2075. /**
  2076. * The url of where the predefined Adobe CMaps are located. Include trailing
  2077. * slash.
  2078. * @var {string}
  2079. */
  2080. PDFJS.cMapUrl = (PDFJS.cMapUrl === undefined ? null : PDFJS.cMapUrl);
  2081. /**
  2082. * Specifies if CMaps are binary packed.
  2083. * @var {boolean}
  2084. */
  2085. PDFJS.cMapPacked = PDFJS.cMapPacked === undefined ? false : PDFJS.cMapPacked;
  2086. /*
  2087. * By default fonts are converted to OpenType fonts and loaded via font face
  2088. * rules. If disabled, the font will be rendered using a built in font renderer
  2089. * that constructs the glyphs with primitive path commands.
  2090. * @var {boolean}
  2091. */
  2092. PDFJS.disableFontFace = (PDFJS.disableFontFace === undefined ?
  2093. false : PDFJS.disableFontFace);
  2094. /**
  2095. * Path for image resources, mainly for annotation icons. Include trailing
  2096. * slash.
  2097. * @var {string}
  2098. */
  2099. PDFJS.imageResourcesPath = (PDFJS.imageResourcesPath === undefined ?
  2100. '' : PDFJS.imageResourcesPath);
  2101. /**
  2102. * Disable the web worker and run all code on the main thread. This will happen
  2103. * automatically if the browser doesn't support workers or sending typed arrays
  2104. * to workers.
  2105. * @var {boolean}
  2106. */
  2107. PDFJS.disableWorker = (PDFJS.disableWorker === undefined ?
  2108. false : PDFJS.disableWorker);
  2109. /**
  2110. * Path and filename of the worker file. Required when the worker is enabled in
  2111. * development mode. If unspecified in the production build, the worker will be
  2112. * loaded based on the location of the pdf.js file.
  2113. * @var {string}
  2114. */
  2115. PDFJS.workerSrc = (PDFJS.workerSrc === undefined ? null : PDFJS.workerSrc);
  2116. /**
  2117. * Disable range request loading of PDF files. When enabled and if the server
  2118. * supports partial content requests then the PDF will be fetched in chunks.
  2119. * Enabled (false) by default.
  2120. * @var {boolean}
  2121. */
  2122. PDFJS.disableRange = (PDFJS.disableRange === undefined ?
  2123. false : PDFJS.disableRange);
  2124. /**
  2125. * Disable pre-fetching of PDF file data. When range requests are enabled PDF.js
  2126. * will automatically keep fetching more data even if it isn't needed to display
  2127. * the current page. This default behavior can be disabled.
  2128. * @var {boolean}
  2129. */
  2130. PDFJS.disableAutoFetch = (PDFJS.disableAutoFetch === undefined ?
  2131. false : PDFJS.disableAutoFetch);
  2132. /**
  2133. * Enables special hooks for debugging PDF.js.
  2134. * @var {boolean}
  2135. */
  2136. PDFJS.pdfBug = (PDFJS.pdfBug === undefined ? false : PDFJS.pdfBug);
  2137. /**
  2138. * Enables transfer usage in postMessage for ArrayBuffers.
  2139. * @var {boolean}
  2140. */
  2141. PDFJS.postMessageTransfers = (PDFJS.postMessageTransfers === undefined ?
  2142. true : PDFJS.postMessageTransfers);
  2143. /**
  2144. * Disables URL.createObjectURL usage.
  2145. * @var {boolean}
  2146. */
  2147. PDFJS.disableCreateObjectURL = (PDFJS.disableCreateObjectURL === undefined ?
  2148. false : PDFJS.disableCreateObjectURL);
  2149. /**
  2150. * Disables WebGL usage.
  2151. * @var {boolean}
  2152. */
  2153. PDFJS.disableWebGL = (PDFJS.disableWebGL === undefined ?
  2154. true : PDFJS.disableWebGL);
  2155. /**
  2156. * Enables CSS only zooming.
  2157. * @var {boolean}
  2158. */
  2159. PDFJS.useOnlyCssZoom = (PDFJS.useOnlyCssZoom === undefined ?
  2160. false : PDFJS.useOnlyCssZoom);
  2161. /**
  2162. * Controls the logging level.
  2163. * The constants from PDFJS.VERBOSITY_LEVELS should be used:
  2164. * - errors
  2165. * - warnings [default]
  2166. * - infos
  2167. * @var {number}
  2168. */
  2169. PDFJS.verbosity = (PDFJS.verbosity === undefined ?
  2170. PDFJS.VERBOSITY_LEVELS.warnings : PDFJS.verbosity);
  2171. /**
  2172. * Document initialization / loading parameters object.
  2173. *
  2174. * @typedef {Object} DocumentInitParameters
  2175. * @property {string} url - The URL of the PDF.
  2176. * @property {TypedArray} data - A typed array with PDF data.
  2177. * @property {Object} httpHeaders - Basic authentication headers.
  2178. * @property {boolean} withCredentials - Indicates whether or not cross-site
  2179. * Access-Control requests should be made using credentials such as cookies
  2180. * or authorization headers. The default is false.
  2181. * @property {string} password - For decrypting password-protected PDFs.
  2182. * @property {TypedArray} initialData - A typed array with the first portion or
  2183. * all of the pdf data. Used by the extension since some data is already
  2184. * loaded before the switch to range requests.
  2185. */
  2186. /**
  2187. * This is the main entry point for loading a PDF and interacting with it.
  2188. * NOTE: If a URL is used to fetch the PDF data a standard XMLHttpRequest(XHR)
  2189. * is used, which means it must follow the same origin rules that any XHR does
  2190. * e.g. No cross domain requests without CORS.
  2191. *
  2192. * @param {string|TypedArray|DocumentInitParameters} source Can be a url to
  2193. * where a PDF is located, a typed array (Uint8Array) already populated with
  2194. * data or parameter object.
  2195. *
  2196. * @param {Object} pdfDataRangeTransport is optional. It is used if you want
  2197. * to manually serve range requests for data in the PDF. See viewer.js for
  2198. * an example of pdfDataRangeTransport's interface.
  2199. *
  2200. * @param {function} passwordCallback is optional. It is used to request a
  2201. * password if wrong or no password was provided. The callback receives two
  2202. * parameters: function that needs to be called with new password and reason
  2203. * (see {PasswordResponses}).
  2204. *
  2205. * @return {Promise} A promise that is resolved with {@link PDFDocumentProxy}
  2206. * object.
  2207. */
  2208. PDFJS.getDocument = function getDocument(source,
  2209. pdfDataRangeTransport,
  2210. passwordCallback,
  2211. progressCallback) {
  2212. var workerInitializedCapability, workerReadyCapability, transport;
  2213. if (typeof source === 'string') {
  2214. source = { url: source };
  2215. } else if (isArrayBuffer(source)) {
  2216. source = { data: source };
  2217. } else if (typeof source !== 'object') {
  2218. error('Invalid parameter in getDocument, need either Uint8Array, ' +
  2219. 'string or a parameter object');
  2220. }
  2221. if (!source.url && !source.data) {
  2222. error('Invalid parameter array, need either .data or .url');
  2223. }
  2224. // copy/use all keys as is except 'url' -- full path is required
  2225. var params = {};
  2226. for (var key in source) {
  2227. if (key === 'url' && typeof window !== 'undefined') {
  2228. params[key] = combineUrl(window.location.href, source[key]);
  2229. continue;
  2230. }
  2231. params[key] = source[key];
  2232. }
  2233. workerInitializedCapability = createPromiseCapability();
  2234. workerReadyCapability = createPromiseCapability();
  2235. transport = new WorkerTransport(workerInitializedCapability,
  2236. workerReadyCapability, pdfDataRangeTransport,
  2237. progressCallback);
  2238. workerInitializedCapability.promise.then(function transportInitialized() {
  2239. transport.passwordCallback = passwordCallback;
  2240. transport.fetchDocument(params);
  2241. });
  2242. return workerReadyCapability.promise;
  2243. };
  2244. /**
  2245. * Proxy to a PDFDocument in the worker thread. Also, contains commonly used
  2246. * properties that can be read synchronously.
  2247. * @class
  2248. */
  2249. var PDFDocumentProxy = (function PDFDocumentProxyClosure() {
  2250. function PDFDocumentProxy(pdfInfo, transport) {
  2251. this.pdfInfo = pdfInfo;
  2252. this.transport = transport;
  2253. }
  2254. PDFDocumentProxy.prototype = /** @lends PDFDocumentProxy.prototype */ {
  2255. /**
  2256. * @return {number} Total number of pages the PDF contains.
  2257. */
  2258. get numPages() {
  2259. return this.pdfInfo.numPages;
  2260. },
  2261. /**
  2262. * @return {string} A unique ID to identify a PDF. Not guaranteed to be
  2263. * unique.
  2264. */
  2265. get fingerprint() {
  2266. return this.pdfInfo.fingerprint;
  2267. },
  2268. /**
  2269. * @param {number} pageNumber The page number to get. The first page is 1.
  2270. * @return {Promise} A promise that is resolved with a {@link PDFPageProxy}
  2271. * object.
  2272. */
  2273. getPage: function PDFDocumentProxy_getPage(pageNumber) {
  2274. return this.transport.getPage(pageNumber);
  2275. },
  2276. /**
  2277. * @param {{num: number, gen: number}} ref The page reference. Must have
  2278. * the 'num' and 'gen' properties.
  2279. * @return {Promise} A promise that is resolved with the page index that is
  2280. * associated with the reference.
  2281. */
  2282. getPageIndex: function PDFDocumentProxy_getPageIndex(ref) {
  2283. return this.transport.getPageIndex(ref);
  2284. },
  2285. /**
  2286. * @return {Promise} A promise that is resolved with a lookup table for
  2287. * mapping named destinations to reference numbers.
  2288. */
  2289. getDestinations: function PDFDocumentProxy_getDestinations() {
  2290. return this.transport.getDestinations();
  2291. },
  2292. /**
  2293. * @return {Promise} A promise that is resolved with a lookup table for
  2294. * mapping named attachments to their content.
  2295. */
  2296. getAttachments: function PDFDocumentProxy_getAttachments() {
  2297. return this.transport.getAttachments();
  2298. },
  2299. /**
  2300. * @return {Promise} A promise that is resolved with an array of all the
  2301. * JavaScript strings in the name tree.
  2302. */
  2303. getJavaScript: function PDFDocumentProxy_getJavaScript() {
  2304. return this.transport.getJavaScript();
  2305. },
  2306. /**
  2307. * @return {Promise} A promise that is resolved with an {Array} that is a
  2308. * tree outline (if it has one) of the PDF. The tree is in the format of:
  2309. * [
  2310. * {
  2311. * title: string,
  2312. * bold: boolean,
  2313. * italic: boolean,
  2314. * color: rgb array,
  2315. * dest: dest obj,
  2316. * items: array of more items like this
  2317. * },
  2318. * ...
  2319. * ].
  2320. */
  2321. getOutline: function PDFDocumentProxy_getOutline() {
  2322. return this.transport.getOutline();
  2323. },
  2324. /**
  2325. * @return {Promise} A promise that is resolved with an {Object} that has
  2326. * info and metadata properties. Info is an {Object} filled with anything
  2327. * available in the information dictionary and similarly metadata is a
  2328. * {Metadata} object with information from the metadata section of the PDF.
  2329. */
  2330. getMetadata: function PDFDocumentProxy_getMetadata() {
  2331. return this.transport.getMetadata();
  2332. },
  2333. /**
  2334. * @return {Promise} A promise that is resolved with a TypedArray that has
  2335. * the raw data from the PDF.
  2336. */
  2337. getData: function PDFDocumentProxy_getData() {
  2338. return this.transport.getData();
  2339. },
  2340. /**
  2341. * @return {Promise} A promise that is resolved when the document's data
  2342. * is loaded. It is resolved with an {Object} that contains the length
  2343. * property that indicates size of the PDF data in bytes.
  2344. */
  2345. getDownloadInfo: function PDFDocumentProxy_getDownloadInfo() {
  2346. return this.transport.downloadInfoCapability.promise;
  2347. },
  2348. /**
  2349. * Cleans up resources allocated by the document, e.g. created @font-face.
  2350. */
  2351. cleanup: function PDFDocumentProxy_cleanup() {
  2352. this.transport.startCleanup();
  2353. },
  2354. /**
  2355. * Destroys current document instance and terminates worker.
  2356. */
  2357. destroy: function PDFDocumentProxy_destroy() {
  2358. this.transport.destroy();
  2359. }
  2360. };
  2361. return PDFDocumentProxy;
  2362. })();
  2363. /**
  2364. * Page text content.
  2365. *
  2366. * @typedef {Object} TextContent
  2367. * @property {array} items - array of {@link TextItem}
  2368. * @property {Object} styles - {@link TextStyles} objects, indexed by font
  2369. * name.
  2370. */
  2371. /**
  2372. * Page text content part.
  2373. *
  2374. * @typedef {Object} TextItem
  2375. * @property {string} str - text content.
  2376. * @property {string} dir - text direction: 'ttb', 'ltr' or 'rtl'.
  2377. * @property {array} transform - transformation matrix.
  2378. * @property {number} width - width in device space.
  2379. * @property {number} height - height in device space.
  2380. * @property {string} fontName - font name used by pdf.js for converted font.
  2381. */
  2382. /**
  2383. * Text style.
  2384. *
  2385. * @typedef {Object} TextStyle
  2386. * @property {number} ascent - font ascent.
  2387. * @property {number} descent - font descent.
  2388. * @property {boolean} vertical - text is in vertical mode.
  2389. * @property {string} fontFamily - possible font family
  2390. */
  2391. /**
  2392. * Page render parameters.
  2393. *
  2394. * @typedef {Object} RenderParameters
  2395. * @property {Object} canvasContext - A 2D context of a DOM Canvas object.
  2396. * @property {PDFJS.PageViewport} viewport - Rendering viewport obtained by
  2397. * calling of PDFPage.getViewport method.
  2398. * @property {string} intent - Rendering intent, can be 'display' or 'print'
  2399. * (default value is 'display').
  2400. * @property {Object} imageLayer - (optional) An object that has beginLayout,
  2401. * endLayout and appendImage functions.
  2402. * @property {function} continueCallback - (optional) A function that will be
  2403. * called each time the rendering is paused. To continue
  2404. * rendering call the function that is the first argument
  2405. * to the callback.
  2406. */
  2407. /**
  2408. * Proxy to a PDFPage in the worker thread.
  2409. * @class
  2410. */
  2411. var PDFPageProxy = (function PDFPageProxyClosure() {
  2412. function PDFPageProxy(pageIndex, pageInfo, transport) {
  2413. this.pageIndex = pageIndex;
  2414. this.pageInfo = pageInfo;
  2415. this.transport = transport;
  2416. this.stats = new StatTimer();
  2417. this.stats.enabled = !!globalScope.PDFJS.enableStats;
  2418. this.commonObjs = transport.commonObjs;
  2419. this.objs = new PDFObjects();
  2420. this.cleanupAfterRender = false;
  2421. this.pendingDestroy = false;
  2422. this.intentStates = {};
  2423. }
  2424. PDFPageProxy.prototype = /** @lends PDFPageProxy.prototype */ {
  2425. /**
  2426. * @return {number} Page number of the page. First page is 1.
  2427. */
  2428. get pageNumber() {
  2429. return this.pageIndex + 1;
  2430. },
  2431. /**
  2432. * @return {number} The number of degrees the page is rotated clockwise.
  2433. */
  2434. get rotate() {
  2435. return this.pageInfo.rotate;
  2436. },
  2437. /**
  2438. * @return {Object} The reference that points to this page. It has 'num' and
  2439. * 'gen' properties.
  2440. */
  2441. get ref() {
  2442. return this.pageInfo.ref;
  2443. },
  2444. /**
  2445. * @return {Array} An array of the visible portion of the PDF page in the
  2446. * user space units - [x1, y1, x2, y2].
  2447. */
  2448. get view() {
  2449. return this.pageInfo.view;
  2450. },
  2451. /**
  2452. * @param {number} scale The desired scale of the viewport.
  2453. * @param {number} rotate Degrees to rotate the viewport. If omitted this
  2454. * defaults to the page rotation.
  2455. * @return {PDFJS.PageViewport} Contains 'width' and 'height' properties
  2456. * along with transforms required for rendering.
  2457. */
  2458. getViewport: function PDFPageProxy_getViewport(scale, rotate) {
  2459. if (arguments.length < 2) {
  2460. rotate = this.rotate;
  2461. }
  2462. return new PDFJS.PageViewport(this.view, scale, rotate, 0, 0);
  2463. },
  2464. /**
  2465. * @return {Promise} A promise that is resolved with an {Array} of the
  2466. * annotation objects.
  2467. */
  2468. getAnnotations: function PDFPageProxy_getAnnotations() {
  2469. if (this.annotationsPromise) {
  2470. return this.annotationsPromise;
  2471. }
  2472. var promise = this.transport.getAnnotations(this.pageIndex);
  2473. this.annotationsPromise = promise;
  2474. return promise;
  2475. },
  2476. /**
  2477. * Begins the process of rendering a page to the desired context.
  2478. * @param {RenderParameters} params Page render parameters.
  2479. * @return {RenderTask} An object that contains the promise, which
  2480. * is resolved when the page finishes rendering.
  2481. */
  2482. render: function PDFPageProxy_render(params) {
  2483. var stats = this.stats;
  2484. stats.time('Overall');
  2485. // If there was a pending destroy cancel it so no cleanup happens during
  2486. // this call to render.
  2487. this.pendingDestroy = false;
  2488. var renderingIntent = ('intent' in params ?
  2489. (params.intent == 'print' ? 'print' : 'display') : 'display');
  2490. if (!this.intentStates[renderingIntent]) {
  2491. this.intentStates[renderingIntent] = {};
  2492. }
  2493. var intentState = this.intentStates[renderingIntent];
  2494. // If there's no displayReadyCapability yet, then the operatorList
  2495. // was never requested before. Make the request and create the promise.
  2496. if (!intentState.displayReadyCapability) {
  2497. intentState.receivingOperatorList = true;
  2498. intentState.displayReadyCapability = createPromiseCapability();
  2499. intentState.operatorList = {
  2500. fnArray: [],
  2501. argsArray: [],
  2502. lastChunk: false
  2503. };
  2504. this.stats.time('Page Request');
  2505. this.transport.messageHandler.send('RenderPageRequest', {
  2506. pageIndex: this.pageNumber - 1,
  2507. intent: renderingIntent
  2508. });
  2509. }
  2510. var internalRenderTask = new InternalRenderTask(complete, params,
  2511. this.objs,
  2512. this.commonObjs,
  2513. intentState.operatorList,
  2514. this.pageNumber);
  2515. if (!intentState.renderTasks) {
  2516. intentState.renderTasks = [];
  2517. }
  2518. intentState.renderTasks.push(internalRenderTask);
  2519. var renderTask = new RenderTask(internalRenderTask);
  2520. var self = this;
  2521. intentState.displayReadyCapability.promise.then(
  2522. function pageDisplayReadyPromise(transparency) {
  2523. if (self.pendingDestroy) {
  2524. complete();
  2525. return;
  2526. }
  2527. stats.time('Rendering');
  2528. internalRenderTask.initalizeGraphics(transparency);
  2529. internalRenderTask.operatorListChanged();
  2530. },
  2531. function pageDisplayReadPromiseError(reason) {
  2532. complete(reason);
  2533. }
  2534. );
  2535. function complete(error) {
  2536. var i = intentState.renderTasks.indexOf(internalRenderTask);
  2537. if (i >= 0) {
  2538. intentState.renderTasks.splice(i, 1);
  2539. }
  2540. if (self.cleanupAfterRender) {
  2541. self.pendingDestroy = true;
  2542. }
  2543. self._tryDestroy();
  2544. if (error) {
  2545. internalRenderTask.capability.reject(error);
  2546. } else {
  2547. internalRenderTask.capability.resolve();
  2548. }
  2549. stats.timeEnd('Rendering');
  2550. stats.timeEnd('Overall');
  2551. }
  2552. return renderTask;
  2553. },
  2554. /**
  2555. * @return {Promise} That is resolved a {@link TextContent}
  2556. * object that represent the page text content.
  2557. */
  2558. getTextContent: function PDFPageProxy_getTextContent() {
  2559. return this.transport.messageHandler.sendWithPromise('GetTextContent', {
  2560. pageIndex: this.pageNumber - 1
  2561. });
  2562. },
  2563. /**
  2564. * Destroys resources allocated by the page.
  2565. */
  2566. destroy: function PDFPageProxy_destroy() {
  2567. this.pendingDestroy = true;
  2568. this._tryDestroy();
  2569. },
  2570. /**
  2571. * For internal use only. Attempts to clean up if rendering is in a state
  2572. * where that's possible.
  2573. * @ignore
  2574. */
  2575. _tryDestroy: function PDFPageProxy__destroy() {
  2576. if (!this.pendingDestroy ||
  2577. Object.keys(this.intentStates).some(function(intent) {
  2578. var intentState = this.intentStates[intent];
  2579. return (intentState.renderTasks.length !== 0 ||
  2580. intentState.receivingOperatorList);
  2581. }, this)) {
  2582. return;
  2583. }
  2584. Object.keys(this.intentStates).forEach(function(intent) {
  2585. delete this.intentStates[intent];
  2586. }, this);
  2587. this.objs.clear();
  2588. this.annotationsPromise = null;
  2589. this.pendingDestroy = false;
  2590. },
  2591. /**
  2592. * For internal use only.
  2593. * @ignore
  2594. */
  2595. _startRenderPage: function PDFPageProxy_startRenderPage(transparency,
  2596. intent) {
  2597. var intentState = this.intentStates[intent];
  2598. intentState.displayReadyCapability.resolve(transparency);
  2599. },
  2600. /**
  2601. * For internal use only.
  2602. * @ignore
  2603. */
  2604. _renderPageChunk: function PDFPageProxy_renderPageChunk(operatorListChunk,
  2605. intent) {
  2606. var intentState = this.intentStates[intent];
  2607. var i, ii;
  2608. // Add the new chunk to the current operator list.
  2609. for (i = 0, ii = operatorListChunk.length; i < ii; i++) {
  2610. intentState.operatorList.fnArray.push(operatorListChunk.fnArray[i]);
  2611. intentState.operatorList.argsArray.push(
  2612. operatorListChunk.argsArray[i]);
  2613. }
  2614. intentState.operatorList.lastChunk = operatorListChunk.lastChunk;
  2615. // Notify all the rendering tasks there are more operators to be consumed.
  2616. for (i = 0; i < intentState.renderTasks.length; i++) {
  2617. intentState.renderTasks[i].operatorListChanged();
  2618. }
  2619. if (operatorListChunk.lastChunk) {
  2620. intentState.receivingOperatorList = false;
  2621. this._tryDestroy();
  2622. }
  2623. }
  2624. };
  2625. return PDFPageProxy;
  2626. })();
  2627. /**
  2628. * For internal use only.
  2629. * @ignore
  2630. */
  2631. var WorkerTransport = (function WorkerTransportClosure() {
  2632. function WorkerTransport(workerInitializedCapability, workerReadyCapability,
  2633. pdfDataRangeTransport, progressCallback) {
  2634. this.pdfDataRangeTransport = pdfDataRangeTransport;
  2635. this.workerReadyCapability = workerReadyCapability;
  2636. this.progressCallback = progressCallback;
  2637. this.commonObjs = new PDFObjects();
  2638. this.pageCache = [];
  2639. this.pagePromises = [];
  2640. this.downloadInfoCapability = createPromiseCapability();
  2641. this.passwordCallback = null;
  2642. // If worker support isn't disabled explicit and the browser has worker
  2643. // support, create a new web worker and test if it/the browser fullfills
  2644. // all requirements to run parts of pdf.js in a web worker.
  2645. // Right now, the requirement is, that an Uint8Array is still an Uint8Array
  2646. // as it arrives on the worker. Chrome added this with version 15.
  2647. // Either workers are disabled, not supported or have thrown an exception.
  2648. // Thus, we fallback to a faked worker.
  2649. globalScope.PDFJS.disableWorker = true;
  2650. this.loadFakeWorkerFiles().then(function() {
  2651. this.setupFakeWorker();
  2652. workerInitializedCapability.resolve();
  2653. }.bind(this));
  2654. }
  2655. WorkerTransport.prototype = {
  2656. destroy: function WorkerTransport_destroy() {
  2657. this.pageCache = [];
  2658. this.pagePromises = [];
  2659. var self = this;
  2660. this.messageHandler.sendWithPromise('Terminate', null).then(function () {
  2661. FontLoader.clear();
  2662. if (self.worker) {
  2663. self.worker.terminate();
  2664. }
  2665. });
  2666. },
  2667. loadFakeWorkerFiles: function WorkerTransport_loadFakeWorkerFiles() {
  2668. if (!PDFJS.fakeWorkerFilesLoadedCapability) {
  2669. PDFJS.fakeWorkerFilesLoadedCapability = createPromiseCapability();
  2670. // In the developer build load worker_loader which in turn loads all the
  2671. // other files and resolves the promise. In production only the
  2672. // pdf.worker.js file is needed.
  2673. PDFJS.fakeWorkerFilesLoadedCapability.resolve();
  2674. }
  2675. return PDFJS.fakeWorkerFilesLoadedCapability.promise;
  2676. },
  2677. setupFakeWorker: function WorkerTransport_setupFakeWorker() {
  2678. warn('Setting up fake worker.');
  2679. // If we don't use a worker, just post/sendMessage to the main thread.
  2680. var fakeWorker = {
  2681. postMessage: function WorkerTransport_postMessage(obj) {
  2682. fakeWorker.onmessage({data: obj});
  2683. },
  2684. terminate: function WorkerTransport_terminate() {}
  2685. };
  2686. var messageHandler = new MessageHandler('main', fakeWorker);
  2687. this.setupMessageHandler(messageHandler);
  2688. // If the main thread is our worker, setup the handling for the messages
  2689. // the main thread sends to it self.
  2690. PDFJS.WorkerMessageHandler.setup(messageHandler);
  2691. },
  2692. setupMessageHandler:
  2693. function WorkerTransport_setupMessageHandler(messageHandler) {
  2694. this.messageHandler = messageHandler;
  2695. function updatePassword(password) {
  2696. messageHandler.send('UpdatePassword', password);
  2697. }
  2698. var pdfDataRangeTransport = this.pdfDataRangeTransport;
  2699. if (pdfDataRangeTransport) {
  2700. pdfDataRangeTransport.addRangeListener(function(begin, chunk) {
  2701. messageHandler.send('OnDataRange', {
  2702. begin: begin,
  2703. chunk: chunk
  2704. });
  2705. });
  2706. pdfDataRangeTransport.addProgressListener(function(loaded) {
  2707. messageHandler.send('OnDataProgress', {
  2708. loaded: loaded
  2709. });
  2710. });
  2711. messageHandler.on('RequestDataRange',
  2712. function transportDataRange(data) {
  2713. pdfDataRangeTransport.requestDataRange(data.begin, data.end);
  2714. }, this);
  2715. }
  2716. messageHandler.on('GetDoc', function transportDoc(data) {
  2717. var pdfInfo = data.pdfInfo;
  2718. this.numPages = data.pdfInfo.numPages;
  2719. var pdfDocument = new PDFDocumentProxy(pdfInfo, this);
  2720. this.pdfDocument = pdfDocument;
  2721. this.workerReadyCapability.resolve(pdfDocument);
  2722. }, this);
  2723. messageHandler.on('NeedPassword', function transportPassword(data) {
  2724. if (this.passwordCallback) {
  2725. return this.passwordCallback(updatePassword,
  2726. PasswordResponses.NEED_PASSWORD);
  2727. }
  2728. this.workerReadyCapability.reject(data.exception.message,
  2729. data.exception);
  2730. }, this);
  2731. messageHandler.on('IncorrectPassword', function transportBadPass(data) {
  2732. if (this.passwordCallback) {
  2733. return this.passwordCallback(updatePassword,
  2734. PasswordResponses.INCORRECT_PASSWORD);
  2735. }
  2736. this.workerReadyCapability.reject(data.exception.message,
  2737. data.exception);
  2738. }, this);
  2739. messageHandler.on('InvalidPDF', function transportInvalidPDF(data) {
  2740. this.workerReadyCapability.reject(data.exception.name, data.exception);
  2741. }, this);
  2742. messageHandler.on('MissingPDF', function transportMissingPDF(data) {
  2743. this.workerReadyCapability.reject(data.exception.message,
  2744. data.exception);
  2745. }, this);
  2746. messageHandler.on('UnknownError', function transportUnknownError(data) {
  2747. this.workerReadyCapability.reject(data.exception.message,
  2748. data.exception);
  2749. }, this);
  2750. messageHandler.on('DataLoaded', function transportPage(data) {
  2751. this.downloadInfoCapability.resolve(data);
  2752. }, this);
  2753. messageHandler.on('StartRenderPage', function transportRender(data) {
  2754. var page = this.pageCache[data.pageIndex];
  2755. page.stats.timeEnd('Page Request');
  2756. page._startRenderPage(data.transparency, data.intent);
  2757. }, this);
  2758. messageHandler.on('RenderPageChunk', function transportRender(data) {
  2759. var page = this.pageCache[data.pageIndex];
  2760. page._renderPageChunk(data.operatorList, data.intent);
  2761. }, this);
  2762. messageHandler.on('commonobj', function transportObj(data) {
  2763. var id = data[0];
  2764. var type = data[1];
  2765. if (this.commonObjs.hasData(id)) {
  2766. return;
  2767. }
  2768. switch (type) {
  2769. case 'Font':
  2770. var exportedData = data[2];
  2771. var font;
  2772. if ('error' in exportedData) {
  2773. var error = exportedData.error;
  2774. warn('Error during font loading: ' + error);
  2775. this.commonObjs.resolve(id, error);
  2776. break;
  2777. } else {
  2778. font = new FontFace(exportedData);
  2779. }
  2780. FontLoader.bind(
  2781. [font],
  2782. function fontReady(fontObjs) {
  2783. this.commonObjs.resolve(id, font);
  2784. }.bind(this)
  2785. );
  2786. break;
  2787. case 'FontPath':
  2788. this.commonObjs.resolve(id, data[2]);
  2789. break;
  2790. default:
  2791. error('Got unknown common object type ' + type);
  2792. }
  2793. }, this);
  2794. messageHandler.on('obj', function transportObj(data) {
  2795. var id = data[0];
  2796. var pageIndex = data[1];
  2797. var type = data[2];
  2798. var pageProxy = this.pageCache[pageIndex];
  2799. var imageData;
  2800. if (pageProxy.objs.hasData(id)) {
  2801. return;
  2802. }
  2803. switch (type) {
  2804. case 'JpegStream':
  2805. imageData = data[3];
  2806. loadJpegStream(id, imageData, pageProxy.objs);
  2807. break;
  2808. case 'Image':
  2809. imageData = data[3];
  2810. pageProxy.objs.resolve(id, imageData);
  2811. // heuristics that will allow not to store large data
  2812. var MAX_IMAGE_SIZE_TO_STORE = 8000000;
  2813. if (imageData && 'data' in imageData &&
  2814. imageData.data.length > MAX_IMAGE_SIZE_TO_STORE) {
  2815. pageProxy.cleanupAfterRender = true;
  2816. }
  2817. break;
  2818. default:
  2819. error('Got unknown object type ' + type);
  2820. }
  2821. }, this);
  2822. messageHandler.on('DocProgress', function transportDocProgress(data) {
  2823. if (this.progressCallback) {
  2824. this.progressCallback({
  2825. loaded: data.loaded,
  2826. total: data.total
  2827. });
  2828. }
  2829. }, this);
  2830. messageHandler.on('DocError', function transportDocError(data) {
  2831. this.workerReadyCapability.reject(data);
  2832. }, this);
  2833. messageHandler.on('PageError', function transportError(data) {
  2834. var page = this.pageCache[data.pageNum - 1];
  2835. var intentState = page.intentStates[data.intent];
  2836. if (intentState.displayReadyCapability.promise) {
  2837. intentState.displayReadyCapability.reject(data.error);
  2838. } else {
  2839. error(data.error);
  2840. }
  2841. }, this);
  2842. messageHandler.on('JpegDecode', function(data) {
  2843. var imageUrl = data[0];
  2844. var components = data[1];
  2845. if (components != 3 && components != 1) {
  2846. return Promise.reject(
  2847. new Error('Only 3 components or 1 component can be returned'));
  2848. }
  2849. return new Promise(function (resolve, reject) {
  2850. var img = new Image();
  2851. img.onload = function () {
  2852. var width = img.width;
  2853. var height = img.height;
  2854. var size = width * height;
  2855. var rgbaLength = size * 4;
  2856. var buf = new Uint8Array(size * components);
  2857. var tmpCanvas = createScratchCanvas(width, height);
  2858. var tmpCtx = tmpCanvas.getContext('2d');
  2859. tmpCtx.drawImage(img, 0, 0);
  2860. var data = tmpCtx.getImageData(0, 0, width, height).data;
  2861. var i, j;
  2862. if (components == 3) {
  2863. for (i = 0, j = 0; i < rgbaLength; i += 4, j += 3) {
  2864. buf[j] = data[i];
  2865. buf[j + 1] = data[i + 1];
  2866. buf[j + 2] = data[i + 2];
  2867. }
  2868. } else if (components == 1) {
  2869. for (i = 0, j = 0; i < rgbaLength; i += 4, j++) {
  2870. buf[j] = data[i];
  2871. }
  2872. }
  2873. resolve({ data: buf, width: width, height: height});
  2874. };
  2875. img.onerror = function () {
  2876. reject(new Error('JpegDecode failed to load image'));
  2877. };
  2878. img.src = imageUrl;
  2879. });
  2880. });
  2881. },
  2882. fetchDocument: function WorkerTransport_fetchDocument(source) {
  2883. source.disableAutoFetch = PDFJS.disableAutoFetch;
  2884. source.chunkedViewerLoading = !!this.pdfDataRangeTransport;
  2885. this.messageHandler.send('GetDocRequest', {
  2886. source: source,
  2887. disableRange: PDFJS.disableRange,
  2888. maxImageSize: PDFJS.maxImageSize,
  2889. cMapUrl: PDFJS.cMapUrl,
  2890. cMapPacked: PDFJS.cMapPacked,
  2891. disableFontFace: PDFJS.disableFontFace,
  2892. disableCreateObjectURL: PDFJS.disableCreateObjectURL,
  2893. verbosity: PDFJS.verbosity
  2894. });
  2895. },
  2896. getData: function WorkerTransport_getData() {
  2897. return this.messageHandler.sendWithPromise('GetData', null);
  2898. },
  2899. getPage: function WorkerTransport_getPage(pageNumber, capability) {
  2900. if (pageNumber <= 0 || pageNumber > this.numPages ||
  2901. (pageNumber|0) !== pageNumber) {
  2902. return Promise.reject(new Error('Invalid page request'));
  2903. }
  2904. var pageIndex = pageNumber - 1;
  2905. if (pageIndex in this.pagePromises) {
  2906. return this.pagePromises[pageIndex];
  2907. }
  2908. var promise = this.messageHandler.sendWithPromise('GetPage', {
  2909. pageIndex: pageIndex
  2910. }).then(function (pageInfo) {
  2911. var page = new PDFPageProxy(pageIndex, pageInfo, this);
  2912. this.pageCache[pageIndex] = page;
  2913. return page;
  2914. }.bind(this));
  2915. this.pagePromises[pageIndex] = promise;
  2916. return promise;
  2917. },
  2918. getPageIndex: function WorkerTransport_getPageIndexByRef(ref) {
  2919. return this.messageHandler.sendWithPromise('GetPageIndex', { ref: ref });
  2920. },
  2921. getAnnotations: function WorkerTransport_getAnnotations(pageIndex) {
  2922. return this.messageHandler.sendWithPromise('GetAnnotations',
  2923. { pageIndex: pageIndex });
  2924. },
  2925. getDestinations: function WorkerTransport_getDestinations() {
  2926. return this.messageHandler.sendWithPromise('GetDestinations', null);
  2927. },
  2928. getAttachments: function WorkerTransport_getAttachments() {
  2929. return this.messageHandler.sendWithPromise('GetAttachments', null);
  2930. },
  2931. getJavaScript: function WorkerTransport_getJavaScript() {
  2932. return this.messageHandler.sendWithPromise('GetJavaScript', null);
  2933. },
  2934. getOutline: function WorkerTransport_getOutline() {
  2935. return this.messageHandler.sendWithPromise('GetOutline', null);
  2936. },
  2937. getMetadata: function WorkerTransport_getMetadata() {
  2938. return this.messageHandler.sendWithPromise('GetMetadata', null).
  2939. then(function transportMetadata(results) {
  2940. return {
  2941. info: results[0],
  2942. metadata: (results[1] ? new PDFJS.Metadata(results[1]) : null)
  2943. };
  2944. });
  2945. },
  2946. startCleanup: function WorkerTransport_startCleanup() {
  2947. this.messageHandler.sendWithPromise('Cleanup', null).
  2948. then(function endCleanup() {
  2949. for (var i = 0, ii = this.pageCache.length; i < ii; i++) {
  2950. var page = this.pageCache[i];
  2951. if (page) {
  2952. page.destroy();
  2953. }
  2954. }
  2955. this.commonObjs.clear();
  2956. FontLoader.clear();
  2957. }.bind(this));
  2958. }
  2959. };
  2960. return WorkerTransport;
  2961. })();
  2962. /**
  2963. * A PDF document and page is built of many objects. E.g. there are objects
  2964. * for fonts, images, rendering code and such. These objects might get processed
  2965. * inside of a worker. The `PDFObjects` implements some basic functions to
  2966. * manage these objects.
  2967. * @ignore
  2968. */
  2969. var PDFObjects = (function PDFObjectsClosure() {
  2970. function PDFObjects() {
  2971. this.objs = {};
  2972. }
  2973. PDFObjects.prototype = {
  2974. /**
  2975. * Internal function.
  2976. * Ensures there is an object defined for `objId`.
  2977. */
  2978. ensureObj: function PDFObjects_ensureObj(objId) {
  2979. if (this.objs[objId]) {
  2980. return this.objs[objId];
  2981. }
  2982. var obj = {
  2983. capability: createPromiseCapability(),
  2984. data: null,
  2985. resolved: false
  2986. };
  2987. this.objs[objId] = obj;
  2988. return obj;
  2989. },
  2990. /**
  2991. * If called *without* callback, this returns the data of `objId` but the
  2992. * object needs to be resolved. If it isn't, this function throws.
  2993. *
  2994. * If called *with* a callback, the callback is called with the data of the
  2995. * object once the object is resolved. That means, if you call this
  2996. * function and the object is already resolved, the callback gets called
  2997. * right away.
  2998. */
  2999. get: function PDFObjects_get(objId, callback) {
  3000. // If there is a callback, then the get can be async and the object is
  3001. // not required to be resolved right now
  3002. if (callback) {
  3003. this.ensureObj(objId).capability.promise.then(callback);
  3004. return null;
  3005. }
  3006. // If there isn't a callback, the user expects to get the resolved data
  3007. // directly.
  3008. var obj = this.objs[objId];
  3009. // If there isn't an object yet or the object isn't resolved, then the
  3010. // data isn't ready yet!
  3011. if (!obj || !obj.resolved) {
  3012. error('Requesting object that isn\'t resolved yet ' + objId);
  3013. }
  3014. return obj.data;
  3015. },
  3016. /**
  3017. * Resolves the object `objId` with optional `data`.
  3018. */
  3019. resolve: function PDFObjects_resolve(objId, data) {
  3020. var obj = this.ensureObj(objId);
  3021. obj.resolved = true;
  3022. obj.data = data;
  3023. obj.capability.resolve(data);
  3024. },
  3025. isResolved: function PDFObjects_isResolved(objId) {
  3026. var objs = this.objs;
  3027. if (!objs[objId]) {
  3028. return false;
  3029. } else {
  3030. return objs[objId].resolved;
  3031. }
  3032. },
  3033. hasData: function PDFObjects_hasData(objId) {
  3034. return this.isResolved(objId);
  3035. },
  3036. /**
  3037. * Returns the data of `objId` if object exists, null otherwise.
  3038. */
  3039. getData: function PDFObjects_getData(objId) {
  3040. var objs = this.objs;
  3041. if (!objs[objId] || !objs[objId].resolved) {
  3042. return null;
  3043. } else {
  3044. return objs[objId].data;
  3045. }
  3046. },
  3047. clear: function PDFObjects_clear() {
  3048. this.objs = {};
  3049. }
  3050. };
  3051. return PDFObjects;
  3052. })();
  3053. /**
  3054. * Allows controlling of the rendering tasks.
  3055. * @class
  3056. */
  3057. var RenderTask = (function RenderTaskClosure() {
  3058. function RenderTask(internalRenderTask) {
  3059. this.internalRenderTask = internalRenderTask;
  3060. /**
  3061. * Promise for rendering task completion.
  3062. * @type {Promise}
  3063. */
  3064. this.promise = this.internalRenderTask.capability.promise;
  3065. }
  3066. RenderTask.prototype = /** @lends RenderTask.prototype */ {
  3067. /**
  3068. * Cancels the rendering task. If the task is currently rendering it will
  3069. * not be cancelled until graphics pauses with a timeout. The promise that
  3070. * this object extends will resolved when cancelled.
  3071. */
  3072. cancel: function RenderTask_cancel() {
  3073. this.internalRenderTask.cancel();
  3074. },
  3075. /**
  3076. * Registers callback to indicate the rendering task completion.
  3077. *
  3078. * @param {function} onFulfilled The callback for the rendering completion.
  3079. * @param {function} onRejected The callback for the rendering failure.
  3080. * @return {Promise} A promise that is resolved after the onFulfilled or
  3081. * onRejected callback.
  3082. */
  3083. then: function RenderTask_then(onFulfilled, onRejected) {
  3084. return this.promise.then(onFulfilled, onRejected);
  3085. }
  3086. };
  3087. return RenderTask;
  3088. })();
  3089. /**
  3090. * For internal use only.
  3091. * @ignore
  3092. */
  3093. var InternalRenderTask = (function InternalRenderTaskClosure() {
  3094. function InternalRenderTask(callback, params, objs, commonObjs, operatorList,
  3095. pageNumber) {
  3096. this.callback = callback;
  3097. this.params = params;
  3098. this.objs = objs;
  3099. this.commonObjs = commonObjs;
  3100. this.operatorListIdx = null;
  3101. this.operatorList = operatorList;
  3102. this.pageNumber = pageNumber;
  3103. this.running = false;
  3104. this.graphicsReadyCallback = null;
  3105. this.graphicsReady = false;
  3106. this.cancelled = false;
  3107. this.capability = createPromiseCapability();
  3108. // caching this-bound methods
  3109. this._continueBound = this._continue.bind(this);
  3110. this._scheduleNextBound = this._scheduleNext.bind(this);
  3111. this._nextBound = this._next.bind(this);
  3112. }
  3113. InternalRenderTask.prototype = {
  3114. initalizeGraphics:
  3115. function InternalRenderTask_initalizeGraphics(transparency) {
  3116. if (this.cancelled) {
  3117. return;
  3118. }
  3119. if (PDFJS.pdfBug && 'StepperManager' in globalScope &&
  3120. globalScope.StepperManager.enabled) {
  3121. this.stepper = globalScope.StepperManager.create(this.pageNumber - 1);
  3122. this.stepper.init(this.operatorList);
  3123. this.stepper.nextBreakPoint = this.stepper.getNextBreakPoint();
  3124. }
  3125. var params = this.params;
  3126. this.gfx = new CanvasGraphics(params.canvasContext, this.commonObjs,
  3127. this.objs, params.imageLayer);
  3128. this.gfx.beginDrawing(params.viewport, transparency);
  3129. this.operatorListIdx = 0;
  3130. this.graphicsReady = true;
  3131. if (this.graphicsReadyCallback) {
  3132. this.graphicsReadyCallback();
  3133. }
  3134. },
  3135. cancel: function InternalRenderTask_cancel() {
  3136. this.running = false;
  3137. this.cancelled = true;
  3138. this.callback('cancelled');
  3139. },
  3140. operatorListChanged: function InternalRenderTask_operatorListChanged() {
  3141. if (!this.graphicsReady) {
  3142. if (!this.graphicsReadyCallback) {
  3143. this.graphicsReadyCallback = this._continueBound;
  3144. }
  3145. return;
  3146. }
  3147. if (this.stepper) {
  3148. this.stepper.updateOperatorList(this.operatorList);
  3149. }
  3150. if (this.running) {
  3151. return;
  3152. }
  3153. this._continue();
  3154. },
  3155. _continue: function InternalRenderTask__continue() {
  3156. this.running = true;
  3157. if (this.cancelled) {
  3158. return;
  3159. }
  3160. if (this.params.continueCallback) {
  3161. this.params.continueCallback(this._scheduleNextBound);
  3162. } else {
  3163. this._scheduleNext();
  3164. }
  3165. },
  3166. _scheduleNext: function InternalRenderTask__scheduleNext() {
  3167. window.requestAnimationFrame(this._nextBound);
  3168. },
  3169. _next: function InternalRenderTask__next() {
  3170. if (this.cancelled) {
  3171. return;
  3172. }
  3173. this.operatorListIdx = this.gfx.executeOperatorList(this.operatorList,
  3174. this.operatorListIdx,
  3175. this._continueBound,
  3176. this.stepper);
  3177. if (this.operatorListIdx === this.operatorList.argsArray.length) {
  3178. this.running = false;
  3179. if (this.operatorList.lastChunk) {
  3180. this.gfx.endDrawing();
  3181. this.callback();
  3182. }
  3183. }
  3184. }
  3185. };
  3186. return InternalRenderTask;
  3187. })();
  3188. var Metadata = PDFJS.Metadata = (function MetadataClosure() {
  3189. function fixMetadata(meta) {
  3190. return meta.replace(/>\\376\\377([^<]+)/g, function(all, codes) {
  3191. var bytes = codes.replace(/\\([0-3])([0-7])([0-7])/g,
  3192. function(code, d1, d2, d3) {
  3193. return String.fromCharCode(d1 * 64 + d2 * 8 + d3 * 1);
  3194. });
  3195. var chars = '';
  3196. for (var i = 0; i < bytes.length; i += 2) {
  3197. var code = bytes.charCodeAt(i) * 256 + bytes.charCodeAt(i + 1);
  3198. chars += code >= 32 && code < 127 && code != 60 && code != 62 &&
  3199. code != 38 && false ? String.fromCharCode(code) :
  3200. '&#x' + (0x10000 + code).toString(16).substring(1) + ';';
  3201. }
  3202. return '>' + chars;
  3203. });
  3204. }
  3205. function Metadata(meta) {
  3206. if (typeof meta === 'string') {
  3207. // Ghostscript produces invalid metadata
  3208. meta = fixMetadata(meta);
  3209. var parser = new DOMParser();
  3210. meta = parser.parseFromString(meta, 'application/xml');
  3211. } else if (!(meta instanceof Document)) {
  3212. error('Metadata: Invalid metadata object');
  3213. }
  3214. this.metaDocument = meta;
  3215. this.metadata = {};
  3216. this.parse();
  3217. }
  3218. Metadata.prototype = {
  3219. parse: function Metadata_parse() {
  3220. var doc = this.metaDocument;
  3221. var rdf = doc.documentElement;
  3222. if (rdf.nodeName.toLowerCase() !== 'rdf:rdf') { // Wrapped in <xmpmeta>
  3223. rdf = rdf.firstChild;
  3224. while (rdf && rdf.nodeName.toLowerCase() !== 'rdf:rdf') {
  3225. rdf = rdf.nextSibling;
  3226. }
  3227. }
  3228. var nodeName = (rdf) ? rdf.nodeName.toLowerCase() : null;
  3229. if (!rdf || nodeName !== 'rdf:rdf' || !rdf.hasChildNodes()) {
  3230. return;
  3231. }
  3232. var children = rdf.childNodes, desc, entry, name, i, ii, length, iLength;
  3233. for (i = 0, length = children.length; i < length; i++) {
  3234. desc = children[i];
  3235. if (desc.nodeName.toLowerCase() !== 'rdf:description') {
  3236. continue;
  3237. }
  3238. for (ii = 0, iLength = desc.childNodes.length; ii < iLength; ii++) {
  3239. if (desc.childNodes[ii].nodeName.toLowerCase() !== '#text') {
  3240. entry = desc.childNodes[ii];
  3241. name = entry.nodeName.toLowerCase();
  3242. this.metadata[name] = entry.textContent.trim();
  3243. }
  3244. }
  3245. }
  3246. },
  3247. get: function Metadata_get(name) {
  3248. return this.metadata[name] || null;
  3249. },
  3250. has: function Metadata_has(name) {
  3251. return typeof this.metadata[name] !== 'undefined';
  3252. }
  3253. };
  3254. return Metadata;
  3255. })();
  3256. // <canvas> contexts store most of the state we need natively.
  3257. // However, PDF needs a bit more state, which we store here.
  3258. // Minimal font size that would be used during canvas fillText operations.
  3259. var MIN_FONT_SIZE = 16;
  3260. var MAX_GROUP_SIZE = 4096;
  3261. var COMPILE_TYPE3_GLYPHS = true;
  3262. function createScratchCanvas(width, height) {
  3263. var canvas = document.createElement('canvas');
  3264. canvas.width = width;
  3265. canvas.height = height;
  3266. return canvas;
  3267. }
  3268. function addContextCurrentTransform(ctx) {
  3269. // If the context doesn't expose a `mozCurrentTransform`, add a JS based on.
  3270. if (!ctx.mozCurrentTransform) {
  3271. // Store the original context
  3272. ctx._scaleX = ctx._scaleX || 1.0;
  3273. ctx._scaleY = ctx._scaleY || 1.0;
  3274. ctx._originalSave = ctx.save;
  3275. ctx._originalRestore = ctx.restore;
  3276. ctx._originalRotate = ctx.rotate;
  3277. ctx._originalScale = ctx.scale;
  3278. ctx._originalTranslate = ctx.translate;
  3279. ctx._originalTransform = ctx.transform;
  3280. ctx._originalSetTransform = ctx.setTransform;
  3281. ctx._transformMatrix = [ctx._scaleX, 0, 0, ctx._scaleY, 0, 0];
  3282. ctx._transformStack = [];
  3283. Object.defineProperty(ctx, 'mozCurrentTransform', {
  3284. get: function getCurrentTransform() {
  3285. return this._transformMatrix;
  3286. }
  3287. });
  3288. Object.defineProperty(ctx, 'mozCurrentTransformInverse', {
  3289. get: function getCurrentTransformInverse() {
  3290. // Calculation done using WolframAlpha:
  3291. // http://www.wolframalpha.com/input/?
  3292. // i=Inverse+{{a%2C+c%2C+e}%2C+{b%2C+d%2C+f}%2C+{0%2C+0%2C+1}}
  3293. var m = this._transformMatrix;
  3294. var a = m[0], b = m[1], c = m[2], d = m[3], e = m[4], f = m[5];
  3295. var ad_bc = a * d - b * c;
  3296. var bc_ad = b * c - a * d;
  3297. return [
  3298. d / ad_bc,
  3299. b / bc_ad,
  3300. c / bc_ad,
  3301. a / ad_bc,
  3302. (d * e - c * f) / bc_ad,
  3303. (b * e - a * f) / ad_bc
  3304. ];
  3305. }
  3306. });
  3307. ctx.save = function ctxSave() {
  3308. var old = this._transformMatrix;
  3309. this._transformStack.push(old);
  3310. this._transformMatrix = old.slice(0, 6);
  3311. this._originalSave();
  3312. };
  3313. ctx.restore = function ctxRestore() {
  3314. var prev = this._transformStack.pop();
  3315. if (prev) {
  3316. this._transformMatrix = prev;
  3317. this._originalRestore();
  3318. }
  3319. };
  3320. ctx.translate = function ctxTranslate(x, y) {
  3321. var m = this._transformMatrix;
  3322. m[4] = m[0] * x + m[2] * y + m[4];
  3323. m[5] = m[1] * x + m[3] * y + m[5];
  3324. this._originalTranslate(x, y);
  3325. };
  3326. ctx.scale = function ctxScale(x, y) {
  3327. var m = this._transformMatrix;
  3328. m[0] = m[0] * x;
  3329. m[1] = m[1] * x;
  3330. m[2] = m[2] * y;
  3331. m[3] = m[3] * y;
  3332. this._originalScale(x, y);
  3333. };
  3334. ctx.transform = function ctxTransform(a, b, c, d, e, f) {
  3335. var m = this._transformMatrix;
  3336. this._transformMatrix = [
  3337. m[0] * a + m[2] * b,
  3338. m[1] * a + m[3] * b,
  3339. m[0] * c + m[2] * d,
  3340. m[1] * c + m[3] * d,
  3341. m[0] * e + m[2] * f + m[4],
  3342. m[1] * e + m[3] * f + m[5]
  3343. ];
  3344. ctx._originalTransform(a, b, c, d, e, f);
  3345. };
  3346. ctx.setTransform = function ctxSetTransform(a, b, c, d, e, f) {
  3347. this._transformMatrix = [a, b, c, d, e, f];
  3348. ctx._originalSetTransform(a, b, c, d, e, f);
  3349. };
  3350. ctx.rotate = function ctxRotate(angle) {
  3351. var cosValue = Math.cos(angle);
  3352. var sinValue = Math.sin(angle);
  3353. var m = this._transformMatrix;
  3354. this._transformMatrix = [
  3355. m[0] * cosValue + m[2] * sinValue,
  3356. m[1] * cosValue + m[3] * sinValue,
  3357. m[0] * (-sinValue) + m[2] * cosValue,
  3358. m[1] * (-sinValue) + m[3] * cosValue,
  3359. m[4],
  3360. m[5]
  3361. ];
  3362. this._originalRotate(angle);
  3363. };
  3364. }
  3365. }
  3366. var CachedCanvases = (function CachedCanvasesClosure() {
  3367. var cache = {};
  3368. return {
  3369. getCanvas: function CachedCanvases_getCanvas(id, width, height,
  3370. trackTransform) {
  3371. var canvasEntry;
  3372. if (id in cache) {
  3373. canvasEntry = cache[id];
  3374. canvasEntry.canvas.width = width;
  3375. canvasEntry.canvas.height = height;
  3376. // reset canvas transform for emulated mozCurrentTransform, if needed
  3377. canvasEntry.context.setTransform(1, 0, 0, 1, 0, 0);
  3378. } else {
  3379. var canvas = createScratchCanvas(width, height);
  3380. var ctx = canvas.getContext('2d');
  3381. if (trackTransform) {
  3382. addContextCurrentTransform(ctx);
  3383. }
  3384. cache[id] = canvasEntry = {canvas: canvas, context: ctx};
  3385. }
  3386. return canvasEntry;
  3387. },
  3388. clear: function () {
  3389. cache = {};
  3390. }
  3391. };
  3392. })();
  3393. function compileType3Glyph(imgData) {
  3394. var POINT_TO_PROCESS_LIMIT = 1000;
  3395. var width = imgData.width, height = imgData.height;
  3396. var i, j, j0, width1 = width + 1;
  3397. var points = new Uint8Array(width1 * (height + 1));
  3398. var POINT_TYPES =
  3399. new Uint8Array([0, 2, 4, 0, 1, 0, 5, 4, 8, 10, 0, 8, 0, 2, 1, 0]);
  3400. // decodes bit-packed mask data
  3401. var lineSize = (width + 7) & ~7, data0 = imgData.data;
  3402. var data = new Uint8Array(lineSize * height), pos = 0, ii;
  3403. for (i = 0, ii = data0.length; i < ii; i++) {
  3404. var mask = 128, elem = data0[i];
  3405. while (mask > 0) {
  3406. data[pos++] = (elem & mask) ? 0 : 255;
  3407. mask >>= 1;
  3408. }
  3409. }
  3410. // finding iteresting points: every point is located between mask pixels,
  3411. // so there will be points of the (width + 1)x(height + 1) grid. Every point
  3412. // will have flags assigned based on neighboring mask pixels:
  3413. // 4 | 8
  3414. // --P--
  3415. // 2 | 1
  3416. // We are interested only in points with the flags:
  3417. // - outside corners: 1, 2, 4, 8;
  3418. // - inside corners: 7, 11, 13, 14;
  3419. // - and, intersections: 5, 10.
  3420. var count = 0;
  3421. pos = 0;
  3422. if (data[pos] !== 0) {
  3423. points[0] = 1;
  3424. ++count;
  3425. }
  3426. for (j = 1; j < width; j++) {
  3427. if (data[pos] !== data[pos + 1]) {
  3428. points[j] = data[pos] ? 2 : 1;
  3429. ++count;
  3430. }
  3431. pos++;
  3432. }
  3433. if (data[pos] !== 0) {
  3434. points[j] = 2;
  3435. ++count;
  3436. }
  3437. for (i = 1; i < height; i++) {
  3438. pos = i * lineSize;
  3439. j0 = i * width1;
  3440. if (data[pos - lineSize] !== data[pos]) {
  3441. points[j0] = data[pos] ? 1 : 8;
  3442. ++count;
  3443. }
  3444. // 'sum' is the position of the current pixel configuration in the 'TYPES'
  3445. // array (in order 8-1-2-4, so we can use '>>2' to shift the column).
  3446. var sum = (data[pos] ? 4 : 0) + (data[pos - lineSize] ? 8 : 0);
  3447. for (j = 1; j < width; j++) {
  3448. sum = (sum >> 2) + (data[pos + 1] ? 4 : 0) +
  3449. (data[pos - lineSize + 1] ? 8 : 0);
  3450. if (POINT_TYPES[sum]) {
  3451. points[j0 + j] = POINT_TYPES[sum];
  3452. ++count;
  3453. }
  3454. pos++;
  3455. }
  3456. if (data[pos - lineSize] !== data[pos]) {
  3457. points[j0 + j] = data[pos] ? 2 : 4;
  3458. ++count;
  3459. }
  3460. if (count > POINT_TO_PROCESS_LIMIT) {
  3461. return null;
  3462. }
  3463. }
  3464. pos = lineSize * (height - 1);
  3465. j0 = i * width1;
  3466. if (data[pos] !== 0) {
  3467. points[j0] = 8;
  3468. ++count;
  3469. }
  3470. for (j = 1; j < width; j++) {
  3471. if (data[pos] !== data[pos + 1]) {
  3472. points[j0 + j] = data[pos] ? 4 : 8;
  3473. ++count;
  3474. }
  3475. pos++;
  3476. }
  3477. if (data[pos] !== 0) {
  3478. points[j0 + j] = 4;
  3479. ++count;
  3480. }
  3481. if (count > POINT_TO_PROCESS_LIMIT) {
  3482. return null;
  3483. }
  3484. // building outlines
  3485. var steps = new Int32Array([0, width1, -1, 0, -width1, 0, 0, 0, 1]);
  3486. var outlines = [];
  3487. for (i = 0; count && i <= height; i++) {
  3488. var p = i * width1;
  3489. var end = p + width;
  3490. while (p < end && !points[p]) {
  3491. p++;
  3492. }
  3493. if (p === end) {
  3494. continue;
  3495. }
  3496. var coords = [p % width1, i];
  3497. var type = points[p], p0 = p, pp;
  3498. do {
  3499. var step = steps[type];
  3500. do {
  3501. p += step;
  3502. } while (!points[p]);
  3503. pp = points[p];
  3504. if (pp !== 5 && pp !== 10) {
  3505. // set new direction
  3506. type = pp;
  3507. // delete mark
  3508. points[p] = 0;
  3509. } else { // type is 5 or 10, ie, a crossing
  3510. // set new direction
  3511. type = pp & ((0x33 * type) >> 4);
  3512. // set new type for "future hit"
  3513. points[p] &= (type >> 2 | type << 2);
  3514. }
  3515. coords.push(p % width1);
  3516. coords.push((p / width1) | 0);
  3517. --count;
  3518. } while (p0 !== p);
  3519. outlines.push(coords);
  3520. --i;
  3521. }
  3522. var drawOutline = function(c) {
  3523. c.save();
  3524. // the path shall be painted in [0..1]x[0..1] space
  3525. c.scale(1 / width, -1 / height);
  3526. c.translate(0, -height);
  3527. c.beginPath();
  3528. for (var i = 0, ii = outlines.length; i < ii; i++) {
  3529. var o = outlines[i];
  3530. c.moveTo(o[0], o[1]);
  3531. for (var j = 2, jj = o.length; j < jj; j += 2) {
  3532. c.lineTo(o[j], o[j+1]);
  3533. }
  3534. }
  3535. c.fill();
  3536. c.beginPath();
  3537. c.restore();
  3538. };
  3539. return drawOutline;
  3540. }
  3541. var CanvasExtraState = (function CanvasExtraStateClosure() {
  3542. function CanvasExtraState(old) {
  3543. // Are soft masks and alpha values shapes or opacities?
  3544. this.alphaIsShape = false;
  3545. this.fontSize = 0;
  3546. this.fontSizeScale = 1;
  3547. this.textMatrix = IDENTITY_MATRIX;
  3548. this.textMatrixScale = 1;
  3549. this.fontMatrix = FONT_IDENTITY_MATRIX;
  3550. this.leading = 0;
  3551. // Current point (in user coordinates)
  3552. this.x = 0;
  3553. this.y = 0;
  3554. // Start of text line (in text coordinates)
  3555. this.lineX = 0;
  3556. this.lineY = 0;
  3557. // Character and word spacing
  3558. this.charSpacing = 0;
  3559. this.wordSpacing = 0;
  3560. this.textHScale = 1;
  3561. this.textRenderingMode = TextRenderingMode.FILL;
  3562. this.textRise = 0;
  3563. // Default fore and background colors
  3564. this.fillColor = '#000000';
  3565. this.strokeColor = '#000000';
  3566. // Note: fill alpha applies to all non-stroking operations
  3567. this.fillAlpha = 1;
  3568. this.strokeAlpha = 1;
  3569. this.lineWidth = 1;
  3570. this.activeSMask = null; // nonclonable field (see the save method below)
  3571. this.old = old;
  3572. }
  3573. CanvasExtraState.prototype = {
  3574. clone: function CanvasExtraState_clone() {
  3575. return Object.create(this);
  3576. },
  3577. setCurrentPoint: function CanvasExtraState_setCurrentPoint(x, y) {
  3578. this.x = x;
  3579. this.y = y;
  3580. }
  3581. };
  3582. return CanvasExtraState;
  3583. })();
  3584. var CanvasGraphics = (function CanvasGraphicsClosure() {
  3585. // Defines the time the executeOperatorList is going to be executing
  3586. // before it stops and shedules a continue of execution.
  3587. var EXECUTION_TIME = 15;
  3588. function CanvasGraphics(canvasCtx, commonObjs, objs, imageLayer) {
  3589. this.ctx = canvasCtx;
  3590. this.current = new CanvasExtraState();
  3591. this.stateStack = [];
  3592. this.pendingClip = null;
  3593. this.pendingEOFill = false;
  3594. this.res = null;
  3595. this.xobjs = null;
  3596. this.commonObjs = commonObjs;
  3597. this.objs = objs;
  3598. this.imageLayer = imageLayer;
  3599. this.groupStack = [];
  3600. this.processingType3 = null;
  3601. // Patterns are painted relative to the initial page/form transform, see pdf
  3602. // spec 8.7.2 NOTE 1.
  3603. this.baseTransform = null;
  3604. this.baseTransformStack = [];
  3605. this.groupLevel = 0;
  3606. this.smaskStack = [];
  3607. this.smaskCounter = 0;
  3608. this.tempSMask = null;
  3609. if (canvasCtx) {
  3610. addContextCurrentTransform(canvasCtx);
  3611. }
  3612. }
  3613. function putBinaryImageData(ctx, imgData) {
  3614. if (typeof ImageData !== 'undefined' && imgData instanceof ImageData) {
  3615. ctx.putImageData(imgData, 0, 0);
  3616. return;
  3617. }
  3618. // Put the image data to the canvas in chunks, rather than putting the
  3619. // whole image at once. This saves JS memory, because the ImageData object
  3620. // is smaller. It also possibly saves C++ memory within the implementation
  3621. // of putImageData(). (E.g. in Firefox we make two short-lived copies of
  3622. // the data passed to putImageData()). |n| shouldn't be too small, however,
  3623. // because too many putImageData() calls will slow things down.
  3624. //
  3625. // Note: as written, if the last chunk is partial, the putImageData() call
  3626. // will (conceptually) put pixels past the bounds of the canvas. But
  3627. // that's ok; any such pixels are ignored.
  3628. var height = imgData.height, width = imgData.width;
  3629. var fullChunkHeight = 16;
  3630. var fracChunks = height / fullChunkHeight;
  3631. var fullChunks = Math.floor(fracChunks);
  3632. var totalChunks = Math.ceil(fracChunks);
  3633. var partialChunkHeight = height - fullChunks * fullChunkHeight;
  3634. var chunkImgData = ctx.createImageData(width, fullChunkHeight);
  3635. var srcPos = 0, destPos;
  3636. var src = imgData.data;
  3637. var dest = chunkImgData.data;
  3638. var i, j, thisChunkHeight, elemsInThisChunk;
  3639. // There are multiple forms in which the pixel data can be passed, and
  3640. // imgData.kind tells us which one this is.
  3641. if (imgData.kind === ImageKind.GRAYSCALE_1BPP) {
  3642. // Grayscale, 1 bit per pixel (i.e. black-and-white).
  3643. var srcLength = src.byteLength;
  3644. var dest32 = PDFJS.hasCanvasTypedArrays ? new Uint32Array(dest.buffer) :
  3645. new Uint32ArrayView(dest);
  3646. var dest32DataLength = dest32.length;
  3647. var fullSrcDiff = (width + 7) >> 3;
  3648. var white = 0xFFFFFFFF;
  3649. var black = (PDFJS.isLittleEndian || !PDFJS.hasCanvasTypedArrays) ?
  3650. 0xFF000000 : 0x000000FF;
  3651. for (i = 0; i < totalChunks; i++) {
  3652. thisChunkHeight =
  3653. (i < fullChunks) ? fullChunkHeight : partialChunkHeight;
  3654. destPos = 0;
  3655. for (j = 0; j < thisChunkHeight; j++) {
  3656. var srcDiff = srcLength - srcPos;
  3657. var k = 0;
  3658. var kEnd = (srcDiff > fullSrcDiff) ? width : srcDiff * 8 - 7;
  3659. var kEndUnrolled = kEnd & ~7;
  3660. var mask = 0;
  3661. var srcByte = 0;
  3662. for (; k < kEndUnrolled; k += 8) {
  3663. srcByte = src[srcPos++];
  3664. dest32[destPos++] = (srcByte & 128) ? white : black;
  3665. dest32[destPos++] = (srcByte & 64) ? white : black;
  3666. dest32[destPos++] = (srcByte & 32) ? white : black;
  3667. dest32[destPos++] = (srcByte & 16) ? white : black;
  3668. dest32[destPos++] = (srcByte & 8) ? white : black;
  3669. dest32[destPos++] = (srcByte & 4) ? white : black;
  3670. dest32[destPos++] = (srcByte & 2) ? white : black;
  3671. dest32[destPos++] = (srcByte & 1) ? white : black;
  3672. }
  3673. for (; k < kEnd; k++) {
  3674. if (mask === 0) {
  3675. srcByte = src[srcPos++];
  3676. mask = 128;
  3677. }
  3678. dest32[destPos++] = (srcByte & mask) ? white : black;
  3679. mask >>= 1;
  3680. }
  3681. }
  3682. // We ran out of input. Make all remaining pixels transparent.
  3683. while (destPos < dest32DataLength) {
  3684. dest32[destPos++] = 0;
  3685. }
  3686. ctx.putImageData(chunkImgData, 0, i * fullChunkHeight);
  3687. }
  3688. } else if (imgData.kind === ImageKind.RGBA_32BPP) {
  3689. // RGBA, 32-bits per pixel.
  3690. j = 0;
  3691. elemsInThisChunk = width * fullChunkHeight * 4;
  3692. for (i = 0; i < fullChunks; i++) {
  3693. dest.set(src.subarray(srcPos, srcPos + elemsInThisChunk));
  3694. srcPos += elemsInThisChunk;
  3695. ctx.putImageData(chunkImgData, 0, j);
  3696. j += fullChunkHeight;
  3697. }
  3698. if (i < totalChunks) {
  3699. elemsInThisChunk = width * partialChunkHeight * 4;
  3700. dest.set(src.subarray(srcPos, srcPos + elemsInThisChunk));
  3701. ctx.putImageData(chunkImgData, 0, j);
  3702. }
  3703. } else if (imgData.kind === ImageKind.RGB_24BPP) {
  3704. // RGB, 24-bits per pixel.
  3705. thisChunkHeight = fullChunkHeight;
  3706. elemsInThisChunk = width * thisChunkHeight;
  3707. for (i = 0; i < totalChunks; i++) {
  3708. if (i >= fullChunks) {
  3709. thisChunkHeight =partialChunkHeight;
  3710. elemsInThisChunk = width * thisChunkHeight;
  3711. }
  3712. destPos = 0;
  3713. for (j = elemsInThisChunk; j--;) {
  3714. dest[destPos++] = src[srcPos++];
  3715. dest[destPos++] = src[srcPos++];
  3716. dest[destPos++] = src[srcPos++];
  3717. dest[destPos++] = 255;
  3718. }
  3719. ctx.putImageData(chunkImgData, 0, i * fullChunkHeight);
  3720. }
  3721. } else {
  3722. error('bad image kind: ' + imgData.kind);
  3723. }
  3724. }
  3725. function putBinaryImageMask(ctx, imgData) {
  3726. var height = imgData.height, width = imgData.width;
  3727. var fullChunkHeight = 16;
  3728. var fracChunks = height / fullChunkHeight;
  3729. var fullChunks = Math.floor(fracChunks);
  3730. var totalChunks = Math.ceil(fracChunks);
  3731. var partialChunkHeight = height - fullChunks * fullChunkHeight;
  3732. var chunkImgData = ctx.createImageData(width, fullChunkHeight);
  3733. var srcPos = 0;
  3734. var src = imgData.data;
  3735. var dest = chunkImgData.data;
  3736. for (var i = 0; i < totalChunks; i++) {
  3737. var thisChunkHeight =
  3738. (i < fullChunks) ? fullChunkHeight : partialChunkHeight;
  3739. // Expand the mask so it can be used by the canvas. Any required
  3740. // inversion has already been handled.
  3741. var destPos = 3; // alpha component offset
  3742. for (var j = 0; j < thisChunkHeight; j++) {
  3743. var mask = 0;
  3744. for (var k = 0; k < width; k++) {
  3745. if (!mask) {
  3746. var elem = src[srcPos++];
  3747. mask = 128;
  3748. }
  3749. dest[destPos] = (elem & mask) ? 0 : 255;
  3750. destPos += 4;
  3751. mask >>= 1;
  3752. }
  3753. }
  3754. ctx.putImageData(chunkImgData, 0, i * fullChunkHeight);
  3755. }
  3756. }
  3757. function copyCtxState(sourceCtx, destCtx) {
  3758. var properties = ['strokeStyle', 'fillStyle', 'fillRule', 'globalAlpha',
  3759. 'lineWidth', 'lineCap', 'lineJoin', 'miterLimit',
  3760. 'globalCompositeOperation', 'font'];
  3761. for (var i = 0, ii = properties.length; i < ii; i++) {
  3762. var property = properties[i];
  3763. if (property in sourceCtx) {
  3764. destCtx[property] = sourceCtx[property];
  3765. }
  3766. }
  3767. if ('setLineDash' in sourceCtx) {
  3768. destCtx.setLineDash(sourceCtx.getLineDash());
  3769. destCtx.lineDashOffset = sourceCtx.lineDashOffset;
  3770. } else if ('mozDash' in sourceCtx) {
  3771. destCtx.mozDash = sourceCtx.mozDash;
  3772. destCtx.mozDashOffset = sourceCtx.mozDashOffset;
  3773. }
  3774. }
  3775. function genericComposeSMask(maskCtx, layerCtx, width, height,
  3776. subtype, backdrop) {
  3777. var addBackdropFn;
  3778. if (backdrop) {
  3779. addBackdropFn = function (r0, g0, b0, bytes) {
  3780. var length = bytes.length;
  3781. for (var i = 3; i < length; i += 4) {
  3782. var alpha = bytes[i] / 255;
  3783. if (alpha === 0) {
  3784. bytes[i - 3] = r0;
  3785. bytes[i - 2] = g0;
  3786. bytes[i - 1] = b0;
  3787. } else if (alpha < 1) {
  3788. var alpha_ = 1 - alpha;
  3789. bytes[i - 3] = (bytes[i - 3] * alpha + r0 * alpha_) | 0;
  3790. bytes[i - 2] = (bytes[i - 2] * alpha + g0 * alpha_) | 0;
  3791. bytes[i - 1] = (bytes[i - 1] * alpha + b0 * alpha_) | 0;
  3792. }
  3793. }
  3794. }.bind(null, backdrop[0], backdrop[1], backdrop[2]);
  3795. } else {
  3796. addBackdropFn = function () {};
  3797. }
  3798. var composeFn;
  3799. if (subtype === 'Luminosity') {
  3800. composeFn = function (maskDataBytes, layerDataBytes) {
  3801. var length = maskDataBytes.length;
  3802. for (var i = 3; i < length; i += 4) {
  3803. var y = ((maskDataBytes[i - 3] * 77) + // * 0.3 / 255 * 0x10000
  3804. (maskDataBytes[i - 2] * 152) + // * 0.59 ....
  3805. (maskDataBytes[i - 1] * 28)) | 0; // * 0.11 ....
  3806. layerDataBytes[i] = (layerDataBytes[i] * y) >> 16;
  3807. }
  3808. };
  3809. } else {
  3810. composeFn = function (maskDataBytes, layerDataBytes) {
  3811. var length = maskDataBytes.length;
  3812. for (var i = 3; i < length; i += 4) {
  3813. var alpha = maskDataBytes[i];
  3814. layerDataBytes[i] = (layerDataBytes[i] * alpha / 255) | 0;
  3815. }
  3816. };
  3817. }
  3818. // processing image in chunks to save memory
  3819. var PIXELS_TO_PROCESS = 65536;
  3820. var chunkSize = Math.min(height, Math.ceil(PIXELS_TO_PROCESS / width));
  3821. for (var row = 0; row < height; row += chunkSize) {
  3822. var chunkHeight = Math.min(chunkSize, height - row);
  3823. var maskData = maskCtx.getImageData(0, row, width, chunkHeight);
  3824. var layerData = layerCtx.getImageData(0, row, width, chunkHeight);
  3825. addBackdropFn(maskData.data);
  3826. composeFn(maskData.data, layerData.data);
  3827. maskCtx.putImageData(layerData, 0, row);
  3828. }
  3829. }
  3830. function composeSMask(ctx, smask, layerCtx) {
  3831. var mask = smask.canvas;
  3832. var maskCtx = smask.context;
  3833. ctx.setTransform(smask.scaleX, 0, 0, smask.scaleY,
  3834. smask.offsetX, smask.offsetY);
  3835. var backdrop = smask.backdrop || null;
  3836. if (WebGLUtils.isEnabled) {
  3837. var composed = WebGLUtils.composeSMask(layerCtx.canvas, mask,
  3838. {subtype: smask.subtype, backdrop: backdrop});
  3839. ctx.setTransform(1, 0, 0, 1, 0, 0);
  3840. ctx.drawImage(composed, smask.offsetX, smask.offsetY);
  3841. return;
  3842. }
  3843. genericComposeSMask(maskCtx, layerCtx, mask.width, mask.height,
  3844. smask.subtype, backdrop);
  3845. ctx.drawImage(mask, 0, 0);
  3846. }
  3847. var LINE_CAP_STYLES = ['butt', 'round', 'square'];
  3848. var LINE_JOIN_STYLES = ['miter', 'round', 'bevel'];
  3849. var NORMAL_CLIP = {};
  3850. var EO_CLIP = {};
  3851. CanvasGraphics.prototype = {
  3852. beginDrawing: function CanvasGraphics_beginDrawing(viewport, transparency) {
  3853. // For pdfs that use blend modes we have to clear the canvas else certain
  3854. // blend modes can look wrong since we'd be blending with a white
  3855. // backdrop. The problem with a transparent backdrop though is we then
  3856. // don't get sub pixel anti aliasing on text, so we fill with white if
  3857. // we can.
  3858. var width = this.ctx.canvas.width;
  3859. var height = this.ctx.canvas.height;
  3860. if (transparency) {
  3861. this.ctx.clearRect(0, 0, width, height);
  3862. } else {
  3863. this.ctx.mozOpaque = true;
  3864. this.ctx.save();
  3865. this.ctx.fillStyle = 'rgb(255, 255, 255)';
  3866. this.ctx.fillRect(0, 0, width, height);
  3867. this.ctx.restore();
  3868. }
  3869. var transform = viewport.transform;
  3870. this.ctx.save();
  3871. this.ctx.transform.apply(this.ctx, transform);
  3872. this.baseTransform = this.ctx.mozCurrentTransform.slice();
  3873. if (this.imageLayer) {
  3874. this.imageLayer.beginLayout();
  3875. }
  3876. },
  3877. executeOperatorList: function CanvasGraphics_executeOperatorList(
  3878. operatorList,
  3879. executionStartIdx, continueCallback,
  3880. stepper) {
  3881. var argsArray = operatorList.argsArray;
  3882. var fnArray = operatorList.fnArray;
  3883. var i = executionStartIdx || 0;
  3884. var argsArrayLen = argsArray.length;
  3885. // Sometimes the OperatorList to execute is empty.
  3886. if (argsArrayLen == i) {
  3887. return i;
  3888. }
  3889. var endTime = Date.now() + EXECUTION_TIME;
  3890. var commonObjs = this.commonObjs;
  3891. var objs = this.objs;
  3892. var fnId;
  3893. while (true) {
  3894. if (stepper && i === stepper.nextBreakPoint) {
  3895. stepper.breakIt(i, continueCallback);
  3896. return i;
  3897. }
  3898. fnId = fnArray[i];
  3899. if (fnId !== OPS.dependency) {
  3900. this[fnId].apply(this, argsArray[i]);
  3901. } else {
  3902. var deps = argsArray[i];
  3903. for (var n = 0, nn = deps.length; n < nn; n++) {
  3904. var depObjId = deps[n];
  3905. var common = depObjId.substring(0, 2) == 'g_';
  3906. // If the promise isn't resolved yet, add the continueCallback
  3907. // to the promise and bail out.
  3908. if (!common && !objs.isResolved(depObjId)) {
  3909. objs.get(depObjId, continueCallback);
  3910. return i;
  3911. }
  3912. if (common && !commonObjs.isResolved(depObjId)) {
  3913. commonObjs.get(depObjId, continueCallback);
  3914. return i;
  3915. }
  3916. }
  3917. }
  3918. i++;
  3919. // If the entire operatorList was executed, stop as were done.
  3920. if (i == argsArrayLen) {
  3921. return i;
  3922. }
  3923. // If the execution took longer then a certain amount of time and
  3924. // `continueCallback` is specified, interrupt the execution.
  3925. if (continueCallback && Date.now() > endTime) {
  3926. continueCallback();
  3927. return i;
  3928. }
  3929. // If the operatorList isn't executed completely yet OR the execution
  3930. // time was short enough, do another execution round.
  3931. }
  3932. },
  3933. endDrawing: function CanvasGraphics_endDrawing() {
  3934. this.ctx.restore();
  3935. CachedCanvases.clear();
  3936. WebGLUtils.clear();
  3937. if (this.imageLayer) {
  3938. this.imageLayer.endLayout();
  3939. }
  3940. },
  3941. // Graphics state
  3942. setLineWidth: function CanvasGraphics_setLineWidth(width) {
  3943. this.current.lineWidth = width;
  3944. this.ctx.lineWidth = width;
  3945. },
  3946. setLineCap: function CanvasGraphics_setLineCap(style) {
  3947. this.ctx.lineCap = LINE_CAP_STYLES[style];
  3948. },
  3949. setLineJoin: function CanvasGraphics_setLineJoin(style) {
  3950. this.ctx.lineJoin = LINE_JOIN_STYLES[style];
  3951. },
  3952. setMiterLimit: function CanvasGraphics_setMiterLimit(limit) {
  3953. this.ctx.miterLimit = limit;
  3954. },
  3955. setDash: function CanvasGraphics_setDash(dashArray, dashPhase) {
  3956. var ctx = this.ctx;
  3957. if ('setLineDash' in ctx) {
  3958. ctx.setLineDash(dashArray);
  3959. ctx.lineDashOffset = dashPhase;
  3960. } else {
  3961. ctx.mozDash = dashArray;
  3962. ctx.mozDashOffset = dashPhase;
  3963. }
  3964. },
  3965. setRenderingIntent: function CanvasGraphics_setRenderingIntent(intent) {
  3966. // Maybe if we one day fully support color spaces this will be important
  3967. // for now we can ignore.
  3968. // TODO set rendering intent?
  3969. },
  3970. setFlatness: function CanvasGraphics_setFlatness(flatness) {
  3971. // There's no way to control this with canvas, but we can safely ignore.
  3972. // TODO set flatness?
  3973. },
  3974. setGState: function CanvasGraphics_setGState(states) {
  3975. for (var i = 0, ii = states.length; i < ii; i++) {
  3976. var state = states[i];
  3977. var key = state[0];
  3978. var value = state[1];
  3979. switch (key) {
  3980. case 'LW':
  3981. this.setLineWidth(value);
  3982. break;
  3983. case 'LC':
  3984. this.setLineCap(value);
  3985. break;
  3986. case 'LJ':
  3987. this.setLineJoin(value);
  3988. break;
  3989. case 'ML':
  3990. this.setMiterLimit(value);
  3991. break;
  3992. case 'D':
  3993. this.setDash(value[0], value[1]);
  3994. break;
  3995. case 'RI':
  3996. this.setRenderingIntent(value);
  3997. break;
  3998. case 'FL':
  3999. this.setFlatness(value);
  4000. break;
  4001. case 'Font':
  4002. this.setFont(value[0], value[1]);
  4003. break;
  4004. case 'CA':
  4005. this.current.strokeAlpha = state[1];
  4006. break;
  4007. case 'ca':
  4008. this.current.fillAlpha = state[1];
  4009. this.ctx.globalAlpha = state[1];
  4010. break;
  4011. case 'BM':
  4012. if (value && value.name && (value.name !== 'Normal')) {
  4013. var mode = value.name.replace(/([A-Z])/g,
  4014. function(c) {
  4015. return '-' + c.toLowerCase();
  4016. }
  4017. ).substring(1);
  4018. this.ctx.globalCompositeOperation = mode;
  4019. if (this.ctx.globalCompositeOperation !== mode) {
  4020. warn('globalCompositeOperation "' + mode +
  4021. '" is not supported');
  4022. }
  4023. } else {
  4024. this.ctx.globalCompositeOperation = 'source-over';
  4025. }
  4026. break;
  4027. case 'SMask':
  4028. if (this.current.activeSMask) {
  4029. this.endSMaskGroup();
  4030. }
  4031. this.current.activeSMask = value ? this.tempSMask : null;
  4032. if (this.current.activeSMask) {
  4033. this.beginSMaskGroup();
  4034. }
  4035. this.tempSMask = null;
  4036. break;
  4037. }
  4038. }
  4039. },
  4040. beginSMaskGroup: function CanvasGraphics_beginSMaskGroup() {
  4041. var activeSMask = this.current.activeSMask;
  4042. var drawnWidth = activeSMask.canvas.width;
  4043. var drawnHeight = activeSMask.canvas.height;
  4044. var cacheId = 'smaskGroupAt' + this.groupLevel;
  4045. var scratchCanvas = CachedCanvases.getCanvas(
  4046. cacheId, drawnWidth, drawnHeight, true);
  4047. var currentCtx = this.ctx;
  4048. var currentTransform = currentCtx.mozCurrentTransform;
  4049. this.ctx.save();
  4050. var groupCtx = scratchCanvas.context;
  4051. groupCtx.scale(1 / activeSMask.scaleX, 1 / activeSMask.scaleY);
  4052. groupCtx.translate(-activeSMask.offsetX, -activeSMask.offsetY);
  4053. groupCtx.transform.apply(groupCtx, currentTransform);
  4054. copyCtxState(currentCtx, groupCtx);
  4055. this.ctx = groupCtx;
  4056. this.setGState([
  4057. ['BM', 'Normal'],
  4058. ['ca', 1],
  4059. ['CA', 1]
  4060. ]);
  4061. this.groupStack.push(currentCtx);
  4062. this.groupLevel++;
  4063. },
  4064. endSMaskGroup: function CanvasGraphics_endSMaskGroup() {
  4065. var groupCtx = this.ctx;
  4066. this.groupLevel--;
  4067. this.ctx = this.groupStack.pop();
  4068. composeSMask(this.ctx, this.current.activeSMask, groupCtx);
  4069. this.ctx.restore();
  4070. },
  4071. save: function CanvasGraphics_save() {
  4072. this.ctx.save();
  4073. var old = this.current;
  4074. this.stateStack.push(old);
  4075. this.current = old.clone();
  4076. if (this.current.activeSMask) {
  4077. this.current.activeSMask = null;
  4078. }
  4079. },
  4080. restore: function CanvasGraphics_restore() {
  4081. var prev = this.stateStack.pop();
  4082. if (prev) {
  4083. if (this.current.activeSMask) {
  4084. this.endSMaskGroup();
  4085. }
  4086. this.current = prev;
  4087. this.ctx.restore();
  4088. }
  4089. },
  4090. transform: function CanvasGraphics_transform(a, b, c, d, e, f) {
  4091. this.ctx.transform(a, b, c, d, e, f);
  4092. },
  4093. // Path
  4094. constructPath: function CanvasGraphics_constructPath(ops, args) {
  4095. var ctx = this.ctx;
  4096. var current = this.current;
  4097. var x = current.x, y = current.y;
  4098. for (var i = 0, j = 0, ii = ops.length; i < ii; i++) {
  4099. switch (ops[i] | 0) {
  4100. case OPS.moveTo:
  4101. x = args[j++];
  4102. y = args[j++];
  4103. ctx.moveTo(x, y);
  4104. break;
  4105. case OPS.lineTo:
  4106. x = args[j++];
  4107. y = args[j++];
  4108. ctx.lineTo(x, y);
  4109. break;
  4110. case OPS.curveTo:
  4111. x = args[j + 4];
  4112. y = args[j + 5];
  4113. ctx.bezierCurveTo(args[j], args[j + 1], args[j + 2], args[j + 3],
  4114. x, y);
  4115. j += 6;
  4116. break;
  4117. case OPS.curveTo2:
  4118. ctx.bezierCurveTo(x, y, args[j], args[j + 1],
  4119. args[j + 2], args[j + 3]);
  4120. x = args[j + 2];
  4121. y = args[j + 3];
  4122. j += 4;
  4123. break;
  4124. case OPS.curveTo3:
  4125. x = args[j + 2];
  4126. y = args[j + 3];
  4127. ctx.bezierCurveTo(args[j], args[j + 1], x, y, x, y);
  4128. j += 4;
  4129. break;
  4130. case OPS.closePath:
  4131. ctx.closePath();
  4132. break;
  4133. }
  4134. }
  4135. current.setCurrentPoint(x, y);
  4136. },
  4137. closePath: function CanvasGraphics_closePath() {
  4138. this.ctx.closePath();
  4139. },
  4140. rectangle: function CanvasGraphics_rectangle(x, y, width, height) {
  4141. if (width === 0) {
  4142. width = this.getSinglePixelWidth();
  4143. }
  4144. if (height === 0) {
  4145. height = this.getSinglePixelWidth();
  4146. }
  4147. this.ctx.rect(x, y, width, height);
  4148. },
  4149. stroke: function CanvasGraphics_stroke(consumePath) {
  4150. consumePath = typeof consumePath !== 'undefined' ? consumePath : true;
  4151. var ctx = this.ctx;
  4152. var strokeColor = this.current.strokeColor;
  4153. if (this.current.lineWidth === 0) {
  4154. ctx.lineWidth = this.getSinglePixelWidth();
  4155. }
  4156. // For stroke we want to temporarily change the global alpha to the
  4157. // stroking alpha.
  4158. ctx.globalAlpha = this.current.strokeAlpha;
  4159. if (strokeColor && strokeColor.hasOwnProperty('type') &&
  4160. strokeColor.type === 'Pattern') {
  4161. // for patterns, we transform to pattern space, calculate
  4162. // the pattern, call stroke, and restore to user space
  4163. ctx.save();
  4164. ctx.strokeStyle = strokeColor.getPattern(ctx, this);
  4165. ctx.stroke();
  4166. ctx.restore();
  4167. } else {
  4168. ctx.stroke();
  4169. }
  4170. if (consumePath) {
  4171. this.consumePath();
  4172. }
  4173. // Restore the global alpha to the fill alpha
  4174. ctx.globalAlpha = this.current.fillAlpha;
  4175. },
  4176. closeStroke: function CanvasGraphics_closeStroke() {
  4177. this.closePath();
  4178. this.stroke();
  4179. },
  4180. fill: function CanvasGraphics_fill(consumePath) {
  4181. consumePath = typeof consumePath !== 'undefined' ? consumePath : true;
  4182. var ctx = this.ctx;
  4183. var fillColor = this.current.fillColor;
  4184. var needRestore = false;
  4185. if (fillColor && fillColor.hasOwnProperty('type') &&
  4186. fillColor.type === 'Pattern') {
  4187. ctx.save();
  4188. ctx.fillStyle = fillColor.getPattern(ctx, this);
  4189. needRestore = true;
  4190. }
  4191. if (this.pendingEOFill) {
  4192. if (ctx.mozFillRule !== undefined) {
  4193. ctx.mozFillRule = 'evenodd';
  4194. ctx.fill();
  4195. ctx.mozFillRule = 'nonzero';
  4196. } else {
  4197. try {
  4198. ctx.fill('evenodd');
  4199. } catch (ex) {
  4200. // shouldn't really happen, but browsers might think differently
  4201. ctx.fill();
  4202. }
  4203. }
  4204. this.pendingEOFill = false;
  4205. } else {
  4206. ctx.fill();
  4207. }
  4208. if (needRestore) {
  4209. ctx.restore();
  4210. }
  4211. if (consumePath) {
  4212. this.consumePath();
  4213. }
  4214. },
  4215. eoFill: function CanvasGraphics_eoFill() {
  4216. this.pendingEOFill = true;
  4217. this.fill();
  4218. },
  4219. fillStroke: function CanvasGraphics_fillStroke() {
  4220. this.fill(false);
  4221. this.stroke(false);
  4222. this.consumePath();
  4223. },
  4224. eoFillStroke: function CanvasGraphics_eoFillStroke() {
  4225. this.pendingEOFill = true;
  4226. this.fillStroke();
  4227. },
  4228. closeFillStroke: function CanvasGraphics_closeFillStroke() {
  4229. this.closePath();
  4230. this.fillStroke();
  4231. },
  4232. closeEOFillStroke: function CanvasGraphics_closeEOFillStroke() {
  4233. this.pendingEOFill = true;
  4234. this.closePath();
  4235. this.fillStroke();
  4236. },
  4237. endPath: function CanvasGraphics_endPath() {
  4238. this.consumePath();
  4239. },
  4240. // Clipping
  4241. clip: function CanvasGraphics_clip() {
  4242. this.pendingClip = NORMAL_CLIP;
  4243. },
  4244. eoClip: function CanvasGraphics_eoClip() {
  4245. this.pendingClip = EO_CLIP;
  4246. },
  4247. // Text
  4248. beginText: function CanvasGraphics_beginText() {
  4249. this.current.textMatrix = IDENTITY_MATRIX;
  4250. this.current.textMatrixScale = 1;
  4251. this.current.x = this.current.lineX = 0;
  4252. this.current.y = this.current.lineY = 0;
  4253. },
  4254. endText: function CanvasGraphics_endText() {
  4255. var paths = this.pendingTextPaths;
  4256. var ctx = this.ctx;
  4257. if (paths === undefined) {
  4258. ctx.beginPath();
  4259. return;
  4260. }
  4261. ctx.save();
  4262. ctx.beginPath();
  4263. for (var i = 0; i < paths.length; i++) {
  4264. var path = paths[i];
  4265. ctx.setTransform.apply(ctx, path.transform);
  4266. ctx.translate(path.x, path.y);
  4267. path.addToPath(ctx, path.fontSize);
  4268. }
  4269. ctx.restore();
  4270. ctx.clip();
  4271. ctx.beginPath();
  4272. delete this.pendingTextPaths;
  4273. },
  4274. setCharSpacing: function CanvasGraphics_setCharSpacing(spacing) {
  4275. this.current.charSpacing = spacing;
  4276. },
  4277. setWordSpacing: function CanvasGraphics_setWordSpacing(spacing) {
  4278. this.current.wordSpacing = spacing;
  4279. },
  4280. setHScale: function CanvasGraphics_setHScale(scale) {
  4281. this.current.textHScale = scale / 100;
  4282. },
  4283. setLeading: function CanvasGraphics_setLeading(leading) {
  4284. this.current.leading = -leading;
  4285. },
  4286. setFont: function CanvasGraphics_setFont(fontRefName, size) {
  4287. var fontObj = this.commonObjs.get(fontRefName);
  4288. var current = this.current;
  4289. if (!fontObj) {
  4290. error('Can\'t find font for ' + fontRefName);
  4291. }
  4292. current.fontMatrix = (fontObj.fontMatrix ?
  4293. fontObj.fontMatrix : FONT_IDENTITY_MATRIX);
  4294. // A valid matrix needs all main diagonal elements to be non-zero
  4295. // This also ensures we bypass FF bugzilla bug #719844.
  4296. if (current.fontMatrix[0] === 0 ||
  4297. current.fontMatrix[3] === 0) {
  4298. warn('Invalid font matrix for font ' + fontRefName);
  4299. }
  4300. // The spec for Tf (setFont) says that 'size' specifies the font 'scale',
  4301. // and in some docs this can be negative (inverted x-y axes).
  4302. if (size < 0) {
  4303. size = -size;
  4304. current.fontDirection = -1;
  4305. } else {
  4306. current.fontDirection = 1;
  4307. }
  4308. this.current.font = fontObj;
  4309. this.current.fontSize = size;
  4310. if (fontObj.isType3Font) {
  4311. return; // we don't need ctx.font for Type3 fonts
  4312. }
  4313. var name = fontObj.loadedName || 'sans-serif';
  4314. var bold = fontObj.black ? (fontObj.bold ? 'bolder' : 'bold') :
  4315. (fontObj.bold ? 'bold' : 'normal');
  4316. var italic = fontObj.italic ? 'italic' : 'normal';
  4317. var typeface = '"' + name + '", ' + fontObj.fallbackName;
  4318. // Some font backends cannot handle fonts below certain size.
  4319. // Keeping the font at minimal size and using the fontSizeScale to change
  4320. // the current transformation matrix before the fillText/strokeText.
  4321. // See https://bugzilla.mozilla.org/show_bug.cgi?id=726227
  4322. var browserFontSize = size >= MIN_FONT_SIZE ? size : MIN_FONT_SIZE;
  4323. this.current.fontSizeScale = browserFontSize != MIN_FONT_SIZE ? 1.0 :
  4324. size / MIN_FONT_SIZE;
  4325. var rule = italic + ' ' + bold + ' ' + browserFontSize + 'px ' + typeface;
  4326. this.ctx.font = rule;
  4327. },
  4328. setTextRenderingMode: function CanvasGraphics_setTextRenderingMode(mode) {
  4329. this.current.textRenderingMode = mode;
  4330. },
  4331. setTextRise: function CanvasGraphics_setTextRise(rise) {
  4332. this.current.textRise = rise;
  4333. },
  4334. moveText: function CanvasGraphics_moveText(x, y) {
  4335. this.current.x = this.current.lineX += x;
  4336. this.current.y = this.current.lineY += y;
  4337. },
  4338. setLeadingMoveText: function CanvasGraphics_setLeadingMoveText(x, y) {
  4339. this.setLeading(-y);
  4340. this.moveText(x, y);
  4341. },
  4342. setTextMatrix: function CanvasGraphics_setTextMatrix(a, b, c, d, e, f) {
  4343. this.current.textMatrix = [a, b, c, d, e, f];
  4344. this.current.textMatrixScale = Math.sqrt(a * a + b * b);
  4345. this.current.x = this.current.lineX = 0;
  4346. this.current.y = this.current.lineY = 0;
  4347. },
  4348. nextLine: function CanvasGraphics_nextLine() {
  4349. this.moveText(0, this.current.leading);
  4350. },
  4351. paintChar: function CanvasGraphics_paintChar(character, x, y) {
  4352. var ctx = this.ctx;
  4353. var current = this.current;
  4354. var font = current.font;
  4355. var textRenderingMode = current.textRenderingMode;
  4356. var fontSize = current.fontSize / current.fontSizeScale;
  4357. var fillStrokeMode = textRenderingMode &
  4358. TextRenderingMode.FILL_STROKE_MASK;
  4359. var isAddToPathSet = !!(textRenderingMode &
  4360. TextRenderingMode.ADD_TO_PATH_FLAG);
  4361. var addToPath;
  4362. if (font.disableFontFace || isAddToPathSet) {
  4363. addToPath = font.getPathGenerator(this.commonObjs, character);
  4364. }
  4365. if (font.disableFontFace) {
  4366. ctx.save();
  4367. ctx.translate(x, y);
  4368. ctx.beginPath();
  4369. addToPath(ctx, fontSize);
  4370. if (fillStrokeMode === TextRenderingMode.FILL ||
  4371. fillStrokeMode === TextRenderingMode.FILL_STROKE) {
  4372. ctx.fill();
  4373. }
  4374. if (fillStrokeMode === TextRenderingMode.STROKE ||
  4375. fillStrokeMode === TextRenderingMode.FILL_STROKE) {
  4376. ctx.stroke();
  4377. }
  4378. ctx.restore();
  4379. } else {
  4380. if (fillStrokeMode === TextRenderingMode.FILL ||
  4381. fillStrokeMode === TextRenderingMode.FILL_STROKE) {
  4382. ctx.fillText(character, x, y);
  4383. }
  4384. if (fillStrokeMode === TextRenderingMode.STROKE ||
  4385. fillStrokeMode === TextRenderingMode.FILL_STROKE) {
  4386. ctx.strokeText(character, x, y);
  4387. }
  4388. }
  4389. if (isAddToPathSet) {
  4390. var paths = this.pendingTextPaths || (this.pendingTextPaths = []);
  4391. paths.push({
  4392. transform: ctx.mozCurrentTransform,
  4393. x: x,
  4394. y: y,
  4395. fontSize: fontSize,
  4396. addToPath: addToPath
  4397. });
  4398. }
  4399. },
  4400. get isFontSubpixelAAEnabled() {
  4401. // Checks if anti-aliasing is enabled when scaled text is painted.
  4402. // On Windows GDI scaled fonts looks bad.
  4403. var ctx = document.createElement('canvas').getContext('2d');
  4404. ctx.scale(1.5, 1);
  4405. ctx.fillText('I', 0, 10);
  4406. var data = ctx.getImageData(0, 0, 10, 10).data;
  4407. var enabled = false;
  4408. for (var i = 3; i < data.length; i += 4) {
  4409. if (data[i] > 0 && data[i] < 255) {
  4410. enabled = true;
  4411. break;
  4412. }
  4413. }
  4414. return shadow(this, 'isFontSubpixelAAEnabled', enabled);
  4415. },
  4416. showText: function CanvasGraphics_showText(glyphs) {
  4417. var current = this.current;
  4418. var font = current.font;
  4419. if (font.isType3Font) {
  4420. return this.showType3Text(glyphs);
  4421. }
  4422. var fontSize = current.fontSize;
  4423. if (fontSize === 0) {
  4424. return;
  4425. }
  4426. var ctx = this.ctx;
  4427. var fontSizeScale = current.fontSizeScale;
  4428. var charSpacing = current.charSpacing;
  4429. var wordSpacing = current.wordSpacing;
  4430. var fontDirection = current.fontDirection;
  4431. var textHScale = current.textHScale * fontDirection;
  4432. var glyphsLength = glyphs.length;
  4433. var vertical = font.vertical;
  4434. var defaultVMetrics = font.defaultVMetrics;
  4435. var widthAdvanceScale = fontSize * current.fontMatrix[0];
  4436. var simpleFillText =
  4437. current.textRenderingMode === TextRenderingMode.FILL &&
  4438. !font.disableFontFace;
  4439. ctx.save();
  4440. ctx.transform.apply(ctx, current.textMatrix);
  4441. ctx.translate(current.x, current.y + current.textRise);
  4442. if (fontDirection > 0) {
  4443. ctx.scale(textHScale, -1);
  4444. } else {
  4445. ctx.scale(textHScale, 1);
  4446. }
  4447. var lineWidth = current.lineWidth;
  4448. var scale = current.textMatrixScale;
  4449. if (scale === 0 || lineWidth === 0) {
  4450. lineWidth = this.getSinglePixelWidth();
  4451. } else {
  4452. lineWidth /= scale;
  4453. }
  4454. if (fontSizeScale != 1.0) {
  4455. ctx.scale(fontSizeScale, fontSizeScale);
  4456. lineWidth /= fontSizeScale;
  4457. }
  4458. ctx.lineWidth = lineWidth;
  4459. var x = 0, i;
  4460. for (i = 0; i < glyphsLength; ++i) {
  4461. var glyph = glyphs[i];
  4462. if (glyph === null) {
  4463. // word break
  4464. x += fontDirection * wordSpacing;
  4465. continue;
  4466. } else if (isNum(glyph)) {
  4467. x += -glyph * fontSize * 0.001;
  4468. continue;
  4469. }
  4470. var restoreNeeded = false;
  4471. var character = glyph.fontChar;
  4472. var accent = glyph.accent;
  4473. var scaledX, scaledY, scaledAccentX, scaledAccentY;
  4474. var width = glyph.width;
  4475. if (vertical) {
  4476. var vmetric, vx, vy;
  4477. vmetric = glyph.vmetric || defaultVMetrics;
  4478. vx = glyph.vmetric ? vmetric[1] : width * 0.5;
  4479. vx = -vx * widthAdvanceScale;
  4480. vy = vmetric[2] * widthAdvanceScale;
  4481. width = vmetric ? -vmetric[0] : width;
  4482. scaledX = vx / fontSizeScale;
  4483. scaledY = (x + vy) / fontSizeScale;
  4484. } else {
  4485. scaledX = x / fontSizeScale;
  4486. scaledY = 0;
  4487. }
  4488. if (font.remeasure && width > 0 && this.isFontSubpixelAAEnabled) {
  4489. // some standard fonts may not have the exact width, trying to
  4490. // rescale per character
  4491. var measuredWidth = ctx.measureText(character).width * 1000 /
  4492. fontSize * fontSizeScale;
  4493. var characterScaleX = width / measuredWidth;
  4494. restoreNeeded = true;
  4495. ctx.save();
  4496. ctx.scale(characterScaleX, 1);
  4497. scaledX /= characterScaleX;
  4498. }
  4499. if (simpleFillText && !accent) {
  4500. // common case
  4501. ctx.fillText(character, scaledX, scaledY);
  4502. } else {
  4503. this.paintChar(character, scaledX, scaledY);
  4504. if (accent) {
  4505. scaledAccentX = scaledX + accent.offset.x / fontSizeScale;
  4506. scaledAccentY = scaledY - accent.offset.y / fontSizeScale;
  4507. this.paintChar(accent.fontChar, scaledAccentX, scaledAccentY);
  4508. }
  4509. }
  4510. var charWidth = width * widthAdvanceScale + charSpacing * fontDirection;
  4511. x += charWidth;
  4512. if (restoreNeeded) {
  4513. ctx.restore();
  4514. }
  4515. }
  4516. if (vertical) {
  4517. current.y -= x * textHScale;
  4518. } else {
  4519. current.x += x * textHScale;
  4520. }
  4521. ctx.restore();
  4522. },
  4523. showType3Text: function CanvasGraphics_showType3Text(glyphs) {
  4524. // Type3 fonts - each glyph is a "mini-PDF"
  4525. var ctx = this.ctx;
  4526. var current = this.current;
  4527. var font = current.font;
  4528. var fontSize = current.fontSize;
  4529. var fontDirection = current.fontDirection;
  4530. var charSpacing = current.charSpacing;
  4531. var wordSpacing = current.wordSpacing;
  4532. var textHScale = current.textHScale * fontDirection;
  4533. var fontMatrix = current.fontMatrix || FONT_IDENTITY_MATRIX;
  4534. var glyphsLength = glyphs.length;
  4535. var i, glyph, width;
  4536. if (fontSize === 0) {
  4537. return;
  4538. }
  4539. ctx.save();
  4540. ctx.transform.apply(ctx, current.textMatrix);
  4541. ctx.translate(current.x, current.y);
  4542. ctx.scale(textHScale, 1);
  4543. for (i = 0; i < glyphsLength; ++i) {
  4544. glyph = glyphs[i];
  4545. if (glyph === null) {
  4546. // word break
  4547. this.ctx.translate(wordSpacing, 0);
  4548. current.x += wordSpacing * textHScale;
  4549. continue;
  4550. } else if (isNum(glyph)) {
  4551. var spacingLength = -glyph * 0.001 * fontSize;
  4552. this.ctx.translate(spacingLength, 0);
  4553. current.x += spacingLength * textHScale;
  4554. continue;
  4555. }
  4556. this.processingType3 = glyph;
  4557. this.save();
  4558. ctx.scale(fontSize, fontSize);
  4559. ctx.transform.apply(ctx, fontMatrix);
  4560. var operatorList = font.charProcOperatorList[glyph.operatorListId];
  4561. this.executeOperatorList(operatorList);
  4562. this.restore();
  4563. var transformed = Util.applyTransform([glyph.width, 0], fontMatrix);
  4564. width = ((transformed[0] * fontSize + charSpacing) * fontDirection);
  4565. ctx.translate(width, 0);
  4566. current.x += width * textHScale;
  4567. }
  4568. ctx.restore();
  4569. this.processingType3 = null;
  4570. },
  4571. // Type3 fonts
  4572. setCharWidth: function CanvasGraphics_setCharWidth(xWidth, yWidth) {
  4573. // We can safely ignore this since the width should be the same
  4574. // as the width in the Widths array.
  4575. },
  4576. setCharWidthAndBounds: function CanvasGraphics_setCharWidthAndBounds(xWidth,
  4577. yWidth,
  4578. llx,
  4579. lly,
  4580. urx,
  4581. ury) {
  4582. // TODO According to the spec we're also suppose to ignore any operators
  4583. // that set color or include images while processing this type3 font.
  4584. this.rectangle(llx, lly, urx - llx, ury - lly);
  4585. this.clip();
  4586. this.endPath();
  4587. },
  4588. // Color
  4589. getColorN_Pattern: function CanvasGraphics_getColorN_Pattern(IR) {
  4590. var pattern;
  4591. if (IR[0] == 'TilingPattern') {
  4592. var color = IR[1];
  4593. pattern = new TilingPattern(IR, color, this.ctx, this.objs,
  4594. this.commonObjs, this.baseTransform);
  4595. } else {
  4596. pattern = getShadingPatternFromIR(IR);
  4597. }
  4598. return pattern;
  4599. },
  4600. setStrokeColorN: function CanvasGraphics_setStrokeColorN(/*...*/) {
  4601. this.current.strokeColor = this.getColorN_Pattern(arguments);
  4602. },
  4603. setFillColorN: function CanvasGraphics_setFillColorN(/*...*/) {
  4604. this.current.fillColor = this.getColorN_Pattern(arguments);
  4605. },
  4606. setStrokeRGBColor: function CanvasGraphics_setStrokeRGBColor(r, g, b) {
  4607. var color = Util.makeCssRgb(arguments);
  4608. this.ctx.strokeStyle = color;
  4609. this.current.strokeColor = color;
  4610. },
  4611. setFillRGBColor: function CanvasGraphics_setFillRGBColor(r, g, b) {
  4612. var color = Util.makeCssRgb(arguments);
  4613. this.ctx.fillStyle = color;
  4614. this.current.fillColor = color;
  4615. },
  4616. shadingFill: function CanvasGraphics_shadingFill(patternIR) {
  4617. var ctx = this.ctx;
  4618. this.save();
  4619. var pattern = getShadingPatternFromIR(patternIR);
  4620. ctx.fillStyle = pattern.getPattern(ctx, this, true);
  4621. var inv = ctx.mozCurrentTransformInverse;
  4622. if (inv) {
  4623. var canvas = ctx.canvas;
  4624. var width = canvas.width;
  4625. var height = canvas.height;
  4626. var bl = Util.applyTransform([0, 0], inv);
  4627. var br = Util.applyTransform([0, height], inv);
  4628. var ul = Util.applyTransform([width, 0], inv);
  4629. var ur = Util.applyTransform([width, height], inv);
  4630. var x0 = Math.min(bl[0], br[0], ul[0], ur[0]);
  4631. var y0 = Math.min(bl[1], br[1], ul[1], ur[1]);
  4632. var x1 = Math.max(bl[0], br[0], ul[0], ur[0]);
  4633. var y1 = Math.max(bl[1], br[1], ul[1], ur[1]);
  4634. this.ctx.fillRect(x0, y0, x1 - x0, y1 - y0);
  4635. } else {
  4636. // HACK to draw the gradient onto an infinite rectangle.
  4637. // PDF gradients are drawn across the entire image while
  4638. // Canvas only allows gradients to be drawn in a rectangle
  4639. // The following bug should allow us to remove this.
  4640. // https://bugzilla.mozilla.org/show_bug.cgi?id=664884
  4641. this.ctx.fillRect(-1e10, -1e10, 2e10, 2e10);
  4642. }
  4643. this.restore();
  4644. },
  4645. // Images
  4646. beginInlineImage: function CanvasGraphics_beginInlineImage() {
  4647. error('Should not call beginInlineImage');
  4648. },
  4649. beginImageData: function CanvasGraphics_beginImageData() {
  4650. error('Should not call beginImageData');
  4651. },
  4652. paintFormXObjectBegin: function CanvasGraphics_paintFormXObjectBegin(matrix,
  4653. bbox) {
  4654. this.save();
  4655. this.baseTransformStack.push(this.baseTransform);
  4656. if (matrix && isArray(matrix) && 6 == matrix.length) {
  4657. this.transform.apply(this, matrix);
  4658. }
  4659. this.baseTransform = this.ctx.mozCurrentTransform;
  4660. if (bbox && isArray(bbox) && 4 == bbox.length) {
  4661. var width = bbox[2] - bbox[0];
  4662. var height = bbox[3] - bbox[1];
  4663. this.rectangle(bbox[0], bbox[1], width, height);
  4664. this.clip();
  4665. this.endPath();
  4666. }
  4667. },
  4668. paintFormXObjectEnd: function CanvasGraphics_paintFormXObjectEnd() {
  4669. this.restore();
  4670. this.baseTransform = this.baseTransformStack.pop();
  4671. },
  4672. beginGroup: function CanvasGraphics_beginGroup(group) {
  4673. this.save();
  4674. var currentCtx = this.ctx;
  4675. // TODO non-isolated groups - according to Rik at adobe non-isolated
  4676. // group results aren't usually that different and they even have tools
  4677. // that ignore this setting. Notes from Rik on implmenting:
  4678. // - When you encounter an transparency group, create a new canvas with
  4679. // the dimensions of the bbox
  4680. // - copy the content from the previous canvas to the new canvas
  4681. // - draw as usual
  4682. // - remove the backdrop alpha:
  4683. // alphaNew = 1 - (1 - alpha)/(1 - alphaBackdrop) with 'alpha' the alpha
  4684. // value of your transparency group and 'alphaBackdrop' the alpha of the
  4685. // backdrop
  4686. // - remove background color:
  4687. // colorNew = color - alphaNew *colorBackdrop /(1 - alphaNew)
  4688. if (!group.isolated) {
  4689. info('TODO: Support non-isolated groups.');
  4690. }
  4691. // TODO knockout - supposedly possible with the clever use of compositing
  4692. // modes.
  4693. if (group.knockout) {
  4694. warn('Knockout groups not supported.');
  4695. }
  4696. var currentTransform = currentCtx.mozCurrentTransform;
  4697. if (group.matrix) {
  4698. currentCtx.transform.apply(currentCtx, group.matrix);
  4699. }
  4700. assert(group.bbox, 'Bounding box is required.');
  4701. // Based on the current transform figure out how big the bounding box
  4702. // will actually be.
  4703. var bounds = Util.getAxialAlignedBoundingBox(
  4704. group.bbox,
  4705. currentCtx.mozCurrentTransform);
  4706. // Clip the bounding box to the current canvas.
  4707. var canvasBounds = [0,
  4708. 0,
  4709. currentCtx.canvas.width,
  4710. currentCtx.canvas.height];
  4711. bounds = Util.intersect(bounds, canvasBounds) || [0, 0, 0, 0];
  4712. // Use ceil in case we're between sizes so we don't create canvas that is
  4713. // too small and make the canvas at least 1x1 pixels.
  4714. var offsetX = Math.floor(bounds[0]);
  4715. var offsetY = Math.floor(bounds[1]);
  4716. var drawnWidth = Math.max(Math.ceil(bounds[2]) - offsetX, 1);
  4717. var drawnHeight = Math.max(Math.ceil(bounds[3]) - offsetY, 1);
  4718. var scaleX = 1, scaleY = 1;
  4719. if (drawnWidth > MAX_GROUP_SIZE) {
  4720. scaleX = drawnWidth / MAX_GROUP_SIZE;
  4721. drawnWidth = MAX_GROUP_SIZE;
  4722. }
  4723. if (drawnHeight > MAX_GROUP_SIZE) {
  4724. scaleY = drawnHeight / MAX_GROUP_SIZE;
  4725. drawnHeight = MAX_GROUP_SIZE;
  4726. }
  4727. var cacheId = 'groupAt' + this.groupLevel;
  4728. if (group.smask) {
  4729. // Using two cache entries is case if masks are used one after another.
  4730. cacheId += '_smask_' + ((this.smaskCounter++) % 2);
  4731. }
  4732. var scratchCanvas = CachedCanvases.getCanvas(
  4733. cacheId, drawnWidth, drawnHeight, true);
  4734. var groupCtx = scratchCanvas.context;
  4735. // Since we created a new canvas that is just the size of the bounding box
  4736. // we have to translate the group ctx.
  4737. groupCtx.scale(1 / scaleX, 1 / scaleY);
  4738. groupCtx.translate(-offsetX, -offsetY);
  4739. groupCtx.transform.apply(groupCtx, currentTransform);
  4740. if (group.smask) {
  4741. // Saving state and cached mask to be used in setGState.
  4742. this.smaskStack.push({
  4743. canvas: scratchCanvas.canvas,
  4744. context: groupCtx,
  4745. offsetX: offsetX,
  4746. offsetY: offsetY,
  4747. scaleX: scaleX,
  4748. scaleY: scaleY,
  4749. subtype: group.smask.subtype,
  4750. backdrop: group.smask.backdrop
  4751. });
  4752. } else {
  4753. // Setup the current ctx so when the group is popped we draw it at the
  4754. // right location.
  4755. currentCtx.setTransform(1, 0, 0, 1, 0, 0);
  4756. currentCtx.translate(offsetX, offsetY);
  4757. currentCtx.scale(scaleX, scaleY);
  4758. }
  4759. // The transparency group inherits all off the current graphics state
  4760. // except the blend mode, soft mask, and alpha constants.
  4761. copyCtxState(currentCtx, groupCtx);
  4762. this.ctx = groupCtx;
  4763. this.setGState([
  4764. ['BM', 'Normal'],
  4765. ['ca', 1],
  4766. ['CA', 1]
  4767. ]);
  4768. this.groupStack.push(currentCtx);
  4769. this.groupLevel++;
  4770. },
  4771. endGroup: function CanvasGraphics_endGroup(group) {
  4772. this.groupLevel--;
  4773. var groupCtx = this.ctx;
  4774. this.ctx = this.groupStack.pop();
  4775. // Turn off image smoothing to avoid sub pixel interpolation which can
  4776. // look kind of blurry for some pdfs.
  4777. if (this.ctx.imageSmoothingEnabled !== undefined) {
  4778. this.ctx.imageSmoothingEnabled = false;
  4779. } else {
  4780. this.ctx.mozImageSmoothingEnabled = false;
  4781. }
  4782. if (group.smask) {
  4783. this.tempSMask = this.smaskStack.pop();
  4784. } else {
  4785. this.ctx.drawImage(groupCtx.canvas, 0, 0);
  4786. }
  4787. this.restore();
  4788. },
  4789. beginAnnotations: function CanvasGraphics_beginAnnotations() {
  4790. this.save();
  4791. this.current = new CanvasExtraState();
  4792. },
  4793. endAnnotations: function CanvasGraphics_endAnnotations() {
  4794. this.restore();
  4795. },
  4796. beginAnnotation: function CanvasGraphics_beginAnnotation(rect, transform,
  4797. matrix) {
  4798. this.save();
  4799. if (rect && isArray(rect) && 4 == rect.length) {
  4800. var width = rect[2] - rect[0];
  4801. var height = rect[3] - rect[1];
  4802. this.rectangle(rect[0], rect[1], width, height);
  4803. this.clip();
  4804. this.endPath();
  4805. }
  4806. this.transform.apply(this, transform);
  4807. this.transform.apply(this, matrix);
  4808. },
  4809. endAnnotation: function CanvasGraphics_endAnnotation() {
  4810. this.restore();
  4811. },
  4812. paintJpegXObject: function CanvasGraphics_paintJpegXObject(objId, w, h) {
  4813. var domImage = this.objs.get(objId);
  4814. if (!domImage) {
  4815. warn('Dependent image isn\'t ready yet');
  4816. return;
  4817. }
  4818. this.save();
  4819. var ctx = this.ctx;
  4820. // scale the image to the unit square
  4821. ctx.scale(1 / w, -1 / h);
  4822. ctx.drawImage(domImage, 0, 0, domImage.width, domImage.height,
  4823. 0, -h, w, h);
  4824. if (this.imageLayer) {
  4825. var currentTransform = ctx.mozCurrentTransformInverse;
  4826. var position = this.getCanvasPosition(0, 0);
  4827. this.imageLayer.appendImage({
  4828. objId: objId,
  4829. left: position[0],
  4830. top: position[1],
  4831. width: w / currentTransform[0],
  4832. height: h / currentTransform[3]
  4833. });
  4834. }
  4835. this.restore();
  4836. },
  4837. paintImageMaskXObject: function CanvasGraphics_paintImageMaskXObject(img) {
  4838. var ctx = this.ctx;
  4839. var width = img.width, height = img.height;
  4840. var glyph = this.processingType3;
  4841. if (COMPILE_TYPE3_GLYPHS && glyph && !('compiled' in glyph)) {
  4842. var MAX_SIZE_TO_COMPILE = 1000;
  4843. if (width <= MAX_SIZE_TO_COMPILE && height <= MAX_SIZE_TO_COMPILE) {
  4844. glyph.compiled =
  4845. compileType3Glyph({data: img.data, width: width, height: height});
  4846. } else {
  4847. glyph.compiled = null;
  4848. }
  4849. }
  4850. if (glyph && glyph.compiled) {
  4851. glyph.compiled(ctx);
  4852. return;
  4853. }
  4854. var maskCanvas = CachedCanvases.getCanvas('maskCanvas', width, height);
  4855. var maskCtx = maskCanvas.context;
  4856. maskCtx.save();
  4857. putBinaryImageMask(maskCtx, img);
  4858. maskCtx.globalCompositeOperation = 'source-in';
  4859. var fillColor = this.current.fillColor;
  4860. maskCtx.fillStyle = (fillColor && fillColor.hasOwnProperty('type') &&
  4861. fillColor.type === 'Pattern') ?
  4862. fillColor.getPattern(maskCtx, this) : fillColor;
  4863. maskCtx.fillRect(0, 0, width, height);
  4864. maskCtx.restore();
  4865. this.paintInlineImageXObject(maskCanvas.canvas);
  4866. },
  4867. paintImageMaskXObjectRepeat:
  4868. function CanvasGraphics_paintImageMaskXObjectRepeat(imgData, scaleX,
  4869. scaleY, positions) {
  4870. var width = imgData.width;
  4871. var height = imgData.height;
  4872. var ctx = this.ctx;
  4873. var maskCanvas = CachedCanvases.getCanvas('maskCanvas', width, height);
  4874. var maskCtx = maskCanvas.context;
  4875. maskCtx.save();
  4876. putBinaryImageMask(maskCtx, imgData);
  4877. maskCtx.globalCompositeOperation = 'source-in';
  4878. var fillColor = this.current.fillColor;
  4879. maskCtx.fillStyle = (fillColor && fillColor.hasOwnProperty('type') &&
  4880. fillColor.type === 'Pattern') ?
  4881. fillColor.getPattern(maskCtx, this) : fillColor;
  4882. maskCtx.fillRect(0, 0, width, height);
  4883. maskCtx.restore();
  4884. for (var i = 0, ii = positions.length; i < ii; i += 2) {
  4885. ctx.save();
  4886. ctx.transform(scaleX, 0, 0, scaleY, positions[i], positions[i + 1]);
  4887. ctx.scale(1, -1);
  4888. ctx.drawImage(maskCanvas.canvas, 0, 0, width, height,
  4889. 0, -1, 1, 1);
  4890. ctx.restore();
  4891. }
  4892. },
  4893. paintImageMaskXObjectGroup:
  4894. function CanvasGraphics_paintImageMaskXObjectGroup(images) {
  4895. var ctx = this.ctx;
  4896. for (var i = 0, ii = images.length; i < ii; i++) {
  4897. var image = images[i];
  4898. var width = image.width, height = image.height;
  4899. var maskCanvas = CachedCanvases.getCanvas('maskCanvas', width, height);
  4900. var maskCtx = maskCanvas.context;
  4901. maskCtx.save();
  4902. putBinaryImageMask(maskCtx, image);
  4903. maskCtx.globalCompositeOperation = 'source-in';
  4904. var fillColor = this.current.fillColor;
  4905. maskCtx.fillStyle = (fillColor && fillColor.hasOwnProperty('type') &&
  4906. fillColor.type === 'Pattern') ?
  4907. fillColor.getPattern(maskCtx, this) : fillColor;
  4908. maskCtx.fillRect(0, 0, width, height);
  4909. maskCtx.restore();
  4910. ctx.save();
  4911. ctx.transform.apply(ctx, image.transform);
  4912. ctx.scale(1, -1);
  4913. ctx.drawImage(maskCanvas.canvas, 0, 0, width, height,
  4914. 0, -1, 1, 1);
  4915. ctx.restore();
  4916. }
  4917. },
  4918. paintImageXObject: function CanvasGraphics_paintImageXObject(objId) {
  4919. var imgData = this.objs.get(objId);
  4920. if (!imgData) {
  4921. warn('Dependent image isn\'t ready yet');
  4922. return;
  4923. }
  4924. this.paintInlineImageXObject(imgData);
  4925. },
  4926. paintImageXObjectRepeat:
  4927. function CanvasGraphics_paintImageXObjectRepeat(objId, scaleX, scaleY,
  4928. positions) {
  4929. var imgData = this.objs.get(objId);
  4930. if (!imgData) {
  4931. warn('Dependent image isn\'t ready yet');
  4932. return;
  4933. }
  4934. var width = imgData.width;
  4935. var height = imgData.height;
  4936. var map = [];
  4937. for (var i = 0, ii = positions.length; i < ii; i += 2) {
  4938. map.push({transform: [scaleX, 0, 0, scaleY, positions[i],
  4939. positions[i + 1]], x: 0, y: 0, w: width, h: height});
  4940. }
  4941. this.paintInlineImageXObjectGroup(imgData, map);
  4942. },
  4943. paintInlineImageXObject:
  4944. function CanvasGraphics_paintInlineImageXObject(imgData) {
  4945. var width = imgData.width;
  4946. var height = imgData.height;
  4947. var ctx = this.ctx;
  4948. this.save();
  4949. // scale the image to the unit square
  4950. ctx.scale(1 / width, -1 / height);
  4951. var currentTransform = ctx.mozCurrentTransformInverse;
  4952. var a = currentTransform[0], b = currentTransform[1];
  4953. var widthScale = Math.max(Math.sqrt(a * a + b * b), 1);
  4954. var c = currentTransform[2], d = currentTransform[3];
  4955. var heightScale = Math.max(Math.sqrt(c * c + d * d), 1);
  4956. var imgToPaint, tmpCanvas;
  4957. // instanceof HTMLElement does not work in jsdom node.js module
  4958. if (imgData instanceof HTMLElement || !imgData.data) {
  4959. imgToPaint = imgData;
  4960. } else {
  4961. tmpCanvas = CachedCanvases.getCanvas('inlineImage', width, height);
  4962. var tmpCtx = tmpCanvas.context;
  4963. putBinaryImageData(tmpCtx, imgData);
  4964. imgToPaint = tmpCanvas.canvas;
  4965. }
  4966. var paintWidth = width, paintHeight = height;
  4967. var tmpCanvasId = 'prescale1';
  4968. // Vertial or horizontal scaling shall not be more than 2 to not loose the
  4969. // pixels during drawImage operation, painting on the temporary canvas(es)
  4970. // that are twice smaller in size
  4971. while ((widthScale > 2 && paintWidth > 1) ||
  4972. (heightScale > 2 && paintHeight > 1)) {
  4973. var newWidth = paintWidth, newHeight = paintHeight;
  4974. if (widthScale > 2 && paintWidth > 1) {
  4975. newWidth = Math.ceil(paintWidth / 2);
  4976. widthScale /= paintWidth / newWidth;
  4977. }
  4978. if (heightScale > 2 && paintHeight > 1) {
  4979. newHeight = Math.ceil(paintHeight / 2);
  4980. heightScale /= paintHeight / newHeight;
  4981. }
  4982. tmpCanvas = CachedCanvases.getCanvas(tmpCanvasId, newWidth, newHeight);
  4983. tmpCtx = tmpCanvas.context;
  4984. tmpCtx.clearRect(0, 0, newWidth, newHeight);
  4985. tmpCtx.drawImage(imgToPaint, 0, 0, paintWidth, paintHeight,
  4986. 0, 0, newWidth, newHeight);
  4987. imgToPaint = tmpCanvas.canvas;
  4988. paintWidth = newWidth;
  4989. paintHeight = newHeight;
  4990. tmpCanvasId = tmpCanvasId === 'prescale1' ? 'prescale2' : 'prescale1';
  4991. }
  4992. ctx.drawImage(imgToPaint, 0, 0, paintWidth, paintHeight,
  4993. 0, -height, width, height);
  4994. if (this.imageLayer) {
  4995. var position = this.getCanvasPosition(0, -height);
  4996. this.imageLayer.appendImage({
  4997. imgData: imgData,
  4998. left: position[0],
  4999. top: position[1],
  5000. width: width / currentTransform[0],
  5001. height: height / currentTransform[3]
  5002. });
  5003. }
  5004. this.restore();
  5005. },
  5006. paintInlineImageXObjectGroup:
  5007. function CanvasGraphics_paintInlineImageXObjectGroup(imgData, map) {
  5008. var ctx = this.ctx;
  5009. var w = imgData.width;
  5010. var h = imgData.height;
  5011. var tmpCanvas = CachedCanvases.getCanvas('inlineImage', w, h);
  5012. var tmpCtx = tmpCanvas.context;
  5013. putBinaryImageData(tmpCtx, imgData);
  5014. for (var i = 0, ii = map.length; i < ii; i++) {
  5015. var entry = map[i];
  5016. ctx.save();
  5017. ctx.transform.apply(ctx, entry.transform);
  5018. ctx.scale(1, -1);
  5019. ctx.drawImage(tmpCanvas.canvas, entry.x, entry.y, entry.w, entry.h,
  5020. 0, -1, 1, 1);
  5021. if (this.imageLayer) {
  5022. var position = this.getCanvasPosition(entry.x, entry.y);
  5023. this.imageLayer.appendImage({
  5024. imgData: imgData,
  5025. left: position[0],
  5026. top: position[1],
  5027. width: w,
  5028. height: h
  5029. });
  5030. }
  5031. ctx.restore();
  5032. }
  5033. },
  5034. paintSolidColorImageMask:
  5035. function CanvasGraphics_paintSolidColorImageMask() {
  5036. this.ctx.fillRect(0, 0, 1, 1);
  5037. },
  5038. // Marked content
  5039. markPoint: function CanvasGraphics_markPoint(tag) {
  5040. // TODO Marked content.
  5041. },
  5042. markPointProps: function CanvasGraphics_markPointProps(tag, properties) {
  5043. // TODO Marked content.
  5044. },
  5045. beginMarkedContent: function CanvasGraphics_beginMarkedContent(tag) {
  5046. // TODO Marked content.
  5047. },
  5048. beginMarkedContentProps: function CanvasGraphics_beginMarkedContentProps(
  5049. tag, properties) {
  5050. // TODO Marked content.
  5051. },
  5052. endMarkedContent: function CanvasGraphics_endMarkedContent() {
  5053. // TODO Marked content.
  5054. },
  5055. // Compatibility
  5056. beginCompat: function CanvasGraphics_beginCompat() {
  5057. // TODO ignore undefined operators (should we do that anyway?)
  5058. },
  5059. endCompat: function CanvasGraphics_endCompat() {
  5060. // TODO stop ignoring undefined operators
  5061. },
  5062. // Helper functions
  5063. consumePath: function CanvasGraphics_consumePath() {
  5064. var ctx = this.ctx;
  5065. if (this.pendingClip) {
  5066. if (this.pendingClip == EO_CLIP) {
  5067. if (ctx.mozFillRule !== undefined) {
  5068. ctx.mozFillRule = 'evenodd';
  5069. ctx.clip();
  5070. ctx.mozFillRule = 'nonzero';
  5071. } else {
  5072. try {
  5073. ctx.clip('evenodd');
  5074. } catch (ex) {
  5075. // shouldn't really happen, but browsers might think differently
  5076. ctx.clip();
  5077. }
  5078. }
  5079. } else {
  5080. ctx.clip();
  5081. }
  5082. this.pendingClip = null;
  5083. }
  5084. ctx.beginPath();
  5085. },
  5086. getSinglePixelWidth: function CanvasGraphics_getSinglePixelWidth(scale) {
  5087. var inverse = this.ctx.mozCurrentTransformInverse;
  5088. // max of the current horizontal and vertical scale
  5089. return Math.sqrt(Math.max(
  5090. (inverse[0] * inverse[0] + inverse[1] * inverse[1]),
  5091. (inverse[2] * inverse[2] + inverse[3] * inverse[3])));
  5092. },
  5093. getCanvasPosition: function CanvasGraphics_getCanvasPosition(x, y) {
  5094. var transform = this.ctx.mozCurrentTransform;
  5095. return [
  5096. transform[0] * x + transform[2] * y + transform[4],
  5097. transform[1] * x + transform[3] * y + transform[5]
  5098. ];
  5099. }
  5100. };
  5101. for (var op in OPS) {
  5102. CanvasGraphics.prototype[OPS[op]] = CanvasGraphics.prototype[op];
  5103. }
  5104. return CanvasGraphics;
  5105. })();
  5106. var WebGLUtils = (function WebGLUtilsClosure() {
  5107. function loadShader(gl, code, shaderType) {
  5108. var shader = gl.createShader(shaderType);
  5109. gl.shaderSource(shader, code);
  5110. gl.compileShader(shader);
  5111. var compiled = gl.getShaderParameter(shader, gl.COMPILE_STATUS);
  5112. if (!compiled) {
  5113. var errorMsg = gl.getShaderInfoLog(shader);
  5114. throw new Error('Error during shader compilation: ' + errorMsg);
  5115. }
  5116. return shader;
  5117. }
  5118. function createVertexShader(gl, code) {
  5119. return loadShader(gl, code, gl.VERTEX_SHADER);
  5120. }
  5121. function createFragmentShader(gl, code) {
  5122. return loadShader(gl, code, gl.FRAGMENT_SHADER);
  5123. }
  5124. function createProgram(gl, shaders) {
  5125. var program = gl.createProgram();
  5126. for (var i = 0, ii = shaders.length; i < ii; ++i) {
  5127. gl.attachShader(program, shaders[i]);
  5128. }
  5129. gl.linkProgram(program);
  5130. var linked = gl.getProgramParameter(program, gl.LINK_STATUS);
  5131. if (!linked) {
  5132. var errorMsg = gl.getProgramInfoLog(program);
  5133. throw new Error('Error during program linking: ' + errorMsg);
  5134. }
  5135. return program;
  5136. }
  5137. function createTexture(gl, image, textureId) {
  5138. gl.activeTexture(textureId);
  5139. var texture = gl.createTexture();
  5140. gl.bindTexture(gl.TEXTURE_2D, texture);
  5141. // Set the parameters so we can render any size image.
  5142. gl.texParameteri(gl.TEXTURE_2D, gl.TEXTURE_WRAP_S, gl.CLAMP_TO_EDGE);
  5143. gl.texParameteri(gl.TEXTURE_2D, gl.TEXTURE_WRAP_T, gl.CLAMP_TO_EDGE);
  5144. gl.texParameteri(gl.TEXTURE_2D, gl.TEXTURE_MIN_FILTER, gl.NEAREST);
  5145. gl.texParameteri(gl.TEXTURE_2D, gl.TEXTURE_MAG_FILTER, gl.NEAREST);
  5146. // Upload the image into the texture.
  5147. gl.texImage2D(gl.TEXTURE_2D, 0, gl.RGBA, gl.RGBA, gl.UNSIGNED_BYTE, image);
  5148. return texture;
  5149. }
  5150. var currentGL, currentCanvas;
  5151. function generageGL() {
  5152. if (currentGL) {
  5153. return;
  5154. }
  5155. currentCanvas = document.createElement('canvas');
  5156. currentGL = currentCanvas.getContext('webgl',
  5157. { premultipliedalpha: false });
  5158. }
  5159. var smaskVertexShaderCode = '\
  5160. attribute vec2 a_position; \
  5161. attribute vec2 a_texCoord; \
  5162. \
  5163. uniform vec2 u_resolution; \
  5164. \
  5165. varying vec2 v_texCoord; \
  5166. \
  5167. void main() { \
  5168. vec2 clipSpace = (a_position / u_resolution) * 2.0 - 1.0; \
  5169. gl_Position = vec4(clipSpace * vec2(1, -1), 0, 1); \
  5170. \
  5171. v_texCoord = a_texCoord; \
  5172. } ';
  5173. var smaskFragmentShaderCode = '\
  5174. precision mediump float; \
  5175. \
  5176. uniform vec4 u_backdrop; \
  5177. uniform int u_subtype; \
  5178. uniform sampler2D u_image; \
  5179. uniform sampler2D u_mask; \
  5180. \
  5181. varying vec2 v_texCoord; \
  5182. \
  5183. void main() { \
  5184. vec4 imageColor = texture2D(u_image, v_texCoord); \
  5185. vec4 maskColor = texture2D(u_mask, v_texCoord); \
  5186. if (u_backdrop.a > 0.0) { \
  5187. maskColor.rgb = maskColor.rgb * maskColor.a + \
  5188. u_backdrop.rgb * (1.0 - maskColor.a); \
  5189. } \
  5190. float lum; \
  5191. if (u_subtype == 0) { \
  5192. lum = maskColor.a; \
  5193. } else { \
  5194. lum = maskColor.r * 0.3 + maskColor.g * 0.59 + \
  5195. maskColor.b * 0.11; \
  5196. } \
  5197. imageColor.a *= lum; \
  5198. imageColor.rgb *= imageColor.a; \
  5199. gl_FragColor = imageColor; \
  5200. } ';
  5201. var smaskCache = null;
  5202. function initSmaskGL() {
  5203. var canvas, gl;
  5204. generageGL();
  5205. canvas = currentCanvas;
  5206. currentCanvas = null;
  5207. gl = currentGL;
  5208. currentGL = null;
  5209. // setup a GLSL program
  5210. var vertexShader = createVertexShader(gl, smaskVertexShaderCode);
  5211. var fragmentShader = createFragmentShader(gl, smaskFragmentShaderCode);
  5212. var program = createProgram(gl, [vertexShader, fragmentShader]);
  5213. gl.useProgram(program);
  5214. var cache = {};
  5215. cache.gl = gl;
  5216. cache.canvas = canvas;
  5217. cache.resolutionLocation = gl.getUniformLocation(program, 'u_resolution');
  5218. cache.positionLocation = gl.getAttribLocation(program, 'a_position');
  5219. cache.backdropLocation = gl.getUniformLocation(program, 'u_backdrop');
  5220. cache.subtypeLocation = gl.getUniformLocation(program, 'u_subtype');
  5221. var texCoordLocation = gl.getAttribLocation(program, 'a_texCoord');
  5222. var texLayerLocation = gl.getUniformLocation(program, 'u_image');
  5223. var texMaskLocation = gl.getUniformLocation(program, 'u_mask');
  5224. // provide texture coordinates for the rectangle.
  5225. var texCoordBuffer = gl.createBuffer();
  5226. gl.bindBuffer(gl.ARRAY_BUFFER, texCoordBuffer);
  5227. gl.bufferData(gl.ARRAY_BUFFER, new Float32Array([
  5228. 0.0, 0.0,
  5229. 1.0, 0.0,
  5230. 0.0, 1.0,
  5231. 0.0, 1.0,
  5232. 1.0, 0.0,
  5233. 1.0, 1.0]), gl.STATIC_DRAW);
  5234. gl.enableVertexAttribArray(texCoordLocation);
  5235. gl.vertexAttribPointer(texCoordLocation, 2, gl.FLOAT, false, 0, 0);
  5236. gl.uniform1i(texLayerLocation, 0);
  5237. gl.uniform1i(texMaskLocation, 1);
  5238. smaskCache = cache;
  5239. }
  5240. function composeSMask(layer, mask, properties) {
  5241. var width = layer.width, height = layer.height;
  5242. if (!smaskCache) {
  5243. initSmaskGL();
  5244. }
  5245. var cache = smaskCache,canvas = cache.canvas, gl = cache.gl;
  5246. canvas.width = width;
  5247. canvas.height = height;
  5248. gl.viewport(0, 0, gl.drawingBufferWidth, gl.drawingBufferHeight);
  5249. gl.uniform2f(cache.resolutionLocation, width, height);
  5250. if (properties.backdrop) {
  5251. gl.uniform4f(cache.resolutionLocation, properties.backdrop[0],
  5252. properties.backdrop[1], properties.backdrop[2], 1);
  5253. } else {
  5254. gl.uniform4f(cache.resolutionLocation, 0, 0, 0, 0);
  5255. }
  5256. gl.uniform1i(cache.subtypeLocation,
  5257. properties.subtype === 'Luminosity' ? 1 : 0);
  5258. // Create a textures
  5259. var texture = createTexture(gl, layer, gl.TEXTURE0);
  5260. var maskTexture = createTexture(gl, mask, gl.TEXTURE1);
  5261. // Create a buffer and put a single clipspace rectangle in
  5262. // it (2 triangles)
  5263. var buffer = gl.createBuffer();
  5264. gl.bindBuffer(gl.ARRAY_BUFFER, buffer);
  5265. gl.bufferData(gl.ARRAY_BUFFER, new Float32Array([
  5266. 0, 0,
  5267. width, 0,
  5268. 0, height,
  5269. 0, height,
  5270. width, 0,
  5271. width, height]), gl.STATIC_DRAW);
  5272. gl.enableVertexAttribArray(cache.positionLocation);
  5273. gl.vertexAttribPointer(cache.positionLocation, 2, gl.FLOAT, false, 0, 0);
  5274. // draw
  5275. gl.clearColor(0, 0, 0, 0);
  5276. gl.enable(gl.BLEND);
  5277. gl.blendFunc(gl.ONE, gl.ONE_MINUS_SRC_ALPHA);
  5278. gl.clear(gl.COLOR_BUFFER_BIT);
  5279. gl.drawArrays(gl.TRIANGLES, 0, 6);
  5280. gl.flush();
  5281. gl.deleteTexture(texture);
  5282. gl.deleteTexture(maskTexture);
  5283. gl.deleteBuffer(buffer);
  5284. return canvas;
  5285. }
  5286. var figuresVertexShaderCode = '\
  5287. attribute vec2 a_position; \
  5288. attribute vec3 a_color; \
  5289. \
  5290. uniform vec2 u_resolution; \
  5291. uniform vec2 u_scale; \
  5292. uniform vec2 u_offset; \
  5293. \
  5294. varying vec4 v_color; \
  5295. \
  5296. void main() { \
  5297. vec2 position = (a_position + u_offset) * u_scale; \
  5298. vec2 clipSpace = (position / u_resolution) * 2.0 - 1.0; \
  5299. gl_Position = vec4(clipSpace * vec2(1, -1), 0, 1); \
  5300. \
  5301. v_color = vec4(a_color / 255.0, 1.0); \
  5302. } ';
  5303. var figuresFragmentShaderCode = '\
  5304. precision mediump float; \
  5305. \
  5306. varying vec4 v_color; \
  5307. \
  5308. void main() { \
  5309. gl_FragColor = v_color; \
  5310. } ';
  5311. var figuresCache = null;
  5312. function initFiguresGL() {
  5313. var canvas, gl;
  5314. generageGL();
  5315. canvas = currentCanvas;
  5316. currentCanvas = null;
  5317. gl = currentGL;
  5318. currentGL = null;
  5319. // setup a GLSL program
  5320. var vertexShader = createVertexShader(gl, figuresVertexShaderCode);
  5321. var fragmentShader = createFragmentShader(gl, figuresFragmentShaderCode);
  5322. var program = createProgram(gl, [vertexShader, fragmentShader]);
  5323. gl.useProgram(program);
  5324. var cache = {};
  5325. cache.gl = gl;
  5326. cache.canvas = canvas;
  5327. cache.resolutionLocation = gl.getUniformLocation(program, 'u_resolution');
  5328. cache.scaleLocation = gl.getUniformLocation(program, 'u_scale');
  5329. cache.offsetLocation = gl.getUniformLocation(program, 'u_offset');
  5330. cache.positionLocation = gl.getAttribLocation(program, 'a_position');
  5331. cache.colorLocation = gl.getAttribLocation(program, 'a_color');
  5332. figuresCache = cache;
  5333. }
  5334. function drawFigures(width, height, backgroundColor, figures, context) {
  5335. if (!figuresCache) {
  5336. initFiguresGL();
  5337. }
  5338. var cache = figuresCache, canvas = cache.canvas, gl = cache.gl;
  5339. canvas.width = width;
  5340. canvas.height = height;
  5341. gl.viewport(0, 0, gl.drawingBufferWidth, gl.drawingBufferHeight);
  5342. gl.uniform2f(cache.resolutionLocation, width, height);
  5343. // count triangle points
  5344. var count = 0;
  5345. var i, ii, rows;
  5346. for (i = 0, ii = figures.length; i < ii; i++) {
  5347. switch (figures[i].type) {
  5348. case 'lattice':
  5349. rows = (figures[i].coords.length / figures[i].verticesPerRow) | 0;
  5350. count += (rows - 1) * (figures[i].verticesPerRow - 1) * 6;
  5351. break;
  5352. case 'triangles':
  5353. count += figures[i].coords.length;
  5354. break;
  5355. }
  5356. }
  5357. // transfer data
  5358. var coords = new Float32Array(count * 2);
  5359. var colors = new Uint8Array(count * 3);
  5360. var coordsMap = context.coords, colorsMap = context.colors;
  5361. var pIndex = 0, cIndex = 0;
  5362. for (i = 0, ii = figures.length; i < ii; i++) {
  5363. var figure = figures[i], ps = figure.coords, cs = figure.colors;
  5364. switch (figure.type) {
  5365. case 'lattice':
  5366. var cols = figure.verticesPerRow;
  5367. rows = (ps.length / cols) | 0;
  5368. for (var row = 1; row < rows; row++) {
  5369. var offset = row * cols + 1;
  5370. for (var col = 1; col < cols; col++, offset++) {
  5371. coords[pIndex] = coordsMap[ps[offset - cols - 1]];
  5372. coords[pIndex + 1] = coordsMap[ps[offset - cols - 1] + 1];
  5373. coords[pIndex + 2] = coordsMap[ps[offset - cols]];
  5374. coords[pIndex + 3] = coordsMap[ps[offset - cols] + 1];
  5375. coords[pIndex + 4] = coordsMap[ps[offset - 1]];
  5376. coords[pIndex + 5] = coordsMap[ps[offset - 1] + 1];
  5377. colors[cIndex] = colorsMap[cs[offset - cols - 1]];
  5378. colors[cIndex + 1] = colorsMap[cs[offset - cols - 1] + 1];
  5379. colors[cIndex + 2] = colorsMap[cs[offset - cols - 1] + 2];
  5380. colors[cIndex + 3] = colorsMap[cs[offset - cols]];
  5381. colors[cIndex + 4] = colorsMap[cs[offset - cols] + 1];
  5382. colors[cIndex + 5] = colorsMap[cs[offset - cols] + 2];
  5383. colors[cIndex + 6] = colorsMap[cs[offset - 1]];
  5384. colors[cIndex + 7] = colorsMap[cs[offset - 1] + 1];
  5385. colors[cIndex + 8] = colorsMap[cs[offset - 1] + 2];
  5386. coords[pIndex + 6] = coords[pIndex + 2];
  5387. coords[pIndex + 7] = coords[pIndex + 3];
  5388. coords[pIndex + 8] = coords[pIndex + 4];
  5389. coords[pIndex + 9] = coords[pIndex + 5];
  5390. coords[pIndex + 10] = coordsMap[ps[offset]];
  5391. coords[pIndex + 11] = coordsMap[ps[offset] + 1];
  5392. colors[cIndex + 9] = colors[cIndex + 3];
  5393. colors[cIndex + 10] = colors[cIndex + 4];
  5394. colors[cIndex + 11] = colors[cIndex + 5];
  5395. colors[cIndex + 12] = colors[cIndex + 6];
  5396. colors[cIndex + 13] = colors[cIndex + 7];
  5397. colors[cIndex + 14] = colors[cIndex + 8];
  5398. colors[cIndex + 15] = colorsMap[cs[offset]];
  5399. colors[cIndex + 16] = colorsMap[cs[offset] + 1];
  5400. colors[cIndex + 17] = colorsMap[cs[offset] + 2];
  5401. pIndex += 12;
  5402. cIndex += 18;
  5403. }
  5404. }
  5405. break;
  5406. case 'triangles':
  5407. for (var j = 0, jj = ps.length; j < jj; j++) {
  5408. coords[pIndex] = coordsMap[ps[j]];
  5409. coords[pIndex + 1] = coordsMap[ps[j] + 1];
  5410. colors[cIndex] = colorsMap[cs[i]];
  5411. colors[cIndex + 1] = colorsMap[cs[j] + 1];
  5412. colors[cIndex + 2] = colorsMap[cs[j] + 2];
  5413. pIndex += 2;
  5414. cIndex += 3;
  5415. }
  5416. break;
  5417. }
  5418. }
  5419. // draw
  5420. if (backgroundColor) {
  5421. gl.clearColor(backgroundColor[0] / 255, backgroundColor[1] / 255,
  5422. backgroundColor[2] / 255, 1.0);
  5423. } else {
  5424. gl.clearColor(0, 0, 0, 0);
  5425. }
  5426. gl.clear(gl.COLOR_BUFFER_BIT);
  5427. var coordsBuffer = gl.createBuffer();
  5428. gl.bindBuffer(gl.ARRAY_BUFFER, coordsBuffer);
  5429. gl.bufferData(gl.ARRAY_BUFFER, coords, gl.STATIC_DRAW);
  5430. gl.enableVertexAttribArray(cache.positionLocation);
  5431. gl.vertexAttribPointer(cache.positionLocation, 2, gl.FLOAT, false, 0, 0);
  5432. var colorsBuffer = gl.createBuffer();
  5433. gl.bindBuffer(gl.ARRAY_BUFFER, colorsBuffer);
  5434. gl.bufferData(gl.ARRAY_BUFFER, colors, gl.STATIC_DRAW);
  5435. gl.enableVertexAttribArray(cache.colorLocation);
  5436. gl.vertexAttribPointer(cache.colorLocation, 3, gl.UNSIGNED_BYTE, false,
  5437. 0, 0);
  5438. gl.uniform2f(cache.scaleLocation, context.scaleX, context.scaleY);
  5439. gl.uniform2f(cache.offsetLocation, context.offsetX, context.offsetY);
  5440. gl.drawArrays(gl.TRIANGLES, 0, count);
  5441. gl.flush();
  5442. gl.deleteBuffer(coordsBuffer);
  5443. gl.deleteBuffer(colorsBuffer);
  5444. return canvas;
  5445. }
  5446. function cleanup() {
  5447. smaskCache = null;
  5448. figuresCache = null;
  5449. }
  5450. return {
  5451. get isEnabled() {
  5452. if (PDFJS.disableWebGL) {
  5453. return false;
  5454. }
  5455. var enabled = false;
  5456. try {
  5457. generageGL();
  5458. enabled = !!currentGL;
  5459. } catch (e) { }
  5460. return shadow(this, 'isEnabled', enabled);
  5461. },
  5462. composeSMask: composeSMask,
  5463. drawFigures: drawFigures,
  5464. clear: cleanup
  5465. };
  5466. })();
  5467. var ShadingIRs = {};
  5468. ShadingIRs.RadialAxial = {
  5469. fromIR: function RadialAxial_fromIR(raw) {
  5470. var type = raw[1];
  5471. var colorStops = raw[2];
  5472. var p0 = raw[3];
  5473. var p1 = raw[4];
  5474. var r0 = raw[5];
  5475. var r1 = raw[6];
  5476. return {
  5477. type: 'Pattern',
  5478. getPattern: function RadialAxial_getPattern(ctx) {
  5479. var grad;
  5480. if (type === 'axial') {
  5481. grad = ctx.createLinearGradient(p0[0], p0[1], p1[0], p1[1]);
  5482. } else if (type === 'radial') {
  5483. grad = ctx.createRadialGradient(p0[0], p0[1], r0, p1[0], p1[1], r1);
  5484. }
  5485. for (var i = 0, ii = colorStops.length; i < ii; ++i) {
  5486. var c = colorStops[i];
  5487. grad.addColorStop(c[0], c[1]);
  5488. }
  5489. return grad;
  5490. }
  5491. };
  5492. }
  5493. };
  5494. var createMeshCanvas = (function createMeshCanvasClosure() {
  5495. function drawTriangle(data, context, p1, p2, p3, c1, c2, c3) {
  5496. // Very basic Gouraud-shaded triangle rasterization algorithm.
  5497. var coords = context.coords, colors = context.colors;
  5498. var bytes = data.data, rowSize = data.width * 4;
  5499. var tmp;
  5500. if (coords[p1 + 1] > coords[p2 + 1]) {
  5501. tmp = p1; p1 = p2; p2 = tmp; tmp = c1; c1 = c2; c2 = tmp;
  5502. }
  5503. if (coords[p2 + 1] > coords[p3 + 1]) {
  5504. tmp = p2; p2 = p3; p3 = tmp; tmp = c2; c2 = c3; c3 = tmp;
  5505. }
  5506. if (coords[p1 + 1] > coords[p2 + 1]) {
  5507. tmp = p1; p1 = p2; p2 = tmp; tmp = c1; c1 = c2; c2 = tmp;
  5508. }
  5509. var x1 = (coords[p1] + context.offsetX) * context.scaleX;
  5510. var y1 = (coords[p1 + 1] + context.offsetY) * context.scaleY;
  5511. var x2 = (coords[p2] + context.offsetX) * context.scaleX;
  5512. var y2 = (coords[p2 + 1] + context.offsetY) * context.scaleY;
  5513. var x3 = (coords[p3] + context.offsetX) * context.scaleX;
  5514. var y3 = (coords[p3 + 1] + context.offsetY) * context.scaleY;
  5515. if (y1 >= y3) {
  5516. return;
  5517. }
  5518. var c1r = colors[c1], c1g = colors[c1 + 1], c1b = colors[c1 + 2];
  5519. var c2r = colors[c2], c2g = colors[c2 + 1], c2b = colors[c2 + 2];
  5520. var c3r = colors[c3], c3g = colors[c3 + 1], c3b = colors[c3 + 2];
  5521. var minY = Math.round(y1), maxY = Math.round(y3);
  5522. var xa, car, cag, cab;
  5523. var xb, cbr, cbg, cbb;
  5524. var k;
  5525. for (var y = minY; y <= maxY; y++) {
  5526. if (y < y2) {
  5527. k = y < y1 ? 0 : y1 === y2 ? 1 : (y1 - y) / (y1 - y2);
  5528. xa = x1 - (x1 - x2) * k;
  5529. car = c1r - (c1r - c2r) * k;
  5530. cag = c1g - (c1g - c2g) * k;
  5531. cab = c1b - (c1b - c2b) * k;
  5532. } else {
  5533. k = y > y3 ? 1 : y2 === y3 ? 0 : (y2 - y) / (y2 - y3);
  5534. xa = x2 - (x2 - x3) * k;
  5535. car = c2r - (c2r - c3r) * k;
  5536. cag = c2g - (c2g - c3g) * k;
  5537. cab = c2b - (c2b - c3b) * k;
  5538. }
  5539. k = y < y1 ? 0 : y > y3 ? 1 : (y1 - y) / (y1 - y3);
  5540. xb = x1 - (x1 - x3) * k;
  5541. cbr = c1r - (c1r - c3r) * k;
  5542. cbg = c1g - (c1g - c3g) * k;
  5543. cbb = c1b - (c1b - c3b) * k;
  5544. var x1_ = Math.round(Math.min(xa, xb));
  5545. var x2_ = Math.round(Math.max(xa, xb));
  5546. var j = rowSize * y + x1_ * 4;
  5547. for (var x = x1_; x <= x2_; x++) {
  5548. k = (xa - x) / (xa - xb);
  5549. k = k < 0 ? 0 : k > 1 ? 1 : k;
  5550. bytes[j++] = (car - (car - cbr) * k) | 0;
  5551. bytes[j++] = (cag - (cag - cbg) * k) | 0;
  5552. bytes[j++] = (cab - (cab - cbb) * k) | 0;
  5553. bytes[j++] = 255;
  5554. }
  5555. }
  5556. }
  5557. function drawFigure(data, figure, context) {
  5558. var ps = figure.coords;
  5559. var cs = figure.colors;
  5560. var i, ii;
  5561. switch (figure.type) {
  5562. case 'lattice':
  5563. var verticesPerRow = figure.verticesPerRow;
  5564. var rows = Math.floor(ps.length / verticesPerRow) - 1;
  5565. var cols = verticesPerRow - 1;
  5566. for (i = 0; i < rows; i++) {
  5567. var q = i * verticesPerRow;
  5568. for (var j = 0; j < cols; j++, q++) {
  5569. drawTriangle(data, context,
  5570. ps[q], ps[q + 1], ps[q + verticesPerRow],
  5571. cs[q], cs[q + 1], cs[q + verticesPerRow]);
  5572. drawTriangle(data, context,
  5573. ps[q + verticesPerRow + 1], ps[q + 1], ps[q + verticesPerRow],
  5574. cs[q + verticesPerRow + 1], cs[q + 1], cs[q + verticesPerRow]);
  5575. }
  5576. }
  5577. break;
  5578. case 'triangles':
  5579. for (i = 0, ii = ps.length; i < ii; i += 3) {
  5580. drawTriangle(data, context,
  5581. ps[i], ps[i + 1], ps[i + 2],
  5582. cs[i], cs[i + 1], cs[i + 2]);
  5583. }
  5584. break;
  5585. default:
  5586. error('illigal figure');
  5587. break;
  5588. }
  5589. }
  5590. function createMeshCanvas(bounds, combinesScale, coords, colors, figures,
  5591. backgroundColor) {
  5592. // we will increase scale on some weird factor to let antialiasing take
  5593. // care of "rough" edges
  5594. var EXPECTED_SCALE = 1.1;
  5595. // MAX_PATTERN_SIZE is used to avoid OOM situation.
  5596. var MAX_PATTERN_SIZE = 3000; // 10in @ 300dpi shall be enough
  5597. var offsetX = Math.floor(bounds[0]);
  5598. var offsetY = Math.floor(bounds[1]);
  5599. var boundsWidth = Math.ceil(bounds[2]) - offsetX;
  5600. var boundsHeight = Math.ceil(bounds[3]) - offsetY;
  5601. var width = Math.min(Math.ceil(Math.abs(boundsWidth * combinesScale[0] *
  5602. EXPECTED_SCALE)), MAX_PATTERN_SIZE);
  5603. var height = Math.min(Math.ceil(Math.abs(boundsHeight * combinesScale[1] *
  5604. EXPECTED_SCALE)), MAX_PATTERN_SIZE);
  5605. var scaleX = boundsWidth / width;
  5606. var scaleY = boundsHeight / height;
  5607. var context = {
  5608. coords: coords,
  5609. colors: colors,
  5610. offsetX: -offsetX,
  5611. offsetY: -offsetY,
  5612. scaleX: 1 / scaleX,
  5613. scaleY: 1 / scaleY
  5614. };
  5615. var canvas, tmpCanvas, i, ii;
  5616. if (WebGLUtils.isEnabled) {
  5617. canvas = WebGLUtils.drawFigures(width, height, backgroundColor,
  5618. figures, context);
  5619. // https://bugzilla.mozilla.org/show_bug.cgi?id=972126
  5620. tmpCanvas = CachedCanvases.getCanvas('mesh', width, height, false);
  5621. tmpCanvas.context.drawImage(canvas, 0, 0);
  5622. canvas = tmpCanvas.canvas;
  5623. } else {
  5624. tmpCanvas = CachedCanvases.getCanvas('mesh', width, height, false);
  5625. var tmpCtx = tmpCanvas.context;
  5626. var data = tmpCtx.createImageData(width, height);
  5627. if (backgroundColor) {
  5628. var bytes = data.data;
  5629. for (i = 0, ii = bytes.length; i < ii; i += 4) {
  5630. bytes[i] = backgroundColor[0];
  5631. bytes[i + 1] = backgroundColor[1];
  5632. bytes[i + 2] = backgroundColor[2];
  5633. bytes[i + 3] = 255;
  5634. }
  5635. }
  5636. for (i = 0; i < figures.length; i++) {
  5637. drawFigure(data, figures[i], context);
  5638. }
  5639. tmpCtx.putImageData(data, 0, 0);
  5640. canvas = tmpCanvas.canvas;
  5641. }
  5642. return {canvas: canvas, offsetX: offsetX, offsetY: offsetY,
  5643. scaleX: scaleX, scaleY: scaleY};
  5644. }
  5645. return createMeshCanvas;
  5646. })();
  5647. ShadingIRs.Mesh = {
  5648. fromIR: function Mesh_fromIR(raw) {
  5649. //var type = raw[1];
  5650. var coords = raw[2];
  5651. var colors = raw[3];
  5652. var figures = raw[4];
  5653. var bounds = raw[5];
  5654. var matrix = raw[6];
  5655. //var bbox = raw[7];
  5656. var background = raw[8];
  5657. return {
  5658. type: 'Pattern',
  5659. getPattern: function Mesh_getPattern(ctx, owner, shadingFill) {
  5660. var combinedScale;
  5661. // Obtain scale from matrix and current transformation matrix.
  5662. if (shadingFill) {
  5663. combinedScale = Util.singularValueDecompose2dScale(
  5664. ctx.mozCurrentTransform);
  5665. } else {
  5666. var matrixScale = Util.singularValueDecompose2dScale(matrix);
  5667. var curMatrixScale = Util.singularValueDecompose2dScale(
  5668. owner.baseTransform);
  5669. combinedScale = [matrixScale[0] * curMatrixScale[0],
  5670. matrixScale[1] * curMatrixScale[1]];
  5671. }
  5672. // Rasterizing on the main thread since sending/queue large canvases
  5673. // might cause OOM.
  5674. var temporaryPatternCanvas = createMeshCanvas(bounds, combinedScale,
  5675. coords, colors, figures, shadingFill ? null : background);
  5676. if (!shadingFill) {
  5677. ctx.setTransform.apply(ctx, owner.baseTransform);
  5678. if (matrix) {
  5679. ctx.transform.apply(ctx, matrix);
  5680. }
  5681. }
  5682. ctx.translate(temporaryPatternCanvas.offsetX,
  5683. temporaryPatternCanvas.offsetY);
  5684. ctx.scale(temporaryPatternCanvas.scaleX,
  5685. temporaryPatternCanvas.scaleY);
  5686. return ctx.createPattern(temporaryPatternCanvas.canvas, 'no-repeat');
  5687. }
  5688. };
  5689. }
  5690. };
  5691. ShadingIRs.Dummy = {
  5692. fromIR: function Dummy_fromIR() {
  5693. return {
  5694. type: 'Pattern',
  5695. getPattern: function Dummy_fromIR_getPattern() {
  5696. return 'hotpink';
  5697. }
  5698. };
  5699. }
  5700. };
  5701. function getShadingPatternFromIR(raw) {
  5702. var shadingIR = ShadingIRs[raw[0]];
  5703. if (!shadingIR) {
  5704. error('Unknown IR type: ' + raw[0]);
  5705. }
  5706. return shadingIR.fromIR(raw);
  5707. }
  5708. var TilingPattern = (function TilingPatternClosure() {
  5709. var PaintType = {
  5710. COLORED: 1,
  5711. UNCOLORED: 2
  5712. };
  5713. var MAX_PATTERN_SIZE = 3000; // 10in @ 300dpi shall be enough
  5714. function TilingPattern(IR, color, ctx, objs, commonObjs, baseTransform) {
  5715. this.operatorList = IR[2];
  5716. this.matrix = IR[3] || [1, 0, 0, 1, 0, 0];
  5717. this.bbox = IR[4];
  5718. this.xstep = IR[5];
  5719. this.ystep = IR[6];
  5720. this.paintType = IR[7];
  5721. this.tilingType = IR[8];
  5722. this.color = color;
  5723. this.objs = objs;
  5724. this.commonObjs = commonObjs;
  5725. this.baseTransform = baseTransform;
  5726. this.type = 'Pattern';
  5727. this.ctx = ctx;
  5728. }
  5729. TilingPattern.prototype = {
  5730. createPatternCanvas: function TilinPattern_createPatternCanvas(owner) {
  5731. var operatorList = this.operatorList;
  5732. var bbox = this.bbox;
  5733. var xstep = this.xstep;
  5734. var ystep = this.ystep;
  5735. var paintType = this.paintType;
  5736. var tilingType = this.tilingType;
  5737. var color = this.color;
  5738. var objs = this.objs;
  5739. var commonObjs = this.commonObjs;
  5740. info('TilingType: ' + tilingType);
  5741. var x0 = bbox[0], y0 = bbox[1], x1 = bbox[2], y1 = bbox[3];
  5742. var topLeft = [x0, y0];
  5743. // we want the canvas to be as large as the step size
  5744. var botRight = [x0 + xstep, y0 + ystep];
  5745. var width = botRight[0] - topLeft[0];
  5746. var height = botRight[1] - topLeft[1];
  5747. // Obtain scale from matrix and current transformation matrix.
  5748. var matrixScale = Util.singularValueDecompose2dScale(this.matrix);
  5749. var curMatrixScale = Util.singularValueDecompose2dScale(
  5750. this.baseTransform);
  5751. var combinedScale = [matrixScale[0] * curMatrixScale[0],
  5752. matrixScale[1] * curMatrixScale[1]];
  5753. // MAX_PATTERN_SIZE is used to avoid OOM situation.
  5754. // Use width and height values that are as close as possible to the end
  5755. // result when the pattern is used. Too low value makes the pattern look
  5756. // blurry. Too large value makes it look too crispy.
  5757. width = Math.min(Math.ceil(Math.abs(width * combinedScale[0])),
  5758. MAX_PATTERN_SIZE);
  5759. height = Math.min(Math.ceil(Math.abs(height * combinedScale[1])),
  5760. MAX_PATTERN_SIZE);
  5761. var tmpCanvas = CachedCanvases.getCanvas('pattern', width, height, true);
  5762. var tmpCtx = tmpCanvas.context;
  5763. var graphics = new CanvasGraphics(tmpCtx, commonObjs, objs);
  5764. graphics.groupLevel = owner.groupLevel;
  5765. this.setFillAndStrokeStyleToContext(tmpCtx, paintType, color);
  5766. this.setScale(width, height, xstep, ystep);
  5767. this.transformToScale(graphics);
  5768. // transform coordinates to pattern space
  5769. var tmpTranslate = [1, 0, 0, 1, -topLeft[0], -topLeft[1]];
  5770. graphics.transform.apply(graphics, tmpTranslate);
  5771. this.clipBbox(graphics, bbox, x0, y0, x1, y1);
  5772. graphics.executeOperatorList(operatorList);
  5773. return tmpCanvas.canvas;
  5774. },
  5775. setScale: function TilingPattern_setScale(width, height, xstep, ystep) {
  5776. this.scale = [width / xstep, height / ystep];
  5777. },
  5778. transformToScale: function TilingPattern_transformToScale(graphics) {
  5779. var scale = this.scale;
  5780. var tmpScale = [scale[0], 0, 0, scale[1], 0, 0];
  5781. graphics.transform.apply(graphics, tmpScale);
  5782. },
  5783. scaleToContext: function TilingPattern_scaleToContext() {
  5784. var scale = this.scale;
  5785. this.ctx.scale(1 / scale[0], 1 / scale[1]);
  5786. },
  5787. clipBbox: function clipBbox(graphics, bbox, x0, y0, x1, y1) {
  5788. if (bbox && isArray(bbox) && 4 == bbox.length) {
  5789. var bboxWidth = x1 - x0;
  5790. var bboxHeight = y1 - y0;
  5791. graphics.rectangle(x0, y0, bboxWidth, bboxHeight);
  5792. graphics.clip();
  5793. graphics.endPath();
  5794. }
  5795. },
  5796. setFillAndStrokeStyleToContext:
  5797. function setFillAndStrokeStyleToContext(context, paintType, color) {
  5798. switch (paintType) {
  5799. case PaintType.COLORED:
  5800. var ctx = this.ctx;
  5801. context.fillStyle = ctx.fillStyle;
  5802. context.strokeStyle = ctx.strokeStyle;
  5803. break;
  5804. case PaintType.UNCOLORED:
  5805. var cssColor = Util.makeCssRgb(color);
  5806. context.fillStyle = cssColor;
  5807. context.strokeStyle = cssColor;
  5808. break;
  5809. default:
  5810. error('Unsupported paint type: ' + paintType);
  5811. }
  5812. },
  5813. getPattern: function TilingPattern_getPattern(ctx, owner) {
  5814. var temporaryPatternCanvas = this.createPatternCanvas(owner);
  5815. ctx = this.ctx;
  5816. ctx.setTransform.apply(ctx, this.baseTransform);
  5817. ctx.transform.apply(ctx, this.matrix);
  5818. this.scaleToContext();
  5819. return ctx.createPattern(temporaryPatternCanvas, 'repeat');
  5820. }
  5821. };
  5822. return TilingPattern;
  5823. })();
  5824. PDFJS.disableFontFace = false;
  5825. var FontLoader = {
  5826. insertRule: function fontLoaderInsertRule(rule) {
  5827. var styleElement = document.getElementById('PDFJS_FONT_STYLE_TAG');
  5828. if (!styleElement) {
  5829. styleElement = document.createElement('style');
  5830. styleElement.id = 'PDFJS_FONT_STYLE_TAG';
  5831. document.documentElement.getElementsByTagName('head')[0].appendChild(
  5832. styleElement);
  5833. }
  5834. var styleSheet = styleElement.sheet;
  5835. styleSheet.insertRule(rule, styleSheet.cssRules.length);
  5836. },
  5837. clear: function fontLoaderClear() {
  5838. var styleElement = document.getElementById('PDFJS_FONT_STYLE_TAG');
  5839. if (styleElement) {
  5840. styleElement.parentNode.removeChild(styleElement);
  5841. }
  5842. },
  5843. get loadTestFont() {
  5844. // This is a CFF font with 1 glyph for '.' that fills its entire width and
  5845. // height.
  5846. return shadow(this, 'loadTestFont', atob(
  5847. 'T1RUTwALAIAAAwAwQ0ZGIDHtZg4AAAOYAAAAgUZGVE1lkzZwAAAEHAAAABxHREVGABQAFQ' +
  5848. 'AABDgAAAAeT1MvMlYNYwkAAAEgAAAAYGNtYXABDQLUAAACNAAAAUJoZWFk/xVFDQAAALwA' +
  5849. 'AAA2aGhlYQdkA+oAAAD0AAAAJGhtdHgD6AAAAAAEWAAAAAZtYXhwAAJQAAAAARgAAAAGbm' +
  5850. 'FtZVjmdH4AAAGAAAAAsXBvc3T/hgAzAAADeAAAACAAAQAAAAEAALZRFsRfDzz1AAsD6AAA' +
  5851. 'AADOBOTLAAAAAM4KHDwAAAAAA+gDIQAAAAgAAgAAAAAAAAABAAADIQAAAFoD6AAAAAAD6A' +
  5852. 'ABAAAAAAAAAAAAAAAAAAAAAQAAUAAAAgAAAAQD6AH0AAUAAAKKArwAAACMAooCvAAAAeAA' +
  5853. 'MQECAAACAAYJAAAAAAAAAAAAAQAAAAAAAAAAAAAAAFBmRWQAwAAuAC4DIP84AFoDIQAAAA' +
  5854. 'AAAQAAAAAAAAAAACAAIAABAAAADgCuAAEAAAAAAAAAAQAAAAEAAAAAAAEAAQAAAAEAAAAA' +
  5855. 'AAIAAQAAAAEAAAAAAAMAAQAAAAEAAAAAAAQAAQAAAAEAAAAAAAUAAQAAAAEAAAAAAAYAAQ' +
  5856. 'AAAAMAAQQJAAAAAgABAAMAAQQJAAEAAgABAAMAAQQJAAIAAgABAAMAAQQJAAMAAgABAAMA' +
  5857. 'AQQJAAQAAgABAAMAAQQJAAUAAgABAAMAAQQJAAYAAgABWABYAAAAAAAAAwAAAAMAAAAcAA' +
  5858. 'EAAAAAADwAAwABAAAAHAAEACAAAAAEAAQAAQAAAC7//wAAAC7////TAAEAAAAAAAABBgAA' +
  5859. 'AQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAEAAAAAAA' +
  5860. 'AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA' +
  5861. 'AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA' +
  5862. 'AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA' +
  5863. 'AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAMAAA' +
  5864. 'AAAAD/gwAyAAAAAQAAAAAAAAAAAAAAAAAAAAABAAQEAAEBAQJYAAEBASH4DwD4GwHEAvgc' +
  5865. 'A/gXBIwMAYuL+nz5tQXkD5j3CBLnEQACAQEBIVhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWF' +
  5866. 'hYWFhYWFhYAAABAQAADwACAQEEE/t3Dov6fAH6fAT+fPp8+nwHDosMCvm1Cvm1DAz6fBQA' +
  5867. 'AAAAAAABAAAAAMmJbzEAAAAAzgTjFQAAAADOBOQpAAEAAAAAAAAADAAUAAQAAAABAAAAAg' +
  5868. 'ABAAAAAAAAAAAD6AAAAAAAAA=='
  5869. ));
  5870. },
  5871. loadTestFontId: 0,
  5872. loadingContext: {
  5873. requests: [],
  5874. nextRequestId: 0
  5875. },
  5876. isSyncFontLoadingSupported: (function detectSyncFontLoadingSupport() {
  5877. if (isWorker) {
  5878. return false;
  5879. }
  5880. // User agent string sniffing is bad, but there is no reliable way to tell
  5881. // if font is fully loaded and ready to be used with canvas.
  5882. var userAgent = window.navigator.userAgent;
  5883. var m = /Mozilla\/5.0.*?rv:(\d+).*? Gecko/.exec(userAgent);
  5884. if (m && m[1] >= 14) {
  5885. return true;
  5886. }
  5887. // TODO other browsers
  5888. return false;
  5889. })(),
  5890. bind: function fontLoaderBind(fonts, callback) {
  5891. assert(!isWorker, 'bind() shall be called from main thread');
  5892. var rules = [], fontsToLoad = [];
  5893. for (var i = 0, ii = fonts.length; i < ii; i++) {
  5894. var font = fonts[i];
  5895. // Add the font to the DOM only once or skip if the font
  5896. // is already loaded.
  5897. if (font.attached || font.loading === false) {
  5898. continue;
  5899. }
  5900. font.attached = true;
  5901. var rule = font.bindDOM();
  5902. if (rule) {
  5903. rules.push(rule);
  5904. fontsToLoad.push(font);
  5905. }
  5906. }
  5907. var request = FontLoader.queueLoadingCallback(callback);
  5908. if (rules.length > 0 && !this.isSyncFontLoadingSupported) {
  5909. FontLoader.prepareFontLoadEvent(rules, fontsToLoad, request);
  5910. } else {
  5911. request.complete();
  5912. }
  5913. },
  5914. queueLoadingCallback: function FontLoader_queueLoadingCallback(callback) {
  5915. function LoadLoader_completeRequest() {
  5916. assert(!request.end, 'completeRequest() cannot be called twice');
  5917. request.end = Date.now();
  5918. // sending all completed requests in order how they were queued
  5919. while (context.requests.length > 0 && context.requests[0].end) {
  5920. var otherRequest = context.requests.shift();
  5921. setTimeout(otherRequest.callback, 0);
  5922. }
  5923. }
  5924. var context = FontLoader.loadingContext;
  5925. var requestId = 'pdfjs-font-loading-' + (context.nextRequestId++);
  5926. var request = {
  5927. id: requestId,
  5928. complete: LoadLoader_completeRequest,
  5929. callback: callback,
  5930. started: Date.now()
  5931. };
  5932. context.requests.push(request);
  5933. return request;
  5934. },
  5935. prepareFontLoadEvent: function fontLoaderPrepareFontLoadEvent(rules,
  5936. fonts,
  5937. request) {
  5938. /** Hack begin */
  5939. // There's currently no event when a font has finished downloading so the
  5940. // following code is a dirty hack to 'guess' when a font is
  5941. // ready. It's assumed fonts are loaded in order, so add a known test
  5942. // font after the desired fonts and then test for the loading of that
  5943. // test font.
  5944. function int32(data, offset) {
  5945. return (data.charCodeAt(offset) << 24) |
  5946. (data.charCodeAt(offset + 1) << 16) |
  5947. (data.charCodeAt(offset + 2) << 8) |
  5948. (data.charCodeAt(offset + 3) & 0xff);
  5949. }
  5950. function spliceString(s, offset, remove, insert) {
  5951. var chunk1 = s.substr(0, offset);
  5952. var chunk2 = s.substr(offset + remove);
  5953. return chunk1 + insert + chunk2;
  5954. }
  5955. var i, ii;
  5956. var canvas = document.createElement('canvas');
  5957. canvas.width = 1;
  5958. canvas.height = 1;
  5959. var ctx = canvas.getContext('2d');
  5960. var called = 0;
  5961. function isFontReady(name, callback) {
  5962. called++;
  5963. // With setTimeout clamping this gives the font ~100ms to load.
  5964. if(called > 30) {
  5965. warn('Load test font never loaded.');
  5966. callback();
  5967. return;
  5968. }
  5969. ctx.font = '30px ' + name;
  5970. ctx.fillText('.', 0, 20);
  5971. var imageData = ctx.getImageData(0, 0, 1, 1);
  5972. if (imageData.data[3] > 0) {
  5973. callback();
  5974. return;
  5975. }
  5976. setTimeout(isFontReady.bind(null, name, callback));
  5977. }
  5978. var loadTestFontId = 'lt' + Date.now() + this.loadTestFontId++;
  5979. // Chromium seems to cache fonts based on a hash of the actual font data,
  5980. // so the font must be modified for each load test else it will appear to
  5981. // be loaded already.
  5982. // TODO: This could maybe be made faster by avoiding the btoa of the full
  5983. // font by splitting it in chunks before hand and padding the font id.
  5984. var data = this.loadTestFont;
  5985. var COMMENT_OFFSET = 976; // has to be on 4 byte boundary (for checksum)
  5986. data = spliceString(data, COMMENT_OFFSET, loadTestFontId.length,
  5987. loadTestFontId);
  5988. // CFF checksum is important for IE, adjusting it
  5989. var CFF_CHECKSUM_OFFSET = 16;
  5990. var XXXX_VALUE = 0x58585858; // the "comment" filled with 'X'
  5991. var checksum = int32(data, CFF_CHECKSUM_OFFSET);
  5992. for (i = 0, ii = loadTestFontId.length - 3; i < ii; i += 4) {
  5993. checksum = (checksum - XXXX_VALUE + int32(loadTestFontId, i)) | 0;
  5994. }
  5995. if (i < loadTestFontId.length) { // align to 4 bytes boundary
  5996. checksum = (checksum - XXXX_VALUE +
  5997. int32(loadTestFontId + 'XXX', i)) | 0;
  5998. }
  5999. data = spliceString(data, CFF_CHECKSUM_OFFSET, 4, string32(checksum));
  6000. var url = 'url(data:font/opentype;base64,' + btoa(data) + ');';
  6001. var rule = '@font-face { font-family:"' + loadTestFontId + '";src:' +
  6002. url + '}';
  6003. FontLoader.insertRule(rule);
  6004. var names = [];
  6005. for (i = 0, ii = fonts.length; i < ii; i++) {
  6006. names.push(fonts[i].loadedName);
  6007. }
  6008. names.push(loadTestFontId);
  6009. var div = document.createElement('div');
  6010. div.setAttribute('style',
  6011. 'visibility: hidden;' +
  6012. 'width: 10px; height: 10px;' +
  6013. 'position: absolute; top: 0px; left: 0px;');
  6014. for (i = 0, ii = names.length; i < ii; ++i) {
  6015. var span = document.createElement('span');
  6016. span.textContent = 'Hi';
  6017. span.style.fontFamily = names[i];
  6018. div.appendChild(span);
  6019. }
  6020. document.body.appendChild(div);
  6021. isFontReady(loadTestFontId, function() {
  6022. document.body.removeChild(div);
  6023. request.complete();
  6024. });
  6025. /** Hack end */
  6026. }
  6027. };
  6028. var FontFace = (function FontFaceClosure() {
  6029. function FontFace(name, file, properties) {
  6030. this.compiledGlyphs = {};
  6031. if (arguments.length === 1) {
  6032. // importing translated data
  6033. var data = arguments[0];
  6034. for (var i in data) {
  6035. this[i] = data[i];
  6036. }
  6037. return;
  6038. }
  6039. }
  6040. FontFace.prototype = {
  6041. bindDOM: function FontFace_bindDOM() {
  6042. if (!this.data) {
  6043. return null;
  6044. }
  6045. if (PDFJS.disableFontFace) {
  6046. this.disableFontFace = true;
  6047. return null;
  6048. }
  6049. var data = bytesToString(new Uint8Array(this.data));
  6050. var fontName = this.loadedName;
  6051. // Add the font-face rule to the document
  6052. var url = ('url(data:' + this.mimetype + ';base64,' +
  6053. window.btoa(data) + ');');
  6054. var rule = '@font-face { font-family:"' + fontName + '";src:' + url + '}';
  6055. FontLoader.insertRule(rule);
  6056. if (PDFJS.pdfBug && 'FontInspector' in globalScope &&
  6057. globalScope['FontInspector'].enabled) {
  6058. globalScope['FontInspector'].fontAdded(this, url);
  6059. }
  6060. return rule;
  6061. },
  6062. getPathGenerator: function (objs, character) {
  6063. if (!(character in this.compiledGlyphs)) {
  6064. var js = objs.get(this.loadedName + '_path_' + character);
  6065. /*jshint -W054 */
  6066. this.compiledGlyphs[character] = new Function('c', 'size', js);
  6067. }
  6068. return this.compiledGlyphs[character];
  6069. }
  6070. };
  6071. return FontFace;
  6072. })();
  6073. var NetworkManager = (function NetworkManagerClosure() {
  6074. var OK_RESPONSE = 200;
  6075. var PARTIAL_CONTENT_RESPONSE = 206;
  6076. function NetworkManager(url, args) {
  6077. this.url = url;
  6078. args = args || {};
  6079. this.isHttp = /^https?:/i.test(url);
  6080. this.httpHeaders = (this.isHttp && args.httpHeaders) || {};
  6081. this.withCredentials = args.withCredentials || false;
  6082. this.getXhr = args.getXhr ||
  6083. function NetworkManager_getXhr() {
  6084. return new XMLHttpRequest();
  6085. };
  6086. this.currXhrId = 0;
  6087. this.pendingRequests = {};
  6088. this.loadedRequests = {};
  6089. }
  6090. function getArrayBuffer(xhr) {
  6091. var data = (xhr.mozResponseArrayBuffer || xhr.mozResponse ||
  6092. xhr.responseArrayBuffer || xhr.response);
  6093. if (typeof data !== 'string') {
  6094. return data;
  6095. }
  6096. var length = data.length;
  6097. var buffer = new Uint8Array(length);
  6098. for (var i = 0; i < length; i++) {
  6099. buffer[i] = data.charCodeAt(i) & 0xFF;
  6100. }
  6101. return buffer;
  6102. }
  6103. NetworkManager.prototype = {
  6104. requestRange: function NetworkManager_requestRange(begin, end, listeners) {
  6105. var args = {
  6106. begin: begin,
  6107. end: end
  6108. };
  6109. for (var prop in listeners) {
  6110. args[prop] = listeners[prop];
  6111. }
  6112. return this.request(args);
  6113. },
  6114. requestFull: function NetworkManager_requestRange(listeners) {
  6115. return this.request(listeners);
  6116. },
  6117. request: function NetworkManager_requestRange(args) {
  6118. var xhr = this.getXhr();
  6119. var xhrId = this.currXhrId++;
  6120. var pendingRequest = this.pendingRequests[xhrId] = {
  6121. xhr: xhr
  6122. };
  6123. xhr.open('GET', this.url);
  6124. xhr.withCredentials = this.withCredentials;
  6125. for (var property in this.httpHeaders) {
  6126. var value = this.httpHeaders[property];
  6127. if (typeof value === 'undefined') {
  6128. continue;
  6129. }
  6130. xhr.setRequestHeader(property, value);
  6131. }
  6132. if (this.isHttp && 'begin' in args && 'end' in args) {
  6133. var rangeStr = args.begin + '-' + (args.end - 1);
  6134. xhr.setRequestHeader('Range', 'bytes=' + rangeStr);
  6135. pendingRequest.expectedStatus = 206;
  6136. } else {
  6137. pendingRequest.expectedStatus = 200;
  6138. }
  6139. xhr.mozResponseType = xhr.responseType = 'arraybuffer';
  6140. if (args.onProgress) {
  6141. xhr.onprogress = args.onProgress;
  6142. }
  6143. if (args.onError) {
  6144. xhr.onerror = function(evt) {
  6145. args.onError(xhr.status);
  6146. };
  6147. }
  6148. xhr.onreadystatechange = this.onStateChange.bind(this, xhrId);
  6149. pendingRequest.onHeadersReceived = args.onHeadersReceived;
  6150. pendingRequest.onDone = args.onDone;
  6151. pendingRequest.onError = args.onError;
  6152. xhr.send(null);
  6153. return xhrId;
  6154. },
  6155. onStateChange: function NetworkManager_onStateChange(xhrId, evt) {
  6156. var pendingRequest = this.pendingRequests[xhrId];
  6157. if (!pendingRequest) {
  6158. // Maybe abortRequest was called...
  6159. return;
  6160. }
  6161. var xhr = pendingRequest.xhr;
  6162. if (xhr.readyState >= 2 && pendingRequest.onHeadersReceived) {
  6163. pendingRequest.onHeadersReceived();
  6164. delete pendingRequest.onHeadersReceived;
  6165. }
  6166. if (xhr.readyState !== 4) {
  6167. return;
  6168. }
  6169. if (!(xhrId in this.pendingRequests)) {
  6170. // The XHR request might have been aborted in onHeadersReceived()
  6171. // callback, in which case we should abort request
  6172. return;
  6173. }
  6174. delete this.pendingRequests[xhrId];
  6175. // success status == 0 can be on ftp, file and other protocols
  6176. if (xhr.status === 0 && this.isHttp) {
  6177. if (pendingRequest.onError) {
  6178. pendingRequest.onError(xhr.status);
  6179. }
  6180. return;
  6181. }
  6182. var xhrStatus = xhr.status || OK_RESPONSE;
  6183. // From http://www.w3.org/Protocols/rfc2616/rfc2616-sec14.html#sec14.35.2:
  6184. // "A server MAY ignore the Range header". This means it's possible to
  6185. // get a 200 rather than a 206 response from a range request.
  6186. var ok_response_on_range_request =
  6187. xhrStatus === OK_RESPONSE &&
  6188. pendingRequest.expectedStatus === PARTIAL_CONTENT_RESPONSE;
  6189. if (!ok_response_on_range_request &&
  6190. xhrStatus !== pendingRequest.expectedStatus) {
  6191. if (pendingRequest.onError) {
  6192. pendingRequest.onError(xhr.status);
  6193. }
  6194. return;
  6195. }
  6196. this.loadedRequests[xhrId] = true;
  6197. var chunk = getArrayBuffer(xhr);
  6198. if (xhrStatus === PARTIAL_CONTENT_RESPONSE) {
  6199. var rangeHeader = xhr.getResponseHeader('Content-Range');
  6200. var matches = /bytes (\d+)-(\d+)\/(\d+)/.exec(rangeHeader);
  6201. var begin = parseInt(matches[1], 10);
  6202. pendingRequest.onDone({
  6203. begin: begin,
  6204. chunk: chunk
  6205. });
  6206. } else {
  6207. pendingRequest.onDone({
  6208. begin: 0,
  6209. chunk: chunk
  6210. });
  6211. }
  6212. },
  6213. hasPendingRequests: function NetworkManager_hasPendingRequests() {
  6214. for (var xhrId in this.pendingRequests) {
  6215. return true;
  6216. }
  6217. return false;
  6218. },
  6219. getRequestXhr: function NetworkManager_getXhr(xhrId) {
  6220. return this.pendingRequests[xhrId].xhr;
  6221. },
  6222. isPendingRequest: function NetworkManager_isPendingRequest(xhrId) {
  6223. return xhrId in this.pendingRequests;
  6224. },
  6225. isLoadedRequest: function NetworkManager_isLoadedRequest(xhrId) {
  6226. return xhrId in this.loadedRequests;
  6227. },
  6228. abortAllRequests: function NetworkManager_abortAllRequests() {
  6229. for (var xhrId in this.pendingRequests) {
  6230. this.abortRequest(xhrId | 0);
  6231. }
  6232. },
  6233. abortRequest: function NetworkManager_abortRequest(xhrId) {
  6234. var xhr = this.pendingRequests[xhrId].xhr;
  6235. delete this.pendingRequests[xhrId];
  6236. xhr.abort();
  6237. }
  6238. };
  6239. return NetworkManager;
  6240. })();
  6241. var ChunkedStream = (function ChunkedStreamClosure() {
  6242. function ChunkedStream(length, chunkSize, manager) {
  6243. this.bytes = new Uint8Array(length);
  6244. this.start = 0;
  6245. this.pos = 0;
  6246. this.end = length;
  6247. this.chunkSize = chunkSize;
  6248. this.loadedChunks = [];
  6249. this.numChunksLoaded = 0;
  6250. this.numChunks = Math.ceil(length / chunkSize);
  6251. this.manager = manager;
  6252. this.initialDataLength = 0;
  6253. }
  6254. // required methods for a stream. if a particular stream does not
  6255. // implement these, an error should be thrown
  6256. ChunkedStream.prototype = {
  6257. getMissingChunks: function ChunkedStream_getMissingChunks() {
  6258. var chunks = [];
  6259. for (var chunk = 0, n = this.numChunks; chunk < n; ++chunk) {
  6260. if (!(chunk in this.loadedChunks)) {
  6261. chunks.push(chunk);
  6262. }
  6263. }
  6264. return chunks;
  6265. },
  6266. getBaseStreams: function ChunkedStream_getBaseStreams() {
  6267. return [this];
  6268. },
  6269. allChunksLoaded: function ChunkedStream_allChunksLoaded() {
  6270. return this.numChunksLoaded === this.numChunks;
  6271. },
  6272. onReceiveData: function ChunkedStream_onReceiveData(begin, chunk) {
  6273. var end = begin + chunk.byteLength;
  6274. assert(begin % this.chunkSize === 0, 'Bad begin offset: ' + begin);
  6275. // Using this.length is inaccurate here since this.start can be moved
  6276. // See ChunkedStream.moveStart()
  6277. var length = this.bytes.length;
  6278. assert(end % this.chunkSize === 0 || end === length,
  6279. 'Bad end offset: ' + end);
  6280. this.bytes.set(new Uint8Array(chunk), begin);
  6281. var chunkSize = this.chunkSize;
  6282. var beginChunk = Math.floor(begin / chunkSize);
  6283. var endChunk = Math.floor((end - 1) / chunkSize) + 1;
  6284. var curChunk;
  6285. for (curChunk = beginChunk; curChunk < endChunk; ++curChunk) {
  6286. if (!(curChunk in this.loadedChunks)) {
  6287. this.loadedChunks[curChunk] = true;
  6288. ++this.numChunksLoaded;
  6289. }
  6290. }
  6291. },
  6292. onReceiveInitialData: function ChunkedStream_onReceiveInitialData(data) {
  6293. this.bytes.set(data);
  6294. this.initialDataLength = data.length;
  6295. var endChunk = (this.end === data.length ?
  6296. this.numChunks : Math.floor(data.length / this.chunkSize));
  6297. for (var i = 0; i < endChunk; i++) {
  6298. this.loadedChunks[i] = true;
  6299. ++this.numChunksLoaded;
  6300. }
  6301. },
  6302. ensureRange: function ChunkedStream_ensureRange(begin, end) {
  6303. if (begin >= end) {
  6304. return;
  6305. }
  6306. if (end <= this.initialDataLength) {
  6307. return;
  6308. }
  6309. var chunkSize = this.chunkSize;
  6310. var beginChunk = Math.floor(begin / chunkSize);
  6311. var endChunk = Math.floor((end - 1) / chunkSize) + 1;
  6312. for (var chunk = beginChunk; chunk < endChunk; ++chunk) {
  6313. if (!(chunk in this.loadedChunks)) {
  6314. throw new MissingDataException(begin, end);
  6315. }
  6316. }
  6317. },
  6318. nextEmptyChunk: function ChunkedStream_nextEmptyChunk(beginChunk) {
  6319. var chunk, n;
  6320. for (chunk = beginChunk, n = this.numChunks; chunk < n; ++chunk) {
  6321. if (!(chunk in this.loadedChunks)) {
  6322. return chunk;
  6323. }
  6324. }
  6325. // Wrap around to beginning
  6326. for (chunk = 0; chunk < beginChunk; ++chunk) {
  6327. if (!(chunk in this.loadedChunks)) {
  6328. return chunk;
  6329. }
  6330. }
  6331. return null;
  6332. },
  6333. hasChunk: function ChunkedStream_hasChunk(chunk) {
  6334. return chunk in this.loadedChunks;
  6335. },
  6336. get length() {
  6337. return this.end - this.start;
  6338. },
  6339. get isEmpty() {
  6340. return this.length === 0;
  6341. },
  6342. getByte: function ChunkedStream_getByte() {
  6343. var pos = this.pos;
  6344. if (pos >= this.end) {
  6345. return -1;
  6346. }
  6347. this.ensureRange(pos, pos + 1);
  6348. return this.bytes[this.pos++];
  6349. },
  6350. getUint16: function ChunkedStream_getUint16() {
  6351. var b0 = this.getByte();
  6352. var b1 = this.getByte();
  6353. return (b0 << 8) + b1;
  6354. },
  6355. getInt32: function ChunkedStream_getInt32() {
  6356. var b0 = this.getByte();
  6357. var b1 = this.getByte();
  6358. var b2 = this.getByte();
  6359. var b3 = this.getByte();
  6360. return (b0 << 24) + (b1 << 16) + (b2 << 8) + b3;
  6361. },
  6362. // returns subarray of original buffer
  6363. // should only be read
  6364. getBytes: function ChunkedStream_getBytes(length) {
  6365. var bytes = this.bytes;
  6366. var pos = this.pos;
  6367. var strEnd = this.end;
  6368. if (!length) {
  6369. this.ensureRange(pos, strEnd);
  6370. return bytes.subarray(pos, strEnd);
  6371. }
  6372. var end = pos + length;
  6373. if (end > strEnd) {
  6374. end = strEnd;
  6375. }
  6376. this.ensureRange(pos, end);
  6377. this.pos = end;
  6378. return bytes.subarray(pos, end);
  6379. },
  6380. peekBytes: function ChunkedStream_peekBytes(length) {
  6381. var bytes = this.getBytes(length);
  6382. this.pos -= bytes.length;
  6383. return bytes;
  6384. },
  6385. getByteRange: function ChunkedStream_getBytes(begin, end) {
  6386. this.ensureRange(begin, end);
  6387. return this.bytes.subarray(begin, end);
  6388. },
  6389. skip: function ChunkedStream_skip(n) {
  6390. if (!n) {
  6391. n = 1;
  6392. }
  6393. this.pos += n;
  6394. },
  6395. reset: function ChunkedStream_reset() {
  6396. this.pos = this.start;
  6397. },
  6398. moveStart: function ChunkedStream_moveStart() {
  6399. this.start = this.pos;
  6400. },
  6401. makeSubStream: function ChunkedStream_makeSubStream(start, length, dict) {
  6402. this.ensureRange(start, start + length);
  6403. function ChunkedStreamSubstream() {}
  6404. ChunkedStreamSubstream.prototype = Object.create(this);
  6405. ChunkedStreamSubstream.prototype.getMissingChunks = function() {
  6406. var chunkSize = this.chunkSize;
  6407. var beginChunk = Math.floor(this.start / chunkSize);
  6408. var endChunk = Math.floor((this.end - 1) / chunkSize) + 1;
  6409. var missingChunks = [];
  6410. for (var chunk = beginChunk; chunk < endChunk; ++chunk) {
  6411. if (!(chunk in this.loadedChunks)) {
  6412. missingChunks.push(chunk);
  6413. }
  6414. }
  6415. return missingChunks;
  6416. };
  6417. var subStream = new ChunkedStreamSubstream();
  6418. subStream.pos = subStream.start = start;
  6419. subStream.end = start + length || this.end;
  6420. subStream.dict = dict;
  6421. return subStream;
  6422. },
  6423. isStream: true
  6424. };
  6425. return ChunkedStream;
  6426. })();
  6427. var ChunkedStreamManager = (function ChunkedStreamManagerClosure() {
  6428. function ChunkedStreamManager(length, chunkSize, url, args) {
  6429. this.stream = new ChunkedStream(length, chunkSize, this);
  6430. this.length = length;
  6431. this.chunkSize = chunkSize;
  6432. this.url = url;
  6433. this.disableAutoFetch = args.disableAutoFetch;
  6434. var msgHandler = this.msgHandler = args.msgHandler;
  6435. if (args.chunkedViewerLoading) {
  6436. msgHandler.on('OnDataRange', this.onReceiveData.bind(this));
  6437. msgHandler.on('OnDataProgress', this.onProgress.bind(this));
  6438. this.sendRequest = function ChunkedStreamManager_sendRequest(begin, end) {
  6439. msgHandler.send('RequestDataRange', { begin: begin, end: end });
  6440. };
  6441. } else {
  6442. var getXhr = function getXhr() {
  6443. return new XMLHttpRequest();
  6444. };
  6445. this.networkManager = new NetworkManager(this.url, {
  6446. getXhr: getXhr,
  6447. httpHeaders: args.httpHeaders,
  6448. withCredentials: args.withCredentials
  6449. });
  6450. this.sendRequest = function ChunkedStreamManager_sendRequest(begin, end) {
  6451. this.networkManager.requestRange(begin, end, {
  6452. onDone: this.onReceiveData.bind(this),
  6453. onProgress: this.onProgress.bind(this)
  6454. });
  6455. };
  6456. }
  6457. this.currRequestId = 0;
  6458. this.chunksNeededByRequest = {};
  6459. this.requestsByChunk = {};
  6460. this.callbacksByRequest = {};
  6461. this._loadedStreamCapability = createPromiseCapability();
  6462. if (args.initialData) {
  6463. this.setInitialData(args.initialData);
  6464. }
  6465. }
  6466. ChunkedStreamManager.prototype = {
  6467. setInitialData: function ChunkedStreamManager_setInitialData(data) {
  6468. this.stream.onReceiveInitialData(data);
  6469. if (this.stream.allChunksLoaded()) {
  6470. this._loadedStreamCapability.resolve(this.stream);
  6471. } else if (this.msgHandler) {
  6472. this.msgHandler.send('DocProgress', {
  6473. loaded: data.length,
  6474. total: this.length
  6475. });
  6476. }
  6477. },
  6478. onLoadedStream: function ChunkedStreamManager_getLoadedStream() {
  6479. return this._loadedStreamCapability.promise;
  6480. },
  6481. // Get all the chunks that are not yet loaded and groups them into
  6482. // contiguous ranges to load in as few requests as possible
  6483. requestAllChunks: function ChunkedStreamManager_requestAllChunks() {
  6484. var missingChunks = this.stream.getMissingChunks();
  6485. this.requestChunks(missingChunks);
  6486. return this._loadedStreamCapability.promise;
  6487. },
  6488. requestChunks: function ChunkedStreamManager_requestChunks(chunks,
  6489. callback) {
  6490. var requestId = this.currRequestId++;
  6491. var chunksNeeded;
  6492. var i, ii;
  6493. this.chunksNeededByRequest[requestId] = chunksNeeded = {};
  6494. for (i = 0, ii = chunks.length; i < ii; i++) {
  6495. if (!this.stream.hasChunk(chunks[i])) {
  6496. chunksNeeded[chunks[i]] = true;
  6497. }
  6498. }
  6499. if (isEmptyObj(chunksNeeded)) {
  6500. if (callback) {
  6501. callback();
  6502. }
  6503. return;
  6504. }
  6505. this.callbacksByRequest[requestId] = callback;
  6506. var chunksToRequest = [];
  6507. for (var chunk in chunksNeeded) {
  6508. chunk = chunk | 0;
  6509. if (!(chunk in this.requestsByChunk)) {
  6510. this.requestsByChunk[chunk] = [];
  6511. chunksToRequest.push(chunk);
  6512. }
  6513. this.requestsByChunk[chunk].push(requestId);
  6514. }
  6515. if (!chunksToRequest.length) {
  6516. return;
  6517. }
  6518. var groupedChunksToRequest = this.groupChunks(chunksToRequest);
  6519. for (i = 0; i < groupedChunksToRequest.length; ++i) {
  6520. var groupedChunk = groupedChunksToRequest[i];
  6521. var begin = groupedChunk.beginChunk * this.chunkSize;
  6522. var end = Math.min(groupedChunk.endChunk * this.chunkSize, this.length);
  6523. this.sendRequest(begin, end);
  6524. }
  6525. },
  6526. getStream: function ChunkedStreamManager_getStream() {
  6527. return this.stream;
  6528. },
  6529. // Loads any chunks in the requested range that are not yet loaded
  6530. requestRange: function ChunkedStreamManager_requestRange(
  6531. begin, end, callback) {
  6532. end = Math.min(end, this.length);
  6533. var beginChunk = this.getBeginChunk(begin);
  6534. var endChunk = this.getEndChunk(end);
  6535. var chunks = [];
  6536. for (var chunk = beginChunk; chunk < endChunk; ++chunk) {
  6537. chunks.push(chunk);
  6538. }
  6539. this.requestChunks(chunks, callback);
  6540. },
  6541. requestRanges: function ChunkedStreamManager_requestRanges(ranges,
  6542. callback) {
  6543. ranges = ranges || [];
  6544. var chunksToRequest = [];
  6545. for (var i = 0; i < ranges.length; i++) {
  6546. var beginChunk = this.getBeginChunk(ranges[i].begin);
  6547. var endChunk = this.getEndChunk(ranges[i].end);
  6548. for (var chunk = beginChunk; chunk < endChunk; ++chunk) {
  6549. if (chunksToRequest.indexOf(chunk) < 0) {
  6550. chunksToRequest.push(chunk);
  6551. }
  6552. }
  6553. }
  6554. chunksToRequest.sort(function(a, b) { return a - b; });
  6555. this.requestChunks(chunksToRequest, callback);
  6556. },
  6557. // Groups a sorted array of chunks into as few continguous larger
  6558. // chunks as possible
  6559. groupChunks: function ChunkedStreamManager_groupChunks(chunks) {
  6560. var groupedChunks = [];
  6561. var beginChunk = -1;
  6562. var prevChunk = -1;
  6563. for (var i = 0; i < chunks.length; ++i) {
  6564. var chunk = chunks[i];
  6565. if (beginChunk < 0) {
  6566. beginChunk = chunk;
  6567. }
  6568. if (prevChunk >= 0 && prevChunk + 1 !== chunk) {
  6569. groupedChunks.push({ beginChunk: beginChunk,
  6570. endChunk: prevChunk + 1 });
  6571. beginChunk = chunk;
  6572. }
  6573. if (i + 1 === chunks.length) {
  6574. groupedChunks.push({ beginChunk: beginChunk,
  6575. endChunk: chunk + 1 });
  6576. }
  6577. prevChunk = chunk;
  6578. }
  6579. return groupedChunks;
  6580. },
  6581. onProgress: function ChunkedStreamManager_onProgress(args) {
  6582. var bytesLoaded = (this.stream.numChunksLoaded * this.chunkSize +
  6583. args.loaded);
  6584. this.msgHandler.send('DocProgress', {
  6585. loaded: bytesLoaded,
  6586. total: this.length
  6587. });
  6588. },
  6589. onReceiveData: function ChunkedStreamManager_onReceiveData(args) {
  6590. var chunk = args.chunk;
  6591. var begin = args.begin;
  6592. var end = begin + chunk.byteLength;
  6593. var beginChunk = this.getBeginChunk(begin);
  6594. var endChunk = this.getEndChunk(end);
  6595. this.stream.onReceiveData(begin, chunk);
  6596. if (this.stream.allChunksLoaded()) {
  6597. this._loadedStreamCapability.resolve(this.stream);
  6598. }
  6599. var loadedRequests = [];
  6600. var i, requestId;
  6601. for (chunk = beginChunk; chunk < endChunk; ++chunk) {
  6602. // The server might return more chunks than requested
  6603. var requestIds = this.requestsByChunk[chunk] || [];
  6604. delete this.requestsByChunk[chunk];
  6605. for (i = 0; i < requestIds.length; ++i) {
  6606. requestId = requestIds[i];
  6607. var chunksNeeded = this.chunksNeededByRequest[requestId];
  6608. if (chunk in chunksNeeded) {
  6609. delete chunksNeeded[chunk];
  6610. }
  6611. if (!isEmptyObj(chunksNeeded)) {
  6612. continue;
  6613. }
  6614. loadedRequests.push(requestId);
  6615. }
  6616. }
  6617. // If there are no pending requests, automatically fetch the next
  6618. // unfetched chunk of the PDF
  6619. if (!this.disableAutoFetch && isEmptyObj(this.requestsByChunk)) {
  6620. var nextEmptyChunk;
  6621. if (this.stream.numChunksLoaded === 1) {
  6622. // This is a special optimization so that after fetching the first
  6623. // chunk, rather than fetching the second chunk, we fetch the last
  6624. // chunk.
  6625. var lastChunk = this.stream.numChunks - 1;
  6626. if (!this.stream.hasChunk(lastChunk)) {
  6627. nextEmptyChunk = lastChunk;
  6628. }
  6629. } else {
  6630. nextEmptyChunk = this.stream.nextEmptyChunk(endChunk);
  6631. }
  6632. if (isInt(nextEmptyChunk)) {
  6633. this.requestChunks([nextEmptyChunk]);
  6634. }
  6635. }
  6636. for (i = 0; i < loadedRequests.length; ++i) {
  6637. requestId = loadedRequests[i];
  6638. var callback = this.callbacksByRequest[requestId];
  6639. delete this.callbacksByRequest[requestId];
  6640. if (callback) {
  6641. callback();
  6642. }
  6643. }
  6644. this.msgHandler.send('DocProgress', {
  6645. loaded: this.stream.numChunksLoaded * this.chunkSize,
  6646. total: this.length
  6647. });
  6648. },
  6649. onError: function ChunkedStreamManager_onError(err) {
  6650. this._loadedStreamCapability.reject(err);
  6651. },
  6652. getBeginChunk: function ChunkedStreamManager_getBeginChunk(begin) {
  6653. var chunk = Math.floor(begin / this.chunkSize);
  6654. return chunk;
  6655. },
  6656. getEndChunk: function ChunkedStreamManager_getEndChunk(end) {
  6657. if (end % this.chunkSize === 0) {
  6658. return end / this.chunkSize;
  6659. }
  6660. // 0 -> 0
  6661. // 1 -> 1
  6662. // 99 -> 1
  6663. // 100 -> 1
  6664. // 101 -> 2
  6665. var chunk = Math.floor((end - 1) / this.chunkSize) + 1;
  6666. return chunk;
  6667. }
  6668. };
  6669. return ChunkedStreamManager;
  6670. })();
  6671. // The maximum number of bytes fetched per range request
  6672. var RANGE_CHUNK_SIZE = 65536;
  6673. // TODO(mack): Make use of PDFJS.Util.inherit() when it becomes available
  6674. var BasePdfManager = (function BasePdfManagerClosure() {
  6675. function BasePdfManager() {
  6676. throw new Error('Cannot initialize BaseManagerManager');
  6677. }
  6678. BasePdfManager.prototype = {
  6679. onLoadedStream: function BasePdfManager_onLoadedStream() {
  6680. throw new NotImplementedException();
  6681. },
  6682. ensureDoc: function BasePdfManager_ensureDoc(prop, args) {
  6683. return this.ensure(this.pdfDocument, prop, args);
  6684. },
  6685. ensureXRef: function BasePdfManager_ensureXRef(prop, args) {
  6686. return this.ensure(this.pdfDocument.xref, prop, args);
  6687. },
  6688. ensureCatalog: function BasePdfManager_ensureCatalog(prop, args) {
  6689. return this.ensure(this.pdfDocument.catalog, prop, args);
  6690. },
  6691. getPage: function BasePdfManager_pagePage(pageIndex) {
  6692. return this.pdfDocument.getPage(pageIndex);
  6693. },
  6694. cleanup: function BasePdfManager_cleanup() {
  6695. return this.pdfDocument.cleanup();
  6696. },
  6697. ensure: function BasePdfManager_ensure(obj, prop, args) {
  6698. return new NotImplementedException();
  6699. },
  6700. requestRange: function BasePdfManager_ensure(begin, end) {
  6701. return new NotImplementedException();
  6702. },
  6703. requestLoadedStream: function BasePdfManager_requestLoadedStream() {
  6704. return new NotImplementedException();
  6705. },
  6706. updatePassword: function BasePdfManager_updatePassword(password) {
  6707. this.pdfDocument.xref.password = this.password = password;
  6708. if (this._passwordChangedCapability) {
  6709. this._passwordChangedCapability.resolve();
  6710. }
  6711. },
  6712. passwordChanged: function BasePdfManager_passwordChanged() {
  6713. this._passwordChangedCapability = createPromiseCapability();
  6714. return this._passwordChangedCapability.promise;
  6715. },
  6716. terminate: function BasePdfManager_terminate() {
  6717. return new NotImplementedException();
  6718. }
  6719. };
  6720. return BasePdfManager;
  6721. })();
  6722. var LocalPdfManager = (function LocalPdfManagerClosure() {
  6723. function LocalPdfManager(data, password) {
  6724. var stream = new Stream(data);
  6725. this.pdfDocument = new PDFDocument(this, stream, password);
  6726. this._loadedStreamCapability = createPromiseCapability();
  6727. this._loadedStreamCapability.resolve(stream);
  6728. }
  6729. LocalPdfManager.prototype = Object.create(BasePdfManager.prototype);
  6730. LocalPdfManager.prototype.constructor = LocalPdfManager;
  6731. LocalPdfManager.prototype.ensure =
  6732. function LocalPdfManager_ensure(obj, prop, args) {
  6733. return new Promise(function (resolve, reject) {
  6734. try {
  6735. var value = obj[prop];
  6736. var result;
  6737. if (typeof value === 'function') {
  6738. result = value.apply(obj, args);
  6739. } else {
  6740. result = value;
  6741. }
  6742. resolve(result);
  6743. } catch (e) {
  6744. reject(e);
  6745. }
  6746. });
  6747. };
  6748. LocalPdfManager.prototype.requestRange =
  6749. function LocalPdfManager_requestRange(begin, end) {
  6750. return Promise.resolve();
  6751. };
  6752. LocalPdfManager.prototype.requestLoadedStream =
  6753. function LocalPdfManager_requestLoadedStream() {
  6754. };
  6755. LocalPdfManager.prototype.onLoadedStream =
  6756. function LocalPdfManager_getLoadedStream() {
  6757. return this._loadedStreamCapability.promise;
  6758. };
  6759. LocalPdfManager.prototype.terminate =
  6760. function LocalPdfManager_terminate() {
  6761. return;
  6762. };
  6763. return LocalPdfManager;
  6764. })();
  6765. var NetworkPdfManager = (function NetworkPdfManagerClosure() {
  6766. function NetworkPdfManager(args, msgHandler) {
  6767. this.msgHandler = msgHandler;
  6768. var params = {
  6769. msgHandler: msgHandler,
  6770. httpHeaders: args.httpHeaders,
  6771. withCredentials: args.withCredentials,
  6772. chunkedViewerLoading: args.chunkedViewerLoading,
  6773. disableAutoFetch: args.disableAutoFetch,
  6774. initialData: args.initialData
  6775. };
  6776. this.streamManager = new ChunkedStreamManager(args.length, RANGE_CHUNK_SIZE,
  6777. args.url, params);
  6778. this.pdfDocument = new PDFDocument(this, this.streamManager.getStream(),
  6779. args.password);
  6780. }
  6781. NetworkPdfManager.prototype = Object.create(BasePdfManager.prototype);
  6782. NetworkPdfManager.prototype.constructor = NetworkPdfManager;
  6783. NetworkPdfManager.prototype.ensure =
  6784. function NetworkPdfManager_ensure(obj, prop, args) {
  6785. var pdfManager = this;
  6786. return new Promise(function (resolve, reject) {
  6787. function ensureHelper() {
  6788. try {
  6789. var result;
  6790. var value = obj[prop];
  6791. if (typeof value === 'function') {
  6792. result = value.apply(obj, args);
  6793. } else {
  6794. result = value;
  6795. }
  6796. resolve(result);
  6797. } catch(e) {
  6798. if (!(e instanceof MissingDataException)) {
  6799. reject(e);
  6800. return;
  6801. }
  6802. pdfManager.streamManager.requestRange(e.begin, e.end, ensureHelper);
  6803. }
  6804. }
  6805. ensureHelper();
  6806. });
  6807. };
  6808. NetworkPdfManager.prototype.requestRange =
  6809. function NetworkPdfManager_requestRange(begin, end) {
  6810. return new Promise(function (resolve) {
  6811. this.streamManager.requestRange(begin, end, function() {
  6812. resolve();
  6813. });
  6814. }.bind(this));
  6815. };
  6816. NetworkPdfManager.prototype.requestLoadedStream =
  6817. function NetworkPdfManager_requestLoadedStream() {
  6818. this.streamManager.requestAllChunks();
  6819. };
  6820. NetworkPdfManager.prototype.onLoadedStream =
  6821. function NetworkPdfManager_getLoadedStream() {
  6822. return this.streamManager.onLoadedStream();
  6823. };
  6824. NetworkPdfManager.prototype.terminate =
  6825. function NetworkPdfManager_terminate() {
  6826. this.streamManager.networkManager.abortAllRequests();
  6827. };
  6828. return NetworkPdfManager;
  6829. })();
  6830. var Page = (function PageClosure() {
  6831. var LETTER_SIZE_MEDIABOX = [0, 0, 612, 792];
  6832. function Page(pdfManager, xref, pageIndex, pageDict, ref, fontCache) {
  6833. this.pdfManager = pdfManager;
  6834. this.pageIndex = pageIndex;
  6835. this.pageDict = pageDict;
  6836. this.xref = xref;
  6837. this.ref = ref;
  6838. this.fontCache = fontCache;
  6839. this.idCounters = {
  6840. obj: 0
  6841. };
  6842. this.resourcesPromise = null;
  6843. }
  6844. Page.prototype = {
  6845. getPageProp: function Page_getPageProp(key) {
  6846. return this.pageDict.get(key);
  6847. },
  6848. getInheritedPageProp: function Page_inheritPageProp(key) {
  6849. var dict = this.pageDict;
  6850. var value = dict.get(key);
  6851. while (value === undefined) {
  6852. dict = dict.get('Parent');
  6853. if (!dict) {
  6854. break;
  6855. }
  6856. value = dict.get(key);
  6857. }
  6858. return value;
  6859. },
  6860. get content() {
  6861. return this.getPageProp('Contents');
  6862. },
  6863. get resources() {
  6864. var value = this.getInheritedPageProp('Resources');
  6865. // For robustness: The spec states that a \Resources entry has to be
  6866. // present, but can be empty. Some document omit it still. In this case
  6867. // return an empty dictionary:
  6868. if (value === undefined) {
  6869. value = Dict.empty;
  6870. }
  6871. return shadow(this, 'resources', value);
  6872. },
  6873. get mediaBox() {
  6874. var obj = this.getInheritedPageProp('MediaBox');
  6875. // Reset invalid media box to letter size.
  6876. if (!isArray(obj) || obj.length !== 4) {
  6877. obj = LETTER_SIZE_MEDIABOX;
  6878. }
  6879. return shadow(this, 'mediaBox', obj);
  6880. },
  6881. get view() {
  6882. var mediaBox = this.mediaBox;
  6883. var cropBox = this.getInheritedPageProp('CropBox');
  6884. if (!isArray(cropBox) || cropBox.length !== 4) {
  6885. return shadow(this, 'view', mediaBox);
  6886. }
  6887. // From the spec, 6th ed., p.963:
  6888. // "The crop, bleed, trim, and art boxes should not ordinarily
  6889. // extend beyond the boundaries of the media box. If they do, they are
  6890. // effectively reduced to their intersection with the media box."
  6891. cropBox = Util.intersect(cropBox, mediaBox);
  6892. if (!cropBox) {
  6893. return shadow(this, 'view', mediaBox);
  6894. }
  6895. return shadow(this, 'view', cropBox);
  6896. },
  6897. get annotationRefs() {
  6898. return shadow(this, 'annotationRefs',
  6899. this.getInheritedPageProp('Annots'));
  6900. },
  6901. get rotate() {
  6902. var rotate = this.getInheritedPageProp('Rotate') || 0;
  6903. // Normalize rotation so it's a multiple of 90 and between 0 and 270
  6904. if (rotate % 90 !== 0) {
  6905. rotate = 0;
  6906. } else if (rotate >= 360) {
  6907. rotate = rotate % 360;
  6908. } else if (rotate < 0) {
  6909. // The spec doesn't cover negatives, assume its counterclockwise
  6910. // rotation. The following is the other implementation of modulo.
  6911. rotate = ((rotate % 360) + 360) % 360;
  6912. }
  6913. return shadow(this, 'rotate', rotate);
  6914. },
  6915. getContentStream: function Page_getContentStream() {
  6916. var content = this.content;
  6917. var stream;
  6918. if (isArray(content)) {
  6919. // fetching items
  6920. var xref = this.xref;
  6921. var i, n = content.length;
  6922. var streams = [];
  6923. for (i = 0; i < n; ++i) {
  6924. streams.push(xref.fetchIfRef(content[i]));
  6925. }
  6926. stream = new StreamsSequenceStream(streams);
  6927. } else if (isStream(content)) {
  6928. stream = content;
  6929. } else {
  6930. // replacing non-existent page content with empty one
  6931. stream = new NullStream();
  6932. }
  6933. return stream;
  6934. },
  6935. loadResources: function Page_loadResources(keys) {
  6936. if (!this.resourcesPromise) {
  6937. // TODO: add async getInheritedPageProp and remove this.
  6938. this.resourcesPromise = this.pdfManager.ensure(this, 'resources');
  6939. }
  6940. return this.resourcesPromise.then(function resourceSuccess() {
  6941. var objectLoader = new ObjectLoader(this.resources.map,
  6942. keys,
  6943. this.xref);
  6944. return objectLoader.load();
  6945. }.bind(this));
  6946. },
  6947. getOperatorList: function Page_getOperatorList(handler, intent) {
  6948. var self = this;
  6949. var pdfManager = this.pdfManager;
  6950. var contentStreamPromise = pdfManager.ensure(this, 'getContentStream',
  6951. []);
  6952. var resourcesPromise = this.loadResources([
  6953. 'ExtGState',
  6954. 'ColorSpace',
  6955. 'Pattern',
  6956. 'Shading',
  6957. 'XObject',
  6958. 'Font'
  6959. // ProcSet
  6960. // Properties
  6961. ]);
  6962. var partialEvaluator = new PartialEvaluator(pdfManager, this.xref,
  6963. handler, this.pageIndex,
  6964. 'p' + this.pageIndex + '_',
  6965. this.idCounters,
  6966. this.fontCache);
  6967. var dataPromises = Promise.all([contentStreamPromise, resourcesPromise]);
  6968. var pageListPromise = dataPromises.then(function(data) {
  6969. var contentStream = data[0];
  6970. var opList = new OperatorList(intent, handler, self.pageIndex);
  6971. handler.send('StartRenderPage', {
  6972. transparency: partialEvaluator.hasBlendModes(self.resources),
  6973. pageIndex: self.pageIndex,
  6974. intent: intent
  6975. });
  6976. return partialEvaluator.getOperatorList(contentStream, self.resources,
  6977. opList).then(function () {
  6978. return opList;
  6979. });
  6980. });
  6981. var annotationsPromise = pdfManager.ensure(this, 'annotations');
  6982. return Promise.all([pageListPromise, annotationsPromise]).then(
  6983. function(datas) {
  6984. var pageOpList = datas[0];
  6985. var annotations = datas[1];
  6986. if (annotations.length === 0) {
  6987. pageOpList.flush(true);
  6988. return pageOpList;
  6989. }
  6990. var annotationsReadyPromise = Annotation.appendToOperatorList(
  6991. annotations, pageOpList, pdfManager, partialEvaluator, intent);
  6992. return annotationsReadyPromise.then(function () {
  6993. pageOpList.flush(true);
  6994. return pageOpList;
  6995. });
  6996. });
  6997. },
  6998. extractTextContent: function Page_extractTextContent() {
  6999. var handler = {
  7000. on: function nullHandlerOn() {},
  7001. send: function nullHandlerSend() {}
  7002. };
  7003. var self = this;
  7004. var pdfManager = this.pdfManager;
  7005. var contentStreamPromise = pdfManager.ensure(this, 'getContentStream',
  7006. []);
  7007. var resourcesPromise = this.loadResources([
  7008. 'ExtGState',
  7009. 'XObject',
  7010. 'Font'
  7011. ]);
  7012. var dataPromises = Promise.all([contentStreamPromise,
  7013. resourcesPromise]);
  7014. return dataPromises.then(function(data) {
  7015. var contentStream = data[0];
  7016. var partialEvaluator = new PartialEvaluator(pdfManager, self.xref,
  7017. handler, self.pageIndex,
  7018. 'p' + self.pageIndex + '_',
  7019. self.idCounters,
  7020. self.fontCache);
  7021. return partialEvaluator.getTextContent(contentStream,
  7022. self.resources);
  7023. });
  7024. },
  7025. getAnnotationsData: function Page_getAnnotationsData() {
  7026. var annotations = this.annotations;
  7027. var annotationsData = [];
  7028. for (var i = 0, n = annotations.length; i < n; ++i) {
  7029. annotationsData.push(annotations[i].getData());
  7030. }
  7031. return annotationsData;
  7032. },
  7033. get annotations() {
  7034. var annotations = [];
  7035. var annotationRefs = (this.annotationRefs || []);
  7036. for (var i = 0, n = annotationRefs.length; i < n; ++i) {
  7037. var annotationRef = annotationRefs[i];
  7038. var annotation = Annotation.fromRef(this.xref, annotationRef);
  7039. if (annotation) {
  7040. annotations.push(annotation);
  7041. }
  7042. }
  7043. return shadow(this, 'annotations', annotations);
  7044. }
  7045. };
  7046. return Page;
  7047. })();
  7048. /**
  7049. * The `PDFDocument` holds all the data of the PDF file. Compared to the
  7050. * `PDFDoc`, this one doesn't have any job management code.
  7051. * Right now there exists one PDFDocument on the main thread + one object
  7052. * for each worker. If there is no worker support enabled, there are two
  7053. * `PDFDocument` objects on the main thread created.
  7054. */
  7055. var PDFDocument = (function PDFDocumentClosure() {
  7056. function PDFDocument(pdfManager, arg, password) {
  7057. if (isStream(arg)) {
  7058. init.call(this, pdfManager, arg, password);
  7059. } else if (isArrayBuffer(arg)) {
  7060. init.call(this, pdfManager, new Stream(arg), password);
  7061. } else {
  7062. error('PDFDocument: Unknown argument type');
  7063. }
  7064. }
  7065. function init(pdfManager, stream, password) {
  7066. assert(stream.length > 0, 'stream must have data');
  7067. this.pdfManager = pdfManager;
  7068. this.stream = stream;
  7069. var xref = new XRef(this.stream, password, pdfManager);
  7070. this.xref = xref;
  7071. }
  7072. function find(stream, needle, limit, backwards) {
  7073. var pos = stream.pos;
  7074. var end = stream.end;
  7075. var strBuf = [];
  7076. if (pos + limit > end) {
  7077. limit = end - pos;
  7078. }
  7079. for (var n = 0; n < limit; ++n) {
  7080. strBuf.push(String.fromCharCode(stream.getByte()));
  7081. }
  7082. var str = strBuf.join('');
  7083. stream.pos = pos;
  7084. var index = backwards ? str.lastIndexOf(needle) : str.indexOf(needle);
  7085. if (index == -1) {
  7086. return false; /* not found */
  7087. }
  7088. stream.pos += index;
  7089. return true; /* found */
  7090. }
  7091. var DocumentInfoValidators = {
  7092. get entries() {
  7093. // Lazily build this since all the validation functions below are not
  7094. // defined until after this file loads.
  7095. return shadow(this, 'entries', {
  7096. Title: isString,
  7097. Author: isString,
  7098. Subject: isString,
  7099. Keywords: isString,
  7100. Creator: isString,
  7101. Producer: isString,
  7102. CreationDate: isString,
  7103. ModDate: isString,
  7104. Trapped: isName
  7105. });
  7106. }
  7107. };
  7108. PDFDocument.prototype = {
  7109. parse: function PDFDocument_parse(recoveryMode) {
  7110. this.setup(recoveryMode);
  7111. try {
  7112. // checking if AcroForm is present
  7113. this.acroForm = this.catalog.catDict.get('AcroForm');
  7114. if (this.acroForm) {
  7115. this.xfa = this.acroForm.get('XFA');
  7116. var fields = this.acroForm.get('Fields');
  7117. if ((!fields || !isArray(fields) || fields.length === 0) &&
  7118. !this.xfa) {
  7119. // no fields and no XFA -- not a form (?)
  7120. this.acroForm = null;
  7121. }
  7122. }
  7123. } catch (ex) {
  7124. info('Something wrong with AcroForm entry');
  7125. this.acroForm = null;
  7126. }
  7127. },
  7128. get linearization() {
  7129. var length = this.stream.length;
  7130. var linearization = false;
  7131. if (length) {
  7132. try {
  7133. linearization = new Linearization(this.stream);
  7134. if (linearization.length != length) {
  7135. linearization = false;
  7136. }
  7137. } catch (err) {
  7138. if (err instanceof MissingDataException) {
  7139. throw err;
  7140. }
  7141. info('The linearization data is not available ' +
  7142. 'or unreadable PDF data is found');
  7143. linearization = false;
  7144. }
  7145. }
  7146. // shadow the prototype getter with a data property
  7147. return shadow(this, 'linearization', linearization);
  7148. },
  7149. get startXRef() {
  7150. var stream = this.stream;
  7151. var startXRef = 0;
  7152. var linearization = this.linearization;
  7153. if (linearization) {
  7154. // Find end of first obj.
  7155. stream.reset();
  7156. if (find(stream, 'endobj', 1024)) {
  7157. startXRef = stream.pos + 6;
  7158. }
  7159. } else {
  7160. // Find startxref by jumping backward from the end of the file.
  7161. var step = 1024;
  7162. var found = false, pos = stream.end;
  7163. while (!found && pos > 0) {
  7164. pos -= step - 'startxref'.length;
  7165. if (pos < 0) {
  7166. pos = 0;
  7167. }
  7168. stream.pos = pos;
  7169. found = find(stream, 'startxref', step, true);
  7170. }
  7171. if (found) {
  7172. stream.skip(9);
  7173. var ch;
  7174. do {
  7175. ch = stream.getByte();
  7176. } while (Lexer.isSpace(ch));
  7177. var str = '';
  7178. while (ch >= 0x20 && ch <= 0x39) { // < '9'
  7179. str += String.fromCharCode(ch);
  7180. ch = stream.getByte();
  7181. }
  7182. startXRef = parseInt(str, 10);
  7183. if (isNaN(startXRef)) {
  7184. startXRef = 0;
  7185. }
  7186. }
  7187. }
  7188. // shadow the prototype getter with a data property
  7189. return shadow(this, 'startXRef', startXRef);
  7190. },
  7191. get mainXRefEntriesOffset() {
  7192. var mainXRefEntriesOffset = 0;
  7193. var linearization = this.linearization;
  7194. if (linearization) {
  7195. mainXRefEntriesOffset = linearization.mainXRefEntriesOffset;
  7196. }
  7197. // shadow the prototype getter with a data property
  7198. return shadow(this, 'mainXRefEntriesOffset', mainXRefEntriesOffset);
  7199. },
  7200. // Find the header, remove leading garbage and setup the stream
  7201. // starting from the header.
  7202. checkHeader: function PDFDocument_checkHeader() {
  7203. var stream = this.stream;
  7204. stream.reset();
  7205. if (find(stream, '%PDF-', 1024)) {
  7206. // Found the header, trim off any garbage before it.
  7207. stream.moveStart();
  7208. // Reading file format version
  7209. var MAX_VERSION_LENGTH = 12;
  7210. var version = '', ch;
  7211. while ((ch = stream.getByte()) > 0x20) { // SPACE
  7212. if (version.length >= MAX_VERSION_LENGTH) {
  7213. break;
  7214. }
  7215. version += String.fromCharCode(ch);
  7216. }
  7217. // removing "%PDF-"-prefix
  7218. this.pdfFormatVersion = version.substring(5);
  7219. return;
  7220. }
  7221. // May not be a PDF file, continue anyway.
  7222. },
  7223. parseStartXRef: function PDFDocument_parseStartXRef() {
  7224. var startXRef = this.startXRef;
  7225. this.xref.setStartXRef(startXRef);
  7226. },
  7227. setup: function PDFDocument_setup(recoveryMode) {
  7228. this.xref.parse(recoveryMode);
  7229. this.catalog = new Catalog(this.pdfManager, this.xref);
  7230. },
  7231. get numPages() {
  7232. var linearization = this.linearization;
  7233. var num = linearization ? linearization.numPages : this.catalog.numPages;
  7234. // shadow the prototype getter
  7235. return shadow(this, 'numPages', num);
  7236. },
  7237. get documentInfo() {
  7238. var docInfo = {
  7239. PDFFormatVersion: this.pdfFormatVersion,
  7240. IsAcroFormPresent: !!this.acroForm,
  7241. IsXFAPresent: !!this.xfa
  7242. };
  7243. var infoDict;
  7244. try {
  7245. infoDict = this.xref.trailer.get('Info');
  7246. } catch (err) {
  7247. info('The document information dictionary is invalid.');
  7248. }
  7249. if (infoDict) {
  7250. var validEntries = DocumentInfoValidators.entries;
  7251. // Only fill the document info with valid entries from the spec.
  7252. for (var key in validEntries) {
  7253. if (infoDict.has(key)) {
  7254. var value = infoDict.get(key);
  7255. // Make sure the value conforms to the spec.
  7256. if (validEntries[key](value)) {
  7257. docInfo[key] = (typeof value !== 'string' ?
  7258. value : stringToPDFString(value));
  7259. } else {
  7260. info('Bad value in document info for "' + key + '"');
  7261. }
  7262. }
  7263. }
  7264. }
  7265. return shadow(this, 'documentInfo', docInfo);
  7266. },
  7267. get fingerprint() {
  7268. var xref = this.xref, hash, fileID = '';
  7269. if (xref.trailer.has('ID')) {
  7270. hash = stringToBytes(xref.trailer.get('ID')[0]);
  7271. } else {
  7272. hash = calculateMD5(this.stream.bytes.subarray(0, 100), 0, 100);
  7273. }
  7274. for (var i = 0, n = hash.length; i < n; i++) {
  7275. fileID += hash[i].toString(16);
  7276. }
  7277. return shadow(this, 'fingerprint', fileID);
  7278. },
  7279. getPage: function PDFDocument_getPage(pageIndex) {
  7280. return this.catalog.getPage(pageIndex);
  7281. },
  7282. cleanup: function PDFDocument_cleanup() {
  7283. return this.catalog.cleanup();
  7284. }
  7285. };
  7286. return PDFDocument;
  7287. })();
  7288. var Name = (function NameClosure() {
  7289. function Name(name) {
  7290. this.name = name;
  7291. }
  7292. Name.prototype = {};
  7293. var nameCache = {};
  7294. Name.get = function Name_get(name) {
  7295. var nameValue = nameCache[name];
  7296. return (nameValue ? nameValue : (nameCache[name] = new Name(name)));
  7297. };
  7298. return Name;
  7299. })();
  7300. var Cmd = (function CmdClosure() {
  7301. function Cmd(cmd) {
  7302. this.cmd = cmd;
  7303. }
  7304. Cmd.prototype = {};
  7305. var cmdCache = {};
  7306. Cmd.get = function Cmd_get(cmd) {
  7307. var cmdValue = cmdCache[cmd];
  7308. return (cmdValue ? cmdValue : (cmdCache[cmd] = new Cmd(cmd)));
  7309. };
  7310. return Cmd;
  7311. })();
  7312. var Dict = (function DictClosure() {
  7313. var nonSerializable = function nonSerializableClosure() {
  7314. return nonSerializable; // creating closure on some variable
  7315. };
  7316. var GETALL_DICTIONARY_TYPES_WHITELIST = {
  7317. 'Background': true,
  7318. 'ExtGState': true,
  7319. 'Halftone': true,
  7320. 'Layout': true,
  7321. 'Mask': true,
  7322. 'Pagination': true,
  7323. 'Printing': true
  7324. };
  7325. function isRecursionAllowedFor(dict) {
  7326. if (!isName(dict.Type)) {
  7327. return true;
  7328. }
  7329. var dictType = dict.Type.name;
  7330. return GETALL_DICTIONARY_TYPES_WHITELIST[dictType] === true;
  7331. }
  7332. // xref is optional
  7333. function Dict(xref) {
  7334. // Map should only be used internally, use functions below to access.
  7335. this.map = Object.create(null);
  7336. this.xref = xref;
  7337. this.objId = null;
  7338. this.__nonSerializable__ = nonSerializable; // disable cloning of the Dict
  7339. }
  7340. Dict.prototype = {
  7341. assignXref: function Dict_assignXref(newXref) {
  7342. this.xref = newXref;
  7343. },
  7344. // automatically dereferences Ref objects
  7345. get: function Dict_get(key1, key2, key3) {
  7346. var value;
  7347. var xref = this.xref;
  7348. if (typeof (value = this.map[key1]) != 'undefined' || key1 in this.map ||
  7349. typeof key2 == 'undefined') {
  7350. return xref ? xref.fetchIfRef(value) : value;
  7351. }
  7352. if (typeof (value = this.map[key2]) != 'undefined' || key2 in this.map ||
  7353. typeof key3 == 'undefined') {
  7354. return xref ? xref.fetchIfRef(value) : value;
  7355. }
  7356. value = this.map[key3] || null;
  7357. return xref ? xref.fetchIfRef(value) : value;
  7358. },
  7359. // Same as get(), but returns a promise and uses fetchIfRefAsync().
  7360. getAsync: function Dict_getAsync(key1, key2, key3) {
  7361. var value;
  7362. var xref = this.xref;
  7363. if (typeof (value = this.map[key1]) !== undefined || key1 in this.map ||
  7364. typeof key2 === undefined) {
  7365. if (xref) {
  7366. return xref.fetchIfRefAsync(value);
  7367. }
  7368. return Promise.resolve(value);
  7369. }
  7370. if (typeof (value = this.map[key2]) !== undefined || key2 in this.map ||
  7371. typeof key3 === undefined) {
  7372. if (xref) {
  7373. return xref.fetchIfRefAsync(value);
  7374. }
  7375. return Promise.resolve(value);
  7376. }
  7377. value = this.map[key3] || null;
  7378. if (xref) {
  7379. return xref.fetchIfRefAsync(value);
  7380. }
  7381. return Promise.resolve(value);
  7382. },
  7383. // no dereferencing
  7384. getRaw: function Dict_getRaw(key) {
  7385. return this.map[key];
  7386. },
  7387. // creates new map and dereferences all Refs
  7388. getAll: function Dict_getAll() {
  7389. var all = Object.create(null);
  7390. var queue = null;
  7391. var key, obj;
  7392. for (key in this.map) {
  7393. obj = this.get(key);
  7394. if (obj instanceof Dict) {
  7395. if (isRecursionAllowedFor(obj)) {
  7396. (queue || (queue = [])).push({target: all, key: key, obj: obj});
  7397. } else {
  7398. all[key] = this.getRaw(key);
  7399. }
  7400. } else {
  7401. all[key] = obj;
  7402. }
  7403. }
  7404. if (!queue) {
  7405. return all;
  7406. }
  7407. // trying to take cyclic references into the account
  7408. var processed = Object.create(null);
  7409. while (queue.length > 0) {
  7410. var item = queue.shift();
  7411. var itemObj = item.obj;
  7412. var objId = itemObj.objId;
  7413. if (objId && objId in processed) {
  7414. item.target[item.key] = processed[objId];
  7415. continue;
  7416. }
  7417. var dereferenced = Object.create(null);
  7418. for (key in itemObj.map) {
  7419. obj = itemObj.get(key);
  7420. if (obj instanceof Dict) {
  7421. if (isRecursionAllowedFor(obj)) {
  7422. queue.push({target: dereferenced, key: key, obj: obj});
  7423. } else {
  7424. dereferenced[key] = itemObj.getRaw(key);
  7425. }
  7426. } else {
  7427. dereferenced[key] = obj;
  7428. }
  7429. }
  7430. if (objId) {
  7431. processed[objId] = dereferenced;
  7432. }
  7433. item.target[item.key] = dereferenced;
  7434. }
  7435. return all;
  7436. },
  7437. set: function Dict_set(key, value) {
  7438. this.map[key] = value;
  7439. },
  7440. has: function Dict_has(key) {
  7441. return key in this.map;
  7442. },
  7443. forEach: function Dict_forEach(callback) {
  7444. for (var key in this.map) {
  7445. callback(key, this.get(key));
  7446. }
  7447. }
  7448. };
  7449. Dict.empty = new Dict(null);
  7450. return Dict;
  7451. })();
  7452. var Ref = (function RefClosure() {
  7453. function Ref(num, gen) {
  7454. this.num = num;
  7455. this.gen = gen;
  7456. }
  7457. Ref.prototype = {};
  7458. return Ref;
  7459. })();
  7460. // The reference is identified by number and generation.
  7461. // This structure stores only one instance of the reference.
  7462. var RefSet = (function RefSetClosure() {
  7463. function RefSet() {
  7464. this.dict = {};
  7465. }
  7466. RefSet.prototype = {
  7467. has: function RefSet_has(ref) {
  7468. return ('R' + ref.num + '.' + ref.gen) in this.dict;
  7469. },
  7470. put: function RefSet_put(ref) {
  7471. this.dict['R' + ref.num + '.' + ref.gen] = true;
  7472. },
  7473. remove: function RefSet_remove(ref) {
  7474. delete this.dict['R' + ref.num + '.' + ref.gen];
  7475. }
  7476. };
  7477. return RefSet;
  7478. })();
  7479. var RefSetCache = (function RefSetCacheClosure() {
  7480. function RefSetCache() {
  7481. this.dict = Object.create(null);
  7482. }
  7483. RefSetCache.prototype = {
  7484. get: function RefSetCache_get(ref) {
  7485. return this.dict['R' + ref.num + '.' + ref.gen];
  7486. },
  7487. has: function RefSetCache_has(ref) {
  7488. return ('R' + ref.num + '.' + ref.gen) in this.dict;
  7489. },
  7490. put: function RefSetCache_put(ref, obj) {
  7491. this.dict['R' + ref.num + '.' + ref.gen] = obj;
  7492. },
  7493. putAlias: function RefSetCache_putAlias(ref, aliasRef) {
  7494. this.dict['R' + ref.num + '.' + ref.gen] = this.get(aliasRef);
  7495. },
  7496. forEach: function RefSetCache_forEach(fn, thisArg) {
  7497. for (var i in this.dict) {
  7498. fn.call(thisArg, this.dict[i]);
  7499. }
  7500. },
  7501. clear: function RefSetCache_clear() {
  7502. this.dict = Object.create(null);
  7503. }
  7504. };
  7505. return RefSetCache;
  7506. })();
  7507. var Catalog = (function CatalogClosure() {
  7508. function Catalog(pdfManager, xref) {
  7509. this.pdfManager = pdfManager;
  7510. this.xref = xref;
  7511. this.catDict = xref.getCatalogObj();
  7512. this.fontCache = new RefSetCache();
  7513. assert(isDict(this.catDict),
  7514. 'catalog object is not a dictionary');
  7515. this.pagePromises = [];
  7516. }
  7517. Catalog.prototype = {
  7518. get metadata() {
  7519. var streamRef = this.catDict.getRaw('Metadata');
  7520. if (!isRef(streamRef)) {
  7521. return shadow(this, 'metadata', null);
  7522. }
  7523. var encryptMetadata = (!this.xref.encrypt ? false :
  7524. this.xref.encrypt.encryptMetadata);
  7525. var stream = this.xref.fetch(streamRef, !encryptMetadata);
  7526. var metadata;
  7527. if (stream && isDict(stream.dict)) {
  7528. var type = stream.dict.get('Type');
  7529. var subtype = stream.dict.get('Subtype');
  7530. if (isName(type) && isName(subtype) &&
  7531. type.name === 'Metadata' && subtype.name === 'XML') {
  7532. // XXX: This should examine the charset the XML document defines,
  7533. // however since there are currently no real means to decode
  7534. // arbitrary charsets, let's just hope that the author of the PDF
  7535. // was reasonable enough to stick with the XML default charset,
  7536. // which is UTF-8.
  7537. try {
  7538. metadata = stringToUTF8String(bytesToString(stream.getBytes()));
  7539. } catch (e) {
  7540. info('Skipping invalid metadata.');
  7541. }
  7542. }
  7543. }
  7544. return shadow(this, 'metadata', metadata);
  7545. },
  7546. get toplevelPagesDict() {
  7547. var pagesObj = this.catDict.get('Pages');
  7548. assert(isDict(pagesObj), 'invalid top-level pages dictionary');
  7549. // shadow the prototype getter
  7550. return shadow(this, 'toplevelPagesDict', pagesObj);
  7551. },
  7552. get documentOutline() {
  7553. var obj = null;
  7554. try {
  7555. obj = this.readDocumentOutline();
  7556. } catch (ex) {
  7557. if (ex instanceof MissingDataException) {
  7558. throw ex;
  7559. }
  7560. warn('Unable to read document outline');
  7561. }
  7562. return shadow(this, 'documentOutline', obj);
  7563. },
  7564. readDocumentOutline: function Catalog_readDocumentOutline() {
  7565. var xref = this.xref;
  7566. var obj = this.catDict.get('Outlines');
  7567. var root = { items: [] };
  7568. if (isDict(obj)) {
  7569. obj = obj.getRaw('First');
  7570. var processed = new RefSet();
  7571. if (isRef(obj)) {
  7572. var queue = [{obj: obj, parent: root}];
  7573. // to avoid recursion keeping track of the items
  7574. // in the processed dictionary
  7575. processed.put(obj);
  7576. while (queue.length > 0) {
  7577. var i = queue.shift();
  7578. var outlineDict = xref.fetchIfRef(i.obj);
  7579. if (outlineDict === null) {
  7580. continue;
  7581. }
  7582. if (!outlineDict.has('Title')) {
  7583. error('Invalid outline item');
  7584. }
  7585. var dest = outlineDict.get('A');
  7586. if (dest) {
  7587. dest = dest.get('D');
  7588. } else if (outlineDict.has('Dest')) {
  7589. dest = outlineDict.getRaw('Dest');
  7590. if (isName(dest)) {
  7591. dest = dest.name;
  7592. }
  7593. }
  7594. var title = outlineDict.get('Title');
  7595. var outlineItem = {
  7596. dest: dest,
  7597. title: stringToPDFString(title),
  7598. color: outlineDict.get('C') || [0, 0, 0],
  7599. count: outlineDict.get('Count'),
  7600. bold: !!(outlineDict.get('F') & 2),
  7601. italic: !!(outlineDict.get('F') & 1),
  7602. items: []
  7603. };
  7604. i.parent.items.push(outlineItem);
  7605. obj = outlineDict.getRaw('First');
  7606. if (isRef(obj) && !processed.has(obj)) {
  7607. queue.push({obj: obj, parent: outlineItem});
  7608. processed.put(obj);
  7609. }
  7610. obj = outlineDict.getRaw('Next');
  7611. if (isRef(obj) && !processed.has(obj)) {
  7612. queue.push({obj: obj, parent: i.parent});
  7613. processed.put(obj);
  7614. }
  7615. }
  7616. }
  7617. }
  7618. return (root.items.length > 0 ? root.items : null);
  7619. },
  7620. get numPages() {
  7621. var obj = this.toplevelPagesDict.get('Count');
  7622. assert(
  7623. isInt(obj),
  7624. 'page count in top level pages object is not an integer'
  7625. );
  7626. // shadow the prototype getter
  7627. return shadow(this, 'num', obj);
  7628. },
  7629. get destinations() {
  7630. function fetchDestination(dest) {
  7631. return isDict(dest) ? dest.get('D') : dest;
  7632. }
  7633. var xref = this.xref;
  7634. var dests = {}, nameTreeRef, nameDictionaryRef;
  7635. var obj = this.catDict.get('Names');
  7636. if (obj && obj.has('Dests')) {
  7637. nameTreeRef = obj.getRaw('Dests');
  7638. } else if (this.catDict.has('Dests')) {
  7639. nameDictionaryRef = this.catDict.get('Dests');
  7640. }
  7641. if (nameDictionaryRef) {
  7642. // reading simple destination dictionary
  7643. obj = nameDictionaryRef;
  7644. obj.forEach(function catalogForEach(key, value) {
  7645. if (!value) {
  7646. return;
  7647. }
  7648. dests[key] = fetchDestination(value);
  7649. });
  7650. }
  7651. if (nameTreeRef) {
  7652. var nameTree = new NameTree(nameTreeRef, xref);
  7653. var names = nameTree.getAll();
  7654. for (var name in names) {
  7655. if (!names.hasOwnProperty(name)) {
  7656. continue;
  7657. }
  7658. dests[name] = fetchDestination(names[name]);
  7659. }
  7660. }
  7661. return shadow(this, 'destinations', dests);
  7662. },
  7663. get attachments() {
  7664. var xref = this.xref;
  7665. var attachments = null, nameTreeRef;
  7666. var obj = this.catDict.get('Names');
  7667. if (obj) {
  7668. nameTreeRef = obj.getRaw('EmbeddedFiles');
  7669. }
  7670. if (nameTreeRef) {
  7671. var nameTree = new NameTree(nameTreeRef, xref);
  7672. var names = nameTree.getAll();
  7673. for (var name in names) {
  7674. if (!names.hasOwnProperty(name)) {
  7675. continue;
  7676. }
  7677. var fs = new FileSpec(names[name], xref);
  7678. if (!attachments) {
  7679. attachments = {};
  7680. }
  7681. attachments[stringToPDFString(name)] = fs.serializable;
  7682. }
  7683. }
  7684. return shadow(this, 'attachments', attachments);
  7685. },
  7686. get javaScript() {
  7687. var xref = this.xref;
  7688. var obj = this.catDict.get('Names');
  7689. var javaScript = [];
  7690. if (obj && obj.has('JavaScript')) {
  7691. var nameTree = new NameTree(obj.getRaw('JavaScript'), xref);
  7692. var names = nameTree.getAll();
  7693. for (var name in names) {
  7694. if (!names.hasOwnProperty(name)) {
  7695. continue;
  7696. }
  7697. // We don't really use the JavaScript right now. This code is
  7698. // defensive so we don't cause errors on document load.
  7699. var jsDict = names[name];
  7700. if (!isDict(jsDict)) {
  7701. continue;
  7702. }
  7703. var type = jsDict.get('S');
  7704. if (!isName(type) || type.name !== 'JavaScript') {
  7705. continue;
  7706. }
  7707. var js = jsDict.get('JS');
  7708. if (!isString(js) && !isStream(js)) {
  7709. continue;
  7710. }
  7711. if (isStream(js)) {
  7712. js = bytesToString(js.getBytes());
  7713. }
  7714. javaScript.push(stringToPDFString(js));
  7715. }
  7716. }
  7717. // Append OpenAction actions to javaScript array
  7718. var openactionDict = this.catDict.get('OpenAction');
  7719. if (isDict(openactionDict)) {
  7720. var objType = openactionDict.get('Type');
  7721. var actionType = openactionDict.get('S');
  7722. var action = openactionDict.get('N');
  7723. var isPrintAction = (isName(objType) && objType.name === 'Action' &&
  7724. isName(actionType) && actionType.name === 'Named' &&
  7725. isName(action) && action.name === 'Print');
  7726. if (isPrintAction) {
  7727. javaScript.push('print(true);');
  7728. }
  7729. }
  7730. return shadow(this, 'javaScript', javaScript);
  7731. },
  7732. cleanup: function Catalog_cleanup() {
  7733. var promises = [];
  7734. this.fontCache.forEach(function (promise) {
  7735. promises.push(promise);
  7736. });
  7737. return Promise.all(promises).then(function (translatedFonts) {
  7738. for (var i = 0, ii = translatedFonts.length; i < ii; i++) {
  7739. var font = translatedFonts[i].dict;
  7740. delete font.translated;
  7741. }
  7742. this.fontCache.clear();
  7743. }.bind(this));
  7744. },
  7745. getPage: function Catalog_getPage(pageIndex) {
  7746. if (!(pageIndex in this.pagePromises)) {
  7747. this.pagePromises[pageIndex] = this.getPageDict(pageIndex).then(
  7748. function (a) {
  7749. var dict = a[0];
  7750. var ref = a[1];
  7751. return new Page(this.pdfManager, this.xref, pageIndex, dict, ref,
  7752. this.fontCache);
  7753. }.bind(this)
  7754. );
  7755. }
  7756. return this.pagePromises[pageIndex];
  7757. },
  7758. getPageDict: function Catalog_getPageDict(pageIndex) {
  7759. var capability = createPromiseCapability();
  7760. var nodesToVisit = [this.catDict.getRaw('Pages')];
  7761. var currentPageIndex = 0;
  7762. var xref = this.xref;
  7763. function next() {
  7764. while (nodesToVisit.length) {
  7765. var currentNode = nodesToVisit.pop();
  7766. if (isRef(currentNode)) {
  7767. xref.fetchAsync(currentNode).then(function (obj) {
  7768. if ((isDict(obj, 'Page') || (isDict(obj) && !obj.has('Kids')))) {
  7769. if (pageIndex === currentPageIndex) {
  7770. capability.resolve([obj, currentNode]);
  7771. } else {
  7772. currentPageIndex++;
  7773. next();
  7774. }
  7775. return;
  7776. }
  7777. nodesToVisit.push(obj);
  7778. next();
  7779. }.bind(this), capability.reject.bind(capability));
  7780. return;
  7781. }
  7782. // must be a child page dictionary
  7783. assert(
  7784. isDict(currentNode),
  7785. 'page dictionary kid reference points to wrong type of object'
  7786. );
  7787. var count = currentNode.get('Count');
  7788. // Skip nodes where the page can't be.
  7789. if (currentPageIndex + count <= pageIndex) {
  7790. currentPageIndex += count;
  7791. continue;
  7792. }
  7793. var kids = currentNode.get('Kids');
  7794. assert(isArray(kids), 'page dictionary kids object is not an array');
  7795. if (count === kids.length) {
  7796. // Nodes that don't have the page have been skipped and this is the
  7797. // bottom of the tree which means the page requested must be a
  7798. // descendant of this pages node. Ideally we would just resolve the
  7799. // promise with the page ref here, but there is the case where more
  7800. // pages nodes could link to single a page (see issue 3666 pdf). To
  7801. // handle this push it back on the queue so if it is a pages node it
  7802. // will be descended into.
  7803. nodesToVisit = [kids[pageIndex - currentPageIndex]];
  7804. currentPageIndex = pageIndex;
  7805. continue;
  7806. } else {
  7807. for (var last = kids.length - 1; last >= 0; last--) {
  7808. nodesToVisit.push(kids[last]);
  7809. }
  7810. }
  7811. }
  7812. capability.reject('Page index ' + pageIndex + ' not found.');
  7813. }
  7814. next();
  7815. return capability.promise;
  7816. },
  7817. getPageIndex: function Catalog_getPageIndex(ref) {
  7818. // The page tree nodes have the count of all the leaves below them. To get
  7819. // how many pages are before we just have to walk up the tree and keep
  7820. // adding the count of siblings to the left of the node.
  7821. var xref = this.xref;
  7822. function pagesBeforeRef(kidRef) {
  7823. var total = 0;
  7824. var parentRef;
  7825. return xref.fetchAsync(kidRef).then(function (node) {
  7826. if (!node) {
  7827. return null;
  7828. }
  7829. parentRef = node.getRaw('Parent');
  7830. return node.getAsync('Parent');
  7831. }).then(function (parent) {
  7832. if (!parent) {
  7833. return null;
  7834. }
  7835. return parent.getAsync('Kids');
  7836. }).then(function (kids) {
  7837. if (!kids) {
  7838. return null;
  7839. }
  7840. var kidPromises = [];
  7841. var found = false;
  7842. for (var i = 0; i < kids.length; i++) {
  7843. var kid = kids[i];
  7844. assert(isRef(kid), 'kids must be a ref');
  7845. if (kid.num == kidRef.num) {
  7846. found = true;
  7847. break;
  7848. }
  7849. kidPromises.push(xref.fetchAsync(kid).then(function (kid) {
  7850. if (kid.has('Count')) {
  7851. var count = kid.get('Count');
  7852. total += count;
  7853. } else { // page leaf node
  7854. total++;
  7855. }
  7856. }));
  7857. }
  7858. if (!found) {
  7859. error('kid ref not found in parents kids');
  7860. }
  7861. return Promise.all(kidPromises).then(function () {
  7862. return [total, parentRef];
  7863. });
  7864. });
  7865. }
  7866. var total = 0;
  7867. function next(ref) {
  7868. return pagesBeforeRef(ref).then(function (args) {
  7869. if (!args) {
  7870. return total;
  7871. }
  7872. var count = args[0];
  7873. var parentRef = args[1];
  7874. total += count;
  7875. return next(parentRef);
  7876. });
  7877. }
  7878. return next(ref);
  7879. }
  7880. };
  7881. return Catalog;
  7882. })();
  7883. var XRef = (function XRefClosure() {
  7884. function XRef(stream, password) {
  7885. this.stream = stream;
  7886. this.entries = [];
  7887. this.xrefstms = {};
  7888. // prepare the XRef cache
  7889. this.cache = [];
  7890. this.password = password;
  7891. }
  7892. XRef.prototype = {
  7893. setStartXRef: function XRef_setStartXRef(startXRef) {
  7894. // Store the starting positions of xref tables as we process them
  7895. // so we can recover from missing data errors
  7896. this.startXRefQueue = [startXRef];
  7897. },
  7898. parse: function XRef_parse(recoveryMode) {
  7899. var trailerDict;
  7900. if (!recoveryMode) {
  7901. trailerDict = this.readXRef();
  7902. } else {
  7903. warn('Indexing all PDF objects');
  7904. trailerDict = this.indexObjects();
  7905. }
  7906. trailerDict.assignXref(this);
  7907. this.trailer = trailerDict;
  7908. var encrypt = trailerDict.get('Encrypt');
  7909. if (encrypt) {
  7910. var ids = trailerDict.get('ID');
  7911. var fileId = (ids && ids.length) ? ids[0] : '';
  7912. this.encrypt = new CipherTransformFactory(encrypt, fileId,
  7913. this.password);
  7914. }
  7915. // get the root dictionary (catalog) object
  7916. if (!(this.root = trailerDict.get('Root'))) {
  7917. error('Invalid root reference');
  7918. }
  7919. },
  7920. processXRefTable: function XRef_processXRefTable(parser) {
  7921. if (!('tableState' in this)) {
  7922. // Stores state of the table as we process it so we can resume
  7923. // from middle of table in case of missing data error
  7924. this.tableState = {
  7925. entryNum: 0,
  7926. streamPos: parser.lexer.stream.pos,
  7927. parserBuf1: parser.buf1,
  7928. parserBuf2: parser.buf2
  7929. };
  7930. }
  7931. var obj = this.readXRefTable(parser);
  7932. // Sanity check
  7933. if (!isCmd(obj, 'trailer')) {
  7934. error('Invalid XRef table: could not find trailer dictionary');
  7935. }
  7936. // Read trailer dictionary, e.g.
  7937. // trailer
  7938. // << /Size 22
  7939. // /Root 20R
  7940. // /Info 10R
  7941. // /ID [ <81b14aafa313db63dbd6f981e49f94f4> ]
  7942. // >>
  7943. // The parser goes through the entire stream << ... >> and provides
  7944. // a getter interface for the key-value table
  7945. var dict = parser.getObj();
  7946. // The pdflib PDF generator can generate a nested trailer dictionary
  7947. if (!isDict(dict) && dict.dict) {
  7948. dict = dict.dict;
  7949. }
  7950. if (!isDict(dict)) {
  7951. error('Invalid XRef table: could not parse trailer dictionary');
  7952. }
  7953. delete this.tableState;
  7954. return dict;
  7955. },
  7956. readXRefTable: function XRef_readXRefTable(parser) {
  7957. // Example of cross-reference table:
  7958. // xref
  7959. // 0 1 <-- subsection header (first obj #, obj count)
  7960. // 0000000000 65535 f <-- actual object (offset, generation #, f/n)
  7961. // 23 2 <-- subsection header ... and so on ...
  7962. // 0000025518 00002 n
  7963. // 0000025635 00000 n
  7964. // trailer
  7965. // ...
  7966. var stream = parser.lexer.stream;
  7967. var tableState = this.tableState;
  7968. stream.pos = tableState.streamPos;
  7969. parser.buf1 = tableState.parserBuf1;
  7970. parser.buf2 = tableState.parserBuf2;
  7971. // Outer loop is over subsection headers
  7972. var obj;
  7973. while (true) {
  7974. if (!('firstEntryNum' in tableState) || !('entryCount' in tableState)) {
  7975. if (isCmd(obj = parser.getObj(), 'trailer')) {
  7976. break;
  7977. }
  7978. tableState.firstEntryNum = obj;
  7979. tableState.entryCount = parser.getObj();
  7980. }
  7981. var first = tableState.firstEntryNum;
  7982. var count = tableState.entryCount;
  7983. if (!isInt(first) || !isInt(count)) {
  7984. error('Invalid XRef table: wrong types in subsection header');
  7985. }
  7986. // Inner loop is over objects themselves
  7987. for (var i = tableState.entryNum; i < count; i++) {
  7988. tableState.streamPos = stream.pos;
  7989. tableState.entryNum = i;
  7990. tableState.parserBuf1 = parser.buf1;
  7991. tableState.parserBuf2 = parser.buf2;
  7992. var entry = {};
  7993. entry.offset = parser.getObj();
  7994. entry.gen = parser.getObj();
  7995. var type = parser.getObj();
  7996. if (isCmd(type, 'f')) {
  7997. entry.free = true;
  7998. } else if (isCmd(type, 'n')) {
  7999. entry.uncompressed = true;
  8000. }
  8001. // Validate entry obj
  8002. if (!isInt(entry.offset) || !isInt(entry.gen) ||
  8003. !(entry.free || entry.uncompressed)) {
  8004. console.log(entry.offset, entry.gen, entry.free,
  8005. entry.uncompressed);
  8006. error('Invalid entry in XRef subsection: ' + first + ', ' + count);
  8007. }
  8008. if (!this.entries[i + first]) {
  8009. this.entries[i + first] = entry;
  8010. }
  8011. }
  8012. tableState.entryNum = 0;
  8013. tableState.streamPos = stream.pos;
  8014. tableState.parserBuf1 = parser.buf1;
  8015. tableState.parserBuf2 = parser.buf2;
  8016. delete tableState.firstEntryNum;
  8017. delete tableState.entryCount;
  8018. }
  8019. // Per issue 3248: hp scanners generate bad XRef
  8020. if (first === 1 && this.entries[1] && this.entries[1].free) {
  8021. // shifting the entries
  8022. this.entries.shift();
  8023. }
  8024. // Sanity check: as per spec, first object must be free
  8025. if (this.entries[0] && !this.entries[0].free) {
  8026. error('Invalid XRef table: unexpected first object');
  8027. }
  8028. return obj;
  8029. },
  8030. processXRefStream: function XRef_processXRefStream(stream) {
  8031. if (!('streamState' in this)) {
  8032. // Stores state of the stream as we process it so we can resume
  8033. // from middle of stream in case of missing data error
  8034. var streamParameters = stream.dict;
  8035. var byteWidths = streamParameters.get('W');
  8036. var range = streamParameters.get('Index');
  8037. if (!range) {
  8038. range = [0, streamParameters.get('Size')];
  8039. }
  8040. this.streamState = {
  8041. entryRanges: range,
  8042. byteWidths: byteWidths,
  8043. entryNum: 0,
  8044. streamPos: stream.pos
  8045. };
  8046. }
  8047. this.readXRefStream(stream);
  8048. delete this.streamState;
  8049. return stream.dict;
  8050. },
  8051. readXRefStream: function XRef_readXRefStream(stream) {
  8052. var i, j;
  8053. var streamState = this.streamState;
  8054. stream.pos = streamState.streamPos;
  8055. var byteWidths = streamState.byteWidths;
  8056. var typeFieldWidth = byteWidths[0];
  8057. var offsetFieldWidth = byteWidths[1];
  8058. var generationFieldWidth = byteWidths[2];
  8059. var entryRanges = streamState.entryRanges;
  8060. while (entryRanges.length > 0) {
  8061. var first = entryRanges[0];
  8062. var n = entryRanges[1];
  8063. if (!isInt(first) || !isInt(n)) {
  8064. error('Invalid XRef range fields: ' + first + ', ' + n);
  8065. }
  8066. if (!isInt(typeFieldWidth) || !isInt(offsetFieldWidth) ||
  8067. !isInt(generationFieldWidth)) {
  8068. error('Invalid XRef entry fields length: ' + first + ', ' + n);
  8069. }
  8070. for (i = streamState.entryNum; i < n; ++i) {
  8071. streamState.entryNum = i;
  8072. streamState.streamPos = stream.pos;
  8073. var type = 0, offset = 0, generation = 0;
  8074. for (j = 0; j < typeFieldWidth; ++j) {
  8075. type = (type << 8) | stream.getByte();
  8076. }
  8077. // if type field is absent, its default value is 1
  8078. if (typeFieldWidth === 0) {
  8079. type = 1;
  8080. }
  8081. for (j = 0; j < offsetFieldWidth; ++j) {
  8082. offset = (offset << 8) | stream.getByte();
  8083. }
  8084. for (j = 0; j < generationFieldWidth; ++j) {
  8085. generation = (generation << 8) | stream.getByte();
  8086. }
  8087. var entry = {};
  8088. entry.offset = offset;
  8089. entry.gen = generation;
  8090. switch (type) {
  8091. case 0:
  8092. entry.free = true;
  8093. break;
  8094. case 1:
  8095. entry.uncompressed = true;
  8096. break;
  8097. case 2:
  8098. break;
  8099. default:
  8100. error('Invalid XRef entry type: ' + type);
  8101. }
  8102. if (!this.entries[first + i]) {
  8103. this.entries[first + i] = entry;
  8104. }
  8105. }
  8106. streamState.entryNum = 0;
  8107. streamState.streamPos = stream.pos;
  8108. entryRanges.splice(0, 2);
  8109. }
  8110. },
  8111. indexObjects: function XRef_indexObjects() {
  8112. // Simple scan through the PDF content to find objects,
  8113. // trailers and XRef streams.
  8114. function readToken(data, offset) {
  8115. var token = '', ch = data[offset];
  8116. while (ch !== 13 && ch !== 10) {
  8117. if (++offset >= data.length) {
  8118. break;
  8119. }
  8120. token += String.fromCharCode(ch);
  8121. ch = data[offset];
  8122. }
  8123. return token;
  8124. }
  8125. function skipUntil(data, offset, what) {
  8126. var length = what.length, dataLength = data.length;
  8127. var skipped = 0;
  8128. // finding byte sequence
  8129. while (offset < dataLength) {
  8130. var i = 0;
  8131. while (i < length && data[offset + i] == what[i]) {
  8132. ++i;
  8133. }
  8134. if (i >= length) {
  8135. break; // sequence found
  8136. }
  8137. offset++;
  8138. skipped++;
  8139. }
  8140. return skipped;
  8141. }
  8142. var trailerBytes = new Uint8Array([116, 114, 97, 105, 108, 101, 114]);
  8143. var startxrefBytes = new Uint8Array([115, 116, 97, 114, 116, 120, 114,
  8144. 101, 102]);
  8145. var endobjBytes = new Uint8Array([101, 110, 100, 111, 98, 106]);
  8146. var xrefBytes = new Uint8Array([47, 88, 82, 101, 102]);
  8147. var stream = this.stream;
  8148. stream.pos = 0;
  8149. var buffer = stream.getBytes();
  8150. var position = stream.start, length = buffer.length;
  8151. var trailers = [], xrefStms = [];
  8152. while (position < length) {
  8153. var ch = buffer[position];
  8154. if (ch === 32 || ch === 9 || ch === 13 || ch === 10) {
  8155. ++position;
  8156. continue;
  8157. }
  8158. if (ch === 37) { // %-comment
  8159. do {
  8160. ++position;
  8161. if (position >= length) {
  8162. break;
  8163. }
  8164. ch = buffer[position];
  8165. } while (ch !== 13 && ch !== 10);
  8166. continue;
  8167. }
  8168. var token = readToken(buffer, position);
  8169. var m;
  8170. if (token === 'xref') {
  8171. position += skipUntil(buffer, position, trailerBytes);
  8172. trailers.push(position);
  8173. position += skipUntil(buffer, position, startxrefBytes);
  8174. } else if ((m = /^(\d+)\s+(\d+)\s+obj\b/.exec(token))) {
  8175. this.entries[m[1]] = {
  8176. offset: position,
  8177. gen: m[2] | 0,
  8178. uncompressed: true
  8179. };
  8180. var contentLength = skipUntil(buffer, position, endobjBytes) + 7;
  8181. var content = buffer.subarray(position, position + contentLength);
  8182. // checking XRef stream suspect
  8183. // (it shall have '/XRef' and next char is not a letter)
  8184. var xrefTagOffset = skipUntil(content, 0, xrefBytes);
  8185. if (xrefTagOffset < contentLength &&
  8186. content[xrefTagOffset + 5] < 64) {
  8187. xrefStms.push(position);
  8188. this.xrefstms[position] = 1; // don't read it recursively
  8189. }
  8190. position += contentLength;
  8191. } else {
  8192. position += token.length + 1;
  8193. }
  8194. }
  8195. // reading XRef streams
  8196. var i, ii;
  8197. for (i = 0, ii = xrefStms.length; i < ii; ++i) {
  8198. this.startXRefQueue.push(xrefStms[i]);
  8199. this.readXRef(/* recoveryMode */ true);
  8200. }
  8201. // finding main trailer
  8202. var dict;
  8203. for (i = 0, ii = trailers.length; i < ii; ++i) {
  8204. stream.pos = trailers[i];
  8205. var parser = new Parser(new Lexer(stream), true, null);
  8206. var obj = parser.getObj();
  8207. if (!isCmd(obj, 'trailer')) {
  8208. continue;
  8209. }
  8210. // read the trailer dictionary
  8211. if (!isDict(dict = parser.getObj())) {
  8212. continue;
  8213. }
  8214. // taking the first one with 'ID'
  8215. if (dict.has('ID')) {
  8216. return dict;
  8217. }
  8218. }
  8219. // no tailer with 'ID', taking last one (if exists)
  8220. if (dict) {
  8221. return dict;
  8222. }
  8223. // nothing helps
  8224. // calling error() would reject worker with an UnknownErrorException.
  8225. throw new InvalidPDFException('Invalid PDF structure');
  8226. },
  8227. readXRef: function XRef_readXRef(recoveryMode) {
  8228. var stream = this.stream;
  8229. try {
  8230. while (this.startXRefQueue.length) {
  8231. var startXRef = this.startXRefQueue[0];
  8232. stream.pos = startXRef + stream.start;
  8233. var parser = new Parser(new Lexer(stream), true, null);
  8234. var obj = parser.getObj();
  8235. var dict;
  8236. // Get dictionary
  8237. if (isCmd(obj, 'xref')) {
  8238. // Parse end-of-file XRef
  8239. dict = this.processXRefTable(parser);
  8240. if (!this.topDict) {
  8241. this.topDict = dict;
  8242. }
  8243. // Recursively get other XRefs 'XRefStm', if any
  8244. obj = dict.get('XRefStm');
  8245. if (isInt(obj)) {
  8246. var pos = obj;
  8247. // ignore previously loaded xref streams
  8248. // (possible infinite recursion)
  8249. if (!(pos in this.xrefstms)) {
  8250. this.xrefstms[pos] = 1;
  8251. this.startXRefQueue.push(pos);
  8252. }
  8253. }
  8254. } else if (isInt(obj)) {
  8255. // Parse in-stream XRef
  8256. if (!isInt(parser.getObj()) ||
  8257. !isCmd(parser.getObj(), 'obj') ||
  8258. !isStream(obj = parser.getObj())) {
  8259. error('Invalid XRef stream');
  8260. }
  8261. dict = this.processXRefStream(obj);
  8262. if (!this.topDict) {
  8263. this.topDict = dict;
  8264. }
  8265. if (!dict) {
  8266. error('Failed to read XRef stream');
  8267. }
  8268. } else {
  8269. error('Invalid XRef stream header');
  8270. }
  8271. // Recursively get previous dictionary, if any
  8272. obj = dict.get('Prev');
  8273. if (isInt(obj)) {
  8274. this.startXRefQueue.push(obj);
  8275. } else if (isRef(obj)) {
  8276. // The spec says Prev must not be a reference, i.e. "/Prev NNN"
  8277. // This is a fallback for non-compliant PDFs, i.e. "/Prev NNN 0 R"
  8278. this.startXRefQueue.push(obj.num);
  8279. }
  8280. this.startXRefQueue.shift();
  8281. }
  8282. return this.topDict;
  8283. } catch (e) {
  8284. if (e instanceof MissingDataException) {
  8285. throw e;
  8286. }
  8287. info('(while reading XRef): ' + e);
  8288. }
  8289. if (recoveryMode) {
  8290. return;
  8291. }
  8292. throw new XRefParseException();
  8293. },
  8294. getEntry: function XRef_getEntry(i) {
  8295. var xrefEntry = this.entries[i];
  8296. if (xrefEntry && !xrefEntry.free && xrefEntry.offset) {
  8297. return xrefEntry;
  8298. }
  8299. return null;
  8300. },
  8301. fetchIfRef: function XRef_fetchIfRef(obj) {
  8302. if (!isRef(obj)) {
  8303. return obj;
  8304. }
  8305. return this.fetch(obj);
  8306. },
  8307. fetch: function XRef_fetch(ref, suppressEncryption) {
  8308. assert(isRef(ref), 'ref object is not a reference');
  8309. var num = ref.num;
  8310. if (num in this.cache) {
  8311. var cacheEntry = this.cache[num];
  8312. return cacheEntry;
  8313. }
  8314. var xrefEntry = this.getEntry(num);
  8315. // the referenced entry can be free
  8316. if (xrefEntry === null) {
  8317. return (this.cache[num] = null);
  8318. }
  8319. if (xrefEntry.uncompressed) {
  8320. xrefEntry = this.fetchUncompressed(ref, xrefEntry, suppressEncryption);
  8321. } else {
  8322. xrefEntry = this.fetchCompressed(xrefEntry, suppressEncryption);
  8323. }
  8324. if (isDict(xrefEntry)) {
  8325. xrefEntry.objId = 'R' + ref.num + '.' + ref.gen;
  8326. }
  8327. return xrefEntry;
  8328. },
  8329. fetchUncompressed: function XRef_fetchUncompressed(ref, xrefEntry,
  8330. suppressEncryption) {
  8331. var gen = ref.gen;
  8332. var num = ref.num;
  8333. if (xrefEntry.gen !== gen) {
  8334. error('inconsistent generation in XRef');
  8335. }
  8336. var stream = this.stream.makeSubStream(xrefEntry.offset +
  8337. this.stream.start);
  8338. var parser = new Parser(new Lexer(stream), true, this);
  8339. var obj1 = parser.getObj();
  8340. var obj2 = parser.getObj();
  8341. var obj3 = parser.getObj();
  8342. if (!isInt(obj1) || parseInt(obj1, 10) !== num ||
  8343. !isInt(obj2) || parseInt(obj2, 10) !== gen ||
  8344. !isCmd(obj3)) {
  8345. error('bad XRef entry');
  8346. }
  8347. if (!isCmd(obj3, 'obj')) {
  8348. // some bad PDFs use "obj1234" and really mean 1234
  8349. if (obj3.cmd.indexOf('obj') === 0) {
  8350. num = parseInt(obj3.cmd.substring(3), 10);
  8351. if (!isNaN(num)) {
  8352. return num;
  8353. }
  8354. }
  8355. error('bad XRef entry');
  8356. }
  8357. if (this.encrypt && !suppressEncryption) {
  8358. try {
  8359. xrefEntry = parser.getObj(this.encrypt.createCipherTransform(num,
  8360. gen));
  8361. } catch (ex) {
  8362. // Almost all streams must be encrypted, but sometimes
  8363. // they are not, probably due to some broken generators.
  8364. // Retrying without encryption...
  8365. return this.fetch(ref, true);
  8366. }
  8367. } else {
  8368. xrefEntry = parser.getObj();
  8369. }
  8370. if (!isStream(xrefEntry)) {
  8371. this.cache[num] = xrefEntry;
  8372. }
  8373. return xrefEntry;
  8374. },
  8375. fetchCompressed: function XRef_fetchCompressed(xrefEntry,
  8376. suppressEncryption) {
  8377. var tableOffset = xrefEntry.offset;
  8378. var stream = this.fetch(new Ref(tableOffset, 0));
  8379. if (!isStream(stream)) {
  8380. error('bad ObjStm stream');
  8381. }
  8382. var first = stream.dict.get('First');
  8383. var n = stream.dict.get('N');
  8384. if (!isInt(first) || !isInt(n)) {
  8385. error('invalid first and n parameters for ObjStm stream');
  8386. }
  8387. var parser = new Parser(new Lexer(stream), false, this);
  8388. parser.allowStreams = true;
  8389. var i, entries = [], num, nums = [];
  8390. // read the object numbers to populate cache
  8391. for (i = 0; i < n; ++i) {
  8392. num = parser.getObj();
  8393. if (!isInt(num)) {
  8394. error('invalid object number in the ObjStm stream: ' + num);
  8395. }
  8396. nums.push(num);
  8397. var offset = parser.getObj();
  8398. if (!isInt(offset)) {
  8399. error('invalid object offset in the ObjStm stream: ' + offset);
  8400. }
  8401. }
  8402. // read stream objects for cache
  8403. for (i = 0; i < n; ++i) {
  8404. entries.push(parser.getObj());
  8405. num = nums[i];
  8406. var entry = this.entries[num];
  8407. if (entry && entry.offset === tableOffset && entry.gen === i) {
  8408. this.cache[num] = entries[i];
  8409. }
  8410. }
  8411. xrefEntry = entries[xrefEntry.gen];
  8412. if (xrefEntry === undefined) {
  8413. error('bad XRef entry for compressed object');
  8414. }
  8415. return xrefEntry;
  8416. },
  8417. fetchIfRefAsync: function XRef_fetchIfRefAsync(obj) {
  8418. if (!isRef(obj)) {
  8419. return Promise.resolve(obj);
  8420. }
  8421. return this.fetchAsync(obj);
  8422. },
  8423. fetchAsync: function XRef_fetchAsync(ref, suppressEncryption) {
  8424. return new Promise(function (resolve, reject) {
  8425. var tryFetch = function () {
  8426. try {
  8427. resolve(this.fetch(ref, suppressEncryption));
  8428. } catch (e) {
  8429. if (e instanceof MissingDataException) {
  8430. this.stream.manager.requestRange(e.begin, e.end, tryFetch);
  8431. return;
  8432. }
  8433. reject(e);
  8434. }
  8435. }.bind(this);
  8436. tryFetch();
  8437. }.bind(this));
  8438. },
  8439. getCatalogObj: function XRef_getCatalogObj() {
  8440. return this.root;
  8441. }
  8442. };
  8443. return XRef;
  8444. })();
  8445. /**
  8446. * A NameTree is like a Dict but has some advantageous properties, see the
  8447. * spec (7.9.6) for more details.
  8448. * TODO: implement all the Dict functions and make this more efficent.
  8449. */
  8450. var NameTree = (function NameTreeClosure() {
  8451. function NameTree(root, xref) {
  8452. this.root = root;
  8453. this.xref = xref;
  8454. }
  8455. NameTree.prototype = {
  8456. getAll: function NameTree_getAll() {
  8457. var dict = {};
  8458. if (!this.root) {
  8459. return dict;
  8460. }
  8461. var xref = this.xref;
  8462. // reading name tree
  8463. var processed = new RefSet();
  8464. processed.put(this.root);
  8465. var queue = [this.root];
  8466. while (queue.length > 0) {
  8467. var i, n;
  8468. var obj = xref.fetchIfRef(queue.shift());
  8469. if (!isDict(obj)) {
  8470. continue;
  8471. }
  8472. if (obj.has('Kids')) {
  8473. var kids = obj.get('Kids');
  8474. for (i = 0, n = kids.length; i < n; i++) {
  8475. var kid = kids[i];
  8476. if (processed.has(kid)) {
  8477. error('invalid destinations');
  8478. }
  8479. queue.push(kid);
  8480. processed.put(kid);
  8481. }
  8482. continue;
  8483. }
  8484. var names = obj.get('Names');
  8485. if (names) {
  8486. for (i = 0, n = names.length; i < n; i += 2) {
  8487. dict[names[i]] = xref.fetchIfRef(names[i + 1]);
  8488. }
  8489. }
  8490. }
  8491. return dict;
  8492. }
  8493. };
  8494. return NameTree;
  8495. })();
  8496. /**
  8497. * "A PDF file can refer to the contents of another file by using a File
  8498. * Specification (PDF 1.1)", see the spec (7.11) for more details.
  8499. * NOTE: Only embedded files are supported (as part of the attachments support)
  8500. * TODO: support the 'URL' file system (with caching if !/V), portable
  8501. * collections attributes and related files (/RF)
  8502. */
  8503. var FileSpec = (function FileSpecClosure() {
  8504. function FileSpec(root, xref) {
  8505. if (!root || !isDict(root)) {
  8506. return;
  8507. }
  8508. this.xref = xref;
  8509. this.root = root;
  8510. if (root.has('FS')) {
  8511. this.fs = root.get('FS');
  8512. }
  8513. this.description = root.has('Desc') ?
  8514. stringToPDFString(root.get('Desc')) :
  8515. '';
  8516. if (root.has('RF')) {
  8517. warn('Related file specifications are not supported');
  8518. }
  8519. this.contentAvailable = true;
  8520. if (!root.has('EF')) {
  8521. this.contentAvailable = false;
  8522. warn('Non-embedded file specifications are not supported');
  8523. }
  8524. }
  8525. function pickPlatformItem(dict) {
  8526. // Look for the filename in this order:
  8527. // UF, F, Unix, Mac, DOS
  8528. if (dict.has('UF')) {
  8529. return dict.get('UF');
  8530. } else if (dict.has('F')) {
  8531. return dict.get('F');
  8532. } else if (dict.has('Unix')) {
  8533. return dict.get('Unix');
  8534. } else if (dict.has('Mac')) {
  8535. return dict.get('Mac');
  8536. } else if (dict.has('DOS')) {
  8537. return dict.get('DOS');
  8538. } else {
  8539. return null;
  8540. }
  8541. }
  8542. FileSpec.prototype = {
  8543. get filename() {
  8544. if (!this._filename && this.root) {
  8545. var filename = pickPlatformItem(this.root) || 'unnamed';
  8546. this._filename = stringToPDFString(filename).
  8547. replace(/\\\\/g, '\\').
  8548. replace(/\\\//g, '/').
  8549. replace(/\\/g, '/');
  8550. }
  8551. return this._filename;
  8552. },
  8553. get content() {
  8554. if (!this.contentAvailable) {
  8555. return null;
  8556. }
  8557. if (!this.contentRef && this.root) {
  8558. this.contentRef = pickPlatformItem(this.root.get('EF'));
  8559. }
  8560. var content = null;
  8561. if (this.contentRef) {
  8562. var xref = this.xref;
  8563. var fileObj = xref.fetchIfRef(this.contentRef);
  8564. if (fileObj && isStream(fileObj)) {
  8565. content = fileObj.getBytes();
  8566. } else {
  8567. warn('Embedded file specification points to non-existing/invalid ' +
  8568. 'content');
  8569. }
  8570. } else {
  8571. warn('Embedded file specification does not have a content');
  8572. }
  8573. return content;
  8574. },
  8575. get serializable() {
  8576. return {
  8577. filename: this.filename,
  8578. content: this.content
  8579. };
  8580. }
  8581. };
  8582. return FileSpec;
  8583. })();
  8584. /**
  8585. * A helper for loading missing data in object graphs. It traverses the graph
  8586. * depth first and queues up any objects that have missing data. Once it has
  8587. * has traversed as many objects that are available it attempts to bundle the
  8588. * missing data requests and then resume from the nodes that weren't ready.
  8589. *
  8590. * NOTE: It provides protection from circular references by keeping track of
  8591. * of loaded references. However, you must be careful not to load any graphs
  8592. * that have references to the catalog or other pages since that will cause the
  8593. * entire PDF document object graph to be traversed.
  8594. */
  8595. var ObjectLoader = (function() {
  8596. function mayHaveChildren(value) {
  8597. return isRef(value) || isDict(value) || isArray(value) || isStream(value);
  8598. }
  8599. function addChildren(node, nodesToVisit) {
  8600. var value;
  8601. if (isDict(node) || isStream(node)) {
  8602. var map;
  8603. if (isDict(node)) {
  8604. map = node.map;
  8605. } else {
  8606. map = node.dict.map;
  8607. }
  8608. for (var key in map) {
  8609. value = map[key];
  8610. if (mayHaveChildren(value)) {
  8611. nodesToVisit.push(value);
  8612. }
  8613. }
  8614. } else if (isArray(node)) {
  8615. for (var i = 0, ii = node.length; i < ii; i++) {
  8616. value = node[i];
  8617. if (mayHaveChildren(value)) {
  8618. nodesToVisit.push(value);
  8619. }
  8620. }
  8621. }
  8622. }
  8623. function ObjectLoader(obj, keys, xref) {
  8624. this.obj = obj;
  8625. this.keys = keys;
  8626. this.xref = xref;
  8627. this.refSet = null;
  8628. }
  8629. ObjectLoader.prototype = {
  8630. load: function ObjectLoader_load() {
  8631. var keys = this.keys;
  8632. this.capability = createPromiseCapability();
  8633. // Don't walk the graph if all the data is already loaded.
  8634. if (!(this.xref.stream instanceof ChunkedStream) ||
  8635. this.xref.stream.getMissingChunks().length === 0) {
  8636. this.capability.resolve();
  8637. return this.capability.promise;
  8638. }
  8639. this.refSet = new RefSet();
  8640. // Setup the initial nodes to visit.
  8641. var nodesToVisit = [];
  8642. for (var i = 0; i < keys.length; i++) {
  8643. nodesToVisit.push(this.obj[keys[i]]);
  8644. }
  8645. this.walk(nodesToVisit);
  8646. return this.capability.promise;
  8647. },
  8648. walk: function ObjectLoader_walk(nodesToVisit) {
  8649. var nodesToRevisit = [];
  8650. var pendingRequests = [];
  8651. // DFS walk of the object graph.
  8652. while (nodesToVisit.length) {
  8653. var currentNode = nodesToVisit.pop();
  8654. // Only references or chunked streams can cause missing data exceptions.
  8655. if (isRef(currentNode)) {
  8656. // Skip nodes that have already been visited.
  8657. if (this.refSet.has(currentNode)) {
  8658. continue;
  8659. }
  8660. try {
  8661. var ref = currentNode;
  8662. this.refSet.put(ref);
  8663. currentNode = this.xref.fetch(currentNode);
  8664. } catch (e) {
  8665. if (!(e instanceof MissingDataException)) {
  8666. throw e;
  8667. }
  8668. nodesToRevisit.push(currentNode);
  8669. pendingRequests.push({ begin: e.begin, end: e.end });
  8670. }
  8671. }
  8672. if (currentNode && currentNode.getBaseStreams) {
  8673. var baseStreams = currentNode.getBaseStreams();
  8674. var foundMissingData = false;
  8675. for (var i = 0; i < baseStreams.length; i++) {
  8676. var stream = baseStreams[i];
  8677. if (stream.getMissingChunks && stream.getMissingChunks().length) {
  8678. foundMissingData = true;
  8679. pendingRequests.push({
  8680. begin: stream.start,
  8681. end: stream.end
  8682. });
  8683. }
  8684. }
  8685. if (foundMissingData) {
  8686. nodesToRevisit.push(currentNode);
  8687. }
  8688. }
  8689. addChildren(currentNode, nodesToVisit);
  8690. }
  8691. if (pendingRequests.length) {
  8692. this.xref.stream.manager.requestRanges(pendingRequests,
  8693. function pendingRequestCallback() {
  8694. nodesToVisit = nodesToRevisit;
  8695. for (var i = 0; i < nodesToRevisit.length; i++) {
  8696. var node = nodesToRevisit[i];
  8697. // Remove any reference nodes from the currrent refset so they
  8698. // aren't skipped when we revist them.
  8699. if (isRef(node)) {
  8700. this.refSet.remove(node);
  8701. }
  8702. }
  8703. this.walk(nodesToVisit);
  8704. }.bind(this));
  8705. return;
  8706. }
  8707. // Everything is loaded.
  8708. this.refSet = null;
  8709. this.capability.resolve();
  8710. }
  8711. };
  8712. return ObjectLoader;
  8713. })();
  8714. var ISOAdobeCharset = [
  8715. '.notdef', 'space', 'exclam', 'quotedbl', 'numbersign', 'dollar',
  8716. 'percent', 'ampersand', 'quoteright', 'parenleft', 'parenright',
  8717. 'asterisk', 'plus', 'comma', 'hyphen', 'period', 'slash', 'zero',
  8718. 'one', 'two', 'three', 'four', 'five', 'six', 'seven', 'eight',
  8719. 'nine', 'colon', 'semicolon', 'less', 'equal', 'greater', 'question',
  8720. 'at', 'A', 'B', 'C', 'D', 'E', 'F', 'G', 'H', 'I', 'J', 'K', 'L', 'M',
  8721. 'N', 'O', 'P', 'Q', 'R', 'S', 'T', 'U', 'V', 'W', 'X', 'Y', 'Z',
  8722. 'bracketleft', 'backslash', 'bracketright', 'asciicircum', 'underscore',
  8723. 'quoteleft', 'a', 'b', 'c', 'd', 'e', 'f', 'g', 'h', 'i', 'j', 'k', 'l',
  8724. 'm', 'n', 'o', 'p', 'q', 'r', 's', 't', 'u', 'v', 'w', 'x', 'y', 'z',
  8725. 'braceleft', 'bar', 'braceright', 'asciitilde', 'exclamdown', 'cent',
  8726. 'sterling', 'fraction', 'yen', 'florin', 'section', 'currency',
  8727. 'quotesingle', 'quotedblleft', 'guillemotleft', 'guilsinglleft',
  8728. 'guilsinglright', 'fi', 'fl', 'endash', 'dagger', 'daggerdbl',
  8729. 'periodcentered', 'paragraph', 'bullet', 'quotesinglbase',
  8730. 'quotedblbase', 'quotedblright', 'guillemotright', 'ellipsis',
  8731. 'perthousand', 'questiondown', 'grave', 'acute', 'circumflex', 'tilde',
  8732. 'macron', 'breve', 'dotaccent', 'dieresis', 'ring', 'cedilla',
  8733. 'hungarumlaut', 'ogonek', 'caron', 'emdash', 'AE', 'ordfeminine',
  8734. 'Lslash', 'Oslash', 'OE', 'ordmasculine', 'ae', 'dotlessi', 'lslash',
  8735. 'oslash', 'oe', 'germandbls', 'onesuperior', 'logicalnot', 'mu',
  8736. 'trademark', 'Eth', 'onehalf', 'plusminus', 'Thorn', 'onequarter',
  8737. 'divide', 'brokenbar', 'degree', 'thorn', 'threequarters', 'twosuperior',
  8738. 'registered', 'minus', 'eth', 'multiply', 'threesuperior', 'copyright',
  8739. 'Aacute', 'Acircumflex', 'Adieresis', 'Agrave', 'Aring', 'Atilde',
  8740. 'Ccedilla', 'Eacute', 'Ecircumflex', 'Edieresis', 'Egrave', 'Iacute',
  8741. 'Icircumflex', 'Idieresis', 'Igrave', 'Ntilde', 'Oacute', 'Ocircumflex',
  8742. 'Odieresis', 'Ograve', 'Otilde', 'Scaron', 'Uacute', 'Ucircumflex',
  8743. 'Udieresis', 'Ugrave', 'Yacute', 'Ydieresis', 'Zcaron', 'aacute',
  8744. 'acircumflex', 'adieresis', 'agrave', 'aring', 'atilde', 'ccedilla',
  8745. 'eacute', 'ecircumflex', 'edieresis', 'egrave', 'iacute', 'icircumflex',
  8746. 'idieresis', 'igrave', 'ntilde', 'oacute', 'ocircumflex', 'odieresis',
  8747. 'ograve', 'otilde', 'scaron', 'uacute', 'ucircumflex', 'udieresis',
  8748. 'ugrave', 'yacute', 'ydieresis', 'zcaron'
  8749. ];
  8750. var ExpertCharset = [
  8751. '.notdef', 'space', 'exclamsmall', 'Hungarumlautsmall', 'dollaroldstyle',
  8752. 'dollarsuperior', 'ampersandsmall', 'Acutesmall', 'parenleftsuperior',
  8753. 'parenrightsuperior', 'twodotenleader', 'onedotenleader', 'comma',
  8754. 'hyphen', 'period', 'fraction', 'zerooldstyle', 'oneoldstyle',
  8755. 'twooldstyle', 'threeoldstyle', 'fouroldstyle', 'fiveoldstyle',
  8756. 'sixoldstyle', 'sevenoldstyle', 'eightoldstyle', 'nineoldstyle',
  8757. 'colon', 'semicolon', 'commasuperior', 'threequartersemdash',
  8758. 'periodsuperior', 'questionsmall', 'asuperior', 'bsuperior',
  8759. 'centsuperior', 'dsuperior', 'esuperior', 'isuperior', 'lsuperior',
  8760. 'msuperior', 'nsuperior', 'osuperior', 'rsuperior', 'ssuperior',
  8761. 'tsuperior', 'ff', 'fi', 'fl', 'ffi', 'ffl', 'parenleftinferior',
  8762. 'parenrightinferior', 'Circumflexsmall', 'hyphensuperior', 'Gravesmall',
  8763. 'Asmall', 'Bsmall', 'Csmall', 'Dsmall', 'Esmall', 'Fsmall', 'Gsmall',
  8764. 'Hsmall', 'Ismall', 'Jsmall', 'Ksmall', 'Lsmall', 'Msmall', 'Nsmall',
  8765. 'Osmall', 'Psmall', 'Qsmall', 'Rsmall', 'Ssmall', 'Tsmall', 'Usmall',
  8766. 'Vsmall', 'Wsmall', 'Xsmall', 'Ysmall', 'Zsmall', 'colonmonetary',
  8767. 'onefitted', 'rupiah', 'Tildesmall', 'exclamdownsmall', 'centoldstyle',
  8768. 'Lslashsmall', 'Scaronsmall', 'Zcaronsmall', 'Dieresissmall',
  8769. 'Brevesmall', 'Caronsmall', 'Dotaccentsmall', 'Macronsmall',
  8770. 'figuredash', 'hypheninferior', 'Ogoneksmall', 'Ringsmall',
  8771. 'Cedillasmall', 'onequarter', 'onehalf', 'threequarters',
  8772. 'questiondownsmall', 'oneeighth', 'threeeighths', 'fiveeighths',
  8773. 'seveneighths', 'onethird', 'twothirds', 'zerosuperior', 'onesuperior',
  8774. 'twosuperior', 'threesuperior', 'foursuperior', 'fivesuperior',
  8775. 'sixsuperior', 'sevensuperior', 'eightsuperior', 'ninesuperior',
  8776. 'zeroinferior', 'oneinferior', 'twoinferior', 'threeinferior',
  8777. 'fourinferior', 'fiveinferior', 'sixinferior', 'seveninferior',
  8778. 'eightinferior', 'nineinferior', 'centinferior', 'dollarinferior',
  8779. 'periodinferior', 'commainferior', 'Agravesmall', 'Aacutesmall',
  8780. 'Acircumflexsmall', 'Atildesmall', 'Adieresissmall', 'Aringsmall',
  8781. 'AEsmall', 'Ccedillasmall', 'Egravesmall', 'Eacutesmall',
  8782. 'Ecircumflexsmall', 'Edieresissmall', 'Igravesmall', 'Iacutesmall',
  8783. 'Icircumflexsmall', 'Idieresissmall', 'Ethsmall', 'Ntildesmall',
  8784. 'Ogravesmall', 'Oacutesmall', 'Ocircumflexsmall', 'Otildesmall',
  8785. 'Odieresissmall', 'OEsmall', 'Oslashsmall', 'Ugravesmall', 'Uacutesmall',
  8786. 'Ucircumflexsmall', 'Udieresissmall', 'Yacutesmall', 'Thornsmall',
  8787. 'Ydieresissmall'
  8788. ];
  8789. var ExpertSubsetCharset = [
  8790. '.notdef', 'space', 'dollaroldstyle', 'dollarsuperior',
  8791. 'parenleftsuperior', 'parenrightsuperior', 'twodotenleader',
  8792. 'onedotenleader', 'comma', 'hyphen', 'period', 'fraction',
  8793. 'zerooldstyle', 'oneoldstyle', 'twooldstyle', 'threeoldstyle',
  8794. 'fouroldstyle', 'fiveoldstyle', 'sixoldstyle', 'sevenoldstyle',
  8795. 'eightoldstyle', 'nineoldstyle', 'colon', 'semicolon', 'commasuperior',
  8796. 'threequartersemdash', 'periodsuperior', 'asuperior', 'bsuperior',
  8797. 'centsuperior', 'dsuperior', 'esuperior', 'isuperior', 'lsuperior',
  8798. 'msuperior', 'nsuperior', 'osuperior', 'rsuperior', 'ssuperior',
  8799. 'tsuperior', 'ff', 'fi', 'fl', 'ffi', 'ffl', 'parenleftinferior',
  8800. 'parenrightinferior', 'hyphensuperior', 'colonmonetary', 'onefitted',
  8801. 'rupiah', 'centoldstyle', 'figuredash', 'hypheninferior', 'onequarter',
  8802. 'onehalf', 'threequarters', 'oneeighth', 'threeeighths', 'fiveeighths',
  8803. 'seveneighths', 'onethird', 'twothirds', 'zerosuperior', 'onesuperior',
  8804. 'twosuperior', 'threesuperior', 'foursuperior', 'fivesuperior',
  8805. 'sixsuperior', 'sevensuperior', 'eightsuperior', 'ninesuperior',
  8806. 'zeroinferior', 'oneinferior', 'twoinferior', 'threeinferior',
  8807. 'fourinferior', 'fiveinferior', 'sixinferior', 'seveninferior',
  8808. 'eightinferior', 'nineinferior', 'centinferior', 'dollarinferior',
  8809. 'periodinferior', 'commainferior'
  8810. ];
  8811. var CIDToUnicodeMaps = {
  8812. 'Adobe-Japan1': [[32, 160], {f: 12, c: 33}, [45, 8209], {f: 46, c: 46}, 165,
  8813. {f: 2, c: 93}, [95, 818], [96, 768], {f: 27, c: 97}, 166, 125, [732, 771],
  8814. [700, 8217], 92, [699, 8216], 124, [126, 8764], {f: 3, c: 161}, 8260, 402,
  8815. 0, 164, 8220, 171, {f: 2, c: 8249}, {f: 2, c: 64257}, [8210, 8211], 0, 0,
  8816. [183, 8729], 0, 8226, 8218, 8222, 8221, 187, 0, 0, 191, {f: 2, c: 769},
  8817. [175, 772], {f: 3, c: 774}, 778, [184, 807], 779, 808, 780, [822, 8212],
  8818. 198, 170, 321, 216, 338, 186, 230, 305, 322, 248, 339, 223, 173, 169, 172,
  8819. 174, 0, 0, {f: 2, c: 178}, 181, 185, {f: 3, c: 188}, {f: 6, c: 192},
  8820. {f: 16, c: 199}, 0, {f: 6, c: 217}, {f: 6, c: 224}, {f: 16, c: 231}, 0,
  8821. {f: 7, c: 249}, 352, 376, 381, [773, 8254], 353, 8482, 382, 0, 8194,
  8822. {f: 59, c: 33}, 165, {f: 31, c: 93}, 65512, {f: 2, c: 125}, 0,
  8823. {f: 63, c: 65377}, {s: 243}, [8195, 12288],
  8824. {f: 2, c: 12289}, 65292, 65294, 12539, {f: 2, c: 65306}, 65311, 65281,
  8825. {f: 2, c: 12443}, 180, 65344, 168, 65342, 65507, 65343, {f: 2, c: 12541},
  8826. {f: 2, c: 12445}, 12291, 20189, {f: 3, c: 12293}, 12540, 8213, 8208, 65295,
  8827. 65340, [12316, 65374], 8214, 65372, 8230, 8229, {s: 4}, {f: 2, c: 65288},
  8828. {f: 2, c: 12308}, 65339, 65341, 65371, 65373, {f: 10, c: 12296}, 65291,
  8829. [8722, 65293], 177, 215, 247, 65309, 8800, 65308, 65310, {f: 2, c: 8806},
  8830. 8734, 8756, 9794, 9792, 176, {f: 2, c: 8242}, 8451, 65509, 65284,
  8831. {f: 2, c: 65504}, 65285, 65283, 65286, 65290, 65312, 167, 9734, 9733, 9675,
  8832. 9679, 9678, 9671, 9670, 9633, 9632, 9651, 9650, 9661, 9660, 8251, 12306,
  8833. 8594, {f: 2, c: 8592}, 8595, 12307, 8712, 8715, {f: 2, c: 8838},
  8834. {f: 2, c: 8834}, 8746, 8745, {f: 2, c: 8743}, 65506, 8658, 8660, 8704,
  8835. 8707, 8736, 8869, 8978, 8706, 8711, 8801, 8786, {f: 2, c: 8810}, 8730,
  8836. 8765, 8733, 8757, {f: 2, c: 8747}, 8491, 8240, 9839, 9837, 9834,
  8837. {f: 2, c: 8224}, 182, 9711, {f: 10, c: 65296}, {f: 26, c: 65313},
  8838. {f: 26, c: 65345}, {f: 83, c: 12353}, {f: 86, c: 12449}, {f: 17, c: 913},
  8839. {f: 7, c: 931}, {f: 17, c: 945}, {f: 7, c: 963}, {f: 6, c: 1040}, 1025,
  8840. {f: 32, c: 1046}, 1105, {f: 26, c: 1078}, 20124, 21782, 23043, 38463,
  8841. 21696, 24859, 25384, 23030, 36898, 33909, 33564, 31312, 24746, 25569,
  8842. 28197, 26093, 33894, 33446, 39925, 26771, 22311, 26017, 25201, 23451,
  8843. 22992, 34427, 39156, 32098, 32190, 39822, 25110, 31903, 34999, 23433,
  8844. 24245, 25353, 26263, 26696, 38343, 38797, 26447, 20197, 20234, 20301,
  8845. 20381, 20553, 22258, 22839, 22996, 23041, 23561, 24799, 24847, 24944,
  8846. 26131, 26885, 28858, 30031, 30064, 31227, 32173, 32239, 32963, 33806,
  8847. [12176, 34915], 35586, 36949, 36986, 21307, 20117, 20133, 22495, 32946,
  8848. 37057, 30959, [12032, 19968], 22769, 28322, 36920, 31282, 33576, 33419,
  8849. 39983, 20801, 21360, 21693, 21729, 22240, 23035, 24341, 39154, 28139,
  8850. 32996, 34093, 38498, 38512, 38560, 38907, 21515, 21491, 23431, 28879,
  8851. [12155, 32701], 36802, [12204, 38632], 21359, 40284, 31418, 19985, 30867,
  8852. [12165, 33276], 28198, 22040, 21764, 27421, 34074, 39995, 23013, 21417,
  8853. 28006, [12128, 29916], 38287, 22082, 20113, 36939, 38642, 33615, 39180,
  8854. 21473, 21942, 23344, 24433, 26144, 26355, 26628, 27704, 27891, 27945,
  8855. 29787, 30408, 31310, 38964, 33521, 34907, 35424, 37613, 28082, 30123,
  8856. 30410, 39365, 24742, 35585, 36234, 38322, 27022, 21421, 20870, 22290,
  8857. 22576, 22852, 23476, 24310, 24616, 25513, 25588, 27839, 28436, 28814,
  8858. 28948, 29017, 29141, 29503, 32257, 33398, 33489, 34199, 36960, 37467,
  8859. 40219, 22633, 26044, 27738, 29989, 20985, 22830, 22885, 24448, 24540,
  8860. 25276, 26106, 27178, 27431, 27572, 29579, 32705, 35158, 40236, 40206,
  8861. [12009, 40644], 23713, 27798, 33659, 20740, 23627, 25014, 33222, 26742,
  8862. 29281, [12036, 20057], 20474, 21368, 24681, 28201, 31311, [12211, 38899],
  8863. 19979, 21270, 20206, 20309, 20285, 20385, 20339, 21152, 21487, 22025,
  8864. 22799, 23233, 23478, 23521, 31185, 26247, 26524, 26550, 27468, 27827,
  8865. [12117, 28779], 29634, 31117, [12146, 31166], 31292, 31623, 33457, 33499,
  8866. 33540, 33655, 33775, 33747, 34662, 35506, 22057, 36008, 36838, 36942,
  8867. 38686, 34442, 20420, 23784, 25105, [12123, 29273], 30011, 33253, 33469,
  8868. 34558, 36032, 38597, 39187, 39381, 20171, 20250, 35299, 22238, 22602,
  8869. 22730, 24315, 24555, 24618, 24724, 24674, 25040, 25106, 25296, 25913,
  8870. 39745, 26214, 26800, 28023, 28784, 30028, 30342, 32117, 33445, 34809,
  8871. 38283, 38542, [12185, 35997], 20977, 21182, 22806, 21683, 23475, 23830,
  8872. 24936, 27010, 28079, 30861, 33995, 34903, 35442, 37799, 39608, 28012,
  8873. 39336, 34521, 22435, 26623, 34510, 37390, 21123, 22151, 21508, 24275,
  8874. 25313, 25785, 26684, 26680, 27579, 29554, 30906, 31339, 35226,
  8875. [12179, 35282], 36203, 36611, 37101, 38307, 38548, [12208, 38761], 23398,
  8876. 23731, 27005, {f: 2, c: 38989}, 25499, 31520, 27179, 27263, 26806, 39949,
  8877. 28511, 21106, 21917, 24688, 25324, 27963, 28167, 28369, 33883, 35088,
  8878. 36676, 19988, 39993, 21494, 26907, 27194, 38788, 26666, 20828, 31427,
  8879. 33970, 37340, 37772, 22107, 40232, 26658, 33541, 33841, 31909, 21000,
  8880. 33477, [12129, 29926], 20094, 20355, 20896, 23506, 21002, 21208, 21223,
  8881. 24059, 21914, 22570, 23014, 23436, 23448, 23515, [12082, 24178], 24185,
  8882. 24739, 24863, 24931, 25022, 25563, 25954, 26577, 26707, 26874, 27454,
  8883. 27475, 27735, 28450, 28567, 28485, 29872, [12130, 29976], 30435, 30475,
  8884. 31487, 31649, 31777, 32233, [12152, 32566], 32752, 32925, 33382, 33694,
  8885. 35251, 35532, 36011, 36996, 37969, 38291, 38289, 38306, 38501, 38867,
  8886. 39208, 33304, 20024, 21547, 23736, 24012, 29609, 30284, 30524, 23721,
  8887. 32747, 36107, 38593, 38929, 38996, 39000, 20225, 20238, 21361, 21916,
  8888. 22120, 22522, 22855, 23305, 23492, 23696, 24076, 24190, 24524, 25582,
  8889. 26426, 26071, 26082, 26399, 26827, 26820, 27231, 24112, 27589, 27671,
  8890. 27773, 30079, 31048, 23395, 31232, 32000, 24509, 35215, 35352, 36020,
  8891. 36215, 36556, 36637, 39138, 39438, [12004, 12225, 39740], [12018, 20096],
  8892. 20605, 20736, 22931, 23452, 25135, 25216, 25836, 27450, 29344, 30097,
  8893. 31047, 32681, 34811, 35516, 35696, 25516, 33738, 38816, 21513, 21507,
  8894. 21931, 26708, 27224, 35440, 30759, 26485, [12233, 40653], 21364, 23458,
  8895. 33050, 34384, 36870, 19992, 20037, 20167, 20241, 21450, 21560, 23470,
  8896. [12088, 24339], 24613, 25937, 26429, 27714, 27762, 27875, 28792, 29699,
  8897. 31350, 31406, 31496, 32026, 31998, 32102, 26087, [12124, 29275], 21435,
  8898. 23621, 24040, 25298, 25312, 25369, 28192, 34394, 35377, 36317, 37624,
  8899. 28417, 31142, [12226, 39770], 20136, {f: 2, c: 20139}, 20379, 20384, 20689,
  8900. 20807, 31478, 20849, 20982, 21332, 21281, 21375, 21483, 21932, 22659,
  8901. 23777, 24375, 24394, 24623, 24656, 24685, 25375, 25945, 27211, 27841,
  8902. 29378, 29421, 30703, 33016, 33029, 33288, 34126, 37111, 37857, 38911,
  8903. 39255, 39514, 20208, 20957, 23597, 26241, 26989, 23616, 26354, 26997,
  8904. [12127, 29577], 26704, 31873, 20677, 21220, 22343, [12081, 24062], 37670,
  8905. [12100, 26020], 27427, 27453, 29748, 31105, 31165, 31563, 32202, 33465,
  8906. 33740, 34943, 35167, 35641, 36817, [12198, 37329], 21535, 37504, 20061,
  8907. 20534, 21477, 21306, 29399, 29590, 30697, 33510, 36527, 39366, 39368,
  8908. 39378, 20855, 24858, 34398, 21936, 31354, 20598, 23507, 36935, 38533,
  8909. 20018, 27355, 37351, 23633, 23624, 25496, 31391, 27795, 38772, 36705,
  8910. 31402, 29066, 38536, 31874, 26647, 32368, 26705, 37740, 21234, 21531,
  8911. 34219, 35347, 32676, 36557, 37089, 21350, 34952, 31041, 20418, 20670,
  8912. 21009, 20804, 21843, 22317, 29674, 22411, 22865, 24418, 24452, 24693,
  8913. 24950, 24935, 25001, 25522, 25658, 25964, 26223, 26690, 28179, 30054,
  8914. 31293, 31995, 32076, 32153, 32331, 32619, 33550, 33610, 34509, 35336,
  8915. 35427, 35686, 36605, 38938, 40335, 33464, 36814, 39912, 21127, 25119,
  8916. 25731, 28608, 38553, 26689, 20625, [12107, 27424], 27770, 28500,
  8917. [12147, 31348], 32080, [12174, 34880], 35363, [12105, 26376], 20214, 20537,
  8918. 20518, 20581, 20860, 21048, 21091, 21927, 22287, 22533, 23244, 24314,
  8919. 25010, 25080, 25331, 25458, 26908, 27177, 29309, [12125, 29356], 29486,
  8920. 30740, 30831, 32121, 30476, 32937, [12178, 35211], 35609, 36066, 36562,
  8921. 36963, 37749, 38522, 38997, 39443, 40568, 20803, 21407, 21427, 24187,
  8922. 24358, 28187, 28304, [12126, 29572], 29694, 32067, 33335, [12180, 35328],
  8923. 35578, 38480, 20046, 20491, 21476, 21628, 22266, 22993, 23396,
  8924. [12080, 24049], 24235, 24359, [12094, 25144], 25925, 26543, 28246, 29392,
  8925. 31946, 34996, 32929, 32993, 33776, [11969, 34382], 35463, 36328, 37431,
  8926. 38599, 39015, [12238, 40723], 20116, 20114, 20237, 21320, 21577, 21566,
  8927. 23087, 24460, 24481, 24735, 26791, 27278, 29786, 30849, 35486, 35492,
  8928. 35703, 37264, 20062, 39881, 20132, 20348, 20399, 20505, 20502, 20809,
  8929. 20844, 21151, 21177, 21246, 21402, [12061, 21475], 21521, 21518, 21897,
  8930. 22353, 22434, 22909, 23380, 23389, 23439, [12079, 24037], 24039, 24055,
  8931. 24184, 24195, 24218, 24247, 24344, 24658, 24908, 25239, 25304, 25511,
  8932. 25915, 26114, 26179, 26356, 26477, 26657, 26775, 27083, 27743, 27946,
  8933. 28009, 28207, 28317, 30002, 30343, 30828, 31295, 31968, 32005, 32024,
  8934. 32094, 32177, 32789, 32771, 32943, 32945, 33108, 33167, 33322, 33618,
  8935. [12175, 34892], 34913, 35611, 36002, 36092, 37066, 37237, 37489, 30783,
  8936. 37628, 38308, 38477, 38917, [12217, 39321], [12220, 39640], 40251, 21083,
  8937. 21163, 21495, 21512, 22741, 25335, 28640, 35946, 36703, 40633, 20811,
  8938. 21051, 21578, 22269, 31296, 37239, 40288, [12234, 40658], 29508, 28425,
  8939. 33136, 29969, 24573, 24794, [12219, 39592], 29403, 36796, 27492, 38915,
  8940. 20170, 22256, 22372, 22718, 23130, 24680, 25031, 26127, 26118, 26681,
  8941. 26801, 28151, 30165, 32058, [12169, 33390], 39746, 20123, 20304, 21449,
  8942. 21766, 23919, 24038, 24046, 26619, 27801, 29811, 30722, 35408, 37782,
  8943. 35039, 22352, 24231, 25387, 20661, 20652, 20877, 26368, 21705, 22622,
  8944. 22971, 23472, 24425, 25165, 25505, 26685, 27507, 28168, 28797, 37319,
  8945. 29312, 30741, 30758, 31085, 25998, 32048, 33756, 35009, 36617, 38555,
  8946. 21092, 22312, 26448, 32618, 36001, 20916, 22338, 38442, 22586, 27018,
  8947. 32948, 21682, 23822, 22524, 30869, 40442, 20316, 21066, 21643, 25662,
  8948. 26152, 26388, 26613, 31364, 31574, 32034, 37679, 26716, 39853, 31545,
  8949. 21273, 20874, 21047, 23519, 25334, 25774, 25830, 26413, 27578, 34217,
  8950. 38609, 30352, 39894, 25420, 37638, 39851, [12139, 30399], 26194, 19977,
  8951. 20632, 21442, [12077, 23665], 24808, 25746, 25955, 26719, 29158, 29642,
  8952. 29987, 31639, 32386, 34453, 35715, 36059, 37240, 39184, 26028, 26283,
  8953. 27531, 20181, 20180, 20282, 20351, 21050, 21496, 21490, 21987, 22235,
  8954. [12064, 22763], 22987, 22985, 23039, [12070, 23376], 23629, 24066, 24107,
  8955. 24535, 24605, 25351, [12096, 25903], 23388, 26031, 26045, 26088, 26525,
  8956. [12108, 27490], 27515, [12114, 27663], 29509, 31049, 31169, [12151, 31992],
  8957. 32025, 32043, 32930, 33026, [12164, 33267], 35222, 35422, 35433, 35430,
  8958. 35468, 35566, 36039, 36060, 38604, 39164, [12013, 27503], 20107, 20284,
  8959. 20365, 20816, 23383, 23546, 24904, 25345, 26178, 27425, 28363, 27835,
  8960. 29246, 29885, 30164, 30913, [12144, 31034], [12157, 32780], [12159, 32819],
  8961. [12163, 33258], 33940, 36766, 27728, [12229, 40575], 24335, 35672, 40235,
  8962. 31482, 36600, 23437, 38635, 19971, 21489, 22519, 22833, 23241, 23460,
  8963. 24713, 28287, 28422, 30142, 36074, 23455, 34048, 31712, 20594, 26612,
  8964. 33437, 23649, 34122, 32286, 33294, 20889, 23556, 25448, 36198, 26012,
  8965. 29038, 31038, 32023, 32773, 35613, [12190, 36554], 36974, 34503, 37034,
  8966. 20511, 21242, 23610, 26451, 28796, 29237, 37196, 37320, 37675, 33509,
  8967. 23490, 24369, 24825, 20027, 21462, 23432, [12095, 25163], 26417, 27530,
  8968. 29417, 29664, 31278, 33131, 36259, 37202, [12216, 39318], 20754, 21463,
  8969. 21610, 23551, 25480, 27193, 32172, 38656, 22234, 21454, 21608, 23447,
  8970. 23601, 24030, 20462, 24833, 25342, 27954, 31168, 31179, 32066, 32333,
  8971. 32722, 33261, [12168, 33311], 33936, 34886, 35186, 35728, 36468, 36655,
  8972. 36913, 37195, 37228, 38598, 37276, 20160, 20303, 20805, [12055, 21313],
  8973. 24467, 25102, 26580, 27713, 28171, 29539, 32294, 37325, 37507, 21460,
  8974. 22809, 23487, 28113, 31069, 32302, 31899, 22654, 29087, 20986, 34899,
  8975. 36848, 20426, 23803, 26149, 30636, 31459, 33308, 39423, 20934, 24490,
  8976. 26092, 26991, 27529, 28147, 28310, 28516, 30462, 32020, 24033, 36981,
  8977. 37255, 38918, 20966, 21021, 25152, 26257, 26329, 28186, 24246, 32210,
  8978. 32626, 26360, 34223, 34295, 35576, 21161, 21465, [12069, 22899], 24207,
  8979. 24464, 24661, 37604, 38500, 20663, 20767, 21213, 21280, 21319, 21484,
  8980. 21736, 21830, 21809, 22039, 22888, 22974, 23100, 23477, 23558,
  8981. [12073, 23567], 23569, 23578, 24196, 24202, 24288, 24432, 25215, 25220,
  8982. 25307, 25484, 25463, 26119, 26124, 26157, 26230, 26494, 26786, 27167,
  8983. 27189, 27836, 28040, 28169, 28248, 28988, 28966, 29031, 30151, 30465,
  8984. 30813, 30977, 31077, 31216, 31456, 31505, 31911, 32057, 32918, 33750,
  8985. 33931, 34121, 34909, 35059, 35359, 35388, 35412, 35443, 35937, 36062,
  8986. 37284, 37478, 37758, 37912, 38556, 38808, 19978, 19976, 19998, 20055,
  8987. 20887, 21104, 22478, 22580, 22732, 23330, 24120, 24773, 25854, 26465,
  8988. 26454, 27972, 29366, 30067, 31331, 33976, 35698, 37304, 37664, 22065,
  8989. 22516, 39166, 25325, 26893, 27542, 29165, 32340, 32887, [12170, 33394],
  8990. 35302, [12215, 39135], 34645, 36785, 23611, 20280, 20449, 20405, 21767,
  8991. 23072, 23517, 23529, [12092, 24515], 24910, 25391, 26032, 26187, 26862,
  8992. 27035, 28024, 28145, 30003, 30137, 30495, 31070, 31206, 32051,
  8993. [12162, 33251], 33455, 34218, 35242, 35386, [12189, 36523], [12191, 36763],
  8994. 36914, 37341, 38663, [12040, 20154], 20161, 20995, 22645, 22764, 23563,
  8995. 29978, 23613, 33102, 35338, 36805, 38499, 38765, 31525, 35535, 38920,
  8996. 37218, 22259, 21416, 36887, 21561, 22402, 24101, 25512, [12116, 27700],
  8997. 28810, 30561, 31883, 32736, 34928, 36930, 37204, 37648, 37656, 38543,
  8998. 29790, 39620, 23815, 23913, 25968, 26530, 36264, 38619, 25454, 26441,
  8999. 26905, 33733, 38935, 38592, 35070, 28548, 25722, [12072, 23544], 19990,
  9000. 28716, 30045, 26159, 20932, 21046, 21218, 22995, 24449, 24615, 25104,
  9001. 25919, 25972, 26143, 26228, 26866, 26646, 27491, 28165, 29298,
  9002. [12131, 29983], 30427, 31934, 32854, 22768, 35069, [11972, 35199], 35488,
  9003. 35475, 35531, 36893, 37266, [11992, 38738], 38745, [12011, 25993], 31246,
  9004. 33030, 38587, 24109, 24796, 25114, 26021, 26132, 26512, [12143, 30707],
  9005. 31309, 31821, 32318, 33034, 36012, [12186, 36196], 36321, 36447, 30889,
  9006. 20999, 25305, 25509, 25666, 25240, 35373, 31363, 31680, 35500, 38634,
  9007. 32118, [12166, 33292], 34633, 20185, 20808, 21315, 21344, 23459, 23554,
  9008. 23574, 24029, 25126, 25159, 25776, 26643, 26676, 27849, 27973, 27927,
  9009. 26579, 28508, 29006, 29053, 26059, 31359, 31661, 32218, 32330, 32680,
  9010. 33146, [12167, 33307], 33337, 34214, 35438, 36046, 36341, 36984, 36983,
  9011. 37549, 37521, 38275, 39854, 21069, 21892, 28472, 28982, 20840, 31109,
  9012. 32341, 33203, 31950, 22092, 22609, 23720, 25514, 26366, 26365, 26970,
  9013. 29401, 30095, 30094, 30990, 31062, 31199, 31895, 32032, 32068, 34311,
  9014. 35380, 38459, 36961, [12239, 40736], 20711, 21109, 21452, 21474, 20489,
  9015. 21930, 22766, 22863, 29245, 23435, 23652, 21277, 24803, 24819, 25436,
  9016. 25475, 25407, 25531, 25805, 26089, 26361, 24035, 27085, 27133, 28437,
  9017. 29157, 20105, 30185, 30456, 31379, 31967, 32207, 32156, 32865, 33609,
  9018. 33624, 33900, 33980, 34299, 35013, [12187, 36208], 36865, 36973, 37783,
  9019. 38684, 39442, 20687, 22679, 24974, 33235, 34101, 36104, 36896, 20419,
  9020. 20596, 21063, 21363, 24687, 25417, 26463, 28204, [12188, 36275], 36895,
  9021. 20439, 23646, 36042, 26063, 32154, 21330, 34966, 20854, 25539, 23384,
  9022. 23403, 23562, 25613, 26449, 36956, 20182, 22810, 22826, 27760, 35409,
  9023. 21822, 22549, 22949, 24816, 25171, 26561, 33333, 26965, 38464, 39364,
  9024. 39464, 20307, 22534, 23550, 32784, 23729, 24111, 24453, 24608, 24907,
  9025. 25140, 26367, 27888, 28382, 32974, 33151, 33492, 34955, 36024, 36864,
  9026. 36910, 38538, 40667, 39899, 20195, 21488, [12068, 22823], 31532, 37261,
  9027. 38988, 40441, 28381, 28711, 21331, 21828, 23429, 25176, 25246, 25299,
  9028. 27810, 28655, 29730, 35351, 37944, 28609, 35582, 33592, 20967, 34552,
  9029. 21482, 21481, 20294, 36948, [12192, 36784], 22890, 33073, 24061, 31466,
  9030. 36799, 26842, [12181, 35895], 29432, 40008, 27197, 35504, 20025, 21336,
  9031. 22022, 22374, 25285, 25506, 26086, 27470, 28129, 28251, 28845, 30701,
  9032. 31471, 31658, 32187, 32829, 32966, 34507, 35477, 37723, 22243, 22727,
  9033. 24382, 26029, 26262, 27264, 27573, 30007, 35527, 20516, 30693, 22320,
  9034. 24347, 24677, 26234, 27744, 30196, 31258, 32622, 33268, 34584, 36933,
  9035. 39347, 31689, 30044, [12149, 31481], 31569, 33988, 36880, 31209, 31378,
  9036. 33590, 23265, 30528, 20013, 20210, 23449, 24544, 25277, 26172, 26609,
  9037. 27880, [12173, 34411], 34935, 35387, 37198, 37619, 39376, 27159, 28710,
  9038. 29482, 33511, 33879, 36015, 19969, 20806, 20939, 21899, 23541, 24086,
  9039. 24115, 24193, 24340, 24373, 24427, 24500, 25074, 25361, 26274, 26397,
  9040. 28526, 29266, 30010, 30522, 32884, 33081, 33144, 34678, 35519, 35548,
  9041. 36229, 36339, 37530, [11985, 12199, 38263], 38914, [12227, 40165], 21189,
  9042. 25431, 30452, 26389, 27784, 29645, 36035, 37806, 38515, 27941, 22684,
  9043. 26894, 27084, 36861, 37786, 30171, 36890, 22618, 26626, 25524, 27131,
  9044. 20291, 28460, 26584, 36795, 34086, 32180, 37716, 26943, 28528, 22378,
  9045. 22775, 23340, 32044, [12118, 29226], 21514, 37347, 40372, 20141, 20302,
  9046. 20572, 20597, 21059, 35998, 21576, 22564, 23450, 24093, 24213, 24237,
  9047. 24311, 24351, 24716, 25269, 25402, 25552, 26799, 27712, 30855, 31118,
  9048. 31243, 32224, 33351, 35330, 35558, 36420, 36883, 37048, 37165, 37336,
  9049. [12237, 40718], 27877, 25688, 25826, 25973, 28404, 30340, 31515, 36969,
  9050. 37841, 28346, 21746, 24505, 25764, 36685, 36845, 37444, 20856, 22635,
  9051. 22825, 23637, 24215, 28155, 32399, 29980, 36028, 36578, 39003, 28857,
  9052. 20253, 27583, 28593, [12133, 30000], 38651, 20814, 21520, 22581, 22615,
  9053. 22956, 23648, 24466, [12099, 26007], 26460, 28193, 30331, 33759, 36077,
  9054. 36884, 37117, 37709, 30757, 30778, 21162, 24230, [12063, 22303], 22900,
  9055. 24594, 20498, 20826, 20908, 20941, [12049, 20992], 21776, 22612, 22616,
  9056. 22871, 23445, 23798, 23947, 24764, 25237, 25645, 26481, 26691, 26812,
  9057. 26847, 30423, 28120, 28271, 28059, 28783, 29128, 24403, 30168, 31095,
  9058. 31561, 31572, 31570, 31958, 32113, 21040, 33891, 34153, 34276, 35342,
  9059. 35588, [12182, 35910], 36367, 36867, 36879, 37913, 38518, 38957, 39472,
  9060. 38360, 20685, 21205, 21516, 22530, 23566, 24999, 25758, 27934, 30643,
  9061. 31461, 33012, 33796, 36947, 37509, 23776, 40199, 21311, 24471, 24499,
  9062. 28060, 29305, 30563, 31167, 31716, 27602, 29420, 35501, 26627, 27233,
  9063. 20984, 31361, 26932, 23626, 40182, 33515, 23493, [12195, 37193], 28702,
  9064. 22136, 23663, 24775, 25958, 27788, 35930, 36929, 38931, 21585, 26311,
  9065. 37389, 22856, 37027, 20869, 20045, 20970, 34201, 35598, 28760, 25466,
  9066. 37707, 26978, 39348, 32260, 30071, 21335, 26976, 36575, 38627, 27741,
  9067. [12038, 20108], 23612, 24336, 36841, 21250, 36049, [12161, 32905], 34425,
  9068. 24319, [12103, 26085], 20083, [12042, 20837], 22914, 23615, 38894, 20219,
  9069. 22922, 24525, 35469, 28641, 31152, 31074, 23527, 33905, 29483, 29105,
  9070. 24180, 24565, 25467, 25754, 29123, 31896, 20035, 24316, 20043, 22492,
  9071. 22178, 24745, 28611, 32013, 33021, 33075, 33215, 36786, 35223, 34468,
  9072. 24052, 25226, 25773, 35207, 26487, 27874, 27966, 29750, 30772, 23110,
  9073. 32629, 33453, [12218, 39340], 20467, 24259, 25309, 25490, 25943, 26479,
  9074. 30403, 29260, 32972, 32954, 36649, 37197, 20493, 22521, 23186, 26757,
  9075. 26995, 29028, 29437, 36023, 22770, 36064, 38506, 36889, 34687, 31204,
  9076. 30695, 33833, 20271, 21093, 21338, 25293, 26575, 27850, [12137, 30333],
  9077. 31636, 31893, 33334, 34180, 36843, 26333, 28448, 29190, 32283, 33707,
  9078. 39361, [12008, 40614], 20989, 31665, 30834, 31672, 32903, 31560, 27368,
  9079. 24161, 32908, 30033, 30048, [12043, 20843], 37474, 28300, 30330, 37271,
  9080. 39658, 20240, 32624, 25244, 31567, 38309, 40169, 22138, 22617, 34532,
  9081. 38588, 20276, 21028, 21322, 21453, 21467, 24070, 25644, 26001, 26495,
  9082. 27710, 27726, 29256, 29359, 29677, 30036, 32321, 33324, 34281, 36009,
  9083. 31684, [12196, 37318], 29033, 38930, 39151, 25405, 26217, 30058, 30436,
  9084. 30928, 34115, 34542, 21290, 21329, 21542, 22915, 24199, 24444, 24754,
  9085. 25161, 25209, 25259, 26000, [12112, 27604], 27852, 30130, [12138, 30382],
  9086. 30865, 31192, 32203, 32631, 32933, 34987, 35513, 36027, 36991,
  9087. [12206, 38750], [12214, 39131], 27147, 31800, 20633, 23614, 24494, 26503,
  9088. 27608, 29749, 30473, 32654, [12240, 40763], 26570, 31255, 21305,
  9089. [12134, 30091], 39661, 24422, 33181, 33777, 32920, 24380, 24517, 30050,
  9090. 31558, 36924, 26727, 23019, 23195, 32016, 30334, 35628, 20469, 24426,
  9091. 27161, 27703, 28418, 29922, 31080, 34920, 35413, 35961, 24287, 25551,
  9092. 30149, 31186, 33495, 37672, 37618, 33948, 34541, 39981, 21697, 24428,
  9093. 25996, 27996, 28693, 36007, 36051, 38971, 25935, 29942, 19981, 20184,
  9094. 22496, 22827, 23142, 23500, 20904, 24067, 24220, 24598, 25206, 25975,
  9095. 26023, 26222, 28014, [12119, 29238], 31526, 33104, 33178, 33433, 35676,
  9096. 36000, 36070, 36212, [12201, 38428], 38468, 20398, 25771, 27494, 33310,
  9097. 33889, 34154, 37096, 23553, 26963, [12213, 39080], 33914, 34135, 20239,
  9098. 21103, 24489, 24133, 26381, 31119, 33145, 35079, 35206, 28149, 24343,
  9099. 25173, 27832, 20175, 29289, 39826, 20998, 21563, 22132, 22707, 24996,
  9100. 25198, 28954, 22894, 31881, 31966, 32027, 38640, [12098, 25991], 32862,
  9101. 19993, 20341, 20853, 22592, 24163, 24179, 24330, 26564, 20006, 34109,
  9102. 38281, 38491, [12150, 31859], [12212, 38913], 20731, 22721, 30294, 30887,
  9103. 21029, 30629, 34065, 31622, 20559, 22793, [12122, 29255], 31687, 32232,
  9104. 36794, 36820, 36941, 20415, 21193, 23081, 24321, 38829, 20445, 33303,
  9105. 37610, 22275, 25429, 27497, 29995, 35036, 36628, 31298, 21215, 22675,
  9106. 24917, 25098, 26286, [11935, 27597], 31807, 33769, 20515, 20472, 21253,
  9107. 21574, 22577, 22857, 23453, 23792, 23791, 23849, 24214, 25265, 25447,
  9108. 25918, [12101, 26041], 26379, 27861, 27873, 28921, 30770, 32299, 32990,
  9109. 33459, 33804, 34028, 34562, 35090, 35370, 35914, 37030, 37586, 39165,
  9110. 40179, 40300, 20047, 20129, 20621, 21078, 22346, 22952, 24125,
  9111. {f: 2, c: 24536}, 25151, 26292, 26395, 26576, 26834, 20882, 32033, 32938,
  9112. 33192, 35584, 35980, 36031, 37502, 38450, 21536, 38956, 21271, 20693,
  9113. [12056, 21340], 22696, 25778, 26420, 29287, 30566, 31302, 37350, 21187,
  9114. 27809, 27526, 22528, 24140, 22868, 26412, 32763, 20961, 30406, 25705,
  9115. 30952, 39764, [12231, 40635], 22475, 22969, 26151, 26522, 27598, 21737,
  9116. 27097, 24149, 33180, 26517, 39850, 26622, 40018, 26717, 20134, 20451,
  9117. [12060, 21448], 25273, 26411, 27819, 36804, 20397, 32365, 40639, 19975,
  9118. 24930, 28288, 28459, 34067, 21619, 26410, 39749, [11922, 24051], 31637,
  9119. 23724, 23494, 34588, 28234, 34001, 31252, 33032, 22937, 31885,
  9120. [11936, 27665], 30496, 21209, 22818, 28961, 29279, [12141, 30683], 38695,
  9121. 40289, 26891, 23167, 23064, 20901, 21517, 21629, 26126, 30431, 36855,
  9122. 37528, 40180, 23018, 29277, 28357, 20813, 26825, 32191, 32236,
  9123. [12207, 38754], 40634, 25720, 27169, 33538, 22916, 23391, [12113, 27611],
  9124. 29467, 30450, 32178, 32791, 33945, 20786, [12106, 26408], 40665,
  9125. [12140, 30446], 26466, 21247, 39173, 23588, 25147, 31870, 36016, 21839,
  9126. 24758, 32011, [12200, 38272], 21249, 20063, 20918, 22812, 29242, 32822,
  9127. 37326, 24357, [12142, 30690], 21380, 24441, 32004, 34220, 35379, 36493,
  9128. 38742, 26611, 34222, 37971, 24841, 24840, 27833, 30290, 35565, 36664,
  9129. 21807, 20305, 20778, 21191, 21451, 23461, 24189, 24736, 24962, 25558,
  9130. 26377, 26586, 28263, 28044, {f: 2, c: 29494}, 30001, 31056, 35029, 35480,
  9131. 36938, [12194, 37009], 37109, 38596, 34701, [12067, 22805], 20104, 20313,
  9132. 19982, 35465, 36671, 38928, 20653, 24188, 22934, 23481, 24248, 25562,
  9133. 25594, 25793, 26332, 26954, 27096, 27915, 28342, 29076, [12132, 29992],
  9134. 31407, [12154, 32650], 32768, 33865, 33993, 35201, 35617, 36362, 36965,
  9135. 38525, 39178, 24958, 25233, 27442, 27779, 28020, 32716, 32764, 28096,
  9136. 32645, 34746, 35064, 26469, 33713, 38972, 38647, 27931, 32097, 33853,
  9137. 37226, 20081, 21365, 23888, 27396, 28651, 34253, 34349, 35239, 21033,
  9138. 21519, 23653, 26446, 26792, 29702, 29827, 30178, 35023, 35041,
  9139. [12197, 37324], 38626, 38520, 24459, 29575, [12148, 31435], 33870, 25504,
  9140. 30053, 21129, 27969, 28316, 29705, 30041, 30827, 31890, 38534,
  9141. [12015, 31452], [12243, 40845], 20406, 24942, 26053, 34396, 20102, 20142,
  9142. 20698, 20001, 20940, 23534, 26009, 26753, 28092, 29471, 30274, 30637,
  9143. 31260, 31975, 33391, 35538, 36988, 37327, 38517, 38936, [12050, 21147],
  9144. 32209, 20523, 21400, 26519, 28107, 29136, 29747, 33256, 36650, 38563,
  9145. 40023, 40607, 29792, 22593, 28057, 32047, 39006, 20196, 20278, 20363,
  9146. 20919, 21169, 23994, 24604, 29618, 31036, 33491, 37428, 38583, 38646,
  9147. 38666, 40599, 40802, 26278, 27508, 21015, 21155, 28872, 35010, 24265,
  9148. 24651, 24976, 28451, 29001, 31806, 32244, 32879, 34030, 36899, 37676,
  9149. 21570, 39791, 27347, 28809, 36034, 36335, 38706, 21172, 23105, 24266,
  9150. 24324, 26391, 27004, 27028, 28010, 28431, 29282, 29436, 31725,
  9151. [12156, 32769], 32894, 34635, 37070, 20845, 40595, 31108, 32907, 37682,
  9152. 35542, 20525, 21644, 35441, 27498, 36036, 33031, 24785, 26528, 40434,
  9153. 20121, 20120, 39952, 35435, 34241, 34152, 26880, 28286, 30871, 33109,
  9154. 24332, 19984, 19989, 20010, 20017, [12034, 20022], 20028, [12035, 20031],
  9155. 20034, 20054, 20056, 20098, [12037, 20101], 35947, 20106, 33298, 24333,
  9156. 20110, {f: 2, c: 20126}, [12039, 20128], 20130, 20144, 20147, 20150, 20174,
  9157. 20173, 20164, 20166, 20162, 20183, 20190, 20205, 20191, 20215, 20233,
  9158. 20314, 20272, 20315, 20317, 20311, 20295, 20342, 20360, 20367, 20376,
  9159. 20347, 20329, 20336, 20369, 20335, 20358, 20374, 20760, 20436, 20447,
  9160. 20430, 20440, 20443, 20433, 20442, 20432, {f: 2, c: 20452}, 20506, 20520,
  9161. 20500, 20522, 20517, 20485, 20252, 20470, 20513, 20521, 20524, 20478,
  9162. 20463, 20497, 20486, 20547, 20551, 26371, 20565, 20560, 20552, 20570,
  9163. 20566, 20588, 20600, 20608, 20634, 20613, 20660, 20658, {f: 2, c: 20681},
  9164. 20659, 20674, 20694, 20702, 20709, 20717, 20707, 20718, 20729, 20725,
  9165. 20745, {f: 2, c: 20737}, 20758, 20757, 20756, 20762, 20769, 20794, 20791,
  9166. 20796, 20795, [12041, 20799], [11918, 20800], 20818, 20812, 20820, 20834,
  9167. 31480, {f: 2, c: 20841}, 20846, 20864, [12044, 20866], 22232, 20876, 20873,
  9168. 20879, 20881, 20883, 20885, [12045, 20886], 20900, 20902, 20898,
  9169. {f: 2, c: 20905}, [12046, 20907], 20915, {f: 2, c: 20913}, 20912, 20917,
  9170. 20925, 20933, 20937, 20955, [12047, 20960], 34389, 20969, 20973, 20976,
  9171. [12048, 20981], 20990, 20996, 21003, 21012, 21006, 21031, 21034, 21038,
  9172. 21043, 21049, 21071, 21060, {f: 2, c: 21067}, 21086, 21076, 21098, 21108,
  9173. 21097, 21107, 21119, 21117, 21133, 21140, 21138, 21105, 21128, 21137,
  9174. 36776, 36775, {f: 2, c: 21164}, 21180, 21173, 21185, 21197, 21207, 21214,
  9175. 21219, 21222, 39149, 21216, 21235, 21237, 21240, [12051, 21241], 21254,
  9176. 21256, 30008, 21261, 21264, 21263, [12052, 21269], [12053, 21274], 21283,
  9177. 21295, 21297, 21299, [12054, 21304], 21312, 21318, 21317, 19991, 21321,
  9178. 21325, 20950, 21342, [12057, 21353], 21358, 22808, 21371, 21367,
  9179. [12058, 21378], 21398, 21408, 21414, 21413, 21422, 21424, [12059, 21430],
  9180. 21443, 31762, 38617, 21471, 26364, 29166, 21486, 21480, 21485, 21498,
  9181. 21505, 21565, 21568, {f: 2, c: 21548}, 21564, 21550, 21558, 21545, 21533,
  9182. 21582, 21647, 21621, 21646, 21599, 21617, 21623, 21616, 21650, 21627,
  9183. 21632, 21622, 21636, 21648, 21638, 21703, 21666, 21688, 21669, 21676,
  9184. 21700, 21704, 21672, 21675, 21698, 21668, 21694, 21692, 21720,
  9185. {f: 2, c: 21733}, 21775, 21780, 21757, 21742, 21741, 21754, 21730, 21817,
  9186. 21824, 21859, 21836, 21806, 21852, 21829, {f: 2, c: 21846}, 21816, 21811,
  9187. 21853, 21913, 21888, 21679, 21898, 21919, 21883, 21886, 21912, 21918,
  9188. 21934, 21884, 21891, 21929, 21895, 21928, 21978, 21957, 21983, 21956,
  9189. 21980, 21988, 21972, 22036, 22007, 22038, 22014, 22013, 22043, 22009,
  9190. 22094, 22096, 29151, 22068, 22070, 22066, 22072, 22123, 22116, 22063,
  9191. 22124, 22122, 22150, 22144, 22154, 22176, 22164, 22159, 22181, 22190,
  9192. 22198, 22196, 22210, 22204, 22209, 22211, 22208, 22216, 22222, 22225,
  9193. 22227, [12062, 22231], 22254, 22265, 22272, 22271, 22276, 22281, 22280,
  9194. 22283, 22285, 22291, 22296, 22294, 21959, 22300, 22310, {f: 2, c: 22327},
  9195. 22350, 22331, 22336, 22351, 22377, 22464, 22408, 22369, 22399, 22409,
  9196. 22419, 22432, 22451, 22436, 22442, 22448, 22467, 22470, 22484,
  9197. {f: 2, c: 22482}, 22538, 22486, 22499, 22539, 22553, 22557, 22642, 22561,
  9198. 22626, 22603, 22640, 27584, 22610, 22589, 22649, 22661, 22713, 22687,
  9199. 22699, 22714, 22750, 22715, 22712, 22702, 22725, 22739, 22737, 22743,
  9200. 22745, 22744, 22757, 22748, 22756, 22751, 22767, 22778, 22777,
  9201. {f: 3, c: 22779}, [12065, 22786], [12066, 22794], 22800, 22811, 26790,
  9202. 22821, {f: 2, c: 22828}, 22834, 22840, 22846, 31442, 22869, 22864, 22862,
  9203. 22874, 22872, 22882, 22880, 22887, 22892, 22889, 22904, 22913, 22941,
  9204. 20318, 20395, 22947, 22962, 22982, 23016, 23004, 22925, {f: 2, c: 23001},
  9205. 23077, 23071, 23057, 23068, 23049, 23066, 23104, 23148, 23113,
  9206. {f: 2, c: 23093}, 23138, 23146, 23194, 23228, 23230, 23243, 23234, 23229,
  9207. 23267, 23255, 23270, 23273, 23254, {f: 2, c: 23290}, 23308, 23307, 23318,
  9208. 23346, 23248, 23338, 23350, 23358, 23363, 23365, 23360, 23377, 23381,
  9209. {f: 2, c: 23386}, 23397, 23401, 23408, 23411, 23413, 23416, 25992, 23418,
  9210. [12071, 23424], 23427, 23462, 23480, 23491, 23495, 23497, 23508, 23504,
  9211. 23524, 23526, 23522, 23518, 23525, 23531, 23536, 23542, 23539, 23557,
  9212. {f: 2, c: 23559}, 23565, 23571, 23584, [11920, 12074, 23586], 23592,
  9213. [12075, 23608], 23609, 23617, 23622, 23630, 23635, 23632, 23631, 23409,
  9214. 23660, [12076, 23662], 20066, 23670, 23673, 23692, 23697, 23700, 22939,
  9215. 23723, 23739, 23734, 23740, 23735, 23749, 23742, 23751, 23769, 23785,
  9216. 23805, 23802, 23789, 23948, 23786, 23819, 23829, 23831, 23900, 23839,
  9217. 23835, 23825, 23828, 23842, 23834, 23833, 23832, 23884, 23890, 23886,
  9218. 23883, 23916, 23923, 23926, 23943, 23940, 23938, 23970, 23965, 23980,
  9219. 23982, 23997, 23952, 23991, 23996, 24009, 24013, 24019, 24018, 24022,
  9220. [12078, 24027], 24043, 24050, 24053, 24075, 24090, 24089, 24081, 24091,
  9221. {f: 2, c: 24118}, 24132, 24131, 24128, 24142, 24151, 24148, 24159, 24162,
  9222. 24164, 24135, {f: 2, c: 24181}, [11923, 12083, 24186], 40636,
  9223. [12084, 24191], 24224, {f: 2, c: 24257}, 24264, 24272, 24271, 24278, 24291,
  9224. 24285, {f: 2, c: 24282}, 24290, 24289, {f: 2, c: 24296}, 24300, 24305,
  9225. 24307, 24304, [12085, 24308], 24312, [12086, 24318], 24323, 24329, 24413,
  9226. 24412, [12087, 24331], 24337, 24342, 24361, 24365, 24376, 24385, 24392,
  9227. 24396, 24398, 24367, [11924, 24401], {f: 2, c: 24406}, 24409,
  9228. [12090, 24417], 24429, [12091, 24435], 24439, 24451, 24450, 24447, 24458,
  9229. 24456, 24465, 24455, 24478, 24473, 24472, 24480, 24488, 24493, 24508,
  9230. 24534, 24571, 24548, 24568, 24561, 24541, 24755, 24575, 24609, 24672,
  9231. 24601, 24592, 24617, 24590, 24625, 24603, 24597, 24619, 24614, 24591,
  9232. 24634, 24666, 24641, 24682, 24695, 24671, 24650, 24646, 24653, 24675,
  9233. 24643, 24676, 24642, 24684, 24683, 24665, 24705, 24717, 24807, 24707,
  9234. 24730, 24708, 24731, {f: 2, c: 24726}, 24722, 24743, 24715, 24801, 24760,
  9235. 24800, 24787, 24756, 24560, 24765, 24774, 24757, 24792, 24909, 24853,
  9236. 24838, {f: 2, c: 24822}, 24832, 24820, 24826, 24835, 24865, 24827, 24817,
  9237. {f: 2, c: 24845}, 24903, 24894, 24872, 24871, 24906, 24895, 24892, 24876,
  9238. 24884, 24893, 24898, 24900, 24947, 24951, {f: 3, c: 24920}, 24939, 24948,
  9239. 24943, 24933, 24945, 24927, 24925, 24915, 24949, 24985, 24982, 24967,
  9240. 25004, 24980, 24986, 24970, 24977, 25003, 25006, 25036, 25034, 25033,
  9241. 25079, 25032, 25027, 25030, 25018, 25035, 32633, 25037, 25062, 25059,
  9242. 25078, 25082, 25076, 25087, 25085, 25084, 25086, 25088, [12093, 25096],
  9243. 25097, 25101, 25100, 25108, 25115, 25118, 25121, 25130, 25134, 25136,
  9244. {f: 2, c: 25138}, 25153, 25166, 25182, 25187, 25179, 25184, 25192, 25212,
  9245. 25218, 25225, 25214, {f: 2, c: 25234}, 25238, 25300, 25219, 25236, 25303,
  9246. 25297, 25275, 25295, 25343, 25286, 25812, 25288, 25308, 25292, 25290,
  9247. 25282, 25287, 25243, 25289, 25356, 25326, 25329, 25383, 25346, 25352,
  9248. 25327, 25333, 25424, 25406, 25421, 25628, 25423, 25494, 25486, 25472,
  9249. 25515, 25462, 25507, 25487, 25481, 25503, 25525, 25451, 25449, 25534,
  9250. 25577, 25536, 25542, 25571, 25545, 25554, 25590, 25540, 25622, 25652,
  9251. 25606, 25619, 25638, 25654, 25885, 25623, 25640, 25615, 25703, 25711,
  9252. 25718, 25678, 25898, 25749, 25747, 25765, 25769, 25736, 25788, 25818,
  9253. 25810, 25797, 25799, 25787, 25816, 25794, 25841, 25831, 33289,
  9254. {f: 2, c: 25824}, 25260, 25827, 25839, 25900, 25846, 25844, 25842, 25850,
  9255. 25856, 25853, 25880, 25884, 25861, 25892, 25891, 25899, [12097, 25908],
  9256. [11929, 25909], 25911, 25910, 25912, 30027, 25928, 25942, 25941, 25933,
  9257. 25944, 25950, 25949, 25970, 25976, {f: 2, c: 25986}, 35722, 26011, 26015,
  9258. 26027, 26039, 26051, 26054, 26049, 26052, 26060, 26066, 26075, 26073,
  9259. [12102, 26080], [11931, 26081], 26097, 26482, 26122, 26115, 26107, 26483,
  9260. {f: 2, c: 26165}, 26164, 26140, 26191, 26180, 26185, 26177, 26206, 26205,
  9261. 26212, {f: 2, c: 26215}, 26207, 26210, 26224, 26243, 26248, 26254, 26249,
  9262. 26244, 26264, 26269, 26305, 26297, 26313, 26302, 26300, 26308, 26296,
  9263. 26326, 26330, 26336, 26175, 26342, 26345, [12104, 26352], 26357, 26359,
  9264. 26383, 26390, 26398, {f: 2, c: 26406}, 38712, 26414, 26431, 26422, 26433,
  9265. 26424, 26423, 26438, 26462, 26464, 26457, {f: 2, c: 26467}, 26505, 26480,
  9266. 26537, 26492, 26474, 26508, 26507, 26534, 26529, 26501, 26551, 26607,
  9267. 26548, 26604, 26547, 26601, 26552, 26596, 26590, 26589, 26594, 26606,
  9268. 26553, 26574, 26566, 26599, 27292, 26654, 26694, 26665, 26688, 26701,
  9269. 26674, 26702, 26803, 26667, 26713, 26723, 26743, 26751, 26783, 26767,
  9270. 26797, 26772, 26781, 26779, 26755, 27310, 26809, 26740, 26805, 26784,
  9271. 26810, 26895, 26765, 26750, 26881, 26826, 26888, 26840, 26914, 26918,
  9272. 26849, 26892, 26829, 26836, 26855, 26837, 26934, 26898, 26884, 26839,
  9273. 26851, 26917, 26873, 26848, 26863, 26920, 26922, 26906, 26915, 26913,
  9274. 26822, 27001, 26999, 26972, 27000, 26987, 26964, 27006, 26990, 26937,
  9275. 26996, 26941, 26969, 26928, 26977, 26974, 26973, 27009, 26986, 27058,
  9276. 27054, 27088, 27071, 27073, 27091, 27070, 27086, 23528, 27082, 27101,
  9277. 27067, 27075, 27047, 27182, 27025, 27040, 27036, 27029, 27060, 27102,
  9278. 27112, 27138, 27163, 27135, 27402, 27129, 27122, 27111, 27141, 27057,
  9279. 27166, 27117, 27156, 27115, 27146, 27154, 27329, 27171, 27155, 27204,
  9280. 27148, 27250, 27190, 27256, 27207, 27234, 27225, 27238, 27208, 27192,
  9281. 27170, 27280, 27277, 27296, 27268, {f: 2, c: 27298}, 27287, 34327, 27323,
  9282. 27331, 27330, 27320, 27315, 27308, 27358, 27345, 27359, 27306, 27354,
  9283. 27370, 27387, 27397, 34326, 27386, 27410, 27414, 39729, 27423, 27448,
  9284. 27447, 30428, 27449, 39150, 27463, 27459, 27465, 27472, 27481, 27476,
  9285. 27483, 27487, 27489, 27512, [12109, 27513], {f: 2, c: 27519}, 27524, 27523,
  9286. 27533, 27544, 27541, 27550, 27556, {f: 2, c: 27562}, 27567, 27570, 27569,
  9287. [12110, 27571], 27575, 27580, 27590, [12111, 27595], 27603, 27615, 27628,
  9288. 27627, 27635, 27631, 40638, 27656, 27667, [12115, 27668], 27675, 27684,
  9289. 27683, 27742, 27733, 27746, 27754, 27778, 27789, 27802, 27777, 27803,
  9290. 27774, 27752, 27763, 27794, 27792, 27844, 27889, 27859, 27837, 27863,
  9291. 27845, 27869, 27822, 27825, 27838, 27834, 27867, 27887, 27865, 27882,
  9292. 27935, 34893, 27958, 27947, 27965, 27960, 27929, 27957, 27955, 27922,
  9293. 27916, 28003, 28051, 28004, 27994, 28025, 27993, 28046, 28053, 28644,
  9294. 28037, 28153, 28181, 28170, 28085, 28103, 28134, 28088, 28102, 28140,
  9295. 28126, 28108, 28136, 28114, 28101, 28154, 28121, 28132, 28117, 28138,
  9296. 28142, 28205, 28270, 28206, 28185, 28274, 28255, 28222, 28195, 28267,
  9297. 28203, 28278, 28237, 28191, 28227, 28218, 28238, 28196, 28415, 28189,
  9298. 28216, 28290, 28330, 28312, 28361, 28343, 28371, 28349, 28335, 28356,
  9299. 28338, {f: 2, c: 28372}, 28303, 28325, 28354, 28319, 28481, 28433, 28748,
  9300. 28396, 28408, 28414, 28479, 28402, 28465, 28399, 28466, 28364, 28478,
  9301. 28435, 28407, 28550, 28538, 28536, 28545, 28544, 28527, 28507, 28659,
  9302. 28525, 28546, 28540, 28504, 28558, 28561, 28610, 28518, 28595, 28579,
  9303. 28577, 28580, 28601, 28614, 28586, 28639, 28629, 28652, 28628, 28632,
  9304. 28657, 28654, 28635, 28681, 28683, 28666, 28689, 28673, 28687, 28670,
  9305. 28699, 28698, 28532, 28701, 28696, 28703, 28720, 28734, 28722, 28753,
  9306. 28771, 28825, 28818, 28847, 28913, 28844, 28856, 28851, 28846, 28895,
  9307. 28875, 28893, 28889, 28937, 28925, 28956, 28953, 29029, 29013, 29064,
  9308. 29030, 29026, 29004, 29014, 29036, 29071, 29179, 29060, 29077, 29096,
  9309. 29100, 29143, 29113, 29118, 29138, 29129, 29140, 29134, 29152, 29164,
  9310. 29159, 29173, 29180, 29177, 29183, 29197, 29200, 29211, 29224, 29229,
  9311. 29228, 29232, 29234, [12120, 29243], 29244, [12121, 29247], 29248, 29254,
  9312. 29259, 29272, 29300, 29310, 29314, 29313, 29319, 29330, 29334, 29346,
  9313. 29351, 29369, 29362, 29379, 29382, 29380, 29390, 29394, 29410,
  9314. {f: 2, c: 29408}, 29433, 29431, 20495, 29463, 29450, 29468, 29462, 29469,
  9315. 29492, 29487, 29481, 29477, 29502, {f: 2, c: 29518}, 40664, 29527, 29546,
  9316. 29544, 29552, 29560, 29557, 29563, 29562, 29640, 29619, 29646, 29627,
  9317. 29632, 29669, 29678, 29662, 29858, 29701, 29807, 29733, 29688, 29746,
  9318. 29754, 29781, 29759, 29791, 29785, 29761, 29788, 29801, 29808, 29795,
  9319. 29802, 29814, 29822, 29835, 29854, 29863, 29898, 29903, 29908, 29681,
  9320. 29920, 29923, 29927, 29929, 29934, 29938, {f: 2, c: 29936}, 29944, 29943,
  9321. 29956, 29955, 29957, 29964, 29966, 29965, 29973, 29971, 29982, 29990,
  9322. 29996, 30012, 30020, 30029, 30026, 30025, 30043, 30022, 30042, 30057,
  9323. 30052, 30055, 30059, 30061, 30072, 30070, {f: 2, c: 30086}, 30068, 30090,
  9324. 30089, 30082, 30100, 30106, 30109, 30117, 30115, 30146, 30131, 30147,
  9325. 30133, 30141, 30136, 30140, 30129, 30157, 30154, 30162, 30169, 30179,
  9326. 30174, {f: 2, c: 30206}, 30204, 30209, 30192, 30202, {f: 2, c: 30194},
  9327. 30219, 30221, 30217, 30239, 30247, {f: 3, c: 30240}, 30244, 30260, 30256,
  9328. 30267, {f: 2, c: 30279}, 30278, 30300, 30296, {f: 2, c: 30305},
  9329. {f: 3, c: 30312}, 30311, 30316, 30320, 30322, [12136, 30326], 30328, 30332,
  9330. 30336, 30339, 30344, 30347, 30350, 30358, 30355, {f: 2, c: 30361}, 30384,
  9331. 30388, {f: 3, c: 30392}, 30402, 30413, 30422, 30418, 30430, 30433, 30437,
  9332. 30439, 30442, 34351, 30459, 30472, 30471, 30468, 30505, 30500, 30494,
  9333. {f: 2, c: 30501}, 30491, {f: 2, c: 30519}, 30535, 30554, 30568, 30571,
  9334. 30555, 30565, 30591, 30590, 30585, 30606, 30603, 30609, 30624, 30622,
  9335. 30640, 30646, 30649, 30655, {f: 2, c: 30652}, 30651, 30663, 30669, 30679,
  9336. 30682, 30684, 30691, 30702, 30716, 30732, 30738, 31014, 30752, 31018,
  9337. 30789, 30862, 30836, 30854, 30844, 30874, 30860, 30883, 30901, 30890,
  9338. 30895, 30929, 30918, 30923, 30932, 30910, 30908, 30917, 30922, 30956,
  9339. 30951, 30938, 30973, 30964, 30983, 30994, 30993, 31001, 31020, 31019,
  9340. 31040, 31072, 31063, 31071, 31066, 31061, 31059, 31098, 31103, 31114,
  9341. 31133, 31143, 40779, 31146, 31150, 31155, {f: 2, c: 31161}, 31177, 31189,
  9342. 31207, 31212, 31201, 31203, 31240, 31245, {f: 2, c: 31256}, 31264, 31263,
  9343. 31104, 31281, 31291, 31294, 31287, 31299, 31319, 31305, {f: 2, c: 31329},
  9344. 31337, 40861, 31344, 31353, 31357, 31368, 31383, 31381, 31384, 31382,
  9345. 31401, 31432, 31408, 31414, 31429, 31428, 31423, 36995, 31431, 31434,
  9346. 31437, 31439, 31445, 31443, {f: 2, c: 31449}, 31453, {f: 2, c: 31457},
  9347. 31462, 31469, 31472, 31490, 31503, 31498, 31494, 31539, {f: 2, c: 31512},
  9348. 31518, 31541, 31528, 31542, 31568, 31610, 31492, 31565, 31499, 31564,
  9349. 31557, 31605, 31589, 31604, 31591, {f: 2, c: 31600}, 31596, 31598, 31645,
  9350. 31640, 31647, 31629, 31644, 31642, 31627, 31634, 31631, 31581, 31641,
  9351. 31691, 31681, 31692, 31695, 31668, 31686, 31709, 31721, 31761, 31764,
  9352. 31718, 31717, 31840, 31744, 31751, 31763, 31731, 31735, 31767, 31757,
  9353. 31734, 31779, 31783, 31786, 31775, 31799, 31787, 31805, 31820, 31811,
  9354. 31828, 31823, 31808, 31824, 31832, 31839, 31844, 31830, 31845, 31852,
  9355. 31861, 31875, 31888, 31908, 31917, 31906, 31915, 31905, 31912, 31923,
  9356. 31922, 31921, 31918, 31929, 31933, 31936, 31941, 31938, 31960, 31954,
  9357. 31964, 31970, 39739, 31983, 31986, 31988, 31990, 31994, 32006, 32002,
  9358. 32028, 32021, 32010, 32069, 32075, 32046, 32050, 32063, 32053, 32070,
  9359. 32115, 32086, 32078, 32114, 32104, 32110, 32079, 32099, 32147, 32137,
  9360. 32091, 32143, 32125, 32155, 32186, 32174, 32163, 32181, 32199, 32189,
  9361. 32171, 32317, 32162, 32175, 32220, 32184, 32159, 32176, 32216, 32221,
  9362. 32228, 32222, 32251, 32242, 32225, 32261, 32266, 32291, 32289, 32274,
  9363. 32305, 32287, 32265, 32267, 32290, 32326, 32358, 32315, 32309, 32313,
  9364. 32323, 32311, 32306, 32314, 32359, 32349, 32342, 32350, {f: 2, c: 32345},
  9365. 32377, 32362, 32361, 32380, 32379, 32387, 32213, 32381, 36782, 32383,
  9366. {f: 2, c: 32392}, 32396, 32402, 32400, {f: 2, c: 32403}, 32406, 32398,
  9367. {f: 2, c: 32411}, 32568, 32570, 32581, {f: 3, c: 32588}, 32592,
  9368. [12153, 32593], 32597, 32596, 32600, {f: 2, c: 32607}, {f: 2, c: 32616},
  9369. 32615, 32632, 32642, 32646, 32643, 32648, 32647, 32652, 32660, 32670,
  9370. 32669, 32666, 32675, 32687, 32690, 32697, 32686, 32694, 32696, 35697,
  9371. {f: 2, c: 32709}, 32714, 32725, 32724, 32737, 32742, 32745, 32755, 32761,
  9372. 39132, 32774, 32772, 32779, [12158, 32786], {f: 2, c: 32792}, 32796, 32801,
  9373. 32808, 32831, 32827, 32842, 32838, 32850, 32856, 32858, 32863, 32866,
  9374. 32872, 32883, 32882, 32880, 32886, 32889, 32893, [12160, 32895], 32900,
  9375. 32902, 32901, 32923, 32915, 32922, 32941, 20880, 32940, 32987, 32997,
  9376. 32985, 32989, 32964, 32986, 32982, 33033, 33007, 33009, 33051, 33065,
  9377. 33059, 33071, 33099, 38539, 33094, 33086, 33107, 33105, 33020, 33137,
  9378. 33134, {f: 2, c: 33125}, 33140, 33155, 33160, 33162, 33152, 33154, 33184,
  9379. 33173, 33188, 33187, 33119, 33171, 33193, 33200, 33205, 33214, 33208,
  9380. 33213, 33216, 33218, 33210, 33225, 33229, 33233, 33241, 33240, 33224,
  9381. 33242, {f: 2, c: 33247}, 33255, {f: 2, c: 33274}, 33278, {f: 2, c: 33281},
  9382. 33285, 33287, 33290, 33293, 33296, 33302, 33321, 33323, 33336, 33331,
  9383. 33344, 33369, 33368, 33373, 33370, 33375, 33380, 33378, 33384,
  9384. {f: 2, c: 33386}, 33326, 33393, 33399, [12171, 33400], 33406, 33421, 33426,
  9385. 33451, 33439, 33467, 33452, 33505, 33507, 33503, 33490, 33524, 33523,
  9386. 33530, 33683, 33539, 33531, 33529, 33502, 33542, 33500, 33545, 33497,
  9387. 33589, 33588, 33558, 33586, 33585, 33600, 33593, 33616, 33605, 33583,
  9388. 33579, {f: 2, c: 33559}, 33669, 33690, 33706, 33695, 33698, 33686, 33571,
  9389. 33678, 33671, 33674, 33660, 33717, 33651, 33653, 33696, 33673, 33704,
  9390. 33780, 33811, 33771, 33742, 33789, 33795, 33752, 33803, 33729, 33783,
  9391. 33799, 33760, 33778, 33805, 33826, 33824, 33725, 33848, 34054, 33787,
  9392. 33901, 33834, 33852, 34138, 33924, 33911, 33899, 33965, 33902, 33922,
  9393. 33897, 33862, 33836, 33903, 33913, 33845, 33994, 33890, 33977, 33983,
  9394. 33951, 34009, 33997, 33979, 34010, 34000, 33985, 33990, 34006, 33953,
  9395. 34081, 34047, 34036, {f: 2, c: 34071}, 34092, 34079, 34069, 34068, 34044,
  9396. 34112, 34147, 34136, 34120, 34113, 34306, 34123, 34133, 34176, 34212,
  9397. 34184, 34193, 34186, 34216, 34157, 34196, 34203, 34282, 34183, 34204,
  9398. 34167, 34174, 34192, 34249, 34234, 34255, 34233, 34256, 34261, 34269,
  9399. 34277, 34268, 34297, 34314, 34323, 34315, 34302, 34298, 34310, 34338,
  9400. 34330, 34352, 34367, [12172, 34381], 20053, 34388, 34399, 34407, 34417,
  9401. 34451, 34467, {f: 2, c: 34473}, {f: 2, c: 34443}, 34486, 34479, 34500,
  9402. 34502, 34480, 34505, 34851, 34475, 34516, 34526, 34537, 34540, 34527,
  9403. 34523, 34543, 34578, 34566, 34568, 34560, 34563, 34555, 34577, 34569,
  9404. 34573, 34553, 34570, 34612, 34623, 34615, 34619, 34597, 34601, 34586,
  9405. 34656, 34655, 34680, 34636, 34638, 34676, 34647, 34664, 34670, 34649,
  9406. 34643, 34659, 34666, 34821, 34722, 34719, 34690, 34735, 34763, 34749,
  9407. 34752, 34768, 38614, 34731, 34756, 34739, 34759, 34758, 34747, 34799,
  9408. 34802, 34784, 34831, 34829, 34814, {f: 2, c: 34806}, 34830, 34770, 34833,
  9409. 34838, 34837, 34850, 34849, 34865, 34870, 34873, 34855, 34875, 34884,
  9410. 34882, 34898, 34905, 34910, 34914, 34923, 34945, 34942, 34974, 34933,
  9411. 34941, 34997, 34930, 34946, 34967, 34962, 34990, 34969, 34978, 34957,
  9412. 34980, 34992, 35007, 34993, {f: 2, c: 35011}, 35028, {f: 2, c: 35032},
  9413. 35037, 35065, 35074, 35068, 35060, 35048, 35058, 35076, 35084, 35082,
  9414. 35091, 35139, 35102, 35109, {f: 2, c: 35114}, 35137, 35140, 35131, 35126,
  9415. 35128, 35148, 35101, 35168, 35166, 35174, 35172, 35181, 35178, 35183,
  9416. 35188, 35191, [12177, 35198], 35203, 35208, 35210, 35219, 35224, 35233,
  9417. 35241, 35238, 35244, 35247, 35250, 35258, 35261, {f: 2, c: 35263}, 35290,
  9418. {f: 2, c: 35292}, 35303, 35316, 35320, 35331, 35350, 35344, 35340, 35355,
  9419. 35357, 35365, 35382, 35393, 35419, 35410, 35398, 35400, 35452, 35437,
  9420. 35436, 35426, 35461, 35458, 35460, 35496, 35489, 35473, {f: 2, c: 35493},
  9421. 35482, 35491, 35524, 35533, 35522, 35546, 35563, 35571, 35559, 35556,
  9422. 35569, 35604, 35552, 35554, 35575, 35550, 35547, 35596, 35591, 35610,
  9423. 35553, 35606, 35600, 35607, 35616, 35635, 38827, 35622, 35627, 35646,
  9424. 35624, 35649, 35660, 35663, 35662, 35657, 35670, 35675, 35674, 35691,
  9425. 35679, 35692, 35695, 35700, 35709, 35712, 35724, 35726, {f: 2, c: 35730},
  9426. 35734, {f: 2, c: 35737}, 35898, 35905, 35903, 35912, 35916, 35918, 35920,
  9427. [12183, 35925], 35938, 35948, [12184, 35960], 35962, 35970, 35977, 35973,
  9428. 35978, {f: 2, c: 35981}, 35988, 35964, 35992, 25117, 36013, 36010, 36029,
  9429. {f: 2, c: 36018}, 36014, 36022, 36040, 36033, 36068, 36067, 36058, 36093,
  9430. {f: 2, c: 36090}, {f: 2, c: 36100}, 36106, 36103, 36111, 36109, 36112,
  9431. 40782, 36115, 36045, 36116, 36118, 36199, 36205, 36209, 36211, 36225,
  9432. 36249, 36290, 36286, 36282, 36303, 36314, 36310, 36300, 36315, 36299,
  9433. {f: 2, c: 36330}, 36319, 36323, 36348, {f: 2, c: 36360}, 36351,
  9434. {f: 2, c: 36381}, 36368, 36383, 36418, 36405, 36400, 36404, 36426, 36423,
  9435. 36425, 36428, 36432, 36424, 36441, 36452, 36448, 36394, 36451, 36437,
  9436. 36470, 36466, 36476, 36481, 36487, 36485, 36484, 36491, 36490, 36499,
  9437. 36497, 36500, 36505, 36522, 36513, 36524, 36528, 36550, 36529, 36542,
  9438. 36549, 36552, 36555, 36571, 36579, 36604, 36603, 36587, 36606, 36618,
  9439. 36613, 36629, 36626, 36633, 36627, 36636, 36639, 36635, 36620, 36646,
  9440. 36659, 36667, 36665, 36677, 36674, 36670, 36684, 36681, 36678, 36686,
  9441. 36695, 36700, {f: 3, c: 36706}, 36764, 36767, 36771, 36781, 36783, 36791,
  9442. 36826, 36837, 36834, 36842, 36847, 36999, 36852, 36869, {f: 2, c: 36857},
  9443. 36881, 36885, 36897, 36877, 36894, 36886, 36875, 36903, 36918, 36917,
  9444. 36921, 36856, {f: 4, c: 36943}, 36878, 36937, 36926, 36950, 36952, 36958,
  9445. 36968, 36975, 36982, 38568, 36978, 36994, 36989, 36993, 36992, 37002,
  9446. 37001, 37007, 37032, 37039, 37041, 37045, 37090, 37092, 25160, 37083,
  9447. 37122, 37138, 37145, 37170, 37168, 37194, 37206, 37208, 37219, 37221,
  9448. 37225, 37235, 37234, 37259, 37257, 37250, 37282, 37291, 37295, 37290,
  9449. 37301, 37300, 37306, {f: 2, c: 37312}, 37321, 37323, 37328, 37334, 37343,
  9450. 37345, 37339, 37372, {f: 2, c: 37365}, 37406, 37375, 37396, 37420, 37397,
  9451. 37393, 37470, 37463, 37445, 37449, 37476, 37448, 37525, 37439, 37451,
  9452. 37456, 37532, 37526, 37523, 37531, 37466, 37583, 37561, 37559, 37609,
  9453. 37647, 37626, 37700, 37678, 37657, 37666, 37658, 37667, 37690, 37685,
  9454. 37691, 37724, 37728, 37756, 37742, 37718, 37808, {f: 2, c: 37804}, 37780,
  9455. 37817, {f: 2, c: 37846}, 37864, 37861, 37848, 37827, 37853, 37840, 37832,
  9456. 37860, 37914, 37908, 37907, 37891, 37895, 37904, 37942, 37931, 37941,
  9457. 37921, 37946, 37953, 37970, 37956, 37979, 37984, 37986, 37982, 37994,
  9458. 37417, 38000, 38005, 38007, 38013, 37978, 38012, 38014, 38017, 38015,
  9459. 38274, 38279, 38282, 38292, 38294, {f: 2, c: 38296}, 38304, 38312, 38311,
  9460. 38317, 38332, 38331, 38329, 38334, 38346, 28662, 38339, 38349, 38348,
  9461. 38357, 38356, 38358, 38364, 38369, 38373, 38370, 38433, 38440,
  9462. {f: 2, c: 38446}, 38466, 38476, 38479, 38475, 38519, 38492, 38494, 38493,
  9463. 38495, 38502, 38514, 38508, 38541, 38552, 38549, 38551, 38570, 38567,
  9464. {f: 2, c: 38577}, 38576, 38580, [12202, 38582], 38584, [12203, 38585],
  9465. 38606, 38603, 38601, 38605, 35149, 38620, 38669, 38613, 38649, 38660,
  9466. 38662, 38664, 38675, 38670, 38673, 38671, 38678, 38681, 38692, 38698,
  9467. 38704, 38713, {f: 2, c: 38717}, 38724, 38726, 38728, 38722, 38729, 38748,
  9468. 38752, 38756, 38758, 38760, 21202, 38763, 38769, 38777, 38789, 38780,
  9469. 38785, 38778, 38790, 38795, {f: 2, c: 38799}, 38812, 38824, 38822, 38819,
  9470. {f: 2, c: 38835}, 38851, 38854, 38856, [12209, 38859], 38876,
  9471. [12210, 38893], 40783, 38898, 31455, 38902, 38901, 38927, 38924, 38968,
  9472. 38948, 38945, 38967, 38973, 38982, 38991, 38987, 39019, {f: 3, c: 39023},
  9473. 39028, 39027, 39082, 39087, 39089, 39094, 39108, 39107, 39110, 39145,
  9474. 39147, 39171, 39177, 39186, 39188, 39192, 39201, {f: 2, c: 39197}, 39204,
  9475. 39200, 39212, 39214, {f: 2, c: 39229}, 39234, 39241, 39237, 39248, 39243,
  9476. {f: 2, c: 39249}, 39244, 39253, {f: 2, c: 39319}, 39333, {f: 2, c: 39341},
  9477. 39356, 39391, 39387, 39389, 39384, 39377, {f: 2, c: 39405},
  9478. {f: 2, c: 39409}, 39419, 39416, 39425, 39439, 39429, 39394, 39449, 39467,
  9479. 39479, 39493, 39490, 39488, 39491, 39486, 39509, 39501, 39515, 39511,
  9480. 39519, 39522, 39525, 39524, 39529, 39531, 39530, 39597, 39600, 39612,
  9481. 39616, 39631, 39633, {f: 2, c: 39635}, 39646, [12221, 39647],
  9482. {f: 2, c: 39650}, 39654, 39663, 39659, 39662, 39668, 39665, 39671, 39675,
  9483. 39686, 39704, 39706, 39711, {f: 2, c: 39714}, [12222, 39717],
  9484. {f: 4, c: 39719}, 39726, [12223, 39727], [12224, 39730], 39748, 39747,
  9485. 39759, {f: 2, c: 39757}, 39761, 39768, 39796, 39827, 39811, 39825,
  9486. {f: 2, c: 39830}, {f: 2, c: 39839}, 39848, 39860, 39872, 39882, 39865,
  9487. 39878, 39887, {f: 2, c: 39889}, 39907, 39906, 39908, 39892, 39905, 39994,
  9488. 39922, 39921, 39920, 39957, 39956, 39945, 39955, 39948, 39942, 39944,
  9489. 39954, 39946, 39940, 39982, 39963, 39973, 39972, 39969, 39984, 40007,
  9490. 39986, 40006, 39998, 40026, 40032, 40039, 40054, 40056, 40167, 40172,
  9491. 40176, 40201, 40200, 40171, 40195, 40198, 40234, 40230, 40367, 40227,
  9492. 40223, 40260, 40213, 40210, 40257, 40255, 40254, 40262, 40264,
  9493. {f: 2, c: 40285}, 40292, 40273, 40272, 40281, 40306, 40329, 40327, 40363,
  9494. 40303, 40314, 40346, 40356, 40361, 40370, 40388, 40385, 40379, 40376,
  9495. 40378, 40390, 40399, 40386, 40409, 40403, 40440, 40422, 40429, 40431,
  9496. 40445, {f: 2, c: 40474}, 40478, [12228, 40565], 40569, 40573, 40577, 40584,
  9497. {f: 2, c: 40587}, 40594, 40597, 40593, 40605, [12230, 40613], 40617, 40632,
  9498. 40618, 40621, 38753, 40652, {f: 3, c: 40654}, 40660, 40668, 40670, 40669,
  9499. 40672, 40677, 40680, 40687, 40692, {f: 2, c: 40694}, [12235, 40697],
  9500. {f: 2, c: 40699}, [12236, 40701], {f: 2, c: 40711}, 30391, 40725, 40737,
  9501. 40748, 40766, [12241, 40778], [12242, 40786], 40788, 40803,
  9502. {f: 3, c: 40799}, {f: 2, c: 40806}, 40812, 40810, 40823, 40818, 40822,
  9503. 40853, [12244, 40860], [12245, 40864], 22575, 27079, 36953, 29796, 0,
  9504. {f: 76, c: 9472}, {f: 20, c: 9312}, {f: 10, c: 8544}, 13129, 13076, 0,
  9505. 13133, 0, 13095, 0, 13110, 13137, 0, 13069, 13094, 0, 13099, 13130, 0,
  9506. {f: 3, c: 13212}, {f: 2, c: 13198}, 13252, 13217, 12317, 12319, 8470,
  9507. 13261, 0, {f: 5, c: 12964}, {f: 2, c: 12849}, 12857, 13182, 13181, 13180,
  9508. 8750, 8721, {s: 3}, 8735, 8895, 0, 0, 21854, {s: 7}, 167133, 0, 0, 28976,
  9509. 0, 40407, {s: 4}, 64054, 0, 0, 22169, 15694, {s: 4}, 20448, 0, 0, 36544, 0,
  9510. 194797, {s: 4}, 153716, 32363, 33606, 167670, {s: 3}, 40572, 0, 0, 26171,
  9511. 0, 40628, {s: 4}, 26629, {s: 5}, 23650, 0, 194780, 0, 32353, 0, 0, 64070,
  9512. {s: 5}, 34083, 37292, {s: 7}, 34796, {s: 8}, 25620, 0, 0, 39506, {s: 4},
  9513. 64074, 0, 194692, {s: 4}, 31774, {s: 6}, 64016, 25681, 0, 0, 63980, 22625,
  9514. 39002, 0, 194679, {s: 3}, 31153, 0, 28678, {s: 9}, 22218, {s: 3}, 21085, 0,
  9515. 28497, 37297, {s: 10}, 64106, {s: 6}, 38960, 0, 40629, {s: 9}, 33802,
  9516. 63939, {f: 2, c: 63890}, 63897, 0, 34847, 194575, 0, 194771, 194584,
  9517. {s: 7}, 137754, 23643, {s: 4}, 25890, 0, 0, 26618, 0, 26766, 0, 148432,
  9518. 194848, {s: 21}, 34110, {s: 15}, 30562, {s: 12}, 65075, 0,
  9519. {f: 2, c: 65073}, {s: 4}, 65072, {f: 2, c: 65077}, {f: 2, c: 65081}, 0, 0,
  9520. {f: 2, c: 65079}, {f: 2, c: 65087}, {f: 2, c: 65085}, {f: 4, c: 65089},
  9521. {f: 2, c: 65083}, {s: 41}, {f: 3, c: 12436}, 0, 0, 22099, {s: 41}, 65508,
  9522. 65287, 65282, 0, 9665, 9655, 8681, 8679, 8678, 8680, 9634, 9831, 9825,
  9523. 9828, 9826, 13216, 13218, {f: 2, c: 13220}, 13207, 8467, 13208, 13235,
  9524. 13234, 13233, 13232, {f: 3, c: 13189}, 13259, 13200, 13268, 13206, 13090,
  9525. 13078, 13080, 13077, 13059, 13091, 13143, 13122, 13113, 13115, 13056,
  9526. 13105, 13127, 13086, 13098, 0, 13183, 8481, 9742, 12342, 12320, {s: 3},
  9527. {f: 9, c: 9352}, {f: 20, c: 9332}, 12881, {f: 10, c: 8560},
  9528. {f: 10, c: 12882}, {f: 26, c: 9372}, 12867, 12861, 12863, 12852, 12856,
  9529. 12851, 12860, 12866, 12862, 12854, 12853, 12859, 12864, 12858, 12976,
  9530. 12973, 12969, 12975, 12948, 12970, 12952, 12971, 12946, 12945, 12947,
  9531. 12972, 12974, 12950, {s: 8}, {f: 3, c: 9131}, 0, {f: 3, c: 9127}, 0, 13260,
  9532. 13061, 0, 0, 13215, 13219, 13222, 0, 0, 12958, {f: 2, c: 13192}, 13256,
  9533. 8749, 0, 12848, {f: 6, c: 12842}, 12855, 12865, 10145, {s: 3}, 9673, 9824,
  9534. 9829, 9827, 9830, {f: 4, c: 9728}, 9758, {f: 2, c: 9756}, 9759, 12953,
  9535. 9450, {f: 2, c: 8554}, {s: 3}, {f: 8, c: 9601}, 9615, 9614, 9613, 9612,
  9536. 9611, 9610, 9609, {f: 2, c: 9620}, {f: 2, c: 9581}, 9584, 9583, 9552, 9566,
  9537. 9578, 9569, {f: 2, c: 9698}, 9701, 9700, 0, 0, {f: 3, c: 9585}, {s: 20},
  9538. 20956, 29081, {f: 9, c: 10102}, {s: 3}, {f: 2, c: 8570}, {s: 3}, 8575,
  9539. 8458, 8457, 0, 0, 12292, 8646, {f: 2, c: 8644}, 0, {f: 4, c: 12535}, 0, 0,
  9540. 12957, {s: 3}, 13179, {s: 3}, 13107, 13134, {s: 30}, 32394, 35100, 37704,
  9541. 37512, 34012, 20425, 28859, 26161, 26824, 37625, 26363, 24389,
  9542. [12033, 20008], 20193, 20220, 20224, 20227, 20281, 20310, 20370, 20362,
  9543. 20378, 20372, 20429, 20544, 20514, 20479, 20510, 20550, 20592, 20546,
  9544. 20628, 20724, 20696, 20810, 20836, 20893, 20926, 20972, 21013, 21148,
  9545. 21158, 21184, 21211, 21248, 0, 21284, 21362, 21395, 21426, 21469, 64014,
  9546. 21660, 21642, 21673, 21759, 21894, 22361, 22373, 22444, 22472, 22471,
  9547. 64015, 0, 22686, 22706, 22795, 22867, 22875, 22877, 22883, 22948, 22970,
  9548. 23382, 23488, 29999, 23512, 0, 23582, 23718, 23738, 23797, 23847, 23891, 0,
  9549. 23874, 23917, {f: 2, c: 23992}, 24016, 24353, 24372, 24423, 24503, 24542,
  9550. 24669, 24709, 24714, 24798, 24789, 24864, 24818, 24849, 24887, 24880,
  9551. 24984, 25107, 25254, 25589, 25696, 25757, 25806, 25934, 26112, 26133,
  9552. 26121, 26158, 0, 26148, 26213, 26199, 26201, 64018, 26227, 26265, 26272,
  9553. 26290, 26303, 26362, 26382, 0, 26470, 26555, 26706, 26560, 0, 26692, 26831,
  9554. 64019, 26984, 64020, 27032, 27106, 27184, 27243, 27206, 27251, 27262,
  9555. 27362, 27364, 27606, 27711, 27740, 27782, 27759, 27866, 27908, 28039,
  9556. 28015, 28054, 28076, 28111, 28152, 28146, 28156, 28217, 28252, 28199,
  9557. 28220, 28351, 28552, 28597, 28661, 28677, 28679, 28712, 28805, 28843,
  9558. 28943, 28932, 29020, {f: 2, c: 28998}, 0, 29121, 29182, 29361, 29374,
  9559. 29476, 64022, 29559, 29629, 29641, 29654, 29667, 29650, 29703, 29685,
  9560. 29734, 29738, 29737, 29742, 0, 29833, 29855, 29953, 30063, 30338, 30364,
  9561. 30366, 30363, 30374, 64023, 30534, 21167, 30753, 30798, 30820, 30842,
  9562. 31024, {f: 3, c: 64024}, 31124, 64027, 31131, 31441, 31463, 64028, 31467,
  9563. 31646, 64029, 32072, 0, 32183, 32160, 32214, 32338, 32583, 32673, 64030,
  9564. 33537, 33634, 33663, 33735, 33782, 33864, 33972, 34131, 34137, 34155,
  9565. 64031, 34224, {f: 2, c: 64032}, 34823, 35061, 35346, 35383, 35449, 35495,
  9566. 35518, 35551, 64034, 35574, 35667, 35711, 36080, 36084, 36114, 36214,
  9567. 64035, 36559, 0, 64037, 36967, 37086, 64038, 37141, 37159, 37338, 37335,
  9568. 37342, {f: 2, c: 37357}, {f: 2, c: 37348}, 37382, 37392, 37386, 37434,
  9569. 37440, 37436, 37454, 37465, 37457, 37433, 37479, 37543, {f: 2, c: 37495},
  9570. 37607, 37591, 37593, 37584, 64039, 37589, 37600, 37587, 37669, 37665,
  9571. 37627, 64040, 37662, 37631, 37661, 37634, 37744, 37719, 37796, 37830,
  9572. 37854, 37880, 37937, 37957, 37960, 38290, 0, 64041, 38557, 38575, 38707,
  9573. 38715, 38723, 38733, 38735, [12205, 38737], 0, 38999, 39013,
  9574. {f: 2, c: 64042}, 39207, 64044, 39326, 39502, 39641, 39644, 39797, 39794,
  9575. 39823, 39857, 39867, 39936, 40304, 40299, 64045, 40473, 40657, 0, 92,
  9576. {s: 634}, 8364, 8486, 0, 0, 64256, {f: 2, c: 64259}, 257, 299, 363, 275,
  9577. 333, 256, 298, 362, 274, 332, {f: 4, c: 8539}, {f: 2, c: 8531}, 8304,
  9578. {f: 6, c: 8308}, {f: 10, c: 8320}, 461, 282, 0, 7868, 463, 0, 296, 465, 0,
  9579. 467, 366, 360, 462, 283, 0, 7869, 464, 0, 297, 466, 0, 468, 367, 361, 593,
  9580. 8049, 8048, 509, 0, 596, 0, 0, 601, 0, 0, 602, 0, 0, 603, 8051, 8050, 0,
  9581. 331, 629, 652, 0, 0, 658, 643, 720, {s: 682}, {f: 10, c: 12832}, {s: 108},
  9582. {f: 4, c: 12892}, {f: 15, c: 12977}, {s: 50}, {f: 26, c: 9424},
  9583. {f: 26, c: 9398}, {s: 48}, {f: 47, c: 13008}, 0, {f: 10, c: 12928}, 12944,
  9584. {f: 6, c: 12938}, 0, 12959, {s: 6}, {f: 2, c: 12960}, 12955, 12954, 12963,
  9585. 12962, 12951, 0, 12956, 12949, {s: 6}, 9676, {s: 11}, 10111,
  9586. {f: 10, c: 9451}, {s: 510}, 8414, {s: 815}, 13274, {s: 3}, 8448, 13250, 0,
  9587. 0, 8453, 0, 13169, 0, 0, 13197, 13211, {s: 3}, {f: 2, c: 13271}, {s: 3},
  9588. {f: 2, c: 13057}, 13060, 13062, 0, 13064, 0, 13063, 13066, 0, 13065, 0,
  9589. 13067, 0, 13068, {f: 6, c: 13070}, 0, 13079, 0, 13081, 0, {f: 4, c: 13082},
  9590. {f: 3, c: 13087}, 13092, 0, 13093, 0, 0, {f: 2, c: 13096}, 0, 13101, 0, 0,
  9591. {f: 3, c: 13102}, 13106, 0, 0, {f: 2, c: 13108}, 13116, {s: 3}, 13111, 0,
  9592. 13112, 13114, 13117, 13121, {f: 3, c: 13118}, {f: 4, c: 13123}, 13128,
  9593. {f: 2, c: 13131}, {f: 2, c: 13135}, 0, 0, 13138, 13140, 0, 0, 13139,
  9594. {f: 2, c: 13141}, {s: 132}, 8501, 976, 8714, 8463, 0, 981, 987, 977, 0,
  9595. {f: 2, c: 9832}, 9836, {s: 5}, 12347, 0, {f: 3, c: 12339}, 8252, 8265,
  9596. {s: 5}, 8723, 0, 8771, {f: 2, c: 8818}, {s: 6}, {f: 2, c: 12312},
  9597. {f: 2, c: 65375}, {s: 10}, 9115, {f: 2, c: 9117}, 9120, {s: 4}, 9121,
  9598. {f: 2, c: 9123}, 9126, {s: 12}, [9116, 9119, 9122, 9125, 9130], {s: 8},
  9599. 9986, 0, 0, 12349, 0, 12447, 0, 0, 8709, 8864, 8854, 8856, 8853, 8855,
  9600. {s: 4}, 9664, 9654, {s: 4}, 8656, 8596, {f: 2, c: 8600}, {f: 2, c: 8598},
  9601. 8652, 8651, {s: 10}, 12336, 8967, {s: 8}, 10048, 10047, {s: 7}, 9643, 0,
  9602. 9642, 0, 10010, {s: 12}, 9702, {s: 4}, 10070, {s: 379}, {f: 2, c: 65093},
  9603. {s: 679}, 64103, 64098, 32227, [12232, 40643], 28331, 64082, 64061, 64069,
  9604. 64062, 27114, 28212, 64096, 64071, 64056, 64066, 64078, 34395, 64105,
  9605. 64052, 64099, 25581, 25802, 30799, 64084, 63856, 64077, 64097, 64072,
  9606. 64076, {f: 2, c: 64091}, 64081, 64067, 64090, 28041, 29376, 0, 194885,
  9607. 64086, 64080, 64049, 64059, 24034, 64063, 64101, 21373, 64055, 64095,
  9608. 24501, 64064, 0, 64083, 0, 64085, 64104, 64068, 64089, 26202, 64053, 64075,
  9609. 64100, 64065, 64048, 0, 64057, 64051, 27493, 64058, 27599, 64050, 25150,
  9610. 64079, 63773, 63964, 63798, 28122, 63952, 26310, 27511, 64087, 37706, 0,
  9611. 37636, {s: 120}, 133390, {s: 120}, 35999, 11991, [11965, 158033], {s: 5},
  9612. 37555, 38321, 0, 0, 194812, {s: 13}, 194965, {s: 8}, 194794, 0, 26478,
  9613. 11974, 0, 194594, {s: 13}, 13314, 0, 0, 26083, {s: 4}, 134071, {s: 10},
  9614. 171339, 0, 194611, 24378, {s: 8}, 11945, 0, 20465, {s: 7}, 63753, {s: 7},
  9615. 11964, 0, 0, 194732, 26435, {s: 3}, 133732, 35329, 25142, 0, 0, 21555,
  9616. 23067, {s: 3}, 25221, 0, 0, 194819, {s: 6}, 21567, {s: 9}, 27506, {s: 4},
  9617. 29986, 19256, 0, 0, 24063, {s: 6}, 194827, 29626, 134047, {s: 3}, 194600,
  9618. 0, 194849, {s: 5}, 194623, {s: 16}, 194675, {f: 2, c: 11916}, 23577,
  9619. {s: 3}, 131083, 23426, 194642, {s: 5}, 11997, [11999, 39136],
  9620. [11998, 169599], 14221, 0, [11927, 14586], 0, 194887, 0, [11909, 20155],
  9621. 131490, {s: 7}, 13599, 0, 194738, 0, 0, [11971, 35200], {s: 4}, 31237,
  9622. {s: 4}, 35498, 0, 32085, 0, 28568, {s: 7}, 25591, 30246, {s: 4},
  9623. [11978, 163767], {s: 5}, 146686, {s: 5}, 13351, 0, 0, 33067, 0, 0, 194842,
  9624. {s: 5}, 11950, {s: 5}, 194714, {s: 3}, 194831, {s: 19}, 22305, 135741,
  9625. 194586, 0, 64003, {s: 7}, 21534, 15240, 20839, {s: 4}, 63839, {s: 9},
  9626. 20023, {s: 13}, [11946, 150804], 24421, 23020, 194658, 0, 24217, {s: 46},
  9627. 13416, {s: 8}, 21200, {s: 9}, 26625, 0, 195024, 195039, {s: 5}, 153215, 0,
  9628. 0, 11959, {s: 4}, 36534, 63775, {s: 3}, 63875, {s: 5}, 31867, 63906, 0,
  9629. 63898, 0, [11961, 32770], 157360, {s: 4}, [11911, 132648], 0, 0, 131210,
  9630. 194604, [11915, 13630], {s: 4}, 21589, 0, 22841, 0, 0, 23414, 194669,
  9631. 23572, 14306, 23782, 0, 20040, 0, 0, 194742, {s: 4}, 158105, 25371, 0, 0,
  9632. 26211, 0, 194779, 0, 0, 27126, 27014, {s: 3}, 27596, 0, 28183, 0, 0, 27818,
  9633. {s: 3}, [11942, 20012], 0, 0, 29935, 30069, 30188, 30286, 16305, 30570,
  9634. 30633, {s: 6}, 31571, 0, 0, 16996, {s: 3}, 194924, 0, 0, 32328, {s: 5},
  9635. 11955, {s: 4}, 33089, 17491, 0, [11966, 33401], [11967, 64094],
  9636. [11968, 64093], 0, 20857, 33626, {s: 3}, 17701, 0, 34292, 131248, {s: 4},
  9637. 34429, 0, 13358, 35014, {s: 6}, 18406, {s: 8}, 36808, {s: 19}, 166279, 0,
  9638. 0, 167447, 0, 0, 38969, {s: 6}, 39432, {s: 4}, 39903, {s: 10}, 148206,
  9639. {s: 5}, 21385, 0, 64017, 194785, 0, 146622, 132625, 0, {f: 2, c: 19972},
  9640. 19999, 20011, {f: 2, c: 20015}, {f: 2, c: 20032}, 20036, [11907, 20058],
  9641. 20095, 20109, 20118, 20153, 20176, 20192, 20221, 20223, 20235, 20245,
  9642. 20320, 20283, 20297, 20308, 20346, {f: 2, c: 20349}, 20375, 20414, 20431,
  9643. 20477, {f: 2, c: 20480}, 20496, 20507, 20519, 20526, 20567, 20582, 20586,
  9644. 20539, 20623, 20630, 20636, 20684, 20710, 20713, 20719, 20744, 20747,
  9645. 20752, 20763, 20766, 20831, 20897, 20924, 0, 20974, 20980, 20993,
  9646. [11913, 20994], 21011, 21065, 21089, 21094, 21139, 21192, 21232,
  9647. {f: 2, c: 21258}, 21310, 21324, 21323, 21345, 21356, 21419, 21466, 21478,
  9648. 21493, 21543, 21581, 21606, 21611, 21620, 21645, 21654, 21665, 21677,
  9649. 21689, 21695, 21702, 21709, 21774, 21803, 21813, 21834, 21856, 0, 21896,
  9650. 21902, 22024, {f: 2, c: 22030}, 22071, 22079, 22089, 22091, 22095, 22118,
  9651. 22121, 22127, {f: 2, c: 22129}, 22165, 22170, {f: 2, c: 22188}, 22193,
  9652. 22217, 22237, 22244, 22282, 22293, 22307, 22319, {f: 2, c: 22323}, 22348,
  9653. 22384, 22412, 22428, 22456, 22502, 22509, {f: 2, c: 22517}, 22527, 22537,
  9654. 22560, 22578, 22652, 22656, 22697, 22734, 22736, 22740, 22746, 22761,
  9655. 22796, 22820, 22831, 22881, 22893, 22986, 22994, 23005, {f: 2, c: 23011},
  9656. 23044, 23052, 23075, 23111, 23125, 23139, 23149, 23166, 23198, 23207,
  9657. 23212, 23219, 23264, 23296, 23321, 23333, 23341, 23361, 23420,
  9658. {f: 2, c: 23422}, 23434, [11919, 23587], 23595, 23600, 23651, 23657, 23676,
  9659. 23755, 23762, 23796, 23844, 23846, 23875, 23878, 23882, 23954, 23956,
  9660. 23961, 23968, 24024, 24032, 24056, 24064, 24082, {f: 2, c: 24084}, 24088,
  9661. 24110, 24152, {f: 2, c: 24171}, 24232, 24234, {f: 2, c: 24254}, 0, 24274,
  9662. 24327, 24334, {f: 2, c: 24348}, 24354, 24360, 24374, 24379, 24384,
  9663. [12089, 24400], 24408, 24420, 24457, 24476, 24487, 24484, 24495, 24504,
  9664. [11926, 24516], 24521, 24545, 24553, 24557, 24572, 24599, 24602, 24627,
  9665. 24673, 24703, 24734, 24740, 24752, 24779, 24795, 24824, {f: 3, c: 24850},
  9666. 24860, 24956, 24973, 24991, 25000, 25026, 25055, 25109, 25129, 25155,
  9667. 25158, [11928, 25164], 25169, 25174, 25284, 25340, 25354, 25357, 25368,
  9668. 25401, {f: 2, c: 25410}, 25445, 25460, 25469, 25476, 25479, 25488, 25502,
  9669. 25553, 25564, 25609, 25616, 25634, 25684, 25691, 25709, 25723,
  9670. {f: 2, c: 25790}, 25829, 25847, 25851, 25860, 25878, 25881, 25927, 25959,
  9671. 25985, 25989, 26050, 26096, 26098, 26156, 26188, {f: 2, c: 26203}, 26209,
  9672. 26219, 0, 26276, 26312, 26348, 26373, 26387, 26419, 26440, 26444, 26486,
  9673. 26491, 26544, 26546, 26617, 26583, 26585, 26608, 26668, {f: 2, c: 26672},
  9674. 26715, 26738, 26741, 26746, 26756, 26789, 26802, 26832, 26838, 26856,
  9675. 26861, {f: 2, c: 26864}, 26876, 26897, 26899, 26933, 26939, 26967, 26979,
  9676. 26994, {f: 2, c: 27007}, 27046, 27053, 27063, {f: 2, c: 27094}, 27137,
  9677. 27151, 27157, 27176, 27188, 27198, 27205, {f: 2, c: 27216}, 27222, 27227,
  9678. 27267, 27273, 27281, {f: 3, c: 27293}, 27356, 27367, 27372, 27422, 27428,
  9679. 27445, 27462, 27478, 27488, 27522, 27582, 27617, 27633, 27664, 27699,
  9680. [11937, 27701], 11938, 27737, 27766, 27771, 27781, 27797, 27804, 27856,
  9681. 27860, 27862, 27872, {f: 2, c: 27883}, 27886, 27914, 27918, 27921, 27950,
  9682. 27991, 27998, 28005, 28034, 28095, 28100, 28106, 28118, 28137, 28194,
  9683. 28241, 28359, 28362, 28366, 28413, 28442, 28458, 28463, 28467, 28506,
  9684. 28510, 28514, 28541, 28555, 28557, 28562, 28564, 28570, {f: 2, c: 28583},
  9685. 28598, 28634, 28638, 0, 28729, 28732, 0, 28756, {f: 2, c: 28765}, 28772,
  9686. [11939, 28780], 28798, 28801, 28821, 28855, {f: 2, c: 28883}, 28888, 28892,
  9687. 28935, 28960, 28977, 29002, 29010, 29024, 29049, 29074, 0, 29131, 29139,
  9688. 29142, 29184, 29213, 29227, 29240, 29249, 29267, {f: 2, c: 29269}, 29276,
  9689. 29325, [11944, 29357], 29364, 29383, 29435, {f: 2, c: 29444}, 29480, 29489,
  9690. 29507, 29548, 29564, 29571, {f: 2, c: 29573}, 29589, {f: 3, c: 29598},
  9691. 29606, 29611, 29621, 29623, 29628, 29647, 29657, 29673, 29684, 29693,
  9692. 29700, 29706, {f: 2, c: 29722}, 29732, 29736, 29740, {f: 3, c: 29743},
  9693. 29753, 29764, 29767, 29771, 29773, 29777, 29783, 29798, 29803, 29809,
  9694. 29824, {f: 3, c: 29829}, 29840, 29848, 29852, 29856, 29859, 29864, 29867,
  9695. 29877, 29887, 29896, 29914, 29918, 30030, 30073, 30081, 30096,
  9696. [12135, 30098], 30099, 30132, 30180, 30201, 30208, 30218, {f: 2, c: 30229},
  9697. 30233, 30238, 30253, 30261, 30275, 30283, 30309, 30317, 30319, 30321,
  9698. 30324, {f: 2, c: 30372}, 30405, 30412, 30444, 30460, 30516, 30518, 30556,
  9699. {f: 2, c: 30559}, 30578, 30589, 30613, 30634, 30694, 30704, 30708, 30726,
  9700. 30754, {f: 2, c: 30765}, 30768, 30773, 30824, 30878, 30920, 30924, 30926,
  9701. 30948, {f: 2, c: 30944}, 30962, 30967, 30971, 31025, 0, [11949, 31035],
  9702. 31037, 31045, {f: 2, c: 31067}, 31115, 31126, 31128, [12145, 31160], 31163,
  9703. 31178, 31194, 31235, 31241, 31249, 31262, 31277, 31289, 31301, 31308,
  9704. 31325, 0, 31341, 31352, 31392, 31395, 31411, {f: 2, c: 31419}, 31430,
  9705. 31495, 31508, 31527, 31537, 31559, 31566, 31584, 31593, 31597, 31602,
  9706. 31633, 31663, 31703, 31705, 31755, 31759, 31776, 31782, 31793, 31798,
  9707. 31825, 31833, 31847, 31854, 31856, 31932, 31935, {f: 2, c: 31944}, 31959,
  9708. 31961, 31965, 31979, {f: 3, c: 32007}, 32019, 32029, 32035, 32065, 32083,
  9709. 32089, 32093, 32122, 32134, {f: 2, c: 32139}, 32204, 32235, 32241, 32249,
  9710. 32264, 32273, 32277, 32288, 32327, 32354, 32366, 32371, 32397, 32401,
  9711. 32408, 32580, 32591, [11947, 11954, 32594], [11953, 32595], 32609, 32657,
  9712. 32703, 32718, 32735, 32741, 32748, {f: 2, c: 32750}, 32762, 32782, 32785,
  9713. 32788, 32804, 32806, 32826, 32828, 32864, 32881, 32885, 32926, 32934,
  9714. 32939, {f: 2, c: 32983}, 33046, 33048, 33082, 33098, 33100, 33153, 33156,
  9715. 33204, 33231, 33273, 33283, 33313, 33330, 33332, 33350, 33355, 33359,
  9716. 33422, 33454, 33463, 33470, 33478, 33534, 33603, 33617, 33621, 33670,
  9717. 33677, 33682, 33688, 33705, {f: 2, c: 33727}, 33770, 33807, 33809, 33866,
  9718. 33910, 33960, 33967, 33984, 33986, 34032, 34045, 34060, 34100, 34142,
  9719. 34191, 34231, 34254, 34221, 34322, 34345, 34386, 34403, 34412, 34415,
  9720. 34426, 34445, 34449, 34456, {f: 2, c: 34471}, 34554, 34557, 34571, 34579,
  9721. 34585, 34590, 34600, 34622, 34673, 34696, 34713, {f: 2, c: 34732}, 34741,
  9722. 34774, 34795, 34797, 34817, 0, 34822, 34827, 34836, 34844, 34902, 34911,
  9723. [11970, 34916], 34968, 34986, {f: 2, c: 35005}, 35018, 35026, 35035,
  9724. {f: 2, c: 35056}, 35078, {f: 3, c: 35096}, 35111, 35120, 35134, 35195,
  9725. 35284, 35286, 35301, 35313, 35335, 35343, 35349, 35362, 35406, 35455,
  9726. 35572, 35615, 35639, {f: 2, c: 35651}, 35668, 35740, 35742, 35911, 35924,
  9727. 35955, 36004, 36057, 36065, 36088, 36094, 36123, 36201, 36204, 36228,
  9728. 36237, 36245, 36262, 36294, 36302, 36324, 36332, 36384, 36427, 36460,
  9729. 36464, 36474, 36498, 36526, 36531, 36561, 36564, 36601, 36631, 36662,
  9730. 36774, [12193, 36789], [11981, 36790], 0, 36832, 36836, 36854, 36866,
  9731. 36908, 36932, 37000, 37013, 37017, 37019, 37026, 37044, 37079, 37085,
  9732. 37108, 37143, 37148, 37169, 37178, 37181, 37192, 37211, 37217, 37220,
  9733. 37262, 37278, 37288, {f: 2, c: 37293}, 37298, 37308, 37360, 37367, 37371,
  9734. 37383, 37416, 37427, 37432, 37443, 37447, 37455, 37472, 37570,
  9735. {f: 2, c: 37579}, 37599, 37645, 37653, 37663, 37671, 37703, 37714, 0,
  9736. 37738, 37741, 37787, 37818, 37801, 37825, 37834, 37858, 37882, 37885,
  9737. 37903, 37940, 37951, 37973, 37995, 38002, [11986, 38264], 38310, 38313, 0,
  9738. 38324, 38333, 38362, [11983, 11990, 38429], 38465, 38488, 38532, 38564,
  9739. 38569, 38610, 195060, 38622, 38633, 38641, 38658, 38665, 38746, 38755,
  9740. 38766, 38771, 38810, 38818, {f: 2, c: 38837}, 38873, 38878, 38900, 38922,
  9741. 38926, 38942, 38947, 38955, 38974, {f: 2, c: 38994}, 39001, 39020, 39096,
  9742. 39098, 39103, 39112, 39141, {f: 2, c: 39218}, 39232, 39245, 39260, 39263,
  9743. 39345, {f: 2, c: 39353}, 39369, 39426, 39446, 39460, 39463,
  9744. {f: 2, c: 39469}, 39478, 39480, 39498, 39510, {f: 2, c: 39605}, 39673,
  9745. 39683, 39712, {f: 2, c: 39731}, 39795, 39801, 39847, 39873, 39879, 39895,
  9746. 39911, 39915, 39927, 39930, 39933, 39947, 39975, 39978, 39990, 40001,
  9747. 40019, 40035, 40048, 40055, 40194, 40258, 40263, 40291, 40297, 40316,
  9748. 40318, 40333, 40369, 40387, 40391, 40406, 40415, 40427, 40436, 40469,
  9749. 40477, 40612, 40616, 40620, 40679, 40686, 40720, 40722, 40727, 40729,
  9750. 40751, 40759, 40761, 40769, 40773, 40791, 40808, 40817, 40821, 40848,
  9751. 40852, 40866, 0, 13317, 194564, 22048, 24267, 11925, 0, 144954, 0, 28665,
  9752. 28390, 29107, [11940, 64073], {s: 4}, [11980, 64102], 0, 23986, 0, 20435,
  9753. 20697, 20720, 20931, 22134, 27220, 27905, 28112, 28226, 28377, 29668,
  9754. 29729, 30060, 30801, 34805, 144382, 29608, 15091, 13531, 17420, 16010, 0,
  9755. 0, 19432, 0, 16090, 15138, 0, 17786, 16531, 0, 18021, 16643, 17043, 18094,
  9756. 13448, 140809, {f: 3, c: 63584}, 63610, 63615, {s: 23}, {f: 2, c: 8836},
  9757. {f: 2, c: 8842}, 8713, 0, {f: 2, c: 8965}, {s: 9}, {f: 2, c: 8741},
  9758. {s: 14}, 8802, 0, 8773, 8776, {f: 2, c: 8822}, {s: 4}, 8487, {s: 209},
  9759. {f: 2, c: 8922}, 8533, 8984, {f: 2, c: 7742}, {f: 2, c: 504}, 470, 472,
  9760. 474, 476, 260, 728, 317, 346, 350, 356, 377, 379, 261, 731, 318, 347, 711,
  9761. 351, 357, 378, 733, 380, 340, 258, 313, 262, 268, 280, 270, 323, 327, 336,
  9762. 344, 368, 354, 341, 259, 314, 263, 269, 281, 271, 273, 324, 328, 337, 345,
  9763. 369, 355, 729, 264, 284, 292, 308, 348, 364, 265, 285, 293, 309, 349, 365,
  9764. 625, 651, 638, 620, 622, 633, 648, 598, 627, 637, 642, 656, 635, 621, 607,
  9765. 626, 669, 654, 609, 624, 641, 295, 661, 660, 614, 664, 450, 595, 599, 644,
  9766. 608, 403, 616, 649, 600, 604, 606, 592, 623, 650, 612, 594, 653, 613, 674,
  9767. 673, 597, 657, 634, 615, 865, 712, 716, 721, 8255, 783, {f: 5, c: 741}, 0,
  9768. 0, 805, 812, 825, 796, {f: 2, c: 799}, 829, 809, 815, 734, 804, 816, 828,
  9769. 820, {f: 2, c: 797}, {f: 2, c: 792}, 810, {f: 2, c: 826}, 794, {s: 3},
  9770. {f: 2, c: 610}, 618, 628, 630, 632, 640, 655, 665, 668, 671, 688, 690, 695,
  9771. 704, {f: 2, c: 736}, {s: 6}, 8862, {s: 287}, 12348, 12543, 0,
  9772. {f: 2, c: 12310}, 9838, 9835, {f: 2, c: 10548}, 10687, 0, 12448, 0,
  9773. {f: 2, c: 10746}, {s: 13}, 962, {f: 10, c: 9461}, {f: 2, c: 9750}, 9649,
  9774. {f: 10, c: 12784}, 0, {f: 6, c: 12794}, {f: 15, c: 9150}, 0, 0, 10003, 0,
  9775. 9251, 9166, {f: 4, c: 9680}, {f: 2, c: 8263}, 0, 8273, 8258,
  9776. {f: 16, c: 12688}, {s: 13}, {f: 2, c: 9136}, {f: 12, c: 9842},
  9777. {f: 2, c: 12441}, 8413, {s: 450}, 20296, 20319, 20330, 20332, 20494, 20504,
  9778. 20545, 20722, 20688, 20742, 20739, 20789, 20821, 20823, 13493, 20938,
  9779. 20962, 21079, 21196, 21206, 21243, 21276, 21347, 21405, 21522, 21631,
  9780. 21640, 21840, 21889, 21933, 21966, 22075, 22174, 22185, 22195, 22391,
  9781. 22396, 135963, 22479, 22500, 22628, 22665, 136302, 22738, 22752, 34369,
  9782. 22923, 22930, 22979, 23059, 23143, 23159, 23172, 23236, 137405, 23421,
  9783. 23443, 23570, 64060, 136884, 23674, 23695, 23711, 23715, 23722, 23760,
  9784. 138804, 23821, 23879, 23937, 23972, 23975, 24011, 24158, 24313, 24320,
  9785. 24322, 24355, 24381, 24404, 24445, 24589, 24596, 24600, 24629, 24647,
  9786. 24733, 24788, 24797, 24875, 25020, 25017, 25122, 25178, 25199, 25302,
  9787. 25468, 25573, 25721, 25796, 25808, 25897, 26013, 26170, 26146, 26155,
  9788. 26160, 26163, 26184, 143812, {f: 2, c: 26231}, 26253, 26299, 26331, 26344,
  9789. 26439, 26497, 26515, 26520, 26523, 26620, 26653, 26787, 26890, 26953,
  9790. 144836, 26946, 26980, 27045, 27087, 15286, 15299, 27113, 27125, 145215,
  9791. 27195, 145251, 27284, 27301, 15375, 27419, 27436, 27495, 27561, 27565,
  9792. 27607, 27647, 27653, 27764, 27800, 27899, 27846, 27953, 27961, 27967,
  9793. 27992, 28052, 28074, 28123, 28125, 28228, 28254, 28337, 28353, 28432,
  9794. 28505, 28513, 28542, 28556, 28576, 28604, 28615, 28618, 28656, 28750,
  9795. 28789, 28836, 28900, 28971, 28958, 28974, 29009, 29032, 29061, 29063,
  9796. 29114, 29124, 29205, 15935, 29339, 149489, 29479, 29520, 29542, 29602,
  9797. 29739, 29766, 29794, 29805, 29862, 29865, 29897, 29951, 29975, 16242,
  9798. 30158, 30210, 30216, 30308, 30337, 30365, 30378, 30390, 30414, 30420,
  9799. 30438, 30449, 30474, 30489, {f: 2, c: 30541}, 30586, 30592, 30612, 30688,
  9800. 152718, 30787, 30830, 30896, 152846, 30893, 30976, 31004, 31022, 31028,
  9801. 31046, 31097, 31176, 153457, 31188, 31198, 31211, 31213, 31365, 154052,
  9802. 31438, 31485, 31506, 31533, 31547, 31599, 31745, 31795, 155041, 31853,
  9803. 31865, 31887, 31892, 31904, 31957, 32049, 32092, 32131, 32166, 32194,
  9804. 32296, 32663, 32731, 32821, 32823, 32970, 32992, 33011, 33120,
  9805. {f: 2, c: 33127}, 33133, 33211, 33226, 33239, 17499, 33376, 33396, 158463,
  9806. 33441, {f: 2, c: 33443}, 33449, 33471, 33493, 33533, 33536, 33570, 33581,
  9807. 33594, 33607, 33661, 33703, 33743, 33745, 33761, 33793, 33798, 33887,
  9808. 33904, 33907, 33925, 33950, 33978, 159296, 34098, 34078, 34095, 34148,
  9809. 34170, 34188, 34210, 34251, 34285, 34303, {f: 2, c: 34308}, 34320, 159988,
  9810. 34328, 34360, 34391, 34402, 17821, 34421, 34488, 34556, 34695, 17898,
  9811. 34826, 34832, 35022, 161412, 35122, 35129, 35136, 35220, 35318, 35399,
  9812. 35421, 35425, 35445, 35536, 35654, 35673, 35689, 35741, 35913, 35944,
  9813. 36271, 36305, 36311, 36387, 36413, 36475, 164471, 18500, 36602, 36638,
  9814. 36653, 36692, 164813, 36840, 36846, 36872, 36909, 37015, 37043, 37054,
  9815. {f: 2, c: 37060}, 37063, 37103, 37140, 37142, {f: 2, c: 37154}, 37167,
  9816. 37172, 37251, 37361, 37705, {f: 2, c: 37732}, 37795, 37855, 37892, 37939,
  9817. 37962, 37987, 38001, 38286, 38303, 38316, 38326, 38347, 38352, 38355,
  9818. 18864, 38366, 38565, 38639, 38734, 38805, 38830, 38842, 38849, 38857,
  9819. 38875, 38998, 39143, 39256, 39427, 39617, 39619, 39630, 39638, 39682,
  9820. 39688, 19479, 39725, 39774, 39782, 39812, 39818, 39838, 39886, 39909,
  9821. 39928, 39971, {f: 2, c: 40015}, 40037, {f: 2, c: 40221}, 40259, 40274,
  9822. 40330, 40342, 40384, 40364, 40380, 172432, 40423, 40455, 40606, 40623,
  9823. 40855, 131209, 19970, 19983, 19986, 20009, 20014, 20039, 131234, 20049,
  9824. 13318, 131236, 20073, 20125, 13356, 20156, 20163, 20168, 20203, 20186,
  9825. 20209, 20213, 20246, 20324, 20279, 20286, 20312, 131603, {f: 2, c: 20343},
  9826. 20354, 20357, 20454, 20402, 20421, 20427, 20434, 13418, 20466, 20499,
  9827. 20508, 20558, 20563, 20579, 20643, 20616, {f: 2, c: 20626}, 20629, 20650,
  9828. 131883, 20657, {f: 2, c: 20666}, 20676, 20679, 20723, 131969, 20686,
  9829. 131953, 20692, 20705, 13458, 132089, 20759, 132170, 20832, 132361, 20851,
  9830. 20867, 20875, 13500, 20888, 20899, 20909, 13511, 132566, 20979, 21010,
  9831. 21014, 132943, 21077, 21084, 21100, 21111, 21124, 21122, 133127, 21144,
  9832. 133178, 21156, {f: 2, c: 21178}, 21194, 21201, 133305, 21239, 21301, 21314,
  9833. 133500, 133533, 21351, 21370, 21412, 21428, 133843, 21431, 21440, 133917,
  9834. {f: 2, c: 13661}, 21461, 13667, 21492, 21540, 21544, 13678, 21571, 21602,
  9835. 21612, 21653, 21664, 21670, 21678, 21687, 21690, 21699, 134469, 21740,
  9836. 21743, 21745, 21747, {f: 2, c: 21760}, 21769, 21820, 21825, 13734, 21831,
  9837. 13736, 21860, 134625, 21885, 21890, 21905, 13765, 21970, 134805, 134765,
  9838. 21951, 21961, 21964, 21969, 21981, 13786, 21986, 134756, 21993, 22056,
  9839. 135007, 22023, 22032, 22064, 13812, 22077, 22080, 22087, 22110, 22112,
  9840. 22125, 13829, 22152, 22156, 22173, 22184, 22194, 22213, 22221, 22239,
  9841. 22248, {f: 2, c: 22262}, 135681, 135765, 22313, 135803, {f: 2, c: 22341},
  9842. 22349, 135796, 22376, 22383, {f: 3, c: 22387}, 22395, 135908, 135895,
  9843. 22426, {f: 2, c: 22429}, 22440, 22487, 135933, 22476, 135990, 136004,
  9844. 22494, 22512, 13898, 22520, 22523, 22525, 22532, 22558, 22567, 22585,
  9845. 136132, 22601, 22604, 22631, {f: 2, c: 22666}, 22669, {f: 2, c: 22671},
  9846. 22676, 22685, 22698, 22705, 136301, 22723, 22733, 22754, {f: 2, c: 22771},
  9847. {f: 2, c: 22789}, 22797, 22804, 136663, 13969, 22845, 13977, 22854, 13974,
  9848. 158761, 22879, 136775, {f: 2, c: 22901}, 22908, 22943, 22958, 22972, 22984,
  9849. 22989, 23006, 23015, 23022, 136966, 137026, 14031, 23053, 23063, 23079,
  9850. 23085, 23141, 23162, 23179, 23196, {f: 2, c: 23199}, 23202, 23217, 23221,
  9851. 23226, 23231, 23258, 23260, 23269, 23280, 23278, 23285, 23304, 23319,
  9852. 23348, 23372, 23378, 23400, 23407, 23425, 23428, 137667, 23446, 23468,
  9853. {f: 2, c: 14177}, 23502, 23510, 14188, 14187, 23537, 23549, 14197, 23555,
  9854. 23593, 138326, 23647, {f: 2, c: 23655}, 23664, 138541, 138565, 138616,
  9855. 138594, 23688, 23690, 14273, 138657, 138652, 23712, 23714, 23719, 138642,
  9856. 23725, 23733, 138679, 23753, 138720, 138803, 23814, 23824, 23851, 23837,
  9857. 23840, 23857, 23865, 14312, 23905, 23914, 14324, 23920, 139038, 14333,
  9858. 23944, 14336, 23959, 23984, 23988, 139126, 24017, 24023, 139258, 24036,
  9859. 24041, 14383, 14390, 14400, 24095, 24126, 24137, 14428, 24150, 14433,
  9860. {f: 2, c: 24173}, 139643, 24229, 24236, 24249, 24262, 24281, 140062, 24317,
  9861. 24328, 140205, 24350, 24391, 24419, 24434, 24446, 24463, 24482, 24519,
  9862. 24523, {f: 3, c: 24530}, 24546, {f: 2, c: 24558}, 24563, 14615, 24610,
  9863. 24612, 14618, 24652, 24725, 24744, 141043, 24753, 24766, 24776, 24793,
  9864. 24814, 24821, 24848, 24857, 24862, 24890, 14703, 24897, 24902, 24928,
  9865. 141403, {f: 2, c: 24978}, 24983, 24997, 25005, 141483, 25045, 25053, 25077,
  9866. 141711, 25123, 25170, 25185, 25188, 25211, 25197, 25203, 25241, 25301,
  9867. 142008, 25341, 25347, 25360, {f: 2, c: 142159}, 25394, 25397,
  9868. {f: 2, c: 25403}, 25409, 25412, 25422, 142150, 25433, 142365, 142246,
  9869. 25452, 25497, 142372, 25492, 25533, {f: 2, c: 25556}, 25568,
  9870. {f: 2, c: 25579}, 25586, 25630, 25637, 25641, 25647, 25690, 25693, 25715,
  9871. 25725, 25735, 25745, 25759, {f: 2, c: 25803}, 25813, 25815, 142817, 25828,
  9872. 25855, 14958, 25871, 25876, 14963, 25886, 25906, 25924, 25940, 25963,
  9873. 25978, 25988, 25994, 26034, 26037, 26040, 26047, 26057, 26068, 15062,
  9874. 26105, 26108, 26116, 26120, 26145, 26154, 26181, 26193, 26190, 15082,
  9875. 143811, 143861, 143798, 26218, {f: 2, c: 26220}, 26235, 26240, 26256,
  9876. 26258, 15118, 26285, 26289, 26293, 15130, 15132, 15063, 26369, 26386,
  9877. 144242, 26393, 144339, 144338, 26445, 26452, 26461, 144336, 144356, 144341,
  9878. 26484, 144346, 26514, 144351, 33635, 26640, 26563, 26568, 26578, 26587,
  9879. 26615, 144458, 144465, 144459, 26648, 26655, 26669, 144485, 26675, 26683,
  9880. 26686, 26693, 26697, 26700, 26709, 26711, 15223, 26731, 26734, 26748,
  9881. 26754, 26768, 26774, 15213, {f: 3, c: 26776}, 26780, {f: 2, c: 26794},
  9882. 26804, 26811, 26875, 144612, 144730, 26819, 26821, 26828, 26841,
  9883. {f: 2, c: 26852}, 26860, 26871, 26883, 26887, 15239, 144788, 15245, 26950,
  9884. 26985, 26988, 27002, 27026, 15268, 27030, 27056, 27066, 27068, 27072,
  9885. 27089, 144953, 144967, 144952, 27107, {f: 2, c: 27118}, 27123, 15309,
  9886. 27124, 27134, 27153, 27162, 27165, 145180, {f: 2, c: 27186}, 27199, 27209,
  9887. 27258, 27214, 27218, 27236, 145164, 27275, 15344, 27297, 145252, 27307,
  9888. 27325, 27334, 27348, 27344, 27357, 145407, 145383, {f: 3, c: 27377}, 27389,
  9889. 145444, 27403, {f: 3, c: 27407}, 145469, 27415, 15398, 27439, 27466, 27480,
  9890. 27500, 27509, [11934, 27514], 27521, 27547, 27566, 146072, 27581,
  9891. {f: 3, c: 27591}, 27610, {f: 2, c: 27622}, 27630, 27650, 27658, 27662,
  9892. 27702, 146559, 27725, 27739, 27757, 27780, 27785, 15555, 27796, 27799,
  9893. 27821, 27842, 15570, 27868, 27881, 27885, 146688, 27904, 27940,
  9894. {f: 2, c: 27942}, 27751, 27951, 27964, 27995, 28000, 28016,
  9895. {f: 2, c: 28032}, 28042, 28045, 28049, 28056, 146752, 146938, 146937,
  9896. 146899, 28075, 28078, 28084, 28098, 27956, 28104, 28110, 28127, 28150,
  9897. 28214, 28190, 15633, 28210, {f: 2, c: 28232}, {f: 2, c: 28235}, 28239,
  9898. {f: 2, c: 28243}, 28247, 28259, 15646, 28307, 28327, 28340, 28355, 28469,
  9899. 28395, 28409, 28411, 28426, 28428, 28440, 28453, 28470, 28476, 147326,
  9900. 28498, 28503, 28512, 28520, 28560, 28566, 28606, 28575, 28581, 28591,
  9901. 15716, {f: 2, c: 28616}, 28649, 147606, 28668, 28672, 28682, 28707, 147715,
  9902. 28730, 28739, 28743, 28747, 15770, 28773, 28777, 28782, 28790, 28806,
  9903. 28823, 147910, 28831, 28849, 147966, 28908, 28874, 28881, 28931, 28934,
  9904. 28936, 28940, 15808, 28975, 29008, 29011, 29022, 15828, 29078, 29056,
  9905. 29083, 29088, 29090, {f: 2, c: 29102}, 148412, 29145, 29148, 29191, 15877,
  9906. 29236, 29241, 29250, 29271, 29283, 149033, {f: 2, c: 29294}, 29304, 29311,
  9907. 29326, 149157, 29358, 29360, 29377, 15968, 29388, 15974, 15976, 29427,
  9908. 29434, 29447, 29458, {f: 2, c: 29464}, 16003, 29497, 29484, 29491, 29501,
  9909. 29522, 16020, 29547, 149654, {f: 2, c: 29550}, 29553, 29569, 29578, 29588,
  9910. 29592, 29596, 29605, 29625, 29631, 29637, 29643, 29665, 29671, 29689,
  9911. 29715, 29690, 29697, 29779, 29760, 29763, 29778, 29789, 29825, 29832,
  9912. 150093, 29842, 29847, 29849, 29857, 29861, 29866, 29881, 29883, 29882,
  9913. 29910, 29912, 29931, 150358, 29946, 150383, 29984, 29988, 29994, 16215,
  9914. 150550, {f: 2, c: 30013}, 30016, 30024, 30032, 30034, 30066, 30065, 30074,
  9915. {f: 2, c: 30077}, 30092, 16245, 30114, 16247, 30128, 30135,
  9916. {f: 2, c: 30143}, 30150, 30159, 30163, 30173, {f: 2, c: 30175}, 30183,
  9917. 30190, 30193, 30211, 30232, 30215, 30223, 16302, 151054, 30227,
  9918. {f: 2, c: 30235}, 151095, 30245, 30248, 30268, 30259, 151146, 16329, 30273,
  9919. 151179, 30281, 30293, 16343, 30318, 30357, 30369, 30368, {f: 2, c: 30375},
  9920. 30383, 151626, 30409, 151637, 30440, 151842, 30487, 30490, 30509, 30517,
  9921. 151977, 16441, 152037, 152013, 30552, 152094, 30588, 152140, 16472, 30618,
  9922. 30623, 30626, 30628, {f: 2, c: 30686}, 30692, 30698, 30700, 30715, 152622,
  9923. 30725, 30729, 30733, 30745, 30764, 30791, 30826, 152793, 30858, 30868,
  9924. 30884, 30877, 30879, 30907, 30933, 30950, {f: 2, c: 30969}, 30974, 152999,
  9925. 30992, 31003, 31013, 31050, 31064, 16645, 31079, 31090, 31125, 31137,
  9926. 31145, 31156, 31170, 31175, {f: 2, c: 31180}, 31190, 16712, 153513, 153524,
  9927. 16719, 31242, 31253, 31259, 16739, 31288, 31303, 31318, 31321, 31324,
  9928. 31327, 31335, 31338, 31349, 31362, 31370, 31376, 31404, 154068, 16820,
  9929. 31417, 31422, 16831, 31436, 31464, 31476, 154340, 154339, 154353, 31549,
  9930. 31530, {f: 2, c: 31534}, 16870, 16883, 31615, 31553, 16878, 31573, 31609,
  9931. 31588, 31590, 31603, 154546, 16903, 31632, 31643, 16910, 31669, 31676,
  9932. 31685, 31690, 154699, 154724, 31700, 31702, 31706, 31722, 31728, 31747,
  9933. 31758, 31813, 31818, 31831, 31838, 31841, 31849, 31855, 155182, 155222,
  9934. 155237, 31910, 155234, {f: 2, c: 31926}, 155352, 31940, 155330, 31949,
  9935. 155368, 155427, 31974, 155484, 31989, 32003, 17094, 32018, 32030, 155616,
  9936. 155604, {f: 2, c: 32061}, 32064, 32071, 155660, 155643, 17110, 32090,
  9937. 32106, 32112, 17117, 32127, 155671, 32136, 32151, 155744, 32157, 32167,
  9938. 32170, 32182, 32192, 32215, 32217, 32230, 17154, 155885, 64088, 32272,
  9939. 32279, 32285, 32295, 32300, 32325, 32373, 32382, {f: 2, c: 32390}, 17195,
  9940. 32410, 17219, 32572, 32571, 32574, 32579, 13505, 156272, 156294,
  9941. {f: 2, c: 32611}, 32621, {f: 2, c: 32637}, 32656, 20859, 146702, 32662,
  9942. 32668, 32685, 156674, 32707, 32719, 32739, 32754, 32778, 32776, 32790,
  9943. 32812, 32816, 32835, 32870, 32891, 32921, 32924, 32932, 32935, 32952,
  9944. 157310, 32965, 32981, 32998, 33037, 33013, 33019, 17390, 33077, 33054,
  9945. 17392, 33060, 33063, 33068, 157469, 33085, 17416, 33129, 17431, 17436,
  9946. 33157, 17442, 33176, 33202, 33217, 33219, 33238, 33243, 157917, 33252,
  9947. 157930, 33260, 33277, 33279, 158063, 33284, 158173, 33305, 33314, 158238,
  9948. 33340, 33353, 33349, 158296, 17526, 17530, 33367, 158348, 33372, 33379,
  9949. 158391, 17553, 33405, 33407, 33411, 33418, 33427, {f: 2, c: 33447}, 33458,
  9950. 33460, 33466, 33468, 33506, 33512, 33527, {f: 2, c: 33543}, 33548, 33620,
  9951. 33563, 33565, 33584, 33596, 33604, 33623, 17598, 17620, 17587,
  9952. {f: 2, c: 33684}, 33691, 33693, 33737, 33744, 33748, 33757, 33765, 33785,
  9953. 33813, 158835, 33815, 33849, 33871, {f: 2, c: 33873}, {f: 2, c: 33881},
  9954. 33884, 158941, 33893, 33912, 33916, 33921, 17677, 33943, 33958, 33982,
  9955. 17672, {f: 2, c: 33998}, 34003, 159333, 34023, 34026, 34031, 34033, 34042,
  9956. 34075, {f: 2, c: 34084}, 34091, 34127, 34159, 17731, 34129,
  9957. {f: 2, c: 34145}, 159636, 34171, 34173, 34175, 34177, 34182, 34195, 34205,
  9958. 34207, 159736, {f: 2, c: 159734}, 34236, 34247, 34250, {f: 2, c: 34264},
  9959. 34271, 34273, 34278, 34294, 34304, 34321, 34334, 34337, 34340, 34343,
  9960. 160013, 34361, 34364, 160057, 34368, 34387, 34390, 34423, 34439, 34441,
  9961. {f: 2, c: 34460}, 34481, 34483, 34497, 34499, 34513, 34517, 34519, 34531,
  9962. 34534, 17848, 34565, 34567, 34574, 34576, 34591, 34593, 34595, 34609,
  9963. 34618, 34624, 34627, 34641, 34648, {f: 2, c: 34660}, 34674, 34684, 160731,
  9964. 160730, 34727, 34697, 34699, 34707, 34720, 160766, 17893, 34750, 160784,
  9965. 34753, 34766, 34783, 160841, 34787, {f: 2, c: 34789}, 34794, 34835, 34856,
  9966. 34862, 34866, 34876, 17935, 34890, 34904, 161301, 161300, 34921, 161329,
  9967. 34927, 34976, 35004, 35008, 161427, 35025, 35027, 17985, 35073, 161550,
  9968. 35127, 161571, 35138, 35141, 35145, 161618, 35170, 35209, 35216, 35231,
  9969. 35248, 35255, 35288, 35307, 18081, 35315, 35325, 35327, 18095, 35345,
  9970. 35348, 162181, 35361, 35381, 35390, 35397, 35405, 35416, 35502, 35472,
  9971. 35511, 35543, 35580, 162436, 35594, 35589, 35597, 35612, 35629, 18188,
  9972. 35665, 35678, 35702, 35713, 35723, {f: 2, c: 35732}, 35897, 162739, 35901,
  9973. 162750, 162759, 35909, 35919, 35927, 35945, 35949, 163000, 35987, 35986,
  9974. 35993, 18276, 35995, 36054, 36053, 163232, 36081, 163344, 36105, 36110,
  9975. 36296, 36313, 36364, 18429, 36349, 36358, 163978, 36372, 36374,
  9976. {f: 2, c: 36385}, 36391, 164027, 18454, 36406, 36409, 36436, 36450, 36461,
  9977. 36463, 36504, 36510, 36533, 36539, 164482, 18510, 164595, 36608, 36616,
  9978. 36651, 36672, 36682, 36696, 164876, 36772, 36788, 164949, 36801, 36806,
  9979. 64036, 36810, 36813, 36819, 36821, 36849, 36853, 36859, 36876, 36919,
  9980. 165227, 36931, 36957, {f: 2, c: 165320}, 36997, 37004, 37008, 37025, 18613,
  9981. 37040, 37046, 37059, 37064, 165591, 37084, 37087, 165626, 37110, 37106,
  9982. 37120, 37099, {f: 2, c: 37118}, 37124, 37126, 37144, 37150, 37175, 37177,
  9983. {f: 2, c: 37190}, 37207, 37209, 37236, 37241, 37253, 37299, 37302,
  9984. {f: 2, c: 37315}, 166217, 166214, 37356, 37377, {f: 2, c: 37398}, 166251,
  9985. 37442, 37450, 37462, 37473, 37477, 37480, 166280, {f: 2, c: 37500}, 37503,
  9986. 37513, 37517, 37527, 37529, 37535, 37547, {f: 2, c: 166330}, 37554,
  9987. {f: 2, c: 37567}, 37574, 37582, 37605, 37649, 166430, 166441, 37623, 37673,
  9988. 166513, 166467, 37713, 37722, 37739, 37745, 37747, 37793, 166553, 166605,
  9989. 37768, 37771, 37775, 37790, 37877, 166628, 166621, 37873, 37831, 37852,
  9990. 37863, 37897, {f: 2, c: 37910}, 37883, 37938, 37947, 166849, 166895, 37997,
  9991. 37999, 38265, 38278, {f: 2, c: 38284}, 167184, 167281, 38344, 167419,
  9992. 167455, 38444, {f: 2, c: 38451}, 167478, 38460, 38497, 167561, 38530,
  9993. 167659, 38554, 167730, 18919, 38579, 38586, 38589, 18938, 167928, 38616,
  9994. 38618, 38621, 18948, 38676, 38691, 18985, 38710, 38721, 38727, 38743,
  9995. 38747, 38762, 168608, 168625, 38806, 38814, {f: 2, c: 38833}, 38846, 38860,
  9996. 38865, 38868, 38872, 38881, 38897, 38916, 38925, 38932, 38934, 19132,
  9997. 169104, {f: 2, c: 38962}, 38949, 38983, 39014, 39083, 39085, 39088, 169423,
  9998. 39095, {f: 2, c: 39099}, 39106, 39111, 39115, 39137, 39139, 39146,
  9999. {f: 2, c: 39152}, 39155, 39176, 19259, 169712, {f: 2, c: 39190}, 169753,
  10000. {f: 3, c: 39194}, 169808, 39217, {f: 3, c: 39226}, 39233, 39238, 39246,
  10001. 39264, 39331, 39334, 39357, 39359, 39363, 39380, 39385, 39390, 170182,
  10002. 39408, 39417, 39420, 39434, 39441, 39450, 39456, 39473, 39492, 39500,
  10003. 39512, 19394, 39599, 19402, 39607, 19410, 39609, 170610, 39622, 39632,
  10004. 39634, 39637, 39648, 39653, 39657, 39692, 39696, 39698, 39702, 39708,
  10005. 39723, 39741, 19488, 39755, 39779, 39781, {f: 2, c: 39787},
  10006. {f: 2, c: 39798}, 39846, 39852, 171483, 39858, 39864, 39870, 39923, 39896,
  10007. 39901, 39914, 39919, 39918, 171541, 171658, 171593, 39958,
  10008. {f: 3, c: 39960}, 39965, 39970, 39977, 171716, 39985, 39991, 40005, 40028,
  10009. 171753, {f: 2, c: 40009}, 171739, 40020, 40024, 40027, 40029, 40031,
  10010. {f: 3, c: 40041}, {f: 2, c: 40045}, 40050, 40053, 40058, 40166, 40178,
  10011. 40203, [171982, 171991], 40209, {f: 2, c: 40215}, 172079, 19652, 172058,
  10012. 40242, 19665, 40266, 40287, 40290, 172281, 172162, 40307, {f: 2, c: 40310},
  10013. 40324, 40345, 40353, 40383, 40373, 40377, 40381, 40393, 40410, 40416,
  10014. 40419, 19719, 40458, 40450, 40461, 40476, 40571, 139800, 40576, 40581,
  10015. 40603, 172940, 40637, 173111, 40671, 40703, 40706, 19831, 40707, 40762,
  10016. 40765, 40774, 40787, 40789, 40792, 173553, 40797, 173570, 40809, 40813,
  10017. 40816, 173746, 11948, 13844, 14509, 15820, 16348, 17854, 17936, 19326,
  10018. 19512, 19681, 19980, {f: 2, c: 20003}, 20089, 20211, 20236, 20249, 20267,
  10019. 20270, 20273, 20356, 20382, 20407, 20484, 20492, 20556, 20575, 20578,
  10020. 20599, 20622, 20638, 20642, 20675, 20712, 20721, 20734, 20743,
  10021. {f: 3, c: 20748}, 20787, 20792, 20852, 20868, 20920, 20922, 20936, 20943,
  10022. 20945, {f: 2, c: 20947}, 20952, 20959, 20997, 21030, 21032, 21035,
  10023. {f: 2, c: 21041}, 21045, 21052, 21082, 21088, 21102, {f: 2, c: 21112},
  10024. 21130, 21132, 21217, 21225, 21233, 21251, 21265, 21279, 21293, 21298,
  10025. 21309, 21349, 21357, 21369, 21374, 21396, 21401, 21418, 21423, 21434,
  10026. 21441, {f: 2, c: 21444}, 21472, 21523, 21546, 21553, {f: 2, c: 21556},
  10027. 21580, 21671, 21674, 21681, 21691, 21710, 21738, 21756, 21765, 21768,
  10028. 21781, 21799, 21802, 21814, 21841, 21862, 21903, 21906, 21908, 21924,
  10029. 21938, 21955, 21958, 21971, 21979, 21996, 21998, 22001, 22006, 22008,
  10030. 22021, 22029, {f: 2, c: 22033}, 22060, 22069, 22073, 22093, 22100, 22149,
  10031. 22175, 22182, 22199, 22220, 22223, 22233, 22241, 22251, 22253, 22257,
  10032. 22279, 22284, {f: 2, c: 22298}, 22301, 22316, 22318, {f: 2, c: 22333},
  10033. 22367, 22379, 22381, 22394, 22403, 22423, 22446, 22485, 22503, 22541,
  10034. 22566, 22605, 22607, 22623, 22637, 22655, 22657, 22680, 22716, 22815,
  10035. 22819, 22873, 22905, 22935, 22959, 22963, 23007, 23025, 23032, 23218,
  10036. 23224, 23274, 23286, 23323, 23325, 23329, 23352, 23479, 23511, 23520,
  10037. 23583, 23594, 23596, 23606, 23641, 23644, 23661, 23773, 23809, 23860,
  10038. 23869, 23897, 23934, 23939, 24007, 24057, 24104, 24114, 24117, 24155,
  10039. 24168, 24170, 24183, 24192, 24203, 24243, 24253, 24273, {f: 2, c: 24276},
  10040. 24397, 24492, 24554, 24583, 24649, 24660, 24679, 24763, 24772, 24829,
  10041. 24842, 24854, 24874, 24886, 24926, 24932, 24955, 24957, 24959, 24989,
  10042. 25016, 25052, 25058, 25061, 25064, 25092, 25095, 25137, 25145, 25149,
  10043. 25210, 25232, 25256, 25306, 25332, 25366, 25386, 25398, 25414, 25419,
  10044. 25427, 25457, 25461, 25471, 25474, 25482, {f: 2, c: 25518}, 25578,
  10045. {f: 2, c: 25592}, 25618, 25624, 25632, 25636, 25642, 25653, 25661, 25663,
  10046. 25682, 25695, 25716, 25744, {f: 2, c: 25752}, 25772, 25779, 25837, 25840,
  10047. 25883, 25887, 25902, 25929, 25952, 26002, 26005, 26036, 26046, 26056,
  10048. 26062, 26064, 26079, 26238, {f: 2, c: 26251}, 26291, 26304, 26319, 26405,
  10049. 26421, 26453, 26496, 26511, 26513, 26532, 26545, 26549, 26558, 26664,
  10050. 26758, 26859, 26869, 26903, 26931, 26936, 26971, 26981, 27048, 27051,
  10051. 27055, 27109, 27121, 27210, 27221, 27239, 27249, 27311, {f: 2, c: 27336},
  10052. 27395, 27451, 27455, {f: 2, c: 27517}, 27568, 27639, 27641, 27652, 27657,
  10053. 27661, 27692, 27722, 27730, 27732, 27769, 27820, 27828, 27858, 28001,
  10054. 28028, 28089, 28144, 28229, 28275, 28283, 28285, 28297, 28348,
  10055. {f: 2, c: 28378}, 28454, 28457, 28464, 28551, 28573, 28590, 28599, 28685,
  10056. 28704, 28745, 28824, 28848, {f: 2, c: 28885}, 28997, 29106, 29172, 29207,
  10057. 29215, 29251, {f: 2, c: 29263}, 29274, 29280, 29288, 29303, 29316, 29385,
  10058. 29413, 29428, 29442, 29451, 29470, 29474, {f: 2, c: 29498}, 29517, 29528,
  10059. 29543, 29810, 29871, 29919, 29924, 29940, 29947, 29974, 29985, 30015,
  10060. 30046, 30105, 30116, 30145, 30148, 30156, 30167, 30172, 30177, 30191,
  10061. 30212, 30220, 30237, 30258, 30264, 30277, 30282, 30303, 30381, 30397,
  10062. 30425, 30443, 30448, 30457, 30464, 30478, 30498, 30504, 30511, 30521,
  10063. 30526, 30533, 30538, 30543, 30558, 30564, 30567, 30572, 30596,
  10064. {f: 2, c: 30604}, 30614, 30631, 30639, 30647, 30654, 30665, 30673, 30681,
  10065. 30705, 30775, 30812, 30846, 30872, 30881, 30897, 30899, 30921, 30931,
  10066. 30988, 31007, {f: 2, c: 31015}, 31039, 31042, 31060, 31083, 31100, 31147,
  10067. 31172, 31210, 31234, 31244, 31280, 31290, 31300, 31360, 31366, 31380,
  10068. 31413, 31421, 31486, 31531, 31607, 31648, 31660, 31664, 31720, 31730,
  10069. 31736, 31740, 31742, 31753, 31784, 31791, 31810, {f: 2, c: 31826},
  10070. {f: 3, c: 31835}, 31858, 31869, 31879, 31902, 31930, 31943, 31955, 31962,
  10071. 32060, 32077, 32130, 32133, 32141, 32145, 32158, 32179, 32185, 32208,
  10072. 32229, {f: 2, c: 32245}, 32303, 32310, 32324, 32367, 32376, 32385, 32573,
  10073. 32603, 32605, 32613, 32625, {f: 2, c: 32639}, 32651, 32674,
  10074. {f: 3, c: 32765}, 32775, 32781, 32798, 32825, 32904, 32910, 32975, 32980,
  10075. 33005, 33008, 33015, 33018, 33022, 33027, 33047, 33072, 33111, 33135,
  10076. 33139, 33163, 33168, 33179, 33182, 33227, 33237, {f: 2, c: 33245}, 33249,
  10077. 33263, 33270, 33280, 33291, {f: 2, c: 33299}, 33306, 33338, 33348, 33389,
  10078. 33412, 33417, 33425, 33450, 33456, 33488, 33514, 33519, 33526, 33622,
  10079. 33656, 33784, 33788, 33880, 33939, 33969, 33981, 34043, 34118, 34134,
  10080. 34141, 34181, 34200, 34370, 34374, 34496, 34580, 34594, 34606, 34617,
  10081. 34653, 34683, 34700, 34702, {f: 2, c: 34711}, 34718, 34723, 34734, 34751,
  10082. 34761, 34778, 34840, 34843, 34861, 34874, 34885, 34891, 34894, 34901,
  10083. 34906, 34926, {f: 3, c: 34970}, 35021, 35040, 35055, {f: 2, c: 35086},
  10084. 35110, 35125, 35162, 35164, 35179, 35184, 35196, 35237, 35253, 35260,
  10085. 35285, 35401, 35415, 35431, 35454, 35462, 35478, 35510, 35529, 35537,
  10086. 35549, 35564, 35573, 35590, 35599, 35601, 35653, 35666, 35693, 35704,
  10087. 35708, 35710, 35717, 35743, 35915, 35923, 35963, 36026, 36037, 36041,
  10088. 36050, 36076, 36085, 36087, 36097, 36099, 36119, 36124, 36206, 36241,
  10089. 36255, 36267, 36274, 36309, 36327, {f: 2, c: 36337}, 36340, 36353, 36363,
  10090. 36390, 36401, {f: 2, c: 36416}, 36429, 36431, 36444, 36449, 36457, 36465,
  10091. 36469, 36471, 36489, 36496, 36501, 36506, 36519, 36521, 36525, 36584,
  10092. 36592, 36615, 36632, 36645, 36647, 36652, 36661, 36666, 36675, 36679,
  10093. 36689, 36693, {f: 3, c: 36768}, 36773, 36868, 36891, 36911, 36940, 36955,
  10094. 36976, 36980, 36985, 37003, 37016, 37024, 37042, 37053, 37065, 37104,
  10095. 37125, 37157, 37210, 37223, 37242, 37258, 37265, 37269, 37296, 37307,
  10096. 37309, 37314, 37317, 37376, 37385, 37411, 37494, 37518, 37551,
  10097. {f: 2, c: 37563}, 37569, 37571, 37573, 37576, 37652, 37683, 37686, 37720,
  10098. 37759, 37762, 37770, 37819, 37836, 37862, 37881, 37890, {f: 2, c: 37901},
  10099. 37934, 37964, 38280, 38305, 38335, 38342, 38345, {f: 2, c: 38353}, 38368,
  10100. 38372, 38374, 38436, 38449, 38456, 38461, 38484, 38516, 38523, 38527,
  10101. 38529, 38531, 38537, 38550, 38574, 38659, 38683, {f: 2, c: 38689}, 38696,
  10102. 38705, 38759, 38774, 38781, 38783, 38809, 38815, 38828, 38841, 38861,
  10103. 38880, 38895, 38919, 38950, 38958, {f: 2, c: 39010}, 39092, 39109, 39170,
  10104. 39185, 39189, 39221, 39240, 39252, 39262, 39393, 39436, 39440, 39459,
  10105. 39489, 39505, {f: 2, c: 39613}, 39681, 39689, 39691, {f: 2, c: 39693},
  10106. 39705, 39733, 39752, 39765, 39784, 39808, 39814, 39824, 39837, 39856,
  10107. 39871, 39880, 39935, 39938, 39964, 39989, 40004, 40022, 40033, 40040,
  10108. 40240, 40253, 40298, 40315, 40421, 40425, 40435, 40570, {f: 3, c: 40578},
  10109. 40624, 40676, 40688, 40690, 40713, 40719, 40724, 40731, 40738, 40742,
  10110. {f: 2, c: 40746}, 40756, 40794, 40815, 40862, 40869, 131317, 151044,
  10111. 151538, 163187, 194581, 194630, 194713, 194726, 194789, 195038, 13790,
  10112. {s: 4}, 172722, 0, 0, 131416, {s: 4}, 132529, 0, 0, 132844, {s: 6}, 134488,
  10113. {s: 21}, 154060, {s: 9}, 14756, 14776, 142914, 0, 0, 14940, 0, 0, 143339,
  10114. 0, 0, 162228, 0, 15044, 15051, {s: 5}, 14981, {s: 8}, 15347, 27384, {s: 5},
  10115. 15665, {s: 9}, 147531, 0, 15936, 14497, {s: 34}, 158878, {s: 12}, 18207,
  10116. 162876, {s: 4}, 18462, {s: 71}, 39709, 39724, 20482, 20958, 21255, 23532,
  10117. 63784, 26142, 63785, 28746, 64021, 21857, 27706, 31328, 156492, 34819,
  10118. 38315, 38741, 171581, 173594],
  10119. 'Adobe-Korea1': [{f: 95, c: 32}, 8361, 8208, 169, 0, 0, [12288, 12644],
  10120. {f: 2, c: 12289}, 12539, 8229, [8230, 8943], 168, 12291, {f: 2, c: 8211},
  10121. 8214, 65340, 65374, {f: 2, c: 8216}, {f: 2, c: 8220}, {f: 2, c: 12308},
  10122. {f: 10, c: 12296}, 177, 215, 247, 8800, {f: 2, c: 8804}, 8734, 8756, 176,
  10123. {f: 2, c: 8242}, 8451, 8491, {f: 2, c: 65504}, 65509, 9794, 9792, 8736,
  10124. 8869, 8978, 8706, 8711, 8801, 8786, 167, 8251, 9734, 9733, 9675, 9679,
  10125. 9678, 9671, 9670, 9633, 9632, 9651, 9650, 9661, 9660, 8594,
  10126. {f: 2, c: 8592}, {f: 2, c: 8595}, 12307, 171, 187, 8730, 8765, 8733, 8757,
  10127. {f: 2, c: 8747}, 8712, 8715, {f: 2, c: 8838}, {f: 2, c: 8834}, 8746, 8745,
  10128. {f: 2, c: 8743}, 65506, 8658, 8660, 8704, 8707, 180, 732, 711, 728, 733,
  10129. 730, 729, 184, 731, 161, 191, 8758, 8750, 8721, 8719, 164, 8457, 8240,
  10130. 9665, 9664, 9655, 9654, 9828, {f: 2, c: 9824}, 9829, 9831, 9827, 9673,
  10131. 9672, 9635, {f: 2, c: 9680}, 9618, {f: 2, c: 9636}, 9640, 9639, 9638, 9641,
  10132. 9832, 9743, 9742, 9756, 9758, 182, {f: 2, c: 8224}, 8597, 8599, 8601, 8598,
  10133. 8600, 9837, {f: 2, c: 9833}, 9836, 12927, 12828, 8470, 13255, 8482, 13250,
  10134. 13272, 8481, {f: 59, c: 65281}, 65510, {f: 33, c: 65341}, 65507,
  10135. {f: 51, c: 12593}, {f: 42, c: 12645}, {f: 10, c: 8560}, {f: 10, c: 8544},
  10136. {f: 17, c: 913}, {f: 7, c: 931}, {f: 17, c: 945}, {f: 7, c: 963}, 9472,
  10137. 9474, 9484, 9488, 9496, 9492, 9500, 9516, 9508, 9524, 9532, 9473, 9475,
  10138. 9487, 9491, 9499, 9495, 9507, 9523, 9515, 9531, 9547, 9504, 9519, 9512,
  10139. 9527, 9535, 9501, 9520, 9509, 9528, 9538, 9490, 9489, 9498, 9497, 9494,
  10140. 9493, 9486, 9485, {f: 2, c: 9502}, {f: 2, c: 9505}, {f: 2, c: 9510},
  10141. {f: 2, c: 9513}, {f: 2, c: 9517}, {f: 2, c: 9521}, {f: 2, c: 9525},
  10142. {f: 2, c: 9529}, {f: 2, c: 9533}, {f: 2, c: 9536}, {f: 8, c: 9539},
  10143. {f: 3, c: 13205}, 8467, 13208, 13252, {f: 4, c: 13219}, {f: 10, c: 13209},
  10144. 13258, {f: 3, c: 13197}, 13263, {f: 2, c: 13192}, 13256, {f: 2, c: 13223},
  10145. {f: 10, c: 13232}, {f: 5, c: 13184}, {f: 6, c: 13242}, {f: 5, c: 13200},
  10146. 8486, {f: 2, c: 13248}, {f: 3, c: 13194}, 13270, 13253, {f: 3, c: 13229},
  10147. 13275, {f: 4, c: 13225}, 13277, 13264, 13267, 13251, 13257, 13276, 13254,
  10148. 198, 208, 170, 294, 306, 319, 321, 216, 338, 186, 222, 358, 330,
  10149. {f: 28, c: 12896}, {f: 26, c: 9424}, {f: 15, c: 9312}, 189,
  10150. {f: 2, c: 8531}, 188, 190, {f: 4, c: 8539}, 230, 273, 240, 295, 305, 307,
  10151. 312, 320, 322, 248, 339, 223, 254, 359, 331, 329, {f: 28, c: 12800},
  10152. {f: 26, c: 9372}, {f: 15, c: 9332}, 185, {f: 2, c: 178}, 8308, 8319,
  10153. {f: 4, c: 8321}, {f: 83, c: 12353}, {f: 86, c: 12449}, {f: 6, c: 1040},
  10154. 1025, {f: 32, c: 1046}, 1105, {f: 26, c: 1078}, {f: 2, c: 44032}, 44036,
  10155. {f: 4, c: 44039}, {f: 8, c: 44048}, {f: 5, c: 44057}, 44064, 44068,
  10156. {f: 2, c: 44076}, {f: 3, c: 44079}, {f: 2, c: 44088}, 44092, 44096, 44107,
  10157. 44109, 44116, 44120, 44124, {f: 2, c: 44144}, 44148, {f: 2, c: 44151},
  10158. 44154, {f: 2, c: 44160}, {f: 4, c: 44163}, {f: 4, c: 44169}, 44176, 44180,
  10159. {f: 2, c: 44188}, {f: 3, c: 44191}, {f: 3, c: 44200}, 44204,
  10160. {f: 2, c: 44207}, {f: 2, c: 44216}, {f: 3, c: 44219}, 44225, 44228, 44232,
  10161. 44236, 44245, 44247, {f: 2, c: 44256}, 44260, {f: 2, c: 44263}, 44266,
  10162. 44268, {f: 3, c: 44271}, 44275, {f: 2, c: 44277}, {f: 2, c: 44284}, 44288,
  10163. 44292, 44294, {f: 2, c: 44300}, 44303, 44305, 44312, 44316, 44320, 44329,
  10164. {f: 2, c: 44332}, {f: 2, c: 44340}, 44344, 44348, {f: 2, c: 44356}, 44359,
  10165. 44361, 44368, 44372, 44376, 44385, 44387, {f: 2, c: 44396}, 44400,
  10166. {f: 4, c: 44403}, {f: 3, c: 44411}, 44415, {f: 2, c: 44417},
  10167. {f: 2, c: 44424}, 44428, 44432, {f: 2, c: 44444}, 44452, 44471,
  10168. {f: 2, c: 44480}, 44484, 44488, {f: 2, c: 44496}, 44499, 44508, 44512,
  10169. 44516, {f: 2, c: 44536}, 44540, {f: 3, c: 44543}, {f: 2, c: 44552}, 44555,
  10170. 44557, 44564, {f: 2, c: 44592}, 44596, {f: 2, c: 44599}, 44602,
  10171. {f: 2, c: 44608}, 44611, {f: 2, c: 44613}, 44618, {f: 3, c: 44620}, 44624,
  10172. 44628, 44630, {f: 2, c: 44636}, {f: 3, c: 44639}, 44645, {f: 2, c: 44648},
  10173. 44652, 44656, {f: 2, c: 44664}, {f: 3, c: 44667}, {f: 2, c: 44676}, 44684,
  10174. {f: 3, c: 44732}, 44736, 44740, {f: 2, c: 44748}, {f: 3, c: 44751},
  10175. {f: 2, c: 44760}, 44764, 44776, 44779, 44781, 44788, 44792, 44796,
  10176. {f: 2, c: 44807}, 44813, 44816, {f: 2, c: 44844}, 44848, 44850, 44852,
  10177. {f: 2, c: 44860}, 44863, {f: 3, c: 44865}, {f: 2, c: 44872}, 44880,
  10178. {f: 2, c: 44892}, {f: 2, c: 44900}, 44921, 44928, 44932, 44936,
  10179. {f: 2, c: 44944}, 44949, 44956, {f: 2, c: 44984}, 44988, 44992,
  10180. {f: 3, c: 44999}, 45003, {f: 2, c: 45005}, 45012, 45020, {f: 2, c: 45032},
  10181. {f: 2, c: 45040}, 45044, 45048, {f: 2, c: 45056}, 45060, 45068, 45072,
  10182. 45076, {f: 2, c: 45084}, 45096, {f: 2, c: 45124}, 45128, 45130, 45132,
  10183. 45134, {f: 3, c: 45139}, 45143, 45145, 45149, {f: 2, c: 45180}, 45184,
  10184. 45188, {f: 2, c: 45196}, 45199, 45201, {f: 3, c: 45208}, 45212,
  10185. {f: 4, c: 45215}, {f: 2, c: 45224}, {f: 5, c: 45227}, 45233,
  10186. {f: 3, c: 45235}, 45240, 45244, {f: 2, c: 45252}, {f: 3, c: 45255},
  10187. {f: 2, c: 45264}, 45268, 45272, 45280, 45285, {f: 2, c: 45320},
  10188. {f: 2, c: 45323}, 45328, {f: 2, c: 45330}, {f: 2, c: 45336},
  10189. {f: 3, c: 45339}, {f: 3, c: 45347}, 45352, 45356, {f: 2, c: 45364},
  10190. {f: 3, c: 45367}, {f: 2, c: 45376}, 45380, 45384, {f: 2, c: 45392},
  10191. {f: 2, c: 45396}, 45400, 45404, 45408, {f: 2, c: 45432}, 45436, 45440,
  10192. 45442, {f: 2, c: 45448}, 45451, 45453, {f: 3, c: 45458}, 45464, 45468,
  10193. 45480, 45516, 45520, 45524, {f: 2, c: 45532}, 45535, {f: 2, c: 45544},
  10194. 45548, 45552, 45561, 45563, 45565, {f: 2, c: 45572}, 45576,
  10195. {f: 2, c: 45579}, {f: 2, c: 45588}, 45591, 45593, 45600, 45620, 45628,
  10196. 45656, 45660, 45664, {f: 2, c: 45672}, {f: 2, c: 45684}, 45692,
  10197. {f: 2, c: 45700}, 45705, {f: 2, c: 45712}, 45716, {f: 3, c: 45720},
  10198. {f: 2, c: 45728}, 45731, {f: 2, c: 45733}, 45738, 45740, 45744, 45748,
  10199. {f: 2, c: 45768}, 45772, 45776, 45778, {f: 2, c: 45784}, 45787, 45789,
  10200. 45794, {f: 3, c: 45796}, 45800, {f: 5, c: 45803}, {f: 3, c: 45811},
  10201. {f: 5, c: 45815}, {f: 3, c: 45823}, 45828, 45832, {f: 2, c: 45840},
  10202. {f: 3, c: 45843}, 45852, {f: 3, c: 45908}, 45912, {f: 2, c: 45915},
  10203. {f: 2, c: 45918}, {f: 2, c: 45924}, 45927, 45929, 45931, 45934,
  10204. {f: 2, c: 45936}, 45940, 45944, {f: 2, c: 45952}, {f: 3, c: 45955}, 45964,
  10205. 45968, 45972, {f: 2, c: 45984}, 45992, 45996, {f: 2, c: 46020}, 46024,
  10206. {f: 2, c: 46027}, 46030, 46032, {f: 2, c: 46036}, 46039, 46041, 46043,
  10207. 46045, 46048, 46052, 46056, 46076, 46096, 46104, 46108, 46112,
  10208. {f: 2, c: 46120}, 46123, 46132, {f: 2, c: 46160}, 46164, 46168,
  10209. {f: 2, c: 46176}, 46179, 46181, 46188, 46208, 46216, 46237, 46244, 46248,
  10210. 46252, 46261, 46263, 46265, 46272, 46276, 46280, 46288, 46293,
  10211. {f: 2, c: 46300}, 46304, {f: 2, c: 46307}, 46310, {f: 2, c: 46316}, 46319,
  10212. 46321, 46328, {f: 2, c: 46356}, 46360, {f: 2, c: 46363}, {f: 2, c: 46372},
  10213. {f: 4, c: 46375}, {f: 2, c: 46384}, 46388, 46392, {f: 2, c: 46400},
  10214. {f: 3, c: 46403}, {f: 3, c: 46411}, 46416, 46420, {f: 2, c: 46428},
  10215. {f: 3, c: 46431}, {f: 2, c: 46496}, 46500, 46504, {f: 2, c: 46506},
  10216. {f: 2, c: 46512}, {f: 3, c: 46515}, {f: 3, c: 46523}, 46528, 46532,
  10217. {f: 2, c: 46540}, {f: 3, c: 46543}, 46552, 46572, {f: 2, c: 46608}, 46612,
  10218. 46616, 46629, 46636, 46644, 46664, 46692, 46696, {f: 2, c: 46748}, 46752,
  10219. 46756, {f: 2, c: 46763}, 46769, 46804, 46832, 46836, 46840,
  10220. {f: 2, c: 46848}, 46853, {f: 2, c: 46888}, 46892, {f: 2, c: 46895},
  10221. {f: 2, c: 46904}, 46907, 46916, 46920, 46924, {f: 2, c: 46932}, 46944,
  10222. 46948, 46952, {f: 2, c: 46960}, 46963, 46965, {f: 2, c: 46972}, 46976,
  10223. 46980, {f: 2, c: 46988}, {f: 4, c: 46991}, {f: 4, c: 46998}, 47004, 47008,
  10224. {f: 2, c: 47016}, {f: 3, c: 47019}, {f: 2, c: 47028}, 47032, 47047, 47049,
  10225. {f: 2, c: 47084}, 47088, 47092, {f: 2, c: 47100}, {f: 3, c: 47103},
  10226. {f: 3, c: 47111}, 47116, 47120, {f: 2, c: 47128}, 47131, 47133,
  10227. {f: 2, c: 47140}, 47144, 47148, {f: 2, c: 47156}, {f: 3, c: 47159}, 47168,
  10228. 47172, 47185, 47187, {f: 2, c: 47196}, 47200, 47204, {f: 2, c: 47212},
  10229. 47215, 47217, 47224, 47228, 47245, 47272, 47280, 47284, 47288,
  10230. {f: 2, c: 47296}, 47299, 47301, 47308, 47312, 47316, 47325, 47327, 47329,
  10231. {f: 2, c: 47336}, 47340, 47344, {f: 2, c: 47352}, 47355, 47357, 47364,
  10232. 47384, 47392, {f: 2, c: 47420}, 47424, 47428, 47436, 47439, 47441,
  10233. {f: 2, c: 47448}, 47452, 47456, {f: 2, c: 47464}, 47467, 47469,
  10234. {f: 2, c: 47476}, 47480, 47484, {f: 2, c: 47492}, 47495, {f: 2, c: 47497},
  10235. {f: 2, c: 47501}, {f: 2, c: 47532}, 47536, 47540, {f: 2, c: 47548}, 47551,
  10236. 47553, {f: 2, c: 47560}, 47564, {f: 5, c: 47566}, {f: 2, c: 47576}, 47579,
  10237. {f: 2, c: 47581}, 47585, {f: 3, c: 47587}, 47592, 47596, {f: 2, c: 47604},
  10238. {f: 4, c: 47607}, {f: 2, c: 47616}, 47624, 47637, {f: 2, c: 47672}, 47676,
  10239. 47680, 47682, {f: 2, c: 47688}, 47691, {f: 2, c: 47693}, {f: 3, c: 47699},
  10240. 47704, 47708, {f: 2, c: 47716}, {f: 3, c: 47719}, {f: 2, c: 47728}, 47732,
  10241. 47736, {f: 3, c: 47747}, 47751, 47756, {f: 2, c: 47784}, {f: 2, c: 47787},
  10242. 47792, 47794, {f: 2, c: 47800}, 47803, 47805, 47812, 47816,
  10243. {f: 2, c: 47832}, 47868, 47872, 47876, 47885, 47887, 47889, 47896, 47900,
  10244. 47904, 47913, 47915, {f: 3, c: 47924}, 47928, {f: 4, c: 47931},
  10245. {f: 2, c: 47940}, 47943, 47945, 47949, {f: 2, c: 47951}, 47956, 47960,
  10246. 47969, 47971, 47980, 48008, 48012, 48016, 48036, 48040, 48044, 48052,
  10247. 48055, 48064, 48068, 48072, 48080, 48083, {f: 2, c: 48120}, 48124,
  10248. {f: 2, c: 48127}, 48130, {f: 2, c: 48136}, {f: 3, c: 48139}, 48143, 48145,
  10249. {f: 5, c: 48148}, {f: 5, c: 48155}, {f: 2, c: 48164}, 48167, 48169, 48173,
  10250. {f: 2, c: 48176}, 48180, 48184, {f: 2, c: 48192}, {f: 3, c: 48195}, 48201,
  10251. {f: 2, c: 48204}, 48208, 48221, {f: 2, c: 48260}, 48264, {f: 2, c: 48267},
  10252. 48270, {f: 2, c: 48276}, 48279, {f: 2, c: 48281}, {f: 2, c: 48288}, 48292,
  10253. {f: 2, c: 48295}, {f: 2, c: 48304}, {f: 3, c: 48307}, {f: 2, c: 48316},
  10254. 48320, 48324, 48333, {f: 3, c: 48335}, 48341, 48344, 48348,
  10255. {f: 3, c: 48372}, 48376, 48380, {f: 2, c: 48388}, 48391, 48393, 48400,
  10256. 48404, 48420, 48428, 48448, {f: 2, c: 48456}, 48460, 48464,
  10257. {f: 2, c: 48472}, 48484, 48488, {f: 2, c: 48512}, 48516, {f: 4, c: 48519},
  10258. {f: 2, c: 48528}, 48531, 48533, {f: 2, c: 48537}, 48540, 48548, 48560,
  10259. 48568, {f: 2, c: 48596}, 48600, 48604, 48617, 48624, 48628, 48632, 48640,
  10260. 48643, 48645, {f: 2, c: 48652}, 48656, 48660, {f: 2, c: 48668}, 48671,
  10261. {f: 2, c: 48708}, 48712, 48716, 48718, {f: 2, c: 48724}, 48727,
  10262. {f: 3, c: 48729}, {f: 2, c: 48736}, 48740, 48744, 48746, {f: 2, c: 48752},
  10263. {f: 3, c: 48755}, {f: 3, c: 48763}, 48768, 48772, {f: 2, c: 48780},
  10264. {f: 3, c: 48783}, {f: 2, c: 48792}, 48808, {f: 2, c: 48848}, 48852,
  10265. {f: 2, c: 48855}, 48864, {f: 3, c: 48867}, 48876, 48897, {f: 2, c: 48904},
  10266. {f: 2, c: 48920}, {f: 3, c: 48923}, {f: 2, c: 48960}, 48964, 48968,
  10267. {f: 2, c: 48976}, 48981, 49044, 49072, 49093, {f: 2, c: 49100}, 49104,
  10268. 49108, 49116, 49119, 49121, 49212, 49233, 49240, 49244, 49248,
  10269. {f: 2, c: 49256}, {f: 2, c: 49296}, 49300, 49304, {f: 2, c: 49312}, 49315,
  10270. 49317, {f: 2, c: 49324}, {f: 2, c: 49327}, {f: 4, c: 49331},
  10271. {f: 2, c: 49340}, {f: 3, c: 49343}, 49349, {f: 2, c: 49352}, 49356, 49360,
  10272. {f: 2, c: 49368}, {f: 3, c: 49371}, {f: 2, c: 49380}, 49384, 49388,
  10273. {f: 2, c: 49396}, 49399, 49401, 49408, 49412, 49416, 49424, 49429,
  10274. {f: 5, c: 49436}, {f: 2, c: 49443}, {f: 2, c: 49446}, {f: 2, c: 49452},
  10275. {f: 3, c: 49455}, 49462, {f: 2, c: 49464}, 49468, 49472, {f: 2, c: 49480},
  10276. {f: 3, c: 49483}, {f: 2, c: 49492}, 49496, 49500, {f: 2, c: 49508},
  10277. {f: 3, c: 49511}, 49520, 49524, 49528, 49541, {f: 3, c: 49548}, 49552,
  10278. 49556, 49558, {f: 2, c: 49564}, 49567, 49569, 49573, {f: 2, c: 49576},
  10279. 49580, 49584, 49597, 49604, 49608, 49612, 49620, {f: 2, c: 49623}, 49632,
  10280. 49636, 49640, {f: 2, c: 49648}, 49651, {f: 2, c: 49660}, 49664, 49668,
  10281. {f: 2, c: 49676}, 49679, 49681, {f: 2, c: 49688}, 49692, {f: 2, c: 49695},
  10282. {f: 2, c: 49704}, 49707, 49709, 49711, {f: 2, c: 49713}, 49716, 49736,
  10283. {f: 2, c: 49744}, 49748, 49752, 49760, 49765, {f: 2, c: 49772}, 49776,
  10284. 49780, {f: 2, c: 49788}, 49791, 49793, {f: 2, c: 49800}, 49808, 49816,
  10285. 49819, 49821, {f: 2, c: 49828}, 49832, {f: 2, c: 49836}, {f: 2, c: 49844},
  10286. 49847, 49849, {f: 2, c: 49884}, 49888, {f: 2, c: 49891}, {f: 3, c: 49899},
  10287. 49903, 49905, 49910, {f: 2, c: 49912}, {f: 2, c: 49915}, 49920,
  10288. {f: 2, c: 49928}, {f: 2, c: 49932}, {f: 3, c: 49939}, 49944, 49948,
  10289. {f: 2, c: 49956}, {f: 2, c: 49960}, 49989, {f: 2, c: 50024}, 50028, 50032,
  10290. 50034, {f: 2, c: 50040}, {f: 2, c: 50044}, 50052, 50056, 50060, 50112,
  10291. {f: 2, c: 50136}, 50140, {f: 2, c: 50143}, 50146, {f: 2, c: 50152}, 50157,
  10292. {f: 2, c: 50164}, 50168, 50184, 50192, 50212, 50220, 50224, 50228,
  10293. {f: 2, c: 50236}, 50248, {f: 2, c: 50276}, 50280, 50284, {f: 2, c: 50292},
  10294. 50297, 50304, 50324, 50332, 50360, 50364, 50409, {f: 2, c: 50416}, 50420,
  10295. 50424, 50426, {f: 3, c: 50431}, 50444, 50448, 50452, 50460,
  10296. {f: 2, c: 50472}, 50476, 50480, {f: 2, c: 50488}, 50491, 50493,
  10297. {f: 2, c: 50500}, {f: 3, c: 50504}, {f: 3, c: 50508}, {f: 3, c: 50515},
  10298. {f: 3, c: 50519}, {f: 2, c: 50525}, {f: 2, c: 50528}, 50532, 50536,
  10299. {f: 2, c: 50544}, {f: 3, c: 50547}, {f: 2, c: 50556}, 50560, 50564, 50567,
  10300. {f: 2, c: 50572}, 50575, 50577, 50581, {f: 2, c: 50583}, 50588, 50592,
  10301. 50601, {f: 2, c: 50612}, {f: 2, c: 50616}, {f: 4, c: 50619},
  10302. {f: 7, c: 50628}, 50636, 50638, {f: 2, c: 50640}, 50644, 50648,
  10303. {f: 2, c: 50656}, 50659, 50661, {f: 3, c: 50668}, 50672, 50676,
  10304. {f: 2, c: 50678}, {f: 6, c: 50684}, {f: 4, c: 50693}, 50700, 50704,
  10305. {f: 2, c: 50712}, {f: 2, c: 50715}, {f: 2, c: 50724}, 50728,
  10306. {f: 3, c: 50732}, 50736, {f: 3, c: 50739}, 50743, 50745, 50747,
  10307. {f: 2, c: 50752}, 50756, 50760, {f: 2, c: 50768}, {f: 3, c: 50771},
  10308. {f: 2, c: 50780}, 50784, 50796, 50799, 50801, {f: 2, c: 50808}, 50812,
  10309. 50816, {f: 2, c: 50824}, 50827, 50829, {f: 2, c: 50836}, 50840, 50844,
  10310. {f: 2, c: 50852}, 50855, 50857, {f: 2, c: 50864}, 50868, {f: 3, c: 50872},
  10311. {f: 2, c: 50880}, 50883, 50885, {f: 2, c: 50892}, 50896, 50900,
  10312. {f: 2, c: 50908}, {f: 2, c: 50912}, {f: 2, c: 50920}, 50924, 50928,
  10313. {f: 2, c: 50936}, 50941, {f: 2, c: 50948}, 50952, 50956, {f: 2, c: 50964},
  10314. 50967, 50969, {f: 2, c: 50976}, 50980, 50984, {f: 2, c: 50992}, 50995,
  10315. 50997, 50999, {f: 2, c: 51004}, 51008, 51012, 51018, {f: 2, c: 51020},
  10316. 51023, {f: 8, c: 51025}, 51036, 51040, 51048, 51051, {f: 2, c: 51060},
  10317. 51064, {f: 3, c: 51068}, {f: 3, c: 51075}, {f: 4, c: 51079}, 51086,
  10318. {f: 2, c: 51088}, 51092, {f: 3, c: 51094}, 51098, {f: 2, c: 51104},
  10319. {f: 4, c: 51107}, {f: 2, c: 51116}, 51120, 51124, {f: 2, c: 51132},
  10320. {f: 3, c: 51135}, {f: 2, c: 51144}, 51148, 51150, 51152, 51160, 51165,
  10321. 51172, 51176, 51180, {f: 2, c: 51200}, 51204, 51208, 51210,
  10322. {f: 2, c: 51216}, 51219, {f: 2, c: 51221}, {f: 2, c: 51228}, 51232, 51236,
  10323. {f: 2, c: 51244}, 51247, 51249, 51256, 51260, 51264, {f: 2, c: 51272},
  10324. {f: 2, c: 51276}, 51284, {f: 2, c: 51312}, 51316, 51320, 51322,
  10325. {f: 2, c: 51328}, 51331, {f: 3, c: 51333}, {f: 3, c: 51339}, 51348, 51357,
  10326. 51359, 51361, 51368, {f: 2, c: 51388}, 51396, 51400, 51404,
  10327. {f: 2, c: 51412}, 51415, 51417, {f: 2, c: 51424}, 51428, 51445,
  10328. {f: 2, c: 51452}, 51456, {f: 3, c: 51460}, {f: 2, c: 51468}, 51471, 51473,
  10329. 51480, 51500, 51508, {f: 2, c: 51536}, 51540, 51544, {f: 2, c: 51552},
  10330. 51555, 51564, 51568, 51572, 51580, {f: 2, c: 51592}, 51596, 51600,
  10331. {f: 2, c: 51608}, 51611, 51613, {f: 2, c: 51648}, 51652, {f: 2, c: 51655},
  10332. 51658, {f: 2, c: 51664}, 51667, {f: 2, c: 51669}, {f: 2, c: 51673},
  10333. {f: 2, c: 51676}, 51680, 51682, 51684, 51687, {f: 2, c: 51692},
  10334. {f: 3, c: 51695}, {f: 2, c: 51704}, 51708, 51712, {f: 2, c: 51720},
  10335. {f: 3, c: 51723}, 51732, 51736, 51753, {f: 2, c: 51788}, 51792, 51796,
  10336. {f: 2, c: 51804}, {f: 3, c: 51807}, 51816, 51837, 51844, 51864,
  10337. {f: 2, c: 51900}, 51904, 51908, {f: 2, c: 51916}, 51919, 51921, 51923,
  10338. {f: 2, c: 51928}, 51936, 51948, 51956, 51976, 51984, 51988, 51992,
  10339. {f: 2, c: 52000}, 52033, {f: 2, c: 52040}, 52044, 52048, {f: 2, c: 52056},
  10340. 52061, 52068, {f: 2, c: 52088}, 52124, 52152, 52180, 52196, 52199, 52201,
  10341. {f: 2, c: 52236}, 52240, 52244, {f: 2, c: 52252}, {f: 2, c: 52257},
  10342. {f: 3, c: 52263}, 52268, 52270, 52272, {f: 2, c: 52280}, {f: 4, c: 52283},
  10343. {f: 2, c: 52292}, 52296, 52300, {f: 2, c: 52308}, {f: 3, c: 52311}, 52320,
  10344. 52324, 52326, 52328, 52336, 52341, {f: 2, c: 52376}, 52380, 52384,
  10345. {f: 2, c: 52392}, {f: 3, c: 52395}, {f: 2, c: 52404}, 52408, 52412,
  10346. {f: 2, c: 52420}, 52423, 52425, 52432, 52436, 52452, 52460, 52464, 52481,
  10347. {f: 2, c: 52488}, 52492, 52496, {f: 2, c: 52504}, 52507, 52509, 52516,
  10348. 52520, 52524, 52537, 52572, 52576, 52580, {f: 2, c: 52588}, 52591, 52593,
  10349. 52600, 52616, {f: 2, c: 52628}, 52632, 52636, {f: 2, c: 52644}, 52647,
  10350. 52649, 52656, 52676, 52684, 52688, 52712, 52716, 52720, {f: 2, c: 52728},
  10351. 52731, 52733, 52740, 52744, 52748, 52756, 52761, {f: 2, c: 52768}, 52772,
  10352. 52776, {f: 2, c: 52784}, 52787, 52789, {f: 2, c: 52824}, 52828,
  10353. {f: 3, c: 52831}, {f: 2, c: 52840}, 52843, 52845, {f: 2, c: 52852}, 52856,
  10354. 52860, {f: 2, c: 52868}, 52871, 52873, {f: 2, c: 52880}, 52884, 52888,
  10355. {f: 2, c: 52896}, {f: 3, c: 52899}, {f: 2, c: 52908}, 52929,
  10356. {f: 2, c: 52964}, 52968, {f: 2, c: 52971}, {f: 2, c: 52980},
  10357. {f: 3, c: 52983}, {f: 2, c: 52992}, 52996, 53000, {f: 2, c: 53008}, 53011,
  10358. 53013, 53020, 53024, 53028, {f: 2, c: 53036}, {f: 3, c: 53039}, 53048,
  10359. {f: 2, c: 53076}, 53080, 53084, {f: 2, c: 53092}, 53095, 53097,
  10360. {f: 2, c: 53104}, 53108, 53112, 53120, 53125, 53132, 53153, 53160, 53168,
  10361. 53188, {f: 2, c: 53216}, 53220, 53224, {f: 2, c: 53232}, 53235, 53237,
  10362. 53244, 53248, 53252, 53265, 53272, 53293, {f: 2, c: 53300}, 53304, 53308,
  10363. {f: 2, c: 53316}, 53319, 53321, 53328, 53332, 53336, 53344,
  10364. {f: 2, c: 53356}, 53360, 53364, {f: 2, c: 53372}, 53377, {f: 2, c: 53412},
  10365. 53416, 53420, {f: 2, c: 53428}, 53431, 53433, {f: 2, c: 53440}, 53444,
  10366. {f: 2, c: 53448}, {f: 2, c: 53456}, {f: 3, c: 53459}, {f: 2, c: 53468},
  10367. 53472, 53476, {f: 2, c: 53484}, {f: 3, c: 53487}, 53496, 53517,
  10368. {f: 2, c: 53552}, 53556, 53560, 53562, {f: 2, c: 53568}, {f: 3, c: 53571},
  10369. {f: 2, c: 53580}, 53584, 53588, {f: 2, c: 53596}, 53599, 53601, 53608,
  10370. 53612, 53628, 53636, 53640, {f: 2, c: 53664}, 53668, 53672,
  10371. {f: 2, c: 53680}, 53683, 53685, 53690, 53692, 53696, 53720, 53748, 53752,
  10372. 53767, 53769, 53776, {f: 2, c: 53804}, 53808, 53812, {f: 2, c: 53820},
  10373. 53823, 53825, 53832, 53852, 53860, {f: 2, c: 53888}, 53892, 53896,
  10374. {f: 2, c: 53904}, 53909, 53916, 53920, 53924, 53932, 53937,
  10375. {f: 2, c: 53944}, 53948, {f: 2, c: 53951}, 53954, {f: 2, c: 53960}, 53963,
  10376. 53972, 53976, 53980, {f: 2, c: 53988}, {f: 2, c: 54000}, 54004, 54008,
  10377. {f: 2, c: 54016}, 54019, 54021, {f: 3, c: 54028}, 54032, 54036, 54038,
  10378. {f: 2, c: 54044}, {f: 3, c: 54047}, 54053, {f: 2, c: 54056}, 54060, 54064,
  10379. {f: 2, c: 54072}, {f: 3, c: 54075}, {f: 2, c: 54084}, {f: 2, c: 54140},
  10380. 54144, 54148, {f: 2, c: 54156}, {f: 3, c: 54159}, {f: 2, c: 54168}, 54172,
  10381. 54176, {f: 2, c: 54184}, 54187, 54189, 54196, 54200, 54204,
  10382. {f: 2, c: 54212}, {f: 2, c: 54216}, 54224, 54232, 54241, 54243,
  10383. {f: 2, c: 54252}, 54256, 54260, {f: 2, c: 54268}, 54271, 54273, 54280,
  10384. 54301, 54336, 54340, 54364, 54368, 54372, 54381, 54383, {f: 2, c: 54392},
  10385. 54396, {f: 2, c: 54399}, 54402, {f: 2, c: 54408}, 54411, 54413, 54420,
  10386. 54441, 54476, 54480, 54484, 54492, 54495, 54504, 54508, 54512, 54520,
  10387. 54523, 54525, 54532, 54536, 54540, {f: 2, c: 54548}, 54551,
  10388. {f: 2, c: 54588}, 54592, 54596, {f: 2, c: 54604}, 54607, 54609,
  10389. {f: 2, c: 54616}, 54620, 54624, 54629, {f: 2, c: 54632}, 54635, 54637,
  10390. {f: 2, c: 54644}, 54648, 54652, {f: 2, c: 54660}, {f: 3, c: 54663}, 54672,
  10391. 54693, {f: 2, c: 54728}, 54732, 54736, 54738, {f: 2, c: 54744}, 54747,
  10392. 54749, {f: 2, c: 54756}, 54760, 54764, {f: 2, c: 54772}, 54775, 54777,
  10393. {f: 2, c: 54784}, 54788, 54792, {f: 2, c: 54800}, {f: 3, c: 54803}, 54812,
  10394. 54816, 54820, 54829, {f: 2, c: 54840}, 54844, 54848, 54853,
  10395. {f: 2, c: 54856}, 54859, 54861, 54865, {f: 2, c: 54868}, 54872, 54876,
  10396. 54887, 54889, {f: 2, c: 54896}, 54900, 54915, 54917, {f: 2, c: 54924},
  10397. 54928, 54932, 54941, 54943, 54945, 54952, 54956, 54960, 54969, 54971,
  10398. {f: 2, c: 54980}, 54984, 54988, 54993, 54996, 54999, 55001, 55008, 55012,
  10399. 55016, 55024, 55029, {f: 2, c: 55036}, 55040, 55044, 55057,
  10400. {f: 2, c: 55064}, 55068, 55072, {f: 2, c: 55080}, 55083, 55085,
  10401. {f: 2, c: 55092}, 55096, 55100, 55108, 55111, 55113, {f: 2, c: 55120},
  10402. 55124, {f: 4, c: 55126}, {f: 2, c: 55136}, 55139, 55141, 55145, 55148,
  10403. 55152, 55156, {f: 2, c: 55164}, 55169, {f: 2, c: 55176}, 55180, 55184,
  10404. {f: 2, c: 55192}, 55195, 55197, 20285, 20339, 20551, 20729, 21152, 21487,
  10405. 21621, 21733, 22025, 23233, 23478, 26247, {f: 2, c: 26550}, 26607, 27468,
  10406. 29634, 30146, 31292, 33499, 33540, 34903, 34952, 35382, [36040, 63747],
  10407. 36303, 36603, 36838, 39381, 21051, 21364, 21508, 24682, 24932, 27580,
  10408. 29647, 33050, 35258, [12179, 35282], 38307, 20355, 21002, 22718, 22904,
  10409. 23014, [12082, 24178], 24185, 25031, 25536, 26438, 26604, 26751, 28567,
  10410. 30286, 30475, 30965, 31240, 31487, 31777, 32925, [12169, 33390], 33393,
  10411. 35563, 38291, 20075, 21917, 26359, 28212, 30883, 31469, 33883, 35088,
  10412. 34638, 38824, 21208, 22350, 22570, 23884, 24863, 25022, 25121, 25954,
  10413. 26577, 27204, 28187, [12130, 29976], 30131, 30435, 30640, 32058, 37039,
  10414. {f: 2, c: 37969}, 40853, 21283, 23724, 30002, 32987, 37440, 38296, 21083,
  10415. 22536, 23004, 23713, 23831, 24247, 24378, 24394, 24951, 27743, 30074,
  10416. 30086, 31968, 32115, 32177, 32652, 33108, 33313, 34193, 35137, 35611,
  10417. 37628, [38477, 64009], 40007, 20171, 20215, 20491, 20977, 22607, 24887,
  10418. 24894, 24936, 25913, 27114, 28433, 30117, 30342, 30422, 31623, 33445,
  10419. 33995, 37799, 38283, 21888, 23458, 22353, 31923, 32697, 37301, 20520,
  10420. 21435, 23621, 24040, 25298, 25454, 25818, 25831, 28192, 28844, 31067,
  10421. 36317, 36382, 36989, 37445, 37624, 20094, 20214, 20581, [12081, 24062],
  10422. 24314, 24838, 26967, 33137, 34388, 36423, 37749, 39467, 20062, 20625,
  10423. 26480, 26688, 20745, 21133, 21138, 27298, 30652, 37392, 40660, 21163,
  10424. 24623, 36850, 20552, 25001, 25581, 25802, 26684, 27268, 28608, 33160,
  10425. 35233, 38548, 22533, 29309, [12125, 29356], 29956, 32121, 32365, 32937,
  10426. [12178, 35211, 64010], 35700, 36963, 40273, 25225, 27770, 28500, 32080,
  10427. 32570, 35363, 20860, 24906, 31645, 35609, 37463, 37772, 20140, 20435,
  10428. 20510, 20670, 20742, 21185, 21197, 21375, 22384, 22659, 24218, 24465,
  10429. 24950, 25004, 25806, 25964, 26223, 26299, [26356, 63745], 26775, 28039,
  10430. 28805, 28913, 29855, 29861, 29898, 30169, 30828, 30956, 31455, 31478,
  10431. 32069, 32147, 32789, 32831, 33051, 33686, 35686, 36629, 36885, 37857,
  10432. 38915, 38968, 39514, 39912, 20418, 21843, 22586, [22865, 63753], 23395,
  10433. 23622, 24760, 25106, 26690, 26800, 26856, 28330, 30028, 30328, 30926,
  10434. 31293, 31995, 32363, 32380, 35336, 35489, 35903, 38542, 40388, 21476,
  10435. 21481, 21578, 21617, 22266, 22993, 23396, 23611, 24235, 25335, 25911,
  10436. 25925, 25970, 26272, 26543, 27073, 27837, 30204, 30352, 30590, 31295,
  10437. 32660, 32771, 32929, 33167, 33510, 33533, 33776, 34241, 34865, 34996,
  10438. 35493, 36764, 37678, 38599, 39015, [12220, 39640], [12238, 40723], 21741,
  10439. 26011, 26354, 26767, 31296, [12181, 35895], 40288, 22256, 22372, 23825,
  10440. 26118, 26801, 26829, 28414, 29736, 34974, 39908, 27752, [12219, 39592],
  10441. 20379, 20844, 20849, 21151, 23380, [12079, 24037], 24656, 24685, 25329,
  10442. 25511, 25915, 29657, 31354, 34467, 36002, 38799, [20018, 63749], 23521,
  10443. [12093, 25096], 26524, [12128, 29916], 31185, 33747, 35463, 35506, 36328,
  10444. 36942, 37707, 38982, [24275, 64011], 27112, 34303, 37101, 20896, 23448,
  10445. 23532, 24931, 26874, 27454, 28748, 29743, 29912, 31649, 32592, 33733,
  10446. 35264, 36011, 38364, 39208, 21038, 24669, 25324, 36866, 20362, 20809,
  10447. 21281, 22745, 24291, 26336, 27960, 28826, 29378, 29654, 31568, 33009,
  10448. 37979, 21350, 25499, 32619, 20054, 20608, 22602, 22750, 24618, 24871,
  10449. 25296, 27088, 39745, 23439, 32024, 32945, 36703, 20132, 20689, 21676,
  10450. 21932, 23308, 23968, 24039, 25898, 25934, 26657, 27211, 29409, 30350,
  10451. 30703, 32094, 32761, 33184, 34126, 34527, 36611, 36686, 37066, 39171,
  10452. 39509, 39851, 19992, 20037, 20061, 20167, 20465, 20855, 21246, 21312,
  10453. [12061, 21475], [21477, 63750], 21646, 22036, 22389, 22434, 23495, 23943,
  10454. 24272, 25084, 25304, 25937, 26552, 26601, 27083, 27472, 27590, 27628,
  10455. 27714, 28317, 28792, 29399, 29590, 29699, 30655, 30697, 31350, 32127,
  10456. 32777, [12165, 33276], 33285, 33290, 33503, 34914, 35635, 36092, 36544,
  10457. 36881, 37041, 37476, 37558, 39378, 39493, 40169, 40407,
  10458. [12244, 40860, 63751, 63752], 22283, 23616, 33738, 38816, 38827, 40628,
  10459. 21531, 31384, 32676, 35033, 36557, 37089, 22528, 23624, 25496, 31391,
  10460. 23470, [12088, 24339], 31353, 31406, 33422, 36524, 20518, 21048, 21240,
  10461. 21367, 22280, 25331, 25458, 27402, 28099, 30519, 21413, 29527, 34152,
  10462. 36470, 38357, 26426, 27331, 28528, 35437, 36556, 39243, 26231, 27512,
  10463. 36020, [12225, 39740], 21483, 22317, 22862, 25542, 27131, 29674, 30789,
  10464. 31418, 31429, 31998, 33909, 35215, 36211, 36917, 38312, 21243, 22343,
  10465. 30023, 31584, 33740, 37406, 27224, 20811, 21067, 21127, 25119, 26840,
  10466. 26997, 38553, 20677, 21156, 21220, 25027, [12100, 26020], 26681, 27135,
  10467. 29822, 31563, 33465, 33771, 35250, 35641, 36817, 39241, 20170, 22935,
  10468. 25810, 26129, 27278, 29748, 31105, 31165, 33449, {f: 2, c: 34942}, 35167,
  10469. 37670, 20235, 21450, 24613, 25201, 27762, 32026, 32102, 20120, 20834,
  10470. 30684, 32943, 20225, 20238, 20854, 20864, 21980, 22120, 22331, 22522,
  10471. 22524, 22804, 22855, 22931, 23492, 23696, 23822, [12080, 24049], 24190,
  10472. 24524, 25216, 26071, 26083, {f: 2, c: 26398}, 26462, 26827, 26820, 27231,
  10473. 27450, 27683, 27773, 27778, 28103, 29592, 29734, 29738, 29826, 29859,
  10474. 30072, 30079, 30849, 30959, 31041, {f: 2, c: 31047}, 31098, 31637, 32000,
  10475. 32186, 32648, 32774, 32813, 32908, 35352, 35663, [35912, 63744], 36215,
  10476. 37665, 37668, 39138, 39249, {f: 2, c: 39438}, 39525, 40594, 32202, 20342,
  10477. 21513, 25326, 26708, [12198, 37329, 63754], 21931, 20794, 23068, 25062,
  10478. [25295, 63835], 25343, 37027, [35582, 63837], 26262, 29014, 38627, 25423,
  10479. 25466, 21335, 26511, 26976, 28275, 30007, 32013, 34930, 22218, 23064,
  10480. 20035, 20839, [22856, 63756], 26608, 32784, [12069, 22899, 63873],
  10481. [24180, 63886], [25754, 63889], [31178, 63893], [24565, 63907], 24684,
  10482. 25288, [25467, 63908], [23527, 63839, 63914], 23511, 21162, 22900, 24361,
  10483. [24594, 63840], 29785, 39377, 28611, 33215, 36786, 24817, 33126,
  10484. [23615, 63933], 23273, 35365, [26491, 63944], [32016, 63951], 33021, 23612,
  10485. [27877, 63971], [21311, 63979], [28346, 63980], 22810, [33590, 63998],
  10486. [20025, 63838], 20150, 20294, 21934, 22296, 22727, 24406, 26039, 26086,
  10487. 27264, 27573, 28237, 30701, 31471, 31774, 32222, 34507, 34962, 37170,
  10488. 37723, 25787, 28606, 29562, 30136, 36948, 21846, 22349, 25018, 25812,
  10489. 26311, 28129, 28251, 28525, 28601, 30192, 32835, 33213, 34113, 35203,
  10490. 35527, 35674, 37663, 27795, 30035, 31572, 36367, 36957, 21776, 22530,
  10491. 22616, 24162, 25095, 25758, 26848, 30070, [31958, 64003], 34739, 40680,
  10492. 20195, 22408, 22382, [12068, 22823], 23565, 23729, 24118, 24453, 25140,
  10493. 25825, 29619, 33274, 34955, 36024, 38538, 40667, [23429, 64004], 24503,
  10494. 24755, 20498, [12049, 20992], 21040, 22294, 22581, 22615, 23566, 23648,
  10495. 23798, 23947, [24230, 64001], 24466, 24764, 25361, 25481, 25623, 26691,
  10496. 26873, 27330, 28120, 28193, 28372, 28644, 29182, 30428, 30585, 31153,
  10497. 31291, 33796, 35241, 36077, 36339, 36424, 36867, 36884, 36947, 37117,
  10498. 37709, 38518, 38876, 27602, 28678, 29272, 29346, 29544, 30563, 31167,
  10499. 31716, 32411, [35712, 63834], 22697, 24775, 25958, 26109, 26302, 27788,
  10500. 28958, 29129, 35930, 38931, 20077, 31361, 20189, 20908, 20941, 21205,
  10501. 21516, 24999, 26481, 26704, 26847, [27934, 64005], 28540, 30140, 30643,
  10502. 31461, 33012, 33891, 37509, 20828, [12099, 26007], 26460, 26515, 30168,
  10503. 31431, 33651, [12182, 35910], 36887, 38957, 23663, 33216, 33434, 36929,
  10504. 36975, 37389, 24471, 23965, 27225, 29128, 30331, 31561, 34276, 35588,
  10505. 37159, 39472, [21895, 63755], [25078, 63757], [30313, 63758],
  10506. [32645, 63759], [34367, 63760], [34746, 63761], [35064, 63762],
  10507. [37007, 63763], [27931, 63765], [28889, 63766], [29662, 63767], 32097,
  10508. [33853, 63768], [37226, 63769], [39409, 63770], [20098, 63771],
  10509. [21365, 63772], [27396, 63773], 27410, 28734, [29211, 63774],
  10510. [34349, 63775], [40478, 63776], 21068, 36771, [23888, 63777], 25829, 25900,
  10511. 27414, [28651, 63778], 31811, 32412, [34253, 63779], [35172, 63780], 35261,
  10512. [25289, 63781], [33240, 63782], [34847, 63783], [24266, 63784],
  10513. [26391, 63785], [28010, 63786], [29436, 63787], 29701, 29807, 34690,
  10514. [37086, 63788], [20358, 63789], 23821, 24480, 33802, [20919, 63790],
  10515. [25504, 63861], [30053, 63862], [20142, 63863], 20486, [20841, 63864],
  10516. [20937, 63865], [26753, 63866], 27153, 31918, 31921, [31975, 63867],
  10517. [33391, 63868], [35538, 63869], 36635, [37327, 63870], 20406, 20791,
  10518. [21237, 63871], [21570, 63872], [24300, 63874], 24942, 25150,
  10519. [26053, 63875], 27354, [28670, 63876], [31018, 63877], 34268, 34851,
  10520. [38317, 63878], 39522, [39530, 63879], [40599, 63880], [40654, 63881],
  10521. [12050, 21147, 63882], [26310, 63883], [27511, 63884], 28701, 31019,
  10522. [36706, 63885], 38722, [24976, 63887], [25088, 63888], 25891,
  10523. [28451, 63890], [29001, 63891], [29833, 63892], [32244, 63894],
  10524. [32879, 63895], [34030, 63897], [36646, 63896], [36899, 63898],
  10525. [37706, 63899], 20925, [21015, 63900], [21155, 63901], 27916,
  10526. [28872, 63903], [35010, 63904], [24265, 63906], 25986, [27566, 63909],
  10527. 28610, [31806, 63910], [29557, 63911], [20196, 63912], 20278,
  10528. [22265, 63913], 23738, [23994, 63915], [24604, 63916], [29618, 63917],
  10529. 31533, [32666, 63919], 32718, [32838, 63920], 36894, [37428, 63921],
  10530. [38646, 63922], [38728, 63923], [38936, 63924], 40801, [20363, 63925],
  10531. 28583, [31150, 63926], [37300, 63927], [38583, 63928], [21214, 63791],
  10532. 25736, [25796, 63792], [27347, 63793], 28510, 28696, [29200, 63794],
  10533. [30439, 63795], [12156, 32769, 63796], [34310, 63797], [34396, 63798],
  10534. [36335, 63799], 36613, [38706, 63800], [39791, 63801], [40442, 63802],
  10535. [12228, 40565], [30860, 63803], [31103, 63804], [32160, 63805],
  10536. [33737, 63806], [37636, 63807], [12229, 40575, 63808], 40595,
  10537. [35542, 63809], [22751, 63810], [24324, 63811], 26407, 28711, 29903,
  10538. [31840, 63812], [32894, 63813], 20769, 28712, [29282, 63814],
  10539. [30922, 63815], [36034, 63816], 36058, 36084, [38647, 63817],
  10540. [20102, 63930], [20698, 63931], [23534, 63932], 24278, [26009, 63934],
  10541. [29134, 63936], [30274, 63937], 30637, 32842, [34044, 63938],
  10542. [36988, 63939], 39719, [12243, 40845, 63940], [22744, 63818], 23105,
  10543. [23650, 63819], [27155, 63820], [28122, 63821], [28431, 63822], 30267,
  10544. [32047, 63823], [32311, 63824], 34078, 35128, 37860, [38475, 63825],
  10545. [21129, 63943], 26066, [26611, 63945], 27060, [27969, 63946],
  10546. [28316, 63947], 28687, [29705, 63948], 29792, [30041, 63949], 30244,
  10547. [30827, 63950], 35628, [39006, 63952], [20845, 63953], [25134, 63954],
  10548. [38520, 63955], 20374, [20523, 63956], [23833, 63957], [28138, 63958],
  10549. 32184, [36650, 63959], [24459, 63960], [24900, 63961], [26647, 63962],
  10550. [38534, 63964], [21202, 63826], [32907, 63827], [20956, 63828],
  10551. [20940, 63829], 26974, [31260, 63830], [32190, 63831], [33777, 63832],
  10552. [38517, 63833], 20442, [21033, 63965], 21400, [21519, 63966], 21774,
  10553. [23653, 63967], 24743, [26446, 63969], [26792, 63970], 28012, 29313, 29432,
  10554. [29702, 63972], 29827, [30178, 63973], 31852, [32633, 63974], 32696, 33673,
  10555. [35023, 63975], [35041, 63976], [12197, 37324, 63977], 37328,
  10556. [38626, 63978], 39881, [21533, 63981], 28542, [29136, 63982],
  10557. [29848, 63983], [34298, 63984], 36522, [38563, 63985], [40023, 63986],
  10558. [40607, 63987], [26519, 63988], [28107, 63989], 29747, [33256, 63990],
  10559. 38678, 30764, [12148, 31435, 63991], [31520, 63992], [31890, 63993], 25705,
  10560. 29802, 30194, 30908, 30952, [12218, 39340], 39764, [12231, 40635], 23518,
  10561. 24149, 28448, 33180, 33707, 37000, 19975, 21325, 23081, 24018, 24398,
  10562. 24930, 25405, 26217, 26364, 28415, 28459, 28771, 30622, 33836, 34067,
  10563. 34875, 36627, 39237, 39995, 21788, 25273, 26411, 27819, 33545, 35178,
  10564. 38778, 20129, 22916, {f: 2, c: 24536}, 26395, 32178, 32596, 33426, 33579,
  10565. 33725, 36638, 37017, 22475, 22969, 23186, 23504, 26151, 26522, 26757,
  10566. 27599, 29028, 32629, 36023, 36067, 36993, 39749, 33032, 35978, 38476,
  10567. 39488, [12230, 40613], 23391, 27667, 29467, 30450, 30431, 33804, 20906,
  10568. 35219, 20813, 20885, 21193, 26825, 27796, 30468, 30496, 32191, 32236,
  10569. [12207, 38754], 40629, 28357, 34065, 20901, 21517, 21629, 26126, 26269,
  10570. 26919, 28319, [12139, 30399], 30609, 33559, 33986, 34719, 37225, 37528,
  10571. 40180, 34946, 20398, 20882, 21215, 22982, 24125, 24917, {f: 2, c: 25720},
  10572. 26286, 26576, 27169, 27597, [12113, 27611], 29279, 29281, 29761, 30520,
  10573. [12141, 30683], 32791, 33468, 33541, 35584, 35624, 35980, [12106, 26408],
  10574. 27792, 29287, [12140, 30446], 30566, 31302, 40361, 27519, 27794, 22818,
  10575. 26406, 33945, 21359, 22675, 22937, 24287, 25551, 26164, 26483, 28218,
  10576. 29483, 31447, 33495, 37672, 21209, 24043, 25006, 25035, 25098, 25287,
  10577. 25771, [12102, 26080], 26969, 27494, [12111, 27595], 28961, 29687, 30045,
  10578. 32326, 33310, 33538, 34154, 35491, 36031, 38695, 40289, 22696, 40664,
  10579. 20497, 21006, 21563, 21839, [12098, 25991], 27766, {f: 2, c: 32010}, 32862,
  10580. 34442, [12200, 38272], 38639, 21247, 27797, 29289, 21619, 23194, 23614,
  10581. 23883, 24396, 24494, 26410, 26806, 26979, 28220, 28228, 30473,
  10582. [12150, 31859], 32654, 34183, 35598, 36855, 38753, 40692, 23735, 24758,
  10583. 24845, 25003, 25935, {f: 2, c: 26107}, 27665, 27887, 29599, 29641, 32225,
  10584. 38292, 23494, 34588, 35600, 21085, 21338, 25293, 25615, 25778, 26420,
  10585. 27192, 27850, 29632, 29854, 31636, 31893, 32283, 33162, 33334, 34180,
  10586. 36843, 38649, 39361, 20276, 21322, 21453, 21467, 25292, 25644, 25856,
  10587. 26001, 27075, 27886, 28504, 29677, 30036, 30242, 30436, 30460, 30928,
  10588. [30971, 63844], 31020, 32070, 33324, 34784, 36820, 38930, 39151, 21187,
  10589. 25300, 25765, 28196, 28497, 30332, 36299, 37297, 37474, 39662, 39747,
  10590. 20515, 20621, 22346, 22952, 23592, 24135, 24439, 25151, 25918,
  10591. [12101, 26041], 26049, 26121, 26507, 27036, 28354, 30917, 32033, 32938,
  10592. 33152, 33323, 33459, 33953, 34444, 35370, 35607, 37030, 38450, 40848,
  10593. 20493, 20467, 22521, 24472, 25308, 25490, 26479, 28227, 28953, 30403,
  10594. 32972, 32986, {f: 2, c: 35060}, 35097, 36064, 36649, 37197, 38506, 20271,
  10595. 20336, 24091, 26575, 26658, [12137, 30333], 30334, 39748, 24161, 27146,
  10596. 29033, 29140, 30058, 32321, 34115, 34281, 39132, 20240, 31567, 32624,
  10597. 38309, 20961, 24070, 26805, 27710, 27726, 27867, 29359, 31684, 33539,
  10598. 27861, 29754, 20731, 21128, 22721, 25816, 27287, 29863, 30294, 30887,
  10599. 34327, 38370, 38713, 21342, 24321, 35722, 36776, 36783, 37002, 21029,
  10600. 30629, 40009, 40712, 19993, 20482, 20853, 23643, 24183, 26142, 26170,
  10601. 26564, 26821, 28851, 29953, 30149, 31177, 31453, 36647, 39200, 39432,
  10602. 20445, 22561, 22577, 23542, 26222, 27493, 27921, 28282, 28541, 29668,
  10603. 29995, 33769, 35036, 35091, 35676, 36628, 20239, 20693, 21264,
  10604. [12056, 21340], 23443, [24489, 63846], 26381, 31119, 33145, 33583, 34068,
  10605. 35079, 35206, 36665, [36667, 64007], 39333, 39954, 26412, 20086, 20472,
  10606. 22857, 23553, {f: 2, c: 23791}, 25447, 26834, 28925, 29090, 29739, 32299,
  10607. 34028, 34562, 36898, 37586, 40179, [19981, 63847], 20184, 20463, 20613,
  10608. 21078, 21103, 21542, 21648, 22496, 22827, 23142, 23386, 23413, 23500,
  10609. 24220, 25206, 25975, 26023, 28014, 28325, [12119, 29238], 31526, 31807,
  10610. [12152, 32566], {f: 2, c: 33104}, 33178, 33344, 33433, 33705, 35331, 36000,
  10611. 36070, 36091, 36212, 36282, 37096, 37340, [12201, 38428], 38468, 39385,
  10612. 40167, [21271, 63843], 20998, 21545, 22132, 22707, 22868, 22894, 24575,
  10613. 24996, 25198, 26128, 27774, 28954, 30406, 31881, 31966, 32027, 33452,
  10614. 36033, 38640, 20315, 24343, 24447, 25282, 23849, 26379, 26842, 30844,
  10615. 32323, 40300, 19989, 20633, [12052, 21269], 21290, 21329, 22915, 23138,
  10616. 24199, 24754, 24970, 25161, 25209, 26000, 26503, 27047, [12112, 27604],
  10617. {f: 3, c: 27606}, 27832, 29749, 30202, 30738, 30865, 31189, 31192, 31875,
  10618. 32203, 32737, 32933, 33086, 33218, 33778, 34586, 35048, 35513, 35692,
  10619. 36027, 37145, [12206, 38750], [12214, 39131], [12240, 40763], 22188, 23338,
  10620. 24428, 25996, 27315, 27567, 27996, 28657, 28693, 29277, 29613, 36007,
  10621. 36051, 38971, 24977, 27703, 32856, 39425, 20045, 20107, 20123, 20181,
  10622. 20282, 20284, 20351, 20447, 20735, 21490, 21496, 21766, 21987, 22235,
  10623. [12064, 22763], 22882, 23057, 23531, 23546, 23556, 24051, 24107, 24473,
  10624. 24605, 25448, 26012, 26031, 26614, 26619, 26797, 27515, 27801, 27863,
  10625. 28195, 28681, 29509, 30722, 31038, 31040, 31072, 31169, 31721, 32023,
  10626. 32114, 32902, 33293, 33678, 34001, 34503, 35039, 35408, 35422, 35613,
  10627. 36060, 36198, 36781, 37034, 39164, 39391, 40605, 21066, 26388, 20632,
  10628. 21034, [12077, 23665], 25955, 27733, 29642, 29987, 30109, 31639, 33948,
  10629. 37240, 38704, 20087, 25746, [27578, 63856], 29022, 34217, 19977, 26441,
  10630. 26862, 28183, 33439, 34072, 34923, 25591, 28545, 37394, 39087, 19978,
  10631. 20663, 20687, 20767, 21830, 21930, 22039, 23360, 23577, 23776, 24120,
  10632. 24202, 24224, 24258, 24819, 26705, 27233, 28248, 29245, 29248,
  10633. [29376, 63994], 30456, 31077, 31665, 32724, 35059, 35316, 35443, 35937,
  10634. 36062, 38684, [22622, 63852], 29885, 36093, 21959, 31329, [32034, 63850],
  10635. [12170, 33394], 29298, [12131, 29983], 29989, 31513, 22661, 22779, 23996,
  10636. 24207, 24246, 24464, 24661, 25234, 25471, 25933, 26257, 26329, 26360,
  10637. 26646, 26866, 29312, 29790, 31598, 32110, 32214, 32626, 32997, 33298,
  10638. 34223, 35199, 35475, 36893, 37604, [12233, 40653], [12239, 40736],
  10639. [12067, 22805], 22893, 24109, 24796, 26132, 26227, 26512, 27728, 28101,
  10640. 28511, [12143, 30707], 30889, 33990, 37323, 37675, 20185, 20682, 20808,
  10641. 21892, 23307, 23459, 25159, 25982, 26059, 28210, 29053, 29697, 29764,
  10642. 29831, 29887, 30316, 31146, 32218, 32341, 32680, 33146, 33203, 33337,
  10643. 34330, 34796, 35445, 36323, 36984, 37521, 37925, 39245, 39854, 21352,
  10644. 23633, 26964, 27844, 27945, 28203, [12166, 33292], 34203, 35131, 35373,
  10645. [35498, 63855, 63905], 38634, 40807, 21089, 26297, 27570, 32406, 34814,
  10646. 36109, 38275, 38493, 25885, 28041, 29166, 22478, 22995, 23468, 24615,
  10647. 24826, 25104, 26143, 26207, 29481, 29689, 30427, [30465, 63853], 31596,
  10648. 32854, 32882, 33125, 35488, 37266, 19990, 21218, 27506, 27927, 31237,
  10649. 31545, 32048, 36016, 21484, 22063, 22609, 23477, [12073, 23567], 23569,
  10650. 24034, 25152, 25475, 25620, 26157, 26803, 27836, 28040, 28335, 28703,
  10651. 28836, 29138, 29990, 30095, 30094, 30233, 31505, 31712, 31787, 32032,
  10652. 32057, 34092, 34157, 34311, 35380, 36877, 36961, 37045, 37559, 38902,
  10653. 39479, 20439, 23660, 26463, 28049, 31903, 32396, 35606, 36118, 36895,
  10654. 23403, 24061, 25613, 33984, 36956, 39137, [29575, 63841, 63963], 23435,
  10655. 24730, 26494, 28126, 35359, 35494, 36865, 38924, 21047, 28753, 30862,
  10656. 37782, 34928, 37335, 20462, 21463, 22013, 22234, 22402, 22781, 23234,
  10657. 23432, 23723, 23744, 24101, 24833, 25101, [12095, 25163], 25480, 25628,
  10658. 25910, [25976, 63849], 27193, 27530, [12116, 27700], 27929, 28465, 29159,
  10659. 29417, 29560, 29703, 29874, 30246, 30561, 31168, 31319, 31466, 31929,
  10660. 32143, 32172, 32353, 32670, 33065, 33585, 33936, 34010, 34282, 34966,
  10661. 35504, 35728, 36664, 36930, 36995, 37228, 37526, 37561, 38539,
  10662. {f: 2, c: 38567}, 38614, 38656, 38920, [12216, 39318], 39635, 39706, 21460,
  10663. 22654, 22809, 23408, 23487, 28113, 28506, 29087, 29729, 29881, 32901,
  10664. 33789, 24033, 24455, 24490, 24642, 26092, 26642, 26991, 27219, 27529,
  10665. 27957, 28147, 29667, 30462, 30636, 31565, 32020, 33059, 33308, 33600,
  10666. 34036, 34147, 35426, 35524, 37255, 37662, 38918, 39348, 25100, 34899,
  10667. 36848, 37477, 23815, 23847, 23913, 29791, 33181, 34664, 28629,
  10668. [25342, 63859], 32722, 35126, 35186, 19998, 20056, 20711, 21213, 21319,
  10669. 25215, 26119, 32361, 34821, 38494, 20365, 21273, 22070, 22987, 23204,
  10670. [12075, 23608], 23630, 23629, 24066, 24337, 24643, 26045, 26159, 26178,
  10671. 26558, 26612, 29468, [12142, 30690], [12144, 31034], 32709, 33940, 33997,
  10672. 35222, 35430, 35433, 35553, [12183, 35925], 35962, 22516, 23508, 24335,
  10673. 24687, 25325, 26893, 27542, 28252, 29060, 31698, 34645, [35672, 63996],
  10674. 36606, [12215, 39135], 39166, 20280, 20353, 20449, 21627, 23072, 23480,
  10675. 24892, 26032, 26216, 29180, 30003, 31070, 32051, 33102, [12162, 33251],
  10676. 33688, 34218, 34254, 34563, 35338, [12189, 36523], [12191, 36763], 36805,
  10677. 22833, 23460, 23526, 24713, 23529, 23563, [12092, 24515], 27777, 28145,
  10678. 28683, 29978, 33455, 35574, [20160, 63997], [12055, 21313], 38617,
  10679. [12114, 27663], 20126, 20420, 20818, 21854, 23077, 23784, 25105,
  10680. [12123, 29273], 33469, 33706, 34558, 34905, 35357, 38463, 38597, 39187,
  10681. 40201, 40285, 22538, 23731, 23997, 24132, [24801, 63929], 24853, 25569,
  10682. [27138, 63764, 63836, 63935], 28197, 37122, 37716, 38990, 39952, 40823,
  10683. 23433, 23736, 25353, 26191, 26696, 30524, 38593, 38797, 38996, 39839,
  10684. 26017, 35585, 36555, 38332, 21813, 23721, 24022, 24245, 26263, 30284,
  10685. 33780, 38343, 22739, 25276, 29390, 40232, 20208, 22830, 24591, 26171,
  10686. 27523, 31207, 40230, 21395, 21696, 22467, 23830, 24859, 26326, 28079,
  10687. 30861, 33406, 38552, 38724, 21380, 25212, 25494, 28082, 32266, 33099,
  10688. 38989, 27387, 32588, 40367, 40474, 20063, 20539, 20918, 22812, 24825,
  10689. 25590, 26928, 29242, 32822, 37326, 24369, 32004, [33509, 63860], 33903,
  10690. 33979, 34277, 36493, 20335, 22756, 23363, 24665, 25562, 25880, 25965,
  10691. 26264, 26954, 27171, 27915, 28673, 29036, 30162, 30221, 31155, 31344,
  10692. [12154, 32650], 35140, 35731, 37312, 38525, 39178, 22276, 24481, 26044,
  10693. 28417, 30208, 31142, 35486, 39341, [12226, 39770], 40812, 20740, 25014,
  10694. 25233, 27277, 33222, 20547, 22576, 24422, 28937, [12180, 35328], 35578,
  10695. 23420, 34326, 20474, 20796, 22196, 22852, 25513, 28153, 23978, 26989,
  10696. 20870, 20104, 20313, 22914, 27487, 27741, 29877, 30998, 33287, 33349,
  10697. 33593, 36671, 36701, 39192, 20134, 22495, 24441, [26131, 63968], 30123,
  10698. 32377, 35695, 36870, 39515, 22181, 22567, 23032, 23071, 23476, 24310,
  10699. 25424, 25403, 26941, 27783, 27839, 28046, 28051, 28149, 28436, 28895,
  10700. 28982, 29017, 29123, 29141, 30799, 30831, 31605, 32227, 32303, 34893,
  10701. 36575, 37467, 40182, 24709, 28037, 29105, 38321, 21421, 26579, 28814,
  10702. 28976, 29744, 33398, 33490, 38331, 39653, 40573, 26308, 29121,
  10703. [33865, 63854], 22603, 23992, 24433, 26144, 26254, 27001, 27054, 27704,
  10704. 27891, 28214, 28481, 28634, 28699, 28719, 29008, 29151, 29552, 29787,
  10705. 29908, 30408, 31310, 32403, 33521, 35424, 36814, 37704, 38681, 20034,
  10706. 20522, 21000, 21473, 26355, 27757, 28618, 29450, 30591, 31330, 33454,
  10707. 34269, 34306, 35028, 35427, 35709, 35947, 37555, 38675, 38928, 20116,
  10708. 20237, 20425, 20658, 21320, 21566, 21555, 21978, 22626, 22714, 22887,
  10709. 23067, 23524, 24735, 25034, 25942, 26111, 26212, 26791, 27738, 28595,
  10710. 28879, 29100, 29522, 31613, 34568, 35492, 39986, 40711, 23627, 27779,
  10711. 29508, [12127, 29577], 37434, 28331, 29797, 30239, 31337, 32277, 34314,
  10712. 20800, 22725, 25793, 29934, 29973, 30320, 32705, 37013, 38605, 39252,
  10713. 28198, [12129, 29926], {f: 2, c: 31401}, 33253, 34521, 34680, 35355, 23113,
  10714. 23436, 23451, 26785, 26880, 28003, 29609, 29715, 29740, 30871, 32233,
  10715. 32747, 33048, 33109, 33694, 35916, [38446, 63942], 38929, [12104, 26352],
  10716. 24448, 26106, 26505, 27754, 29579, 20525, 23043, 27498, 30702, 22806,
  10717. 23916, 24013, 29477, 30031, 20709, 20985, 22575, 22829, 22934, 23002,
  10718. 23525, 23970, 25303, 25622, 25747, 25854, 26332, 27208, 29183, 29796,
  10719. 31368, 31407, 32327, 32350, 32768, 33136, 34799, 35201, 35616, 36953,
  10720. 36992, 39250, 24958, 27442, 28020, 32287, 35109, 36785, 20433, 20653,
  10721. 20887, 21191, 22471, 22665, 23481, 24248, 24898, 27029, 28044, 28263,
  10722. 28342, 29076, 29794, [12132, 29992], 29996, 32883, 33592, 33993, 36362,
  10723. 37780, 37854, 20110, 20305, 20598, 20778, [12060, 21448], 21451, 21491,
  10724. 23431, 23507, 23588, 24858, 24962, 26100, [12124, 29275], 29591, 29760,
  10725. 30402, 31056, 31121, 31161, 32006, [12155, 32701], 33419, 34261, 34398,
  10726. 36802, 36935, 37109, 37354, 38533, [12204, 38632], 38633, 21206, 24423,
  10727. 26093, 26161, 26671, 29020, 31286, 37057, 38922, 20113, 27218, 27550,
  10728. 28560, 29065, 32792, 33464, 34131, 36939, 38549, 38642, 38907, 34074,
  10729. 39729, 20112, 29066, 38596, 20803, 21407, 21729, 22291, 22290, 22435,
  10730. 23195, 23236, 23491, 24616, 24895, 25588, 27781, 27961, 28274, 28304,
  10731. 29232, 29503, 29783, 33489, 34945, 36677, 36960, 38498, 39000, 40219,
  10732. [12105, 26376], 36234, 37470, 20301, 20553, 20702, 21361, 22285, 22996,
  10733. 23041, 23561, 24944, 26256, 28205, 29234, 29771, 32239, 32963, 33806,
  10734. 33894, 34111, 34655, 34907, 35096, 35586, 36949, [12209, 38859], 39759,
  10735. 20083, 20369, 20754, 20842, 21807, 21929, 23418, 23461, {f: 2, c: 24188},
  10736. 24254, 24736, 24799, {f: 2, c: 24840}, 25540, 25912, 26377, 26580, 26586,
  10737. {f: 2, c: 26977}, 27833, 27943, 28216, 28641, {f: 2, c: 29494}, 29788,
  10738. 30001, 30290, 32173, 33278, 33848, 35029, 35480, 35547, 35565, 36400,
  10739. 36418, 36938, 36926, 36986, [12195, 37193], 37321, 37742, 22537, 27603,
  10740. [12161, 32905], 32946, 20801, 22891, 23609, 28516, 29607, 32996, 36103,
  10741. 37399, 38287, [12160, 32895], 25102, 28700, 32104, 34701, 22432, 24681,
  10742. 24903, 27575, 35518, 37504, 38577, [12036, 20057], 21535, 28139, 34093,
  10743. 38512, [12211, 38899], 39150, 25558, 27875, [12194, 37009], 20957, 25033,
  10744. 33210, 40441, 20381, 20506, 20736, 23452, 24847, 25087, 25836, 26885,
  10745. 27589, 30097, 30691, 32681, 33380, 34191, 34811, [12176, 34915], 35516,
  10746. 35696, 37291, [12038, 20108], 20197, 20234, 22839, 23016, 24050, 24347,
  10747. 24411, 24609, 29246, 29669, [30064, 63842], 30157, 31227, [12157, 32780],
  10748. [12159, 32819], 32900, 33505, 33617, 36029, 36019, 36999, 39156, 39180,
  10749. 28727, 30410, 32714, 32716, 32764, 35610, [12040, 20154], 20161, 20995,
  10750. 21360, [21693, 63902], 22240, 23035, 23493, 24341, 24525, 28270, 32106,
  10751. 33589, 34451, 35469, 38765, 38775, [12032, 19968], 20314, 20350, 22777,
  10752. [12103, 26085], 28322, 36920, 37808, 39353, 20219, 22764, 22922, 23001,
  10753. 24641, 31252, 33615, 36035, [12042, 20837], 21316, 20173, 21097, 23381,
  10754. 33471, 20180, [21050, 63999], 21672, 22985, 23039, [12070, 23376], 23383,
  10755. 23388, 24675, 24904, 28363, [28825, 63995], 29038, 29574, 29943, 30133,
  10756. 30913, 32043, 32773, [12163, 33258], 33576, 34071, 34249, 35566, 36039,
  10757. 38604, 20316, 21242, 22204, 26027, 26152, 28796, 28856, 29237, 32189,
  10758. 33421, 37196, 38592, 40306, 23409, 26855, 27544, 28538, 30430, 23697,
  10759. 26283, 28507, 31668, 31786, 34870, 38620, 19976, 20183, 21280, 22580,
  10760. 22715, 22767, 22892, 23559, 24115, 24196, 24373, 25484, 26290, 26454,
  10761. 27167, 27299, 27404, 28479, 29254, 29520, 29835, 31456, 31911, 33144,
  10762. 33247, 33255, 33674, 33900, 34083, 34196, 34255, 35037, 36115, 37292,
  10763. [12199, 38263], 38556, 20877, 21705, 22312, 23472, 25165, 26448, 26685,
  10764. 26771, 28221, 28371, 28797, 32289, 35009, 36001, 36617, 40779, 40782,
  10765. 29229, 31631, 35533, 37658, 20295, 20302, 20786, 21632, 22992, 24213,
  10766. 25269, 26485, 26990, 27159, 27822, 28186, 29401, 29482, 30141, 31672,
  10767. 32053, 33511, 33785, 33879, 34295, 35419, 36015, 36487, 36889, 37048,
  10768. 38606, 40799, 21219, 21514, 23265, 23490, 25688, 25973, 28404, 29380,
  10769. 30340, 31309, 31515, 31821, 32318, 32735, 33659, 35627, 36042,
  10770. [12186, 36196], 36321, 36447, 36842, 36857, 36969, 37841, 20291, 20346,
  10771. 20659, 20840, 20856, 21069, 21098, 22625, 22652, 22880, 23560, 23637,
  10772. 24283, 24731, 25136, 26643, 27583, 27656, 28593, 29006, 29728,
  10773. [12133, 30000], 30008, 30033, 30322, 31564, 31627, 31661, 31686, 32399,
  10774. 35438, 36670, 36681, 37439, 37523, 37666, 37931, 38651, 39002, 39019,
  10775. 39198, [20999, 64000], 25130, 25240, 27993, 30308, 31434, 31680, 32118,
  10776. 21344, 23742, 24215, 28472, 28857, 31896, 38673, 39822, 40670, 25509,
  10777. 25722, 34678, 19969, 20117, 20141, 20572, 20597, 21576, 22979, 23450,
  10778. 24128, 24237, 24311, 24449, 24773, 25402, 25919, 25972, 26060, 26230,
  10779. 26232, 26622, 26984, 27273, 27491, 27712, 28096, 28136, 28191, 28254,
  10780. 28702, 28833, 29582, 29693, 30010, 30555, 30855, 31118, 31243, 31357,
  10781. 31934, 32142, 33351, 35330, 35562, 35998, 37165, 37194, 37336, 37478,
  10782. 37580, 37664, 38662, 38742, 38748, 38914, [12237, 40718], 21046, 21137,
  10783. 21884, 22564, 24093, 24351, 24716, 25552, 26799, 28639, 31085, 31532,
  10784. 33229, 34234, 35069, 35576, 36420, 37261, 38500, 38555, 38717, 38988,
  10785. [12241, 40778], 20430, 20806, 20939, 21161, 22066, 24340, 24427, 25514,
  10786. 25805, 26089, 26177, 26362, 26361, 26397, 26781, 26839, 27133, 28437,
  10787. 28526, 29031, 29157, [12118, 29226], 29866, 30522, 31062, 31066, 31199,
  10788. 31264, 31381, 31895, 31967, 32068, 32368, 32903, 34299, 34468, 35412,
  10789. 35519, 36249, 36481, 36896, 36973, 37347, 38459, 38613, [12227, 40165],
  10790. 26063, 31751, [12188, 36275], 37827, 23384, 23562, 21330, 25305, 29469,
  10791. 20519, 23447, 24478, 24752, 24939, 26837, 28121, 29742, 31278, 32066,
  10792. 32156, 32305, 33131, 36394, 36405, 37758, 37912, 20304, 22352, 24038,
  10793. 24231, 25387, 32618, 20027, 20303, 20367, 20570, 23005, 32964, 21610,
  10794. 21608, 22014, 22863, 23449, 24030, 24282, 26205, 26417, 26609, 26666,
  10795. 27880, 27954, 28234, 28557, 28855, 29664, 30087, 31820, 32002, 32044,
  10796. 32162, [12168, 33311], 34523, 35387, 35461, [12187, 36208], 36490, 36659,
  10797. 36913, 37198, 37202, 37956, 39376, [12149, 31481], 31909, 20426, 20737,
  10798. 20934, 22472, 23535, 23803, 26201, 27197, 27994, 28310, 28652, 28940,
  10799. 30063, 31459, 34850, 36897, 36981, 38603, 39423, 33537, 20013, 20210,
  10800. 34886, 37325, 21373, 27355, 26987, 27713, 33914, 22686, 24974, 26366,
  10801. 25327, 28893, 29969, 30151, 32338, 33976, 35657, 36104, 20043, 21482,
  10802. 21675, 22320, 22336, 24535, 25345, 25351, 25711, [12096, 25903], 26088,
  10803. 26234, 26525, 26547, [12108, 27490], 27744, 27802, 28460, 30693, 30757,
  10804. 31049, 31063, 32025, 32930, 33026, [12164, 33267], 33437, 33463, 34584,
  10805. 35468, 36100, 36286, 36978, 30452, 31257, 31287, 32340, 32887, 21767,
  10806. 21972, 22645, 25391, 25634, 26185, 26187, 26733, 27035, 27524, 27941,
  10807. 28337, 29645, 29800, 29857, 30043, 30137, 30433, 30494, 30603, 31206,
  10808. 32265, 32285, 33275, 34095, 34967, 35386, 36049, 36587,
  10809. [12192, 36784, 63857], 36914, 37805, 38499, 38515, 38663, 20356, 21489,
  10810. 23018, 23241, 24089, 26702, 29894, 30142, 31209, 31378, 33187, 34541,
  10811. 36074, 36300, 36845, 26015, 26389, 22519, 28503, 32221, 36655, 37878,
  10812. 38598, 24501, 25074, 28548, 19988, 20376, 20511, 21449, 21983, 23919,
  10813. 24046, 27425, 27492, 30923, 31642, 36425, [12190, 36554, 63746], 36974,
  10814. 25417, 25662, 30528, 31364, 37679, 38015, 40810, 25776, 28591, 29158,
  10815. 29864, 29914, 31428, 31762, 32386, 31922, 32408, 35738, 36106, 38013,
  10816. 39184, 39244, 21049, 23519, 25830, 26413, 32046, 20717, [21443, 63851],
  10817. 22649, {f: 2, c: 24920}, 25082, 26028, 31449, 35730, 35734, 20489, 20513,
  10818. 21109, 21809, 23100, 24288, 24432, 24884, 25950, 26124, 26166, 26274,
  10819. 27085, 28356, 28466, 29462, 30241, 31379, 33081, 33369, 33750, 33980,
  10820. 20661, 22512, 23488, 23528, 24425, 25505, 30758, 32181, 33756, 34081,
  10821. 37319, 37365, 20874, 26613, 31574, 36012, 20932, 22971, 24765, 34389,
  10822. 20508, 21076, 23610, 24957, 25114, [25299, 64002], 25842, 26021, 28364,
  10823. 30240, 33034, 36448, 38495, 38587, 20191, 21315, 21912, 22825, 24029,
  10824. 25797, 27849, 28154, 29588, 31359, [12167, 33307], 34214, 36068, 36368,
  10825. 36983, 37351, 38369, 38433, 38854, 20984, 21746, 21894, 24505, 25764,
  10826. 28552, 32180, 36639, 36685, 37941, 20681, 23574, 27838, 28155, 29979,
  10827. 30651, 31805, 31844, 35449, 35522, 22558, 22974, 24086, 25463, 29266,
  10828. 30090, 30571, 35548, 36028, 36626, 24307, 26228, 28152, 32893, 33729,
  10829. 35531, [12205, 38737], 39894, 21059, 26367, 28053, 28399, 32224, 35558,
  10830. 36910, 36958, 39636, 21021, 21119, 21736, 24980, 25220, 25307, 26786,
  10831. 26898, 26970, 27189, 28818, 28966, 30813, 30977, 30990, 31186, 31245,
  10832. 32918, [12171, 33400], 33493, 33609, 34121, 35970, 36229, 37218, 37259,
  10833. 37294, 20419, 22225, 29165, 30679, 34560, 35320, [12072, 23544], 24534,
  10834. 26449, 37032, 21474, 22618, 23541, 24740, 24961, 25696, 32317, 32880,
  10835. 34085, 37507, 25774, 20652, 23828, 26368, 22684, 25277, 25512, 26894,
  10836. 27000, 27166, 28267, 30394, 31179, 33467, 33833, 35535, 36264, 36861,
  10837. 37138, 37195, 37276, 37648, 37656, 37786, 38619, 39478, 39949, 19985,
  10838. 30044, 31069, 31482, 31569, 31689, 32302, 33988, 36441, 36468, 36600,
  10839. 36880, 26149, 26943, 29763, 20986, 26414, 40668, 20805, 24544, 27798,
  10840. 34802, 34909, 34935, 24756, 33205, 33795, 36101, 21462, 21561, 22068,
  10841. 23094, 23601, 28810, 32736, 32858, 33030, 33261, 36259, 37257, 39519,
  10842. 40434, 20596, 20164, 21408, 24827, 28204, 23652, 20360, 20516, 21988,
  10843. 23769, 24159, 24677, 26772, 27835, 28100, 29118, 30164, 30196, 30305,
  10844. 31258, 31305, 32199, 32251, 32622, 33268, 34473, 36636, 38601, 39347,
  10845. [12242, 40786], 21063, 21189, 39149, 35242, 19971, 26578, 28422, 20405,
  10846. 23522, 26517, [27784, 63858], 28024, 29723, 30759, 37341, 37756, 34756,
  10847. 31204, 31281, 24555, 20182, 21668, 21822, 22702, 22949, 24816, 25171,
  10848. 25302, 26422, 26965, 33333, 38464, 39345, 39389, 20524, 21331, 21828,
  10849. 22396, 25176, 25826, 26219, 26589, 28609, 28655, 29730, 29752, 35351,
  10850. 37944, 21585, 22022, 22374, 24392, 24986, 27470, 28760, 28845, 32187,
  10851. 35477, 22890, 33067, 25506, 30472, 32829, 36010, 22612, 25645, 27067,
  10852. 23445, 24081, 28271, 34153, 20812, 21488, 22826, 24608, 24907, 27526,
  10853. 27760, 27888, 31518, 32974, 33492, 36294, 37040, 39089, 25799, 28580,
  10854. 25745, 25860, 20814, 21520, [12063, 22303], 35342, 24927, 26742, 30171,
  10855. 31570, 32113, 36890, 22534, 27084, 33151, 35114, 36864, 38969, 20600,
  10856. 22871, 22956, 25237, 36879, 39722, 24925, 29305, 38358, 22369, 23110,
  10857. 24052, 25226, 25773, 25850, 26487, 27874, 27966, 29228, 29750, 30772,
  10858. 32631, 33453, 36315, 38935, 21028, 22338, 26495, 29256, 29923, 36009,
  10859. 36774, 37393, 38442, [12043, 20843], 21485, 25420, 20329, 21764, 24726,
  10860. 25943, 27803, 28031, 29260, 29437, 31255, 35207, [12185, 35997], 24429,
  10861. 28558, 28921, 33192, 24846, [20415, 63845], 20559, 25153, [12122, 29255],
  10862. 31687, 32232, 32745, 36941, 38829, 39449, 36022, 22378, 24179, 26544,
  10863. 33805, 35413, 21536, 23318, 24163, 24290, 24330, 25987, 32954, 34109,
  10864. 38281, 38491, 20296, 21253, 21261, 21263, 21638, 21754, 22275, 24067,
  10865. 24598, 25243, 25265, 25429, 27873, 28006, 30129, 30770, 32990, 33071,
  10866. 33502, 33889, 33970, 34957, 35090, 36875, 37610, 39165, 39825, 24133,
  10867. [26292, 64006], 26333, 28689, 29190, 20469, 21117, 24426, 24915, 26451,
  10868. 27161, 28418, 29922, 31080, 34920, 35961, 39111, 39108, 39491, 21697,
  10869. 31263, 26963, 35575, 35914, [12213, 39080], 39342, 24444, 25259, 30130,
  10870. [12138, 30382], 34987, 36991, 38466, 21305, 24380, 24517, [27852, 63848],
  10871. 29644, 30050, [12134, 30091], 31558, 33534, 39325, 20047, 36924, 19979,
  10872. 20309, 21414, 22799, 24264, 26160, 27827, 29781, 33655, 34662, 36032,
  10873. 36944, 38686, 39957, 22737, 23416, 34384, 35604, 40372, 23506, 24680,
  10874. 24717, 26097, 27735, 28450, 28579, 28698, 32597, 32752, {f: 2, c: 38289},
  10875. 38480, 38867, 21106, 36676, 20989, 21547, 21688, 21859, 21898, 27323,
  10876. 28085, 32216, 33382, 37532, 38519, 40569, 21512, 21704, 30418, 34532,
  10877. 38308, 38356, 38492, 20130, 20233, 23022, 23270, 24055, 24658, 25239,
  10878. 26477, 26689, 27782, 28207, 32568, 32923, 33322, 38917, 20133, 20565,
  10879. 21683, 22419, 22874, 23401, 23475, 25032, 26999, 28023, 28707, 34809,
  10880. 35299, 35442, 35559, 36994, 39405, 39608, 21182, 26680, 20502, 24184,
  10881. 26447, 33607, [12175, 34892, 64008], 20139, 21521, 22190, 29670, 37141,
  10882. 38911, 39177, 39255, [12217, 39321], 22099, 22687, 34395, 35377, 25010,
  10883. 27382, 29563, 36562, 27463, 38570, 39511, 22869, 29184, 36203,
  10884. [12208, 38761], 20436, 23796, 24358, 25080, 26203, 27883, 28843,
  10885. [12126, 29572], 29625, 29694, 30505, 30541, 32067, 32098, 32291, 33335,
  10886. 34898, 36066, 37449, 39023, 23377, [12147, 31348], [12174, 34880],
  10887. [12212, 38913], 23244, 20448, 21332, 22846, 23805, 25406, 28025, 29433,
  10888. 33029, 33031, 33698, 37583, 38960, 20136, 20804, 21009, 22411, 24418,
  10889. 27842, 28366, 28677, 28752, 28847, 29074, 29673, [29801, 63918], 33610,
  10890. 34722, 34913, 36872, 37026, 37795, 39336, 20846, 24407, 24800, 24935,
  10891. 26291, 34137, 36426, 37295, 38795, 20046, 20114, 21628, 22741, 22778,
  10892. 22909, 23733, 24359, [12094, 25142], 25160, 26122, 26215, 27627, 28009,
  10893. 28111, 28246, 28408, 28564, 28640, 28649, 28765, 29392, 29733, 29786,
  10894. 29920, 30355, 31068, 31946, 32286, 32993, 33446, 33899, 33983, 34382,
  10895. 34399, 34676, 35703, 35946, 37804, 38912, 39013, 24785, 25110, 37239,
  10896. 23130, 26127, 28151, 28222, 29759, 39746, 24573, 24794, 31503, 21700,
  10897. 24344, 27742, 27859, 27946, 28888, 32005, 34425, 35340, 40251, 21270,
  10898. 21644, 23301, 27194, [12117, 28779], 30069, 31117, [12146, 31166], 33457,
  10899. 33775, 35441, 35649, 36008, 38772, 25844, 25899, {f: 2, c: 30906}, 31339,
  10900. 20024, 21914, 22864, 23462, 24187, 24739, 25563, 27489, 26213, 26707,
  10901. 28185, 29029, 29872, 32008, 36996, 39529, 39973, 27963, [28369, 63748],
  10902. 29502, 35905, 38346, 20976, 24140, 24488, 24653, 24822, 24880, 24908,
  10903. {f: 2, c: 26179}, 27045, 27841, 28255, 28361, 28514, 29004, 29852, 30343,
  10904. 31681, 31783, 33618, 34647, 36945, 38541, [12232, 40643], 21295, 22238,
  10905. 24315, 24458, 24674, 24724, 25079, 26214, 26371, 27292, 28142, 28590,
  10906. 28784, 29546, 32362, 33214, 33588, 34516, 35496, 36036, 21123, 29554,
  10907. 23446, 27243, 37892, 21742, 22150, 23389, 25928, 25989, 26313, 26783,
  10908. 28045, 28102, [12120, 29243], 32948, 37237, 39501, 20399, 20505, 21402,
  10909. 21518, 21564, 21897, 21957, 24127, 24460, 26429, 29030, 29661, 36869,
  10910. 21211, 21235, 22628, 22734, 28932, 29071, 29179, 34224, 35347,
  10911. [26248, 63941], 34216, 21927, 26244, 29002, 33841, 21321, 21913, 27585,
  10912. 24409, 24509, 25582, 26249, 28999, 35569, 36637, 40638, 20241, 25658,
  10913. 28875, 30054, 34407, 24676, 35662, 40440, 20807, 20982, 21256, 27958,
  10914. 33016, [12234, 40657], 26133, 27427, 28824, 30165, 21507, 23673, 32007,
  10915. 35350, [12107, 27424], 27453, 27462, 21560, 24688, 27965, 32725, 33288,
  10916. 20694, 20958, 21916, 22123, 22221, 23020, 23305, 24076, 24985, 24984,
  10917. 25137, 26206, 26342, 29081, {f: 2, c: 29113}, 29351, 31143, 31232, 32690,
  10918. 35440, {s: 163}, {f: 4, c: 12310}, {s: 14}, 8223, 8219, {f: 2, c: 8314},
  10919. {s: 7}, 8316, 0, {f: 2, c: 8317}, {s: 23}, 700, {s: 44}, 8942, 8759,
  10920. {s: 20}, {f: 10, c: 10122}, {s: 36}, {f: 26, c: 9398}, {s: 61},
  10921. {f: 2, c: 8826}, {f: 2, c: 8910}, {f: 2, c: 8832}, {f: 4, c: 8816}, 0,
  10922. 8842, 0, 8843, {f: 2, c: 8822}, 8825, {f: 2, c: 8922}, {s: 5}, 8773, 8771,
  10923. 8776, 0, 8868, {s: 78}, 8244, {s: 11}, 9839, {s: 4}, 8258, {s: 4}, 10045,
  10924. 0, 0, 8226, {s: 4}, {f: 2, c: 8249}, {s: 16}, 10010, 10006, 0, 9711,
  10925. {s: 3}, 10070, 0, 9676, {s: 24}, 9775, {s: 6}, 12320, 0, {f: 10, c: 10102},
  10926. {s: 17}, 12306, 12342, {s: 13}, 8710, 0, 8735, 0, {f: 2, c: 8741}, 0, 8787,
  10927. 8785, {f: 2, c: 8806}, 8723, {f: 3, c: 8853}, 0, 8980, 0, 0, 8802, 0, 9649,
  10928. 0, 8738, 8784, 0, 0, 8867, 0, 0, {f: 2, c: 8814}, 8837, 8836, 8713, 8716,
  10929. {f: 2, c: 8891}, 8794, 8966, {s: 6}, 12958, 0, 8252, {s: 11}, 9702, {s: 3},
  10930. 9663, 9653, 9657, 9667, {s: 4}, 9674, 12849, 12857, 13259, {f: 5, c: 9327},
  10931. {s: 18}, 8656, 8655, 8653, {s: 37}, 8657, 8659, {s: 8}, 8626, 8625, 0,
  10932. 8628, 8624, 8627, {s: 14}, 8636, 8640, {s: 10}, {f: 2, c: 8644}, {s: 144},
  10933. {f: 5, c: 9347}, {s: 33}, 12948, {s: 15}, 12965, {s: 93}, 8672, 8674, 8673,
  10934. 8675, {s: 4}, 8678, 8680, 8679, 8681, {s: 20}, 9757, 9759, {s: 76}, 12944,
  10935. {f: 6, c: 12938}, {s: 15}, {f: 2, c: 12318}, 8246, 0, 8245, {s: 3}, 12540,
  10936. 0, 0, {f: 2, c: 44034}, {f: 2, c: 44037}, {f: 5, c: 44043}, 44056,
  10937. {f: 2, c: 44062}, {f: 3, c: 44065}, {f: 7, c: 44069}, 44078,
  10938. {f: 6, c: 44082}, {f: 2, c: 44090}, {f: 3, c: 44093}, {f: 10, c: 44097},
  10939. 44108, {f: 6, c: 44110}, {f: 3, c: 44117}, {f: 3, c: 44121},
  10940. {f: 19, c: 44125}, {f: 2, c: 44146}, {f: 2, c: 44149}, 44153,
  10941. {f: 5, c: 44155}, 44162, {f: 2, c: 44167}, {f: 3, c: 44173},
  10942. {f: 3, c: 44177}, {f: 7, c: 44181}, 44190, {f: 6, c: 44194}, 44203,
  10943. {f: 2, c: 44205}, {f: 7, c: 44209}, 44218, {f: 3, c: 44222},
  10944. {f: 2, c: 44226}, {f: 3, c: 44229}, {f: 3, c: 44233}, {f: 8, c: 44237},
  10945. 44246, {f: 8, c: 44248}, {f: 2, c: 44258}, {f: 2, c: 44261}, 44265, 44267,
  10946. {f: 2, c: 44269}, 44274, 44276, {f: 5, c: 44279}, {f: 2, c: 44286},
  10947. {f: 3, c: 44289}, 44293, {f: 5, c: 44295}, 44302, 44304, {f: 6, c: 44306},
  10948. {f: 3, c: 44313}, {f: 3, c: 44317}, {f: 8, c: 44321}, {f: 2, c: 44330},
  10949. {f: 6, c: 44334}, {f: 2, c: 44342}, {f: 3, c: 44345}, {f: 7, c: 44349},
  10950. 44358, 44360, {f: 6, c: 44362}, {f: 3, c: 44369}, {f: 3, c: 44373},
  10951. {f: 8, c: 44377}, 44386, {f: 8, c: 44388}, {f: 2, c: 44398},
  10952. {f: 2, c: 44401}, {f: 4, c: 44407}, 44414, 44416, {f: 5, c: 44419},
  10953. {f: 2, c: 44426}, {f: 3, c: 44429}, {f: 11, c: 44433}, {f: 6, c: 44446},
  10954. {f: 18, c: 44453}, {f: 8, c: 44472}, {f: 2, c: 44482}, {f: 3, c: 44485},
  10955. {f: 7, c: 44489}, 44498, {f: 8, c: 44500}, {f: 3, c: 44509},
  10956. {f: 3, c: 44513}, {f: 19, c: 44517}, {f: 2, c: 44538}, {f: 2, c: 44541},
  10957. {f: 6, c: 44546}, 44554, 44556, {f: 6, c: 44558}, {f: 27, c: 44565},
  10958. {f: 2, c: 44594}, {f: 2, c: 44597}, 44601, {f: 5, c: 44603}, 44610, 44612,
  10959. {f: 3, c: 44615}, 44619, 44623, {f: 3, c: 44625}, 44629, {f: 5, c: 44631},
  10960. 44638, {f: 3, c: 44642}, {f: 2, c: 44646}, {f: 2, c: 44650},
  10961. {f: 3, c: 44653}, {f: 7, c: 44657}, 44666, {f: 6, c: 44670},
  10962. {f: 6, c: 44678}, {f: 47, c: 44685}, 44735, {f: 3, c: 44737},
  10963. {f: 7, c: 44741}, 44750, {f: 6, c: 44754}, {f: 2, c: 44762},
  10964. {f: 11, c: 44765}, {f: 2, c: 44777}, 44780, {f: 6, c: 44782},
  10965. {f: 3, c: 44789}, {f: 3, c: 44793}, {f: 10, c: 44797}, {f: 4, c: 44809},
  10966. {f: 2, c: 44814}, {f: 27, c: 44817}, {f: 2, c: 44846}, 44849, 44851,
  10967. {f: 7, c: 44853}, 44862, 44864, {f: 4, c: 44868}, {f: 6, c: 44874},
  10968. {f: 11, c: 44881}, {f: 6, c: 44894}, {f: 19, c: 44902}, {f: 6, c: 44922},
  10969. {f: 3, c: 44929}, {f: 3, c: 44933}, {f: 7, c: 44937}, {f: 3, c: 44946},
  10970. {f: 6, c: 44950}, {f: 27, c: 44957}, {f: 2, c: 44986}, {f: 3, c: 44989},
  10971. {f: 6, c: 44993}, 45002, 45004, {f: 5, c: 45007}, {f: 7, c: 45013},
  10972. {f: 11, c: 45021}, {f: 6, c: 45034}, {f: 2, c: 45042}, {f: 3, c: 45045},
  10973. {f: 7, c: 45049}, {f: 2, c: 45058}, {f: 7, c: 45061}, {f: 3, c: 45069},
  10974. {f: 3, c: 45073}, {f: 7, c: 45077}, {f: 10, c: 45086}, {f: 27, c: 45097},
  10975. {f: 2, c: 45126}, 45129, 45131, 45133, {f: 4, c: 45135}, 45142, 45144,
  10976. {f: 3, c: 45146}, {f: 30, c: 45150}, {f: 2, c: 45182}, {f: 3, c: 45185},
  10977. {f: 7, c: 45189}, 45198, 45200, {f: 6, c: 45202}, 45211, {f: 2, c: 45213},
  10978. {f: 5, c: 45219}, 45226, 45232, 45234, {f: 2, c: 45238}, {f: 3, c: 45241},
  10979. {f: 7, c: 45245}, 45254, {f: 6, c: 45258}, {f: 2, c: 45266},
  10980. {f: 3, c: 45269}, {f: 7, c: 45273}, {f: 4, c: 45281}, {f: 34, c: 45286},
  10981. 45322, {f: 3, c: 45325}, 45329, {f: 4, c: 45332}, 45338, {f: 5, c: 45342},
  10982. {f: 2, c: 45350}, {f: 3, c: 45353}, {f: 7, c: 45357}, 45366,
  10983. {f: 6, c: 45370}, {f: 2, c: 45378}, {f: 3, c: 45381}, {f: 7, c: 45385},
  10984. {f: 2, c: 45394}, {f: 2, c: 45398}, {f: 3, c: 45401}, {f: 3, c: 45405},
  10985. {f: 23, c: 45409}, {f: 2, c: 45434}, {f: 3, c: 45437}, 45441,
  10986. {f: 5, c: 45443}, 45450, 45452, {f: 4, c: 45454}, {f: 3, c: 45461},
  10987. {f: 3, c: 45465}, {f: 11, c: 45469}, {f: 35, c: 45481}, {f: 3, c: 45517},
  10988. {f: 3, c: 45521}, {f: 7, c: 45525}, 45534, {f: 8, c: 45536},
  10989. {f: 2, c: 45546}, {f: 3, c: 45549}, {f: 8, c: 45553}, 45562, 45564,
  10990. {f: 6, c: 45566}, {f: 2, c: 45574}, {f: 2, c: 45577}, {f: 7, c: 45581},
  10991. 45590, 45592, {f: 6, c: 45594}, {f: 19, c: 45601}, {f: 7, c: 45621},
  10992. {f: 27, c: 45629}, {f: 3, c: 45657}, {f: 3, c: 45661}, {f: 7, c: 45665},
  10993. {f: 10, c: 45674}, {f: 6, c: 45686}, {f: 7, c: 45693}, {f: 3, c: 45702},
  10994. {f: 6, c: 45706}, {f: 2, c: 45714}, {f: 3, c: 45717}, {f: 5, c: 45723},
  10995. 45730, 45732, {f: 3, c: 45735}, 45739, {f: 3, c: 45741}, {f: 3, c: 45745},
  10996. {f: 19, c: 45749}, {f: 2, c: 45770}, {f: 3, c: 45773}, 45777,
  10997. {f: 5, c: 45779}, 45786, 45788, {f: 4, c: 45790}, 45795, 45799,
  10998. {f: 2, c: 45801}, {f: 3, c: 45808}, 45814, {f: 3, c: 45820},
  10999. {f: 2, c: 45826}, {f: 3, c: 45829}, {f: 7, c: 45833}, 45842,
  11000. {f: 6, c: 45846}, {f: 55, c: 45853}, 45911, {f: 2, c: 45913}, 45917,
  11001. {f: 4, c: 45920}, 45926, 45928, 45930, {f: 2, c: 45932}, 45935,
  11002. {f: 2, c: 45938}, {f: 3, c: 45941}, {f: 7, c: 45945}, 45954,
  11003. {f: 6, c: 45958}, {f: 3, c: 45965}, {f: 3, c: 45969}, {f: 11, c: 45973},
  11004. {f: 6, c: 45986}, {f: 3, c: 45993}, {f: 23, c: 45997}, {f: 2, c: 46022},
  11005. {f: 2, c: 46025}, 46029, 46031, {f: 3, c: 46033}, 46038, 46040, 46042,
  11006. 46044, {f: 2, c: 46046}, {f: 3, c: 46049}, {f: 3, c: 46053},
  11007. {f: 19, c: 46057}, {f: 19, c: 46077}, {f: 7, c: 46097}, {f: 3, c: 46105},
  11008. {f: 3, c: 46109}, {f: 7, c: 46113}, 46122, {f: 8, c: 46124},
  11009. {f: 27, c: 46133}, {f: 2, c: 46162}, {f: 3, c: 46165}, {f: 7, c: 46169},
  11010. 46178, 46180, {f: 6, c: 46182}, {f: 19, c: 46189}, {f: 7, c: 46209},
  11011. {f: 20, c: 46217}, {f: 6, c: 46238}, {f: 3, c: 46245}, {f: 3, c: 46249},
  11012. {f: 8, c: 46253}, 46262, 46264, {f: 6, c: 46266}, {f: 3, c: 46273},
  11013. {f: 3, c: 46277}, {f: 7, c: 46281}, {f: 4, c: 46289}, {f: 6, c: 46294},
  11014. {f: 2, c: 46302}, {f: 2, c: 46305}, 46309, {f: 5, c: 46311}, 46318, 46320,
  11015. {f: 6, c: 46322}, {f: 27, c: 46329}, {f: 2, c: 46358}, {f: 2, c: 46361},
  11016. {f: 7, c: 46365}, 46374, {f: 5, c: 46379}, {f: 2, c: 46386},
  11017. {f: 3, c: 46389}, {f: 7, c: 46393}, 46402, {f: 5, c: 46406},
  11018. {f: 2, c: 46414}, {f: 3, c: 46417}, {f: 7, c: 46421}, 46430,
  11019. {f: 62, c: 46434}, {f: 2, c: 46498}, {f: 3, c: 46501}, 46505,
  11020. {f: 4, c: 46508}, 46514, {f: 5, c: 46518}, {f: 2, c: 46526},
  11021. {f: 3, c: 46529}, {f: 7, c: 46533}, 46542, {f: 6, c: 46546},
  11022. {f: 19, c: 46553}, {f: 35, c: 46573}, {f: 2, c: 46610}, {f: 3, c: 46613},
  11023. {f: 12, c: 46617}, {f: 6, c: 46630}, {f: 7, c: 46637}, {f: 19, c: 46645},
  11024. {f: 27, c: 46665}, {f: 3, c: 46693}, {f: 51, c: 46697}, {f: 2, c: 46750},
  11025. {f: 3, c: 46753}, {f: 6, c: 46757}, {f: 4, c: 46765}, {f: 34, c: 46770},
  11026. {f: 27, c: 46805}, {f: 3, c: 46833}, {f: 3, c: 46837}, {f: 7, c: 46841},
  11027. {f: 3, c: 46850}, {f: 34, c: 46854}, {f: 2, c: 46890}, {f: 2, c: 46893},
  11028. {f: 7, c: 46897}, 46906, {f: 8, c: 46908}, {f: 3, c: 46917},
  11029. {f: 3, c: 46921}, {f: 7, c: 46925}, {f: 10, c: 46934}, {f: 3, c: 46945},
  11030. {f: 3, c: 46949}, {f: 7, c: 46953}, 46962, 46964, {f: 6, c: 46966},
  11031. {f: 2, c: 46974}, {f: 3, c: 46977}, {f: 7, c: 46981}, 46990,
  11032. {f: 3, c: 46995}, {f: 2, c: 47002}, {f: 3, c: 47005}, {f: 7, c: 47009},
  11033. 47018, {f: 6, c: 47022}, {f: 2, c: 47030}, {f: 14, c: 47033}, 47048,
  11034. {f: 34, c: 47050}, {f: 2, c: 47086}, {f: 3, c: 47089}, {f: 7, c: 47093},
  11035. 47102, {f: 5, c: 47106}, {f: 2, c: 47114}, {f: 3, c: 47117},
  11036. {f: 7, c: 47121}, 47130, 47132, {f: 6, c: 47134}, {f: 2, c: 47142},
  11037. {f: 3, c: 47145}, {f: 7, c: 47149}, 47158, {f: 6, c: 47162},
  11038. {f: 3, c: 47169}, {f: 12, c: 47173}, 47186, {f: 8, c: 47188},
  11039. {f: 2, c: 47198}, {f: 3, c: 47201}, {f: 7, c: 47205}, 47214, 47216,
  11040. {f: 6, c: 47218}, {f: 3, c: 47225}, {f: 16, c: 47229}, {f: 26, c: 47246},
  11041. {f: 7, c: 47273}, {f: 3, c: 47281}, {f: 3, c: 47285}, {f: 7, c: 47289},
  11042. 47298, 47300, {f: 6, c: 47302}, {f: 3, c: 47309}, {f: 3, c: 47313},
  11043. {f: 8, c: 47317}, 47326, 47328, {f: 6, c: 47330}, {f: 2, c: 47338},
  11044. {f: 3, c: 47341}, {f: 7, c: 47345}, 47354, 47356, {f: 6, c: 47358},
  11045. {f: 19, c: 47365}, {f: 7, c: 47385}, {f: 27, c: 47393}, {f: 2, c: 47422},
  11046. {f: 3, c: 47425}, {f: 7, c: 47429}, {f: 2, c: 47437}, 47440,
  11047. {f: 6, c: 47442}, {f: 2, c: 47450}, {f: 3, c: 47453}, {f: 7, c: 47457},
  11048. 47466, 47468, {f: 6, c: 47470}, {f: 2, c: 47478}, {f: 3, c: 47481},
  11049. {f: 7, c: 47485}, 47494, 47496, {f: 2, c: 47499}, {f: 29, c: 47503},
  11050. {f: 2, c: 47534}, {f: 3, c: 47537}, {f: 7, c: 47541}, 47550, 47552,
  11051. {f: 6, c: 47554}, {f: 2, c: 47562}, 47565, {f: 5, c: 47571}, 47578, 47580,
  11052. {f: 2, c: 47583}, 47586, {f: 2, c: 47590}, {f: 3, c: 47593},
  11053. {f: 7, c: 47597}, 47606, {f: 5, c: 47611}, {f: 6, c: 47618},
  11054. {f: 12, c: 47625}, {f: 34, c: 47638}, {f: 2, c: 47674}, {f: 3, c: 47677},
  11055. 47681, {f: 5, c: 47683}, 47690, 47692, {f: 4, c: 47695}, {f: 2, c: 47702},
  11056. {f: 3, c: 47705}, {f: 7, c: 47709}, 47718, {f: 6, c: 47722},
  11057. {f: 2, c: 47730}, {f: 3, c: 47733}, {f: 10, c: 47737}, 47750,
  11058. {f: 4, c: 47752}, {f: 27, c: 47757}, 47786, {f: 3, c: 47789}, 47793,
  11059. {f: 5, c: 47795}, 47802, 47804, {f: 6, c: 47806}, {f: 3, c: 47813},
  11060. {f: 15, c: 47817}, {f: 34, c: 47834}, {f: 3, c: 47869}, {f: 3, c: 47873},
  11061. {f: 8, c: 47877}, 47886, 47888, {f: 6, c: 47890}, {f: 3, c: 47897},
  11062. {f: 3, c: 47901}, {f: 8, c: 47905}, 47914, {f: 8, c: 47916}, 47927,
  11063. {f: 2, c: 47929}, {f: 5, c: 47935}, 47942, 47944, {f: 3, c: 47946}, 47950,
  11064. {f: 3, c: 47953}, {f: 3, c: 47957}, {f: 8, c: 47961}, 47970,
  11065. {f: 8, c: 47972}, {f: 27, c: 47981}, {f: 3, c: 48009}, {f: 3, c: 48013},
  11066. {f: 19, c: 48017}, {f: 3, c: 48037}, {f: 3, c: 48041}, {f: 7, c: 48045},
  11067. {f: 2, c: 48053}, {f: 8, c: 48056}, {f: 3, c: 48065}, {f: 3, c: 48069},
  11068. {f: 7, c: 48073}, {f: 2, c: 48081}, {f: 36, c: 48084}, {f: 2, c: 48122},
  11069. {f: 2, c: 48125}, 48129, {f: 5, c: 48131}, 48138, 48142, 48144,
  11070. {f: 2, c: 48146}, {f: 2, c: 48153}, {f: 4, c: 48160}, 48166, 48168,
  11071. {f: 3, c: 48170}, {f: 2, c: 48174}, {f: 2, c: 48178}, {f: 3, c: 48181},
  11072. {f: 7, c: 48185}, 48194, {f: 3, c: 48198}, {f: 2, c: 48202},
  11073. {f: 2, c: 48206}, {f: 12, c: 48209}, {f: 38, c: 48222}, {f: 2, c: 48262},
  11074. {f: 2, c: 48265}, 48269, {f: 5, c: 48271}, 48278, 48280, {f: 5, c: 48283},
  11075. {f: 2, c: 48290}, {f: 2, c: 48293}, {f: 7, c: 48297}, 48306,
  11076. {f: 6, c: 48310}, {f: 2, c: 48318}, {f: 3, c: 48321}, {f: 8, c: 48325},
  11077. 48334, {f: 3, c: 48338}, {f: 2, c: 48342}, {f: 3, c: 48345},
  11078. {f: 23, c: 48349}, 48375, {f: 3, c: 48377}, {f: 7, c: 48381}, 48390, 48392,
  11079. {f: 6, c: 48394}, {f: 3, c: 48401}, {f: 15, c: 48405}, {f: 7, c: 48421},
  11080. {f: 19, c: 48429}, {f: 7, c: 48449}, {f: 2, c: 48458}, {f: 3, c: 48461},
  11081. {f: 7, c: 48465}, {f: 10, c: 48474}, {f: 3, c: 48485}, {f: 23, c: 48489},
  11082. {f: 2, c: 48514}, {f: 2, c: 48517}, {f: 5, c: 48523}, 48530, 48532,
  11083. {f: 3, c: 48534}, 48539, {f: 7, c: 48541}, {f: 11, c: 48549},
  11084. {f: 7, c: 48561}, {f: 27, c: 48569}, {f: 2, c: 48598}, {f: 3, c: 48601},
  11085. {f: 12, c: 48605}, {f: 6, c: 48618}, {f: 3, c: 48625}, {f: 3, c: 48629},
  11086. {f: 7, c: 48633}, {f: 2, c: 48641}, 48644, {f: 6, c: 48646},
  11087. {f: 2, c: 48654}, {f: 3, c: 48657}, {f: 7, c: 48661}, 48670,
  11088. {f: 36, c: 48672}, {f: 2, c: 48710}, {f: 3, c: 48713}, 48717,
  11089. {f: 5, c: 48719}, 48726, 48728, {f: 4, c: 48732}, {f: 2, c: 48738},
  11090. {f: 3, c: 48741}, 48745, {f: 5, c: 48747}, 48754, {f: 5, c: 48758},
  11091. {f: 2, c: 48766}, {f: 3, c: 48769}, {f: 7, c: 48773}, 48782,
  11092. {f: 6, c: 48786}, {f: 14, c: 48794}, {f: 39, c: 48809}, {f: 2, c: 48850},
  11093. {f: 2, c: 48853}, {f: 7, c: 48857}, {f: 2, c: 48865}, {f: 6, c: 48870},
  11094. {f: 20, c: 48877}, {f: 6, c: 48898}, {f: 14, c: 48906}, 48922,
  11095. {f: 34, c: 48926}, {f: 2, c: 48962}, {f: 3, c: 48965}, {f: 7, c: 48969},
  11096. {f: 3, c: 48978}, {f: 62, c: 48982}, {f: 27, c: 49045}, {f: 20, c: 49073},
  11097. {f: 6, c: 49094}, {f: 2, c: 49102}, {f: 3, c: 49105}, {f: 7, c: 49109},
  11098. {f: 2, c: 49117}, 49120, {f: 90, c: 49122}, {f: 20, c: 49213},
  11099. {f: 6, c: 49234}, {f: 3, c: 49241}, {f: 3, c: 49245}, {f: 7, c: 49249},
  11100. {f: 38, c: 49258}, {f: 2, c: 49298}, {f: 3, c: 49301}, {f: 7, c: 49305},
  11101. 49314, 49316, {f: 6, c: 49318}, 49326, {f: 2, c: 49329}, {f: 5, c: 49335},
  11102. 49342, {f: 3, c: 49346}, {f: 2, c: 49350}, {f: 2, c: 49354},
  11103. {f: 3, c: 49357}, {f: 7, c: 49361}, 49370, {f: 6, c: 49374},
  11104. {f: 2, c: 49382}, {f: 3, c: 49385}, {f: 7, c: 49389}, 49398, 49400,
  11105. {f: 6, c: 49402}, {f: 3, c: 49409}, {f: 3, c: 49413}, {f: 7, c: 49417},
  11106. {f: 4, c: 49425}, {f: 6, c: 49430}, {f: 2, c: 49441}, 49445,
  11107. {f: 4, c: 49448}, 49454, {f: 4, c: 49458}, 49463, {f: 2, c: 49466},
  11108. {f: 3, c: 49469}, {f: 7, c: 49473}, 49482, {f: 6, c: 49486},
  11109. {f: 2, c: 49494}, {f: 3, c: 49497}, {f: 7, c: 49501}, 49510,
  11110. {f: 6, c: 49514}, {f: 3, c: 49521}, {f: 3, c: 49525}, {f: 12, c: 49529},
  11111. {f: 6, c: 49542}, 49551, {f: 3, c: 49553}, 49557, {f: 5, c: 49559}, 49566,
  11112. 49568, {f: 3, c: 49570}, {f: 2, c: 49574}, {f: 2, c: 49578},
  11113. {f: 3, c: 49581}, {f: 12, c: 49585}, {f: 6, c: 49598}, {f: 3, c: 49605},
  11114. {f: 3, c: 49609}, {f: 7, c: 49613}, {f: 2, c: 49621}, {f: 7, c: 49625},
  11115. {f: 3, c: 49633}, {f: 3, c: 49637}, {f: 7, c: 49641}, 49650,
  11116. {f: 8, c: 49652}, {f: 2, c: 49662}, {f: 3, c: 49665}, {f: 7, c: 49669},
  11117. 49678, 49680, {f: 6, c: 49682}, {f: 2, c: 49690}, {f: 2, c: 49693},
  11118. {f: 7, c: 49697}, 49706, 49708, 49710, 49712, 49715, {f: 19, c: 49717},
  11119. {f: 7, c: 49737}, {f: 2, c: 49746}, {f: 3, c: 49749}, {f: 7, c: 49753},
  11120. {f: 4, c: 49761}, {f: 6, c: 49766}, {f: 2, c: 49774}, {f: 3, c: 49777},
  11121. {f: 7, c: 49781}, 49790, 49792, {f: 6, c: 49794}, {f: 6, c: 49802},
  11122. {f: 7, c: 49809}, {f: 2, c: 49817}, 49820, {f: 6, c: 49822},
  11123. {f: 2, c: 49830}, {f: 3, c: 49833}, {f: 6, c: 49838}, 49846, 49848,
  11124. {f: 34, c: 49850}, {f: 2, c: 49886}, {f: 2, c: 49889}, {f: 6, c: 49893},
  11125. 49902, 49904, {f: 4, c: 49906}, 49911, 49914, {f: 3, c: 49917},
  11126. {f: 7, c: 49921}, {f: 2, c: 49930}, {f: 5, c: 49934}, {f: 2, c: 49942},
  11127. {f: 3, c: 49945}, {f: 7, c: 49949}, {f: 2, c: 49958}, {f: 27, c: 49962},
  11128. {f: 34, c: 49990}, {f: 2, c: 50026}, {f: 3, c: 50029}, 50033,
  11129. {f: 5, c: 50035}, {f: 2, c: 50042}, {f: 6, c: 50046}, {f: 3, c: 50053},
  11130. {f: 3, c: 50057}, {f: 51, c: 50061}, {f: 23, c: 50113}, {f: 2, c: 50138},
  11131. {f: 2, c: 50141}, 50145, {f: 5, c: 50147}, {f: 3, c: 50154},
  11132. {f: 6, c: 50158}, {f: 2, c: 50166}, {f: 15, c: 50169}, {f: 7, c: 50185},
  11133. {f: 19, c: 50193}, {f: 7, c: 50213}, {f: 3, c: 50221}, {f: 3, c: 50225},
  11134. {f: 7, c: 50229}, {f: 10, c: 50238}, {f: 27, c: 50249}, {f: 2, c: 50278},
  11135. {f: 3, c: 50281}, {f: 7, c: 50285}, {f: 3, c: 50294}, {f: 6, c: 50298},
  11136. {f: 19, c: 50305}, {f: 7, c: 50325}, {f: 27, c: 50333}, {f: 3, c: 50361},
  11137. {f: 44, c: 50365}, {f: 6, c: 50410}, {f: 2, c: 50418}, {f: 3, c: 50421},
  11138. 50425, {f: 4, c: 50427}, {f: 10, c: 50434}, {f: 3, c: 50445},
  11139. {f: 3, c: 50449}, {f: 7, c: 50453}, {f: 11, c: 50461}, {f: 2, c: 50474},
  11140. {f: 3, c: 50477}, {f: 7, c: 50481}, 50490, 50492, {f: 6, c: 50494},
  11141. {f: 2, c: 50502}, 50507, {f: 4, c: 50511}, 50518, {f: 3, c: 50522}, 50527,
  11142. {f: 2, c: 50530}, {f: 3, c: 50533}, {f: 7, c: 50537}, 50546,
  11143. {f: 6, c: 50550}, {f: 2, c: 50558}, {f: 3, c: 50561}, {f: 2, c: 50565},
  11144. {f: 4, c: 50568}, 50574, 50576, {f: 3, c: 50578}, 50582, {f: 3, c: 50585},
  11145. {f: 3, c: 50589}, {f: 8, c: 50593}, {f: 10, c: 50602}, {f: 2, c: 50614},
  11146. 50618, {f: 5, c: 50623}, 50635, 50637, 50639, {f: 2, c: 50642},
  11147. {f: 3, c: 50645}, {f: 7, c: 50649}, 50658, 50660, {f: 6, c: 50662}, 50671,
  11148. {f: 3, c: 50673}, 50677, {f: 4, c: 50680}, {f: 3, c: 50690},
  11149. {f: 3, c: 50697}, {f: 3, c: 50701}, {f: 7, c: 50705}, 50714,
  11150. {f: 7, c: 50717}, {f: 2, c: 50726}, {f: 3, c: 50729}, 50735,
  11151. {f: 2, c: 50737}, 50742, 50744, 50746, {f: 4, c: 50748}, {f: 2, c: 50754},
  11152. {f: 3, c: 50757}, {f: 7, c: 50761}, 50770, {f: 6, c: 50774},
  11153. {f: 2, c: 50782}, {f: 11, c: 50785}, {f: 2, c: 50797}, 50800,
  11154. {f: 6, c: 50802}, {f: 2, c: 50810}, {f: 3, c: 50813}, {f: 7, c: 50817},
  11155. 50826, 50828, {f: 6, c: 50830}, {f: 2, c: 50838}, {f: 3, c: 50841},
  11156. {f: 7, c: 50845}, 50854, 50856, {f: 6, c: 50858}, {f: 2, c: 50866},
  11157. {f: 3, c: 50869}, {f: 5, c: 50875}, 50882, 50884, {f: 6, c: 50886},
  11158. {f: 2, c: 50894}, {f: 3, c: 50897}, {f: 7, c: 50901}, {f: 2, c: 50910},
  11159. {f: 6, c: 50914}, {f: 2, c: 50922}, {f: 3, c: 50925}, {f: 7, c: 50929},
  11160. {f: 3, c: 50938}, {f: 6, c: 50942}, {f: 2, c: 50950}, {f: 3, c: 50953},
  11161. {f: 7, c: 50957}, 50966, 50968, {f: 6, c: 50970}, {f: 2, c: 50978},
  11162. {f: 3, c: 50981}, {f: 7, c: 50985}, 50994, 50996, 50998, {f: 4, c: 51000},
  11163. {f: 2, c: 51006}, {f: 3, c: 51009}, {f: 5, c: 51013}, 51019, 51022, 51024,
  11164. {f: 3, c: 51033}, {f: 3, c: 51037}, {f: 7, c: 51041}, {f: 2, c: 51049},
  11165. {f: 8, c: 51052}, {f: 2, c: 51062}, {f: 3, c: 51065}, {f: 4, c: 51071},
  11166. 51078, {f: 3, c: 51083}, 51087, {f: 2, c: 51090}, 51093, 51097,
  11167. {f: 5, c: 51099}, 51106, {f: 5, c: 51111}, {f: 2, c: 51118},
  11168. {f: 3, c: 51121}, {f: 7, c: 51125}, 51134, {f: 6, c: 51138},
  11169. {f: 2, c: 51146}, 51149, 51151, {f: 7, c: 51153}, {f: 4, c: 51161},
  11170. {f: 6, c: 51166}, {f: 3, c: 51173}, {f: 3, c: 51177}, {f: 19, c: 51181},
  11171. {f: 2, c: 51202}, {f: 3, c: 51205}, 51209, {f: 5, c: 51211}, 51218, 51220,
  11172. {f: 5, c: 51223}, {f: 2, c: 51230}, {f: 3, c: 51233}, {f: 7, c: 51237},
  11173. 51246, 51248, {f: 6, c: 51250}, {f: 3, c: 51257}, {f: 3, c: 51261},
  11174. {f: 7, c: 51265}, {f: 2, c: 51274}, {f: 6, c: 51278}, {f: 27, c: 51285},
  11175. {f: 2, c: 51314}, {f: 3, c: 51317}, 51321, {f: 5, c: 51323}, 51330, 51332,
  11176. {f: 3, c: 51336}, {f: 6, c: 51342}, {f: 8, c: 51349}, 51358, 51360,
  11177. {f: 6, c: 51362}, {f: 19, c: 51369}, {f: 6, c: 51390}, {f: 3, c: 51397},
  11178. {f: 3, c: 51401}, {f: 7, c: 51405}, 51414, 51416, {f: 6, c: 51418},
  11179. {f: 2, c: 51426}, {f: 16, c: 51429}, {f: 6, c: 51446}, {f: 2, c: 51454},
  11180. {f: 3, c: 51457}, {f: 5, c: 51463}, 51470, 51472, {f: 6, c: 51474},
  11181. {f: 19, c: 51481}, {f: 7, c: 51501}, {f: 27, c: 51509}, {f: 2, c: 51538},
  11182. {f: 3, c: 51541}, {f: 7, c: 51545}, 51554, {f: 8, c: 51556},
  11183. {f: 3, c: 51565}, {f: 3, c: 51569}, {f: 7, c: 51573}, {f: 11, c: 51581},
  11184. {f: 2, c: 51594}, {f: 3, c: 51597}, {f: 7, c: 51601}, 51610, 51612,
  11185. {f: 34, c: 51614}, {f: 2, c: 51650}, {f: 2, c: 51653}, 51657,
  11186. {f: 5, c: 51659}, 51666, 51668, {f: 2, c: 51671}, 51675, {f: 2, c: 51678},
  11187. 51681, 51683, {f: 2, c: 51685}, {f: 4, c: 51688}, 51694, {f: 6, c: 51698},
  11188. {f: 2, c: 51706}, {f: 3, c: 51709}, {f: 7, c: 51713}, 51722,
  11189. {f: 6, c: 51726}, {f: 3, c: 51733}, {f: 16, c: 51737}, {f: 34, c: 51754},
  11190. {f: 2, c: 51790}, {f: 3, c: 51793}, {f: 7, c: 51797}, 51806,
  11191. {f: 6, c: 51810}, {f: 20, c: 51817}, {f: 6, c: 51838}, {f: 19, c: 51845},
  11192. {f: 35, c: 51865}, {f: 2, c: 51902}, {f: 3, c: 51905}, {f: 7, c: 51909},
  11193. 51918, 51920, 51922, {f: 4, c: 51924}, {f: 6, c: 51930}, {f: 11, c: 51937},
  11194. {f: 7, c: 51949}, {f: 19, c: 51957}, {f: 7, c: 51977}, {f: 3, c: 51985},
  11195. {f: 3, c: 51989}, {f: 7, c: 51993}, {f: 31, c: 52002}, {f: 6, c: 52034},
  11196. {f: 2, c: 52042}, {f: 3, c: 52045}, {f: 7, c: 52049}, {f: 3, c: 52058},
  11197. {f: 6, c: 52062}, {f: 19, c: 52069}, {f: 34, c: 52090}, {f: 27, c: 52125},
  11198. {f: 27, c: 52153}, {f: 15, c: 52181}, {f: 2, c: 52197}, 52200,
  11199. {f: 34, c: 52202}, {f: 2, c: 52238}, {f: 3, c: 52241}, {f: 7, c: 52245},
  11200. {f: 3, c: 52254}, {f: 4, c: 52259}, {f: 2, c: 52266}, 52269, 52271,
  11201. {f: 7, c: 52273}, 52282, {f: 5, c: 52287}, {f: 2, c: 52294},
  11202. {f: 3, c: 52297}, {f: 7, c: 52301}, 52310, {f: 6, c: 52314},
  11203. {f: 3, c: 52321}, 52325, 52327, {f: 7, c: 52329}, {f: 4, c: 52337},
  11204. {f: 34, c: 52342}, {f: 2, c: 52378}, {f: 3, c: 52381}, {f: 7, c: 52385},
  11205. 52394, {f: 6, c: 52398}, {f: 2, c: 52406}, {f: 3, c: 52409},
  11206. {f: 7, c: 52413}, 52422, 52424, {f: 6, c: 52426}, {f: 3, c: 52433},
  11207. {f: 15, c: 52437}, {f: 7, c: 52453}, {f: 3, c: 52461}, {f: 16, c: 52465},
  11208. {f: 6, c: 52482}, {f: 2, c: 52490}, {f: 3, c: 52493}, {f: 7, c: 52497},
  11209. 52506, 52508, {f: 6, c: 52510}, {f: 3, c: 52517}, {f: 3, c: 52521},
  11210. {f: 12, c: 52525}, {f: 34, c: 52538}, {f: 3, c: 52573}, {f: 3, c: 52577},
  11211. {f: 7, c: 52581}, 52590, 52592, {f: 6, c: 52594}, {f: 15, c: 52601},
  11212. {f: 11, c: 52617}, {f: 2, c: 52630}, {f: 3, c: 52633}, {f: 7, c: 52637},
  11213. 52646, 52648, {f: 6, c: 52650}, {f: 19, c: 52657}, {f: 7, c: 52677},
  11214. {f: 3, c: 52685}, {f: 23, c: 52689}, {f: 3, c: 52713}, {f: 3, c: 52717},
  11215. {f: 7, c: 52721}, 52730, 52732, {f: 6, c: 52734}, {f: 3, c: 52741},
  11216. {f: 3, c: 52745}, {f: 7, c: 52749}, {f: 4, c: 52757}, {f: 6, c: 52762},
  11217. {f: 2, c: 52770}, {f: 3, c: 52773}, {f: 7, c: 52777}, 52786, 52788,
  11218. {f: 34, c: 52790}, {f: 2, c: 52826}, {f: 2, c: 52829}, {f: 6, c: 52834},
  11219. 52842, 52844, {f: 6, c: 52846}, {f: 2, c: 52854}, {f: 3, c: 52857},
  11220. {f: 7, c: 52861}, 52870, 52872, {f: 6, c: 52874}, {f: 2, c: 52882},
  11221. {f: 3, c: 52885}, {f: 7, c: 52889}, 52898, {f: 6, c: 52902},
  11222. {f: 19, c: 52910}, {f: 34, c: 52930}, {f: 2, c: 52966}, {f: 2, c: 52969},
  11223. {f: 7, c: 52973}, 52982, {f: 6, c: 52986}, {f: 2, c: 52994},
  11224. {f: 3, c: 52997}, {f: 7, c: 53001}, 53010, 53012, {f: 6, c: 53014},
  11225. {f: 3, c: 53021}, {f: 3, c: 53025}, {f: 7, c: 53029}, 53038,
  11226. {f: 6, c: 53042}, {f: 27, c: 53049}, {f: 2, c: 53078}, {f: 3, c: 53081},
  11227. {f: 7, c: 53085}, 53094, 53096, {f: 6, c: 53098}, {f: 2, c: 53106},
  11228. {f: 3, c: 53109}, {f: 7, c: 53113}, {f: 4, c: 53121}, {f: 6, c: 53126},
  11229. {f: 20, c: 53133}, {f: 6, c: 53154}, {f: 7, c: 53161}, {f: 19, c: 53169},
  11230. {f: 27, c: 53189}, {f: 2, c: 53218}, {f: 3, c: 53221}, {f: 7, c: 53225},
  11231. 53234, 53236, {f: 6, c: 53238}, {f: 3, c: 53245}, {f: 3, c: 53249},
  11232. {f: 12, c: 53253}, {f: 6, c: 53266}, {f: 20, c: 53273}, {f: 6, c: 53294},
  11233. {f: 2, c: 53302}, {f: 3, c: 53305}, {f: 7, c: 53309}, 53318, 53320,
  11234. {f: 6, c: 53322}, {f: 3, c: 53329}, {f: 3, c: 53333}, {f: 7, c: 53337},
  11235. {f: 11, c: 53345}, {f: 2, c: 53358}, {f: 3, c: 53361}, {f: 7, c: 53365},
  11236. {f: 3, c: 53374}, {f: 34, c: 53378}, {f: 2, c: 53414}, {f: 3, c: 53417},
  11237. {f: 7, c: 53421}, 53430, 53432, {f: 6, c: 53434}, {f: 2, c: 53442},
  11238. {f: 3, c: 53445}, {f: 6, c: 53450}, 53458, {f: 6, c: 53462},
  11239. {f: 2, c: 53470}, {f: 3, c: 53473}, {f: 7, c: 53477}, 53486,
  11240. {f: 6, c: 53490}, {f: 20, c: 53497}, {f: 34, c: 53518}, {f: 2, c: 53554},
  11241. {f: 3, c: 53557}, 53561, {f: 5, c: 53563}, 53570, {f: 6, c: 53574},
  11242. {f: 2, c: 53582}, {f: 3, c: 53585}, {f: 7, c: 53589}, 53598, 53600,
  11243. {f: 6, c: 53602}, {f: 3, c: 53609}, {f: 15, c: 53613}, {f: 7, c: 53629},
  11244. {f: 3, c: 53637}, {f: 23, c: 53641}, {f: 2, c: 53666}, {f: 3, c: 53669},
  11245. {f: 7, c: 53673}, 53682, 53684, {f: 4, c: 53686}, 53691, {f: 3, c: 53693},
  11246. {f: 23, c: 53697}, {f: 27, c: 53721}, {f: 3, c: 53749}, {f: 14, c: 53753},
  11247. 53768, {f: 6, c: 53770}, {f: 27, c: 53777}, {f: 2, c: 53806},
  11248. {f: 3, c: 53809}, {f: 7, c: 53813}, 53822, 53824, {f: 6, c: 53826},
  11249. {f: 19, c: 53833}, {f: 7, c: 53853}, {f: 27, c: 53861}, {f: 2, c: 53890},
  11250. {f: 3, c: 53893}, {f: 7, c: 53897}, {f: 3, c: 53906}, {f: 6, c: 53910},
  11251. {f: 3, c: 53917}, {f: 3, c: 53921}, {f: 7, c: 53925}, {f: 4, c: 53933},
  11252. {f: 6, c: 53938}, {f: 2, c: 53946}, {f: 2, c: 53949}, 53953,
  11253. {f: 5, c: 53955}, 53962, {f: 8, c: 53964}, {f: 3, c: 53973},
  11254. {f: 3, c: 53977}, {f: 7, c: 53981}, {f: 10, c: 53990}, {f: 2, c: 54002},
  11255. {f: 3, c: 54005}, {f: 7, c: 54009}, 54018, 54020, {f: 6, c: 54022}, 54031,
  11256. {f: 3, c: 54033}, 54037, {f: 5, c: 54039}, 54046, {f: 3, c: 54050},
  11257. {f: 2, c: 54054}, {f: 2, c: 54058}, {f: 3, c: 54061}, {f: 7, c: 54065},
  11258. 54074, {f: 6, c: 54078}, {f: 54, c: 54086}, {f: 2, c: 54142},
  11259. {f: 3, c: 54145}, {f: 7, c: 54149}, 54158, {f: 6, c: 54162},
  11260. {f: 2, c: 54170}, {f: 3, c: 54173}, {f: 7, c: 54177}, 54186, 54188,
  11261. {f: 6, c: 54190}, {f: 3, c: 54197}, {f: 3, c: 54201}, {f: 7, c: 54205},
  11262. {f: 2, c: 54214}, {f: 6, c: 54218}, {f: 7, c: 54225}, {f: 8, c: 54233},
  11263. 54242, {f: 8, c: 54244}, {f: 2, c: 54254}, {f: 3, c: 54257},
  11264. {f: 7, c: 54261}, 54270, 54272, {f: 6, c: 54274}, {f: 20, c: 54281},
  11265. {f: 34, c: 54302}, {f: 3, c: 54337}, {f: 23, c: 54341}, {f: 3, c: 54365},
  11266. {f: 3, c: 54369}, {f: 8, c: 54373}, 54382, {f: 8, c: 54384},
  11267. {f: 2, c: 54394}, {f: 2, c: 54397}, 54401, {f: 5, c: 54403}, 54410, 54412,
  11268. {f: 6, c: 54414}, {f: 20, c: 54421}, {f: 34, c: 54442}, {f: 3, c: 54477},
  11269. {f: 3, c: 54481}, {f: 7, c: 54485}, {f: 2, c: 54493}, {f: 8, c: 54496},
  11270. {f: 3, c: 54505}, {f: 3, c: 54509}, {f: 7, c: 54513}, {f: 2, c: 54521},
  11271. 54524, {f: 6, c: 54526}, {f: 3, c: 54533}, {f: 3, c: 54537},
  11272. {f: 7, c: 54541}, 54550, {f: 36, c: 54552}, {f: 2, c: 54590},
  11273. {f: 3, c: 54593}, {f: 7, c: 54597}, 54606, 54608, {f: 6, c: 54610},
  11274. {f: 2, c: 54618}, {f: 3, c: 54621}, {f: 4, c: 54625}, {f: 2, c: 54630},
  11275. 54634, 54636, {f: 6, c: 54638}, {f: 2, c: 54646}, {f: 3, c: 54649},
  11276. {f: 7, c: 54653}, 54662, {f: 6, c: 54666}, {f: 20, c: 54673},
  11277. {f: 34, c: 54694}, {f: 2, c: 54730}, {f: 3, c: 54733}, 54737,
  11278. {f: 5, c: 54739}, 54746, 54748, {f: 6, c: 54750}, {f: 2, c: 54758},
  11279. {f: 3, c: 54761}, {f: 7, c: 54765}, 54774, 54776, {f: 6, c: 54778},
  11280. {f: 2, c: 54786}, {f: 3, c: 54789}, {f: 7, c: 54793}, 54802,
  11281. {f: 6, c: 54806}, {f: 3, c: 54813}, {f: 3, c: 54817}, {f: 8, c: 54821},
  11282. {f: 10, c: 54830}, {f: 2, c: 54842}, {f: 3, c: 54845}, {f: 4, c: 54849},
  11283. {f: 2, c: 54854}, 54858, 54860, {f: 3, c: 54862}, {f: 2, c: 54866},
  11284. {f: 2, c: 54870}, {f: 3, c: 54873}, {f: 10, c: 54877}, 54888,
  11285. {f: 6, c: 54890}, {f: 2, c: 54898}, {f: 14, c: 54901}, 54916,
  11286. {f: 6, c: 54918}, {f: 2, c: 54926}, {f: 3, c: 54929}, {f: 8, c: 54933},
  11287. 54942, 54944, {f: 6, c: 54946}, {f: 3, c: 54953}, {f: 3, c: 54957},
  11288. {f: 8, c: 54961}, 54970, {f: 8, c: 54972}, {f: 2, c: 54982},
  11289. {f: 3, c: 54985}, {f: 4, c: 54989}, {f: 2, c: 54994}, {f: 2, c: 54997},
  11290. 55000, {f: 6, c: 55002}, {f: 3, c: 55009}, {f: 3, c: 55013},
  11291. {f: 7, c: 55017}, {f: 4, c: 55025}, {f: 6, c: 55030}, {f: 2, c: 55038},
  11292. {f: 3, c: 55041}, {f: 12, c: 55045}, {f: 6, c: 55058}, {f: 2, c: 55066},
  11293. {f: 3, c: 55069}, {f: 7, c: 55073}, 55082, 55084, {f: 6, c: 55086},
  11294. {f: 2, c: 55094}, {f: 3, c: 55097}, {f: 7, c: 55101}, {f: 2, c: 55109},
  11295. 55112, {f: 6, c: 55114}, {f: 2, c: 55122}, 55125, {f: 6, c: 55130}, 55138,
  11296. 55140, {f: 3, c: 55142}, {f: 2, c: 55146}, {f: 3, c: 55149},
  11297. {f: 3, c: 55153}, {f: 7, c: 55157}, {f: 3, c: 55166}, {f: 6, c: 55170},
  11298. {f: 2, c: 55178}, {f: 3, c: 55181}, {f: 7, c: 55185}, 55194, 55196,
  11299. {f: 6, c: 55198}],
  11300. 'Adobe-CNS1': [{f: 95, c: 32}, {s: 3}, 12288, 65292, {f: 2, c: 12289}, 65294,
  11301. 8226, 65307, 65306, 65311, 65281, 65072, 8230, 8229, 65104, 65380, 65106,
  11302. 183, {f: 4, c: 65108}, 65372, 8211, 65073, 8212, {s: 4}, {f: 2, c: 65288},
  11303. {f: 2, c: 65077}, 65371, 65373, {f: 2, c: 65079}, {f: 2, c: 12308},
  11304. {f: 2, c: 65081}, {f: 2, c: 12304}, {f: 2, c: 65083}, {f: 2, c: 12298},
  11305. {f: 2, c: 65085}, {f: 2, c: 12296}, {f: 2, c: 65087}, {f: 2, c: 12300},
  11306. {f: 2, c: 65089}, {f: 2, c: 12302}, {f: 2, c: 65091}, {f: 6, c: 65113},
  11307. {f: 2, c: 8216}, {f: 2, c: 8220}, {f: 2, c: 12317}, 8245, 8242, 65283,
  11308. 65286, 65290, 8251, 167, 12291, 9675, 9679, 9651, 9650, 9678, 9734, 9733,
  11309. 9671, 9670, 9633, 9632, 9661, 9660, 12963, 8453, 8254, 0, 65343, 0,
  11310. {f: 2, c: 65097}, {f: 2, c: 65101}, {f: 2, c: 65099}, {f: 3, c: 65119},
  11311. 65291, 65293, 215, 247, 177, 8730, 65308, 65310, 65309, {f: 2, c: 8806},
  11312. 8800, 8734, 8786, 8801, {f: 5, c: 65122}, 8764, {f: 2, c: 8745}, 8869,
  11313. 8736, 8735, 8895, 13266, 13265, 8747, 8750, 8757, 8756, 9792, 9794, 9793,
  11314. 9737, 8593, 8595, 8594, 8592, {f: 2, c: 8598}, 8601, 8600, 8741, 8739, 0,
  11315. 0, 65295, 65340, 65284, 165, 12306, {f: 2, c: 162}, 65285, 65312, 8451,
  11316. 8457, {f: 3, c: 65129}, 13269, {f: 3, c: 13212}, 13262, 13217,
  11317. {f: 2, c: 13198}, 13252, 176, [20825, 58834], [20827, 58835],
  11318. [20830, 58837], [20829, 58836], 20833, 20835, 21991, [29929, 58044],
  11319. [31950, 58191], {f: 8, c: 9601}, 9615, 9614, 9613, 9612, 9611, 9610, 9609,
  11320. 9532, 9524, 9516, 9508, 9500, 9620, 9472, 9474, 9621, 9484, 9488, 9492,
  11321. 9496, {f: 2, c: 9581}, 9584, 9583, 9552, 9566, 9578, 9569, {f: 2, c: 9698},
  11322. 9701, 9700, {f: 3, c: 9585}, {f: 10, c: 65296}, {f: 10, c: 8544},
  11323. {f: 9, c: 12321}, 0, [21316, 57443], 0, {f: 26, c: 65313},
  11324. {f: 26, c: 65345}, {f: 17, c: 913}, {f: 7, c: 931}, {f: 17, c: 945},
  11325. {f: 7, c: 963}, {f: 37, c: 12549}, 729, 714, 711, 715, [9312, 63153],
  11326. [9313, 63154], [9314, 63155], [9315, 63156], [9316, 63157], [9317, 63158],
  11327. [9318, 63159], [9319, 63160], [9320, 63161], [9321, 63162], [9332, 63163],
  11328. [9333, 63164], [9334, 63165], [9335, 63166], [9336, 63167], [9337, 63168],
  11329. [9338, 63169], [9339, 63170], [9340, 63171], [9341, 63172], [8560, 63173],
  11330. [8561, 63174], [8562, 63175], [8563, 63176], [8564, 63177], [8565, 63178],
  11331. [8566, 63179], [8567, 63180], [8568, 63181], [8569, 63182], [12033, 20008],
  11332. [12034, 20022, 63183], [12035, 20031, 63184], [12037, 20101, 63185],
  11333. [12039, 20128, 63186], [12044, 20866, 63187], [12045, 20886, 63188],
  11334. [12046, 20907, 63189], [12051, 21241, 63190], [12054, 21304, 63191],
  11335. [12057, 21353, 63192], [12059, 21430, 63193],
  11336. [12065, 12066, 22786, 22794, 63194], [12071, 23424, 63195],
  11337. [12078, 24027, 63196], [12083, 24186, 63197], [12084, 24191, 63198],
  11338. [12085, 24308], [12089, 24400, 63200], [12090, 24417, 63201],
  11339. [12097, 25908, 63202], [12102, 26080], [12135, 30098, 63204],
  11340. [12136, 30326], [12193, 36789, 63206], [12202, 38582], {f: 32, c: 9216},
  11341. 9249, [12032, 19968], [12036, 20057], 19969, 19971, 20035, 20061, 20102,
  11342. [12038, 20108], [12040, 20154], [12041, 20799], [12042, 20837],
  11343. [12043, 20843], [12047, 20960], [12049, 20992], 20993, [12050, 21147],
  11344. [12052, 21269], [12055, 21313], [12056, 21340], [12060, 21448], 19977,
  11345. 19979, 19976, 19978, 20011, 20024, 20961, 20037, 20040, 20063, 20062,
  11346. 20110, 20129, [20800, 64012], 20995, 21242, 21315, 21449, [12061, 21475],
  11347. [12063, 22303], [12064, 22763], [12067, 22805], [12068, 22823],
  11348. [12069, 22899], [12070, 23376], 23377, 23379, [12072, 23544],
  11349. [12073, 23567], [12074, 23586], [12075, 23608], [12077, 23665], 24029,
  11350. [12079, 24037], [12080, 24049], {f: 2, c: 24050}, [12081, 24062],
  11351. [12082, 24178], [12086, 24318], [12087, 24331], [12088, 24339], 25165,
  11352. 19985, 19984, 19981, 20013, 20016, 20025, 20043, 23609, 20104, 20113,
  11353. 20117, 20114, 20116, 20130, 20161, 20160, 20163, {f: 2, c: 20166}, 20173,
  11354. {f: 2, c: 20170}, 20164, 20803, 20801, 20839, {f: 2, c: 20845}, 20844,
  11355. 20887, 20982, {f: 3, c: 20998}, 21243, {f: 2, c: 21246}, 21270, 21305,
  11356. 21320, 21319, 21317, 21342, 21380, 21451, 21450, 21453, 22764, 22825,
  11357. 22827, 22826, 22829, 23380, 23569, 23588, 23610, 23663, 24052, 24187,
  11358. 24319, {f: 2, c: 24340}, [12092, 24515], [12093, 25096], [12094, 25142],
  11359. [12095, 25163], 25166, [12096, 25903], [12098, 25991], [12099, 26007],
  11360. [12100, 26020], [12101, 26041], [12103, 26085], [12104, 26352],
  11361. [12105, 26376], [12106, 26408], [12107, 27424], [12108, 27490],
  11362. [12109, 27513], [12111, 27595], [12112, 27604], [12113, 27611],
  11363. [12114, 27663], [12116, 27700], [12117, 28779], [12118, 29226],
  11364. [12119, 29238], [12120, 29243], [12122, 29255], [12123, 29273],
  11365. [12124, 29275], [12125, 29356], 29579, 19993, 19990, 19989, 19988, 19992,
  11366. 20027, 20045, 20047, 20046, 20197, 20184, {f: 4, c: 20180},
  11367. {f: 2, c: 20195}, 20185, 20190, 20805, 20804, {f: 2, c: 20873}, 20908,
  11368. {f: 2, c: 20985}, 20984, 21002, 21152, 21151, [21253, 57435], 21254, 21271,
  11369. 21277, 20191, 21322, 21321, 21345, 21344, 21359, 21358, 21435, 21487,
  11370. 21476, 21491, 21484, 21486, 21481, 21480, 21500, 21496, 21493, 21483,
  11371. 21478, 21482, 21490, 21489, 21488, 21477, 21485, 21499, 22235, 22234,
  11372. 22806, 22830, 22833, 22900, 22902, 23381, 23427, 23612, 24040, 24039,
  11373. 24038, {f: 2, c: 24066}, 24179, 24188, 24321, 24344, 24343, 24517, 25098,
  11374. {f: 2, c: 25171}, 25170, 25169, 26021, 26086, 26414, 26412,
  11375. {f: 2, c: 26410}, 26413, 27491, 27597, 27665, 27664, 27704, 27713, 27712,
  11376. 27710, 29359, [12126, 29572], [12127, 29577], [12128, 29916],
  11377. [12129, 29926], [12130, 29976], [12131, 29983], [12132, 29992], 29993,
  11378. [12133, 30000], {f: 3, c: 30001}, [12134, 30091], [12137, 30333],
  11379. [12138, 30382], [12139, 30399], [12140, 30446], [12141, 30683],
  11380. [12142, 30690], [12143, 30707], [12144, 31034], [12146, 31166],
  11381. [12147, 31348], [12148, 31435], {f: 2, c: 19998}, {f: 2, c: 20050}, 20073,
  11382. 20121, 20132, 20134, 20133, 20223, 20233, 20249, 20234, 20245, 20237,
  11383. {f: 2, c: 20240}, 20239, 20210, 20214, 20219, 20208, 20211, 20221, 20225,
  11384. 20235, 20809, 20807, 20806, 20808, 20840, 20849, 20877, 20912, 21015,
  11385. {f: 2, c: 21009}, 21006, 21014, 21155, 21256, 21281, 21280,
  11386. {f: 2, c: 21360}, 21513, 21519, 21516, 21514, 21520, 21505, 21515, 21508,
  11387. 21521, 21517, 21512, 21507, 21518, 21510, 21522, 22240, 22238, 22237,
  11388. 22323, 22320, 22312, 22317, 22316, 22319, 22313, {f: 2, c: 22809},
  11389. {f: 2, c: 22839}, 22916, 22904, 22915, 22909, 22905, 22914, 22913,
  11390. {f: 2, c: 23383}, {f: 2, c: 23431}, 23429, 23433, 23546, 23574, 23673,
  11391. 24030, 24070, 24182, 24180, 24335, 24347, 24537, 24534, 25102,
  11392. {f: 2, c: 25100}, 25104, 25187, 25179, 25176, 25910, 26089, 26088,
  11393. {f: 2, c: 26092}, {f: 2, c: 26354}, 26377, 26429, 26420, 26417, 26421,
  11394. 27425, 27492, 27515, 27670, 27741, 27735, 27737, {f: 2, c: 27743}, 27728,
  11395. 27733, 27745, 27739, {f: 2, c: 27725}, 28784, 29279, 29277, 30334,
  11396. [12149, 31481], [12150, 31859], [12151, 31992], [12152, 32566],
  11397. [12154, 32650], [12155, 32701], [12156, 32769], 32771, [12157, 32780],
  11398. [12158, 32786], [12159, 32819], [12160, 32895], [12161, 32905],
  11399. {f: 2, c: 32907}, [12162, 33251], [12163, 33258], [12164, 33267],
  11400. [12165, 33276], [12166, 33292], [12167, 33307], [12168, 33311],
  11401. [12169, 33390], [12170, 33394], 33406, [12173, 34411], [12174, 34880],
  11402. [12175, 34892], [12176, 34915], 35199, 38433, 20018, 20136, 20301, 20303,
  11403. 20295, 20311, 20318, 20276, 20315, 20309, 20272, {f: 2, c: 20304}, 20285,
  11404. 20282, 20280, 20291, 20308, 20284, 20294, 20323, 20316, 20320, 20271,
  11405. 20302, 20278, 20313, 20317, 20296, 20314, 20812, 20811, 20813, 20853,
  11406. {f: 2, c: 20918}, 21029, 21028, {f: 2, c: 21033}, 21032, 21163,
  11407. {f: 2, c: 21161}, 21164, 21283, 21363, 21365, 21533, 21549, 21534, 21566,
  11408. 21542, 21582, 21543, 21574, 21571, 21555, 21576, 21570, 21531, 21545,
  11409. 21578, 21561, 21563, 21560, 21550, {f: 2, c: 21557}, 21536, 21564, 21568,
  11410. 21553, 21547, 21535, 21548, 22250, 22256, 22244, 22251, 22346, 22353,
  11411. 22336, 22349, 22343, 22350, 22334, 22352, 22351, 22331, 22767, 22846,
  11412. 22941, 22930, 22952, 22942, 22947, 22937, 22934, 22925, 22948, 22931,
  11413. 22922, 22949, 23389, 23388, {f: 2, c: 23386}, 23436, 23435, 23439, 23596,
  11414. {f: 2, c: 23616}, 23615, 23614, {f: 2, c: 23696}, 23700, 23692, 24043,
  11415. 24076, 24207, 24199, 24202, 24311, 24324, 24351, 24420, 24418, 24439,
  11416. 24441, 24536, 24524, 24535, 24525, 24561, 24555, 24568, 24554, 25106,
  11417. 25105, 25220, 25239, 25238, 25216, 25206, 25225, 25197, 25226, 25212,
  11418. 25214, 25209, 25203, 25234, 25199, 25240, 25198, 25237, 25235, 25233,
  11419. 25222, 25913, 25915, 25912, 26097, 26356, 26463, {f: 4, c: 26446}, 26460,
  11420. 26454, [26462, 57801], 26441, 26438, 26464, 26451, 26455, 27493, 27599,
  11421. 27714, 27742, 27801, 27777, {f: 2, c: 27784}, 27781, 27803, 27754, 27770,
  11422. 27792, 27760, 27788, 27752, 27798, 27794, 27773, 27779, 27762, 27774,
  11423. 27764, 27782, 27766, 27789, 27796, 27800, 27778, 28790, {f: 2, c: 28796},
  11424. 28792, 29282, 29281, 29280, 29380, 29378, 29590, 29996, 29995,
  11425. {f: 2, c: 30007}, 30338, 30447, 30691, 31169, 31168, 31167, 31350, 31995,
  11426. 32597, 32918, 32915, 32925, 32920, 32923, 32922, 32946, 33391, 33426,
  11427. 33419, 33421, [12178, 35211], [12179, 35282], [12180, 35328],
  11428. [12181, 35895], [12182, 35910], [12183, 35925], [12185, 35997],
  11429. [12186, 36196], [12187, 36208], [12188, 36275], [12189, 36523],
  11430. [12190, 36554], [12191, 36763], [12192, 36784], 36802, 36806, 36805, 36804,
  11431. 24033, [12194, 37009], 37026, 37034, 37030, 37027, [12195, 37193],
  11432. [12196, 37318], [12197, 37324], 38450, 38446, 38449, 38442, 38444, 20006,
  11433. 20054, 20083, 20107, 20123, 20126, {f: 2, c: 20139}, 20335, 20381, 20365,
  11434. 20339, 20351, 20332, 20379, 20363, 20358, 20355, 20336, 20341, 20360,
  11435. 20329, 20347, 20374, 20350, 20367, 20369, 20346, 20820, 20818, 20821,
  11436. 20841, 20855, 20854, 20856, 20925, 20989, 21051, 21048, 21047, 21050,
  11437. 21040, 21038, 21046, 21057, 21182, 21179, 21330, 21332, 21331, 21329,
  11438. 21350, {f: 3, c: 21367}, 21462, 21460, 21463, 21619, 21621, 21654, 21624,
  11439. 21653, 21632, 21627, 21623, 21636, 21650, 21638, 21628, 21648, 21617,
  11440. 21622, 21644, 21658, 21602, 21608, 21643, 21629, 21646, 22266, 22403,
  11441. 22391, 22378, 22377, 22369, 22374, 22372, 22396, 22812, 22857,
  11442. {f: 2, c: 22855}, 22852, 22868, 22974, 22971, 22996, 22969, 22958, 22993,
  11443. 22982, 22992, 22989, 22987, 22995, 22986, 22959, 22963, 22994, 22981,
  11444. 23391, 23396, 23395, 23447, 23450, 23448, 23452, 23449, 23451, 23578,
  11445. 23624, {f: 2, c: 23621}, 23735, 23713, 23736, 23721, 23723, 23729, 23731,
  11446. 24088, 24090, 24086, 24085, 24091, 24081, 24184, 24218, 24215, 24220,
  11447. {f: 2, c: 24213}, 24310, {f: 2, c: 24358}, 24361, {f: 2, c: 24448}, 24447,
  11448. 24444, 24541, 24544, 24573, 24565, 24575, 24591, 24596, 24623, 24629,
  11449. 24598, 24618, 24597, 24609, 24615, 24617, 24619, 24603, 25110, 25109,
  11450. 25151, 25150, 25152, 25215, 25289, 25292, 25284, 25279, 25282, 25273,
  11451. 25298, 25307, 25259, {f: 2, c: 25299}, 25291, 25288, 25256, 25277, 25276,
  11452. [25296, 60582], 25305, 25287, 25293, 25269, 25306, 25265, 25304,
  11453. {f: 2, c: 25302}, 25286, 25260, [25294, 61010], 25918, 26023, 26044, 26106,
  11454. 26132, 26131, 26124, 26118, 26114, 26126, 26112, 26127, 26133, 26122,
  11455. 26119, 26381, 26379, 26477, 26507, 26517, 26481, 26524, 26483, 26487,
  11456. 26503, 26525, 26519, {f: 2, c: 26479}, 26495, 26505, 26494, 26512, 26485,
  11457. 26522, 26515, 26492, 26474, 26482, 27427, {f: 2, c: 27494}, 27519, 27667,
  11458. 27675, 27875, 27880, 27891, 27825, 27852, 27877, 27827, {f: 2, c: 27837},
  11459. 27836, 27874, 27819, 27861, 27859, 27832, 27844, 27833, 27841, 27822,
  11460. 27863, 27845, 27889, 27839, 27835, 27873, 27867, 27850, 27820, 27887,
  11461. 27868, 27862, 27872, 28821, 28814, 28818, 28810, 28825, {f: 2, c: 29228},
  11462. 29240, 29256, 29287, 29289, 29376, 29390, 29401, 29399, 29392, 29609,
  11463. 29608, 29599, 29611, 29605, 30013, 30109, {f: 2, c: 30105}, 30340, 30402,
  11464. 30450, 30452, 30693, 30717, 31038, {f: 2, c: 31040}, 31177, 31176, 31354,
  11465. 31353, 31482, 31998, 32596, 32652, 32651, [32773, 58236], 32954, 32933,
  11466. 32930, 32945, 32929, 32939, 32937, 32948, 32938, 32943, 33253, 33278,
  11467. 33293, 33459, 33437, 33433, 33453, 33469, 33439, 33465, 33457, 33452,
  11468. 33445, 33455, 33464, 33443, 33456, 33470, 33463, 34382, 34417, 21021,
  11469. 34920, 36555, 36814, 36820, 36817, 37045, 37048, 37041, 37046, 37319,
  11470. [12198, 37329], [12199, 38263], [12200, 38272], [12201, 38428], 38464,
  11471. 38463, 38459, 38468, 38466, [12203, 38585], [12204, 38632], 38738,
  11472. [12206, 38750], 20127, {f: 2, c: 20141}, 20449, 20405, 20399, 20415, 20448,
  11473. 20433, 20431, 20445, 20419, 20406, 20440, 20447, 20426, 20439, 20398,
  11474. 20432, 20420, 20418, 20442, 20430, 20446, 20407, 20823, 20882, 20881,
  11475. 20896, 21070, 21059, 21066, 21069, 21068, 21067, 21063, 21191, 21193,
  11476. 21187, 21185, 21261, 21335, 21371, 21402, 21467, 21676, 21696, 21672,
  11477. 21710, 21705, 21688, 21670, 21683, 21703, 21698, 21693, 21674, 21697,
  11478. 21700, 21704, 21679, 21675, 21681, 21691, 21673, 21671, 21695, 22271,
  11479. 22402, 22411, 22432, 22435, 22434, 22478, 22446, 22419, 22869, 22865,
  11480. 22863, 22862, 22864, 23004, 23000, 23039, 23011, 23016, 23043, 23013,
  11481. 23018, 23002, 23014, 23041, 23035, 23401, 23459, 23462, 23460, 23458,
  11482. 23461, 23553, {f: 2, c: 23630}, 23629, 23627, 23769, 23762, 24055, 24093,
  11483. 24101, 24095, 24189, 24224, 24230, 24314, 24328, 24365, 24421, 24456,
  11484. 24453, {f: 2, c: 24458}, 24455, 24460, 24457, 24594, 24605, 24608, 24613,
  11485. 24590, 24616, 24653, 24688, 24680, [24674, 60712], 24646, 24643, 24684,
  11486. 24683, 24682, 24676, 25153, 25308, 25366, 25353, 25340, 25325, 25345,
  11487. 25326, 25341, 25351, 25329, 25335, 25327, 25324, 25342, 25332, 25361,
  11488. 25346, 25919, 25925, 26027, 26045, 26082, 26149, 26157, 26144, 26151,
  11489. 26159, 26143, 26152, 26161, 26148, 26359, 26623, 26579, 26609, 26580,
  11490. 26576, 26604, 26550, 26543, 26613, 26601, 26607, 26564, 26577, 26548,
  11491. 26586, 26597, 26552, 26575, 26590, 26611, 26544, 26585, 26594, 26589,
  11492. 26578, 27498, 27523, 27526, 27573, 27602, 27607, 27679, 27849, 27915,
  11493. 27954, 27946, 27969, 27941, 27916, 27953, 27934, 27927, 27963,
  11494. {f: 2, c: 27965}, 27958, 27931, 27893, 27961, 27943, 27960, 27945, 27950,
  11495. 27957, 27918, 27947, 28843, 28858, 28851, 28844, 28847, 28845, 28856,
  11496. 28846, 28836, 29232, 29298, 29295, 29300, 29417, {f: 2, c: 29408}, 29623,
  11497. 29642, 29627, 29618, 29645, 29632, 29619, 29978, 29997, 30031, 30028,
  11498. 30030, 30027, 30123, {f: 2, c: 30116}, {f: 2, c: 30114}, 30328,
  11499. {f: 3, c: 30342}, 30408, 30406, 30403, 30405, 30465, 30457, 30456, 30473,
  11500. 30475, 30462, 30460, 30471, 30684, 30722, 30740, {f: 2, c: 30732}, 31046,
  11501. 31049, 31048, 31047, {f: 2, c: 31161}, {f: 2, c: 31185}, 31179, 31359,
  11502. 31361, 31487, 31485, 31869, 32002, 32005, 32000, 32009, 32007, 32004,
  11503. 32006, 32568, 32654, 32703, 32784, 32781, 32785, 32822, 32982, 32997,
  11504. 32986, {f: 2, c: 32963}, 32972, 32993, 32987, 32974, 32990, 32996, 32989,
  11505. 33268, 33314, 33511, 33539, 33541, 33507, 33499, 33510, 33540, 33509,
  11506. 33538, 33545, 33490, 33495, 33521, 33537, 33500, 33492, 33489, 33502,
  11507. 33491, 33503, 33519, 33542, 34384, 34425, 34427, 34426, 34893, 34923,
  11508. 35201, 35284, 35336, {f: 2, c: 35330}, 35998, 36000, 36212, 36211, 36276,
  11509. 36557, 36556, 36848, 36838, 36834, 36842, 36837, 36845, 36843, 36836,
  11510. 36840, 37066, 37070, 37057, 37059, 37195, 37194, 37325, 38274, 38480,
  11511. {f: 3, c: 38475}, [12207, 38754], [12208, 38761], [12209, 38859],
  11512. [12210, 38893], [12211, 38899], [12212, 38913], [12213, 39080],
  11513. [12214, 39131], [12215, 39135], [12216, 39318], [12217, 39321], 20056,
  11514. 20147, {f: 2, c: 20492}, 20515, 20463, 20518, 20517, 20472, [20521, 57375],
  11515. 20502, 20486, 20540, 20511, 20506, 20498, 20497, 20474, 20480, 20500,
  11516. 20520, 20465, 20513, 20491, 20505, 20504, 20467, 20462, 20525, 20522,
  11517. 20478, 20523, 20489, 20860, {f: 2, c: 20900}, 20898, 20941, 20940, 20934,
  11518. 20939, 21078, 21084, 21076, 21083, 21085, 21290, [21375, 57459], 21407,
  11519. 21405, 21471, 21736, 21776, 21761, 21815, 21756, 21733, 21746, 21766,
  11520. 21754, 21780, 21737, 21741, 21729, 21769, 21742, 21738, 21734, 21799,
  11521. 21767, 21757, 21775, {f: 2, c: 22275}, 22466, 22484, 22475, 22467, 22537,
  11522. 22799, {f: 2, c: 22871}, 22874, 23057, 23064, 23068, 23071, 23067, 23059,
  11523. 23020, 23072, 23075, 23081, 23077, 23052, 23049, 23403, 23640, 23472,
  11524. 23475, 23478, 23476, 23470, 23477, 23481, 23480, 23556, 23633, 23637,
  11525. 23632, 23789, 23805, 23803, 23786, 23784, 23792, 23798, 23809, 23796,
  11526. 24046, 24109, 24107, 24235, 24237, 24231, 24369, 24466, 24465, 24464,
  11527. 24665, 24675, 24677, 24656, 24661, 24685, 24681, 24687, 24708, 24735,
  11528. 24730, 24717, 24724, 24716, 24709, 24726, 25159, 25331, 25352, 25343,
  11529. 25422, 25406, 25391, 25429, 25410, 25414, 25423, 25417, 25402, 25424,
  11530. 25405, {f: 2, c: 25386}, 25384, 25421, 25420, {f: 2, c: 25928}, 26009,
  11531. 26049, 26053, 26178, 26185, 26191, 26179, 26194, 26188, 26181, 26177,
  11532. 26360, {f: 2, c: 26388}, 26391, 26657, 26680, 26696, 26694, 26707, 26681,
  11533. 26690, 26708, 26665, 26803, 26647, 26700, 26705, 26685, 26612, 26704,
  11534. 26688, 26684, 26691, 26666, 26693, 26643, 26648, 26689, 27530, 27529,
  11535. 27575, 27683, {f: 2, c: 27687}, 27686, 27684, 27888, 28010, 28053, 28040,
  11536. 28039, 28006, 28024, 28023, 27993, 28051, 28012, 28041, 28014, 27994,
  11537. 28020, 28009, 28044, 28042, 28025, 28037, 28005, 28052, 28874, 28888,
  11538. 28900, 28889, 28872, 28879, 29241, 29305, 29436, 29433, 29437, 29432,
  11539. 29431, 29574, 29677, 29705, 29678, 29664, 29674, 29662, 30036, 30045,
  11540. 30044, 30042, 30041, 30142, 30149, 30151, {f: 2, c: 30130}, 30141, 30140,
  11541. 30137, 30146, 30136, 30347, 30384, 30410, {f: 2, c: 30413}, 30505,
  11542. {f: 2, c: 30495}, 30504, 30697, 30768, 30759, 30776, 30749, 30772, 30775,
  11543. 30757, 30765, 30752, 30751, 30770, 31061, 31056, 31072, 31071, 31062,
  11544. 31070, 31069, 31063, 31066, 31204, [31203, 60418], 31207, 31199, 31206,
  11545. 31209, 31192, 31364, 31368, 31449, 31494, 31505, 31881, 32033, 32023,
  11546. 32011, 32010, 32032, 32034, 32020, 32016, 32021, 32026, 32028, 32013,
  11547. 32025, 32027, 32570, 32607, 32660, 32709, 32705, 32774, 32772, 32792,
  11548. 32789, 32793, 32791, 32829, 32831, 33009, 33026, 33008, 33029, 33005,
  11549. 33012, 33030, 33016, 33011, 33032, 33021, 33034, 33020, 33007, 33261,
  11550. 33260, 33280, 33296, {f: 2, c: 33322}, 33320, 33324, 33467, 33579, 33618,
  11551. 33620, 33610, 33592, 33616, 33609, 33589, 33588, 33615, 33586, 33593,
  11552. 33590, 33559, 33600, 33585, 33576, 33603, 34388, 34442, 34474, 34451,
  11553. 34468, 34473, 34444, 34467, 34460, 34928, 34935, {f: 2, c: 34945}, 34941,
  11554. 34937, 35352, 35344, 35342, 35340, 35349, 35338, 35351, 35347, 35350,
  11555. 35343, 35345, 35912, 35962, 35961, {f: 2, c: 36001}, [36215, 58442], 36524,
  11556. 36562, 36564, 36559, 36785, 36865, 36870, 36855, 36864, 36858, 36852,
  11557. 36867, 36861, 36869, 36856, 37013, 37089, 37085, 37090, 37202, 37197,
  11558. 37196, 37336, 37341, 37335, 37340, 37337, 38275, {f: 2, c: 38498}, 38497,
  11559. 38491, 38493, 38500, 38488, 38494, 38587, 39138, [12218, 39340],
  11560. [12219, 39592], [12220, 39640], [12222, 39717], [12224, 39730],
  11561. [12225, 39740], 20094, 20602, [20605, 57382], 20572, 20551, 20547, 20556,
  11562. 20570, 20553, 20581, 20598, 20558, 20565, 20597, 20596, 20599, 20559,
  11563. 20495, 20591, 20589, 20828, 20885, 20976, 21098, 21103, 21202, 21209,
  11564. 21208, 21205, 21264, 21263, 21273, {f: 2, c: 21311}, 21310, 21443, 26364,
  11565. 21830, 21866, 21862, 21828, 21854, 21857, 21827, 21834, 21809, 21846,
  11566. 21839, 21845, 21807, 21860, 21816, 21806, 21852, 21804, 21859, 21811,
  11567. 21825, 21847, 22280, 22283, 22281, 22495, 22533, 22538, 22534, 22496,
  11568. 22500, 22522, 22530, 22581, 22519, 22521, 22816, 22882, 23094, 23105,
  11569. 23113, 23142, 23146, 23104, 23100, 23138, 23130, 23110, 23114, 23408,
  11570. 23495, 23493, 23492, 23490, 23487, 23494, 23561, 23560, 23559, 23648,
  11571. {f: 2, c: 23644}, 23815, 23814, 23822, 23835, 23830, 23842, 23825, 23849,
  11572. 23828, 23833, 23844, 23847, 23831, 24034, 24120, 24118, 24115, 24119,
  11573. {f: 2, c: 24247}, 24246, 24245, 24254, 24373, 24375, 24407, 24428, 24425,
  11574. 24427, 24471, 24473, 24478, 24472, 24481, 24480, 24476, 24703, 24739,
  11575. 24713, 24736, 24744, 24779, 24756, 24806, 24765, 24773, 24763, 24757,
  11576. 24796, 24764, 24792, 24789, 24774, 24799, 24760, 24794, 24775,
  11577. {f: 2, c: 25114}, 25160, 25504, 25511, 25458, 25494, 25506, 25509, 25463,
  11578. 25447, 25496, 25514, 25457, 25513, 25481, 25475, 25499, 25451, 25512,
  11579. 25476, 25480, 25497, 25505, 25516, 25490, 25487, 25472, 25467, 25449,
  11580. 25448, 25466, 25949, 25942, 25937, 25945, 25943, 21855, 25935, 25944,
  11581. 25941, 25940, 26012, 26011, 26028, 26063, {f: 2, c: 26059}, 26062, 26205,
  11582. 26202, 26212, 26216, 26214, 26206, 26361, 21207, 26395, 26753, 26799,
  11583. 26786, 26771, 26805, 26751, 26742, 26801, 26791, 26775, 26800, 26755,
  11584. 26820, 26797, 26758, 26757, 26772, 26781, 26792, 26783, 26785, 26754,
  11585. 27442, 27578, {f: 2, c: 27627}, 27691, 28046, 28092, 28147, 28121, 28082,
  11586. 28129, 28108, 28132, 28155, 28154, 28165, 28103, 28107, 28079, 28113,
  11587. 28078, 28126, 28153, 28088, 28151, 28149, 28101, 28114, 28186, 28085,
  11588. 28122, 28139, 28120, 28138, 28145, 28142, 28136, 28102, 28100, 28074,
  11589. 28140, 28095, 28134, 28921, {f: 2, c: 28937}, 28925, 28911, 29245, 29309,
  11590. 29313, 29468, 29467, 29462, 29459, 29465, 29575, 29701, 29706, 29699,
  11591. 29702, 29694, 29709, 29920, {f: 2, c: 29942}, 29980, 29986,
  11592. {f: 2, c: 30053}, 30050, 30064, 30095, {f: 2, c: 30164}, 30133, 30154,
  11593. 30157, 30350, 30420, 30418, 30427, 30519, 30526, 30524, 30518, 30520,
  11594. 30522, 30827, 30787, 30798, 31077, 31080, 31085, 31227, 31378, 31381,
  11595. 31520, 31528, 31515, 31532, 31526, 31513, 31518, 31534, 31890, 31895,
  11596. 31893, 32070, 32067, 32113, 32046, 32057, 32060, 32064, 32048, 32051,
  11597. 32068, 32047, 32066, 32050, 32049, 32573, 32670, 32666, 32716, 32718,
  11598. 32722, 32796, 32842, 32838, 33071, 33046, 33059, 33067, 33065, 33072,
  11599. 33060, 33282, 33333, 33335, 33334, 33337, 33678, 33694, 33688, 33656,
  11600. 33698, 33686, 33725, 33707, 33682, 33674, 33683, 33673, 33696, 33655,
  11601. {f: 2, c: 33659}, 33670, 33703, 34389, 24426, 34503, 34496, 34486, 34500,
  11602. 34485, 34502, 34507, 34481, 34479, 34505, 34899, 34974, 34952, 34987,
  11603. 34962, 34966, 34957, 34955, 35219, 35215, 35370, 35357, 35363, 35365,
  11604. 35377, 35373, 35359, 35355, 35362, 35913, 35930, 36009, 36012, 36011,
  11605. 36008, 36010, 36007, 36199, 36198, 36286, 36282, 36571, 36575, 36889,
  11606. 36877, 36890, 36887, 36899, 36895, 36893, 36880, 36885, 36894, 36896,
  11607. 36879, 36898, 36886, 36891, 36884, 37096, 37101, [37117, 58488], 37207,
  11608. 37326, 37365, 37350, 37347, 37351, 37357, 37353, 38281, 38506, 38517,
  11609. 38515, 38520, 38512, 38516, {f: 2, c: 38518}, 38508, 38592, 38634, 38633,
  11610. 31456, 31455, {f: 2, c: 38914}, [12226, 39770], [12227, 40165],
  11611. [12228, 40565], [12229, 40575], [12230, 40613], [12231, 40635], 20642,
  11612. 20621, 20613, 20633, 20625, 20608, 20630, 20632, 20634, 26368, 20977,
  11613. 21106, {f: 2, c: 21108}, 21097, 21214, 21213, 21211, 21338, 21413, 21883,
  11614. 21888, 21927, 21884, 21898, 21917, 21912, 21890, 21916, 21930, 21908,
  11615. 21895, 21899, 21891, 21939, 21934, 21919, 21822, 21938, 21914, 21947,
  11616. 21932, 21937, 21886, 21897, 21931, 21913, 22285, 22575, 22570, 22580,
  11617. 22564, {f: 2, c: 22576}, 22561, 22557, 22560, {f: 2, c: 22777}, 22880,
  11618. [23159, 57587], 23194, 23167, 23186, 23195, 23207, 23411, 23409, 23506,
  11619. 23500, 23507, 23504, {f: 2, c: 23562}, 23601, 23884, 23888, 23860, 23879,
  11620. 24061, 24133, 24125, 24128, 24131, 24190, 24266, {f: 2, c: 24257}, 24260,
  11621. 24380, 24429, {f: 2, c: 24489}, 24488, 24785, 24801, 24754, 24758, 24800,
  11622. 24860, 24867, 24826, 24853, 24816, 24827, 24820, 24936, 24817, 24846,
  11623. 24822, 24841, 24832, 24850, 25119, 25161, 25507, 25484, 25551, 25536,
  11624. 25577, 25545, 25542, 25549, 25554, 25571, 25552, 25569, 25558,
  11625. {f: 2, c: 25581}, 25462, 25588, 25578, 25563, 25682, 25562, 25593, 25950,
  11626. 25958, {f: 2, c: 25954}, 26001, 26000, 26031, 26222, 26224, [26228, 57786],
  11627. 26230, 26223, 26257, 26234, 26238, 26231, {f: 2, c: 26366}, 26399, 26397,
  11628. 26874, 26837, 26848, 26840, 26839, 26885, 26847, 26869, 26862, 26855,
  11629. 26873, 26834, 26866, 26851, 26827, 26829, 26893, 26898, 26894, 26825,
  11630. 26842, 26990, 26875, 27454, 27450, 27453, 27544, 27542, 27580, 27631,
  11631. {f: 2, c: 27694}, 27692, [28207, 57904], 28216, 28244, 28193, 28210, 28263,
  11632. 28234, 28192, 28197, 28195, 28187, 28251, 28248, 28196, 28246, 28270,
  11633. 28205, 28198, 28271, 28212, 28237, 28218, 28204, 28227, [28189, 57901],
  11634. 28222, 28363, 28297, 28185, 28238, 28259, 28228, 28274, 28265, 28255,
  11635. {f: 2, c: 28953}, 28966, 28976, 28961, 28982, [29038, 57958], 28956, 29260,
  11636. 29316, 29312, 29494, 29477, 29492, 29481, 29754, 29738, 29747, 29730,
  11637. 29733, {f: 2, c: 29749}, 29748, 29743, 29723, 29734, 29736,
  11638. {f: 2, c: 29989}, 30059, 30058, 30178, 30171, 30179, 30169, 30168, 30174,
  11639. 30176, {f: 2, c: 30331}, 30358, 30355, 30388, 30428, 30543, 30701, 30813,
  11640. 30828, 30831, 31245, 31240, 31243, 31237, 31232, 31384, 31383, 31382,
  11641. 31461, 31459, 31561, 31574, 31558, 31568, 31570, 31572, 31565, 31563,
  11642. 31567, [31569, 60510], 31903, 31909, 32094, 32080, 32104, 32085, 32043,
  11643. 32110, 32114, 32097, 32102, 32098, 32112, 32115, 21892, {f: 2, c: 32724},
  11644. 32779, 32850, 32901, 33109, 33108, 33099, 33105, 33102, 33081, 33094,
  11645. 33086, 33100, 33107, 33140, 33298, 33308, 33769, 33795, 33784, 33805,
  11646. 33760, 33733, 33803, [33729, 58309], 33775, 33777, 33780, 33879, 33802,
  11647. 33776, 33804, 33740, 33789, 33778, 33738, 33848, 33806, 33796, 33756,
  11648. 33799, 33748, 33759, 34395, 34527, 34521, 34541, 34516, 34523, 34532,
  11649. 34512, 34526, 34903, {f: 2, c: 35009}, 34993, 35203, 35222, 35387, 35424,
  11650. 35413, 35422, 35388, 35393, 35412, 35419, 35408, 35398, 35380, 35386,
  11651. 35382, 35414, 35937, 35970, 36015, 36028, 36019, 36029, 36033, 36027,
  11652. 36032, 36020, 36023, 36022, 36031, 36024, 36234, 36229, 36225, 36302,
  11653. 36317, 36299, 36314, 36305, 36300, 36315, 36294, 36603, 36600, 36604,
  11654. 36764, 36910, 36917, 36913, 36920, 36914, 36918, 37122, 37109, 37129,
  11655. 37118, 37219, 37221, 37327, {f: 2, c: 37396}, 37411, 37385, 37406, 37389,
  11656. 37392, 37383, 37393, 38292, 38287, 38283, 38289, 38291, 38290, 38286,
  11657. 38538, 38542, 38539, 38525, {f: 2, c: 38533}, 38541, 38514, 38532, 38593,
  11658. 38597, 38596, {f: 2, c: 38598}, 38639, 38642, 38860, {f: 2, c: 38917},
  11659. 38920, 39143, 39146, 39151, 39145, 39154, 39149, 39342, 39341,
  11660. [12232, 40643], [12233, 40653], [12234, 40657], 20098, 20653, 20661,
  11661. {f: 2, c: 20658}, 20677, 20670, 20652, 20663, 20667, 20655, 20679, 21119,
  11662. 21111, 21117, 21215, 21222, 21220, {f: 2, c: 21218}, 21295, 21983, 21992,
  11663. 21971, 21990, 21966, 21980, 21959, 21969, {f: 2, c: 21987}, 21999, 21978,
  11664. 21985, {f: 2, c: 21957}, 21989, 21961, {f: 2, c: 22290}, 22622, 22609,
  11665. 22616, 22615, 22618, 22612, 22635, 22604, 22637, 22602, 22626, 22610,
  11666. 22603, 22887, 23233, 23241, 23244, 23230, 23229, 23228, 23219, 23234,
  11667. 23218, 23913, 23919, 24140, 24185, 24265, 24264, 24338, 24409, 24492,
  11668. 24494, 24858, 24847, 24904, 24863, 24819, 24859, 24825, 24833, 24840,
  11669. 24910, 24908, 24900, 24909, 24894, 24884, 24871, 24845, 24838, 24887,
  11670. {f: 2, c: 25121}, 25619, 25662, 25630, 25642, 25645, 25661, 25644, 25615,
  11671. 25628, 25620, 25613, 25654, {f: 2, c: 25622}, 25606, 25964, 26015, 26032,
  11672. 26263, 26249, {f: 2, c: 26247}, 26262, 26244, 26264, 26253, 26371, 27028,
  11673. 26989, 26970, 26999, 26976, 26964, 26997, 26928, 27010, 26954, 26984,
  11674. 26987, 26974, 26963, 27001, 27014, 26973, 26979, 26971, 27463, 27506,
  11675. 27584, 27583, 27603, 27645, 28322, 28335, 28371, 28342, 28354, 28304,
  11676. 28317, 28359, 28357, 28325, 28312, 28348, 28346, 28331, 28369, 28310,
  11677. 28316, 28356, 28372, 28330, 28327, 28340, 29006, 29017, 29033, 29028,
  11678. 29001, 29031, 29020, 29036, 29030, 29004, 29029, 29022, 28998, 29032,
  11679. 29014, 29242, 29266, 29495, 29509, 29503, 29502, 29807, 29786, 29781,
  11680. 29791, 29790, 29761, 29759, 29785, 29787, [29788, 58019], 30070, 30072,
  11681. 30208, 30192, 30209, 30194, 30193, 30202, 30207, 30196, 30195,
  11682. {f: 2, c: 30430}, 30555, 30571, 30566, 30558, 30563, 30585, 30570, 30572,
  11683. 30556, 30565, 30568, 30562, 30702, 30862, 30896, {f: 2, c: 30871}, 30860,
  11684. 30857, 30844, 30865, 30867, 30847, 31098, 31103, 31105, 33836, 31165,
  11685. 31260, 31258, 31264, 31252, 31263, 31262, {f: 2, c: 31391}, 31607, 31680,
  11686. 31584, 31598, 31591, 31921, 31923, 31925, 32147, 32121, 32145, 32129,
  11687. 32143, 32091, 32622, {f: 2, c: 32617}, 32626, 32681, 32680, 32676, 32854,
  11688. 32856, 32902, 32900, 33137, 33136, 33144, 33125, 33134, 33139, 33131,
  11689. {f: 2, c: 33145}, 33126, 33285, 33351, 33922, 33911, 33853, 33841, 33909,
  11690. 33894, 33899, 33865, 33900, 33883, 33852, 33845, 33889, 33891, 33897,
  11691. 33901, 33862, 34398, 34396, 34399, 34553, 34579, 34568, 34567, 34560,
  11692. 34558, 34555, {f: 2, c: 34562}, 34566, 34570, 34905, 35039, 35028, 35033,
  11693. 35036, 35032, 35037, 35041, 35018, 35029, 35026, 35228, 35299, 35435,
  11694. {f: 2, c: 35442}, 35430, 35433, 35440, 35463, 35452, 35427, 35488, 35441,
  11695. 35461, 35437, 35426, 35438, 35436, 35449, 35451, 35390, 35432, 35938,
  11696. 35978, 35977, 36042, {f: 2, c: 36039}, 36036, 36018, 36035, 36034, 36037,
  11697. 36321, 36319, 36328, 36335, 36339, 36346, 36330, 36324, 36326, 36530,
  11698. 36611, 36617, 36606, 36618, 36767, 36786, 36939, 36938, 36947, 36930,
  11699. 36948, 36924, 36949, 36944, 36935, 36943, 36942, 36941, 36945, 36926,
  11700. 36929, 37138, 37143, 37228, 37226, 37225, 37321, 37431, 37463, 37432,
  11701. 37437, 37440, 37438, 37467, 37451, 37476, 37457, 37428, 37449, 37453,
  11702. 37445, 37433, 37439, 37466, 38296, 38552, {f: 2, c: 38548}, 38605, 38603,
  11703. {f: 2, c: 38601}, 38647, 38651, 38649, 38646, 38742, 38772, 38774,
  11704. {f: 2, c: 38928}, 38931, 38922, 38930, 38924, 39164, 39156,
  11705. {f: 2, c: 39165}, 39347, 39345, 39348, 39649, 40169, 40578, [12237, 40718],
  11706. [12238, 40723], [12239, 40736], 20711, 20718, 20709, 20694, [20717, 60903],
  11707. 20698, 20693, 20687, 20689, 20721, 20686, 20713, 20834, 20979, 21123,
  11708. 21122, 21297, 21421, 22014, 22016, 22043, 22039, 22013, 22036, 22022,
  11709. 22025, {f: 2, c: 22029}, 22007, 22038, 22047, 22024, 22032, 22006, 22296,
  11710. 22294, 22645, 22654, 22659, 22675, 22666, 22649, 22661, 22653, 22781,
  11711. 22821, 22818, 22820, 22890, 22889, 23265, 23270, 23273, 23255, 23254,
  11712. 23256, 23267, 23413, 23518, 23527, 23521, {f: 2, c: 23525}, 23528, 23522,
  11713. 23524, 23519, 23565, 23650, 23940, 23943, 24155, 24163, 24149, 24151,
  11714. 24148, 24275, 24278, 24330, 24390, 24432, 24505, 24903, 24895, 24907,
  11715. 24951, {f: 2, c: 24930}, 24927, 24922, 24920, 24949, 25130, 25735, 25688,
  11716. 25684, 25764, 25720, 25695, 25722, 25681, 25703, 25652, 25709, 25723,
  11717. 25970, 26017, 26071, 26070, 26274, 26280, 26269, 27036, 27048, 27029,
  11718. 27073, 27054, 27091, 27083, 27035, 27063, 27067, 27051, 27060, 27088,
  11719. 27085, 27053, 27084, 27046, 27075, 27043, 27465, 27468, 27699, 28467,
  11720. 28436, 28414, 28435, 28404, 28457, 28478, 28448, 28460, 28431, 28418,
  11721. 28450, 28415, 28399, 28422, 28465, 28472, 28466, 28451, 28437, 28459,
  11722. 28463, 28552, 28458, 28396, 28417, 28402, 28364, 28407, 29076, 29081,
  11723. 29053, 29066, 29060, 29074, 29246, 29330, 29334, 29508, 29520, 29796,
  11724. 29795, 29802, 29808, 29805, 29956, 30097, 30247, 30221, 30219, 30217,
  11725. 30227, 30433, 30435, 30596, 30589, 30591, 30561, 30913, 30879, 30887,
  11726. 30899, 30889, 30883, {f: 2, c: 31118}, 31117, 31278, 31281, 31402, 31401,
  11727. 31469, 31471, 31649, 31637, 31627, 31605, 31639, 31645, 31636, 31631,
  11728. [31672, 58170], 31623, 31620, 31929, {f: 2, c: 31933}, 32187, 32176, 32156,
  11729. {f: 2, c: 32189}, 32160, 32202, 32180, 32178, 32177, 32186, 32162, 32191,
  11730. 32181, 32184, 32173, [32210, 58202], 32199, 32172, 32624, {f: 2, c: 32736},
  11731. 32735, 32862, 32858, 32903, 33104, 33152, 33167, 33160, 33162, 33151,
  11732. 33154, 33255, 33274, 33287, 33300, 33310, 33355, 33993, 33983, 33990,
  11733. 33988, 33945, 33950, 33970, 33948, 33995, 33976, 33984, 34003, 33936,
  11734. 33980, 34001, 33994, 34623, 34588, 34619, 34594, 34597, 34612, 34584,
  11735. 34645, 34615, 34601, 35059, 35074, 35060, 35065, 35064, 35069, 35048,
  11736. 35098, 35055, 35494, 35468, 35486, 35491, 35469, 35489, 35475, 35492,
  11737. 35498, 35493, 35496, 35480, 35473, 35482, 35495, 35946, 35981, 35980,
  11738. 36051, {f: 2, c: 36049}, 36203, 36249, 36245, 36348, 36628, 36626, 36629,
  11739. 36627, 36771, 36960, 36952, 36956, 36963, 36953, 36958, 36962, 36957,
  11740. 36955, 37145, 37144, 37150, 37237, 37240, 37239, 37236, 37496, 37548,
  11741. 37504, 37509, 37528, 37526, 37499, 37523, 37532, 37544, 37500, 37521,
  11742. 38305, {f: 2, c: 38312}, 38307, 38309, 38308, 38553, 38556, 38555, 38604,
  11743. 38610, 38656, 38780, 38789, 38902, {f: 2, c: 38935}, 39087, 39089, 39171,
  11744. 39173, 39180, 39177, 39361, {f: 2, c: 39599}, 39654, {f: 2, c: 39745},
  11745. 40180, 40182, 40179, 40636, [12240, 40763], [12241, 40778], 20740, 20736,
  11746. 20731, 20725, 20729, 20738, {f: 2, c: 20744}, 20741, 20956,
  11747. {f: 3, c: 21127}, 21133, 21130, 21232, 21426, 22062, 22075, 22073, 22066,
  11748. 22079, 22068, 22057, 22099, 22094, 22103, 22132, 22070, {f: 2, c: 22063},
  11749. 22656, 22687, 22686, 22707, 22684, 22702, 22697, 22694, 22893, 23305,
  11750. 23291, 23307, 23285, 23308, 23304, 23534, 23532, 23529, 23531,
  11751. {f: 2, c: 23652}, 23965, 23956, 24162, 24159, 24161, 24290, 24282, 24287,
  11752. 24285, 24291, 24288, 24392, 24433, 24503, 24501, 24950, 24935, 24942,
  11753. 24925, 24917, 24962, 24956, 24944, 24939, 24958, 24999, 24976, 25003,
  11754. 24974, 25004, 24986, 24996, 24980, 25006, 25134, 25705, 25711, 25721,
  11755. 25758, 25778, 25736, [25744, 57745], 25776, 25765, 25747, 25749, 25769,
  11756. 25746, 25774, 25773, 25771, 25754, 25772, 25753, 25762, 25779, 25973,
  11757. {f: 2, c: 25975}, 26286, 26283, 26292, 26289, 27171, 27167, 27112, 27137,
  11758. 27166, 27161, 27133, 27169, 27155, 27146, 27123, 27138, 27141, 27117,
  11759. 27153, 27472, 27470, 27556, {f: 2, c: 27589}, 28479, 28540, 28548, 28497,
  11760. 28518, 28500, 28550, 28525, 28507, 28536, 28526, 28558, 28538, 28528,
  11761. 28516, 28567, 28504, 28373, 28527, 28512, 28511, 29087, 29100, 29105,
  11762. 29096, 29270, 29339, 29518, 29527, 29801, 29835, 29827, 29822, 29824,
  11763. 30079, 30240, 30249, 30239, 30244, 30246, {f: 2, c: 30241}, 30362, 30394,
  11764. 30436, 30606, 30599, 30604, 30609, 30603, 30923, 30917, 30906, 30922,
  11765. 30910, 30933, 30908, 30928, 31295, 31292, 31296, 31293, 31287, 31291,
  11766. 31407, 31406, 31661, 31665, 31684, 31668, {f: 2, c: 31686}, 31681, 31648,
  11767. 31692, 31946, 32224, 32244, 32239, 32251, 32216, 32236, 32221, 32232,
  11768. 32227, 32218, 32222, 32233, 32158, 32217, 32242, 32249, 32629, 32631,
  11769. 32687, 32745, 32806, {f: 3, c: 33179}, 33184, 33178, 33176, 34071, 34109,
  11770. 34074, 34030, {f: 2, c: 34092}, 34067, 34065, 34083, 34081, 34068, 34028,
  11771. 34085, 34047, 34054, 34690, 34676, 34678, 34656, 34662, 34680, 34664,
  11772. 34649, 34647, 34636, 34643, 34907, 34909, 35088, 35079, {f: 2, c: 35090},
  11773. 35093, 35082, 35516, 35538, 35527, 35524, 35477, 35531, 35576, 35506,
  11774. 35529, 35522, 35519, 35504, 35542, 35533, 35510, 35513, 35547, 35916,
  11775. 35918, 35948, 36064, 36062, 36070, 36068, {f: 2, c: 36076},
  11776. {f: 2, c: 36066}, 36060, 36074, 36065, 36205, 36255, 36259, 36395, 36368,
  11777. 36381, 36386, 36367, 36393, 36383, 36385, 36382, 36538, 36637, 36635,
  11778. 36639, 36649, 36646, 36650, 36636, 36638, 36645, 36969, 36974, 36968,
  11779. 36973, 36983, 37168, 37165, 37159, 37169, 37255, 37257, 37259, 37251,
  11780. 37573, 37563, 37559, 37610, 37604, 37569, 37555, 37564, 37586, 37575,
  11781. 37616, 37554, 38317, 38321, 38660, {f: 2, c: 38662}, 38665, 38752, 38797,
  11782. 38795, 38799, 38945, 38955, 38940, 39091, 39178, 39187, 39186, 39192,
  11783. 39389, 39376, 39391, 39387, 39377, 39381, 39378, 39385, 39607,
  11784. {f: 2, c: 39662}, 39719, 39749, 39748, 39799, 39791, 40198, 40201, 40195,
  11785. 40617, 40638, 40654, 22696, [12242, 40786], 20754, 20760, 20756, 20752,
  11786. 20757, 20864, 20906, 20957, 21137, 21139, 21235, 22105, 22123, 22137,
  11787. 22121, 22116, 22136, 22122, 22120, 22117, 22129, 22127, 22124, 22114,
  11788. 22134, 22721, 22718, 22727, 22725, 22894, 23325, 23348, 23416, 23536,
  11789. 23566, 24394, 25010, 24977, 25001, 24970, 25037, 25014, 25022, 25034,
  11790. 25032, 25136, 25797, 25793, 25803, {f: 2, c: 25787}, 25818, 25796, 25799,
  11791. 25794, 25805, 25791, 25810, 25812, 25790, 25972, 26310, 26313, 26297,
  11792. 26308, 26311, 26296, 27197, 27192, 27194, 27225, 27243, 27224, 27193,
  11793. 27204, 27234, 27233, 27211, 27207, 27189, 27231, 27208, 27481, 27511,
  11794. 27653, 28610, 28593, 28577, 28611, 28580, 28609, 28583, 28595, 28608,
  11795. 28601, [28598, 60318], 28582, 28576, 28596, 29118, 29129, 29136, 29138,
  11796. 29128, 29141, 29113, 29134, 29145, 29148, {f: 2, c: 29123}, 29544, 29852,
  11797. 29859, 29848, 29855, 29854, 29922, {f: 2, c: 29964}, 30260, 30264, 30266,
  11798. 30439, 30437, 30624, {f: 2, c: 30622}, 30629, 30952, 30938, 30956, 30951,
  11799. 31142, {f: 2, c: 31309}, 31302, 31308, 31307, 31418, 31705, 31761, 31689,
  11800. 31716, 31707, 31713, 31721, 31718, {f: 2, c: 31957}, 32266, 32273, 32264,
  11801. 32283, 32291, 32286, [32285, 58211], 32265, 32272, 32633, 32690,
  11802. {f: 2, c: 32752}, 32750, [32808, 58239], 33203, 33193, 33192, 33275, 33288,
  11803. {f: 2, c: 33368}, 34122, 34137, 34120, {f: 2, c: 34152}, 34115, 34121,
  11804. 34157, 34154, 34142, 34691, 34719, 34718, 34722, 34701, 34913, 35114,
  11805. 35122, 35109, 35115, 35105, 35242, [35238, 58391], 35558, 35578, 35563,
  11806. 35569, 35584, 35548, 35559, 35566, 35582, {f: 2, c: 35585}, 35575, 35565,
  11807. 35571, 35574, 35580, 35947, 35949, 35987, 36084, 36420, 36401, 36404,
  11808. 36418, 36409, 36405, 36667, 36655, 36664, 36659, 36776, 36774, 36981,
  11809. 36980, 36984, 36978, 36988, 36986, 37172, 37266, 37664, 37686, 37624,
  11810. 37683, 37679, 37666, 37628, 37675, 37636, 37658, 37648, 37670, 37665,
  11811. 37653, 37678, 37657, 38331, {f: 2, c: 38567}, 38570, 38613, 38670, 38673,
  11812. 38678, 38669, 38675, 38671, 38747, [38748, 58565], 38758, 38808, 38960,
  11813. 38968, 38971, 38967, 38957, 38969, 38948, 39184, 39208, 39198, 39195,
  11814. 39201, 39194, 39405, 39394, 39409, 39608, 39612, 39675, 39661, 39720,
  11815. 39825, 40213, 40227, 40230, 40232, 40210, 40219, 40664, 40660,
  11816. [12243, 40845], [12244, 40860], 20778, 20767, 20769, 20786, 21237, 22158,
  11817. 22144, 22160, 22149, 22151, 22159, 22741, 22739, 22737, 22734, 23344,
  11818. 23338, 23332, 23418, 23607, 23656, 23996, 23994, 23997, 23992, 24171,
  11819. 24396, 24509, 25033, 25026, 25031, 25062, 25035, 25138, 25140, 25806,
  11820. 25802, 25816, 25824, 25840, 25830, 25836, 25841, 25826, 25837,
  11821. {f: 2, c: 25986}, 26329, 26326, 27264, 27284, 27268, 27298, 27292, 27355,
  11822. 27299, 27262, 27287, 27280, 27296, 27484, 27566, 27610, 27656, 28632,
  11823. 28657, {f: 2, c: 28639}, 28635, 28644, 28651, 28655, 28544, 28652, 28641,
  11824. 28649, 28629, 28654, 28656, 29159, [29151, 60361], 29166, 29158, 29157,
  11825. 29165, 29164, 29172, 29152, 29237, 29254, 29552, 29554, 29865, 29872,
  11826. 29862, 29864, 30278, 30274, 30284, 30442, 30643, 30634, 30640, 30636,
  11827. 30631, 30637, 30703, 30967, 30970, 30964, 30959, 30977, 31143, 31146,
  11828. 31319, 31423, 31751, 31757, 31742, 31735, 31756, 31712, 31968, 31964,
  11829. 31966, 31970, 31967, 31961, 31965, 32302, 32318, 32326, 32311, 32306,
  11830. 32323, 32299, 32317, 32305, 32325, 32321, 32308, 32313, 32328, 32309,
  11831. 32319, 32303, 32580, 32755, 32764, {f: 2, c: 32881}, 32880, 32879, 32883,
  11832. 33222, 33219, 33210, 33218, 33216, 33215, 33213, 33225, 33214, 33256,
  11833. 33289, 33393, 34218, 34180, 34174, 34204, 34193, 34196, 34223, 34203,
  11834. 34183, 34216, 34186, 34214, 34407, 34752, 34769, 34739, 34770, 34758,
  11835. 34731, 34747, 34746, 34760, 34763, 35131, 35126, 35140, 35128, 35133,
  11836. 35244, 35598, 35607, 35609, 35611, 35594, 35616, 35613, 35588, 35600,
  11837. 35905, 35903, 35955, 36090, 36093, 36092, 36088, 36091, 36264, 36425,
  11838. 36427, 36424, 36426, 36676, 36670, 36674, 36677, 36671, 36991, 36989,
  11839. 36996, {f: 2, c: 36993}, 36992, 37177, 37283, 37278, 37276, 37709, 37762,
  11840. 37672, 37749, 37706, 37733, 37707, 37656, 37758, 37740, 37723, 37744,
  11841. 37722, 37716, {f: 3, c: 38346}, 38344, 38342, 38577, 38584, 38614, 38684,
  11842. 38686, 38816, 38867, 38982, 39094, 39221, 39425, 39423, 39854, 39851,
  11843. 39850, 39853, 40251, 40255, 40587, 40655, 40670, {f: 2, c: 40668}, 40667,
  11844. 40766, 40779, 21474, 22165, 22190, 22745, 22744, 23352, 24413, 25059,
  11845. 25139, 25844, 25842, 25854, 25862, {f: 2, c: 25850}, 25847, 26039, 26332,
  11846. 26406, 27315, 27308, 27331, 27323, 27320, 27330, {f: 2, c: 27310}, 27487,
  11847. 27512, 27567, 28681, 28683, 28670, 28678, 28666, 28689, 28687,
  11848. {f: 2, c: 29179}, 29182, 29176, 29559, 29557, 29863, 29887, 29973, 30294,
  11849. 30296, 30290, 30653, 30655, {f: 2, c: 30651}, 30990, 31150,
  11850. {f: 2, c: 31329}, 31328, {f: 2, c: 31428}, 31787, 31783, 31786, 31774,
  11851. 31779, 31777, 31975, {f: 2, c: 32340}, 32350, 32346, 32353, 32338, 32345,
  11852. 32584, 32761, 32763, 32887, 32886, 33229, 33231, 33290, 34255, 34217,
  11853. 34253, 34256, 34249, 34224, 34234, 34233, 34799, 34796, 34802, 34784,
  11854. 35206, 35250, 35316, 35624, 35641, 35628, 35627, 35920, 36101, 36441,
  11855. 36451, 36454, 36452, 36447, 36437, 36544, 36681, 36685, 36999, 36995,
  11856. 37000, {f: 2, c: 37291}, 37328, 37780, 37770, 37782, 37794, 37811, 37806,
  11857. 37804, 37808, 37784, 37786, 37783, 38356, 38358, 38352, 38357, 38626,
  11858. 38620, 38617, 38619, 38622, 38692, 38819, 38822, 38829, 38905, 38989,
  11859. 38991, 38988, 38990, 38995, 39098, {f: 2, c: 39230}, 39229, 39214, 39333,
  11860. 39438, 39617, 39683, 39686, 39759, 39758, 39757, 39882, 39881, 39933,
  11861. 39880, 39872, 40273, 40285, 40288, 40672, 40725, 40748, 20787, 22181,
  11862. 22184, {f: 2, c: 22750}, 22754, 23541, 40848, 24300, 25074, 25079, 25078,
  11863. 25077, 25856, 25871, 26336, 26333, 27365, 27357, 27354, 27347, 28699,
  11864. 28703, 28712, 28698, 28701, 28693, 28696, 29190, 29197, 29272, 29346,
  11865. 29560, 29562, 29885, 29898, 29923, 30087, 30086, 30303, 30305, 30663,
  11866. 31001, 31153, 31339, 31337, {f: 2, c: 31806}, 31800, 31805, 31799, 31808,
  11867. 32363, 32365, 32377, {f: 2, c: 32361}, 32371, 32645, 32694, 32697, 32696,
  11868. 33240, 34281, 34269, 34282, 34261, {f: 2, c: 34276}, 34295, 34811, 34821,
  11869. 34829, 34809, 34814, 35168, 35167, 35158, 35166, 35649, 35676, 35672,
  11870. 35657, 35674, {f: 2, c: 35662}, 35654, 35673, 36104, 36106, 36476, 36466,
  11871. 36487, 36470, 36460, 36474, 36468, 36692, 36686, 36781, {f: 2, c: 37002},
  11872. 37297, 37294, 37857, 37841, 37855, 37827, 37832, {f: 2, c: 37852}, 37846,
  11873. 37858, 37837, 37848, 37860, 37847, 37864, 38364, 38580, 38627, 38698,
  11874. 38695, 38753, 38876, 38907, 39006, 39000, 39003, 39100, 39237, 39241,
  11875. 39446, 39449, 39693, 39912, 39911, 39894, 39899, 40329, 40289, 40306,
  11876. 40298, 40300, 40594, 40599, 40595, 40628, 21240, 22199, 22198, 22196,
  11877. 22204, 22756, 23360, 23363, 23421, 23542, 24009, 25080, 25082, 25880,
  11878. 25876, 25881, 26342, 26407, 27372, 28734, 28720, 28722, 29200, 29563,
  11879. 29903, 30306, 30309, 31014, 31018, 31020, 31019, 31431, 31478, 31820,
  11880. 31811, 31821, {f: 2, c: 31983}, 36782, 32381, 32380, 32386, 32588, 32768,
  11881. 33242, 33382, 34299, 34297, 34321, 34298, 34310, 34315, 34311, 34314,
  11882. {f: 2, c: 34836}, 35172, 35258, 35320, 35696, 35692, 35686, 35695, 35679,
  11883. 35691, 36111, 36109, 36489, 36481, 36485, 36482, 37300, 37323, 37912,
  11884. 37891, 37885, 38369, 38704, 39108, 39250, 39249, 39336, 39467, 39472,
  11885. 39479, 39477, 39955, 39949, 40569, 40629, 40680, 40751, 40799, 40803,
  11886. 40801, {f: 2, c: 20791}, 22209, 22208, 22210, 22804, 23660, 24013, 25084,
  11887. 25086, 25885, 25884, 26005, 26345, 27387, 27396, 27386, 27570, 28748,
  11888. 29211, 29351, 29910, 29908, 30313, 30675, 31824, 32399, 32396, 32700,
  11889. 34327, 34349, 34330, 34851, 34850, 34849, 34847, 35178, 35180, 35261,
  11890. 35700, 35703, 35709, 36115, 36490, 36493, 36491, 36703, 36783, 37306,
  11891. 37934, 37939, 37941, 37946, 37944, 37938, 37931, 38370, {f: 2, c: 38712},
  11892. 38706, [38911, 58586], 39015, 39013, 39255, 39493, 39491, 39488, 39486,
  11893. 39631, 39764, 39761, 39981, 39973, 40367, 40372, 40386, 40376, 40605,
  11894. 40687, 40729, 40796, {f: 2, c: 40806}, 20796, 20795, 22216, 22218, 22217,
  11895. 23423, 24020, 24018, 24398, 25087, 25892, 27402, 27489, 28753, 28760,
  11896. 29568, 29924, 30090, 30318, 30316, 31155, 31840, 31839, 32894, 32893,
  11897. 33247, 35186, 35183, 35324, 35712, {f: 2, c: 36118}, 36497, 36499, 36705,
  11898. 37192, 37956, {f: 2, c: 37969}, {f: 2, c: 38717}, 38851, 38849, 39019,
  11899. 39253, 39509, 39501, 39634, 39706, 40009, 39985, 39998, 39995, 40403,
  11900. 40407, 40756, 40812, 40810, 40852, 22220, 24022, 25088, 25891, 25899,
  11901. 25898, 26348, 27408, 29914, 31434, 31844, 31843, 31845, 32403, 32406,
  11902. 32404, 33250, 34360, 34367, 34865, 35722, 37008, 37007, 37987, 37984,
  11903. 37988, 38760, 39023, 39260, {f: 2, c: 39514}, 39511, {f: 2, c: 39635},
  11904. 39633, 40020, 40023, 40022, 40421, 40607, 40692, 22225, 22761, 25900,
  11905. 28766, {f: 2, c: 30321}, [30679, 60226], 32592, 32648, 34870, 34873, 34914,
  11906. 35731, 35730, 35734, 33399, 36123, 37312, 37994, 38722, 38728, 38724,
  11907. 38854, 39024, 39519, 39714, 39768, 40031, {f: 2, c: 40441},
  11908. {f: 2, c: 40572}, 40711, 40823, 40818, 24307, 27414, 28771, 31852, 31854,
  11909. 34875, 35264, 36513, 37313, 38002, 38000, 39025, 39262, 39638, 39715,
  11910. 40652, 28772, 30682, 35738, 38007, 38857, 39522, 39525, 32412, 35740,
  11911. 36522, 37317, {f: 2, c: 38013}, 38012, {f: 2, c: 40055}, 40695, 35924,
  11912. 38015, 40474, 29224, 39530, 39729, 40475, 40478, 31858, 20034, 20060,
  11913. [12048, 20981], [12053, 21274], [12058, 21378], 19975, 19980, 20039, 20109,
  11914. [12062, 22231], [12076, 23662], [12091, 24435], 19983, 20871, 19982, 20014,
  11915. 20115, 20162, 20169, 20168, 20888, 21244, 21356, 21433, 22304, 22787,
  11916. 22828, [23568, 60417], 24063, 26081, [12110, 27571], 27596, [12115, 27668],
  11917. [12121, 29247], 20017, 20028, 20200, 20188, 20201, 20193, 20189, 20186,
  11918. 21004, 21001, 21276, 21324, {f: 2, c: 22306}, 22807, 22831, 23425, 23428,
  11919. 23570, 23611, 23668, 23667, 24068, 24192, 24194, 24521, 25097, 25168,
  11920. 27669, 27702, 27715, 27711, 27707, 29358, 29360, 29578, [12145, 31160],
  11921. 32906, 38430, 20238, 20248, 20268, 20213, 20244, 20209, 20224, 20215,
  11922. 20232, 20253, 20226, 20229, 20258, 20243, 20228, 20212, 20242, 20913,
  11923. 21011, 21008, 21158, 21282, 21279, 21325, 21386, 21511, 22241, 22239,
  11924. 22318, 22314, 22324, 22844, 22912, 22908, 22917, 22907, 22910, 22903,
  11925. 22911, 23382, 23573, 23589, 23676, {f: 2, c: 23674}, 23678, 24031,
  11926. [24181, 57646], 24196, 24322, 24346, 24436, 24533, 24532, 24527, 25180,
  11927. 25182, 25188, 25185, 25190, 25186, 25177, 25184, 25178, 25189, 25911,
  11928. 26095, 26094, 26430, 26425, 26424, 26427, 26426, 26431, 26428, 26419,
  11929. 27672, 27718, 27730, 27740, 27727, [27722, 60796], 27732, {f: 2, c: 27723},
  11930. 28785, 29278, {f: 2, c: 29364}, 29582, 29994, 30335, 31349, [12153, 32593],
  11931. [12171, 33400], 33404, 33408, 33405, 33407, [12172, 34381], [12177, 35198],
  11932. 37017, [37015, 59347], 37016, 37019, 37012, 38434, 38436, 38432, 38435,
  11933. 20310, 20283, 20322, 20297, 20307, 20324, 20286, 20327, 20306, 20319,
  11934. 20289, 20312, 20269, 20275, 20287, 20321, 20879, 20921, 21020, 21022,
  11935. 21025, {f: 2, c: 21165}, 21257, 21347, 21362, {f: 2, c: 21390}, 21552,
  11936. 21559, 21546, 21588, 21573, 21529, 21532, 21541, 21528, 21565, 21583,
  11937. 21569, 21544, 21540, 21575, 22254, 22247, 22245, 22337, 22341, 22348,
  11938. 22345, 22347, 22354, 22790, 22848, 22950, 22936, 22944, 22935, 22926,
  11939. 22946, 22928, 22927, 22951, 22945, 23438, 23442, 23592, 23594, 23693,
  11940. 23695, 23688, 23691, 23689, 23698, 23690, 23686, 23699, 23701, 24032,
  11941. 24074, 24078, 24203, 24201, 24204, 24200, 24205, 24325, 24349, 24440,
  11942. 24438, 24530, 24529, 24528, 24557, 24552, 24558, 24563, 24545, 24548,
  11943. 24547, 24570, 24559, 24567, 24571, 24576, 24564, 25146, 25219, 25228,
  11944. {f: 2, c: 25230}, 25236, 25223, 25201, 25211, 25210, 25200, 25217, 25224,
  11945. 25207, 25213, 25202, 25204, 26096, 26100, 26099, 26098, 26101, 26437,
  11946. 26439, 26457, 26453, 26444, 26440, 26461, 26445, 26458, 26443, 27600,
  11947. {f: 2, c: 27673}, 27768, 27751, 27755, 27780, 27787, 27791, 27761, 27759,
  11948. 27753, 27802, 27757, 27783, 27797, [27804, 57900], 27750, 27763, 27749,
  11949. 27771, 27790, 28788, 28794, 29283, 29375, 29373, 29379, 29382, 29377,
  11950. 29370, 29381, 29589, 29591, {f: 2, c: 29587}, 29586, 30010, 30009,
  11951. {f: 2, c: 30100}, 30337, 31037, 32820, 32917, 32921, 32912, 32914, 32924,
  11952. 33424, 33423, 33413, 33422, 33425, 33427, 33418, {f: 2, c: 33411},
  11953. [12184, 35960], 36809, 36799, 37023, 37025, 37029, 37022, 37031, 37024,
  11954. 38448, 38440, 38447, 38445, 20019, 20376, 20348, 20357, 20349, 20352,
  11955. 20359, 20342, 20340, 20361, 20356, 20343, 20300, 20375, 20330, 20378,
  11956. 20345, 20353, 20344, 20368, 20380, 20372, 20382, 20370, 20354, 20373,
  11957. 20331, 20334, 20894, 20924, 20926, 21045, {f: 2, c: 21042}, 21062, 21041,
  11958. 21180, {f: 2, c: 21258}, 21308, 21394, 21396, 21639, 21631, 21633, 21649,
  11959. 21634, 21640, 21611, 21626, 21630, 21605, 21612, 21620, 21606, 21645,
  11960. 21615, 21601, 21600, 21656, 21603, 21607, 21604, 22263, 22265, 22383,
  11961. 22386, 22381, 22379, 22385, 22384, 22390, 22400, 22389, 22395,
  11962. {f: 2, c: 22387}, 22370, 22376, 22397, 22796, 22853, 22965, 22970, 22991,
  11963. 22990, 22962, 22988, 22977, 22966, 22972, 22979, 22998, 22961, 22973,
  11964. 22976, 22984, 22964, 22983, 23394, 23397, 23443, 23445, 23620, 23623,
  11965. 23726, 23716, 23712, 23733, 23727, 23720, 23724, 23711, 23715, 23725,
  11966. 23714, 23722, 23719, 23709, 23717, 23734, 23728, 23718, 24087, 24084,
  11967. 24089, 24360, {f: 3, c: 24354}, 24404, 24450, 24446, 24445, 24542, 24549,
  11968. 24621, 24614, 24601, 24626, 24587, 24628, 24586, 24599, 24627, 24602,
  11969. 24606, 24620, 24610, 24589, 24592, 24622, 24595, 24593, 24588, 24585,
  11970. 24604, 25108, 25149, 25261, 25268, 25297, 25278, 25258, 25270, 25290,
  11971. 25262, 25267, 25263, 25275, 25257, 25264, 25272, 25917, 26024, 26043,
  11972. 26121, 26108, 26116, 26130, 26120, 26107, 26115, 26123, 26125, 26117,
  11973. 26109, 26129, 26128, 26358, 26378, 26501, 26476, 26510, 26514, 26486,
  11974. 26491, 26520, 26502, 26500, 26484, 26509, 26508, 26490, 26527, 26513,
  11975. 26521, 26499, 26493, 26497, {f: 2, c: 26488}, 26516, 27429, 27520, 27518,
  11976. 27614, 27677, 27795, 27884, 27883, 27886, 27865, 27830, 27860, 27821,
  11977. 27879, 27831, 27856, 27842, 27834, 27843, 27846, 27885, 27890, 27858,
  11978. 27869, 27828, 27786, 27805, 27776, 27870, 27840, 27952, 27853, 27847,
  11979. 27824, 27897, 27855, 27881, 27857, 28820, 28824, 28805, 28819, 28806,
  11980. 28804, 28817, 28822, 28802, 28826, 28803, 29290, 29398, 29387, 29400,
  11981. 29385, 29404, 29394, 29396, 29402, 29388, 29393, 29604, 29601, 29613,
  11982. 29606, 29602, 29600, 29612, 29597, 29917, 29928, {f: 2, c: 30015}, 30014,
  11983. 30092, 30104, 30383, 30451, 30449, 30448, 30453, 30712, 30716, 30713,
  11984. 30715, 30714, 30711, 31042, 31039, 31173, 31352, 31355, 31483, 31861,
  11985. 31997, 32821, 32911, 32942, 32931, 32952, 32949, 32941, 33312, 33440,
  11986. 33472, 33451, 33434, 33432, 33435, 33461, 33447, 33454, 33468, 33438,
  11987. 33466, 33460, 33448, 33441, 33449, 33474, 33444, 33475, 33462, 33442,
  11988. 34416, 34415, {f: 2, c: 34413}, 35926, 36818, 36811, 36819, 36813, 36822,
  11989. 36821, 36823, 37042, 37044, 37039, 37043, 37040, 38457, 38461, 38460,
  11990. 38458, 38467, 20429, 20421, 20435, 20402, 20425, 20427, 20417, 20436,
  11991. 20444, 20441, [20411, 60346], 20403, 20443, 20423, 20438, 20410, 20416,
  11992. 20409, 20460, 21060, 21065, 21184, 21186, 21309, 21372, 21399, 21398,
  11993. 21401, 21400, 21690, 21665, 21677, 21669, 21711, 21699, 33549, 21687,
  11994. 21678, 21718, 21686, {f: 2, c: 21701}, 21664, 21616, 21692, 21666, 21694,
  11995. 21618, 21726, 21680, 22453, {f: 2, c: 22430}, 22436, 22412, 22423, 22429,
  11996. 22427, 22420, 22424, 22415, 22425, 22437, 22426, 22421, 22772, 22797,
  11997. 22867, 23009, 23006, 23022, 23040, 23025, 23005, 23034, 23037, 23036,
  11998. 23030, 23012, 23026, 23031, 23003, 23017, 23027, 23029, 23008, 23038,
  11999. 23028, 23021, 23464, 23628, 23760, 23768, 23756, 23767, 23755, 23771,
  12000. 23774, 23770, 23753, 23751, 23754, 23766, {f: 2, c: 23763}, 23759, 23752,
  12001. 23750, 23758, 23775, 23800, 24057, {f: 3, c: 24097}, 24096, 24100, 24240,
  12002. 24228, 24226, 24219, 24227, 24229, 24327, 24366, 24406, 24454, 24631,
  12003. 24633, 24660, 24690, 24670, 24645, 24659, 24647, 24649, 24667, 24652,
  12004. 24640, 24642, 24671, 24612, 24644, 24664, 24678, 24686, {f: 2, c: 25154},
  12005. 25295, 25357, 25355, 25333, 25358, 25347, 25323, 25337, 25359, 25356,
  12006. 25336, 25334, 25344, {f: 2, c: 25363}, 25338, 25365, 25339, 25328, 25921,
  12007. 25923, 26026, 26047, 26166, 26145, 26162, 26165, 26140, 26150, 26146,
  12008. 26163, 26155, 26170, 26141, 26164, 26169, 26158, {f: 2, c: 26383}, 26561,
  12009. 26610, 26568, 26554, 26588, 26555, 26616, 26584, 26560, 26551, 26565,
  12010. 26603, 26596, 26591, 26549, 26573, 26547, 26615, 26614, 26606, 26595,
  12011. 26562, 26553, 26574, 26599, 26608, 26546, 26620, 26566, 26605, 26572,
  12012. 26542, 26598, 26587, 26618, {f: 2, c: 26569}, 26563, 26602, 26571, 27432,
  12013. 27522, 27524, 27574, 27606, 27608, 27616, {f: 2, c: 27680}, 27944, 27956,
  12014. 27949, 27935, 27964, 27967, 27922, 27914, 27866, 27955, 27908, 27929,
  12015. 27962, 27930, 27921, 27904, 27933, 27970, 27905, 27928, 27959, 27907,
  12016. 27919, 27968, 27911, 27936, 27948, 27912, 27938, 27913, 27920, 28855,
  12017. 28831, 28862, 28849, 28848, 28833, {f: 2, c: 28852}, 28841, 29249,
  12018. {f: 2, c: 29257}, 29292, 29296, 29299, 29294, 29386, 29412, 29416, 29419,
  12019. 29407, 29418, 29414, 29411, 29573, 29644, 29634, 29640, 29637, 29625,
  12020. 29622, 29621, 29620, 29675, 29631, 29639, 29630, 29635, 29638, 29624,
  12021. 29643, 29932, 29934, 29998, {f: 2, c: 30023}, 30119, 30122, 30329, 30404,
  12022. 30472, {f: 3, c: 30467}, 30474, 30455, 30459, 30458, {f: 2, c: 30695},
  12023. 30726, {f: 2, c: 30737}, 30725, 30736, 30735, 30734, [30729, 58095], 30723,
  12024. 30739, 31050, 31052, 31051, 31045, 31044, 31189, 31181, 31183, 31190,
  12025. 31182, 31360, 31358, 31441, {f: 2, c: 31488}, 31866, {f: 2, c: 31864},
  12026. {f: 3, c: 31871}, 32003, 32008, 32001, 32600, 32657, 32653, 32702, 32775,
  12027. {f: 2, c: 32782}, 32788, 32823, 32984, 32967, 32992, 32977, 32968, 32962,
  12028. 32976, 32965, 32995, 32985, 32988, 32970, 32981, 32969, 32975, 32983,
  12029. 32998, 32973, 33279, 33313, 33428, 33497, 33534, 33529, 33543, 33512,
  12030. 33536, 33493, 33594, 33515, 33494, 33524, 33516, 33505, 33522, 33525,
  12031. 33548, 33531, 33526, 33520, 33514, 33508, 33504, 33530, 33523, 33517,
  12032. 34423, 34420, 34428, 34419, 34881, 34894, 34919, 34922, 34921, 35283,
  12033. 35332, 35335, 36210, 36835, 36833, 36846, 36832, 37105, 37053, 37055,
  12034. 37077, 37061, 37054, 37063, 37067, 37064, [37332, 60294], 37331, 38484,
  12035. 38479, 38481, 38483, 38474, 38478, 20510, 20485, 20487, 20499, 20514,
  12036. 20528, 20507, 20469, 20468, 20531, 20535, 20524, {f: 2, c: 20470}, 20503,
  12037. 20508, 20512, 20519, 20533, 20527, 20529, 20494, 20826, 20884, 20883,
  12038. 20938, {f: 2, c: 20932}, 20936, 20942, 21089, 21082, 21074,
  12039. {f: 2, c: 21086}, 21077, 21090, 21197, 21262, 21406, 21798, 21730, 21783,
  12040. 21778, 21735, 21747, 21732, 21786, 21759, 21764, 21768, 21739, 21777,
  12041. 21765, 21745, 21770, 21755, {f: 2, c: 21751}, 21728, 21774, 21763, 21771,
  12042. {f: 2, c: 22273}, 22476, 22578, 22485, 22482, 22458, 22470, 22461, 22460,
  12043. 22456, 22454, 22463, 22471, 22480, 22457, 22465, 22798, 22858, 23065,
  12044. 23062, {f: 2, c: 23085}, 23061, 23055, 23063, 23050, 23070, 23091, 23404,
  12045. 23463, 23469, 23468, 23555, 23638, 23636, 23788, 23807, 23790, 23793,
  12046. 23799, 23808, 23801, 24105, 24104, 24232, 24238, 24234, 24236, 24371,
  12047. 24368, 24423, 24669, 24666, 24679, 24641, 24738, 24712, 24704, 24722,
  12048. 24705, 24733, 24707, 24725, 24731, 24727, 24711, 24732, 24718, 25113,
  12049. 25158, 25330, 25360, 25430, 25388, {f: 2, c: 25412}, 25398, 25411, 25572,
  12050. 25401, 25419, 25418, 25404, 25385, 25409, 25396, 25432, 25428, 25433,
  12051. 25389, 25415, 25395, 25434, 25425, 25400, 25431, 25408, 25416, 25930,
  12052. 25926, 26054, {f: 2, c: 26051}, 26050, 26186, 26207, 26183, 26193,
  12053. {f: 2, c: 26386}, 26655, 26650, 26697, {f: 2, c: 26674}, 26683, 26699,
  12054. 26703, 26646, 26673, 26652, 26677, 26667, 26669, 26671, 26702, 26692,
  12055. 26676, 26653, 26642, 26644, 26662, 26664, 26670, 26701, 26682, 26661,
  12056. 26656, 27436, 27439, 27437, 27441, 27444, 27501, 32898, 27528, 27622,
  12057. 27620, 27624, 27619, 27618, 27623, 27685, 28026, {f: 2, c: 28003}, 28022,
  12058. 27917, 28001, 28050, 27992, 28002, 28013, 28015, 28049, 28045, 28143,
  12059. 28031, 28038, 27998, [28007, 59078], 28000, 28055, 28016, 28028, 27999,
  12060. 28034, 28056, 27951, 28008, 28043, 28030, 28032, 28036, 27926, 28035,
  12061. 28027, 28029, 28021, 28048, 28892, 28883, 28881, 28893, 28875, 32569,
  12062. 28898, 28887, 28882, 28894, 28896, 28884, 28877, {f: 3, c: 28869}, 28890,
  12063. 28878, 28897, 29250, 29304, 29303, 29302, 29440, 29434, 29428, 29438,
  12064. 29430, 29427, 29435, 29441, 29651, 29657, 29669, 29654, 29628, 29671,
  12065. 29667, 29673, 29660, 29650, 29659, 29652, 29661, 29658, {f: 2, c: 29655},
  12066. 29672, {f: 2, c: 29918}, {f: 2, c: 29940}, 29985, 30043, 30047, 30128,
  12067. 30145, 30139, 30148, 30144, 30143, 30134, 30138, 30346, 30409, 30493,
  12068. 30491, 30480, 30483, 30482, 30499, 30481, 30485, {f: 2, c: 30489}, 30498,
  12069. 30503, 30755, 30764, 30754, 30773, 30767, 30760, 30766, 30763, 30753,
  12070. 30761, 30771, 30762, 30769, 31060, 31067, 31055, 31068, 31059, 31058,
  12071. 31057, {f: 2, c: 31211}, 31200, 31214, 31213, 31210, 31196, 31198, 31197,
  12072. 31366, 31369, 31365, {f: 2, c: 31371}, 31370, 31367, 31448, 31504, 31492,
  12073. 31507, 31493, 31503, 31496, 31498, 31502, 31497, 31506, 31876, 31889,
  12074. 31882, 31884, 31880, 31885, 31877, 32030, 32029, 32017, 32014, 32024,
  12075. 32022, 32019, 32031, 32018, 32015, 32012, 32604, 32609, 32606, 32608,
  12076. 32605, 32603, 32662, 32658, 32707, 32706, 32704, 32790, 32830, 32825,
  12077. 33018, 33010, 33017, 33013, 33025, 33019, 33024, 33281, 33327, 33317,
  12078. 33587, 33581, 33604, 33561, 33617, 33573, 33622, 33599, 33601, 33574,
  12079. 33564, 33570, 33602, 33614, 33563, 33578, 33544, 33596, 33613, 33558,
  12080. 33572, 33568, 33591, 33583, 33577, 33607, 33605, 33612, 33619, 33566,
  12081. 33580, 33611, 33575, 33608, 34387, 34386, 34466, 34472, 34454, 34445,
  12082. 34449, 34462, 34439, 34455, 34438, 34443, 34458, 34437, 34469, 34457,
  12083. 34465, 34471, 34453, 34456, 34446, 34461, 34448, 34452, {f: 2, c: 34883},
  12084. 34925, {f: 2, c: 34933}, 34930, 34944, 34929, 34943, 34927, 34947, 34942,
  12085. 34932, 34940, 35346, 35911, 35927, 35963, 36004, 36003, 36214, 36216,
  12086. 36277, 36279, 36278, 36561, 36563, 36862, 36853, 36866, 36863, 36859,
  12087. 36868, 36860, 36854, 37078, 37088, {f: 2, c: 37081}, 37091, 37087, 37093,
  12088. 37080, 37083, 37079, 37084, 37092, 37200, {f: 2, c: 37198}, 37333, 37346,
  12089. 37338, 38492, 38495, 38588, 39139, [12221, 39647], [12223, 39727], 20095,
  12090. 20592, 20586, 20577, 20574, 20576, 20563, 20555, 20573, 20594, 20552,
  12091. 20557, 20545, 20571, 20554, 20578, 20501, 20549, 20575, 20585, 20587,
  12092. {f: 2, c: 20579}, 20550, 20544, 20590, 20595, 20567, 20561, 20944, 21099,
  12093. 21101, 21100, 21102, 21206, 21203, 21293, 21404, {f: 2, c: 21877}, 21820,
  12094. 21837, 21840, 21812, 21802, 21841, 21858, 21814, 21813, 21808, 21842,
  12095. 21829, 21772, 21810, 21861, 21838, 21817, 21832, 21805, 21819, 21824,
  12096. 21835, 22282, 22279, 22523, 22548, 22498, 22518, 22492, 22516, 22528,
  12097. 22509, 22525, 22536, 22520, 22539, 22515, 22479, 22535, 22510, 22499,
  12098. 22514, 22501, 22508, 22497, 22542, 22524, 22544, 22503, 22529, 22540,
  12099. 22513, 22505, 22512, 22541, 22532, 22876, 23136, 23128, 23125,
  12100. [23143, 60437], 23134, 23096, 23093, 23149, 23120, 23135, 23141, 23148,
  12101. 23123, 23140, 23127, 23107, 23133, 23122, 23108, 23131, 23112, 23182,
  12102. 23102, 23117, 23097, 23116, 23152, 23145, 23111, 23121, 23126, 23106,
  12103. 23132, 23410, 23406, 23489, 23488, 23641, 23838, 23819, 23837, 23834,
  12104. 23840, 23820, 23848, 23821, 23846, 23845, 23823, 23856, 23826, 23843,
  12105. 23839, 23854, 24126, 24116, 24241, 24244, 24249, {f: 2, c: 24242}, 24374,
  12106. 24376, 24475, 24470, 24479, 24714, 24720, 24710, 24766, 24752, 24762,
  12107. {f: 2, c: 24787}, 24783, 24804, 24793, 24797, 24776, 24753, 24795, 24759,
  12108. 24778, 24767, 24771, 24781, 24768, 25394, 25445, 25482, 25474, 25469,
  12109. 25533, 25502, 25517, 25501, 25495, 25515, 25486, 25455, 25479, 25488,
  12110. 25454, 25519, 25461, 25500, 25453, 25518, 25468, 25508, 25403, 25503,
  12111. 25464, 25477, 25473, 25489, 25485, 25456, 25939, 26061, 26213, 26209,
  12112. 26203, 26201, 26204, 26210, 26392, 26745, 26759, 26768, 26780,
  12113. {f: 2, c: 26733}, 26798, 26795, 26966, 26735, 26787, 26796, 26793, 26741,
  12114. 26740, 26802, 26767, 26743, 26770, 26748, 26731, 26738, 26794, 26752,
  12115. 26737, 26750, 26779, 26774, 26763, 26784, 26761, 26788, 26744, 26747,
  12116. 26769, 26764, 26762, 26749, 27446, 27443, {f: 2, c: 27447}, 27537, 27535,
  12117. {f: 2, c: 27533}, 27532, 27690, 28096, 28075, 28084, 28083, 28276, 28076,
  12118. 28137, 28130, 28087, 28150, 28116, 28160, 28104, 28128, 28127, 28118,
  12119. 28094, 28133, {f: 2, c: 28124}, 28123, 28148, 28106, 28093, 28141, 28144,
  12120. 28090, 28117, 28098, 28111, 28105, 28112, 28146, 28115, 28157, 28119,
  12121. 28109, 28131, 28091, 28922, 28941, 28919, 28951, 28916, 28940, 28912,
  12122. 28932, 28915, 28944, 28924, 28927, 28934, 28947, 28928, 28920, 28918,
  12123. 28939, 28930, 28942, 29310, {f: 2, c: 29307}, 29311, 29469, 29463, 29447,
  12124. 29457, 29464, 29450, 29448, 29439, 29455, 29470, 29576, 29686, 29688,
  12125. 29685, 29700, 29697, 29693, 29703, 29696, 29690, 29692, 29695, 29708,
  12126. 29707, 29684, 29704, 30052, 30051, 30158, 30162, 30159, {f: 2, c: 30155},
  12127. 30161, 30160, 30351, 30345, 30419, 30521, 30511, 30509, {f: 2, c: 30513},
  12128. 30516, 30515, 30525, 30501, 30523, 30517, 30792, 30802, 30793, 30797,
  12129. 30794, 30796, 30758, 30789, 30800, 31076, 31079, {f: 2, c: 31081}, 31075,
  12130. 31083, 31073, 31163, 31226, 31224, {f: 2, c: 31222}, 31375, 31380, 31376,
  12131. 31541, 31547, 31540, 31525, 31536, 31522, 31524, 31539, 31512, 31530,
  12132. 31517, 31537, 31531, 31533, 31535, 31538, 31544, 31514, 31523, 31892,
  12133. 31896, 31894, 31907, 32053, 32061, 32056, 32054, 32058, 32069, 32044,
  12134. 32041, 32065, 32071, {f: 2, c: 32062}, 32074, 32059, 32040, 32611, 32661,
  12135. {f: 2, c: 32668}, 32667, {f: 2, c: 32714}, 32717, {f: 2, c: 32720}, 32711,
  12136. 32719, 32713, 32799, 32798, 32795, 32839, 32835, 32840, 33048, 33061,
  12137. 33049, 33051, 33069, 33055, 33068, 33054, 33057, 33045, 33063, 33053,
  12138. 33058, 33297, 33336, 33331, 33338, 33332, 33330, 33396, 33680, 33699,
  12139. 33704, 33677, 33658, 33651, 33700, 33652, 33679, 33665, 33685, 33689,
  12140. 33653, 33684, 33705, 33661, 33667, 33676, 33693, 33691, 33706, 33675,
  12141. 33662, 33701, 33711, 33672, 33687, 33712, 33663, 33702, 33671, 33710,
  12142. 33654, 34393, 34390, 34495, 34487, 34498, 34497, 34501, 34490, 34480,
  12143. 34504, 34489, 34483, 34488, 34508, 34484, {f: 2, c: 34491}, 34499,
  12144. {f: 2, c: 34493}, 34898, 34953, 34965, 34984, 34978, 34986, 34970, 34961,
  12145. 34977, 34975, 34968, 34983, 34969, 34971, 34967, 34980, 34988, 34956,
  12146. 34963, 34958, 35202, 35286, 35289, 35285, 35376, 35367, 35372, 35358,
  12147. 35897, 35899, {f: 2, c: 35932}, 35965, 36005, 36221, 36219, 36217, 36284,
  12148. 36290, 36281, 36287, 36289, 36568, 36574, 36573, 36572, 36567,
  12149. {f: 2, c: 36576}, 36900, 36875, 36881, 36892, 36876, 36897, 37103, 37098,
  12150. 37104, 37108, {f: 2, c: 37106}, 37076, {f: 2, c: 37099}, 37097, 37206,
  12151. 37208, 37210, 37203, 37205, 37356, 37364, 37361, 37363, 37368, 37348,
  12152. 37369, {f: 2, c: 37354}, 37367, 37352, 37358, 38266, 38278, 38280, 38524,
  12153. 38509, 38507, 38513, 38511, 38591, 38762, 38916, 39141, 39319, 20635,
  12154. 20629, 20628, 20638, 20619, 20643, 20611, 20620, 20622, 20637, 20584,
  12155. 20636, 20626, 20610, 20615, 20831, 20948, 21266, 21265, 21412, 21415,
  12156. 21905, 21928, 21925, 21933, 21879, 22085, 21922, 21907, 21896, 21903,
  12157. 21941, 21889, 21923, 21906, 21924, 21885, 21900, 21926, 21887, 21909,
  12158. 21921, 21902, 22284, 22569, 22583, 22553, 22558, 22567, 22563, 22568,
  12159. 22517, 22600, 22565, 22556, 22555, 22579, 22591, 22582, 22574, 22585,
  12160. 22584, 22573, 22572, 22587, 22881, 23215, 23188, 23199, 23162, 23202,
  12161. 23198, 23160, 23206, 23164, 23205, 23212, 23189, 23214, 23095, 23172,
  12162. 23178, 23191, 23171, 23179, 23209, 23163, 23165, 23180, 23196, 23183,
  12163. 23187, 23197, 23530, 23501, 23499, 23508, 23505, 23498, 23502, 23564,
  12164. 23600, 23863, 23875, 23915, 23873, 23883, 23871, 23861, 23889, 23886,
  12165. 23893, 23859, 23866, 23890, 23869, 23857, 23897, 23874, 23865, 23881,
  12166. 23864, 23868, 23858, 23862, 23872, 23877, 24132, 24129, [24408, 57673],
  12167. 24486, 24485, 24491, 24777, 24761, 24780, 24802, 24782, 24772, 24852,
  12168. 24818, 24842, 24854, 24837, 24821, 24851, 24824, 24828, 24830, 24769,
  12169. 24835, 24856, 24861, 24848, 24831, 24836, 24843, 25162, 25492, 25521,
  12170. 25520, 25550, 25573, 25576, 25583, 25539, 25757, 25587, 25546, 25568,
  12171. 25590, 25557, 25586, 25589, 25697, 25567, 25534, 25565, 25564, 25540,
  12172. 25560, 25555, 25538, 25543, 25548, 25547, 25544, 25584, 25559, 25561,
  12173. 25906, 25959, 25962, 25956, 25948, 25960, 25957, 25996, {f: 2, c: 26013},
  12174. 26030, 26064, 26066, 26236, 26220, 26235, 26240, 26225, 26233, 26218,
  12175. 26226, 26369, 26892, 26835, 26884, 26844, 26922, 26860, 26858, 26865,
  12176. 26895, 26838, 26871, 26859, 26852, 26870, 26899, 26896, 26867, 26849,
  12177. 26887, 26828, 26888, 26992, 26804, 26897, 26863, 26822, 26900, 26872,
  12178. 26832, 26877, 26876, 26856, 26891, 26890, 26903, 26830, 26824,
  12179. {f: 2, c: 26845}, 26854, 26868, 26833, 26886, 26836, 26857, 26901, 26917,
  12180. 26823, 27449, 27451, 27455, 27452, 27540, 27543, 27545, 27541, 27581,
  12181. 27632, {f: 2, c: 27634}, 27696, 28156, {f: 2, c: 28230}, 28191, 28233,
  12182. 28296, {f: 2, c: 28220}, 28229, 28258, 28203, 28223, 28225, 28253, 28275,
  12183. 28188, 28211, 28235, 28224, 28241, 28219, 28163, 28206, 28254, 28264,
  12184. 28252, 28257, 28209, 28200, 28256, 28273, 28267, 28217, 28194, 28208,
  12185. 28243, 28261, 28199, 28280, 28260, 28279, 28245, 28281, 28242, 28262,
  12186. {f: 2, c: 28213}, 28250, 28960, 28958, 28975, 28923, 28974, 28977, 28963,
  12187. 28965, 28962, 28978, 28959, 28968, 28986, 28955, 29259, 29274,
  12188. {f: 2, c: 29320}, 29318, 29317, 29323, 29458, 29451, 29488, 29474, 29489,
  12189. 29491, 29479, 29490, 29485, 29478, 29475, 29493, 29452, 29742, 29740,
  12190. 29744, 29739, 29718, 29722, 29729, 29741, 29745, 29732, 29731, 29725,
  12191. 29737, 29728, 29746, 29947, 29999, 30063, 30060, 30183, 30170, 30177,
  12192. 30182, 30173, 30175, 30180, 30167, 30357, 30354, 30426, {f: 2, c: 30534},
  12193. 30532, 30541, 30533, 30538, 30542, {f: 2, c: 30539}, 30686, 30700, 30816,
  12194. {f: 2, c: 30820}, 30812, 30829, 30833, 30826, 30830, 30832, 30825, 30824,
  12195. 30814, 30818, 31092, 31091, 31090, 31088, 31234, 31242, 31235, 31244,
  12196. 31236, 31385, 31462, 31460, 31562, 31559, 31556, 31560, 31564, 31566,
  12197. 31552, 31576, 31557, 31906, 31902, 31912, 31905, 32088, 32111, 32099,
  12198. 32083, 32086, 32103, 32106, 32079, 32109, 32092, 32107, 32082, 32084,
  12199. 32105, 32081, 32095, 32078, {f: 2, c: 32574}, {f: 2, c: 32613}, 32674,
  12200. {f: 2, c: 32672}, 32727, 32849, {f: 2, c: 32847}, 33022, 32980, 33091,
  12201. 33098, 33106, 33103, 33095, 33085, 33101, 33082, 33254, 33262,
  12202. {f: 3, c: 33271}, 33284, {f: 2, c: 33340}, 33343, 33397, 33595,
  12203. [33743, 60382], 33785, 33827, 33728, 33768, 33810, 33767, 33764, 33788,
  12204. 33782, 33808, 33734, 33736, 33771, 33763, 33727, 33793, 33757, 33765,
  12205. 33752, 33791, 33761, 33739, 33742, 33750, 33781, 33737, 33801,
  12206. [33807, 58332], 33758, 33809, 33798, 33730, 33779, 33749, 33786, 33735,
  12207. 33745, 33770, 33811, 33690, 33731, 33772, 33774, 33732, 33787, 33751,
  12208. 33762, 33819, 33755, 33790, 34520, 34530, 34534, 34515, 34531, 34522,
  12209. 34538, 34525, 34539, 34524, 34540, 34537, 34519, 34536, 34513, 34888,
  12210. 34902, 34901, 35002, 35031, 35001, 35000, 35008, 35006, 34998, 35004,
  12211. 34999, 35005, 34994, 35073, 35017, 35221, 35224, 35223, 35293,
  12212. {f: 2, c: 35290}, 35406, 35405, 35385, 35417, 35392, {f: 2, c: 35415},
  12213. {f: 2, c: 35396}, 35410, 35400, 35409, 35402, 35404, 35407, 35935, 35969,
  12214. 35968, 36026, 36030, 36016, 36025, 36021, 36228, 36224, 36233, 36312,
  12215. 36307, 36301, 36295, 36310, 36316, 36303, 36309, 36313, 36296, 36311,
  12216. 36293, 36591, 36599, 36602, 36601, 36582, 36590, 36581, 36597,
  12217. {f: 2, c: 36583}, 36598, 36587, 36593, 36588, 36596, 36585, 36909, 36916,
  12218. 36911, 37126, 37164, [37124, 60367], 37119, 37116, 37128, 37113, 37115,
  12219. 37121, 37120, 37127, 37125, 37123, 37217, 37220, 37215, 37218, 37216,
  12220. 37377, 37386, 37413, 37379, 37402, 37414, 37391, 37388, 37376, 37394,
  12221. 37375, 37373, 37382, 37380, 37415, 37378, 37404, 37412, 37401, 37399,
  12222. 37381, 37398, 38267, 38285, 38284, 38288, 38535, 38526, {f: 2, c: 38536},
  12223. 38531, 38528, 38594, 38600, 38595, 38641, 38640, 38764, 38768, 38766,
  12224. 38919, 39081, 39147, 40166, [12235, 40697], {f: 2, c: 20099}, 20150, 20669,
  12225. 20671, 20678, 20654, 20676, 20682, 20660, 20680, 20674, 20656, 20673,
  12226. 20666, 20657, 20683, 20681, 20662, 20664, 20951, 21114, 21112,
  12227. {f: 2, c: 21115}, 21955, 21979, 21964, 21968, 21963, 21962, 21981,
  12228. [21952, 64013], 21972, 21956, 21993, 21951, 21970, 21901, 21967, 21973,
  12229. 21986, 21974, 21960, 22002, 21965, 21977, 21954, 22292, 22611, 22632,
  12230. 22628, 22607, 22605, 22601, 22639, 22613, 22606, 22621, 22617, 22629,
  12231. 22619, 22589, 22627, 22641, 22780, 23239, 23236, 23243, 23226, 23224,
  12232. 23217, 23221, 23216, 23231, 23240, 23227, 23238, 23223, 23232, 23242,
  12233. 23220, 23222, 23245, 23225, 23184, 23510, {f: 2, c: 23512}, 23583, 23603,
  12234. 23921, 23907, 23882, 23909, 23922, 23916, 23902, 23912, 23911, 23906,
  12235. 24048, 24143, 24142, 24138, 24141, 24139, 24261, 24268, 24262, 24267,
  12236. 24263, 24384, 24495, 24493, 24823, {f: 2, c: 24905}, 24875, 24901, 24886,
  12237. 24882, 24878, 24902, 24879, 24911, 24873, 24896, 25120, 37224, 25123,
  12238. 25125, 25124, 25541, 25585, 25579, 25616, 25618, 25609, 25632, 25636,
  12239. 25651, 25667, 25631, 25621, 25624, 25657, 25655, {f: 2, c: 25634}, 25612,
  12240. 25638, 25648, 25640, 25665, 25653, 25647, 25610, 25626, 25664, 25637,
  12241. 25639, 25611, 25575, 25627, 25646, 25633, 25614, 25967, 26002, 26067,
  12242. 26246, 26252, 26261, 26256, 26251, 26250, 26265, 26260, 26232, 26400,
  12243. 26982, 26975, 26936, 26958, 26978, 26993, 26943, 26949, 26986, 26937,
  12244. 26946, 26967, 26969, 27002, {f: 2, c: 26952}, 26933, 26988, 26931, 26941,
  12245. 26981, 26864, 27000, 26932, 26985, 26944, 26991, 26948, 26998, 26968,
  12246. 26945, 26996, 26956, 26939, 26955, 26935, 26972, 26959, 26961, 26930,
  12247. 26962, 26927, 27003, 26940, 27462, 27461, 27459, 27458, 27464, 27457,
  12248. 27547, {f: 2, c: 27643}, 27641, {f: 2, c: 27639}, 28315, 28374, 28360,
  12249. 28303, 28352, 28319, {f: 2, c: 28307}, 28320, 28337, 28345, 28358, 28370,
  12250. 28349, 28353, 28318, 28361, 28343, 28336, 28365, 28326, 28367, 28338,
  12251. 28350, 28355, 28380, 28376, 28313, 28306, 28302, 28301, 28324, 28321,
  12252. 28351, 28339, 28368, 28362, 28311, 28334, 28323, 28999, 29012, 29010,
  12253. 29027, 29024, 28993, 29021, [29026, 61080], 29042, 29048, 29034, 29025,
  12254. 28994, 29016, 28995, 29003, 29040, 29023, 29008, 29011, 28996, 29005,
  12255. 29018, 29263, 29325, 29324, 29329, 29328, 29326, 29500, 29506, 29499,
  12256. 29498, 29504, 29514, 29513, 29764, {f: 2, c: 29770}, 29778, 29777, 29783,
  12257. 29760, {f: 2, c: 29775}, 29774, 29762, 29766, 29773, 29780, 29921, 29951,
  12258. 29950, 29949, 29981, 30073, 30071, 27011, 30191, 30223, 30211, 30199,
  12259. 30206, 30204, [30201, 60782], 30200, 30224, 30203, 30198, 30189, 30197,
  12260. 30205, 30361, 30389, 30429, 30549, {f: 2, c: 30559}, 30546, 30550, 30554,
  12261. 30569, 30567, 30548, 30553, 30573, 30688, 30855, 30874, 30868, 30863,
  12262. 30852, 30869, {f: 2, c: 30853}, 30881, 30851, 30841, 30873, 30848, 30870,
  12263. 30843, 31100, 31106, 31101, 31097, 31249, {f: 2, c: 31256}, 31250, 31255,
  12264. 31253, 31266, 31251, 31259, 31248, 31395, 31394, 31390, 31467, 31590,
  12265. 31588, 31597, 31604, 31593, 31602, 31589, 31603, 31601, 31600, 31585,
  12266. 31608, 31606, 31587, 31922, 31924, 31919, 32136, 32134, 32128, 32141,
  12267. 32127, 32133, 32122, 32142, 32123, 32131, 32124, 32140, 32148, 32132,
  12268. 32125, 32146, 32621, 32619, {f: 2, c: 32615}, 32620, 32678, 32677, 32679,
  12269. {f: 2, c: 32731}, 32801, 33124, 33120, 33143, 33116, 33129, 33115, 33122,
  12270. 33138, 26401, 33118, 33142, 33127, 33135, 33092, 33121, 33309, 33353,
  12271. 33348, 33344, 33346, 33349, 34033, 33855, 33878, 33910, 33913, 33935,
  12272. 33933, 33893, 33873, 33856, 33926, 33895, 33840, 33869, 33917, 33882,
  12273. 33881, 33908, 33907, 33885, 34055, 33886, 33847, 33850, 33844, 33914,
  12274. 33859, 33912, 33842, 33861, 33833, 33753, 33867, 33839, 33858, 33837,
  12275. 33887, 33904, 33849, 33870, 33868, 33874, 33903, 33989, 33934, 33851,
  12276. 33863, 33846, 33843, 33896, 33918, 33860, 33835, 33888, 33876, 33902,
  12277. 33872, 34571, 34564, 34551, 34572, 34554, 34518, 34549, 34637, 34552,
  12278. 34574, 34569, 34561, 34550, 34573, 34565, 35030, 35019, {f: 2, c: 35021},
  12279. 35038, 35035, 35034, 35020, 35024, 35205, 35227, 35295, 35301, 35300,
  12280. 35297, 35296, 35298, 35292, 35302, 35446, 35462, 35455, 35425, 35391,
  12281. 35447, 35458, 35460, 35445, 35459, 35457, 35444, 35450, 35900, 35915,
  12282. 35914, 35941, 35940, 35942, 35974, {f: 2, c: 35972}, 36044,
  12283. {f: 2, c: 36200}, 36241, 36236, {f: 2, c: 36238}, 36237, {f: 2, c: 36243},
  12284. 36240, 36242, 36336, 36320, 36332, 36337, 36334, 36304, 36329, 36323,
  12285. 36322, 36327, 36338, 36331, 36340, 36614, 36607, 36609, 36608, 36613,
  12286. {f: 2, c: 36615}, 36610, [36619, 60507], 36946, 36927, 36932, 36937, 36925,
  12287. 37136, 37133, 37135, 37137, 37142, 37140, 37131, 37134, {f: 2, c: 37230},
  12288. 37448, 37458, 37424, 37434, 37478, 37427, 37477, 37470, 37507, 37422,
  12289. 37450, 37446, 37485, 37484, 37455, 37472, 37479, 37487, 37430, 37473,
  12290. 37488, 37425, 37460, 37475, 37456, 37490, 37454, 37459, 37452, 37462,
  12291. 37426, 38303, 38300, 38302, 38299, {f: 2, c: 38546}, 38545, 38551, 38606,
  12292. 38650, 38653, 38648, 38645, 38771, {f: 2, c: 38775}, 38770, 38927,
  12293. {f: 2, c: 38925}, 39084, 39158, 39161, 39343, 39346, 39344, 39349, 39597,
  12294. 39595, 39771, 40170, 40173, 40167, 40576, [12236, 40701], 20710, 20692,
  12295. 20695, 20712, 20723, 20699, 20714, 20701, 20708, 20691, 20716, 20720,
  12296. 20719, 20707, 20704, 20952, {f: 2, c: 21120}, 21225, 21227, 21296, 21420,
  12297. 22055, 22037, 22028, 22034, 22012, 22031, 22044, 22017, 22035, 22018,
  12298. 22010, 22045, 22020, 22015, 22009, 22665, 22652, 22672, 22680, 22662,
  12299. 22657, 22655, 22644, 22667, 22650, 22663, 22673, 22670, 22646, 22658,
  12300. 22664, 22651, 22676, 22671, 22782, 22891, 23260, 23278, 23269, 23253,
  12301. 23274, 23258, 23277, 23275, 23283, 23266, 23264, 23259, 23276, 23262,
  12302. 23261, 23257, 23272, 23263, 23415, 23520, 23523, 23651, 23938, 23936,
  12303. 23933, 23942, 23930, 23937, 23927, 23946, 23945, 23944, 23934, 23932,
  12304. 23949, 23929, 23935, {f: 2, c: 24152}, 24147, 24280, 24273, 24279, 24270,
  12305. 24284, 24277, 24281, 24274, 24276, 24388, 24387, 24431, 24502, 24876,
  12306. 24872, 24897, 24926, 24945, 24947, {f: 2, c: 24914}, 24946, 24940, 24960,
  12307. 24948, 24916, 24954, 24923, 24933, 24891, 24938, 24929, 24918, 25129,
  12308. 25127, 25131, 25643, 25677, 25691, 25693, 25716, 25718, {f: 2, c: 25714},
  12309. 25725, 25717, 25702, 25766, 25678, 25730, 25694, 25692, 25675, 25683,
  12310. 25696, 25680, 25727, 25663, 25708, 25707, 25689, 25701, 25719, 25971,
  12311. 26016, 26273, 26272, 26271, 26373, 26372, 26402, 27057, 27062, 27081,
  12312. 27040, 27086, 27030, 27056, 27052, 27068, 27025, 27033, 27022, 27047,
  12313. 27021, 27049, 27070, 27055, 27071, 27076, 27069, 27044, 27092, 27065,
  12314. 27082, 27034, 27087, 27059, 27027, 27050, 27041, 27038, 27097, 27031,
  12315. 27024, 27074, 27061, 27045, 27078, 27466, 27469, 27467, {f: 3, c: 27550},
  12316. {f: 2, c: 27587}, 27646, 28366, 28405, 28401, 28419, 28453, 28408, 28471,
  12317. 28411, 28462, 28425, 28494, {f: 2, c: 28441}, 28455, 28440, 28475, 28434,
  12318. 28397, 28426, 28470, 28531, 28409, 28398, 28461, 28480, 28464, 28476,
  12319. 28469, 28395, 28423, 28430, 28483, 28421, 28413, 28406, 28473, 28444,
  12320. 28412, 28474, 28447, 28429, 28446, 28424, 28449, 29063, 29072, 29065,
  12321. 29056, 29061, 29058, 29071, 29051, 29062, 29057, 29079, 29252, 29267,
  12322. 29335, 29333, 29331, 29507, 29517, 29521, 29516, 29794, 29811, 29809,
  12323. 29813, 29810, 29799, 29806, 29952, {f: 2, c: 29954}, 30077, 30096, 30230,
  12324. 30216, 30220, 30229, 30225, 30218, 30228, 30392, 30593, 30588, 30597,
  12325. 30594, 30574, 30592, 30575, 30590, 30595, 30898, 30890, 30900, 30893,
  12326. 30888, 30846, 30891, 30878, 30885, 30880, 30892, 30882, 30884, 31128,
  12327. {f: 2, c: 31114}, 31126, 31125, 31124, 31123, 31127, 31112, 31122, 31120,
  12328. 31275, 31306, 31280, 31279, 31272, 31270, 31400, {f: 2, c: 31403}, 31470,
  12329. 31624, 31644, 31626, 31633, 31632, 31638, 31629, 31628, 31643, 31630,
  12330. 31621, 31640, 21124, 31641, 31652, 31618, 31931, 31935, 31932, 31930,
  12331. 32167, 32183, 32194, 32163, 32170, 32193, 32192, 32197, 32157, 32206,
  12332. 32196, 32198, {f: 2, c: 32203}, 32175, 32185, 32150, 32188, 32159, 32166,
  12333. 32174, 32169, 32161, 32201, 32627, {f: 2, c: 32738}, 32741, 32734, 32804,
  12334. 32861, 32860, 33161, 33158, 33155, 33159, 33165, 33164, 33163, 33301,
  12335. 33943, 33956, 33953, 33951, 33978, 33998, 33986, 33964, 33966, 33963,
  12336. 33977, 33972, 33985, 33997, 33962, 33946, 33969, 34000, 33949, 33959,
  12337. 33979, 33954, 33940, 33991, 33996, 33947, 33961, 33967, [33960, 58327],
  12338. 34006, 33944, 33974, 33999, 33952, 34007, 34004, 34002, 34011, 33968,
  12339. 33937, 34401, 34611, 34595, 34600, 34667, 34624, 34606, 34590, 34593,
  12340. 34585, 34587, 34627, 34604, 34625, 34622, 34630, 34592, 34610, 34602,
  12341. 34605, 34620, 34578, 34618, 34609, 34613, 34626, {f: 2, c: 34598}, 34616,
  12342. 34596, 34586, 34608, 34577, 35063, 35047, {f: 2, c: 35057}, 35066, 35070,
  12343. 35054, 35068, 35062, 35067, 35056, 35052, 35051, 35229, 35233, 35231,
  12344. 35230, 35305, 35307, 35304, 35499, 35481, 35467, 35474, 35471, 35478,
  12345. 35901, {f: 2, c: 35944}, 36053, 36047, 36055, 36246, 36361, 36354, 36351,
  12346. 36365, 36349, 36362, 36355, 36359, 36358, 36357, 36350, 36352, 36356,
  12347. {f: 2, c: 36624}, 36622, 36621, 37155, 37148, 37152, 37154, 37151, 37149,
  12348. 37146, 37156, 37153, 37147, 37242, 37234, 37241, 37235, 37541, 37540,
  12349. 37494, 37531, 37498, 37536, 37524, 37546, 37517, 37542, 37530, 37547,
  12350. 37497, 37527, 37503, 37539, 37614, 37518, 37506, 37525, 37538, 37501,
  12351. 37512, 37537, 37514, 37510, 37516, 37529, 37543, 37502, 37511, 37545,
  12352. 37533, 37515, 37421, 38558, 38561, 38655, 38744, 38781, 38778, 38782,
  12353. 38787, 38784, 38786, 38779, 38788, 38785, 38783, 38862, 38861, 38934,
  12354. {f: 2, c: 39085}, 39170, 39168, 39175, 39325, 39324, 39363, 39353, 39355,
  12355. 39354, 39362, 39357, 39367, 39601, 39651, 39655, {f: 2, c: 39742},
  12356. {f: 2, c: 39776}, 39775, {f: 2, c: 40177}, 40181, 40615, 20735, 20739,
  12357. 20784, 20728, {f: 2, c: 20742}, 20726, 20734, {f: 2, c: 20747}, 20733,
  12358. 20746, {f: 2, c: 21131}, 21233, 21231, 22088, 22082, 22092, 22069, 22081,
  12359. 22090, 22089, 22086, 22104, 22106, 22080, 22067, 22077, 22060, 22078,
  12360. 22072, 22058, 22074, 22298, 22699, 22685, 22705, 22688, 22691, 22703,
  12361. 22700, 22693, 22689, 22783, 23295, 23284, 23293, 23287, 23286, 23299,
  12362. 23288, 23298, 23289, 23297, 23303, 23301, 23311, 23655, 23961, 23959,
  12363. 23967, 23954, 23970, 23955, 23957, 23968, 23964, 23969, 23962, 23966,
  12364. 24169, 24157, 24160, 24156, 32243, 24283, 24286, 24289, 24393, 24498,
  12365. 24971, 24963, 24953, 25009, 25008, 24994, 24969, 24987, 24979, 25007,
  12366. 25005, 24991, 24978, 25002, 24993, 24973, 24934, 25011, 25133, 25710,
  12367. 25712, 25750, 25760, 25733, 25751, 25756, 25743, 25739, 25738, 25740,
  12368. 25763, 25759, 25704, 25777, 25752, 25974, 25978, 25977, 25979,
  12369. {f: 2, c: 26034}, 26293, 26288, 26281, 26290, 26295, 26282, 26287, 27136,
  12370. 27142, 27159, 27109, 27128, 27157, 27121, 27108, 27168, 27135, 27116,
  12371. 27106, 27163, 27165, 27134, 27175, 27122, 27118, 27156, 27127, 27111,
  12372. 27200, 27144, 27110, 27131, 27149, 27132, 27115, 27145, 27140, 27160,
  12373. 27173, 27151, 27126, 27174, 27143, 27124, 27158, 27473, 27557, 27555,
  12374. 27554, 27558, 27649, 27648, 27647, 27650, 28481, 28454, 28542, 28551,
  12375. 28614, 28562, 28557, 28553, 28556, 28514, 28495, 28549, 28506, 28566,
  12376. 28534, 28524, 28546, 28501, 28530, 28498, 28496, 28503, 28564, 28563,
  12377. 28509, 28416, 28513, 28523, 28541, 28519, 28560, 28499, 28555, 28521,
  12378. 28543, 28565, 28515, 28535, 28522, 28539, 29106, 29103, 29083, 29104,
  12379. 29088, 29082, 29097, 29109, 29085, 29093, 29086, 29092, 29089, 29098,
  12380. 29084, 29095, 29107, 29336, 29338, 29528, 29522, {f: 3, c: 29534}, 29533,
  12381. 29531, 29537, 29530, 29529, 29538, 29831, {f: 2, c: 29833}, 29830, 29825,
  12382. 29821, 29829, 29832, 29820, [29817, 58868], 29960, 29959, 30078, 30245,
  12383. 30238, 30233, 30237, 30236, 30243, 30234, 30248, 30235, {f: 3, c: 30364},
  12384. 30363, 30605, 30607, 30601, 30600, 30925, 30907, 30927, 30924, 30929,
  12385. 30926, 30932, 30920, {f: 2, c: 30915}, 30921, 31130, 31137, 31136, 31132,
  12386. 31138, [31131, 59175], 27510, 31289, 31410, 31412, 31411, 31671, 31691,
  12387. 31678, 31660, 31694, 31663, 31673, 31690, 31669, 31941, 31944, 31948,
  12388. 31947, 32247, 32219, 32234, 32231, 32215, 32225, 32259, 32250, 32230,
  12389. 32246, 32241, 32240, 32238, 32223, 32630, 32684, 32688, 32685, 32749,
  12390. 32747, 32746, 32748, 32742, 32744, 32868, 32871, 33187, 33183, 33182,
  12391. 33173, 33186, 33177, 33175, 33302, 33359, 33363, 33362, 33360, 33358,
  12392. 33361, 34084, 34107, 34063, 34048, 34089, 34062, 34057, 34061, 34079,
  12393. 34058, 34087, 34076, 34043, 34091, 34042, 34056, 34060, 34036, 34090,
  12394. 34034, 34069, 34039, 34027, 34035, 34044, 34066, 34026, 34025, 34070,
  12395. 34046, 34088, 34077, 34094, 34050, 34045, 34078, 34038, 34097, 34086,
  12396. {f: 2, c: 34023}, 34032, 34031, 34041, 34072, 34080, 34096, 34059, 34073,
  12397. 34095, 34402, 34646, {f: 2, c: 34659}, 34679, 34785, 34675, 34648, 34644,
  12398. 34651, 34642, 34657, 34650, 34641, 34654, 34669, 34666, 34640, 34638,
  12399. 34655, 34653, 34671, 34668, 34682, 34670, 34652, 34661, 34639, 34683,
  12400. 34677, 34658, 34663, 34665, 34906, 35077, 35084, 35092, 35083,
  12401. {f: 3, c: 35095}, 35078, 35094, 35089, 35086, 35081, 35234, 35236, 35235,
  12402. 35309, 35312, 35308, 35535, 35526, 35512, 35539, 35537, {f: 2, c: 35540},
  12403. 35515, 35543, 35518, 35520, 35525, 35544, 35523, 35514, 35517, 35545,
  12404. 35902, 35917, 35983, 36069, 36063, 36057, 36072, 36058, 36061, 36071,
  12405. 36256, 36252, 36257, 36251, 36384, 36387, 36389, 36388, 36398, 36373,
  12406. 36379, 36374, 36369, 36377, {f: 2, c: 36390}, 36372, 36370, 36376, 36371,
  12407. 36380, 36375, 36378, 36652, 36644, 36632, 36634, 36640, 36643,
  12408. {f: 2, c: 36630}, 36979, 36976, 36975, 36967, 36971, 37167, 37163,
  12409. {f: 2, c: 37161}, 37170, 37158, 37166, {f: 2, c: 37253}, 37258,
  12410. {f: 2, c: 37249}, 37252, 37248, 37584, {f: 2, c: 37571}, 37568, 37593,
  12411. 37558, 37583, 37617, 37599, 37592, 37609, 37591, 37597, 37580, 37615,
  12412. 37570, 37608, 37578, 37576, 37582, 37606, 37581, 37589, 37577, 37600,
  12413. 37598, 37607, 37585, 37587, 37557, 37601, 37669, 37574, 37556, 38268,
  12414. 38316, 38315, 38318, 38320, 38564, 38562, 38611, 38661, 38664, 38658,
  12415. 38746, 38794, 38798, 38792, 38864, 38863, 38942, 38941, 38950, 38953,
  12416. 38952, 38944, 38939, 38951, 39090, 39176, 39162, 39185, 39188,
  12417. {f: 2, c: 39190}, 39189, 39388, 39373, 39375, {f: 2, c: 39379}, 39374,
  12418. 39369, [39382, 60270], 39384, 39371, 39383, 39372, 39603, 39660, 39659,
  12419. 39667, 39666, 39665, 39750, 39747, 39783, 39796, 39793, 39782, 39798,
  12420. 39797, 39792, 39784, 39780, 39788, 40188, 40186, 40189, 40191, 40183,
  12421. 40199, 40192, 40185, 40187, 40200, 40197, 40196, 40579, 40659,
  12422. {f: 2, c: 40719}, 20764, 20755, 20759, 20762, 20753, 20958, 21300, 21473,
  12423. 22128, 22112, 22126, 22131, 22118, 22115, 22125, 22130, 22110, 22135,
  12424. 22300, 22299, 22728, 22717, 22729, 22719, 22714, 22722, 22716, 22726,
  12425. 23319, 23321, 23323, 23329, 23316, 23315, 23312, 23318, [23336, 59539],
  12426. 23322, 23328, 23326, 23535, 23980, 23985, 23977, 23975, 23989, 23984,
  12427. 23982, 23978, 23976, 23986, 23981, 23983, 23988, {f: 2, c: 24167}, 24166,
  12428. 24175, 24297, 24295, 24294, 24296, 24293, 24395, 24508, 24507, 24989,
  12429. 25000, 24982, 25029, 25012, 25030, 25025, 25036, 25018, 25023, 25016,
  12430. 24972, 25815, 25814, 25808, 25807, 25801, 25789, 25737, 25795, 25819,
  12431. 25843, 25817, 25907, 25983, 25980, 26018, 26312, 26302, 26304,
  12432. {f: 2, c: 26314}, 26319, 26301, 26299, 26298, 26316, 26403, 27188, 27238,
  12433. 27209, 27239, 27186, 27240, 27198, 27229, 27245, 27254, 27227, 27217,
  12434. 27176, 27226, 27195, 27199, 27201, 27242, 27236, 27216, 27215, 27220,
  12435. 27247, 27241, 27232, 27196, 27230, 27222, 27221, {f: 2, c: 27213}, 27206,
  12436. 27477, 27476, 27478, 27559, {f: 2, c: 27562}, 27592, 27591, 27652, 27651,
  12437. 27654, 28589, 28619, 28579, 28615, 28604, 28622, 28616, 28510, 28612,
  12438. 28605, 28574, 28618, 28584, 28676, 28581, 28590, 28602, 28588, 28586,
  12439. 28623, 28607, 28600, 28578, 28617, 28587, 28621, 28591, 28594, 28592,
  12440. 29125, 29122, 29119, 29112, 29142, {f: 2, c: 29120}, 29131, 29140, 29130,
  12441. 29127, 29135, 29117, 29144, 29116, 29126, {f: 2, c: 29146},
  12442. {f: 2, c: 29341}, 29545, {f: 2, c: 29542}, 29548, 29541, 29547, 29546,
  12443. 29823, 29850, 29856, 29844, 29842, 29845, 29857, 29963, 30080, 30255,
  12444. 30253, 30257, 30269, 30259, 30268, 30261, 30258, 30256, 30395, 30438,
  12445. 30618, 30621, 30625, 30620, 30619, {f: 2, c: 30626}, 30613, 30617, 30615,
  12446. 30941, 30953, 30949, 30954, 30942, 30947, 30939, {f: 2, c: 30945}, 30957,
  12447. {f: 2, c: 30943}, 31140, 31300, 31304, 31303, 31414, 31416, 31413, 31409,
  12448. 31415, 31710, 31715, 31719, 31709, 31701, 31717, 31706, 31720, 31737,
  12449. 31700, 31722, 31714, 31708, 31723, 31704, 31711, 31954, 31956, 31959,
  12450. {f: 2, c: 31952}, 32274, 32289, 32279, 32268, {f: 2, c: 32287}, 32275,
  12451. 32270, 32284, 32277, 32282, 32290, 32267, 32271, 32278, 32269, 32276,
  12452. 32293, 32292, 32579, {f: 2, c: 32635}, 32634, 32689, 32751, 32810, 32809,
  12453. 32876, 33201, 33190, 33198, 33209, 33205, 33195, 33200, 33196, 33204,
  12454. 33202, 33207, 33191, 33266, {f: 3, c: 33365}, 34134, 34117, 34155, 34125,
  12455. 34131, 34145, 34136, 34112, 34118, 34148, 34113, 34146, 34116, 34129,
  12456. 34119, 34147, 34110, 34139, 34161, 34126, 34158, 34165, 34133, 34151,
  12457. 34144, 34188, 34150, 34141, 34132, 34149, 34156, 34403, 34405, 34404,
  12458. 34724, 34715, 34703, 34711, 34707, 34706, 34696, 34689, 34710, 34712,
  12459. 34681, 34695, 34723, 34693, {f: 2, c: 34704}, 34717, 34692, 34708, 34716,
  12460. 34714, 34697, 35102, 35110, 35120, {f: 2, c: 35117}, 35111, 35121, 35106,
  12461. 35113, 35107, 35119, 35116, 35103, 35313, 35552, 35554, 35570,
  12462. {f: 2, c: 35572}, 35549, 35604, 35556, 35551, 35568, 35528, 35550, 35553,
  12463. 35560, 35583, 35567, 35579, {f: 2, c: 35985}, 35984, 36085, 36078, 36081,
  12464. 36080, 36083, 36204, 36206, 36261, 36263, 36403, 36414, 36408, 36416,
  12465. 36421, 36406, {f: 2, c: 36412}, 36417, 36400, 36415, 36541, [36662, 60329],
  12466. 36654, 36661, 36658, 36665, 36663, 36660, 36982, 36985, 36987, 36998,
  12467. 37114, 37171, {f: 2, c: 37173}, 37267, {f: 2, c: 37264}, 37261, 37263,
  12468. 37671, 37662, 37640, 37663, 37638, 37647, 37754, 37688, 37692, 37659,
  12469. 37667, 37650, 37633, 37702, 37677, 37646, 37645, 37579, 37661, 37626,
  12470. 37651, 37625, 37623, 37684, 37634, 37668, 37631, 37673, 37689, 37685,
  12471. 37674, 37652, 37644, 37643, 37630, 37641, 37632, 37627, 37654, 38332,
  12472. 38349, 38334, {f: 2, c: 38329}, 38326, 38335, 38325, 38333, 38569, 38612,
  12473. 38667, 38674, 38672, 38809, 38807, 38804, 38896, 38904, 38965, 38959,
  12474. 38962, 39204, 39199, 39207, 39209, 39326, 39406, 39404, 39397, 39396,
  12475. 39408, 39395, 39402, 39401, 39399, 39609, 39615, 39604, 39611, 39670,
  12476. 39674, 39673, 39671, 39731, 39808, 39813, 39815, 39804, 39806, 39803,
  12477. 39810, 39827, 39826, 39824, 39802, 39829, 39805, 39816, 40229, 40215,
  12478. 40224, 40222, 40212, 40233, 40221, 40216, 40226, 40208, 40217, 40223,
  12479. 40584, {f: 2, c: 40582}, 40622, 40621, {f: 2, c: 40661}, 40698, 40722,
  12480. 40765, 20774, 20773, 20770, 20772, 20768, 20777, 21236, 22163,
  12481. {f: 2, c: 22156}, 22150, 22148, 22147, 22142, 22146, 22143, 22145, 22742,
  12482. 22740, 22735, 22738, 23341, 23333, 23346, 23331, 23340, 23335, 23334,
  12483. 23343, 23342, 23419, {f: 2, c: 23537}, 23991, 24172, 24170, 24510, 25027,
  12484. 25013, 25020, 25063, 25056, 25061, 25060, 25064, 25054, 25839, 25833,
  12485. 25827, 25835, 25828, 25832, 25985, 25984, 26038, 26074, 26322, 27277,
  12486. 27286, 27265, 27301, 27273, 27295, 27291, 27297, 27294, 27271, 27283,
  12487. 27278, 27285, 27267, 27304, 27300, 27281, 27263, 27302, 27290, 27269,
  12488. 27276, 27282, 27483, 27565, 27657, 28620, 28585, 28660, 28628, 28643,
  12489. 28636, 28653, 28647, 28646, 28638, 28658, 28637, 28642, 28648, 29153,
  12490. 29169, 29160, 29170, 29156, 29168, 29154, 29555, {f: 2, c: 29550}, 29847,
  12491. 29874, 29867, 29840, 29866, 29869, 29873, 29861, 29871, {f: 3, c: 29968},
  12492. 29967, 30084, 30275, {f: 2, c: 30280}, 30279, 30372, 30441, 30645, 30635,
  12493. 30642, 30647, 30646, 30644, 30641, 30632, 30704, 30963, 30973, 30978,
  12494. {f: 2, c: 30971}, 30975, 30962, 30981, 30969, 30974, 30980, 31147, 31144,
  12495. 31324, 31323, 31318, 31320, 31316, 31322, 31422, {f: 2, c: 31424}, 31749,
  12496. 31759, 31730, 31744, 31743, 31739, 31758, 31732, 31755, 31731, 31746,
  12497. 31753, 31747, 31745, 31736, 31741, [31750, 58176], {f: 2, c: 31728}, 31760,
  12498. 31754, 31976, 32301, 32316, 32322, 32307, 38984, 32312, 32298, 32329,
  12499. 32320, 32327, 32297, 32332, 32304, 32315, 32310, 32324, 32314, 32581,
  12500. 32639, 32638, 32637, 32756, 32754, 32812, 33211, 33220, 33228, 33226,
  12501. 33221, 33223, 33212, 33257, 33371, 33370, 33372, 34179, 34176, 34191,
  12502. 34215, 34197, 34208, 34187, 34211, 34171, 34212, 34202, 34206, 34167,
  12503. 34172, 34185, 34209, 34170, 34168, 34135, 34190, 34198, 34182, 34189,
  12504. 34201, 34205, 34177, 34210, 34178, 34184, 34181, 34169, 34166, 34200,
  12505. 34192, 34207, 34408, 34750, 34730, 34733, 34757, 34736, 34732, 34745,
  12506. 34741, 34748, 34734, 34761, 34755, 34754, 34764, 34743, 34735, 34756,
  12507. 34762, 34740, 34742, 34751, 34744, 34749, 34782, 34738, 35125, 35123,
  12508. 35132, 35134, 35137, 35154, 35127, 35138, 35245, 35247, 35246,
  12509. {f: 2, c: 35314}, 35614, 35608, 35606, 35601, 35589, 35595, 35618, 35599,
  12510. 35602, 35605, 35591, 35597, 35592, 35590, 35612, 35603, 35610, 35919,
  12511. 35952, 35954, 35953, 35951, 35989, 35988, 36089, 36207, 36430, 36429,
  12512. 36435, 36432, 36428, 36423, 36675, 36672, 36997, 36990, 37176, 37274,
  12513. 37282, 37275, 37273, 37279, 37281, 37277, 37280, 37793, 37763, 37807,
  12514. 37732, 37718, 37703, 37756, 37720, 37724, 37750, 37705, {f: 2, c: 37712},
  12515. 37728, 37741, 37775, 37708, 37738, 37753, 37719, 37717, 37714, 37711,
  12516. 37745, 37751, 37755, 37729, 37726, 37731, 37735, 37710, 37721, 38343,
  12517. 38336, 38345, 38339, 38341, 38327, 38574, 38576, 38572, 38688, 38687,
  12518. 38680, 38685, 38681, 38810, 38817, 38812, 38814, 38813, 38869, 38868,
  12519. 38897, 38977, 38980, 38986, 38985, 38981, 38979, 39205, {f: 2, c: 39211},
  12520. 39210, 39219, 39218, 39215, 39213, 39217, 39216, 39320, 39331, 39329,
  12521. 39426, 39418, 39412, 39415, 39417, 39416, 39414, 39419, {f: 2, c: 39421},
  12522. 39420, 39427, 39614, 39678, 39677, 39681, 39676, 39752, 39834, 39848,
  12523. 39838, 39835, 39846, 39841, 39845, 39844, 39814, 39842, 39840, 39855,
  12524. 40243, 40257, 40295, 40246, {f: 2, c: 40238}, 40241, 40248, 40240, 40261,
  12525. {f: 2, c: 40258}, 40254, 40247, 40256, 40253, 32757, 40237, 40586, 40585,
  12526. 40589, 40624, 40648, 40666, 40699, 40703, 40740, 40739, 40738, 40788,
  12527. [12245, 40864], 20785, {f: 2, c: 20781}, 22168, 22172, 22167, 22170, 22173,
  12528. 22169, 22896, 23356, {f: 2, c: 23657}, 24000, {f: 2, c: 24173}, 25048,
  12529. 25055, {f: 2, c: 25069}, 25073, 25066, 25072, 25067, 25046, 25065, 25855,
  12530. 25860, 25853, 25848, 25857, 25859, 25852, 26004, 26075, {f: 2, c: 26330},
  12531. 26328, 27333, 27321, 27325, 27361, 27334, 27322, {f: 2, c: 27318}, 27335,
  12532. 27316, 27309, 27486, 27593, 27659, 28679, {f: 2, c: 28684}, 28673, 28677,
  12533. 28692, 28686, {f: 2, c: 28671}, 28667, 28710, 28668, 28663, 28682,
  12534. [29185, 60224], 29183, 29177, 29187, 29181, 29558, 29880, 29888, 29877,
  12535. 29889, 29886, 29878, 29883, 29890, 29972, 29971, 30300, 30308, 30297,
  12536. 30288, 30291, 30295, 30298, 30374, 30397, 30444, 30658, 30650, 30988,
  12537. {f: 2, c: 30995}, 30985, 30992, 30994, 30993, 31149, 31148, 31327, 31772,
  12538. 31785, 31769, 31776, 31775, 31789, 31773, 31782, 31784, 31778, 31781,
  12539. 31792, 32348, 32336, 32342, 32355, 32344, 32354, 32351, 32337, 32352,
  12540. 32343, 32339, 32693, 32691, {f: 2, c: 32759}, 32885, {f: 2, c: 33233},
  12541. 33232, 33375, 33374, 34228, 34246, 34240, 34243, 34242, 34227, 34229,
  12542. 34237, 34247, 34244, 34239, 34251, 34254, 34248, 34245, 34225, 34230,
  12543. 34258, 34340, 34232, 34231, 34238, 34409, 34791, 34790, 34786, 34779,
  12544. 34795, 34794, 34789, 34783, 34803, 34788, 34772, 34780, 34771, 34797,
  12545. 34776, 34787, 34775, 34777, 34817, 34804, 34792, 34781, 35155, 35147,
  12546. 35151, 35148, 35142, {f: 2, c: 35152}, 35145, 35626, 35623, 35619, 35635,
  12547. 35632, 35637, 35655, 35631, 35644, 35646, 35633, 35621, 35639, 35622,
  12548. 35638, 35630, 35620, 35643, 35645, 35642, 35906, 35957, 35993, 35992,
  12549. 35991, 36094, 36100, 36098, 36096, 36444, 36450, 36448, 36439, 36438,
  12550. 36446, 36453, 36455, 36443, 36442, 36449, 36445, 36457, 36436,
  12551. {f: 3, c: 36678}, 36683, 37160, {f: 2, c: 37178}, 37182, 37288, 37285,
  12552. 37287, 37295, 37290, 37813, 37772, 37778, 37815, 37787, 37789, 37769,
  12553. 37799, 37774, 37802, 37790, 37798, 37781, 37768, 37785, 37791, 37760,
  12554. 37773, 37809, 37777, 37810, 37796, 37800, 37812, 37795, {f: 2, c: 38354},
  12555. 38353, 38579, 38615, 38618, 24002, 38623, 38616, 38621, 38691, 38690,
  12556. 38693, 38828, 38830, 38824, 38827, 38820, 38826, 38818, 38821, 38871,
  12557. 38873, 38870, 38872, 38906, {f: 3, c: 38992}, 39096, 39233, 39228, 39226,
  12558. 39439, 39435, 39433, 39437, 39428, 39441, 39434, 39429, 39431, 39430,
  12559. 39616, 39644, 39688, {f: 2, c: 39684}, 39721, 39733, 39754, 39756, 39755,
  12560. 39879, 39878, 39875, 39871, 39873, 39861, 39864, 39891, 39862, 39876,
  12561. 39865, 39869, 40284, 40275, 40271, 40266, 40283, 40267, 40281, 40278,
  12562. 40268, 40279, 40274, 40276, 40287, 40280, 40282, 40590, 40588, 40671,
  12563. 40705, 40704, [40726, 58693], 40741, 40747, 40746, 40745, 40744, 40780,
  12564. 40789, {f: 2, c: 20788}, 21142, 21239, 21428, 22187, 22189,
  12565. {f: 2, c: 22182}, 22186, 22188, 22746, 22749, 22747, 22802,
  12566. {f: 3, c: 23357}, 24003, 24176, 24511, 25083, 25863, 25872, 25869, 25865,
  12567. 25868, 25870, 25988, 26078, 26077, 26334, 27367, 27360, 27340, 27345,
  12568. 27353, 27339, 27359, 27356, 27344, 27371, 27343, 27341, 27358, 27488,
  12569. 27568, 27660, 28697, 28711, 28704, 28694, 28715, {f: 3, c: 28705}, 28713,
  12570. 28695, 28708, 28700, 29196, 29194, 29191, 29186, 29189, {f: 2, c: 29349},
  12571. 29348, 29347, 29345, 29899, 29893, 29879, 29891, 29974, 30304,
  12572. {f: 2, c: 30665}, 30660, 30705, 31005, 31003, 31009, 31004, 30999, 31006,
  12573. 31152, {f: 2, c: 31335}, 31795, 31804, 31801, 31788, 31803, 31980, 31978,
  12574. 32374, 32373, 32376, 32368, 32375, 32367, 32378, 32370, 32372, 32360,
  12575. 32587, 32586, 32643, 32646, 32695, {f: 2, c: 32765}, 32888, 33239, 33237,
  12576. 33291, 33380, 33377, 33379, 34283, 34289, 34285, 34265, 34273, 34280,
  12577. 34266, 34263, 34284, 34290, 34296, 34264, 34271, 34275, 34268, 34257,
  12578. 34288, 34278, 34287, 34270, 34274, 34816, 34810, 34819, {f: 2, c: 34806},
  12579. 34825, 34828, 34827, 34822, 34812, 34824, 34815, 34826, 34818, 35170,
  12580. {f: 2, c: 35162}, 35159, 35169, 35164, 35160, 35165, 35161, 35208, 35255,
  12581. 35254, 35318, 35664, 35656, 35658, 35648, 35667, 35670, 35668, 35659,
  12582. 35669, 35665, 35650, 35666, 35671, 35907, 35959, 35958, 35994,
  12583. {f: 2, c: 36102}, 36105, 36268, 36266, 36269, 36267, 36461, 36472, 36467,
  12584. 36458, 36463, 36475, 36546, 36690, 36689, {f: 2, c: 36687}, 36691, 36788,
  12585. 37184, 37183, 37296, 37293, 37854, 37831, 37839, 37826, 37850, 37840,
  12586. 37881, 37868, 37836, 37849, 37801, 37862, 37834, 37844, 37870, 37859,
  12587. 37845, 37828, 37838, 37824, 37842, 37797, 37863, 38269, {f: 2, c: 38362},
  12588. 38625, 38697, {f: 2, c: 38699}, 38696, 38694, 38835, 38839, 38838,
  12589. {f: 3, c: 38877}, 39004, 39001, 39005, 38999, 39103, 39101, 39099, 39102,
  12590. 39240, 39239, 39235, {f: 2, c: 39334}, 39450, 39445, 39461, 39453, 39460,
  12591. 39451, 39458, 39456, 39463, 39459, 39454, 39452, 39444, 39618, 39691,
  12592. 39690, 39694, 39692, 39735, {f: 2, c: 39914}, 39904, 39902, 39908, 39910,
  12593. 39906, 39920, 39892, 39895, 39916, 39900, 39897, 39909, 39893, 39905,
  12594. 39898, 40311, 40321, 40330, 40324, 40328, 40305, 40320, 40312, 40326,
  12595. {f: 2, c: 40331}, 40317, 40299, {f: 2, c: 40308}, 40304, 40297, 40325,
  12596. 40307, 40315, 40322, 40303, 40313, 40319, 40327, 40296, 40596, 40593,
  12597. 40640, 40700, 40749, {f: 2, c: 40768}, 40781, {f: 3, c: 40790}, 21303,
  12598. 22194, 22197, 22195, 22755, 23365, {f: 2, c: 24006}, {f: 2, c: 24302},
  12599. {f: 2, c: 24512}, 25081, 25879, 25878, 25877, 25875, 26079, 26344,
  12600. {f: 2, c: 26339}, 27379, 27376, 27370, 27368, 27385, 27377,
  12601. {f: 2, c: 27374}, 28732, 28725, 28719, 28727, 28724, 28721, 28738, 28728,
  12602. 28735, 28730, 28729, 28714, 28736, 28731, 28723, 28737, {f: 2, c: 29203},
  12603. 29352, 29565, 29564, 29882, 30379, 30378, 30398, 30445, 30668,
  12604. {f: 2, c: 30670}, 30669, 30706, 31013, 31011, {f: 2, c: 31015}, 31012,
  12605. 31017, 31154, 31342, {f: 2, c: 31340}, 31479, 31817, 31816, 31818, 31815,
  12606. 31813, 31982, 32379, 32382, 32385, 32384, 32698, 32767, 32889, 33243,
  12607. 33241, {f: 2, c: 33384}, 34338, 34303, 34305, 34302, 34331, 34304, 34294,
  12608. 34308, 34313, 34309, 34316, 34301, 34841, {f: 2, c: 34832}, 34839, 34835,
  12609. 34838, 35171, 35174, 35257, 35319, 35680, 35690, 35677, 35688, 35683,
  12610. 35685, 35687, 35693, 36270, 36486, 36488, 36484, 36697, {f: 2, c: 36694},
  12611. 36693, 36696, 36698, 37005, 37187, 37185, 37303, 37301, {f: 2, c: 37298},
  12612. 37899, 37907, 37883, 37920, 37903, 37908, 37886, 37909, 37904, 37928,
  12613. 37913, 37901, 37877, 37888, 37879, 37895, 37902, 37910, 37906, 37882,
  12614. 37897, 37880, 37948, 37898, 37887, 37884, 37900, 37878, 37905, 37894,
  12615. 38366, 38368, 38367, {f: 2, c: 38702}, 38841, 38843, {f: 2, c: 38909},
  12616. 39008, {f: 2, c: 39010}, 39007, {f: 2, c: 39105}, 39248, 39246, 39257,
  12617. 39244, 39243, 39251, 39474, 39476, 39473, 39468, 39466, 39478, 39465,
  12618. 39470, 39480, 39469, 39623, 39626, 39622, 39696, 39698, 39697, 39947,
  12619. 39944, 39927, 39941, 39954, 39928, 40000, 39943, 39950, 39942, 39959,
  12620. 39956, 39945, 40351, 40345, 40356, 40349, 40338, 40344, 40336, 40347,
  12621. 40352, 40340, 40348, 40362, 40343, 40353, 40346, 40354, 40360, 40350,
  12622. 40355, 40383, 40361, 40342, {f: 2, c: 40358}, 40601, 40603, 40602, 40677,
  12623. 40676, 40679, 40678, 40752, 40750, 40795, 40800, 40798, 40797, 40793,
  12624. 40849, 20794, 20793, 21144, 21143, 22211, {f: 2, c: 22205}, 23368, 23367,
  12625. 24011, 24015, 24305, 25085, 25883, 27394, 27388, 27395, 27384, 27392,
  12626. {f: 2, c: 28739}, 28746, {f: 2, c: 28744}, {f: 2, c: 28741}, 29213, 29210,
  12627. 29209, 29566, 29975, 30314, 30672, 31021, 31025, 31023, 31828, 31827,
  12628. 31986, 32394, [32391, 60229], 32392, 32395, 32390, 32397, 32589, 32699,
  12629. 32816, 33245, 34328, 34346, 34342, 34335, 34339, 34332, 34329, 34343,
  12630. 34350, 34337, 34336, 34345, 34334, 34341, 34857, 34845, 34843, 34848,
  12631. 34852, 34844, 34859, 34890, 35181, 35177, 35182, 35179, 35322, 35705,
  12632. 35704, 35653, {f: 2, c: 35706}, 36112, 36116, 36271, 36494, 36492, 36702,
  12633. 36699, 36701, 37190, {f: 2, c: 37188}, 37305, 37951, 37947, 37942, 37929,
  12634. 37949, 37936, 37945, 37930, 37943, 37932, 37952, 37937, 38373, 38372,
  12635. 38371, 38709, 38714, 38847, 38881, 39012, 39113, 39110, 39104, 39256,
  12636. 39254, 39481, 39485, 39494, 39492, 39490, 39489, 39482, 39487, 39629,
  12637. 39701, {f: 2, c: 39703}, 39702, 39738, 39762, 39979, 39965, 39964, 39980,
  12638. 39971, {f: 2, c: 39976}, 39972, 39969, 40375, 40374, 40380, 40385, 40391,
  12639. 40394, 40399, 40382, 40389, 40387, 40379, 40373, 40398, {f: 2, c: 40377},
  12640. 40364, 40392, 40369, 40365, 40396, 40371, 40397, 40370, 40570, 40604,
  12641. 40683, 40686, 40685, 40731, 40728, 40730, 40753, 40782, 40805, 40804,
  12642. 40850, 20153, 22214, 22213, 22219, 22897, {f: 2, c: 23371}, 24021, 24017,
  12643. 24306, 25889, 25888, 25894, 25890, 27403, {f: 2, c: 27400}, 27661,
  12644. {f: 3, c: 28757}, 28754, {f: 2, c: 29214}, 29353, 29567, 29912, 29909,
  12645. 29913, 29911, 30317, 30381, 31029, 31156, {f: 2, c: 31344}, 31831, 31836,
  12646. 31833, 31835, 31834, 31988, 31985, 32401, 32591, 32647, 33246, 33387,
  12647. {f: 2, c: 34356}, 34355, 34348, 34354, 34358, 34860, 34856, 34854, 34858,
  12648. 34853, 35185, 35263, 35262, 35323, 35710, 35716, 35714, 35718, 35717,
  12649. 35711, 36117, 36501, 36500, 36506, 36498, 36496, {f: 2, c: 36502}, 36704,
  12650. 36706, 37191, 37964, 37968, {f: 2, c: 37962}, 37967, 37959, 37957,
  12651. {f: 2, c: 37960}, 37958, 38719, 38883, 39018, 39017, 39115, 39252, 39259,
  12652. 39502, {f: 2, c: 39507}, 39500, 39503, 39496, 39498, 39497, 39506, 39504,
  12653. 39632, 39705, 39723, 39739, 39766, 39765, 40006, 40008, 39999, 40004,
  12654. 39993, 39987, 40001, 39996, 39991, 39988, 39986, 39997, 39990, 40411,
  12655. 40402, 40414, 40410, 40395, 40400, 40412, 40401, 40415, 40425, 40409,
  12656. 40408, 40406, 40437, 40405, 40413, 40630, 40688, 40757, 40755, 40754,
  12657. 40770, 40811, 40853, 40866, 20797, 21145, 22760, 22759, 22898, 23373,
  12658. 24024, 34863, 24399, 25089, {f: 2, c: 25091}, 25897, 25893, 26006, 26347,
  12659. {f: 2, c: 27409}, 27407, 27594, 28763, 28762, 29218, 29570, 29569, 29571,
  12660. 30320, 30676, 31847, 31846, 32405, 33388, 34362, 34368, 34361, 34364,
  12661. 34353, 34363, 34366, 34864, 34866, 34862, 34867, 35190, 35188, 35187,
  12662. 35326, 35724, 35726, 35723, 35720, 35909, 36121, 36504, 36708, 36707,
  12663. 37308, 37986, 37973, 37981, 37975, 37982, {f: 2, c: 38852}, 38912, 39510,
  12664. 39513, {f: 3, c: 39710}, 40018, 40024, 40016, 40010, 40013, 40011, 40021,
  12665. 40025, 40012, 40014, 40443, 40439, 40431, 40419, 40427, 40440, 40420,
  12666. 40438, 40417, 40430, 40422, 40434, [40432, 60370], 40418, 40428, 40436,
  12667. 40435, 40424, 40429, 40642, 40656, {f: 2, c: 40690}, 40710, 40732, 40760,
  12668. 40759, 40758, 40771, 40783, 40817, 40816, {f: 2, c: 40814}, 22227, 22221,
  12669. 23374, 23661, 25901, {f: 2, c: 26349}, 27411, 28767, 28769, 28765, 28768,
  12670. 29219, 29915, 29925, 30677, 31032, 31159, 31158, 31850, 32407, 32649,
  12671. 33389, 34371, 34872, 34871, 34869, 34891, {f: 2, c: 35732},
  12672. {f: 3, c: 36510}, 36509, 37310, 37309, 37314, 37995, {f: 2, c: 37992},
  12673. 38629, 38726, 38723, 38727, 38855, 38885, 39518, 39637, 39769, 40035,
  12674. 40039, 40038, 40034, 40030, 40032, 40450, 40446, 40455, 40451, 40454,
  12675. 40453, {f: 2, c: 40448}, 40457, 40447, 40445, 40452, 40608, 40734, 40774,
  12676. {f: 3, c: 40820}, 22228, 25902, 26040, {f: 2, c: 27416}, 27415, 27418,
  12677. 28770, 29222, 29354, {f: 2, c: 30680}, 31033, 31849, 31851, 31990, 32410,
  12678. 32408, 32411, 32409, {f: 2, c: 33248}, {f: 3, c: 34374}, {f: 2, c: 35193},
  12679. 35196, 35195, 35327, {f: 2, c: 35736}, 36517, 36516, 36515, 37998, 37997,
  12680. 37999, 38001, 38003, 38729, 39026, 39263, 40040, 40046, 40045, 40459,
  12681. 40461, 40464, 40463, 40466, 40465, 40609, 40693, 40713, 40775, 40824,
  12682. 40827, 40826, 40825, 22302, 28774, 31855, 34876, 36274, 36518, 37315,
  12683. 38004, 38008, 38006, 38005, 39520, [39726, 60830], 40052, 40051, 40049,
  12684. 40053, 40468, 40467, 40694, 40714, 40868, 28776, 28773, 31991, 34410,
  12685. 34878, 34877, 34879, 35742, 35996, 36521, 36553, 38731, {f: 2, c: 39027},
  12686. 39116, 39265, 39339, 39524, {f: 2, c: 39526}, 39716, 40469, 40471, 40776,
  12687. 25095, 27422, 29223, 34380, 36520, 38018, {f: 2, c: 38016}, 39529, 39528,
  12688. 40473, 34379, 35743, 38019, 40057, 40631, 30325, 39531, 40058, 40477,
  12689. {f: 2, c: 28777}, 29225, 40612, 40830, 40777, 40856, {s: 97}, 65075, 0,
  12690. 65076, 65103, [168, 776, 63208], [710, 63209, 65342], [12541, 63210],
  12691. [12542, 63211], [12445, 63212], [12446, 63213], 0, [12293, 63216],
  12692. [12294, 63217], [12295, 63218], [12540, 63219], [63220, 65339],
  12693. [63221, 65341], [10045, 63222], [12353, 63223], [12354, 63224],
  12694. [12355, 63225], [12356, 63226], [12357, 63227], [12358, 63228],
  12695. [12359, 63229], [12360, 63230], [12361, 63231], [12362, 63232],
  12696. [12363, 63233], [12364, 63234], [12365, 63235], [12366, 63236],
  12697. [12367, 63237], [12368, 63238], [12369, 63239], [12370, 63240],
  12698. [12371, 63241], [12372, 63242], [12373, 63243], [12374, 63244],
  12699. [12375, 63245], [12376, 63246], [12377, 63247], [12378, 63248],
  12700. [12379, 63249], [12380, 63250], [12381, 63251], [12382, 63252],
  12701. [12383, 63253], [12384, 63254], [12385, 63255], [12386, 63256],
  12702. [12387, 63257], [12388, 63258], [12389, 63259], [12390, 63260],
  12703. [12391, 63261], [12392, 63262], [12393, 63263], [12394, 63264],
  12704. [12395, 63265], [12396, 63266], [12397, 63267], [12398, 63268],
  12705. [12399, 63269], [12400, 63270], [12401, 63271], [12402, 63272],
  12706. [12403, 63273], [12404, 63274], [12405, 63275], [12406, 63276],
  12707. [12407, 63277], [12408, 63278], [12409, 63279], [12410, 63280],
  12708. [12411, 63281], [12412, 63282], [12413, 63283], [12414, 63284],
  12709. [12415, 63285], [12416, 63286], [12417, 63287], [12418, 63288],
  12710. [12419, 63289], [12420, 63290], [12421, 63291], [12422, 63292],
  12711. [12423, 63293], [12424, 63294], [12425, 63295], [12426, 63296],
  12712. [12427, 63297], [12428, 63298], [12429, 63299], [12430, 63300],
  12713. [12431, 63301], [12432, 63302], [12433, 63303], [12434, 63304],
  12714. [12435, 63305], [12449, 63306], [12450, 63307], [12451, 63308],
  12715. [12452, 63309], [12453, 63310], [12454, 63311], [12455, 63312],
  12716. [12456, 63313], [12457, 63314], [12458, 63315], [12459, 63316],
  12717. [12460, 63317], [12461, 63318], [12462, 63319], [12463, 63320],
  12718. [12464, 63321], [12465, 63322], [12466, 63323], [12467, 63324],
  12719. [12468, 63325], [12469, 63326], [12470, 63327], [12471, 63328],
  12720. [12472, 63329], [12473, 63330], [12474, 63331], [12475, 63332],
  12721. [12476, 63333], [12477, 63334], [12478, 63335], [12479, 63336],
  12722. [12480, 63337], [12481, 63338], [12482, 63339], [12483, 63340],
  12723. [12484, 63341], [12485, 63342], [12486, 63343], [12487, 63344],
  12724. [12488, 63345], [12489, 63346], [12490, 63347], [12491, 63348],
  12725. [12492, 63349], [12493, 63350], [12494, 63351], [12495, 63352],
  12726. [12496, 63353], [12497, 63354], [12498, 63355], [12499, 63356],
  12727. [12500, 63357], [12501, 63358], [12502, 63359], [12503, 63360],
  12728. [12504, 63361], [12505, 63362], [12506, 63363], [12507, 63364],
  12729. [12508, 63365], [12509, 63366], [12510, 63367], [12511, 63368],
  12730. [12512, 63369], [12513, 63370], [12514, 63371], [12515, 63372],
  12731. [12516, 63373], [12517, 63374], [12518, 63375], [12519, 63376],
  12732. [12520, 63377], [12521, 63378], [12522, 63379], [12523, 63380],
  12733. [12524, 63381], [12525, 63382], [12526, 63383], [12527, 63384],
  12734. [12528, 63385], [12529, 63386], [12530, 63387], [12531, 63388],
  12735. [12532, 63389], [12533, 63390], [12534, 63391], [1040, 63392],
  12736. [1041, 63393], [1042, 63394], [1043, 63395], [1044, 63396], [1045, 63397],
  12737. [1025, 63398], [1046, 63399], [1047, 63400], [1048, 63401], [1049, 63402],
  12738. [1050, 63403], [1051, 63404], [1052, 63405], [1053, 63406], [1054, 63407],
  12739. [1055, 63408], [1056, 63409], [1057, 63410], [1058, 63411], [1059, 63412],
  12740. [1060, 63413], [1061, 63414], [1062, 63415], [1063, 63416], [1064, 63417],
  12741. [1065, 63418], [1066, 63419], [1067, 63420], [1068, 63421], [1069, 63422],
  12742. [1070, 63423], [1071, 63424], [1072, 63425], [1073, 63426], [1074, 63427],
  12743. [1075, 63428], [1076, 63429], [1077, 63430], [1105, 63431], [1078, 63432],
  12744. [1079, 63433], [1080, 63434], [1081, 63435], [1082, 63436], [1083, 63437],
  12745. [1084, 63438], [1085, 63439], [1086, 63440], [1087, 63441], [1088, 63442],
  12746. [1089, 63443], [1090, 63444], [1091, 63445], [1092, 63446], [1093, 63447],
  12747. [1094, 63448], [1095, 63449], [1096, 63450], [1097, 63451], [1098, 63452],
  12748. [1099, 63453], [1100, 63454], [1101, 63455], [1102, 63456], [1103, 63457],
  12749. [8679, 63458], [8632, 63459], [8633, 63460], [20033, 63461],
  12750. [63462, 131276], [20058, 63463], [63464, 131210], [20994, 63465],
  12751. [17553, 63466], 63467, [20872, 63468], [13853, 63469], [63470, 161287],
  12752. {s: 40}, [172, 63511, 65506], [63512, 65508], [63513, 65287],
  12753. [63514, 65282], [12849, 63515], [8470, 63516], [8481, 63517], 30849,
  12754. [37561, 58501], 35023, 22715, 24658, 31911, 23290, 9556, 9574, 9559, 9568,
  12755. 9580, 9571, 9562, 9577, 9565, 9554, 9572, 9557, {s: 3}, 9560, 9575, 9563,
  12756. 9555, 9573, 9558, 9567, 9579, 9570, 9561, 9576, 9564, 9553, {s: 5}, 9619,
  12757. {s: 26}, [58129, 147159], [22462, 58130], [58131, 159443], [28990, 58132],
  12758. [58133, 153568], [27042, 58135], [58136, 166889], [23412, 58137],
  12759. [31305, 58138], [58139, 153825], [58140, 169177], [31333, 58141],
  12760. [31357, 58142], [58143, 154028], [31419, 58144], [31408, 58145],
  12761. [31426, 58146], [31427, 58147], [29137, 58148], [58149, 156813],
  12762. [16842, 58150], [31450, 58151], [31453, 58152], [31466, 58153],
  12763. [16879, 58154], [21682, 58155], [58156, 154625], [31499, 58157],
  12764. [31573, 58158], [31529, 58159], [58160, 152334], [58161, 154878],
  12765. [31650, 58162], [31599, 58163], [33692, 58164], [58165, 154548],
  12766. [58166, 158847], [31696, 58167], [33825, 58168], [31634, 58169], 0,
  12767. [58171, 154912], 0, [33938, 58174], [31738, 58175], 0, [31797, 58177],
  12768. [58178, 154817], [31812, 58179], [31875, 58180], [58181, 149634],
  12769. [31910, 58182], [58184, 148856], [31945, 58185], [31943, 58186],
  12770. [31974, 58187], 0, [31987, 58189], [31989, 58190], [32359, 58192],
  12771. [17693, 58193], [58194, 159300], [32093, 58195], [58196, 159446],
  12772. [32137, 58198], [32171, 58199], [28981, 58200], [32179, 58201], 32214,
  12773. [58203, 147543], [58204, 155689], [32228, 58205], [15635, 58206],
  12774. [32245, 58207], [58208, 137209], [32229, 58209], [58210, 164717], 0,
  12775. [58212, 155937], [58213, 155994], [32366, 58214], 0, [17195, 58216],
  12776. [37996, 58217], [32295, 58218], [32576, 58219], [32577, 58220],
  12777. [32583, 58221], [31030, 58222], [58223, 156368], [39393, 58224],
  12778. [32663, 58225], [58226, 156497], [32675, 58227], [58228, 136801],
  12779. [58229, 131176], [17756, 58230], [58231, 145254], [58233, 164666],
  12780. [32762, 58234], [58235, 156809], 0, [32776, 58237], [32797, 58238], 0,
  12781. [32815, 58240], [58241, 172167], [58242, 158915], [32827, 58243],
  12782. [32828, 58244], [32865, 58245], [58246, 141076], [18825, 58247],
  12783. [58248, 157222], [58249, 146915], [58250, 157416], [26405, 58251],
  12784. [32935, 58252], [58253, 166472], [33031, 58254], [33050, 58255],
  12785. [22704, 58256], [58257, 141046], [27775, 58258], [58259, 156824],
  12786. [25831, 58261], [58262, 136330], [33304, 58263], [58264, 137310],
  12787. [27219, 58265], [58266, 150117], [58267, 150165], [17530, 58268],
  12788. [33321, 58269], [58271, 158290], [58272, 146814], [20473, 58273],
  12789. [58274, 136445], [34018, 58275], [33634, 58276], 0, [58278, 149927],
  12790. [58279, 144688], [58280, 137075], [58281, 146936], [33450, 58282],
  12791. [26907, 58283], [58284, 194964], [16859, 58285], [34123, 58286],
  12792. [33488, 58287], [33562, 58288], [58289, 134678], [58290, 137140],
  12793. [14017, 58291], [58292, 143741], [58293, 144730], [33403, 58294],
  12794. [33506, 58295], [33560, 58296], [58297, 147083], [58298, 159139],
  12795. [58299, 158469], [58300, 158615], [58301, 144846], [15807, 58302],
  12796. [33565, 58303], [21996, 58304], [33669, 58305], [17675, 58306],
  12797. [58307, 159141], [33708, 58308], 0, [33747, 58310], [58312, 159444],
  12798. [27223, 58313], [34138, 58314], [13462, 58315], [58316, 159298],
  12799. [33880, 58318], [58319, 154596], [33905, 58320], [15827, 58321],
  12800. [17636, 58322], [27303, 58323], [33866, 58324], [31064, 58326], 0,
  12801. [58328, 158614], [58329, 159351], [58330, 159299], [34014, 58331], 0,
  12802. [33681, 58333], [17568, 58334], [33939, 58335], [34020, 58336],
  12803. [58337, 154769], [16960, 58338], [58339, 154816], [17731, 58340],
  12804. [34100, 58341], [23282, 58342], 0, [17703, 58344], [34163, 58345],
  12805. [17686, 58346], [26559, 58347], [34326, 58348], [58349, 165413],
  12806. [58350, 165435], [34241, 58351], [58352, 159880], [34306, 58353],
  12807. [58354, 136578], [58355, 159949], [58356, 194994], [17770, 58357],
  12808. [34344, 58358], [13896, 58359], [58360, 137378], [21495, 58361],
  12809. [58362, 160666], [34430, 58363], 0, [58365, 172280], [34798, 58366],
  12810. [58367, 142375], [34737, 58368], [34778, 58369], [34831, 58370, 60990],
  12811. [22113, 58371], [34412, 58372], [26710, 58373], [17935, 58374],
  12812. [34885, 58375], [34886, 58376], [58377, 161248], [58378, 146873],
  12813. [58379, 161252], [34910, 58380], [34972, 58381], [18011, 58382],
  12814. [34996, 58383], [34997, 58384], [35013, 58386], [58388, 161551],
  12815. [35207, 58389], {s: 3}, [35239, 58393], [35260, 58394], [58395, 166437],
  12816. [35303, 58396], [58397, 162084], [58398, 162493], [35484, 58399],
  12817. [30611, 58400], [37374, 58401], [35472, 58402], [58403, 162393],
  12818. [31465, 58404], [58405, 162618], [18195, 58407], [58408, 162616],
  12819. [29052, 58409], [35596, 58410], [35615, 58411], [58412, 152624],
  12820. [58413, 152933], [35647, 58414], 0, [35661, 58416], [35497, 58417],
  12821. [58418, 150138], [35728, 58419], [35739, 58420], [35503, 58421],
  12822. [58422, 136927], [17941, 58423], [34895, 58424], [35995, 58425],
  12823. [58426, 163156], [58427, 163215], [58428, 195028], [14117, 58429],
  12824. [58430, 163155], [36054, 58431], [58432, 163224], [58433, 163261],
  12825. [36114, 58434], [36099, 58435], [58436, 137488], [36059, 58437],
  12826. [28764, 58438], [36113, 58439], [16080, 58441], 0, [36265, 58443],
  12827. [58444, 163842], [58445, 135188], [58446, 149898], [15228, 58447],
  12828. [58448, 164284], [58449, 160012], [31463, 58450], [36525, 58451],
  12829. [36534, 58452], [36547, 58453], [37588, 58454], [36633, 58455],
  12830. [36653, 58456], [58457, 164709], [58458, 164882], [36773, 58459],
  12831. [37635, 58460], [58461, 172703], [58462, 133712], [36787, 58463], 0,
  12832. [58465, 166366], [58466, 165181], [58467, 146875], [24312, 58468],
  12833. [58469, 143970], [36857, 58470], 0, [58474, 140069], [14720, 58475],
  12834. [58476, 159447], [36919, 58477], [58478, 165180], [58479, 162494],
  12835. [36961, 58480], [58481, 165228], [58482, 165387], [37032, 58483],
  12836. [58484, 165651], [37060, 58485], [58486, 165606], [37038, 58487], 0,
  12837. [37223, 58489], [37289, 58491], [37316, 58492], [31916, 58493],
  12838. [58494, 166195], [58495, 138889], [37390, 58496], [27807, 58497],
  12839. [37441, 58498], [37474, 58499], [58500, 153017], [58502, 166598],
  12840. [58503, 146587], [58504, 166668], [58505, 153051], [58506, 134449],
  12841. [37676, 58507], [37739, 58508], [58509, 166625], [58510, 166891],
  12842. [23235, 58512], [58513, 166626], [58514, 166629], [18789, 58515],
  12843. [37444, 58516], [58517, 166892], [58518, 166969], [58519, 166911],
  12844. [37747, 58520], [37979, 58521], [36540, 58522], [38277, 58523],
  12845. [38310, 58524], [37926, 58525], [38304, 58526], [28662, 58527],
  12846. [17081, 58528], [58530, 165592], [58531, 135804], [58532, 146990],
  12847. [18911, 58533], [27676, 58534], [38523, 58535], [38550, 58536],
  12848. [16748, 58537], [38563, 58538], [58539, 159445], [25050, 58540], 58541,
  12849. [30965, 58542], [58543, 166624], [38589, 58544], [21452, 58545],
  12850. [18849, 58546], [58547, 158904], [58548, 131700], [58549, 156688],
  12851. [58550, 168111], [58551, 168165], [58552, 150225], [58553, 137493],
  12852. [58554, 144138], [38705, 58555], [34370, 58556], [38710, 58557],
  12853. [18959, 58558], [17725, 58559], [17797, 58560], [58561, 150249],
  12854. [28789, 58562], [23361, 58563], [38683, 58564], 0, [58566, 168405],
  12855. [38743, 58567], [23370, 58568], [58569, 168427], [38751, 58570],
  12856. [37925, 58571], [20688, 58572], [58573, 143543], [58574, 143548],
  12857. [38793, 58575], [38815, 58576], [38833, 58577], [38846, 58578],
  12858. [38848, 58579], [38866, 58580], [38880, 58581], [58582, 152684],
  12859. [38894, 58583], [29724, 58584], [58585, 169011], 0, [38901, 58587],
  12860. [58588, 168989], [58589, 162170], [19153, 58590], [38964, 58591],
  12861. [38963, 58592], [38987, 58593], [39014, 58594], [15118, 58595],
  12862. [58596, 160117], [15697, 58597], [58598, 132656], [58599, 147804],
  12863. [58600, 153350], [39114, 58601], [39095, 58602], [39112, 58603],
  12864. [39111, 58604], [19199, 58605], [58606, 159015], [58607, 136915],
  12865. [21936, 58608], [39137, 58609], [39142, 58610], [39148, 58611],
  12866. [37752, 58612], [39225, 58613], [58614, 150057], [19314, 58615],
  12867. [58616, 170071], [58617, 170245], [39413, 58618], [39436, 58619],
  12868. [39483, 58620], [39440, 58621], [39512, 58622], [58623, 153381],
  12869. [14020, 58624], [58625, 168113], [58626, 170965], [39648, 58627],
  12870. [39650, 58628], [58629, 170757], [39668, 58630], [19470, 58631],
  12871. [39700, 58632], [39725, 58633], [58634, 165376], [20532, 58635],
  12872. [39732, 58636], [14531, 58638], [58639, 143485], [39760, 58640],
  12873. [39744, 58641], [58642, 171326], [23109, 58643], [58644, 137315],
  12874. [39822, 58645], [39938, 58647], [39935, 58648], [39948, 58649],
  12875. [58650, 171624], [40404, 58651], [58652, 171959], [58653, 172434],
  12876. [58654, 172459], [58655, 172257], [58656, 172323], [58657, 172511],
  12877. [40318, 58658], [40323, 58659], [58660, 172340], [40462, 58661],
  12878. [40388, 58663], [58665, 172435], [58666, 172576], [58667, 137531],
  12879. [58668, 172595], [40249, 58669], [58670, 172217], [58671, 172724],
  12880. [40592, 58672], [40597, 58673], [40606, 58674], [40610, 58675],
  12881. [19764, 58676], [40618, 58677], [40623, 58678], [58679, 148324],
  12882. [40641, 58680], [15200, 58681], [14821, 58682], [15645, 58683],
  12883. [20274, 58684], [14270, 58685], [58686, 166955], [40706, 58687],
  12884. [40712, 58688], [19350, 58689], [37924, 58690], [58691, 159138],
  12885. [40727, 58692, 60836], 0, [40761, 58694], [22175, 58695], [22154, 58696],
  12886. [40773, 58697], [39352, 58698], [58699, 168075], [38898, 58700],
  12887. [33919, 58701], 0, [40809, 58703], [31452, 58704], [40846, 58705],
  12888. [29206, 58706], [19390, 58707], [58708, 149877], [58709, 149947],
  12889. [29047, 58710], [58711, 150008], [58712, 148296], [58713, 150097],
  12890. [29598, 58714], [58715, 166874], [58716, 137466], [31135, 58717],
  12891. [58718, 166270], [58719, 167478], [37737, 58720], [37875, 58721],
  12892. [58722, 166468], [37612, 58723], [37761, 58724], [37835, 58725],
  12893. [58726, 166252], [58727, 148665], [29207, 58728], [16107, 58729],
  12894. [30578, 58730], [31299, 58731], [28880, 58732], [58733, 148595],
  12895. [58734, 148472], [29054, 58735], [58736, 137199], [28835, 58737],
  12896. [58738, 137406], [58739, 144793], [16071, 58740], [58741, 137349],
  12897. [58742, 152623], [58743, 137208], [14114, 58744], [58745, 136955],
  12898. [58746, 137273], [14049, 58747], [58748, 137076], [58749, 137425],
  12899. [58750, 155467], [14115, 58751], [58752, 136896], [22363, 58753],
  12900. [58754, 150053], [58755, 136190], [58756, 135848], [58757, 136134],
  12901. [58758, 136374], [34051, 58759, 58761], [58760, 145062], 0, [33877, 58762],
  12902. [58763, 149908], [58764, 160101], [58765, 146993], [58766, 152924],
  12903. [58767, 147195], [58768, 159826], [17652, 58769], [58770, 145134],
  12904. [58771, 170397], [58772, 159526], [26617, 58773], [14131, 58774],
  12905. [15381, 58775], [15847, 58776], [22636, 58777], [58778, 137506],
  12906. [26640, 58779], [16471, 58780], [58781, 145215], [58782, 147681],
  12907. [58783, 147595], [58784, 147727], [58785, 158753], [21707, 58786],
  12908. [22174, 58787], [58788, 157361], [22162, 58789], [58790, 135135],
  12909. [58791, 134056], [58792, 134669], 0, [58794, 166675], [37788, 58795],
  12910. [20216, 58796], [20779, 58797], [14361, 58798], [58799, 148534],
  12911. [20156, 58800], [58801, 132197], 0, [20299, 58803], [20362, 58804],
  12912. [58805, 153169], [23144, 58806], [58807, 131499], [58808, 132043],
  12913. [14745, 58809], [58810, 131850], [58811, 132116], [13365, 58812],
  12914. [20265, 58813], [58814, 131776], [58815, 167603], [58816, 131701],
  12915. [35546, 58817], [58818, 131596], [20120, 58819], [20685, 58820],
  12916. [20749, 58821], [20386, 58822], [20227, 58823], [58824, 150030],
  12917. [58825, 147082], [20290, 58826], [20526, 58827], [20588, 58828],
  12918. [20609, 58829], [20428, 58830], [20453, 58831], [20568, 58832],
  12919. [20732, 58833], [28278, 58838], [58839, 144789], [58840, 147001],
  12920. [58841, 147135], [28018, 58842], [58843, 137348], [58844, 147081],
  12921. [20904, 58845], [20931, 58846], [58847, 132576], [17629, 58848],
  12922. [58849, 132259], [58850, 132242], [58851, 132241], [36218, 58852],
  12923. [58853, 166556], [58854, 132878], [21081, 58855], [21156, 58856],
  12924. [58857, 133235], [21217, 58858], 0, [18042, 58860], [29068, 58861],
  12925. [58862, 148364], [58863, 134176], [58864, 149932], [58865, 135396],
  12926. [27089, 58866], [58867, 134685], 0, [16094, 58869], [29849, 58870],
  12927. [29716, 58871], [29782, 58872], [29592, 58873], [19342, 58874],
  12928. [58875, 150204], [58876, 147597], [21456, 58877], [13700, 58878],
  12929. [29199, 58879], [58880, 147657], [21940, 58881], [58882, 131909],
  12930. [21709, 58883], [58884, 134086], [22301, 58885], [37469, 58886],
  12931. [38644, 58887], [22493, 58889], [22413, 58890], [22399, 58891],
  12932. [13886, 58892], [22731, 58893], [23193, 58894], [58895, 166470],
  12933. [58896, 136954], [58897, 137071], [58898, 136976], [23084, 58899],
  12934. [22968, 58900], [23166, 58902], [23247, 58903], [23058, 58904],
  12935. [58905, 153926], [58906, 137715], [58907, 137313], [58908, 148117],
  12936. [14069, 58909], [27909, 58910], [29763, 58911], [23073, 58912],
  12937. [58913, 155267], [23169, 58914], [58915, 166871], [58916, 132115],
  12938. [37856, 58917], [29836, 58918], [58919, 135939], [28933, 58920],
  12939. [18802, 58921], [37896, 58922], [58923, 166395], [37821, 58924],
  12940. [14240, 58925], [23582, 58926], [23710, 58927], [24158, 58928],
  12941. [24136, 58929], [58930, 137622], [58931, 137596], [58932, 146158],
  12942. [24269, 58933], [23375, 58934], [58935, 137475], [58936, 137476],
  12943. [14081, 58937], [58938, 137376], [14045, 58939], [58940, 136958],
  12944. [14035, 58941], [33066, 58942], [58943, 166471], [58944, 138682],
  12945. [58945, 144498], [58946, 166312], [24332, 58947, 60916], [24334, 58948],
  12946. [58949, 137511], [58950, 137131], [23147, 58951], [58952, 137019],
  12947. [23364, 58953], [58955, 161277], [34912, 58956], [24702, 58957],
  12948. [58958, 141408], [58959, 140843], [24539, 58960], [16056, 58961],
  12949. [58962, 140719], [58963, 140734], [58964, 168072], [58965, 159603],
  12950. [25024, 58966], [58967, 131134], [58968, 131142], [58969, 140827],
  12951. [24985, 58970], [24984, 58971], [24693, 58972], [58973, 142491],
  12952. [58974, 142599], [58975, 149204], [58976, 168269], [25713, 58977],
  12953. [58978, 149093], [58979, 142186], [14889, 58980], [58981, 142114],
  12954. [58982, 144464], [58983, 170218], [58984, 142968], [25399, 58985],
  12955. [25782, 58987], [25393, 58988], [25553, 58989], [58990, 149987],
  12956. [58991, 142695], [25252, 58992], [58993, 142497], [25659, 58994],
  12957. [25963, 58995], [26994, 58996], [15348, 58997], [58998, 143502],
  12958. [58999, 144045], [59000, 149897], [59001, 144043], [21773, 59002],
  12959. [59003, 144096], [59004, 137433], [59005, 169023], [26318, 59006],
  12960. [59007, 144009], [59008, 143795], [15072, 59009], [59011, 152964],
  12961. [59012, 166690], [59013, 152975], [59014, 136956], [59015, 152923],
  12962. [59016, 152613], [30958, 59017], [59018, 143619], [59019, 137258],
  12963. [59020, 143924], [13412, 59021], [59022, 143887], [59023, 143746],
  12964. [59024, 148169], [26254, 59025], [59026, 159012], [26219, 59027],
  12965. [19347, 59028], [26160, 59029], [59030, 161904], [59031, 138731],
  12966. [26211, 59032], [59033, 144082], [59034, 144097], [26142, 59035],
  12967. [59036, 153714], [14545, 59037], [59038, 145466], [59039, 145340],
  12968. [15257, 59040], [59041, 145314], [59042, 144382], [29904, 59043],
  12969. [15254, 59044], [59046, 149034], [26806, 59047], 0, [15300, 59049],
  12970. [27326, 59050], [59052, 145365], [59053, 148615], [27187, 59054],
  12971. [27218, 59055], [27337, 59056], [27397, 59057], [59058, 137490],
  12972. [25873, 59059], [26776, 59060], [27212, 59061], [15319, 59062],
  12973. [27258, 59063], [27479, 59064], [59065, 147392], [59066, 146586],
  12974. [37792, 59067], [37618, 59068], [59069, 166890], [59070, 166603],
  12975. [37513, 59071], [59072, 163870], [59073, 166364], [37991, 59074],
  12976. [28069, 59075], [28427, 59076], 0, [59079, 147327], [15759, 59080],
  12977. [28164, 59081], [59082, 147516], [23101, 59083], [28170, 59084],
  12978. [22599, 59085], [27940, 59086], [30786, 59087], [28987, 59088],
  12979. [59089, 148250], [59090, 148086], [28913, 59091], [29264, 59092, 61085],
  12980. [29319, 59093], [29332, 59094], [59095, 149391], [59096, 149285],
  12981. [20857, 59097], [59098, 150180], [59099, 132587], [29818, 59100],
  12982. [59101, 147192], [59102, 144991], [59103, 150090], [59104, 149783],
  12983. [59105, 155617], [16134, 59106], [16049, 59107], [59108, 150239],
  12984. [59109, 166947], [59110, 147253], [24743, 59111], [16115, 59112],
  12985. [29900, 59113], [29756, 59114], [37767, 59115], [29751, 59116],
  12986. [17567, 59117], [59118, 159210], [17745, 59119], [30083, 59120],
  12987. [16227, 59121], [59122, 150745], [59123, 150790], [16216, 59124],
  12988. [30037, 59125], [30323, 59126], [59127, 173510], 0, [29800, 59129, 61070],
  12989. [59130, 166604], [59131, 149931], [59132, 149902], [15099, 59133],
  12990. [15821, 59134], [59135, 150094], [16127, 59136], [59137, 149957],
  12991. [59138, 149747], [37370, 59139], [22322, 59140], [37698, 59141],
  12992. [59142, 166627], [59143, 137316], [20703, 59144], [59145, 152097],
  12993. [59146, 152039], [30584, 59147], [59148, 143922], [30478, 59149],
  12994. [30479, 59150], [30587, 59151], [59152, 149143], [59153, 145281],
  12995. [14942, 59154], [59155, 149744], [29752, 59156], [29851, 59157],
  12996. [16063, 59158], [59159, 150202], [59160, 150215], [16584, 59161],
  12997. [59162, 150166], [59163, 156078], [37639, 59164], [59165, 152961],
  12998. [30750, 59166], [30861, 59167], [30856, 59168], [30930, 59169],
  12999. [29648, 59170], [31065, 59171], [59172, 161601], [59173, 153315],
  13000. [16654, 59174], 0, 0, [31141, 59177], [27181, 59178], [59179, 147194],
  13001. [31290, 59180], [31220, 59181], [16750, 59182], [59183, 136934],
  13002. [16690, 59184], [37429, 59185], [31217, 59186], [59187, 134476],
  13003. [59188, 149900], [59189, 131737], [59190, 146874], [59191, 137070],
  13004. [13719, 59192], [21867, 59193], [13680, 59194], [13994, 59195],
  13005. [59196, 131540], [59197, 134157], [31458, 59198], [23129, 59199],
  13006. [59200, 141045], [59201, 154287], [59202, 154268], [23053, 59203],
  13007. [59204, 131675], [30960, 59205], [23082, 59206], [59207, 154566],
  13008. [31486, 59208], [16889, 59209], [31837, 59210], [31853, 59211],
  13009. [16913, 59212], [59213, 154547], [59214, 155324], [59215, 155302],
  13010. [31949, 59216], [59217, 150009], [59218, 137136], [31886, 59219],
  13011. [31868, 59220], [31918, 59221], [27314, 59222], [32220, 59223],
  13012. [32263, 59224], [32211, 59225], [32590, 59226], [59227, 156257],
  13013. [59228, 155996], [59229, 162632], [32151, 59230], [59231, 155266],
  13014. [17002, 59232], [59233, 158581], [59234, 133398], [26582, 59235],
  13015. [59236, 131150], [59237, 144847], [22468, 59238], [59239, 156690],
  13016. [59240, 156664], [32733, 59242], [31527, 59243], [59244, 133164],
  13017. [59245, 154345], [59246, 154947], [31500, 59247], [59248, 155150],
  13018. [39398, 59249], [34373, 59250], [39523, 59251], [27164, 59252],
  13019. [59253, 144447], [59255, 150007], [59256, 157101], [39455, 59257],
  13020. [59258, 157088], 0, [59260, 160039], [59261, 158929], [17642, 59262],
  13021. [33079, 59263], [17410, 59264], [32966, 59265], [33033, 59266],
  13022. [33090, 59267], [59268, 157620], [39107, 59269], [59270, 158274],
  13023. [33378, 59271], [33381, 59272], [59273, 158289], [33875, 59274],
  13024. [59275, 159143], [34320, 59276], [59277, 160283], [23174, 59278],
  13025. [16767, 59279], [59280, 137280], [23339, 59281], [59282, 137377],
  13026. [23268, 59283], [59284, 137432], [34464, 59285], [59286, 195004],
  13027. [59287, 146831], [34861, 59288], [59289, 160802], [23042, 59290],
  13028. [34926, 59291], [20293, 59292], [34951, 59293], [35007, 59294],
  13029. [35046, 59295], [35173, 59296], [35149, 59297], [59298, 153219],
  13030. [35156, 59299], [59300, 161669], [59301, 161668], [59302, 166901],
  13031. [59303, 166873], [59304, 166812], [59305, 166393], [16045, 59306],
  13032. [33955, 59307], [18165, 59308], [18127, 59309], [14322, 59310],
  13033. [35389, 59311], [35356, 59312], [59313, 169032], [24397, 59314],
  13034. [37419, 59315], [59316, 148100], [26068, 59317], [28969, 59318],
  13035. [28868, 59319], [59320, 137285], [40301, 59321], [35999, 59322],
  13036. [36073, 59323], [59324, 163292], [22938, 59325], [30659, 59326],
  13037. [23024, 59327], [14036, 59329], [36394, 59330], [36519, 59331],
  13038. [59332, 150537], [36656, 59333], [36682, 59334], [17140, 59335],
  13039. [27736, 59336], [28603, 59337], [59338, 140065], [18587, 59339],
  13040. [28537, 59340], [28299, 59341], [59342, 137178], [39913, 59343],
  13041. [14005, 59344], [59345, 149807], [37051, 59346], 0, [21873, 59348],
  13042. [18694, 59349], [37307, 59350], [37892, 59351], [59352, 166475],
  13043. [16482, 59353], [59354, 166652], [37927, 59355], [59356, 166941],
  13044. [59357, 166971], [34021, 59358], [35371, 59359], [38297, 59360],
  13045. [38311, 59361], [38295, 59362], [38294, 59363], [59364, 167220],
  13046. [29765, 59365], [16066, 59366], [59367, 149759], [59368, 150082],
  13047. [59369, 148458], [16103, 59370], [59371, 143909], [38543, 59372],
  13048. [59373, 167655], [59374, 167526], [59375, 167525], [16076, 59376],
  13049. [59377, 149997], [59378, 150136], [59379, 147438], [29714, 59380],
  13050. [29803, 59381], [16124, 59382], [38721, 59383], [59384, 168112],
  13051. [26695, 59385], [18973, 59386], [59387, 168083], [59388, 153567], 0,
  13052. [37736, 59390], [59391, 166281], [59392, 166950], [59393, 166703],
  13053. [59394, 156606], [37562, 59395], [23313, 59396], [35689, 59397],
  13054. [18748, 59398], [29689, 59399], [59400, 147995], [38811, 59401], 0,
  13055. [39224, 59403], [59404, 134950], [24001, 59405], [59406, 166853],
  13056. [59407, 150194], [38943, 59408], [59409, 169178], [37622, 59410],
  13057. [59411, 169431], [37349, 59412], [17600, 59413], [59414, 166736],
  13058. [59415, 150119], [59416, 166756], [39132, 59417], [59418, 166469],
  13059. [16128, 59419], [37418, 59420], [18725, 59421], [33812, 59422],
  13060. [39227, 59423], [39245, 59424], [59425, 162566], [15869, 59426], 0,
  13061. [19311, 59428], [39338, 59429], [39516, 59430], [59431, 166757],
  13062. [59432, 153800], [27279, 59433], [39457, 59434], [23294, 59435],
  13063. [39471, 59436], [59437, 170225], [19344, 59438], [59439, 170312],
  13064. [39356, 59440], [19389, 59441], [19351, 59442], [37757, 59443],
  13065. [22642, 59444], [59445, 135938], [22562, 59446], [59447, 149944],
  13066. [59448, 136424], [30788, 59449], [59450, 141087], [59451, 146872],
  13067. [26821, 59452], [15741, 59453], [37976, 59454], [14631, 59455],
  13068. [24912, 59456], [59457, 141185], [59458, 141675], [24839, 59459],
  13069. [40015, 59460], [40019, 59461], [40059, 59462], [39989, 59463],
  13070. [39952, 59464], [39807, 59465], [39887, 59466], [59467, 171565],
  13071. [39839, 59468], [59469, 172533], [59470, 172286], [40225, 59471],
  13072. [19630, 59472], [59473, 147716], [40472, 59474], [19632, 59475],
  13073. [40204, 59476], [59477, 172468], [59478, 172269], [59479, 172275],
  13074. [59480, 170287], [40357, 59481], [33981, 59482], [59483, 159250],
  13075. [59484, 159711], [59485, 158594], [34300, 59486], [17715, 59487],
  13076. [59488, 159140], [59489, 159364], [59490, 159216], [33824, 59491],
  13077. [34286, 59492], [59493, 159232], [59494, 145367], [59495, 155748],
  13078. [31202, 59496], [59497, 144796], [59498, 144960], [59500, 149982],
  13079. [15714, 59501], [37851, 59502], [37566, 59503], [37704, 59504],
  13080. [59505, 131775], [30905, 59506], [37495, 59507], [37965, 59508],
  13081. [20452, 59509], [13376, 59510], [36964, 59511], [59512, 152925],
  13082. [30781, 59513], [30804, 59514], [30902, 59515], [30795, 59516],
  13083. [59517, 137047], [59518, 143817], [59519, 149825], [13978, 59520],
  13084. [20338, 59521], [28634, 59522], [28633, 59523], 0, [28702, 59524, 59525],
  13085. [21524, 59526], [59527, 147893], [22459, 59528], [22771, 59529],
  13086. [22410, 59530], [40214, 59531], [22487, 59532], [28980, 59533],
  13087. [13487, 59534], [59535, 147884], [29163, 59536], [59537, 158784],
  13088. [59538, 151447], 0, [59540, 137141], [59541, 166473], [24844, 59542],
  13089. [23246, 59543], [23051, 59544], [17084, 59545], [59546, 148616],
  13090. [14124, 59547], [19323, 59548], [59549, 166396], [37819, 59550],
  13091. [37816, 59551], [59552, 137430], [59553, 134941], [33906, 59554],
  13092. [59555, 158912], [59556, 136211], [59557, 148218], [59558, 142374],
  13093. [59559, 148417], [22932, 59560], [59561, 146871], [59562, 157505],
  13094. [32168, 59563], [59564, 155995], [59565, 155812], [59566, 149945],
  13095. [59567, 149899], [59568, 166394], [37605, 59569], [29666, 59570],
  13096. [16105, 59571], [29876, 59572], [59573, 166755], [59574, 137375],
  13097. [16097, 59575], [59576, 150195], [27352, 59577], [29683, 59578],
  13098. [29691, 59579], [16086, 59580], [59581, 150078], [59582, 150164],
  13099. [59583, 137177], [59584, 150118], [59585, 132007], [59586, 136228],
  13100. [59587, 149989], [29768, 59588], [59589, 149782], [28837, 59590],
  13101. [59591, 149878], [37508, 59592], [29670, 59593], [37727, 59594],
  13102. [59595, 132350], [37681, 59596], [59597, 166606], [59598, 166422],
  13103. [37766, 59599], [59600, 166887], [59601, 153045], [18741, 59602],
  13104. [59603, 166530], [29035, 59604], [59605, 149827], [59606, 134399],
  13105. [22180, 59607], [59608, 132634], [59609, 134123], [59610, 134328],
  13106. [21762, 59611], [31172, 59612], [59613, 137210], [32254, 59614],
  13107. [59615, 136898], [59616, 150096], [59617, 137298], [17710, 59618],
  13108. [37889, 59619], [14090, 59620], [59621, 166592], [59622, 149933],
  13109. [22960, 59623], [59624, 137407], [59625, 137347], [59626, 160900],
  13110. [23201, 59627], [14050, 59628], [59629, 146779], [14000, 59630],
  13111. [37471, 59631], [23161, 59632], [59633, 166529], [59634, 137314],
  13112. [37748, 59635], [15565, 59636], [59637, 133812], [19094, 59638],
  13113. [14730, 59639], [20724, 59640], [15721, 59641], [15692, 59642],
  13114. [59643, 136092], [29045, 59644], [17147, 59645], [59646, 164376],
  13115. [28175, 59647], [59648, 168164], [17643, 59649], [27991, 59650],
  13116. [59651, 163407], [28775, 59652], [27823, 59653], [15574, 59654],
  13117. [59655, 147437], [59656, 146989], [28162, 59657], [28428, 59658],
  13118. [15727, 59659], [59660, 132085], [30033, 59661], [14012, 59662],
  13119. [13512, 59663], [18048, 59664], [16090, 59665], [18545, 59666],
  13120. [22980, 59667], [37486, 59668], [18750, 59669], [36673, 59670],
  13121. [59671, 166940], [59672, 158656], [22546, 59673], [22472, 59674],
  13122. [14038, 59675], [59676, 136274], [28926, 59677], [59678, 148322],
  13123. [59679, 150129], [59680, 143331], [59681, 135856], [59682, 140221],
  13124. [26809, 59683], [26983, 59684], [59685, 136088], [59686, 144613],
  13125. [59687, 162804], [59688, 145119], [59689, 166531], [59690, 145366],
  13126. [59691, 144378], [59692, 150687], [27162, 59693], [59694, 145069],
  13127. [59695, 158903], [33854, 59696], [17631, 59697], [17614, 59698],
  13128. [59699, 159014], [59700, 159057], [59701, 158850], [59702, 159710], 0, 0,
  13129. [33597, 59705], [59706, 137018], [33773, 59707], [59708, 158848],
  13130. [59709, 159827], [59710, 137179], [22921, 59711], [23170, 59712],
  13131. [59713, 137139], [23137, 59714], [23153, 59715], [59716, 137477],
  13132. [59717, 147964], [14125, 59718], [23023, 59719], [59720, 137020],
  13133. [14023, 59721], [29070, 59722], [37776, 59723], [26266, 59724],
  13134. [59725, 148133], [23150, 59726], [23083, 59727], [59728, 148115],
  13135. [27179, 59729], [59730, 147193], [59731, 161590], [59732, 148571],
  13136. [59733, 148170], [28957, 59734], [59735, 148057], [59736, 166369],
  13137. [20400, 59737], [59738, 159016], [23746, 59739], [59740, 148686],
  13138. [59741, 163405], [59742, 148413], [27148, 59743], [59744, 148054],
  13139. [59745, 135940], 0, [28979, 59747], [59748, 148457], [15781, 59749],
  13140. [27871, 59750], [59751, 194597], [23019, 59754], [24412, 59757],
  13141. [59764, 144128], [31955, 59776], [59783, 162548], [59786, 153334],
  13142. [59790, 162584], [36972, 59791], [33270, 59795], [30476, 59797],
  13143. [27810, 59799], [22269, 59800], [22633, 59828], [26465, 59832],
  13144. [23646, 59838], [22770, 59841], [28857, 59843], [26627, 59853],
  13145. [36795, 59859], [36796, 59861], [20001, 59871], [31545, 59898],
  13146. [15820, 59902], [29482, 57990, 59909], [30048, 59912], [22586, 59920],
  13147. [33446, 59932], [27018, 59940], [24803, 59944], [20206, 59984],
  13148. [39364, 60002], [40639, 60023], [21249, 60025], [26528, 60038],
  13149. [24808, 60046], [20916, 60053], [31363, 60064], [39994, 60075],
  13150. [31432, 60093], [26906, 60098], [22956, 60100], [22592, 60102],
  13151. [21610, 60114], [24807, 60123], [22138, 60125], [26965, 60132],
  13152. [39983, 60133], [34725, 60134], [23584, 60141], [24075, 60143],
  13153. [26398, 60147], [33965, 60157], [35713, 60161], [20088, 60166],
  13154. [25283, 60176], [26709, 60180], 0, [33533, 60190], [35237, 60194],
  13155. [36768, 60196], [38840, 60198], [38983, 60200], [39613, 60201],
  13156. [24497, 60218], [26184, 60219], [26303, 60220], [60221, 162425], 0,
  13157. [60225, 149946], 0, 0, [60230, 131910], [26382, 60232], [26904, 60233],
  13158. [60235, 161367], [60236, 155618], [60239, 161278], [60240, 139418],
  13159. [18640, 60241], [19128, 60242], [60244, 166554], [60247, 147515],
  13160. [60250, 150085], [60251, 132554], [20946, 60252], [60253, 132625],
  13161. [22943, 60254], [60255, 138920], [15294, 60256], [60257, 146687],
  13162. [14747, 60262], [60264, 165352], [60265, 170441], [14178, 60266],
  13163. [60267, 139715], [35678, 60268], [60269, 166734], 0, [29193, 60274],
  13164. [60276, 134264], [60280, 132985], [36570, 60281], [21135, 60283],
  13165. [29041, 60285], [60288, 147274], [60289, 150183], [21948, 60290],
  13166. [60293, 158546], [13427, 60295], [60297, 161330], [18200, 60299],
  13167. [60303, 149823], [20582, 60305], [13563, 60306], [60307, 144332], 0,
  13168. [18300, 60310], [60311, 166216], [60315, 138640], 0, [60320, 162834],
  13169. [36950, 60321], [60323, 151450], [35682, 60324], [23899, 60327],
  13170. [60328, 158711], 0, [60331, 137500], [35562, 60332], [60333, 150006],
  13171. [60335, 147439], [19392, 60337], [60340, 141083], [37989, 60341],
  13172. [60342, 153569], [24981, 60343], [23079, 60344], [60345, 194765], 0,
  13173. [60348, 148769], [20074, 60350], [60351, 149812], [38486, 60352],
  13174. [28047, 60353], [60354, 158909], [35191, 60356], [60359, 156689], 0,
  13175. [31554, 60363], [60364, 168128], [60365, 133649], 0, [31301, 60369],
  13176. [39462, 60372], [13919, 60374], [60375, 156777], [60376, 131105],
  13177. [31107, 60377], [23852, 60380], [60381, 144665], 0, [18128, 60384],
  13178. [30011, 60386], [34917, 60387], [22710, 60389], [14108, 60390],
  13179. [60391, 140685], [15444, 60394], [37505, 60397], [60398, 139642],
  13180. [37680, 60400], [60402, 149968], [27705, 60403], [60406, 134904],
  13181. [34855, 60407], [35061, 60408], [60409, 141606], [60410, 164979],
  13182. [60411, 137137], [28344, 60412], [60413, 150058], [60414, 137248],
  13183. [14756, 60415], 0, 0, [17727, 60419], [26294, 60420], [60421, 171181],
  13184. [60422, 170148], [35139, 60423], [16607, 60427], [60428, 136714],
  13185. [14753, 60429], [60430, 145199], [60431, 164072], [60432, 136133],
  13186. [29101, 60433], [33638, 60434], [60436, 168360], 0, [19639, 60438],
  13187. [60439, 159919], [60440, 166315], [60445, 147834], [31555, 60446],
  13188. [31102, 60447], [28597, 60449], [60450, 172767], [27139, 60451],
  13189. [60452, 164632], [21410, 60453], [60454, 159239], [37823, 60455],
  13190. [26678, 60456], [38749, 59389, 60457], [60458, 164207], [60460, 158133],
  13191. [60461, 136173], [60462, 143919], [23941, 60464], [60465, 166960],
  13192. [22293, 60467], [38947, 60468], [60469, 166217], [23979, 60470],
  13193. [60471, 149896], [26046, 60472], [27093, 60473], [21458, 60474],
  13194. [60475, 150181], [60476, 147329], [15377, 60477], [26422, 60478],
  13195. [60482, 139169], [13770, 60490], [18682, 60493], 0, [30728, 60496],
  13196. [37461, 60497], [17394, 60499], [17375, 60501], [23032, 60505], 0,
  13197. [22155, 60518], [60520, 169449], [36882, 60541], [21953, 60546],
  13198. [17673, 60551], [32383, 60552], [28502, 60553], [27313, 60554],
  13199. [13540, 60556], [60558, 161949], [14138, 60559], 0, [60562, 163876],
  13200. [60565, 162366], [15851, 60567], [60569, 146615], [60574, 156248],
  13201. [22207, 60575], [36366, 60577], [23405, 60578], [25566, 60581], 0,
  13202. [25904, 60585], [22061, 60586], [21530, 60588], [60591, 171416],
  13203. [19581, 60592], [22050, 60593], [22046, 60594], [32585, 60595],
  13204. [22901, 60597], [60598, 146752], [34672, 60599], [33047, 60604],
  13205. [40286, 60605], [36120, 60606], [30267, 60607], [40005, 60608],
  13206. [30286, 60609], [30649, 60610], [37701, 60611], [21554, 60612],
  13207. [33096, 60613], [33527, 60614], [22053, 60615], [33074, 60616],
  13208. [33816, 60617], [32957, 60618], [21994, 60619], [31074, 60620],
  13209. [22083, 60621], [21526, 60622], [60623, 134813], [13774, 60624],
  13210. [22021, 57509, 60625], [22001, 60626], [26353, 60627], [60628, 164578],
  13211. [13869, 60629], [30004, 60630], [22000, 60631], [21946, 60632],
  13212. [21655, 60633], [21874, 60634], [60635, 134209], [60636, 134294],
  13213. [24272, 57652, 60637], [60639, 134774], [60640, 142434], [60641, 134818],
  13214. [40619, 60642], [32090, 60643], 0, [60645, 135285], [25245, 60646],
  13215. [38765, 60647], [21652, 60648], [36045, 60649], [29174, 60650],
  13216. [37238, 60651], [25596, 60652], [25529, 60653], [25598, 60654],
  13217. [21865, 60655], [60656, 142147], [40050, 60657], [60658, 143027],
  13218. [20890, 60659], [13535, 60660], [60661, 134567], [20903, 60662],
  13219. [21581, 60663], [21790, 60664], [21779, 60665], [30310, 60666],
  13220. [36397, 60667], [60668, 157834], [30129, 60669], [32950, 60670],
  13221. [34820, 60671], 0, [35015, 60673], [33206, 60674], [33820, 60675],
  13222. [17644, 60677], [29444, 60678], [33547, 60681], [22139, 60683],
  13223. [37232, 60690], [37384, 60692], [60696, 134905], [29286, 60697],
  13224. [18254, 60699], [60701, 163833], [16634, 60703], [40029, 60704],
  13225. [25887, 60705], [18675, 60707], [60708, 149472], [60709, 171388], 0,
  13226. [60713, 161187], 60715, [60716, 155720], [29091, 60718], [32398, 60719],
  13227. [40272, 60720], [13687, 60723], [27826, 60725], [21351, 60726],
  13228. [14812, 60728], [60731, 149016], [33325, 60734], [21579, 60735], 60739,
  13229. [14930, 60740], [29556, 60742], [60743, 171692], [19721, 60744],
  13230. [39917, 60745], 0, [19547, 60748], [60751, 171998], [33884, 60752],
  13231. [60754, 160434], [25390, 60757], [32037, 60758], [14890, 60761],
  13232. [36872, 60762], [21196, 60763], [15988, 60764], [13946, 60765],
  13233. [17897, 60766], [60767, 132238], [30272, 60768], [23280, 60769],
  13234. [60770, 134838], [30842, 60771], [18358, 60772], [22695, 60773],
  13235. [16575, 60774], [22140, 60775], [39819, 60776], [23924, 60777],
  13236. [30292, 60778], [60779, 173108], [40581, 60780], [19681, 60781], 0,
  13237. [14331, 60783], [24857, 60784], [60786, 148466], 60787, [22109, 60788],
  13238. [60792, 171526], [21044, 60793], [13741, 60795], 0, [40316, 60797],
  13239. [31830, 60798], [39737, 60799], [22494, 60800], [23635, 60802],
  13240. [25811, 60803], [60804, 169168], [60805, 156469], [34477, 60807],
  13241. [60808, 134440], [60811, 134513], 60812, [20990, 60813], [60814, 139023],
  13242. [23950, 60815], [38659, 60816], [60817, 138705], [40577, 60818],
  13243. [36940, 60819], [31519, 60820], [39682, 60821], [23761, 60822],
  13244. [31651, 60823], [25192, 60824], [25397, 60825], [39679, 60826],
  13245. [31695, 60827], [39722, 60828], [31870, 60829], 0, [31810, 60831],
  13246. [31878, 60832], [39957, 60833], [31740, 60834], [39689, 60835], 0, 39982,
  13247. [40794, 60839], [21875, 60840], [23491, 60841], [20477, 60842],
  13248. [40600, 60843], [20466, 60844], [21088, 60845], [21201, 60847],
  13249. [22375, 60848], [20566, 60849], [22967, 60850], [24082, 60851],
  13250. [38856, 60852], [40363, 60853], [36700, 60854], [21609, 60855],
  13251. [38836, 60856], [39232, 60857], [38842, 60858], [21292, 60859],
  13252. [24880, 60860], [26924, 60861], [21466, 60862], [39946, 60863],
  13253. [40194, 60864], [19515, 60865], [38465, 60866], [27008, 60867],
  13254. [20646, 60868], [30022, 60869], [60870, 137069], [39386, 60871],
  13255. [21107, 60872], 60873, [37209, 60874], [38529, 60875], [37212, 60876],
  13256. 60877, [37201, 60878], [60879, 167575], [25471, 60880], [27338, 60882],
  13257. [22033, 60883], [37262, 60884], [30074, 60885], [25221, 60886],
  13258. [29519, 60888], [31856, 60889], [60890, 154657], 60892, [30422, 60894],
  13259. [39837, 60895], [20010, 60896], [60897, 134356], [33726, 60898],
  13260. [34882, 60899], 60900, [23626, 60901], [27072, 60902], 0, 0,
  13261. [21023, 60905], [24053, 60906], [20174, 60907], [27697, 60908],
  13262. [60909, 131570], [20281, 60910], [21660, 60911], 0, [21146, 60913],
  13263. [36226, 60914], [13822, 60915], 0, [13811, 60917], 60918, [27474, 60919],
  13264. [37244, 60920], [40869, 60921], [39831, 60922], [38958, 60923],
  13265. [39092, 60924], [39610, 60925], [40616, 60926], [40580, 60927],
  13266. [31508, 60929], 60930, [27642, 60931], [34840, 60932], [32632, 60933],
  13267. 60934, [22048, 60935], [60936, 173642], [36471, 60937], [40787, 60938],
  13268. 60939, [36308, 60940], [36431, 60941], [40476, 60942], [36353, 60943],
  13269. [25218, 60944], [60945, 164733], [36392, 60946], [36469, 60947],
  13270. [31443, 60948], [31294, 60950], [30936, 60951], [27882, 60952],
  13271. [35431, 60953], [30215, 60954], [40742, 60956], [27854, 60957],
  13272. [34774, 60958], [30147, 60959], [60960, 172722], [30803, 60961],
  13273. [36108, 60963], [29410, 60964], [29553, 60965], [35629, 60966],
  13274. [29442, 60967], [29937, 60968], [36075, 60969], [60970, 150203],
  13275. [34351, 60971], [24506, 60972], [34976, 60973], [17591, 60974], 60975,
  13276. [60977, 159237], 60978, [35454, 60979], [60980, 140571], 60981,
  13277. [24829, 60982], [30311, 60983], [39639, 60984], [40260, 60985],
  13278. [37742, 58859, 60986], [39823, 60987], [34805, 60988], 60989, 0,
  13279. [36087, 60991], [29484, 60992], [38689, 60993], [39856, 60994],
  13280. [13782, 60995], [29362, 60996], [19463, 60997], [31825, 60998],
  13281. [39242, 60999], [24921, 61001], [19460, 61002], [40598, 61003],
  13282. [24957, 61004], 61005, [22367, 61006], [24943, 61007], [25254, 61008],
  13283. [25145, 61009], 0, [14940, 61011], [25058, 61012], [21418, 61013],
  13284. [25444, 61015], [26626, 61016], [13778, 61017], [23895, 61018],
  13285. [36826, 61020], [61021, 167481], 61022, [20697, 61023], [30982, 61025],
  13286. [21298, 61026], [38456, 61027], [61028, 134971], [16485, 61029], 61030,
  13287. [30718, 61031], 61032, [31938, 61033], [61034, 155418], [31962, 61035],
  13288. [31277, 61036], [32870, 61037], [32867, 61038], [32077, 61039],
  13289. [29957, 61040], [29938, 61041], [35220, 61042], [33306, 61043],
  13290. [26380, 61044], [32866, 61045], [61046, 160902], [32859, 61047],
  13291. [29936, 61048], [33027, 61049], [30500, 61050], [35209, 61051],
  13292. [61052, 157644], [30035, 61053], [34729, 61055], [34766, 61056],
  13293. [33224, 61057], [34700, 61058], [35401, 61059], [36013, 61060],
  13294. [35651, 61061], [30507, 61062], [29944, 61063], [34010, 61064],
  13295. [27058, 61066], [36262, 61067], 61068, [35241, 58392, 61069], 0,
  13296. [28089, 61071], [34753, 61072], [61073, 147473], [29927, 61074],
  13297. [15835, 61075], [29046, 61076], [24740, 57702, 61077], [24988, 61078],
  13298. [15569, 61079], 0, [24695, 61081], 61082, [32625, 61083], 0,
  13299. [24809, 61086], [19326, 61087], [57344, 132423], [37595, 57345],
  13300. [57346, 132575], [57347, 147397], [34124, 57348], [17077, 57349],
  13301. [29679, 57350], [20917, 57351], [13897, 57352], [57353, 149826],
  13302. [57354, 166372], [37700, 57355], [57356, 137691], [33518, 57357],
  13303. [57358, 146632], [30780, 57359], [26436, 57360], [25311, 57361],
  13304. [57362, 149811], [57363, 166314], [57364, 131744], [57365, 158643],
  13305. [57366, 135941], [20395, 57367], [57368, 140525], [20488, 57369],
  13306. [57370, 159017], [57371, 162436], [57372, 144896], [57373, 150193],
  13307. [57374, 140563], 0, [57376, 131966], [24484, 57377], [57378, 131968],
  13308. [57379, 131911], [28379, 57380], [57381, 132127], 20702, [20737, 57383],
  13309. [13434, 57384], [20750, 57385], [39020, 57386], [14147, 57387],
  13310. [33814, 57388], [57389, 149924], [57390, 132231], [20832, 57391],
  13311. [57392, 144308], [20842, 57393], [57394, 134143], [57395, 139516],
  13312. [57396, 131813], [57397, 140592], [57398, 132494], [57399, 143923],
  13313. [57400, 137603], [23426, 57401], [34685, 57402], [57403, 132531],
  13314. [57404, 146585], [20914, 57405], [20920, 57406], [40244, 57407],
  13315. [20937, 57408], [20943, 57409], [20945, 57410], [15580, 57411],
  13316. [20947, 57412], [57413, 150182], [20915, 57414], 0, 0, [20973, 57417],
  13317. [33741, 57418], [26942, 57419], [57420, 145197], [24443, 57421],
  13318. [21003, 57422], [21030, 57423], [21052, 57424], [21173, 57425],
  13319. [21079, 57426], [21140, 57427], [21177, 57428], [21189, 57429],
  13320. [31765, 57430], [34114, 57431], [21216, 57432], [34317, 57433],
  13321. [57434, 158483], 0, [57436, 166622], [21833, 57437], [28377, 57438],
  13322. [57439, 147328], [57440, 133460], [57441, 147436], [21299, 57442], 0,
  13323. [57444, 134114], [27851, 57445], [57446, 136998], [26651, 57447],
  13324. [29653, 57448], [24650, 57449], [16042, 57450], [14540, 57451],
  13325. [57452, 136936], [29149, 57453], [17570, 57454], [21357, 57455],
  13326. [21364, 57456], [57457, 165547], [21374, 57458], 0, [57460, 136598],
  13327. [57461, 136723], [30694, 57462], [21395, 57463], [57464, 166555],
  13328. [21408, 57465], [21419, 57466], [21422, 57467], [29607, 57468],
  13329. [57469, 153458], [16217, 57470], [29596, 57471], [21441, 57472],
  13330. [21445, 57473], [27721, 57474], [20041, 57475], [22526, 57476],
  13331. [21465, 57477], [15019, 57478], [57479, 134031], [21472, 57480],
  13332. [57481, 147435], [57482, 142755], [21494, 57483], [57484, 134263],
  13333. [21523, 57485], [28793, 57486], [21803, 57487], [26199, 57488],
  13334. [27995, 57489], [21613, 57490], [57491, 158547], [57492, 134516],
  13335. [21853, 57493], [21647, 57494], [21668, 57495], [18342, 57496],
  13336. [57497, 136973], [57498, 134877], [15796, 57499], [57500, 134477],
  13337. [57501, 166332], [57502, 140952], [21831, 57503], [19693, 57504],
  13338. [21551, 57505], [29719, 57506], [21894, 57507], [21929, 57508], 0,
  13339. [57510, 137431], [57511, 147514], [17746, 57512], [57513, 148533],
  13340. [26291, 57514], [57515, 135348], [22071, 57516], [26317, 57517],
  13341. [57518, 144010], [26276, 57519], 0, [22093, 57521], [22095, 57522],
  13342. [30961, 57523], [22257, 57524], [38791, 57525], [21502, 57526],
  13343. [22272, 57527], [22255, 57528], [22253, 57529], [57530, 166758],
  13344. [13859, 57531], [57532, 135759], [22342, 57533], [57534, 147877],
  13345. [27758, 57535], [28811, 57536], [22338, 57537], [14001, 57538],
  13346. [57539, 158846], [22502, 57540], [57541, 136214], [22531, 57542],
  13347. [57543, 136276], [57544, 148323], [22566, 57545], [57546, 150517], 0,
  13348. [22698, 57548], [13665, 57549], [22752, 57550], [22748, 57551],
  13349. [57552, 135740], [22779, 57553], [23551, 57554], [22339, 57555],
  13350. [57556, 172368], [57557, 148088], [37843, 57558], [13729, 57559],
  13351. [22815, 57560], [26790, 57561], [14019, 57562], [28249, 57563],
  13352. [57564, 136766], [23076, 57565], 0, [57567, 136850], [34053, 57568],
  13353. [22985, 57569], [57570, 134478], [57571, 158849], [57572, 159018],
  13354. [57573, 137180], [23001, 57574], [57575, 137211], [57576, 137138],
  13355. [57577, 159142], [28017, 57578], [57579, 137256], [57580, 136917],
  13356. [23033, 57581], [57582, 159301], [23211, 57583], [23139, 57584],
  13357. [14054, 57585], [57586, 149929], 0, [14088, 57588], [23190, 57589],
  13358. [29797, 57590], [23251, 57591], [57592, 159649], [57593, 140628],
  13359. [57595, 137489], [14130, 57596], [57597, 136888], [24195, 57598],
  13360. [21200, 57599], [23414, 57600], [25992, 57601], [23420, 57602],
  13361. [57603, 162318], [16388, 57604], [18525, 57605], [57606, 131588],
  13362. [23509, 57607], [57609, 137780], [57610, 154060], [57611, 132517],
  13363. [23539, 57612], [23453, 57613], [19728, 57614], [23557, 57615],
  13364. [57616, 138052], [23571, 57617], [29646, 57618], [23572, 57619],
  13365. [57620, 138405], [57621, 158504], [23625, 57622], [18653, 57623],
  13366. [23685, 57624], [23785, 57625], [23791, 57626], [23947, 57627],
  13367. [57628, 138745], [57629, 138807], [23824, 57630], [23832, 57631],
  13368. [23878, 57632], [57633, 138916], [23738, 57634], [24023, 57635],
  13369. [33532, 57636], [14381, 57637], [57638, 149761], [57639, 139337],
  13370. [57640, 139635], [33415, 57641], [14390, 57642], [15298, 57643],
  13371. [24110, 57644], [27274, 57645], 0, 57647, [57648, 148668], [57649, 134355],
  13372. [21414, 57650], [20151, 57651], 0, [21416, 57653], [57654, 137073],
  13373. [24073, 57655], 57656, [57657, 164994], [24313, 57658], [24315, 57659],
  13374. [14496, 57660], [24316, 57661], [26686, 57662], [37915, 57663],
  13375. [24333, 57664], [57665, 131521], [57666, 194708], [15070, 57667],
  13376. [57669, 135994], [24378, 57670], [57671, 157832], [57672, 140240],
  13377. [57674, 140401], [24419, 57675], [57677, 159342], [24434, 57678],
  13378. [37696, 57679], [57680, 166454], [24487, 57681], [23990, 57682],
  13379. [15711, 57683], [57684, 152144], [57685, 139114], [57686, 159992],
  13380. [57687, 140904], [37334, 57688], [57689, 131742], [57690, 166441],
  13381. [24625, 57691], [26245, 57692], [14691, 57694], [15815, 57695],
  13382. [13881, 57696], [22416, 57697], [57698, 141236], [31089, 57699],
  13383. [15936, 57700], [24734, 57701], 0, 0, [57704, 149890], [57705, 149903],
  13384. [57706, 162387], [29860, 57707], [20705, 57708], [23200, 57709],
  13385. [24932, 57710], [24898, 57712], [57713, 194726], [57714, 159442],
  13386. [24961, 57715], [20980, 57716], [57717, 132694], [24967, 57718],
  13387. [23466, 57719], [57720, 147383], [57721, 141407], [25043, 57722],
  13388. [57723, 166813], [57724, 170333], [25040, 57725], [14642, 57726],
  13389. [57727, 141696], [57728, 141505], [24611, 57729], [24924, 57730],
  13390. [25886, 57731], [25483, 57732], [57733, 131352], [25285, 57734],
  13391. [57735, 137072], [25301, 57736], [57737, 142861], [25452, 57738],
  13392. [57739, 149983], [14871, 57740], [25656, 57741], [25592, 57742],
  13393. [57743, 136078], [57744, 137212], [28554, 57746], [57747, 142902], 0,
  13394. [57750, 153373], [25825, 57751], [25829, 57752], [38011, 57753],
  13395. [14950, 57754], [25658, 57755], [14935, 57756], [25933, 57757],
  13396. [28438, 57758], [57759, 150056], [57760, 150051], [25989, 57761],
  13397. [25965, 57762], [25951, 57763], 0, [26037, 57765], [57766, 149824],
  13398. [19255, 57767], [26065, 57768], [16600, 57769], [57770, 137257], 57771,
  13399. [26083, 57772], [24543, 57773], [57774, 144384], [26136, 57775],
  13400. [57776, 143863], [57777, 143864], [26180, 57778], [57779, 143780],
  13401. [57780, 143781], [26187, 57781], [57782, 134773], [26215, 57783],
  13402. [57784, 152038], [26227, 57785], 0, [57788, 143921], [57789, 165364],
  13403. [57790, 143816], [57791, 152339], [30661, 57792], [57793, 141559],
  13404. [39332, 57794], [26370, 57795], [57796, 148380], [57797, 150049],
  13405. [27130, 57799], [57800, 145346], 0, [26471, 57802], [26466, 57803],
  13406. [57804, 147917], [57805, 168173], [26583, 57806], [17641, 57807],
  13407. [26658, 57808], [28240, 57809], [37436, 57810], [26625, 57811],
  13408. [57812, 144358], [57813, 159136], [26717, 57814], [57815, 144495],
  13409. [27105, 57816], [27147, 57817], [57818, 166623], [26995, 57819],
  13410. [26819, 57820], [57821, 144845], [26881, 57822], [26880, 57823],
  13411. [14849, 57825], [57826, 144956], [15232, 57827], [26540, 57828],
  13412. [26977, 57829], [57830, 166474], [17148, 57831], [26934, 57832],
  13413. [27032, 57833], [15265, 57834], [57835, 132041], [33635, 57836],
  13414. [20624, 57837], [27129, 57838], [57839, 144985], [57840, 139562],
  13415. [27205, 57841], [57842, 145155], [27293, 57843], [15347, 57844],
  13416. [26545, 57845], [27336, 57846], [57847, 168348], [15373, 57848],
  13417. [27421, 57849], [57850, 133411], [24798, 57851, 60308], [27445, 57852],
  13418. [27508, 57853], [57854, 141261], [28341, 57855], [57856, 146139], 0,
  13419. [57858, 137560], [14144, 57859], [21537, 57860], [57861, 146266],
  13420. [27617, 57862], [57863, 147196], [27612, 57864], [27703, 57865],
  13421. [57866, 140427], [57867, 149745], [57868, 158545], [27738, 57869],
  13422. [33318, 57870], [27769, 57871], [57872, 146876], [17605, 57873],
  13423. [57874, 146877], [57875, 147876], [57876, 149772], [57877, 149760],
  13424. [57878, 146633], [14053, 57879], [15595, 57880], [57881, 134450],
  13425. [39811, 57882], [57883, 143865], [57884, 140433], [32655, 57885],
  13426. [26679, 57886], [57887, 159013], [57888, 159137], [57889, 159211],
  13427. [28054, 57890], [27996, 57891], [28284, 57892], [28420, 57893],
  13428. [57894, 149887], [57895, 147589], [57896, 159346], [34099, 57897],
  13429. [57898, 159604], [20935, 57899], 0, 0, [33838, 57902], [57903, 166689], 0,
  13430. [57905, 146991], [29779, 57906], [57907, 147330], [31180, 57908],
  13431. [28239, 57909], [23185, 57910], [57911, 143435], [28664, 57912],
  13432. [14093, 57913], [28573, 57914], [57915, 146992], [28410, 57916],
  13433. [57917, 136343], [57918, 147517], [17749, 57919], [37872, 57920],
  13434. [28484, 57921], [28508, 57922], [15694, 57923], [28532, 57924],
  13435. [57925, 168304], [15675, 57926], [28575, 57927], [57928, 147780],
  13436. [28627, 57929], [57930, 147601], [57931, 147797], [57932, 147513],
  13437. [57933, 147440], [57934, 147380], [57935, 147775], [20959, 57936],
  13438. [57937, 147798], [57938, 147799], [57939, 147776], [57940, 156125],
  13439. [28747, 57941], [28798, 57942], [28839, 57943], 0, [28876, 57945],
  13440. [28885, 57946], [28886, 57947], [28895, 57948], [16644, 57949],
  13441. [15848, 57950], [29108, 57951], [29078, 57952], [57953, 148087],
  13442. [28971, 57954], [28997, 57955], [23176, 57956], [29002, 57957], 0,
  13443. [57960, 148325], [29007, 57961], [37730, 57962], [57963, 148161],
  13444. [28972, 57964], [57965, 148570], [57966, 150055], [57967, 150050],
  13445. [29114, 57968], [57969, 166888], [28861, 57970], [29198, 57971],
  13446. [37954, 57972], [29205, 57973], [22801, 57974], [37955, 57975],
  13447. [29220, 57976], [37697, 57977], [57978, 153093], [29230, 57979],
  13448. [29248, 57980], [57981, 149876], [26813, 57982], [29269, 57983],
  13449. [29271, 57984], [15957, 57985], [57986, 143428], [26637, 57987],
  13450. [28477, 57988], [29314, 57989], 0, [29483, 57991], [57992, 149539],
  13451. [57993, 165931], [18669, 57994], [57995, 165892], [29480, 57996],
  13452. [29486, 57997], [29647, 57998], [29610, 57999], [58000, 134202],
  13453. [58001, 158254], [29641, 58002], [29769, 58003], [58004, 147938],
  13454. [58005, 136935], [58006, 150052], [26147, 58007], [14021, 58008],
  13455. [58009, 149943], [58010, 149901], [58011, 150011], [29687, 58012],
  13456. [29717, 58013], [26883, 58014], [58015, 150054], [29753, 58016],
  13457. [16087, 58018], 0, [58020, 141485], [29792, 58021], [58022, 167602],
  13458. [29767, 58023], [29668, 58024], [29814, 58025], [33721, 58026],
  13459. [29804, 58027], [29812, 58029], [37873, 58030], [27180, 58031],
  13460. [29826, 58032], [18771, 58033], [58034, 150156], [58035, 147807],
  13461. [58036, 150137], [58037, 166799], [23366, 58038], [58039, 166915],
  13462. [58040, 137374], [29896, 58041], [58042, 137608], [29966, 58043],
  13463. [29982, 58045], [58046, 167641], [58047, 137803], [23511, 58048],
  13464. [58049, 167596], [37765, 58050], [30029, 58051], [30026, 58052],
  13465. [30055, 58053], [30062, 58054], [58055, 151426], [16132, 58056],
  13466. [58057, 150803], [30094, 58058], [29789, 58059], [30110, 58060],
  13467. [30132, 58061], [30210, 58062], [30252, 58063], [30289, 58064],
  13468. [30287, 58065], [30319, 58066], 58067, [58068, 156661], [30352, 58069],
  13469. [33263, 58070], [14328, 58071], [58072, 157969], [58073, 157966],
  13470. [30369, 58074], [30373, 58075], [30391, 58076], [30412, 58077],
  13471. [58078, 159647], [33890, 58079], [58080, 151709], [58081, 151933],
  13472. [58082, 138780], [30494, 58083], [30502, 58084], [30528, 58085],
  13473. [25775, 58086], [58087, 152096], [30552, 58088], [58089, 144044],
  13474. [30639, 58090], [58091, 166244], [58092, 166248], [58093, 136897],
  13475. [30708, 58094], 0, [26826, 58098], [30895, 58099], [30919, 58100],
  13476. [30931, 58101], [38565, 58102], [31022, 58103], [58104, 153056],
  13477. [30935, 58105], [31028, 58106], [30897, 58107], [58108, 161292],
  13478. [36792, 58109], [34948, 58110], [58113, 140828], [31110, 58114],
  13479. [35072, 58115], [26882, 58116], [31104, 58117], [58118, 153687],
  13480. [31133, 58119], [58120, 162617], [31036, 58121], [31145, 58122],
  13481. [28202, 58123], [58124, 160038], [16040, 58125], [31174, 58126],
  13482. [58127, 168205], [31188, 58128], 0, [21797, 62526], 0, [62528, 134210],
  13483. [62529, 134421], [62530, 151851], [21904, 62531], [62532, 142534],
  13484. [14828, 62533], [62534, 131905], [36422, 62535], [62536, 150968],
  13485. [62537, 169189], 0, [62539, 164030], [30586, 62540], [62541, 142392],
  13486. [14900, 62542], [18389, 62543], [62544, 164189], [62545, 158194],
  13487. [62546, 151018], [25821, 62547], [62548, 134524], [62549, 135092],
  13488. [62550, 134357], 0, [25741, 62552], [36478, 62553], [62554, 134806], 0,
  13489. [62556, 135012], [62557, 142505], [62558, 164438], [62559, 148691], 0,
  13490. [62561, 134470], [62562, 170573], [62563, 164073], [18420, 62564],
  13491. [62565, 151207], [62566, 142530], [39602, 62567], [14951, 62568],
  13492. [62569, 169460], [16365, 62570], [13574, 62571], [62572, 152263],
  13493. [62573, 169940], 0, [62575, 142660], [40302, 62576], [38933, 62577], 0,
  13494. [17369, 62579], 0, [25780, 62581], [21731, 62582], 0, [62584, 142282], 0,
  13495. [14843, 62586], 0, [62588, 157402], [62589, 157462], [62590, 162208],
  13496. [25834, 62591], [62592, 151634], [62593, 134211], [36456, 62594], 0,
  13497. [62596, 166732], [62597, 132913], 0, [18443, 62599], [62600, 131497],
  13498. [16378, 62601], [22643, 62602], [62603, 142733], 0, [62605, 148936],
  13499. [62606, 132348], [62607, 155799], [62608, 134988], 0, [21881, 62610], 0,
  13500. [17338, 62612], 0, [19124, 62614], [62615, 141926], [62616, 135325],
  13501. [33194, 62617], [39157, 62618], [62619, 134556], [25465, 62620],
  13502. [14846, 62621], [62622, 141173], [36288, 62623], [22177, 62624],
  13503. [25724, 62625], [15939, 62626], 0, [62628, 173569], [62629, 134665],
  13504. [62630, 142031], 0, 0, [62633, 135368], [62634, 145858], [14738, 62635],
  13505. [14854, 62636], [62637, 164507], [13688, 62638], [62639, 155209],
  13506. [62640, 139463], 0, 0, [62643, 142514], [62644, 169760], [13500, 62645],
  13507. [27709, 62646], [62647, 151099], 0, 0, [62650, 161140], [62651, 142987],
  13508. [62652, 139784], [62653, 173659], [62654, 167117], [62655, 134778],
  13509. [62656, 134196], [62683, 161337], [62684, 142286], [62687, 142417],
  13510. [14872, 62689], [62691, 135367], [62693, 173618], [62695, 167122],
  13511. [62696, 167321], [62697, 167114], [38314, 62698], 0, [62706, 161630],
  13512. [28992, 62708], 0, [20822, 62385], 0, [20616, 62487], 0, [13459, 62489],
  13513. [20870, 62491], [24130, 63037], [20997, 62495], [21031, 62436],
  13514. [21113, 62497], 0, [13651, 62504], [21442, 62505], [21343, 62715], 0,
  13515. [21823, 62520], 0, [21976, 59986], [13789, 62722], [22049, 63067], 0,
  13516. [22100, 60044], [60148, 135291], 0, [60153, 135379], 0, [61095, 135934], 0,
  13517. 0, [14265, 60104], [23745, 61099], [23829, 63066], [23894, 63030],
  13518. [14392, 63036], [20097, 62477], [24253, 63038], [14612, 63042],
  13519. [25017, 63050], [25232, 63054], [25368, 63056], [25690, 63063],
  13520. [25745, 62381], [33133, 62709], [33156, 59922], [33171, 59924],
  13521. [26624, 63080], [15292, 63093], [29327, 60517], [29389, 59781], 0,
  13522. [29497, 59785], [30018, 59811], [30172, 59817], [16320, 59818],
  13523. [60278, 151205], [16343, 59820], 0, 30336, [30348, 59824, 151388],
  13524. [16552, 59845], [30777, 59846], [16643, 59855], [31377, 59863],
  13525. [31771, 59876], [31981, 59884], [32659, 62658], [32686, 59892], 0,
  13526. [33535, 59936], [22623, 59981], [34482, 59960], 0, [34699, 59963],
  13527. [35143, 59969], 0, [35369, 59972], 0, [36465, 59988], [60484, 164233],
  13528. [36528, 59990], 0, [37214, 62443], [37260, 62441], [39182, 60051],
  13529. [39196, 60054], 0, 0, [39809, 60066], [40384, 60080], [40339, 60078],
  13530. [40620, 60085], [19857, 60540], 0, 37818, [40571, 60084], [28809, 63148],
  13531. [29512, 59788], 0, [31129, 59858], [36791, 59997], 0, [39234, 60056],
  13532. {s: 193}, 8364, {s: 4}, [12443, 63518], [12444, 63519], [11904, 63520],
  13533. {f: 5, c: 62211}, [62216, 131340], 62217, [62218, 131281], [62219, 131277],
  13534. {f: 2, c: 62220}, [62222, 131275], [62223, 139240], 62224, [62225, 131274],
  13535. {f: 4, c: 62226}, [62230, 131342], {f: 2, c: 62231}, {f: 2, c: 62776},
  13536. [62778, 138177], [62779, 194680], [12205, 38737, 62780], [62781, 131206],
  13537. [20059, 62782], [20155, 62783], [13630, 62784], [23587, 62785],
  13538. [24401, 62786], [24516, 62787], [14586, 62788], [25164, 62789],
  13539. [25909, 62790], [27514, 62791], [27701, 62792], [27706, 62793],
  13540. [28780, 62794], [29227, 62795], [20012, 62796], [29357, 62797],
  13541. [62798, 149737], [32594, 62799], [31035, 62800], [31993, 62801],
  13542. [32595, 62802], [62803, 156266], [13505, 62804], [62806, 156491],
  13543. [32770, 62807], [32896, 62808], [62809, 157202], [62810, 158033],
  13544. [21341, 62811], [34916, 62812], [35265, 62813], [62814, 161970],
  13545. [35744, 62815], [36125, 62816], [38021, 62817], [38264, 62818],
  13546. [38271, 62819], [38376, 62820], [62821, 167439], [38886, 62822],
  13547. [39029, 62823], [39118, 62824], [39134, 62825], [39267, 62826],
  13548. [62827, 170000], [40060, 62828], [40479, 62829], [40644, 62830],
  13549. [27503, 62831], [62832, 63751], [20023, 62833], [62834, 131207],
  13550. [38429, 62835], [25143, 62836], [38050, 62837], [11908, 63521],
  13551. [11910, 63522], [11911, 63523], [11912, 63524], [11914, 63525],
  13552. [11916, 63526], [11917, 63527], [11925, 63528], [11932, 63529],
  13553. [11941, 63531], [11943, 63532], [11946, 63533], [11948, 63534],
  13554. [11950, 63535], [11958, 63536], [11964, 63537], [11966, 63538],
  13555. [11978, 63540], [11980, 63541], [11981, 63542], [11983, 63543],
  13556. [11990, 63544], [11991, 63545], [11998, 63546], [62368, 172969],
  13557. [62369, 135493], [25866, 62371], [20029, 62374], [28381, 62375],
  13558. [40270, 62376], [37343, 62377], [62380, 161589], [20250, 62382],
  13559. [20264, 62383], [20392, 62384], [20852, 62386], [20892, 62387],
  13560. [20964, 62388], [21153, 62389], [21160, 62390], [21307, 62391],
  13561. [21326, 62392], [21457, 62393], [21464, 62394], [22242, 62395],
  13562. [22768, 62396], [22788, 62397], [22791, 62398], [22834, 62399],
  13563. [22836, 62400], [23398, 62401], [23454, 62402], [23455, 62403],
  13564. [23706, 62404], [24198, 62405], [24635, 62406], [25993, 62407],
  13565. [26622, 62408], [26628, 62409], [26725, 62410], [27982, 62411],
  13566. [28860, 62412], [30005, 62413], [32420, 62414], [32428, 62415],
  13567. [32442, 62416], [32455, 62417], [32463, 62418], [32479, 62419],
  13568. [32518, 62420], [32567, 62421], [33402, 62422], [33487, 62423],
  13569. [33647, 62424], [35270, 62425], [35774, 62426], [35810, 62427],
  13570. [36710, 62428], [36711, 62429], [36718, 62430], [29713, 62431],
  13571. [31996, 62432], [32205, 62433], [26950, 62434], [31433, 62435],
  13572. [30904, 62442], [32956, 62444], [36107, 62446], [33014, 62447],
  13573. [62448, 133607], [32927, 62451], [40647, 62452], [19661, 62453],
  13574. [40393, 62454], [40460, 62455], [19518, 62456], [62457, 171510],
  13575. [62458, 159758], [40458, 62459], [62460, 172339], [13761, 62461],
  13576. [28314, 62463], [33342, 62464], [29977, 62465], [18705, 62467],
  13577. [39532, 62468], [39567, 62469], [40857, 62470], [31111, 62471],
  13578. [62472, 164972], [62473, 138698], [62474, 132560], [62475, 142054],
  13579. [20004, 62476], [20096, 62478], [20103, 62479], [20159, 62480],
  13580. [20203, 62481], [20279, 62482], [13388, 62483], [20413, 62484],
  13581. [15944, 62485], [20483, 62486], [13437, 62488], [13477, 62490],
  13582. [22789, 62492], [20955, 62493], [20988, 62494], [20105, 62496],
  13583. [21136, 62498], [21287, 62499], [13767, 62500], [21417, 62501],
  13584. [13649, 62502], [21424, 62503], [21539, 62506], [13677, 62507],
  13585. [13682, 62508], [13953, 62509], [21651, 62510], [21667, 62511],
  13586. [21684, 62512], [21689, 62513], [21712, 62514], [21743, 62515],
  13587. [21784, 62516], [21795, 62517], [21800, 62518], [13720, 62519],
  13588. [13733, 62521], [13759, 62522], [21975, 62523], [13765, 62524],
  13589. [62525, 163204], [16467, 62538], [62551, 135412], [62555, 134155],
  13590. [62574, 161992], [62580, 155813], [62583, 142668], [62585, 135287],
  13591. [62587, 135279], [62595, 139681], [62609, 134550], [16571, 62611],
  13592. [62631, 142537], [22098, 62641], [62642, 134961], [62657, 157724],
  13593. [62659, 135375], [62660, 141315], [62661, 141625], [13819, 62662],
  13594. [62663, 152035], [62664, 134796], [62665, 135053], [62666, 134826],
  13595. [16275, 62667], [62668, 134960], [62669, 134471], [62670, 135503],
  13596. [62671, 134732], [62673, 134827], [62674, 134057], [62675, 134472],
  13597. [62676, 135360], [62677, 135485], [16377, 62678], [62679, 140950],
  13598. [25650, 62680], [62681, 135085], [62682, 144372], [62685, 134526],
  13599. [62686, 134527], [62688, 142421], [62690, 134808], [62692, 134958],
  13600. [62694, 158544], [21708, 62699], [33476, 62700], [21945, 62701],
  13601. [62703, 171715], [39974, 62704], [39606, 62705], [62707, 142830],
  13602. [33004, 62710], [23580, 62711], [62712, 157042], [33076, 62713],
  13603. [14231, 62714], [62716, 164029], [37302, 62717], [62718, 134906],
  13604. [62719, 134671], [62720, 134775], [62721, 134907], [62723, 151019],
  13605. [13833, 62724], [62725, 134358], [22191, 62726], [62727, 141237],
  13606. [62728, 135369], [62729, 134672], [62730, 134776], [62731, 135288],
  13607. [62732, 135496], [62733, 164359], [62734, 136277], [62735, 134777],
  13608. [62736, 151120], [62737, 142756], [23124, 62738], [62739, 135197],
  13609. [62740, 135198], [62741, 135413], [62742, 135414], [22428, 62743],
  13610. [62744, 134673], [62745, 161428], [62746, 164557], [62747, 135093],
  13611. [62748, 134779], [62749, 151934], [14083, 62750], [62751, 135094],
  13612. [62752, 135552], [62753, 152280], [62754, 172733], [62755, 149978],
  13613. [62756, 137274], [62757, 147831], [62758, 164476], [22681, 62759],
  13614. [21096, 62760], [13850, 62761], [62762, 153405], [31666, 62763],
  13615. [23400, 62764], [18432, 62765], [19244, 62766], [40743, 62767],
  13616. [18919, 62768], [39967, 62769], [39821, 62770], [62771, 154484],
  13617. [62772, 143677], [22011, 62773], [13810, 62774], [22153, 62775],
  13618. [23870, 63028], [23880, 63029], [15868, 63031], [14351, 63032],
  13619. [23972, 63033], [23993, 63034], [14368, 63035], [24357, 63039],
  13620. [24451, 63040], [14600, 63041], [14655, 63043], [14669, 63044],
  13621. [24791, 63045], [24893, 63046], [23781, 63047], [14729, 63048],
  13622. [25015, 63049], [25039, 63051], [14776, 63052], [25132, 63053],
  13623. [25317, 63055], [14840, 63057], [22193, 63058], [14851, 63059],
  13624. [25570, 63060], [25595, 63061], [25607, 63062], [14923, 63064],
  13625. [25792, 63065], [40863, 63068], [14999, 63069], [25990, 63070],
  13626. [15037, 63071], [26111, 63072], [26195, 63073], [15090, 63074],
  13627. [26258, 63075], [15138, 63076], [26390, 63077], [15170, 63078],
  13628. [26532, 63079], [15192, 63081], [26698, 63082], [26756, 63083],
  13629. [15218, 63084], [15217, 63085], [15227, 63086], [26889, 63087],
  13630. [26947, 63088], [29276, 63089], [26980, 63090], [27039, 63091],
  13631. [27013, 63092], [27094, 63094], [15325, 63095], [27237, 63096],
  13632. [27252, 63097], [27249, 63098], [27266, 63099], [15340, 63100],
  13633. [27289, 63101], [15346, 63102], [27307, 63103], [27317, 63104],
  13634. [27348, 63105], [27382, 63106], [27521, 63107], [27585, 63108],
  13635. [27626, 63109], [27765, 63110], [27818, 63111], [15563, 63112],
  13636. [27906, 63113], [27910, 63114], [27942, 63115], [28033, 63116],
  13637. [15599, 63117], [28068, 63118], [28081, 63119], [28181, 63120],
  13638. [28184, 63121], [28201, 63122], [28294, 63123], [63124, 166336],
  13639. [28347, 63125], [28386, 63126], [28378, 63127], [40831, 63128],
  13640. [28392, 63129], [28393, 63130], [28452, 63131], [28468, 63132],
  13641. [15686, 63133], [63134, 147265], [28545, 63135], [28606, 63136],
  13642. [15722, 63137], [15733, 63138], [29111, 63139], [23705, 63140],
  13643. [15754, 63141], [28716, 63142], [15761, 63143], [28752, 63144],
  13644. [28756, 63145], [28783, 63146], [28799, 63147], [63149, 131877],
  13645. [17345, 63150], [13809, 63151], [63152, 134872], [13902, 58134],
  13646. [15789, 58172], [58173, 154725], [26237, 58183], [31860, 58188],
  13647. [29837, 58197], [32402, 58215], [17667, 58232], [58260, 151480],
  13648. [58270, 133901], [58277, 158474], [13438, 58311], [58317, 143087],
  13649. [58325, 146613], [58343, 159385], [34673, 58364], [25537, 58385],
  13650. [30583, 58387], [35210, 58390], [58406, 147343], [35660, 58415],
  13651. [58440, 150729], [18730, 58464], [58471, 172052], [58472, 165564],
  13652. [58473, 165121], [15088, 58490], [28815, 58511], [58529, 140922],
  13653. [58637, 158120], [58646, 148043], [26760, 58662], [58664, 139611],
  13654. [40802, 58702], [37830, 58793], [58802, 131967], [37734, 58888],
  13655. [37519, 58901], [34324, 58954], [58986, 173147], [16784, 59010],
  13656. [26511, 59045], [26654, 59048], [14435, 59051], [59077, 149996],
  13657. [15129, 59128], [33942, 59176], [59241, 149858], [14818, 59254],
  13658. [33920, 59259], [17262, 59328], [38769, 59402], [39323, 59427],
  13659. [18733, 59499], [28439, 59703], [59704, 160009], [28838, 59746],
  13660. [59752, 150095], [32357, 59753], [23855, 59755], [15859, 59756],
  13661. [59758, 150109], [59759, 137183], [32164, 59760], [33830, 59761],
  13662. [21637, 59762], [59763, 146170], [59765, 131604], [22398, 59766],
  13663. [59767, 133333], [59768, 132633], [16357, 59769], [59770, 139166],
  13664. [59771, 172726], [28675, 59772], [59773, 168283], [23920, 59774],
  13665. [29583, 59775], [59777, 166489], [59778, 168992], [20424, 59779],
  13666. [32743, 59780], [29456, 59782], [29496, 59784], [29505, 59787],
  13667. [16041, 59789], [29173, 59792], [59793, 149746], [29665, 59794],
  13668. [16074, 59796], [16081, 59798], [29721, 59801], [29726, 59802],
  13669. [29727, 59803], [16098, 59804], [16112, 59805], [16116, 59806],
  13670. [16122, 59807], [29907, 59808], [16142, 59809], [16211, 59810],
  13671. [30061, 59812], [30066, 59813], [30093, 59814], [16252, 59815],
  13672. [30152, 59816], [30285, 59819], [30324, 59821], [16348, 59822],
  13673. [30330, 59823], [29064, 59825], [22051, 59826], [35200, 59827],
  13674. [16413, 59829], [30531, 59830], [16441, 59831], [16453, 59833],
  13675. [13787, 59834], [30616, 59835], [16490, 59836], [16495, 59837],
  13676. [30654, 59839], [30667, 59840], [30744, 59842], [30748, 59844],
  13677. [30791, 59847], [30801, 59848], [30822, 59849], [33864, 59850],
  13678. [59851, 152885], [31027, 59852], [31026, 59854], [16649, 59856],
  13679. [31121, 59857], [31238, 59860], [16743, 59862], [16818, 59864],
  13680. [31420, 59865], [33401, 59866], [16836, 59867], [31439, 59868],
  13681. [31451, 59869], [16847, 59870], [31586, 59872], [31596, 59873],
  13682. [31611, 59874], [31762, 59875], [16992, 59877], [17018, 59878],
  13683. [31867, 59879], [31900, 59880], [17036, 59881], [31928, 59882],
  13684. [17044, 59883], [36755, 59885], [28864, 59886], [59887, 134351],
  13685. [32207, 59888], [32212, 59889], [32208, 59890], [32253, 59891],
  13686. [32692, 59893], [29343, 59894], [17303, 59895], [32800, 59896],
  13687. [32805, 59897], [32814, 59899], [32817, 59900], [32852, 59901],
  13688. [22452, 59903], [28832, 59904], [32951, 59905], [33001, 59906],
  13689. [17389, 59907], [33036, 59908], [33038, 59910], [33042, 59911],
  13690. [33044, 59913], [17409, 59914], [15161, 59915], [33110, 59916],
  13691. [33113, 59917], [33114, 59918], [17427, 59919], [33148, 59921],
  13692. [17445, 59923], [17453, 59925], [33189, 59926], [22511, 59927],
  13693. [33217, 59928], [33252, 59929], [33364, 59930], [17551, 59931],
  13694. [33398, 59933], [33482, 59934], [33496, 59935], [17584, 59937],
  13695. [33623, 59938], [38505, 59939], [33797, 59941], [28917, 59942],
  13696. [33892, 59943], [33928, 59945], [17668, 59946], [33982, 59947],
  13697. [34017, 59948], [34040, 59949], [34064, 59950], [34104, 59951],
  13698. [34130, 59952], [17723, 59953], [34159, 59954], [34160, 59955],
  13699. [34272, 59956], [17783, 59957], [34418, 59958], [34450, 59959],
  13700. [34543, 59961], [38469, 59962], [17926, 59964], [17943, 59965],
  13701. [34990, 59966], [35071, 59967], [35108, 59968], [35217, 59970],
  13702. [59971, 162151], [35384, 59973], [35476, 59974], [35508, 59975],
  13703. [35921, 59976], [36052, 59977], [36082, 59978], [36124, 59979],
  13704. [18328, 59980], [36291, 59982], [18413, 59983], [36410, 59985],
  13705. [22356, 59987], [22005, 59989], [18487, 59991], [36558, 59992],
  13706. [36578, 59993], [36580, 59994], [36589, 59995], [36594, 59996],
  13707. [36801, 59998], [36810, 59999], [36812, 60000], [36915, 60001],
  13708. [18605, 60003], [39136, 60004], [37395, 60005], [18718, 60006],
  13709. [37416, 60007], [37464, 60008], [37483, 60009], [37553, 60010],
  13710. [37550, 60011], [37567, 60012], [37603, 60013], [37611, 60014],
  13711. [37619, 60015], [37620, 60016], [37629, 60017], [37699, 60018],
  13712. [37764, 60019], [37805, 60020], [18757, 60021], [18769, 60022],
  13713. [37911, 60024], [37917, 60026], [37933, 60027], [37950, 60028],
  13714. [18794, 60029], [37972, 60030], [38009, 60031], [38189, 60032],
  13715. [38306, 60033], [18855, 60034], [38388, 60035], [38451, 60036],
  13716. [18917, 60037], [18980, 60039], [38720, 60040], [18997, 60041],
  13717. [38834, 60042], [38850, 60043], [19172, 60045], [39097, 60047],
  13718. [19225, 60048], [39153, 60049], [22596, 60050], [39193, 60052],
  13719. [39223, 60055], [39261, 60057], [39266, 60058], [19312, 60059],
  13720. [39365, 60060], [19357, 60061], [39484, 60062], [39695, 60063],
  13721. [39785, 60065], [39901, 60067], [39921, 60068], [39924, 60069],
  13722. [19565, 60070], [39968, 60071], [14191, 60072], [60073, 138178],
  13723. [40265, 60074], [40702, 60076], [22096, 60077], [40381, 60079],
  13724. [40444, 60081], [38134, 60082], [36790, 60083], [40625, 60086],
  13725. [40637, 60087], [40646, 60088], [38108, 60089], [40674, 60090],
  13726. [40689, 60091], [40696, 60092], [40772, 60094], [60095, 131220],
  13727. [60096, 131767], [60097, 132000], [38083, 60099], [60101, 132311],
  13728. [38081, 60103], [60105, 132565], [60106, 132629], [60107, 132726],
  13729. [60108, 136890], [22359, 60109], [29043, 60110], [60111, 133826],
  13730. [60112, 133837], [60113, 134079], [60115, 194619], [60116, 134091],
  13731. [21662, 60117], [60118, 134139], [60119, 134203], [60120, 134227],
  13732. [60121, 134245], [60122, 134268], [60124, 134285], [60126, 134325],
  13733. [60127, 134365], [60128, 134381], [60129, 134511], [60130, 134578],
  13734. [60131, 134600], [60135, 134660], [60136, 134670], [60137, 134871],
  13735. [60138, 135056], [60139, 134957], [60140, 134771], [60142, 135100],
  13736. [60144, 135260], [60145, 135247], [60146, 135286], [60149, 135304],
  13737. [60150, 135318], [13895, 60151], [60152, 135359], [60154, 135471],
  13738. [60155, 135483], [21348, 60156], [60158, 135907], [60159, 136053],
  13739. [60160, 135990], [60162, 136567], [60163, 136729], [60164, 137155],
  13740. [60165, 137159], [28859, 60167], [60168, 137261], [60169, 137578],
  13741. [60170, 137773], [60171, 137797], [60172, 138282], [60173, 138352],
  13742. [60174, 138412], [60175, 138952], [60177, 138965], [60178, 139029],
  13743. [29080, 60179], [60181, 139333], [27113, 60182], [14024, 60183],
  13744. [60184, 139900], [60185, 140247], [60186, 140282], [60187, 141098],
  13745. [60188, 141425], [60189, 141647], [60191, 141671], [60192, 141715],
  13746. [60193, 142037], [60195, 142056], [60197, 142094], [60199, 142143],
  13747. [60202, 142412], [60204, 142472], [60205, 142519], [60206, 154600],
  13748. [60207, 142600], [60208, 142610], [60209, 142775], [60210, 142741],
  13749. [60211, 142914], [60212, 143220], [60213, 143308], [60214, 143411],
  13750. [60215, 143462], [60216, 144159], [60217, 144350], [60222, 144743],
  13751. [60223, 144883], [60227, 144922], [60228, 145174], [22709, 60231],
  13752. [60234, 146087], [60237, 146961], [60238, 147129], [60243, 147737],
  13753. [60245, 148206], [60246, 148237], [60248, 148276], [60249, 148374],
  13754. [60258, 148484], [60259, 148694], [22408, 60260], [60261, 149108],
  13755. [60263, 149295], [60271, 149522], [60272, 149755], [60273, 150037],
  13756. [60275, 150208], [22885, 60277], [60279, 151430], [60282, 151596],
  13757. [22335, 60284], [60286, 152217], [60287, 152601], [60291, 152646],
  13758. [60292, 152686], [60296, 152895], [60298, 152926], [60300, 152930],
  13759. [60301, 152934], [60302, 153543], [60304, 153693], [60309, 153859],
  13760. [60312, 154286], [60313, 154505], [60314, 154630], [22433, 60316],
  13761. [29009, 60317], [60319, 155906], [60322, 156082], [60325, 156674],
  13762. [60326, 156746], [60330, 156804], [60334, 156808], [60336, 156946],
  13763. [60338, 157119], [60339, 157365], [22201, 60347], [60349, 157436],
  13764. [13848, 60355], [60357, 157593], [60358, 157806], [60360, 157790],
  13765. [60362, 157895], [60366, 157990], [60368, 158009], [60371, 158202],
  13766. [60373, 158253], [60378, 158260], [60379, 158555], [60383, 158621],
  13767. [60385, 158884], [60388, 159150], [60392, 159819], [60393, 160205],
  13768. [60395, 160384], [60396, 160389], [60399, 160395], [60401, 160486],
  13769. [38047, 60404], [60405, 160848], [14009, 60416], [60424, 161740],
  13770. [60425, 161880], [22230, 60426], [60435, 162269], [60441, 162301],
  13771. [60442, 162314], [60443, 162571], [60444, 163174], [60448, 163849],
  13772. [60459, 163875], [60463, 163912], [60466, 163971], [60479, 163984],
  13773. [60480, 164084], [60481, 164142], [60483, 164175], [60485, 164271],
  13774. [60486, 164378], [60487, 164614], [60488, 164655], [60489, 164746],
  13775. [60491, 164968], [60492, 165546], [25574, 60494], [60495, 166230],
  13776. [60498, 166328], [60500, 166375], [60502, 166376], [60503, 166726],
  13777. [60504, 166868], [60506, 166921], [60508, 167877], [60509, 168172],
  13778. [60511, 168208], [60512, 168252], [15863, 60513], [60514, 168286],
  13779. [60515, 150218], [36816, 60516], [60519, 169191], [60521, 169392],
  13780. [60522, 169400], [60523, 169778], [60524, 170193], [60525, 170313],
  13781. [60526, 170346], [60527, 170435], [60528, 170536], [60529, 170766],
  13782. [60530, 171354], [60531, 171419], [32415, 60532], [60533, 171768],
  13783. [60534, 171811], [19620, 60535], [38215, 60536], [60537, 172691],
  13784. [29090, 60538], [60539, 172799], [60542, 173515], [19868, 60543],
  13785. [60544, 134300], [36798, 60545], [36794, 60547], [60548, 140464],
  13786. [36793, 60549], [60550, 150163], [20202, 60555], [60557, 166700],
  13787. [36480, 60560], [60561, 137205], [60563, 166764], [60564, 166809],
  13788. [60566, 157359], [60568, 161365], [60570, 153141], [60571, 153942],
  13789. [20122, 60572], [60573, 155265], [60576, 134765], [60579, 147080],
  13790. [60580, 150686], [60583, 137206], [60584, 137339], [60587, 154698],
  13791. [60589, 152337], [15814, 60590], [60596, 155352], [19996, 60600],
  13792. [60601, 135146], [60602, 134473], [60603, 145082], [60638, 151880],
  13793. [21982, 60644], [34694, 60672], [60676, 135361], [60679, 149254],
  13794. [23440, 60680], [60682, 157843], [60684, 141044], [60685, 163119],
  13795. [60686, 147875], [60687, 163187], [60688, 159440], [60689, 160438],
  13796. [60691, 135641], [60693, 146684], [60694, 173737], [60695, 134828],
  13797. [60698, 138402], [60700, 151490], [60702, 135147], [60706, 142752],
  13798. [60710, 135148], [60711, 134666], [60714, 135149], [60717, 135559],
  13799. [19994, 60721], [19972, 60722], [23309, 60724], [13996, 60727],
  13800. [21373, 60729], [13989, 60730], [22682, 60732], [60733, 150382],
  13801. [22442, 60736], [60737, 154261], [60738, 133497], [60741, 140389],
  13802. [60746, 146686], [60747, 171824], [60749, 151465], [60750, 169374],
  13803. [60753, 146870], [60755, 157619], [60756, 145184], [60759, 147191],
  13804. [60760, 146988], [60785, 143578], [60789, 135849], [22439, 60790],
  13805. [60791, 149859], [60794, 159918], [60801, 137068], [60806, 160100],
  13806. [60809, 159010], [60810, 150242], [39963, 60837], [60838, 149822],
  13807. [15878, 60846], [60881, 159011], [60887, 132092], [60891, 146685],
  13808. [60893, 149785], [22394, 60904], [21722, 60912], [29050, 60928],
  13809. [60949, 150135], [60955, 166490], [60962, 194624], [60976, 137275],
  13810. [61000, 155993], [61014, 144373], [61019, 166850], [61024, 138566],
  13811. [61054, 159441], [13877, 61065], [61084, 166701], [21024, 61088],
  13812. [15384, 61089], [61090, 146631], [61091, 155351], [61092, 161366],
  13813. [61093, 152881], [61094, 137540], [61096, 170243], [61097, 159196],
  13814. [61098, 159917], [61100, 156077], [61101, 166415], [61102, 145015],
  13815. [61103, 131310], [61104, 157766], [61105, 151310], [17762, 61106],
  13816. [23327, 61107], [61108, 156492], [40784, 61109], [40614, 61110],
  13817. [61111, 156267], [20962, 57415], [21314, 57416], [26285, 57520],
  13818. [22620, 57547], [21843, 57566], [15749, 57594], [24928, 57608],
  13819. [18606, 57668], [38845, 57676], [57693, 137335], [24755, 57703],
  13820. [33828, 57711], [38932, 57748], [57749, 147596], [57764, 143486],
  13821. [57787, 138813], [15147, 57798], [15666, 57824], [57857, 132021],
  13822. [28801, 57944], [23708, 57959], [58017, 132547], [14128, 58028],
  13823. [58096, 136054], [58097, 150034], [58111, 166699], [58112, 155779],
  13824. [256, 62233], [193, 62234], [461, 62235], [192, 62236], [274, 62237],
  13825. [201, 62238], [282, 62239], [200, 62240], [332, 62241], [211, 62242],
  13826. [465, 62243], [210, 62244], 62245, [7870, 62246], 62247, [7872, 62248],
  13827. [202, 62249], [257, 62250], [225, 62251], [462, 62252], [224, 62253],
  13828. [593, 62254], [275, 62255], [233, 62256], [283, 62257], [232, 62258],
  13829. [299, 62259], [237, 62260], [464, 62261], [236, 62262], [333, 62263],
  13830. [243, 62264], [466, 62265], [242, 62266], [363, 62267], [250, 62268],
  13831. [468, 62269], [249, 62270], [470, 62271], [472, 62272], [474, 62273],
  13832. [476, 62274], [252, 62275], 62276, [7871, 62277], 62278, [7873, 62279],
  13833. [234, 62280], [609, 62281], [643, 63551], [592, 63552], [603, 63553],
  13834. [596, 63554], [629, 63555], [339, 63556], [248, 63557], [331, 63558],
  13835. [650, 63559], [618, 63560], {f: 2, c: 62282}, [11933, 63530],
  13836. [11974, 63539], [12003, 63547], 20539, 28158, [62841, 171123], 62842,
  13837. [15817, 62843], 34959, [62845, 147790], 28791, 23797, [19232, 62848],
  13838. [62849, 152013], [13657, 62850], [62851, 154928], 24866, [62853, 166450],
  13839. 36775, 37366, 29073, 26393, 29626, [62859, 144001], [62860, 172295],
  13840. [15499, 62861], [62862, 137600], [19216, 62863], 30948, 29698, 20910,
  13841. [62867, 165647], [16393, 62868], 27235, [62870, 172730], [16931, 62871],
  13842. 34319, 31274, [62875, 170311], [62876, 166634], 38741, 28749, 21284,
  13843. [62880, 139390], 37876, 30425, [62883, 166371], 62884, 30685, 20131, 20464,
  13844. 20668, 20015, 20247, 62891, 21556, 32139, 22674, 22736, [62896, 138678],
  13845. 24210, 24217, 24514, [62900, 141074], 25995, [62902, 144377], 26905, 27203,
  13846. [62905, 146531], 27903, 29184, [62909, 148741], 29580, [16091, 62911],
  13847. [62912, 150035], 23317, 29881, 35715, [62916, 154788], [62917, 153237],
  13848. 31379, 31724, 31939, 32364, 33528, 34199, 62924, 34960, 62926, 36537,
  13849. 62928, 36815, 34143, 39392, 37409, 62933, [62934, 167353], [62935, 136255],
  13850. [16497, 62936], [17058, 62937], 23066, 39016, 26475, [17014, 62944], 22333,
  13851. 34262, [62948, 149883], 33471, [62950, 160013], [19585, 62951],
  13852. [62952, 159092], 23931, [62954, 158485], [62955, 159678], {f: 2, c: 62956},
  13853. 23446, 62959, 32347],
  13854. 'Adobe-GB1': [{f: 95, c: 32}, {f: 3, c: 12288}, [183, 12539], 713, 711, 168,
  13855. 12291, 12293, 8212, 65374, 8214, [8230, 8943], {f: 2, c: 8216},
  13856. {f: 2, c: 8220}, {f: 2, c: 12308}, {f: 8, c: 12296}, {f: 2, c: 12310},
  13857. {f: 2, c: 12304}, 177, 215, 247, 8758, {f: 2, c: 8743}, 8721, 8719, 8746,
  13858. 8745, 8712, 8759, 8730, 8869, 8741, 8736, 8978, 8857, 8747, 8750, 8801,
  13859. 8780, 8776, 8765, 8733, 8800, {f: 2, c: 8814}, {f: 2, c: 8804}, 8734, 8757,
  13860. 8756, 9794, 9792, 176, {f: 2, c: 8242}, 8451, 65284, 164, {f: 2, c: 65504},
  13861. 8240, 167, 8470, 9734, 9733, 9675, 9679, 9678, 9671, 9670, 9633, 9632,
  13862. 9651, 9650, 8251, 8594, {f: 2, c: 8592}, 8595, 12307, {f: 20, c: 9352},
  13863. {f: 20, c: 9332}, {f: 10, c: 9312}, {f: 10, c: 12832}, {f: 12, c: 8544},
  13864. {f: 3, c: 65281}, 65509, {f: 89, c: 65285}, 65507, {f: 83, c: 12353},
  13865. {f: 86, c: 12449}, {f: 17, c: 913}, {f: 7, c: 931}, {f: 17, c: 945},
  13866. {f: 7, c: 963}, {f: 7, c: 59277}, {f: 2, c: 65077}, {f: 2, c: 65081},
  13867. {f: 2, c: 65087}, {f: 2, c: 65085}, {f: 4, c: 65089}, {f: 2, c: 59284},
  13868. {f: 2, c: 65083}, {f: 2, c: 65079}, 65073, 59286, {f: 2, c: 65075},
  13869. {f: 6, c: 1040}, 1025, {f: 32, c: 1046}, 1105, {f: 26, c: 1078}, 257, 225,
  13870. 462, 224, 275, 233, 283, 232, 299, 237, 464, 236, 333, 243, 466, 242, 363,
  13871. 250, 468, 249, 470, 472, 474, 476, 252, 234, 593, 7743, 324, 328, 505, 609,
  13872. {f: 37, c: 12549}, 0, {f: 76, c: 9472}, {s: 126}, 21834, 38463, 22467,
  13873. 25384, 21710, 21769, 21696, 30353, 30284, 34108, 30702, 33406, 30861,
  13874. 29233, 38552, 38797, 27688, 23433, 20474, 25353, 26263, 23736, 33018,
  13875. 26696, 32942, 26114, 30414, 20985, 25942, 29100, 32753, 34948, 20658,
  13876. 22885, 25034, 28595, 33453, 25420, 25170, 21485, 21543, 31494,
  13877. [12043, 20843], 30116, 24052, 25300, 36299, 38774, 25226, 32793, 22365,
  13878. 38712, 32610, 29240, [12137, 30333], 26575, 30334, 25670, 20336, 36133,
  13879. 25308, 31255, 26001, 29677, 25644, 25203, 33324, 39041, 26495, 29256,
  13880. 25198, 25292, 20276, 29923, 21322, 21150, 32458, 37030, 24110, 26758,
  13881. 27036, 33152, 32465, 26834, 30917, 34444, 38225, 20621, 35876, 33502,
  13882. 32990, 21253, 35090, 21093, 34180, 38649, 20445, 22561, 39281, 23453,
  13883. 25265, 25253, 26292, 35961, 40077, 29190, 26479, 30865, 24754, 21329,
  13884. 21271, 36744, 32972, 36125, 38049, 20493, 29384, 22791, 24811, 28953,
  13885. 34987, 22868, 33519, 26412, 31528, 23849, 32503, 29997, 27893, 36454,
  13886. 36856, 36924, [12240, 40763], [12112, 27604], 37145, 31508, 24444, 30887,
  13887. 34006, 34109, 27605, 27609, 27606, 24065, 24199, 30201, 38381, 25949,
  13888. 24330, 24517, 36767, 22721, 33218, 36991, 38491, 38829, 36793, 32534,
  13889. 36140, 25153, 20415, 21464, 21342, {f: 2, c: 36776}, 36779, 36941, 26631,
  13890. 24426, 33176, 34920, 40150, 24971, 21035, 30250, 24428, 25996, 28626,
  13891. 28392, 23486, 25672, 20853, 20912, 26564, 19993, 31177, 39292, 28851,
  13892. 30149, 24182, 29627, 33760, 25773, 25320, 38069, 27874, 21338, 21187,
  13893. 25615, 38082, 31636, 20271, 24091, 33334, 33046, 33162, 28196, 27850,
  13894. 39539, 25429, [12056, 21340], 21754, 34917, 22496, 19981, 24067, 27493,
  13895. 31807, 37096, 24598, 25830, 29468, 35009, 26448, 25165, 36130, 30572,
  13896. 36393, 37319, 24425, 33756, 34081, 39184, 21442, 34453, 27531, 24813,
  13897. 24808, 28799, 33485, 33329, 20179, 27815, 34255, 25805, 31961, 27133,
  13898. 26361, 33609, 21397, 31574, 20391, 20876, 27979, 23618, 36461, 25554,
  13899. 21449, 33580, 33590, 26597, 30900, 25661, 23519, 23700, 24046, 35815,
  13900. 25286, 26612, 35962, 25600, 25530, 34633, 39307, 35863, 32544, 38130,
  13901. 20135, 38416, 39076, 26124, 29462, 22330, 23581, 24120, 38271, 20607,
  13902. 32928, [12058, 21378], 25950, 30021, 21809, 20513, 36229, 25220, 38046,
  13903. 26397, 22066, 28526, 24034, 21557, 28818, 36710, 25199, 25764, 25507,
  13904. 24443, 28552, 37108, [12162, 33251], [12192, 36784], 23576, 26216, 24561,
  13905. 27785, 38472, 36225, 34924, 25745, 31216, 22478, 27225, 25104, 21576,
  13906. 20056, 31243, 24809, 28548, 35802, 25215, 36894, 39563, 31204, 21507,
  13907. 30196, 25345, 21273, 27744, 36831, 24347, 39536, 32827, 40831, 20360,
  13908. 23610, [12186, 36196], 32709, 26021, 28861, 20805, 20914, [12173, 34411],
  13909. 23815, 23456, 25277, 37228, 30068, 36364, 31264, 24833, 31609, 20167,
  13910. 32504, 30597, 19985, 33261, 21021, 20986, 27249, 21416, 36487, 38148,
  13911. 38607, 28353, 38500, 26970, 30784, 20648, 30679, 25616, 35302, 22788,
  13912. 25571, 24029, 31359, 26941, 20256, 33337, 21912, 20018, 30126, 31383,
  13913. 24162, 24202, 38383, 21019, 21561, 28810, 25462, 38180, 22402, 26149,
  13914. 26943, 37255, 21767, 28147, 32431, 34850, 25139, 32496, 30133, 33576,
  13915. 30913, 38604, 36766, 24904, 29943, 35789, 27492, 21050, 36176, 27425,
  13916. 32874, 33905, 22257, 21254, 20174, 19995, 20945, 31895, 37259, 31751,
  13917. 20419, 36479, 31713, 31388, 25703, 23828, 20652, 33030, 30209, 31929,
  13918. 28140, 32736, 26449, 23384, [12072, 23544], 30923, 25774, 25619, 25514,
  13919. 25387, 38169, 25645, 36798, 31572, 30249, 25171, [12068, 22823], 21574,
  13920. [12109, 27513], 20643, 25140, 24102, 27526, 20195, 36151, 34955, 24453,
  13921. 36910, 24608, 32829, 25285, 20025, 21333, 37112, 25528, 32966, 26086,
  13922. 27694, 20294, 24814, 28129, 35806, 24377, 34507, 24403, 25377, 20826,
  13923. 33633, 26723, [12049, 20992], 25443, 36424, 20498, 23707, 31095, 23548,
  13924. 21040, 31291, 24764, 36947, 30423, 24503, 24471, 30340, 36460, 28783,
  13925. 30331, 31561, 30634, 20979, 37011, 22564, 20302, 28404, 36842, 25932,
  13926. 31515, 29380, 28068, 32735, 23265, 25269, 24213, 22320, 33922, 31532,
  13927. 24093, 24351, 36882, 32532, 39072, 25474, 28359, 30872, 28857, 20856,
  13928. 38747, 22443, 30005, 20291, 30008, 24215, 24806, 22880, 28096, 27583,
  13929. 30857, 21500, 38613, 20939, 20993, 25481, 21514, 38035, 35843, 36300,
  13930. 29241, 30879, 34678, 36845, 35853, 21472, 19969, 30447, 21486, 38025,
  13931. 39030, [12237, 40718], 38189, 23450, 35746, 20002, 19996, 20908, 33891,
  13932. 25026, 21160, 26635, 20375, 24683, 20923, 27934, 20828, 25238,
  13933. [12099, 26007], 38497, [12182, 35910], 36887, 30168, 37117, 30563, 27602,
  13934. 29322, 29420, 35835, 22581, 30585, 36172, 26460, 38208, 32922, 24230,
  13935. 28193, 22930, 31471, 30701, 38203, 27573, 26029, 32526, 22534, 20817,
  13936. 38431, 23545, 22697, 21544, 36466, 25958, 39039, 22244, 38045, 30462,
  13937. 36929, 25479, 21702, 22810, 22842, 22427, 36530, 26421, 36346, 33333,
  13938. 21057, 24816, 22549, 34558, 23784, 40517, 20420, 39069, 35769, 23077,
  13939. 24694, 21380, 25212, 36943, 37122, 39295, 24681, [12157, 32780],
  13940. [12041, 20799], [12159, 32819], 23572, 39285, 27953, [12038, 20108], 36144,
  13941. 21457, 32602, 31567, 20240, 20047, 38400, 27861, 29648, 34281, 24070,
  13942. 30058, 32763, 27146, 30718, 38034, 32321, 20961, 28902, 21453, 36820,
  13943. 33539, 36137, 29359, 39277, 27867, 22346, 33459, [12101, 26041], 32938,
  13944. 25151, 38450, 22952, 20223, 35775, 32442, 25918, 33778, [12206, 38750],
  13945. 21857, 39134, 32933, 21290, 35837, 21536, 32954, 24223, 27832, 36153,
  13946. 33452, 37210, 21545, 27675, 20998, 32439, 22367, 28954, 27774, 31881,
  13947. 22859, 20221, 24575, 24868, 31914, 20016, 23553, 26539, 34562, 23792,
  13948. 38155, 39118, 30127, 28925, 36898, 20911, 32541, 35773, 22857, 20964,
  13949. 20315, 21542, 22827, 25975, 32932, 23413, 25206, 25282, 36752, 24133,
  13950. 27679, 31526, 20239, 20440, 26381, 28014, 28074, 31119, 34993, 24343,
  13951. 29995, 25242, 36741, 20463, 37340, 26023, 33071, 33105, 24220, 33104,
  13952. 36212, 21103, 35206, 36171, 22797, 20613, 20184, [12201, 38428],
  13953. [12119, 29238], 33145, 36127, 23500, 35747, 38468, 22919, 32538, 21648,
  13954. 22134, 22030, 35813, 25913, 27010, 38041, 30422, 28297, [12082, 24178],
  13955. [12130, 29976], 26438, 26577, 31487, 32925, 36214, 24863, 31174, 25954,
  13956. 36195, 20872, 21018, 38050, 32568, 32923, 32434, 23703, 28207, 26464,
  13957. 31705, 30347, [12220, 39640], 33167, 32660, 31957, 25630, 38224, 31295,
  13958. 21578, 21733, 27468, 25601, [12093, 25096], 40509, 33011, 30105, 21106,
  13959. [12208, 38761], 33883, 26684, 34532, 38401, 38548, 38124, 20010, 21508,
  13960. 32473, 26681, 36319, 32789, 26356, 24218, 32697, 22466, 32831, 26775,
  13961. [12079, 24037], 25915, 21151, 24685, 40858, 20379, 36524, 20844, 23467,
  13962. [12088, 24339], 24041, 27742, 25329, 36129, 20849, 38057, 21246, 27807,
  13963. 33503, 29399, 22434, 26500, 36141, 22815, 36764, 33735, 21653, 31629,
  13964. 20272, 27837, 23396, 22993, [12238, 40723], 21476, 34506, [12219, 39592],
  13965. [12181, 35895], 32929, 25925, 39038, 22266, 38599, 21038, [12128, 29916],
  13966. 21072, 23521, 25346, 35074, 20054, 25296, 24618, 26874, 20851, 23448,
  13967. 20896, 35266, 31649, 39302, 32592, 24815, 28748, 36143, 20809,
  13968. [12084, 24191], 36891, 29808, 35268, 22317, 30789, 24402, 40863, 38394,
  13969. 36712, [12225, 39740], 35809, 30328, 26690, 26588, 36330, 36149, 21053,
  13970. 36746, 28378, 26829, 38149, 37101, 22269, 26524, 35065, 36807, 21704,
  13971. 39608, 23401, 28023, 27686, 20133, 23475, 39559, 37219, 25000, 37039,
  13972. 38889, 21547, 28085, 23506, 20989, 21898, 32597, 32752, 25788, 25421,
  13973. 26097, 25022, 24717, 28938, 27735, 27721, 22831, 26477, 33322, 22741,
  13974. 22158, 35946, 27627, 37085, 22909, 32791, 21495, 28009, 21621, 21917,
  13975. 33655, 33743, 26680, [12146, 31166], 21644, 20309, 21512, 30418, 35977,
  13976. 38402, 27827, 28088, 36203, 35088, 40548, 36154, 22079, [12234, 40657],
  13977. 30165, 24456, 29408, 24680, 21756, 20136, 27178, 34913, 24658, 36720,
  13978. 21700, 28888, 34425, 40511, 27946, 23439, 24344, 32418, 21897, 20399,
  13979. 29492, 21564, 21402, 20505, 21518, 21628, 20046, 24573, 29786, 22774,
  13980. 33899, 32993, 34676, 29392, 31946, 28246, 24359, 34382, 21804, 25252,
  13981. 20114, 27818, 25143, 33457, 21719, 21326, 29502, 28369, 30011, 21010,
  13982. 21270, 35805, 27088, 24458, 24576, 28142, 22351, 27426, 29615, 26707,
  13983. 36824, 32531, 25442, 24739, 21796, 30186, 35938, 28949, 28067, 23462,
  13984. 24187, 33618, 24908, 40644, 30970, 34647, 31783, 30343, 20976, 24822,
  13985. 29004, 26179, 24140, 24653, 35854, 28784, 25381, 36745, 24509, 24674,
  13986. 34516, 22238, 27585, 24724, 24935, 21321, 24800, 26214, 36159, 31229,
  13987. 20250, 28905, 27719, 35763, 35826, 32472, 33636, 26127, 23130, 39746,
  13988. 27985, 28151, 35905, 27963, 20249, [12117, 28779], 33719, 25110, 24785,
  13989. 38669, 36135, 31096, 20987, 22334, 22522, 26426, 30072, 31293, 31215,
  13990. 31637, 32908, 39269, 36857, 28608, 35749, 40481, 23020, 32489, 32521,
  13991. 21513, 26497, 26840, 36753, 31821, 38598, 21450, 24613, 30142, 27762,
  13992. 21363, 23241, 32423, 25380, [12047, 20960], 33034, [12080, 24049], 34015,
  13993. 25216, 20864, 23395, 20238, 31085, 21058, 24760, 27982, 23492, 23490,
  13994. 35745, 35760, 26082, 24524, 38469, 22931, 32487, 32426, 22025, 26551,
  13995. 22841, 20339, 23478, 21152, 33626, 39050, 36158, 30002, 38078, 20551,
  13996. 31292, 20215, 26550, 39550, 23233, 27516, 30417, 22362, 23574, 31546,
  13997. 38388, 29006, 20860, 32937, 33392, 22904, 32516, 33575, 26816, 26604,
  13998. 30897, 30839, 25315, 25441, 31616, 20461, 21098, 20943, 33616, 27099,
  13999. 37492, 36341, 36145, 35265, 38190, 31661, 20214, 20581, 33328, 21073,
  14000. 39279, 28176, 28293, 28071, 24314, 20725, 23004, 23558, 27974, 27743,
  14001. 30086, 33931, 26728, 22870, 35762, 21280, 37233, 38477, 34121, 26898,
  14002. 30977, 28966, 33014, 20132, 37066, 27975, 39556, 23047, 22204, 25605,
  14003. 38128, 30699, 20389, 33050, 29409, [12179, 35282], 39290, 32564, 32478,
  14004. 21119, 25945, 37237, 36735, 36739, 21483, 31382, 25581, 25509, 30342,
  14005. 31224, 34903, 38454, 25130, 21163, 33410, 26708, 26480, 25463, 30571,
  14006. 31469, 27905, 32467, 35299, 22992, 25106, 34249, 33445, 30028, 20511,
  14007. 20171, 30117, 35819, 23626, [12081, 24062], 31563, [12100, 26020],
  14008. [12198, 37329], 20170, 27941, 35167, 32039, 38182, 20165, 35880, 36827,
  14009. 38771, 26187, 31105, 36817, 28908, 28024, 23613, 21170, 33606, 20834,
  14010. 33550, 30555, 26230, 40120, 20140, 24778, 31934, 31923, 32463, 20117,
  14011. 35686, 26223, 39048, 38745, 22659, 25964, 38236, 24452, 30153, 38742,
  14012. 31455, 31454, 20928, 28847, 31384, 25578, 31350, 32416, 29590,
  14013. [12210, 38893], 20037, 28792, 20061, 37202, 21417, 25937, 26087,
  14014. [12165, 33276], 33285, 21646, 23601, 30106, 38816, 25304, 29401, 30141,
  14015. 23621, 39545, 33738, 23616, 21632, 30697, 20030, 27822, 32858, 25298,
  14016. 25454, 24040, 20855, 36317, 36382, 38191, 20465, 21477, 24807, 28844,
  14017. 21095, 25424, 40515, 23071, 20518, 30519, 21367, 32482, 25733, 25899,
  14018. 25225, 25496, 20500, 29237, 35273, 20915, 35776, 32477, 22343, 33740,
  14019. 38055, 20891, 21531, 23803, 20426, 31459, 27994, 37089, 39567, 21888,
  14020. 21654, 21345, 21679, 24320, 25577, 26999, 20975, 24936, 21002, 22570,
  14021. 21208, 22350, 30733, 30475, 24247, 24951, 31968, 25179, 25239, 20130,
  14022. 28821, 32771, 25335, 28900, 38752, 22391, 33499, 26607, 26869, 30933,
  14023. 39063, 31185, 22771, 21683, 21487, 28212, 20811, 21051, 23458, 35838,
  14024. 32943, 21827, 22438, 24691, 22353, 21549, 31354, 24656, 23380, 25511,
  14025. 25248, [12061, 21475], 25187, 23495, 26543, 21741, 31391, 33510, 37239,
  14026. 24211, 35044, 22840, 22446, 25358, 36328, 33007, 22359, 31607, 20393,
  14027. 24555, 23485, 27454, 21281, 31568, 29378, 26694, 30719, 30518, 26103,
  14028. 20917, 20111, 30420, 23743, 31397, 33909, 22862, 39745, 20608, 39304,
  14029. 24871, 28291, 22372, 26118, 25414, 22256, 25324, 25193, 24275, 38420,
  14030. 22403, 25289, 21895, 34593, 33098, 36771, 21862, 33713, 26469, 36182,
  14031. 34013, 23146, 26639, 25318, 31726, 38417, 20848, 28572, 35888, 25597,
  14032. 35272, 25042, 32518, 28866, 28389, 29701, 27028, 29436, 24266, 37070,
  14033. 26391, 28010, 25438, 21171, 29282, [12156, 32769], 20332, 23013, 37226,
  14034. 28889, 28061, 21202, 20048, 38647, 38253, 34174, 30922, 32047, 20769,
  14035. 22418, 25794, 32907, 31867, 27882, 26865, 26974, 20919, 21400, 26792,
  14036. 29313, 40654, 31729, 29432, 31163, 28435, 29702, 26446, [12197, 37324],
  14037. 40100, 31036, 33673, 33620, 21519, 26647, 20029, 21385, 21169, 30782,
  14038. 21382, 21033, 20616, 20363, 20432, 30178, [12148, 31435], 31890, 27813,
  14039. [12202, 38582], [12050, 21147], 29827, 21737, 20457, 32852, 33714, 36830,
  14040. 38256, 24265, 24604, 28063, 24088, 25947, 33080, 38142, 24651, 28860,
  14041. 32451, 31918, 20937, 26753, 31921, 33391, 20004, 36742, 37327, 26238,
  14042. 20142, 35845, 25769, 32842, 20698, 30103, 29134, 23525, 36797, 28518,
  14043. 20102, 25730, 38243, 24278, 26009, 21015, 35010, 28872, 21155, 29454,
  14044. 29747, 26519, 30967, 38678, 20020, 37051, 40158, 28107, 20955, 36161,
  14045. 21533, 25294, 29618, 33777, 38646, 40836, 38083, 20278, 32666, 20940,
  14046. 28789, 38517, 23725, 39046, 21478, 20196, 28316, 29705, 27060, 30827,
  14047. 39311, 30041, 21016, 30244, 27969, 26611, 20845, 40857, 32843, 21657,
  14048. 31548, 31423, 38534, 22404, 25314, 38471, 27004, 23044, 25602, 31699,
  14049. 28431, 38475, 33446, 21346, 39045, 24208, 28809, 25523, 21348, 34383,
  14050. 40065, 40595, 30860, 38706, 36335, 36162, [12229, 40575], 28510, 31108,
  14051. 24405, 38470, 25134, 39540, 21525, 38109, 20387, 26053, 23653, 23649,
  14052. 32533, 34385, 27695, 24459, 29575, 28388, 32511, 23782, 25371, 23402,
  14053. 28390, 21365, 20081, 25504, 30053, 25249, 36718, 20262, 20177, 27814,
  14054. 32438, 35770, 33821, 34746, 32599, 36923, 38179, 31657, 39585, 35064,
  14055. 33853, 27931, 39558, 32476, 22920, [12231, 40635], 29595, 30721, 34434,
  14056. 39532, 39554, 22043, 21527, 22475, 20080, 40614, 21334, 36808, 33033,
  14057. 30610, 39314, 34542, 28385, 34067, 26364, 24930, 28459, 35881, 33426,
  14058. 33579, 30450, 27667, 24537, 33725, 29483, 33541, 38170, [12113, 27611],
  14059. [12141, 30683], 38086, 21359, 33538, 20882, 24125, 35980, 36152, 20040,
  14060. 29611, 26522, 26757, 37238, 38665, 29028, 27809, 30473, 23186, 38209,
  14061. 27599, 32654, 26151, 23504, 22969, 23194, 38376, 38391, 20204, 33804,
  14062. 33945, 27308, 30431, 38192, 29467, 26790, 23391, 30511, 37274, 38753,
  14063. 31964, 36855, 35868, 24357, [12150, 31859], 31192, 35269, 27852, 34588,
  14064. 23494, 24130, 26825, 30496, 32501, 20885, 20813, 21193, 23081, 32517,
  14065. [12207, 38754], 33495, 25551, 30596, 34256, 31186, 28218, 24217, 22937,
  14066. 34065, 28781, 27665, 25279, [12139, 30399], 25935, 24751, 38397, 26126,
  14067. 34719, 40483, 38125, 21517, 21629, 35884, {f: 2, c: 25720}, 34321, 27169,
  14068. 33180, 30952, 25705, 39764, 25273, 26411, 33707, 22696, 40664, 27819,
  14069. 28448, 23518, 38476, 35851, 29279, 26576, 25287, 29281, 20137, 22982,
  14070. 27597, 22675, 26286, 24149, 21215, 24917, [12106, 26408], [12140, 30446],
  14071. 30566, 29287, 31302, 25343, 21738, 21584, 38048, 37027, 23068, 32435,
  14072. 27670, 20035, 22902, 32784, 22856, 21335, 30007, 38590, 22218, 25376,
  14073. 33041, 24700, 38393, 28118, 21602, 39297, 20869, 23273, 33021, 22958,
  14074. 38675, 20522, 27877, 23612, 25311, 20320, 21311, 33147, 36870, 28346,
  14075. 34091, 25288, 24180, 30910, 25781, 25467, 24565, 23064, 37247, 40479,
  14076. 23615, 25423, 32834, 23421, 21870, 38218, 38221, 28037, 24744, 26592,
  14077. 29406, 20957, 23425, 25319, 27870, [12124, 29275], 25197, 38062, 32445,
  14078. 33043, 27987, 20892, 24324, 22900, 21162, 24594, [12069, 22899], 26262,
  14079. 34384, 30111, 25386, 25062, 31983, 35834, 21734, 27431, 40485, 27572,
  14080. 34261, 21589, 20598, 27812, 21866, 36276, 29228, 24085, 24597, 29750,
  14081. 25293, 25490, 29260, 24472, 28227, 27966, 25856, 28504, 30424, 30928,
  14082. 30460, 30036, 21028, 21467, 20051, 24222, 26049, 32810, 32982, 25243,
  14083. 21638, 21032, 28846, 34957, 36305, 27873, 21624, 32986, 22521, 35060,
  14084. 36180, 38506, 37197, 20329, 27803, 21943, 30406, 30768, 25256, 28921,
  14085. 28558, 24429, 34028, 26842, 30844, 31735, 33192, 26379, 40527, 25447,
  14086. 30896, 22383, 30738, 38713, 25209, 25259, 21128, 29749, 27607, 21860,
  14087. 33086, 30130, [12138, 30382], 21305, 30174, 20731, 23617, 35692, 31687,
  14088. 20559, [12122, 29255], 39575, 39128, 28418, 29922, 31080, 25735, 30629,
  14089. 25340, 39057, 36139, 21697, 32856, 20050, 22378, 33529, 33805, 24179,
  14090. 20973, 29942, 35780, 23631, 22369, 27900, 39047, 23110, 30772, 39748,
  14091. 36843, 31893, 21078, 25169, 38138, 20166, 33670, 33889, 33769, 33970,
  14092. 22484, 26420, 22275, 26222, 28006, 35889, 26333, 28689, 26399, 27450,
  14093. 26646, 25114, 22971, 19971, 20932, 28422, 26578, 27791, 20854, 26827,
  14094. 22855, 27495, 30054, 23822, 33040, 40784, 26071, 31048, 31041, 39569,
  14095. 36215, 23682, 20062, 20225, 21551, 22865, 30732, 22120, [12115, 27668],
  14096. 36804, 24323, 27773, 27875, 35755, 25488, 24688, 27965, 29301, 25190,
  14097. 38030, 38085, 21315, 36801, 31614, 20191, 35878, 20094, 40660, 38065,
  14098. 38067, 21069, 28508, 36963, 27973, 35892, 22545, 23884, [12107, 27424],
  14099. 27465, 26538, 21595, 33108, 32652, 22681, 34103, 24378, 25250, 27207,
  14100. 38201, 25970, 24708, 26725, 30631, 20052, 20392, 24039, 38808, 25772,
  14101. 32728, 23789, 20431, 31373, 20999, 33540, 19988, 24623, 31363, 38054,
  14102. 20405, 20146, 31206, 29748, 21220, 33465, 25810, 31165, 23517, 27777,
  14103. 38738, 36731, 27682, 20542, 21375, 28165, 25806, 26228, 27696, 24773,
  14104. 39031, 35831, 24198, 29756, 31351, 31179, 19992, 37041, 29699, 27714,
  14105. 22234, 37195, 27845, 36235, 21306, 34502, 26354, 36527, 23624, 39537,
  14106. 28192, 21462, 23094, 40843, 36259, 21435, 22280, 39079, 26435, 37275,
  14107. 27849, 20840, 30154, 25331, [12125, 29356], 21048, 21149, 32570, 28820,
  14108. 30264, 21364, 40522, 27063, 30830, 38592, 35033, 32676, 28982, 29123,
  14109. 20873, 26579, 29924, 22756, 25880, 22199, 35753, 39286, 25200, 32469,
  14110. 24825, 28909, 22764, 20161, [12040, 20154], 24525, 38887, 20219, 35748,
  14111. 20995, 22922, 32427, 25172, 20173, [12103, 26085], 25102, 33592, 33993,
  14112. 33635, 34701, 29076, 28342, 23481, 32466, 20887, 25545, 26580,
  14113. [12161, 32905], 33593, 34837, 20754, 23418, 22914, 36785, 20083, 27741,
  14114. [12042, 20837], 35109, 36719, 38446, 34122, 29790, 38160, 38384, 28070,
  14115. 33509, 24369, 25746, 27922, 33832, 33134, 40131, 22622, 36187, 19977,
  14116. 21441, 20254, 25955, 26705, 21971, 20007, 25620, 39578, 25195, 23234,
  14117. 29791, [12170, 33394], 28073, 26862, 20711, 33678, 30722, 26432, 21049,
  14118. 27801, 32433, 20667, 21861, 29022, 31579, 26194, 29642, 33515, 26441,
  14119. [12077, 23665], 21024, 29053, 34923, 38378, 38485, 25797, 36193, 33203,
  14120. 21892, 27733, 25159, 32558, 22674, 20260, 21830, 36175, 26188, 19978,
  14121. 23578, 35059, 26786, 25422, 31245, 28903, 33421, 21242, 38902, 23569,
  14122. 21736, 37045, 32461, 22882, 36170, 34503, [12166, 33292], 33293, 36198,
  14123. 25668, 23556, 24913, 28041, 31038, 35774, 30775, 30003, 21627, 20280,
  14124. [12189, 36523], 28145, 23072, 32453, 31070, 27784, 23457, 23158, 29978,
  14125. 32958, 24910, 28183, 22768, [12131, 29983], 29989, 29298, 21319, 32499,
  14126. 30465, 30427, 21097, 32988, 22307, 24072, 22833, 29422, 26045, 28287,
  14127. 35799, [12075, 23608], 34417, [12055, 21313], [12143, 30707], 25342, 26102,
  14128. 20160, [12215, 39135], 34432, 23454, 35782, 21490, [12142, 30690], 20351,
  14129. 23630, 39542, 22987, 24335, [12144, 31034], [12064, 22763], 19990, 26623,
  14130. 20107, 25325, 35475, 36893, 21183, 26159, 21980, 22124, 36866, 20181,
  14131. 20365, 37322, 39280, [12114, 27663], 24066, 24643, 23460, 35270, 35797,
  14132. 25910, [12095, 25163], [12216, 39318], 23432, 23551, 25480, 21806, 21463,
  14133. 30246, 20861, 34092, 26530, 26803, 27530, 25234, 36755, 21460, 33298,
  14134. 28113, 30095, 20070, 36174, 23408, 29087, 34223, 26257, 26329, 32626,
  14135. 34560, [12233, 40653], [12239, 40736], 23646, 26415, 36848, 26641, 26463,
  14136. 25101, 31446, 22661, 24246, 25968, 28465, 24661, 21047, 32781, 25684,
  14137. 34928, 29993, 24069, 26643, 25332, 38684, 21452, 29245, 35841,
  14138. [12116, 27700], 30561, 31246, 21550, 30636, 39034, 33308, 35828, 30805,
  14139. 26388, 28865, 26031, 25749, 22070, 24605, 31169, 21496, 19997, 27515,
  14140. 32902, 23546, 21987, 22235, 20282, 20284, 39282, 24051, 26494, 32824,
  14141. 24578, 39042, 36865, 23435, 35772, 35829, 25628, 33368, 25822, 22013,
  14142. 33487, 37221, 20439, 32032, 36895, 31903, 20723, 22609, 28335, 23487,
  14143. 35785, 32899, 37240, 33948, 31639, 34429, 38539, 38543, 32485, 39635,
  14144. 30862, 23681, 31319, 36930, 38567, 31071, 23385, 25439, 31499, 34001,
  14145. 26797, 21766, 32553, 29712, 32034, 38145, 25152, 22604, 20182, 23427,
  14146. 22905, 22612, 29549, 25374, 36427, 36367, 32974, 33492, 25260, 21488,
  14147. 27888, 37214, 22826, 24577, 27760, 22349, 25674, 36138, 30251, 28393,
  14148. 22363, 27264, 30192, 28525, 35885, 35848, 22374, 27631, 34962, 30899,
  14149. 25506, 21497, 28845, 27748, 22616, 25642, 22530, 26848, 33179, 21776,
  14150. 31958, 20504, 36538, 28108, 36255, 28907, 25487, 28059, 28372, 32486,
  14151. 33796, 26691, 36867, 28120, 38518, 35752, 22871, 29305, 34276, 33150,
  14152. 30140, 35466, 26799, 21076, 36386, 38161, 25552, 39064, 36420, 21884,
  14153. 20307, 26367, 22159, 24789, 28053, 21059, 23625, 22825, 28155, 22635,
  14154. [12133, 30000], 29980, 24684, 33300, 33094, 25361, 26465, 36834, 30522,
  14155. 36339, 36148, 38081, 24086, 21381, 21548, 28867, 27712, 24311, 20572,
  14156. 20141, 24237, 25402, 33351, 36890, 26704, 37230, 30643, 21516, 38108,
  14157. 24420, 31461, 26742, 25413, 31570, 32479, 30171, 20599, 25237, 22836,
  14158. 36879, 20984, 31171, 31361, 22270, 24466, 36884, 28034, 23648,
  14159. [12063, 22303], 21520, 20820, 28237, 22242, 25512, 39059, 33151, 34581,
  14160. 35114, 36864, 21534, 23663, 33216, 25302, 25176, 33073, 40501, 38464,
  14161. 39534, 39548, 26925, 22949, 25299, 21822, 25366, 21703, 34521, 27964,
  14162. 23043, [12129, 29926], 34972, 27498, 22806, 35916, 24367, 28286, 29609,
  14163. 39037, 20024, 28919, 23436, 30871, 25405, 26202, 30358, 24779, 23451,
  14164. 23113, 19975, 33109, 27754, 29579, 20129, 26505, [12153, 32593], 24448,
  14165. 26106, 26395, 24536, 22916, 23041, 24013, 24494, 21361, 38886, 36829,
  14166. 26693, 22260, 21807, 24799, 20026, 28493, 32500, 33479, 33806, 22996,
  14167. 20255, 20266, 23614, 32428, 26410, 34074, 21619, 30031, 32963, 21890,
  14168. 39759, 20301, 28205, 35859, 23561, 24944, 21355, 30239, 28201, 34442,
  14169. [12098, 25991], 38395, 32441, 21563, 31283, 32010, 38382, 21985, 32705,
  14170. 29934, 25373, 34583, 28065, 31389, 25105, 26017, 21351, 25569, 27779,
  14171. 24043, 21596, 38056, 20044, 27745, 35820, 23627, [12102, 26080], 33436,
  14172. 26791, 21566, 21556, [12111, 27595], 27494, 20116, 25410, 21320, 33310,
  14173. 20237, 20398, 22366, 25098, 38654, 26212, 29289, 21247, 21153, 24735,
  14174. 35823, 26132, 29081, 26512, 35199, 30802, 30717, 26224, 22075, 21560,
  14175. 38177, 29306, 31232, 24687, 24076, 24713, 33181, [12067, 22805], 24796,
  14176. 29060, 28911, 28330, 27728, 29312, 27268, 34989, 24109, 20064, 23219,
  14177. 21916, 38115, 27927, 31995, 38553, 25103, 32454, 30606, 34430, 21283,
  14178. 38686, 36758, 26247, 23777, 20384, 29421, 19979, 21414, 22799, 21523,
  14179. 25472, 38184, 20808, 20185, 40092, 32420, 21688, 36132, 34900, 33335,
  14180. 38386, 28046, 24358, 23244, 26174, 38505, 29616, 29486, 21439, 33146,
  14181. 39301, 32673, 23466, 38519, 38480, 32447, 30456, 21410, 38262,
  14182. [12217, 39321], 31665, 35140, 28248, 20065, 32724, 31077, 35814, 24819,
  14183. 21709, 20139, 39033, 24055, 27233, 20687, 21521, 35937, 33831, 30813,
  14184. 38660, 21066, 21742, 22179, 38144, 28040, 23477, 28102, 26195,
  14185. [12073, 23567], 23389, 26657, 32918, 21880, 31505, 25928, 26964, 20123,
  14186. 27463, 34638, 38795, 21327, 25375, 25658, 37034, 26012, 32961, 35856,
  14187. 20889, 26800, 21368, 34809, 25032, 27844, 27899, 35874, 23633, 34218,
  14188. 33455, 38156, 27427, [12191, 36763], 26032, 24571, [12092, 24515], 20449,
  14189. 34885, 26143, 33125, 29481, 24826, 20852, 21009, 22411, 24418, 37026,
  14190. [12175, 34892], 37266, 24184, 26447, 24615, 22995, 20804, 20982, 33016,
  14191. 21256, 27769, 38596, 29066, 20241, 20462, 32670, 26429, 21957, 38152,
  14192. 31168, 34966, 32483, 22687, 25100, 38656, 34394, 22040, 39035, 24464,
  14193. 35768, 33988, 37207, 21465, 26093, 24207, 30044, 24676, 32110, 23167,
  14194. 32490, 32493, 36713, 21927, 23459, 24748, 26059, [12126, 29572], 36873,
  14195. 30307, 30505, 32474, 38772, 34203, 23398, [12147, 31348], 38634,
  14196. [12174, 34880], 21195, 29071, 24490, 26092, 35810, 23547, 39535, 24033,
  14197. 27529, 27739, 35757, 35759, 36874, 36805, 21387, 25276, 40486, 40493,
  14198. 21568, 20011, 33469, [12123, 29273], 34460, 23830, 34905, 28079, 38597,
  14199. 21713, 20122, 35766, 28937, 21693, 38409, 28895, 28153, 30416, 20005,
  14200. 30740, 34578, 23721, 24310, [12180, 35328], 39068, 38414, 28814, 27839,
  14201. 22852, 25513, 30524, 34893, 28436, 33395, 22576, 29141, 21388, 30746,
  14202. 38593, 21761, 24422, 28976, 23476, 35866, 39564, 27523, 22830, 40495,
  14203. 31207, 26472, 25196, 20335, 30113, [12154, 32650], 27915, 38451, 27687,
  14204. 20208, 30162, 20859, 26679, 28478, 36992, 33136, 22934, 29814, 25671,
  14205. 23591, 36965, 31377, 35875, 23002, 21676, 33280, 33647, 35201, 32768,
  14206. 26928, 22094, 32822, 29239, 37326, 20918, 20063, 39029, 25494, 19994,
  14207. 21494, 26355, 33099, 22812, 28082, [12032, 19968], 22777, 21307, 25558,
  14208. 38129, 20381, 20234, [12176, 34915], 39056, 22839, 36951, 31227, 20202,
  14209. 33008, 30097, 27778, 23452, 23016, 24413, 26885, 34433, 20506, 24050,
  14210. [12036, 20057], 30691, 20197, 33402, 25233, 26131, [12194, 37009], 23673,
  14211. 20159, 24441, 33222, 36920, 32900, 30123, 20134, 35028, 24847, 27589,
  14212. 24518, 20041, 30410, 28322, 35811, 35758, 35850, 35793, 24322, 32764,
  14213. 32716, 32462, 33589, 33643, 22240, 27575, [12211, 38899], 38452, 23035,
  14214. 21535, 38134, 28139, 23493, 39278, 23609, 24341, 38544, 21360, 33521,
  14215. 27185, 23156, 40560, 24212, 32552, 33721, {f: 2, c: 33828}, 33639, 34631,
  14216. 36814, 36194, 30408, 24433, 39062, 30828, 26144, 21727, 25317, 20323,
  14217. 33219, 30152, 24248, 38605, 36362, 34553, 21647, 27891, 28044, 27704,
  14218. 24703, 21191, [12132, 29992], 24189, 20248, 24736, 24551, 23588, 30001,
  14219. 37038, 38080, 29369, 27833, 28216, [12195, 37193], 26377, 21451, 21491,
  14220. 20305, 37321, 35825, [12060, 21448], 24188, 36802, 28132, 20110, 30402,
  14221. 27014, 34398, 24858, 33286, 20313, 20446, 36926, 40060, 24841, 28189,
  14222. 28180, 38533, 20104, 23089, [12204, 38632], 19982, 23679, 31161, 23431,
  14223. 35821, [12155, 32701], [12127, 29577], 22495, 33419, 37057, 21505, 36935,
  14224. 21947, 23786, 24481, 24840, 27442, 29425, 32946, 35465, 28020, 23507,
  14225. 35029, 39044, 35947, 39533, 40499, 28170, 20900, 20803, 22435, 34945,
  14226. 21407, 25588, 36757, 22253, 21592, 22278, 29503, 28304, 32536, 36828,
  14227. 33489, 24895, 24616, 38498, [12104, 26352], 32422, 36234, 36291, 38053,
  14228. 23731, 31908, [12105, 26376], 24742, 38405, 32792, 20113, 37095, 21248,
  14229. 38504, 20801, 36816, 34164, 37213, 26197, 38901, 23381, 21277, 30776,
  14230. 26434, 26685, 21705, 28798, 23472, 36733, 20877, 22312, 21681, 25874,
  14231. 26242, 36190, 36163, 33039, 33900, 36973, 31967, 20991, 34299, 26531,
  14232. 26089, 28577, 34468, 36481, 22122, 36896, 30338, 28790, 29157, 36131,
  14233. 25321, 21017, 27901, 36156, 24590, 22686, 24974, 26366, 36192, 25166,
  14234. 21939, 28195, 26413, 36711, 38113, 38392, 30504, 26629, 27048, 21643,
  14235. 20045, 28856, 35784, 25688, 25995, 23429, 31364, 20538, 23528, 30651,
  14236. 27617, 35449, 31896, 27838, 30415, 26025, 36759, 23853, 23637, 34360,
  14237. 26632, 21344, 25112, 31449, 28251, 32509, 27167, 31456, 24432, 28467,
  14238. 24352, 25484, 28072, 26454, 19976, 24080, 36134, 20183, 32960, 30260,
  14239. 38556, 25307, 26157, 25214, 27836, 36213, 29031, 32617, 20806, 32903,
  14240. 21484, 36974, 25240, 21746, 34544, 36761, 32773, 38167, 34071, 36825,
  14241. 27993, 29645, 26015, 30495, 29956, 30759, 33275, 36126, 38024, 20390,
  14242. 26517, 30137, 35786, 38663, 25391, 38215, 38453, 33976, 25379, 30529,
  14243. 24449, 29424, 20105, 24596, 25972, 25327, 27491, 25919, 24103, 30151,
  14244. 37073, 35777, 33437, 26525, [12096, 25903], 21553, 34584, 30693, 32930,
  14245. 33026, 27713, 20043, 32455, 32844, 30452, 26893, 27542, 25191, 20540,
  14246. 20356, 22336, 25351, [12108, 27490], 36286, 21482, 26088, 32440, 24535,
  14247. 25370, 25527, [12164, 33267], 33268, 32622, 24092, 23769, 21046, 26234,
  14248. 31209, 31258, 36136, 28825, 30164, 28382, 27835, 31378, 20013, 30405,
  14249. 24544, 38047, 34935, 32456, 31181, 32959, 37325, 20210, 20247,
  14250. [12168, 33311], 21608, 24030, 27954, 35788, 31909, 36724, 32920, 24090,
  14251. 21650, 30385, 23449, 26172, 39588, 29664, 26666, 34523, 26417, 29482,
  14252. 35832, 35803, 36880, [12149, 31481], 28891, 29038, 25284, 30633, 22065,
  14253. 20027, 33879, 26609, 21161, 34496, 36142, 38136, 31569, 20303, 27880,
  14254. 31069, 39547, 25235, [12118, 29226], 25341, 19987, 30742, 36716, 25776,
  14255. 36186, 31686, 26729, 24196, 35013, 22918, 25758, 22766, 29366, 26894,
  14256. 38181, 36861, 36184, 22368, 32512, 35846, 20934, 25417, 25305, 21331,
  14257. 26700, 29730, 33537, 37196, 21828, 30528, 28796, 27978, 20857, 21672,
  14258. 36164, 23039, 28363, 28100, 23388, 32043, 20180, 31869, 28371,
  14259. [12070, 23376], [12163, 33258], 28173, 23383, 39683, 26837, 36394, 23447,
  14260. 32508, 24635, 32437, 37049, [12187, 36208], 22863, 25549, 31199,
  14261. [12188, 36275], 21330, 26063, 31062, 35781, 38459, 32452, 38075, 32386,
  14262. 22068, 37257, 26368, 32618, 23562, 36981, 26152, 24038, 20304, 26590,
  14263. 20570, 20316, 22352, 24231, 20109, 19980, 20800, 19984, 24319, 21317,
  14264. 19989, 20120, 19998, [12224, 39730], 23404, 22121, [12033, 20008], 31162,
  14265. [12035, 20031], [12052, 21269], 20039, 22829, [12120, 29243], 21358, 27664,
  14266. 22239, 32996, 39319, 27603, 30590, 40727, [12034, 20022], 20127, 40720,
  14267. 20060, 20073, 20115, 33416, 23387, 21868, 22031, 20164, 21389, 21405,
  14268. 21411, 21413, 21422, 38757, 36189, [12053, 21274], 21493, 21286, 21294,
  14269. 21310, 36188, 21350, 21347, 20994, 21000, 21006, 21037, 21043,
  14270. {f: 2, c: 21055}, 21068, 21086, 21089, 21084, 33967, 21117, 21122, 21121,
  14271. 21136, 21139, [12044, 20866], 32596, 20155, 20163, 20169, 20162, 20200,
  14272. 20193, 20203, 20190, 20251, 20211, 20258, 20324, 20213, 20261, 20263,
  14273. 20233, 20267, 20318, 20327, 25912, 20314, 20317, 20319, 20311, 20274,
  14274. 20285, 20342, 20340, 20369, 20361, 20355, 20367, 20350, 20347, 20394,
  14275. 20348, 20396, 20372, 20454, 20456, 20458, 20421, 20442, 20451, 20444,
  14276. 20433, 20447, 20472, 20521, 20556, 20467, 20524, 20495, 20526, 20525,
  14277. 20478, 20508, 20492, 20517, 20520, 20606, 20547, 20565, 20552, 20558,
  14278. 20588, 20603, 20645, 20647, 20649, 20666, 20694, 20742, 20717, 20716,
  14279. 20710, 20718, 20743, 20747, 20189, 27709, 20312, 20325, 20430,
  14280. [12245, 40864], 27718, 31860, 20846, 24061, 40649, 39320, 20865, 22804,
  14281. [12051, 21241], 21261, 35335, 21264, 20971, 22809, 20821, [12039, 20128],
  14282. 20822, 20147, 34926, 34980, 20149, 33044, 35026, 31104, 23348, 34819,
  14283. 32696, [12046, 20907], 20913, 20925, 20924, 20935, [12045, 20886], 20898,
  14284. 20901, 35744, {f: 2, c: 35750}, 35754, {f: 2, c: 35764}, 35767,
  14285. {f: 2, c: 35778}, 35787, 35791, 35790, {f: 3, c: 35794}, 35798,
  14286. {f: 2, c: 35800}, 35804, {f: 2, c: 35807}, 35812, {f: 2, c: 35816}, 35822,
  14287. 35824, 35827, 35830, 35833, 35836, {f: 2, c: 35839}, 35842, 35844, 35847,
  14288. 35852, 35855, {f: 2, c: 35857}, {f: 3, c: 35860}, 35865, 35867, 35864,
  14289. 35869, {f: 3, c: 35871}, 35877, 35879, {f: 2, c: 35882}, {f: 2, c: 35886},
  14290. {f: 2, c: 35890}, {f: 2, c: 35893}, [12057, 21353], 21370, 38429, 38434,
  14291. 38433, 38449, 38442, 38461, 38460, 38466, 38473, 38484, 38495, 38503,
  14292. 38508, 38514, 38516, 38536, 38541, 38551, 38576, 37015, 37019, 37021,
  14293. 37017, 37036, 37025, 37044, 37043, 37046, 37050, 37048, 37040, 37071,
  14294. 37061, 37054, 37072, 37060, 37063, 37075, 37094, 37090, 37084, 37079,
  14295. 37083, 37099, 37103, 37118, 37124, 37154, 37150, 37155, 37169, 37167,
  14296. 37177, 37187, 37190, 21005, 22850, 21154, {f: 2, c: 21164}, 21182, 21759,
  14297. 21200, 21206, 21232, 21471, 29166, 30669, [12085, 24308], [12048, 20981],
  14298. 20988, [12223, 39727], [12059, 21430], 24321, 30042, 24047, 22348, 22441,
  14299. 22433, 22654, 22716, 22725, 22737, 22313, 22316, 22314, 22323, 22329,
  14300. {f: 2, c: 22318}, 22364, 22331, 22338, 22377, 22405, 22379, 22406, 22396,
  14301. 22395, 22376, 22381, 22390, 22387, 22445, 22436, 22412, 22450, 22479,
  14302. 22439, 22452, 22419, 22432, 22485, 22488, 22490, 22489, 22482, 22456,
  14303. 22516, 22511, 22520, 22500, 22493, 22539, 22541, 22525, 22509, 22528,
  14304. 22558, 22553, 22596, 22560, 22629, 22636, 22657, 22665, 22682, 22656,
  14305. 39336, 40729, 25087, 33401, 33405, 33407, 33423, 33418, 33448, 33412,
  14306. 33422, 33425, 33431, 33433, 33451, 33464, 33470, 33456, 33480, 33482,
  14307. 33507, 33432, 33463, 33454, {f: 2, c: 33483}, 33473, 33449, 33460, 33441,
  14308. 33450, 33439, 33476, 33486, 33444, 33505, 33545, 33527, 33508, 33551,
  14309. 33543, 33500, 33524, 33490, 33496, 33548, 33531, 33491, 33553, 33562,
  14310. 33542, {f: 2, c: 33556}, 33504, 33493, 33564, 33617, {f: 2, c: 33627},
  14311. 33544, 33682, 33596, 33588, 33585, 33691, 33630, 33583, 33615, 33607,
  14312. 33603, 33631, 33600, 33559, 33632, 33581, 33594, 33587, 33638, 33637,
  14313. 33640, 33563, 33641, 33644, 33642, {f: 2, c: 33645}, 33712, 33656,
  14314. {f: 2, c: 33715}, 33696, 33706, 33683, 33692, 33669, 33660, 33718, 33705,
  14315. 33661, 33720, 33659, 33688, 33694, 33704, 33722, 33724, 33729, 33793,
  14316. 33765, 33752, 22535, 33816, 33803, 33757, 33789, 33750, 33820, 33848,
  14317. 33809, 33798, 33748, 33759, 33807, 33795, {f: 2, c: 33784}, 33770, 33733,
  14318. 33728, 33830, 33776, 33761, 33884, 33873, 33882, 33881, 33907,
  14319. {f: 2, c: 33927}, 33914, 33929, 33912, 33852, 33862, 33897, 33910, 33932,
  14320. 33934, 33841, 33901, 33985, 33997, 34000, 34022, 33981, 34003, 33994,
  14321. 33983, 33978, 34016, 33953, 33977, 33972, 33943, 34021, 34019, 34060,
  14322. 29965, 34104, 34032, 34105, 34079, 34106, 34134, 34107, 34047, 34044,
  14323. 34137, 34120, 34152, 34148, 34142, 34170, 30626, 34115, 34162, 34171,
  14324. 34212, 34216, 34183, 34191, 34169, 34222, 34204, 34181, 34233, 34231,
  14325. 34224, 34259, 34241, 34268, 34303, 34343, 34309, 34345, 34326, 34364,
  14326. [12086, 24318], 24328, 22844, 22849, 32823, 22869, 22874, 22872, 21263,
  14327. [12074, 23586], 23589, 23596, 23604, 25164, 25194, 25247, 25275, 25290,
  14328. 25306, 25303, 25326, 25378, 25334, 25401, 25419, 25411, 25517, 25590,
  14329. 25457, 25466, 25486, 25524, 25453, 25516, 25482, 25449, 25518, 25532,
  14330. 25586, 25592, 25568, 25599, 25540, 25566, 25550, 25682, 25542, 25534,
  14331. 25669, 25665, 25611, 25627, 25632, 25612, 25638, 25633, 25694, 25732,
  14332. 25709, 25750, 25722, {f: 2, c: 25783}, 25753, 25786, 25792, 25808, 25815,
  14333. 25828, 25826, 25865, 25893, 25902, [12087, 24331], 24530, 29977, 24337,
  14334. 21343, 21489, 21501, 21481, 21480, 21499, 21522, 21526, 21510, 21579,
  14335. {f: 3, c: 21586}, 21590, 21571, 21537, 21591, 21593, 21539, 21554, 21634,
  14336. 21652, 21623, 21617, 21604, {f: 2, c: 21658}, 21636, 21622, 21606, 21661,
  14337. 21712, 21677, 21698, 21684, 21714, 21671, 21670, {f: 2, c: 21715}, 21618,
  14338. 21667, 21717, 21691, 21695, 21708, {f: 2, c: 21721}, 21724,
  14339. {f: 2, c: 21673}, 21668, 21725, 21711, 21726, 21787, 21735, 21792, 21757,
  14340. 21780, 21747, {f: 2, c: 21794}, 21775, 21777, 21799, 21802, 21863, 21903,
  14341. 21941, 21833, 21869, 21825, 21845, 21823, 21840, 21820, 21815, 21846,
  14342. {f: 3, c: 21877}, 21811, 21808, 21852, 21899, 21970, 21891, 21937, 21945,
  14343. 21896, 21889, 21919, 21886, 21974, 21905, 21883, 21983, {f: 2, c: 21949},
  14344. 21908, 21913, 21994, 22007, 21961, 22047, 21969, {f: 2, c: 21995}, 21972,
  14345. 21990, 21981, 21956, 21999, 21989, {f: 2, c: 22002}, {f: 2, c: 21964},
  14346. 21992, 22005, 21988, 36756, 22046, 22024, 22028, 22017, 22052, 22051,
  14347. 22014, 22016, 22055, 22061, 22104, 22073, 22103, 22060, 22093, 22114,
  14348. 22105, 22108, 22092, 22100, 22150, 22116, 22129, 22123, {f: 2, c: 22139},
  14349. 22149, 22163, 22191, 22228, [12062, 22231], 22237, 22241, 22261, 22251,
  14350. 22265, 22271, 22276, 22282, 22281, 22300, 24079, 24089, 24084, 24081,
  14351. 24113, {f: 2, c: 24123}, 24119, 24132, 24148, 24155, 24158, 24161, 23692,
  14352. 23674, 23693, 23696, 23702, 23688, {f: 2, c: 23704}, 23697, 23706, 23708,
  14353. 23733, 23714, 23741, 23724, 23723, 23729, 23715, 23745, 23735, 23748,
  14354. 23762, 23780, 23755, 23781, {f: 2, c: 23810}, 23847, 23846, 23854, 23844,
  14355. 23838, 23814, 23835, 23896, 23870, 23860, 23869, 23916, 23899, 23919,
  14356. 23901, 23915, 23883, 23882, 23913, 23924, 23938, 23961, 23965, 35955,
  14357. 23991, 24005, [12091, 24435], 24439, 24450, 24455, 24457, 24460, 24469,
  14358. 24473, 24476, 24488, 24493, 24501, 24508, 34914, [12090, 24417], 29357,
  14359. 29360, 29364, {f: 2, c: 29367}, 29379, 29377, 29390, 29389, 29394, 29416,
  14360. 29423, 29417, 29426, 29428, 29431, 29441, 29427, 29443, {f: 2, c: 29434},
  14361. 29463, 29459, 29473, 29450, 29470, 29469, 29461, 29474, 29497, 29477,
  14362. 29484, 29496, 29489, 29520, 29517, 29527, 29536, 29548, 29551, 29566,
  14363. [12167, 33307], 22821, 39143, 22820, [12065, 22786], 39267,
  14364. {f: 6, c: 39271}, 39284, 39287, 39293, 39296, 39300, 39303, 39306, 39309,
  14365. {f: 2, c: 39312}, {f: 3, c: 39315}, 24192, 24209, 24203, 24214, 24229,
  14366. 24224, 24249, 24245, 24254, 24243, 36179, 24274, 24273, 24283, 24296,
  14367. 24298, 33210, 24516, 24521, 24534, 24527, 24579, 24558, 24580, 24545,
  14368. 24548, 24574, {f: 2, c: 24581}, 24554, 24557, 24568, 24601, 24629, 24614,
  14369. 24603, 24591, 24589, 24617, 24619, 24586, 24639, 24609, {f: 2, c: 24696},
  14370. 24699, 24698, 24642, 24682, 24701, 24726, 24730, 24749, 24733, 24707,
  14371. 24722, 24716, 24731, 24812, 24763, 24753, 24797, 24792, 24774, 24794,
  14372. 24756, 24864, 24870, 24853, 24867, 24820, 24832, 24846, 24875, 24906,
  14373. 24949, 25004, 24980, 24999, 25015, 25044, 25077, 24541, 38579, 38377,
  14374. 38379, 38385, 38387, {f: 2, c: 38389}, 38396, 38398, {f: 2, c: 38403},
  14375. 38406, 38408, {f: 4, c: 38410}, 38415, 38418, {f: 3, c: 38421},
  14376. {f: 2, c: 38425}, 20012, [12121, 29247], 25109, 27701, 27732, 27740, 27722,
  14377. 27811, 27781, 27792, 27796, 27788, {f: 2, c: 27752}, 27764, 27766, 27782,
  14378. 27817, 27856, 27860, 27821, {f: 2, c: 27895}, 27889, 27863, 27826, 27872,
  14379. 27862, 27898, 27883, 27886, 27825, 27859, 27887, 27902, 27961, 27943,
  14380. 27916, 27971, 27976, 27911, 27908, 27929, 27918, 27947, 27981, 27950,
  14381. 27957, 27930, 27983, 27986, 27988, 27955, 28049, 28015, 28062, 28064,
  14382. 27998, {f: 2, c: 28051}, 27996, 28000, 28028, 28003, 28186, 28103, 28101,
  14383. 28126, 28174, 28095, 28128, 28177, 28134, 28125, 28121, 28182, 28075,
  14384. 28172, 28078, 28203, 28270, 28238, 28267, 28338, 28255, 28294,
  14385. {f: 2, c: 28243}, 28210, 28197, 28228, 28383, 28337, 28312, 28384, 28461,
  14386. 28386, 28325, 28327, 28349, 28347, 28343, 28375, 28340, 28367, 28303,
  14387. 28354, 28319, 28514, {f: 2, c: 28486}, 28452, 28437, 28409, 28463, 28470,
  14388. 28491, 28532, 28458, 28425, 28457, 28553, 28557, 28556, 28536, 28530,
  14389. 28540, 28538, 28625, 28617, 28583, 28601, 28598, 28610, 28641, 28654,
  14390. 28638, 28640, 28655, 28698, 28707, 28699, 28729, 28725, 28751, 28766,
  14391. [12071, 23424], 23428, 23445, 23443, 23461, 23480, 29999, 39582, 25652,
  14392. 23524, 23534, 35120, 23536, 36423, 35591, 36790, 36819, 36821, 36837,
  14393. 36846, 36836, 36841, 36838, 36851, 36840, 36869, 36868, 36875, 36902,
  14394. 36881, 36877, 36886, 36897, {f: 2, c: 36917}, 36909, 36911, 36932,
  14395. {f: 2, c: 36945}, 36944, 36968, 36952, 36962, 36955, 26297, 36980, 36989,
  14396. 36994, 37000, 36995, 37003, [12089, 24400], 24407, 24406, 24408, 23611,
  14397. 21675, 23632, 23641, 23409, 23651, 23654, 32700, 24362, 24361, 24365,
  14398. 33396, 24380, 39739, [12076, 23662], 22913, 22915, 22925, {f: 2, c: 22953},
  14399. 22947, 22935, 22986, 22955, 22942, 22948, 22994, 22962, 22959, 22999,
  14400. 22974, {f: 2, c: 23045}, 23005, 23048, 23011, 23000, 23033, 23052, 23049,
  14401. 23090, 23092, 23057, 23075, 23059, 23104, 23143, 23114, 23125, 23100,
  14402. 23138, 23157, 33004, 23210, 23195, 23159, 23162, 23230, 23275, 23218,
  14403. 23250, 23252, 23224, 23264, 23267, 23281, 23254, 23270, 23256, 23260,
  14404. 23305, 23319, 23318, 23346, 23351, 23360, 23573, 23580, 23386, 23397,
  14405. 23411, 23377, 23379, 23394, 39541, {f: 2, c: 39543}, 39546, 39551, 39549,
  14406. {f: 2, c: 39552}, 39557, 39560, 39562, 39568, {f: 2, c: 39570}, 39574,
  14407. 39576, {f: 3, c: 39579}, {f: 2, c: 39583}, {f: 2, c: 39586}, 39589, 39591,
  14408. 32415, 32417, 32419, 32421, {f: 2, c: 32424}, 32429, 32432, 32446,
  14409. {f: 3, c: 32448}, 32457, {f: 2, c: 32459}, 32464, 32468, 32471, 32475,
  14410. {f: 2, c: 32480}, 32488, 32491, {f: 2, c: 32494}, {f: 2, c: 32497}, 32525,
  14411. 32502, {f: 2, c: 32506}, 32510, {f: 3, c: 32513}, {f: 2, c: 32519},
  14412. {f: 2, c: 32523}, 32527, {f: 2, c: 32529}, 32535, 32537, 32540, 32539,
  14413. 32543, {f: 7, c: 32545}, {f: 4, c: 32554}, {f: 5, c: 32559}, 32565,
  14414. [12083, 24186], 30079, [12078, 24027], 30014, 37013, 29582, 29585, 29614,
  14415. 29602, 29599, 29647, 29634, 29649, 29623, 29619, 29632, 29641, 29640,
  14416. 29669, 29657, 39036, 29706, 29673, 29671, 29662, 29626, 29682, 29711,
  14417. 29738, 29787, 29734, 29733, 29736, 29744, 29742, 29740, 29723, 29722,
  14418. 29761, 29788, 29783, 29781, 29785, 29815, 29805, 29822, 29852, 29838,
  14419. {f: 2, c: 29824}, 29831, 29835, 29854, {f: 2, c: 29864}, 29840, 29863,
  14420. 29906, 29882, {f: 3, c: 38890}, 26444, 26451, 26462, 26440, 26473, 26533,
  14421. 26503, 26474, 26483, 26520, 26535, 26485, 26536, 26526, 26541, 26507,
  14422. 26487, 26492, 26608, 26633, 26584, 26634, 26601, 26544, 26636, 26585,
  14423. 26549, 26586, 26547, 26589, 26624, 26563, 26552, 26594, 26638, 26561,
  14424. 26621, {f: 2, c: 26674}, {f: 2, c: 26720}, 26702, 26722, 26692, 26724,
  14425. 26755, 26653, 26709, 26726, 26689, 26727, 26688, 26686, 26698, 26697,
  14426. 26665, 26805, 26767, 26740, 26743, 26771, 26731, 26818, 26990, 26876,
  14427. {f: 2, c: 26911}, 26873, 26916, 26864, 26891, 26881, 26967, 26851, 26896,
  14428. 26993, 26937, 26976, 26946, 26973, 27012, 26987, 27008, 27032, 27000,
  14429. 26932, 27084, {f: 2, c: 27015}, 27086, 27017, 26982, 26979, 27001, 27035,
  14430. 27047, 27067, 27051, 27053, 27092, 27057, 27073, 27082, 27103, 27029,
  14431. 27104, 27021, 27135, 27183, 27117, {f: 2, c: 27159}, 27237, 27122, 27204,
  14432. 27198, 27296, 27216, 27227, 27189, 27278, 27257, 27197, 27176, 27224,
  14433. 27260, 27281, 27280, 27305, 27287, 27307, 29495, 29522, {f: 2, c: 27521},
  14434. 27527, 27524, {f: 2, c: 27538}, 27533, {f: 2, c: 27546}, 27553, 27562,
  14435. 36715, 36717, {f: 3, c: 36721}, {f: 2, c: 36725}, 36728, 36727,
  14436. {f: 2, c: 36729}, 36732, 36734, {f: 2, c: 36737}, 36740, 36743, 36747,
  14437. {f: 3, c: 36749}, 36760, 36762, 36558, 25099, 25111, 25115, 25119, 25122,
  14438. 25121, 25125, 25124, 25132, 33255, 29935, 29940, 29951, 29967, 29969,
  14439. 29971, [12097, 25908], {f: 3, c: 26094}, 26122, 26137, 26482, 26115, 26133,
  14440. 26112, 28805, 26359, 26141, 26164, 26161, 26166, 26165, 32774, 26207,
  14441. 26196, 26177, 26191, 26198, 26209, 26199, 26231, 26244, 26252, 26279,
  14442. 26269, 26302, {f: 2, c: 26331}, 26342, 26345, {f: 2, c: 36146}, 36150,
  14443. 36155, 36157, 36160, {f: 2, c: 36165}, {f: 2, c: 36168}, 36167, 36173,
  14444. 36181, 36185, 35271, {f: 3, c: 35274}, {f: 4, c: 35278}, 29294, 29343,
  14445. 29277, 29286, 29295, {f: 2, c: 29310}, 29316, 29323, 29325, 29327, 29330,
  14446. 25352, 25394, 25520, 25663, 25816, 32772, 27626, 27635, 27645, 27637,
  14447. 27641, 27653, 27655, 27654, 27661, 27669, {f: 3, c: 27672}, 27681, 27689,
  14448. 27684, 27690, 27698, 25909, 25941, 25963, 29261, 29266, 29270, 29232,
  14449. 34402, 21014, 32927, 32924, 32915, 32956, 26378, 32957, 32945, 32939,
  14450. 32941, 32948, 32951, {f: 4, c: 32999}, 32987, 32962, 32964, 32985, 32973,
  14451. 32983, 26384, 32989, 33003, 33009, 33012, 33005, {f: 2, c: 33037}, 33010,
  14452. 33020, 26389, 33042, 35930, 33078, 33054, 33068, 33048, 33074, 33096,
  14453. 33100, 33107, 33140, {f: 2, c: 33113}, 33137, 33120, 33129,
  14454. {f: 2, c: 33148}, 33133, 33127, 22605, 23221, 33160, 33154, 33169, 28373,
  14455. 33187, 33194, 33228, 26406, 33226, 33211, 33217, 33190, 27428, 27447,
  14456. 27449, 27459, 27462, 27481, {f: 3, c: 39121}, 39125, {f: 2, c: 39129},
  14457. [12110, 27571], 24384, 27586, 35315, 26000, 40785, 26003, 26044, 26054,
  14458. 26052, 26051, 26060, 26062, 26066, 26070, 28800, 28828, 28822, 28829,
  14459. 28859, 28864, 28855, 28843, 28849, 28904, 28874, 28944, 28947, 28950,
  14460. 28975, 28977, 29043, 29020, 29032, 28997, 29042, 29002, 29048, 29050,
  14461. 29080, 29107, 29109, 29096, 29088, 29152, 29140, 29159, 29177, 29213,
  14462. 29224, 28780, 28952, 29030, 29113, 25150, 25149, 25155, {f: 2, c: 25160},
  14463. 31035, 31040, 31046, 31049, {f: 2, c: 31067}, 31059, 31066, 31074, 31063,
  14464. 31072, 31087, 31079, 31098, 31109, 31114, 31130, 31143, 31155, 24529,
  14465. 24528, 24636, 24669, 24666, 24679, 24641, 24665, 24675, 24747, 24838,
  14466. 24845, 24925, 25001, 24989, 25035, 25041, 25094, 32896, [12160, 32895],
  14467. 27795, 27894, 28156, 30710, 30712, 30720, 30729, {f: 2, c: 30743}, 30737,
  14468. 26027, 30765, {f: 2, c: 30748}, {f: 3, c: 30777}, 30751, 30780, 30757,
  14469. 30764, 30755, 30761, 30798, 30829, {f: 2, c: 30806}, 30758, 30800, 30791,
  14470. 30796, 30826, 30875, 30867, 30874, 30855, 30876, 30881, 30883, 30898,
  14471. 30905, 30885, 30932, 30937, 30921, 30956, 30962, 30981, 30964, 30995,
  14472. 31012, 31006, 31028, 40859, [12235, 40697], {f: 2, c: 40699}, 30449, 30468,
  14473. 30477, 30457, {f: 2, c: 30471}, 30490, 30498, 30489, 30509, 30502, 30517,
  14474. 30520, {f: 2, c: 30544}, 30535, 30531, 30554, 30568, 30562, 30565, 30591,
  14475. 30605, 30589, 30592, 30604, 30609, {f: 2, c: 30623}, 30640, 30645, 30653,
  14476. 30010, 30016, 30030, 30027, 30024, 30043, 30066, 30073, 30083, 32600,
  14477. 32609, 32607, 35400, 32616, 32628, 32625, 32633, 32641, 32638, 30413,
  14478. 30437, 34866, {f: 3, c: 38021}, 38027, 38026, {f: 2, c: 38028},
  14479. {f: 2, c: 38031}, 38036, 38039, 38037, {f: 3, c: 38042}, {f: 2, c: 38051},
  14480. 38059, 38058, 38061, 38060, {f: 2, c: 38063}, 38066, 38068,
  14481. {f: 5, c: 38070}, {f: 2, c: 38076}, 38079, 38084, {f: 7, c: 38088},
  14482. {f: 3, c: 38096}, {f: 3, c: 38101}, 38105, 38104, 38107, {f: 3, c: 38110},
  14483. 38114, {f: 2, c: 38116}, {f: 2, c: 38119}, 38122, 38121, 38123,
  14484. {f: 2, c: 38126}, {f: 3, c: 38131}, 38135, 38137, {f: 2, c: 38140}, 38143,
  14485. 38147, 38146, {f: 2, c: 38150}, {f: 2, c: 38153}, {f: 3, c: 38157},
  14486. {f: 5, c: 38162}, 38168, 38171, {f: 3, c: 38173}, 38178, {f: 2, c: 38186},
  14487. 38185, 38188, {f: 2, c: 38193}, 38196, {f: 3, c: 38198}, 38204,
  14488. {f: 2, c: 38206}, 38210, 38197, {f: 3, c: 38212}, 38217, 38220,
  14489. {f: 2, c: 38222}, {f: 3, c: 38226}, {f: 4, c: 38230}, 38235,
  14490. {f: 2, c: 38238}, 38237, {f: 2, c: 38241}, {f: 9, c: 38244}, 38255,
  14491. {f: 3, c: 38257}, 38202, 30695, 30700, 38601, 31189, 31213, 31203, 31211,
  14492. 31238, 23879, 31235, 31234, 31262, 31252, 31289, 31287, 31313, 40655,
  14493. 39333, 31344, 30344, 30350, 30355, 30361, 30372, 29918, 29920, 29996,
  14494. 40480, 40482, {f: 5, c: 40488}, 40498, 40497, 40502, 40504, 40503,
  14495. {f: 2, c: 40505}, 40510, {f: 2, c: 40513}, 40516, {f: 4, c: 40518},
  14496. {f: 2, c: 40523}, 40526, 40529, 40533, 40535, {f: 3, c: 40538}, 40542,
  14497. 40547, {f: 7, c: 40550}, 40561, 40557, 40563, [12135, 30098], 30100, 30102,
  14498. 30112, 30109, 30124, 30115, {f: 2, c: 30131}, 30136, 30148, 30129, 30128,
  14499. 30147, 30146, 30166, 30157, 30179, 30184, 30182, 30180, 30187, 30183,
  14500. 30211, 30193, 30204, 30207, 30224, 30208, 30213, 30220, 30231, 30218,
  14501. 30245, 30232, 30229, 30233, 30235, 30268, 30242, 30240, 30272, 30253,
  14502. 30256, 30271, 30261, 30275, 30270, 30259, 30285, 30302, 30292, 30300,
  14503. 30294, 30315, 30319, 32714, 31462, {f: 2, c: 31352}, 31360, 31366, 31368,
  14504. 31381, 31398, 31392, 31404, 31400, 31405, 31411, 34916, 34921, 34930,
  14505. 34941, 34943, 34946, 34978, 35014, 34999, 35004, 35017, 35042, 35022,
  14506. 35043, 35045, 35057, 35098, 35068, 35048, 35070, 35056, 35105, 35097,
  14507. 35091, 35099, 35082, 35124, 35115, 35126, 35137, 35174, 35195,
  14508. [12134, 30091], 32997, 30386, 30388, 30684, [12158, 32786], 32788, 32790,
  14509. 32796, 32800, 32802, {f: 3, c: 32805}, 32809, 32808, 32817, 32779, 32821,
  14510. 32835, 32838, 32845, 32850, 32873, 32881, 35203, 39032, 39040, 39043,
  14511. 39049, {f: 2, c: 39052}, 39055, 39060, {f: 2, c: 39066}, {f: 2, c: 39070},
  14512. {f: 2, c: 39073}, {f: 2, c: 39077}, [12172, 34381], 34388, 34412, 34414,
  14513. 34431, 34426, 34428, 34427, 34472, 34445, 34443, 34476, 34461, 34471,
  14514. 34467, 34474, 34451, 34473, 34486, 34500, 34485, 34510, 34480, 34490,
  14515. 34481, 34479, 34505, 34511, 34484, 34537, {f: 2, c: 34545}, 34541, 34547,
  14516. 34512, 34579, 34526, 34548, 34527, 34520, 34513, 34563, 34567, 34552,
  14517. 34568, 34570, 34573, 34569, 34595, 34619, 34590, 34597, 34606, 34586,
  14518. 34622, 34632, 34612, 34609, 34601, 34615, 34623, 34690, 34594,
  14519. {f: 2, c: 34685}, 34683, 34656, 34672, 34636, 34670, 34699, 34643, 34659,
  14520. 34684, 34660, 34649, 34661, 34707, 34735, 34728, 34770, 34758, 34696,
  14521. 34693, 34733, 34711, 34691, 34731, 34789, 34732, 34741, 34739, 34763,
  14522. 34771, 34749, 34769, 34752, 34762, 34779, 34794, 34784, 34798, 34838,
  14523. 34835, 34814, 34826, 34843, 34849, 34873, 34876, [12152, 32566], 32578,
  14524. {f: 2, c: 32580}, 33296, 31482, 31485, 31496, {f: 2, c: 31491}, 31509,
  14525. 31498, 31531, 31503, 31559, 31544, 31530, 31513, 31534, 31537, 31520,
  14526. 31525, 31524, 31539, 31550, 31518, 31576, 31578, 31557, 31605, 31564,
  14527. 31581, 31584, 31598, 31611, 31586, 31602, 31601, 31632, {f: 2, c: 31654},
  14528. 31672, 31660, 31645, 31656, 31621, 31658, 31644, 31650, 31659, 31668,
  14529. 31697, 31681, 31692, 31709, 31706, {f: 2, c: 31717}, 31722, 31756, 31742,
  14530. 31740, 31759, 31766, 31755, 31775, 31786, 31782, 31800, 31809, 31808,
  14531. 33278, {f: 2, c: 33281}, 33284, 33260, 34884, {f: 3, c: 33313}, 33325,
  14532. 33327, 33320, 33323, 33336, 33339, {f: 2, c: 33331}, 33342, 33348, 33353,
  14533. 33355, 33359, 33370, 33375, 33384, 34942, 34949, 34952, 35032, 35039,
  14534. 35166, 32669, 32671, 32679, {f: 2, c: 32687}, 32690, 31868, 25929, 31889,
  14535. 31901, 31900, 31902, 31906, 31922, {f: 2, c: 31932}, 31937, 31943,
  14536. {f: 2, c: 31948}, 31944, 31941, 31959, 31976, [12169, 33390], 26280, 32703,
  14537. 32718, 32725, 32741, 32737, 32742, 32745, 32750, 32755, [12151, 31992],
  14538. 32119, 32166, 32174, 32327, 32411, 40632, 40628, 36211, 36228, 36244,
  14539. 36241, 36273, 36199, 36205, 35911, 35913, 37194, 37200, {f: 2, c: 37198},
  14540. 37220, 37218, 37217, 37232, 37225, 37231, {f: 2, c: 37245}, 37234, 37236,
  14541. 37241, 37260, 37253, 37264, 37261, 37265, {f: 2, c: 37282}, 37290,
  14542. {f: 3, c: 37293}, 37301, 37300, 37306, [12183, 35925], 40574, 36280, 36331,
  14543. 36357, 36441, 36457, 36277, 36287, 36284, 36282, 36292, {f: 2, c: 36310},
  14544. 36314, 36318, {f: 2, c: 36302}, 36315, 36294, 36332, {f: 2, c: 36343},
  14545. 36323, 36345, 36347, 36324, 36361, 36349, 36372, 36381, 36383, 36396,
  14546. 36398, 36387, 36399, 36410, 36416, 36409, 36405, 36413, 36401, 36425,
  14547. {f: 2, c: 36417}, {f: 2, c: 36433}, 36426, 36464, 36470, 36476, 36463,
  14548. 36468, 36485, 36495, 36500, 36496, 36508, 36510, [12184, 35960], 35970,
  14549. 35978, 35973, 35992, 35988, 26011, 35286, 35294, 35290, 35292, 35301,
  14550. 35307, 35311, 35390, 35622, 38739, 38633, 38643, 38639, 38662, 38657,
  14551. 38664, 38671, 38670, 38698, 38701, 38704, 38718, 40832, 40835,
  14552. {f: 6, c: 40837}, 40844, 40702, 40715, 40717, [12203, 38585],
  14553. {f: 2, c: 38588}, 38606, 38610, 30655, 38624, 37518, 37550, 37576, 37694,
  14554. 37738, 37834, 37775, 37950, 37995, 40063, 40066, {f: 4, c: 40069}, 31267,
  14555. 40075, 40078, {f: 3, c: 40080}, {f: 2, c: 40084}, {f: 2, c: 40090},
  14556. {f: 6, c: 40094}, {f: 5, c: 40101}, 40107, {f: 2, c: 40109},
  14557. {f: 8, c: 40112}, {f: 4, c: 40122}, {f: 4, c: 40132}, {f: 7, c: 40138},
  14558. {f: 3, c: 40147}, {f: 3, c: 40151}, {f: 2, c: 40156}, 40159, 40162, 38780,
  14559. 38789, {f: 2, c: 38801}, 38804, 38831, 38827, 38819, 38834, 38836, 39601,
  14560. 39600, 39607, 40536, 39606, 39610, 39612, 39617, 39616, 39621, 39618,
  14561. {f: 2, c: 39627}, 39633, 39749, 39747, 39751, 39753, 39752, 39757, 39761,
  14562. 39144, 39181, 39214, 39253, 39252, [12221, 39647], 39649, 39654, 39663,
  14563. 39659, 39675, 39661, 39673, 39688, 39695, 39699, 39711, 39715,
  14564. {f: 2, c: 40637}, 32315, 40578, {f: 2, c: 40583}, 40587, 40594, 37846,
  14565. 40605, 40607, {f: 3, c: 40667}, 40672, 40671, 40674, 40681, 40679, 40677,
  14566. 40682, 40687, 40738, 40748, 40751, 40761, 40759, {f: 2, c: 40765}, 40772,
  14567. 12295, {s: 13}, 30362, 34297, 31001, 24859, 39599, 35158, 22761, 32631,
  14568. 25850, 25943, 38930, 36774, 32070, 24171, 32129, 37770, 35607, 39165,
  14569. 23542, 22577, 39825, 36649, [12185, 35997], 37575, 29437, 20633, 24970,
  14570. 32179, 31558, 30050, 25987, 24163, 38281, 37002, 32232, 36022, 35722,
  14571. 36783, 36782, 27161, 40009, 30303, 28693, 28657, 36051, 25839, 39173,
  14572. 25765, 37474, 37457, 39361, 35036, 36001, 21443, 34870, 27544, 24922,
  14573. 24920, 29158, 33980, 33369, 20489, 28356, 21408, 20596, 28204, 23652,
  14574. 35435, 25881, 25723, 34796, 39262, 35730, 32399, 37855, 29987, 38369,
  14575. 39019, 22580, 22039, [12199, 38263], 20767, 33144, 24288, 26274, 37396,
  14576. [12190, 36554], 24505, 22645, 38515, 35183, 31281, 25074, 35488, 39425,
  14577. 36978, 39347, [12242, 40786], 29118, 34909, 34802, 23541, 30087, 36490,
  14578. 31820, 32162, 37276, 37604, 38619, 30990, 20786, 35320, 34389, 20659,
  14579. 30241, 38358, 21109, 37656, 32020, 32189, 36781, 35422, 36060, 32880,
  14580. 24478, 21474, 36517, 31428, 37679, 36948, 24118, 36024, 25812, 21934,
  14581. 37170, 25763, 33213, 24986, 35477, 24392, 30070, 25803, 40680, 34153,
  14582. 27284, 25623, 23798, 31153, 23566, 29128, 37159, 25973, 28364, 36958,
  14583. 32224, 39003, 40670, 22666, 38651, 28593, 37347, 35519, 35548, 37336,
  14584. 38914, 37664, 35330, 26481, 21205, 26847, 20941, [12222, 39717], 29346,
  14585. 29544, 35712, 36077, 37709, 37723, 26039, 32222, 38538, 23565, 22136,
  14586. 38931, 37389, 22890, 22702, 40285, 38989, 35355, 24801, 39187, 20818,
  14587. 29246, 39180, 36019, 30332, 32624, 38309, 31020, 37353, 29033, 31684,
  14588. 36009, 39151, 35370, 32033, [12214, 39131], 35513, 24290, 36027, 32027,
  14589. 22707, 22894, 24996, 31966, 35920, 26963, 37586, [12213, 39080], 30219,
  14590. 39342, 32299, 35575, 40179, 33178, 36667, 25771, 36628, 36070, 24489,
  14591. 36000, 35331, 23142, 32283, 35442, 37411, 33995, 24185, 36245, 36123,
  14592. 23713, 21083, 37628, 32177, 23831, 37804, 25841, 40255, 38307, 37499,
  14593. 20491, 32102, 40852, 38799, 36002, 37390, 28317, 27083, 36092, 34865,
  14594. 39015, 21102, 38364, 35264, 39208, 24931, 36011, 24291, 35215, 27512,
  14595. [12244, 40860], 38312, 36556, 35437, 27331, 36020, 21130, 36645, 37707,
  14596. 22283, 36942, 39405, 38867, 28450, 34399, 38305, 40372, 36032, 36703,
  14597. 40251, 32005, 22778, 35703, 28396, 22057, 33775, 30059, 21123, 35441,
  14598. 25079, 22750, 27489, 29872, 36996, 32233, 35594, 25582, 36637, 36036,
  14599. 31330, 26371, 29172, 21295, 35569, 35496, 32362, 33911, 28222, 29554,
  14600. 36008, 31117, 25802, 27231, 31309, 39249, 35663, 40388, 32318, 32221,
  14601. 26997, 36655, 32026, 25824, 24190, 34186, 21137, 28639, 35336, 35352,
  14602. 38555, 32380, 32000, 22846, 33698, 38960, 36040, 37440, 20729, 39381,
  14603. 27570, 30435, 22533, 31627, 38291, 33393, 32216, 32365, 27298, 40572,
  14604. 25536, 25791, 31777, 20745, 34214, 27323, 37970, 36368, 36068,
  14605. [12178, 35211], 37749, 33382, 21133, 39198, 28472, 28666, 28567, 23559,
  14606. 28479, 34083, 27123, 22892, 35611, 37292, 33184, 28550, 39509, 23308,
  14607. 25898, 37496, 30703, 20709, 39171, 32371, 32094, 36686, 36611, 38542,
  14608. 31680, 28500, 32080, 35489, 32202, 37670, 20677, 35641, 36914, 29180,
  14609. 30433, 21185, 33686, 39912, 39514, 32147, 38968, 37857, 24465, 30169,
  14610. 31478, 31998, 33290, 39378, 33289, 25818, 37624, 25084, 21127, 40273,
  14611. 32121, 35258, 35363, 32118, 37406, 36557, 39423, 38283, 20977, 38982,
  14612. 27579, 35506, 22718, 25031, 25715, 24235, 35122, 35463, 22602, 20744,
  14613. 23532, 31014, 26336, 34407, 24011, 31418, 39243, 28528, 25844, 38346,
  14614. 34847, 33240, 33802, 20358, 36084, 34253, 27396, 25876, 31811, 38348,
  14615. 34349, 28734, 35733, 25900, 35261, 25078, 32412, 29211, 28651, 25736,
  14616. 21214, 28551, 27138, 37939, 22744, 39006, 31852, 38626, 28757, 35023,
  14617. 39881, 31150, 40599, 21426, 21237, 31019, 27511, 28701, 38584, 20486,
  14618. 32879, 34030, 36899, 37934, 24976, 28451, 31806, 25986, 33225, 37832,
  14619. 25088, 29001, 32244, 31975, 20841, 36635, 35538, 30274, 36988, 37904,
  14620. 29557, 33256, 37168, 40023, 36035, 40801, 37428, 38728, 23994, 38936,
  14621. 39230, 21129, [12243, 40845], 32894, 22184, 31840, 22751, 25871, 38580,
  14622. 27155, 23105, 25695, 31757, 34310, 30439, 39025, 24300, 29200, 25796,
  14623. 28407, 34396, 39791, 36034, 37682, 38520, 39522, 37569, 23650, 32311,
  14624. 24942, 28670, 32209, 24018, 25891, 23423, 28772, 20098, 25476, 36650,
  14625. 20523, 20374, 28138, 32184, 35542, 34367, 32645, 37007, 38012, 31854,
  14626. 39486, 39409, 32097, 23229, 29802, 30908, 34718, [12218, 39340], 39393,
  14627. 21966, 36023, [12230, 40613], 36067, 36993, 30622, 39237, 34875, 28415,
  14628. 35646, 37672, 37466, 36031, 37762, [12200, 38272], 24758, 20497, 37683,
  14629. 22818, 35598, 24396, 35219, 32191, 32236, 24287, 28357, 25003, 38313,
  14630. 40180, 37528, 35628, 35584, 30045, 37385, 32013, 38627, 25747, 33126,
  14631. 24817, 39719, 39186, 25836, 33193, 25862, 37312, [12227, 40165], 32886,
  14632. 22169, 38007, 37811, 27320, 29552, 23527, 25840, 28632, 37397, 32016,
  14633. 33215, 28611, 36786, 30247, 35582, 27472, 40407, 27590, 22036, 28442,
  14634. 30436, 40848, 36064, 22132, 40300, 39449, 39108, 38971, 36007, 34315,
  14635. 24977, 35413, 28497, 38935, 25778, 37610, 20693, 27192, 35676, 33229,
  14636. [12241, 40778], 39438, 35912, 21843, 27683, 35350, 29309, 37370, 37467,
  14637. 36983, 31805, 35609, 37666, 37463, 28154, 35700, 22649, 27085, 21958,
  14638. 22715, 34196, 25654, 37740, 27211, 21932, 20689, 32761, 31429, 31434,
  14639. 27453, 35242, 23522, 36629, 27691, 20670, 38915, 35531, 24950, 29898,
  14640. 31406, 36264, 21312, 36544, 39493, 40818, 39028, 27402, 21240, 40306,
  14641. 30906, 35731, 39250, 25854, 32350, 29105, 38860, 35469, 32009, 27054,
  14642. 32104, 36575, 37613, 38287, 28516, 28753, 34217, 39955, 36093, 20632,
  14643. 21930, 39479, 25475, 28544, 27578, 32023, 31721, 26348, 38275, 38493,
  14644. 36109, 32341, 20663, 36062, 29138, 32057, 36050, 25448, 25885, 25086,
  14645. 35373, 32051, 23529, 23352, 33102, 28402, 32882, 32361, 21213, 32854,
  14646. 24107, 29509, 28629, 35433, 26178, 34645, 23526, 35672, 39387, 21218,
  14647. 36969, 37323, 39166, 35222, 35430, 22781, 29560, 27166, 36664, 26360,
  14648. 36118, 23660, 34899, 27193, 31466, 25976, 24101, 38617, 35504, 38918,
  14649. 35500, 30889, 29197, 32114, 39164, 39686, 32883, 24939, 38924, 35359,
  14650. 35494, 25851, 34311, 35380, 32901, 38614, 38568, 32143, 27506, 23403,
  14651. 25613, 32302, 29795, 37782, 29562, 25787, 33274, 24907, 25892, 36010,
  14652. 30321, 28760, 22727, 35674, 35527, 22022, 28271, 29145, 28644, 32295,
  14653. 35342, 39472, 35588, 37563, 38988, 39636, 26781, 36028, 37941, 24307,
  14654. 32893, 28916, 37509, 32113, 38957, 22294, 22615, 22296, 38973, 40213,
  14655. 39345, 39389, 27234, 31402, 35178, 24398, 28771, 38929, 33836, 32178,
  14656. [12209, 38859], 36949, 22285, 29234, 28656, 32173, 33894, 20553, 20702,
  14657. 32239, 35586, 34907, 32862, 32011, 31337, 21839, 25790, 34680, 28198,
  14658. 31401, 21978, 37794, 28879, 35491, 28961, 34154, 22626, 38695, 21209,
  14659. 35492, 37675, 29351, 35186, 32722, 37521, 25138, 32048, 34662, 36676,
  14660. 23805, 20448, 29433, 22151, 37697, 39854, 32406, 36066, 37532, 38289,
  14661. 39023, 38570, 29694, 29563, 32291, 39201, 25010, 32171, 38002, 37129,
  14662. 35443, 38911, 38917, 34157, 22210, 37559, 26313, 22063, 21332, 25406,
  14663. 33029, 35559, 23531, 28681, 35613, 37573, 37313, 33288, 37561, 32137,
  14664. 38920, 35377, 32210, 32396, 36562, 25080, 36984, 30316, 32098, 23416,
  14665. 21211, 35426, 23563, 39348, 35347, 35338, 36956, 22739, 40201, 40232,
  14666. 21854, 20126, 35357, 38329, 40573, 22196, 38996, 38331, 33399, 21421,
  14667. 30831, 35578, 39511, 40230, 26954, 25562, 30221, 38525, 30306, 39178,
  14668. 27171, 22575, 35617, 34277, 29242, [12212, 38913], 26989, 33865, 37291,
  14669. 37541, 38948, 36986, 20736, 34811, 34269, 20740, 25014, 32681, 35427,
  14670. 35696, 35516, 35695, 32377, 34093, 38512, 37504, 39154, 38577, 27387,
  14671. 23344, 40441, 25033, 32403, 29801, 34722, 29151, 29074, 34821, 36111,
  14672. 31310, 21938, 25793, 20653, 30320, 36404, 20778, 24962, 37109, 37438,
  14673. 29494, 35480, 36671, 39192, [12226, 39770], 28417, 33287, 23996, 35486,
  14674. 39729, 29508, 35709, 38928, 39341, 40219, 28149, 36677, 22290, 21729,
  14675. 22291, 32227, 36960, 39000, 32004, 36493, 38000, 38322, 38642, 37142,
  14676. 38549, 36939, 34292, 37270, 26248, 38620, 36617, 25890, 26283, 36106,
  14677. 36124, 33247, 38015, 26839, 31432, 36012, 25799, 21063, 28580, 36042,
  14678. 36104, 36555, 37720, 38296, 35408, 40779, 20661, 27656, 30430, 26028,
  14679. 36670, 23940, 26855, 25136, 32187, 24373, 28466, 24115, 36076, 33081,
  14680. 36249, 34756, 36685, 37754, 36889, 35998, 37341, 20597, 35386, 37806,
  14681. 38499, 24128, 30309, 37165, 35657, 32340, 32887, 22519, 34937, 32025,
  14682. 25711, 25842, 24159, 36074, 28399, 37912, 32066, 31278, 33131, 34886,
  14683. 35589, 36600, 30394, 26205, 39519, 35576, 35461, 29165, 30682, 22225,
  14684. 36015, 37956, 31689, 39376, 23560, 30938, 36681, 36090, 27137, 33674,
  14685. 35037, 22941, 22767, 29376, 37648, 36101, 22684, 32180, 35524, 28310,
  14686. 28609, 36039, 28460, 32156, 32317, 32305, 37138, 35419, 32068, 38013,
  14687. 21959, 21401, 21428, 38760, 36107, 21293, 21297, 36094, 21060, 21132,
  14688. 21108, 20660, 20480, 20630, 20757, 20738, 20756, 20796, 20791, 20712,
  14689. 20674, 20795, 20752, 20794, 20681, 31988, 40652, 22213, 40172, 35131,
  14690. 33248, 35329, 35344, 35340, 35349, 35635, 35406, 35365, 35393, 35382,
  14691. 35398, 35412, 35416, 35410, 35462, 35460, 35455, 35440, 35452, 35445,
  14692. 35436, 35438, 35533, 35554, 35425, 35482, 35493, {f: 2, c: 35473}, 35535,
  14693. 35537, 35529, 35547, 35543, 35522, 35510, 35574, 35563, 35604, 35585,
  14694. 35556, 35565, 35580, 35571, 35558, 35566, 35550, 35624, 35740, 35606,
  14695. 35610, 35600, 35627, 35629, 35670, 35673, 35662, 35742, 35691, 35734,
  14696. 38488, 37178, 37140, 37172, 37087, 37174, 37126, 37192, 33467, 21233,
  14697. 24048, 22538, 22745, 22754, 22752, 22746, 22497, 22607, 22550, 22610,
  14698. 22557, 22628, 34188, 34131, 34294, 33703, 33799, 34031, 33511, 34338,
  14699. 34086, 22603, 29026, 34136, 34045, 34126, 34184, 34234, 29334, 28366,
  14700. 34113, 34254, 34130, 33984, 33874, 33892, 33940, 33845, 34207, 34133,
  14701. 40367, 33939, 32264, 34118, 34146, 34078, 39488, 34362, 37795, 34167,
  14702. 34334, 34298, 34308, 34282, 34330, 22889, 23607, 25451, 25718, 25759,
  14703. 25681, 25692, 25779, 25860, 25878, 25847, 25852, 25883, 22064, 22072,
  14704. 22216, 22182, 21764, 21692, 22144, 22109, 22112, 22069, 22006, 22118,
  14705. 22130, 22156, 22117, 22044, 22062, 21993, 22038, 22208, 22029, 22195,
  14706. 22209, 22127, 36705, 22198, 22165, 22279, 24131, 24172, 24152, 24151,
  14707. 23943, 23796, 23888, 23852, 23975, 23968, 23959, 23821, 23992, 23937,
  14708. 24020, 24480, 29559, 29505, 29546, 29499, 29547, 29568, 29564, 39136,
  14709. 39219, 39145, 39228, {f: 2, c: 39146}, 39149, 39156, 39177, 39185, 39195,
  14710. 39223, 39231, 39235, {f: 3, c: 39240}, 39244, 39266, 24289, 36065, 25082,
  14711. 25006, 24938, 24894, 24757, 24884, 25036, 24927, 25064, 24827, 24887,
  14712. 24818, 24947, 24860, 24978, 38274, 38278, 38344, 38286, 38292, 38284,
  14713. 38373, 38317, 38315, 39726, 38316, 38334, 38326, 39721, 38335, 38333,
  14714. 38332, 38339, 38347, 38356, 38352, 38357, 38366, 28739, 28505, 28711,
  14715. 28696, 28668, 28039, 28025, 28254, 28590, 28687, 28408, 28527, 28150,
  14716. 28543, 28678, 28576, 28683, 28775, 28740, 28677, 28535, 28704, 28703,
  14717. 28722, 28712, 28765, 39467, 36999, 36885, 37008, 23656, 24371, 23285,
  14718. 23255, 23296, 23149, 23304, 23372, 23207, 23291, 23307, 23329, 23338,
  14719. 23321, 39380, 39391, 39385, 39478, 39515, 39377, 39384, 39501, 39498,
  14720. 39394, 39530, 39439, 39437, 39429, 39490, 39469, 39446, 39489, 39470,
  14721. 39480, {f: 2, c: 39491}, 39503, 39525, 39524, 31993, 32006, 32002,
  14722. {f: 2, c: 32007}, 32394, 32028, 32021, 32019, 32058, 32050, 32049, 32272,
  14723. 32060, 32064, 32063, 32093, 32078, 32115, 32134, 32131, 32136, 32190,
  14724. 32186, 32203, 32212, 32196, 32158, 32172, 32185, 32163, 32176, 32199,
  14725. 32217, 32215, 32249, 32242, 32354, 32230, 32246, 32241, 32267, 32225,
  14726. 32265, 32285, 32287, 32286, 32301, 32266, 32273, 32381, 32313, 32309,
  14727. 32306, 32326, 32325, 32392, 32346, 32338, 32366, 32382, 32368, 32367,
  14728. 32408, 29859, 29771, 29903, 38922, 29885, 29759, 29833, 29862, 29908,
  14729. 29914, 38873, 38878, 38876, 27050, 27370, 26776, 26838, 27141, 26783,
  14730. 27355, 27379, 27368, 27359, 27273, 26895, 27208, 26984, 27071, 27194,
  14731. 27292, 27410, 27422, 27357, 27111, 27407, 27414, 27372, 27354, 27384,
  14732. 27315, 27367, 27299, 27347, 27358, 27556, 27550, 27566, 27563, 27567,
  14733. 36564, 36571, 36594, 36603, 36708, 36601, 36604, 36587, 36580, 36706,
  14734. 36602, 36606, 36618, 36615, 36613, 36626, 36646, {f: 2, c: 36638}, 36636,
  14735. 36659, 36678, 36692, 25108, 25127, 29964, 26311, 26308, 26249, 26326,
  14736. 36033, 36016, 36026, 36029, 36100, 36018, 36037, 36112, 36049, 36058,
  14737. 36053, 36075, 36071, 36091, 35224, 35244, 35233, 35263, 35238, 35247,
  14738. 35250, 35255, 27647, 27660, 27692, 29272, 26407, 33110, 33242, 33051,
  14739. 33214, 33121, 33231, 27487, {f: 2, c: 39086}, 39094, 39100, 39110, 39112,
  14740. 36674, 40783, 26005, 29036, 29010, 29079, 29121, 29148, 29182, 31152,
  14741. 31118, 31146, 25055, 24932, 25059, 25095, 28585, 30959, 30893, 30824,
  14742. 30904, 31018, 31025, 30820, 30973, 30951, 30947, 40853, 30616, 30558,
  14743. 30652, 32646, 32648, {f: 3, c: 37330}, 37337, 37335, 37333, 37367, 37351,
  14744. 37348, 37702, 37365, 37369, 37384, 37414, 37445, 37393, 37392, 37377,
  14745. 37415, 37380, 37413, 37376, 37434, 37478, 37431, 37427, 37461, 37437,
  14746. 37432, 37470, {f: 2, c: 37484}, 37439, 37984, 37424, 37449, 37448, 37453,
  14747. 37422, 37433, 37944, 37548, 37536, 37498, 37546, 37614, 37583, 37891,
  14748. 37603, 37946, 37553, 37542, 37799, 37526, 37580, 37545, 37877, 37523,
  14749. 37503, 37801, 37530, 37658, 37547, 37507, 37899, 37544, 37539, 37906,
  14750. 37688, 37617, 37847, 37605, 37616, 37615, 37608, 37564, 37597, 37622,
  14751. {f: 2, c: 37926}, 37571, 37599, 37606, 37650, 37638, 37737, 37659, 37696,
  14752. 37633, 37653, 37678, 37699, {f: 2, c: 37639}, 37663, 37657, 37733, 37703,
  14753. 37750, 37716, 37732, 37802, 37744, 37764, 37860, 37848, 37928, 37767,
  14754. 37836, 37784, 37816, 37823, 37798, 37808, 37813, 37964, 37858,
  14755. {f: 2, c: 37852}, 37837, 37854, 37827, 37831, 37841, 37908, 37917, 37879,
  14756. 37989, 37907, 37997, 37920, 38009, 37881, 37913, 37962, 37938, 37951,
  14757. 37972, 37987, 37758, 31329, 40169, 40182, 40199, 40198, 40227, 40327,
  14758. 40469, 40221, 40223, 40421, 40239, 40409, 40240, 40258, 40478, 40275,
  14759. 40477, 40288, 40274, 40435, 40284, 40289, 40339, 40298, 40303, 40329,
  14760. 40344, 40346, 40384, 40357, 40361, 40386, 40380, 40474, 40403, 40410,
  14761. 40431, 40422, 40434, 40440, 40460, 40442, 40475, 30308, 30296, 30311,
  14762. 30210, {f: 2, c: 30278}, 30281, 30238, 30267, {f: 2, c: 30317}, 30313,
  14763. 30322, 31431, 31414, 35168, 35123, 35165, 35143, 35128, 35172, 30392,
  14764. 32814, 32812, 32889, 32885, 38919, {f: 2, c: 38926}, 38945, 38940, 28481,
  14765. 38950, 38967, 38990, 38995, 39027, 39010, 39001, 39013, 39020, 39024,
  14766. 34787, 34822, 34566, 34851, 34806, 34554, 34799, 34692, 34832, 34760,
  14767. 34833, 34747, 34766, 32588, 31716, 31591, 31849, 31731, 31744, 31691,
  14768. 31836, 31774, 31787, 31779, 31850, 31839, 33380, 33387, 35018, 32677,
  14769. 31986, 31990, 31965, 32310, 40617, 36274, 37317, 37315, 40570, 36489,
  14770. 36428, 36498, 36474, 36437, 36506, 36491, 36499, 36497, 36513, 36451,
  14771. 36522, 36518, 35316, 35318, 38746, 38722, 38717, 38724, 40788, 40799,
  14772. 40793, 40800, 40796, 40806, 40812, 40810, 40823, [12236, 40701], 40703,
  14773. 40713, 35726, 38014, 37864, 39799, 39796, 39809, 39811, 39822, 40056,
  14774. 31308, 39826, 40031, 39824, 39853, 39834, 39850, 39838, 40045, 39851,
  14775. 39837, 40024, 39873, 40058, 39985, 39993, 39971, 39991, 39872, 39882,
  14776. 39879, 39933, 39894, {f: 2, c: 39914}, 39905, 39908, 39911, 39901, 39906,
  14777. 39920, 39899, 39924, 39892, 40029, 39944, 39952, 39949, 39954, 39945,
  14778. 39935, 39968, 39986, 39981, 39976, 39973, 39977, 39987, 39998, 40008,
  14779. 39995, 39989, 40005, 40022, 40020, 40018, 40039, 38851, 38845, 38857,
  14780. 40379, 39631, 39638, 39637, 39768, 39758, 39255, 39260, 39714, 40695,
  14781. 40690, 35180, 38342, 37686, 24390, 34068, 32404, 40803, 22137, 40725,
  14782. 22081, 39662, 35079, 31296, 39091, 38308, 39693, 36852, 24409, 31339,
  14783. 39138, 20642, 34193, 20760, 25458, 21067, 30543, 32397, 26310, 30637,
  14784. [12228, 40565], 22217, 40692, 28635, 25054, 30663, 28720, 40629, 34890,
  14785. 38370, 38854, 31844, 32308, 38822, 40623, 22220, 39089, 27311, 32590,
  14786. 31984, 20418, 32363, 40569, 22190, 39706, 33903, 31142, 31858, 39634,
  14787. 38587, 32251, 35069, 30787, {f: 10, c: 8560}, {f: 2, c: 714}, 729, 8211,
  14788. 8213, 8229, 8245, 8453, 8457, {f: 4, c: 8598}, 8725, 8735, 8739, 8786,
  14789. {f: 2, c: 8806}, 8895, {f: 36, c: 9552}, {f: 15, c: 9601}, {f: 3, c: 9619},
  14790. {f: 2, c: 9660}, {f: 4, c: 9698}, 9737, 8853, 12306, {f: 2, c: 12317},
  14791. {f: 9, c: 12321}, 12963, {f: 2, c: 13198}, {f: 3, c: 13212}, 13217, 13252,
  14792. 13262, {f: 2, c: 13265}, 13269, 65072, 65506, 65508, 8481, 12849, 8208,
  14793. 12540, {f: 2, c: 12443}, {f: 2, c: 12541}, 12294, {f: 2, c: 12445},
  14794. {f: 10, c: 65097}, {f: 4, c: 65108}, {f: 14, c: 65113}, {f: 4, c: 65128},
  14795. 12350, {f: 12, c: 12272}, 19970, {f: 3, c: 19972}, 19983, 19986, 19991,
  14796. {f: 3, c: 19999}, 20003, 20006, 20009, {f: 2, c: 20014}, 20017, 20019,
  14797. 20021, 20023, 20028, {f: 3, c: 20032}, 20036, 20038, 20042, 20049, 20053,
  14798. 20055, {f: 2, c: 20058}, {f: 4, c: 20066}, {f: 2, c: 20071},
  14799. {f: 6, c: 20074}, 20082, {f: 10, c: 20084}, {f: 3, c: 20095},
  14800. {f: 2, c: 20099}, [12037, 20101], 20103, 20106, 20112, {f: 2, c: 20118},
  14801. 20121, {f: 2, c: 20124}, 20131, 20138, {f: 3, c: 20143}, 20148,
  14802. {f: 4, c: 20150}, {f: 3, c: 20156}, 20168, 20172, {f: 2, c: 20175}, 20178,
  14803. {f: 3, c: 20186}, 20192, 20194, {f: 2, c: 20198}, 20201, {f: 3, c: 20205},
  14804. 20209, 20212, {f: 3, c: 20216}, 20220, 20222, 20224, {f: 7, c: 20226},
  14805. {f: 2, c: 20235}, {f: 5, c: 20242}, {f: 2, c: 20252}, 20257, 20259,
  14806. {f: 2, c: 20264}, {f: 3, c: 20268}, 20273, 20275, 20277, 20279, 20281,
  14807. 20283, {f: 5, c: 20286}, {f: 2, c: 20292}, {f: 6, c: 20295}, 20306, 20308,
  14808. 20310, {f: 2, c: 20321}, 20326, 20328, {f: 2, c: 20330}, {f: 2, c: 20333},
  14809. {f: 2, c: 20337}, 20341, {f: 4, c: 20343}, 20349, {f: 3, c: 20352}, 20357,
  14810. 20359, 20362, 20364, 20366, 20368, {f: 2, c: 20370}, 20373,
  14811. {f: 3, c: 20376}, 20380, {f: 2, c: 20382}, {f: 2, c: 20385}, 20388, 20395,
  14812. 20397, {f: 5, c: 20400}, {f: 9, c: 20406}, {f: 2, c: 20416},
  14813. {f: 4, c: 20422}, {f: 3, c: 20427}, {f: 5, c: 20434}, 20441, 20443, 20450,
  14814. {f: 2, c: 20452}, 20455, {f: 2, c: 20459}, 20464, 20466, {f: 4, c: 20468},
  14815. 20473, {f: 3, c: 20475}, 20479, {f: 5, c: 20481}, {f: 2, c: 20487}, 20490,
  14816. 20494, 20496, 20499, {f: 3, c: 20501}, 20507, {f: 2, c: 20509}, 20512,
  14817. {f: 3, c: 20514}, 20519, {f: 11, c: 20527}, 20539, 20541, {f: 4, c: 20543},
  14818. {f: 3, c: 20548}, {f: 2, c: 20554}, 20557, {f: 5, c: 20560},
  14819. {f: 4, c: 20566}, 20571, {f: 8, c: 20573}, {f: 6, c: 20582},
  14820. {f: 7, c: 20589}, {f: 3, c: 20600}, {f: 2, c: 20604}, {f: 4, c: 20609},
  14821. {f: 2, c: 20614}, {f: 4, c: 20617}, {f: 8, c: 20622}, 20631,
  14822. {f: 8, c: 20634}, 20644, 20646, {f: 2, c: 20650}, {f: 4, c: 20654}, 20662,
  14823. {f: 2, c: 20664}, {f: 2, c: 20668}, {f: 3, c: 20671}, {f: 2, c: 20675},
  14824. {f: 3, c: 20678}, {f: 5, c: 20682}, 20688, {f: 3, c: 20690},
  14825. {f: 3, c: 20695}, {f: 3, c: 20699}, {f: 6, c: 20703}, {f: 3, c: 20713},
  14826. {f: 4, c: 20719}, 20724, {f: 3, c: 20726}, 20730, {f: 4, c: 20732}, 20737,
  14827. 20739, 20741, 20746, {f: 4, c: 20748}, 20753, 20755, {f: 2, c: 20758},
  14828. {f: 6, c: 20761}, 20768, {f: 8, c: 20770}, {f: 7, c: 20779},
  14829. {f: 4, c: 20787}, {f: 2, c: 20792}, {f: 2, c: 20797}, 20802, 20807, 20810,
  14830. 20812, {f: 3, c: 20814}, 20819, {f: 3, c: 20823}, 20827, {f: 5, c: 20829},
  14831. {f: 2, c: 20835}, {f: 2, c: 20838}, 20842, 20847, 20850, 20858,
  14832. {f: 2, c: 20862}, {f: 2, c: 20867}, {f: 2, c: 20870}, {f: 2, c: 20874},
  14833. {f: 4, c: 20878}, {f: 2, c: 20883}, 20888, 20890, {f: 3, c: 20893}, 20897,
  14834. 20899, {f: 5, c: 20902}, {f: 2, c: 20909}, 20916, {f: 3, c: 20920},
  14835. {f: 2, c: 20926}, {f: 3, c: 20929}, 20933, 20936, 20938, 20942, 20944,
  14836. {f: 9, c: 20946}, 20956, {f: 2, c: 20958}, {f: 2, c: 20962},
  14837. {f: 6, c: 20965}, 20972, 20974, 20978, 20980, 20983, 20990,
  14838. {f: 2, c: 20996}, 21001, {f: 2, c: 21003}, {f: 2, c: 21007},
  14839. {f: 3, c: 21011}, 21020, {f: 2, c: 21022}, {f: 3, c: 21025},
  14840. {f: 3, c: 21029}, 21034, 21036, 21039, {f: 2, c: 21041}, {f: 2, c: 21044},
  14841. 21052, 21054, {f: 2, c: 21061}, {f: 2, c: 21064}, {f: 2, c: 21070},
  14842. {f: 2, c: 21074}, 21077, {f: 4, c: 21079}, 21085, {f: 2, c: 21087},
  14843. {f: 3, c: 21090}, 21094, 21096, {f: 3, c: 21099}, {f: 2, c: 21104}, 21107,
  14844. {f: 7, c: 21110}, 21118, 21120, {f: 3, c: 21124}, 21131, {f: 2, c: 21134},
  14845. 21138, {f: 7, c: 21140}, 21148, {f: 4, c: 21156}, {f: 3, c: 21166},
  14846. {f: 10, c: 21172}, 21184, 21186, {f: 3, c: 21188}, 21192, 21194,
  14847. {f: 4, c: 21196}, 21201, {f: 2, c: 21203}, 21207, 21210, 21212,
  14848. {f: 2, c: 21216}, 21219, {f: 11, c: 21221}, {f: 3, c: 21234},
  14849. {f: 2, c: 21238}, {f: 3, c: 21243}, {f: 4, c: 21249}, 21255,
  14850. {f: 4, c: 21257}, 21262, {f: 4, c: 21265}, 21272, {f: 2, c: 21275},
  14851. {f: 2, c: 21278}, 21282, {f: 2, c: 21284}, {f: 3, c: 21287},
  14852. {f: 2, c: 21291}, 21296, {f: 6, c: 21298}, [12054, 21304],
  14853. {f: 2, c: 21308}, 21314, 21316, 21318, {f: 3, c: 21323}, 21328,
  14854. {f: 2, c: 21336}, 21339, 21341, 21349, 21352, 21354, {f: 2, c: 21356},
  14855. 21362, 21366, 21369, {f: 4, c: 21371}, {f: 2, c: 21376}, 21379,
  14856. {f: 2, c: 21383}, 21386, {f: 7, c: 21390}, {f: 2, c: 21398},
  14857. {f: 2, c: 21403}, 21406, 21409, 21412, 21415, {f: 3, c: 21418},
  14858. {f: 3, c: 21423}, 21427, 21429, {f: 4, c: 21431}, {f: 3, c: 21436}, 21440,
  14859. {f: 4, c: 21444}, {f: 3, c: 21454}, {f: 2, c: 21458}, 21461, 21466,
  14860. {f: 3, c: 21468}, 21473, 21479, 21492, 21498, {f: 3, c: 21502}, 21506,
  14861. 21509, 21511, 21515, 21524, {f: 3, c: 21528}, 21532, 21538,
  14862. {f: 2, c: 21540}, 21546, 21552, 21555, {f: 2, c: 21558}, 21562, 21565,
  14863. 21567, {f: 2, c: 21569}, {f: 2, c: 21572}, 21575, 21577, {f: 4, c: 21580},
  14864. 21585, 21594, {f: 5, c: 21597}, 21603, 21605, 21607, {f: 8, c: 21609},
  14865. 21620, {f: 2, c: 21625}, {f: 2, c: 21630}, 21633, 21635, 21637,
  14866. {f: 4, c: 21639}, 21645, 21649, 21651, {f: 2, c: 21655}, 21660,
  14867. {f: 5, c: 21662}, 21669, 21678, 21680, 21682, {f: 3, c: 21685},
  14868. {f: 2, c: 21689}, 21694, 21699, 21701, {f: 2, c: 21706}, 21718, 21720,
  14869. 21723, 21728, {f: 3, c: 21730}, {f: 2, c: 21739}, {f: 3, c: 21743},
  14870. {f: 6, c: 21748}, 21755, 21758, 21760, {f: 2, c: 21762}, 21765, 21768,
  14871. {f: 5, c: 21770}, {f: 2, c: 21778}, {f: 6, c: 21781}, {f: 4, c: 21788},
  14872. 21793, {f: 2, c: 21797}, {f: 2, c: 21800}, 21803, 21805, 21810,
  14873. {f: 3, c: 21812}, {f: 4, c: 21816}, 21821, 21824, 21826, 21829,
  14874. {f: 2, c: 21831}, {f: 4, c: 21835}, {f: 2, c: 21841}, 21844,
  14875. {f: 5, c: 21847}, 21853, {f: 2, c: 21855}, {f: 2, c: 21858},
  14876. {f: 2, c: 21864}, 21867, {f: 6, c: 21871}, {f: 2, c: 21881}, 21885, 21887,
  14877. {f: 2, c: 21893}, {f: 3, c: 21900}, 21904, {f: 2, c: 21906},
  14878. {f: 3, c: 21909}, {f: 2, c: 21914}, 21918, {f: 7, c: 21920},
  14879. {f: 2, c: 21928}, 21931, 21933, {f: 2, c: 21935}, 21940, 21942, 21944,
  14880. 21946, 21948, {f: 5, c: 21951}, 21960, {f: 2, c: 21962}, {f: 2, c: 21967},
  14881. 21973, {f: 3, c: 21975}, 21979, 21982, 21984, 21986, 21991,
  14882. {f: 2, c: 21997}, {f: 2, c: 22000}, 22004, {f: 5, c: 22008}, 22015,
  14883. {f: 4, c: 22018}, 22023, {f: 2, c: 22026}, {f: 4, c: 22032}, 22037,
  14884. {f: 2, c: 22041}, 22045, {f: 3, c: 22048}, {f: 2, c: 22053}, 22056,
  14885. {f: 2, c: 22058}, 22067, 22071, 22074, {f: 3, c: 22076}, 22080,
  14886. {f: 10, c: 22082}, {f: 5, c: 22095}, {f: 2, c: 22101}, {f: 2, c: 22106},
  14887. {f: 2, c: 22110}, 22113, 22115, 22119, {f: 2, c: 22125}, 22128, 22131,
  14888. 22133, 22135, 22138, {f: 3, c: 22141}, {f: 4, c: 22145}, {f: 4, c: 22152},
  14889. 22157, {f: 3, c: 22160}, 22164, {f: 3, c: 22166}, {f: 9, c: 22170},
  14890. {f: 2, c: 22180}, 22183, {f: 5, c: 22185}, {f: 3, c: 22192}, 22197,
  14891. {f: 4, c: 22200}, {f: 3, c: 22205}, {f: 2, c: 22211}, {f: 2, c: 22214},
  14892. 22219, {f: 4, c: 22221}, {f: 2, c: 22226}, {f: 2, c: 22229},
  14893. {f: 2, c: 22232}, 22236, 22243, {f: 6, c: 22245}, 22252, {f: 2, c: 22254},
  14894. {f: 2, c: 22258}, {f: 3, c: 22262}, {f: 2, c: 22267}, {f: 3, c: 22272},
  14895. 22277, 22284, {f: 4, c: 22286}, {f: 2, c: 22292}, 22295, {f: 3, c: 22297},
  14896. {f: 2, c: 22301}, {f: 3, c: 22304}, {f: 4, c: 22308}, 22315,
  14897. {f: 2, c: 22321}, {f: 5, c: 22324}, {f: 2, c: 22332}, 22335, 22337,
  14898. {f: 4, c: 22339}, {f: 2, c: 22344}, 22347, {f: 5, c: 22354},
  14899. {f: 2, c: 22360}, {f: 2, c: 22370}, 22373, 22375, 22380, 22382,
  14900. {f: 3, c: 22384}, {f: 2, c: 22388}, {f: 3, c: 22392}, {f: 5, c: 22397},
  14901. {f: 4, c: 22407}, {f: 5, c: 22413}, {f: 7, c: 22420}, {f: 4, c: 22428},
  14902. 22437, 22440, 22442, 22444, {f: 3, c: 22447}, 22451, {f: 3, c: 22453},
  14903. {f: 9, c: 22457}, {f: 7, c: 22468}, {f: 2, c: 22476}, {f: 2, c: 22480},
  14904. 22483, {f: 2, c: 22486}, {f: 2, c: 22491}, 22494, {f: 2, c: 22498},
  14905. {f: 8, c: 22501}, 22510, {f: 4, c: 22512}, {f: 2, c: 22517},
  14906. {f: 2, c: 22523}, {f: 2, c: 22526}, 22529, {f: 2, c: 22531},
  14907. {f: 2, c: 22536}, 22540, {f: 3, c: 22542}, {f: 3, c: 22546},
  14908. {f: 2, c: 22551}, {f: 3, c: 22554}, 22559, {f: 2, c: 22562},
  14909. {f: 5, c: 22565}, {f: 4, c: 22571}, {f: 2, c: 22578}, {f: 14, c: 22582},
  14910. {f: 5, c: 22597}, 22606, 22608, 22611, {f: 2, c: 22613}, {f: 5, c: 22617},
  14911. {f: 3, c: 22623}, 22627, {f: 5, c: 22630}, {f: 8, c: 22637},
  14912. {f: 3, c: 22646}, {f: 4, c: 22650}, 22655, 22658, 22660, {f: 3, c: 22662},
  14913. {f: 7, c: 22667}, {f: 5, c: 22676}, 22683, 22685, {f: 8, c: 22688},
  14914. {f: 4, c: 22698}, {f: 4, c: 22703}, {f: 7, c: 22708}, 22717,
  14915. {f: 2, c: 22719}, {f: 3, c: 22722}, 22726, {f: 9, c: 22728}, 22738, 22740,
  14916. {f: 2, c: 22742}, {f: 3, c: 22747}, 22753, 22755, {f: 4, c: 22757}, 22762,
  14917. 22765, {f: 2, c: 22769}, {f: 2, c: 22772}, {f: 2, c: 22775},
  14918. {f: 2, c: 22779}, {f: 4, c: 22782}, 22787, {f: 2, c: 22789},
  14919. {f: 2, c: 22792}, [12066, 22794], {f: 2, c: 22795}, 22798,
  14920. {f: 4, c: 22800}, {f: 2, c: 22807}, 22811, {f: 2, c: 22813},
  14921. {f: 2, c: 22816}, 22819, 22822, 22824, 22828, 22832, {f: 2, c: 22834},
  14922. {f: 2, c: 22837}, 22843, 22845, {f: 2, c: 22847}, 22851, {f: 2, c: 22853},
  14923. 22858, {f: 2, c: 22860}, 22864, {f: 2, c: 22866}, 22873, {f: 5, c: 22875},
  14924. 22881, {f: 2, c: 22883}, {f: 3, c: 22886}, 22891, 22893, {f: 4, c: 22895},
  14925. 22901, 22903, {f: 3, c: 22906}, {f: 3, c: 22910}, 22917, 22921,
  14926. {f: 2, c: 22923}, {f: 4, c: 22926}, {f: 2, c: 22932}, 22936,
  14927. {f: 3, c: 22938}, {f: 4, c: 22943}, {f: 2, c: 22950}, {f: 2, c: 22956},
  14928. {f: 2, c: 22960}, {f: 6, c: 22963}, 22970, {f: 2, c: 22972},
  14929. {f: 7, c: 22975}, {f: 3, c: 22983}, {f: 4, c: 22988}, {f: 2, c: 22997},
  14930. 23001, 23003, {f: 5, c: 23006}, 23012, {f: 2, c: 23014}, {f: 3, c: 23017},
  14931. {f: 12, c: 23021}, 23034, {f: 3, c: 23036}, 23040, 23042, {f: 2, c: 23050},
  14932. {f: 4, c: 23053}, 23058, {f: 4, c: 23060}, {f: 3, c: 23065},
  14933. {f: 2, c: 23069}, {f: 2, c: 23073}, 23076, {f: 3, c: 23078},
  14934. {f: 7, c: 23082}, 23091, 23093, {f: 5, c: 23095}, {f: 3, c: 23101},
  14935. {f: 4, c: 23106}, {f: 2, c: 23111}, {f: 10, c: 23115}, {f: 4, c: 23126},
  14936. {f: 7, c: 23131}, {f: 3, c: 23139}, {f: 2, c: 23144}, {f: 2, c: 23147},
  14937. {f: 6, c: 23150}, {f: 2, c: 23160}, {f: 4, c: 23163}, {f: 18, c: 23168},
  14938. {f: 7, c: 23187}, {f: 11, c: 23196}, {f: 2, c: 23208}, {f: 7, c: 23211},
  14939. 23220, {f: 2, c: 23222}, {f: 4, c: 23225}, {f: 2, c: 23231},
  14940. {f: 6, c: 23235}, {f: 2, c: 23242}, {f: 5, c: 23245}, 23251, 23253,
  14941. {f: 3, c: 23257}, {f: 3, c: 23261}, 23266, {f: 2, c: 23268},
  14942. {f: 2, c: 23271}, 23274, {f: 5, c: 23276}, {f: 3, c: 23282},
  14943. {f: 5, c: 23286}, {f: 4, c: 23292}, {f: 7, c: 23297}, 23306,
  14944. {f: 9, c: 23309}, 23320, {f: 7, c: 23322}, {f: 8, c: 23330},
  14945. {f: 5, c: 23339}, 23345, 23347, {f: 2, c: 23349}, {f: 7, c: 23353},
  14946. {f: 11, c: 23361}, {f: 3, c: 23373}, 23378, 23382, 23390, {f: 2, c: 23392},
  14947. {f: 2, c: 23399}, {f: 3, c: 23405}, 23410, 23412, {f: 2, c: 23414}, 23417,
  14948. {f: 2, c: 23419}, 23422, 23426, 23430, 23434, {f: 2, c: 23437},
  14949. {f: 3, c: 23440}, 23444, 23446, 23455, {f: 3, c: 23463}, {f: 4, c: 23468},
  14950. {f: 2, c: 23473}, 23479, {f: 3, c: 23482}, {f: 2, c: 23488}, 23491,
  14951. {f: 4, c: 23496}, {f: 3, c: 23501}, 23505, {f: 9, c: 23508}, 23520, 23523,
  14952. 23530, 23533, 23535, {f: 4, c: 23537}, 23543, {f: 2, c: 23549}, 23552,
  14953. {f: 2, c: 23554}, 23557, 23564, 23568, {f: 2, c: 23570}, 23575, 23577,
  14954. 23579, {f: 4, c: 23582}, 23587, 23590, {f: 4, c: 23592}, {f: 4, c: 23597},
  14955. {f: 2, c: 23602}, {f: 2, c: 23605}, {f: 2, c: 23619}, {f: 2, c: 23622},
  14956. {f: 2, c: 23628}, {f: 3, c: 23634}, {f: 3, c: 23638}, {f: 4, c: 23642},
  14957. 23647, 23655, {f: 3, c: 23657}, 23661, 23664, {f: 7, c: 23666},
  14958. {f: 4, c: 23675}, 23680, {f: 5, c: 23683}, {f: 3, c: 23689},
  14959. {f: 2, c: 23694}, {f: 2, c: 23698}, 23701, {f: 4, c: 23709},
  14960. {f: 5, c: 23716}, 23722, {f: 3, c: 23726}, 23730, 23732, 23734,
  14961. {f: 4, c: 23737}, 23742, 23744, {f: 2, c: 23746}, {f: 6, c: 23749},
  14962. {f: 6, c: 23756}, {f: 6, c: 23763}, {f: 7, c: 23770}, {f: 2, c: 23778},
  14963. 23783, 23785, {f: 2, c: 23787}, {f: 2, c: 23790}, {f: 3, c: 23793}, 23797,
  14964. {f: 4, c: 23799}, 23804, {f: 4, c: 23806}, {f: 2, c: 23812},
  14965. {f: 5, c: 23816}, {f: 5, c: 23823}, 23829, {f: 3, c: 23832},
  14966. {f: 2, c: 23836}, {f: 5, c: 23839}, 23845, 23848, {f: 2, c: 23850},
  14967. {f: 5, c: 23855}, {f: 8, c: 23861}, {f: 8, c: 23871}, {f: 2, c: 23880},
  14968. {f: 3, c: 23885}, {f: 7, c: 23889}, {f: 2, c: 23897}, 23900,
  14969. {f: 11, c: 23902}, 23914, {f: 2, c: 23917}, {f: 4, c: 23920},
  14970. {f: 12, c: 23925}, 23939, {f: 2, c: 23941}, {f: 15, c: 23944}, 23960,
  14971. {f: 3, c: 23962}, {f: 2, c: 23966}, {f: 6, c: 23969}, {f: 15, c: 23976},
  14972. 23993, 23995, {f: 8, c: 23997}, {f: 5, c: 24006}, 24012, {f: 4, c: 24014},
  14973. 24019, {f: 6, c: 24021}, 24028, {f: 2, c: 24031}, {f: 2, c: 24035}, 24042,
  14974. {f: 2, c: 24044}, {f: 2, c: 24053}, {f: 5, c: 24056}, {f: 2, c: 24063},
  14975. 24068, 24071, {f: 3, c: 24073}, {f: 2, c: 24077}, {f: 2, c: 24082}, 24087,
  14976. {f: 7, c: 24094}, {f: 3, c: 24104}, 24108, {f: 2, c: 24111}, 24114,
  14977. {f: 2, c: 24116}, {f: 2, c: 24121}, {f: 2, c: 24126}, 24129,
  14978. {f: 6, c: 24134}, {f: 7, c: 24141}, 24150, {f: 2, c: 24153},
  14979. {f: 2, c: 24156}, 24160, {f: 7, c: 24164}, {f: 5, c: 24173}, 24181, 24183,
  14980. {f: 3, c: 24193}, 24197, {f: 2, c: 24200}, {f: 3, c: 24204}, 24210, 24216,
  14981. 24219, 24221, {f: 4, c: 24225}, {f: 3, c: 24232}, 24236, {f: 5, c: 24238},
  14982. 24244, {f: 4, c: 24250}, {f: 10, c: 24255}, {f: 6, c: 24267},
  14983. {f: 2, c: 24276}, {f: 4, c: 24279}, {f: 3, c: 24284}, {f: 4, c: 24292},
  14984. 24297, 24299, {f: 6, c: 24301}, 24309, {f: 2, c: 24312}, {f: 3, c: 24315},
  14985. {f: 3, c: 24325}, 24329, {f: 3, c: 24332}, 24336, 24338, 24340, 24342,
  14986. {f: 2, c: 24345}, {f: 3, c: 24348}, {f: 4, c: 24353}, 24360,
  14987. {f: 2, c: 24363}, 24366, 24368, 24370, 24372, {f: 3, c: 24374}, 24379,
  14988. {f: 3, c: 24381}, {f: 5, c: 24385}, 24391, {f: 3, c: 24393}, 24397, 24399,
  14989. 24401, 24404, {f: 3, c: 24410}, {f: 3, c: 24414}, 24419, 24421,
  14990. {f: 2, c: 24423}, 24427, {f: 2, c: 24430}, 24434, {f: 3, c: 24436}, 24440,
  14991. 24442, {f: 3, c: 24445}, 24451, 24454, {f: 3, c: 24461}, {f: 2, c: 24467},
  14992. 24470, {f: 2, c: 24474}, 24477, 24479, {f: 6, c: 24482}, {f: 2, c: 24491},
  14993. {f: 6, c: 24495}, 24502, 24504, {f: 2, c: 24506}, {f: 5, c: 24510},
  14994. {f: 2, c: 24519}, {f: 2, c: 24522}, 24526, {f: 3, c: 24531},
  14995. {f: 3, c: 24538}, {f: 2, c: 24542}, {f: 2, c: 24546}, {f: 2, c: 24549},
  14996. {f: 2, c: 24552}, 24556, {f: 2, c: 24559}, {f: 3, c: 24562},
  14997. {f: 2, c: 24566}, {f: 2, c: 24569}, 24572, {f: 3, c: 24583},
  14998. {f: 2, c: 24587}, {f: 2, c: 24592}, 24595, {f: 2, c: 24599}, 24602,
  14999. {f: 2, c: 24606}, {f: 3, c: 24610}, {f: 3, c: 24620}, {f: 5, c: 24624},
  15000. {f: 5, c: 24630}, {f: 2, c: 24637}, 24640, {f: 7, c: 24644}, 24652,
  15001. {f: 2, c: 24654}, 24657, {f: 2, c: 24659}, {f: 3, c: 24662},
  15002. {f: 2, c: 24667}, {f: 4, c: 24670}, {f: 2, c: 24677}, 24686,
  15003. {f: 2, c: 24689}, {f: 2, c: 24692}, 24695, 24702, {f: 3, c: 24704},
  15004. {f: 4, c: 24709}, {f: 2, c: 24714}, {f: 4, c: 24718}, 24723, 24725,
  15005. {f: 3, c: 24727}, 24732, 24734, {f: 2, c: 24737}, {f: 2, c: 24740}, 24743,
  15006. {f: 2, c: 24745}, 24750, 24752, 24755, 24759, {f: 2, c: 24761},
  15007. {f: 8, c: 24765}, {f: 3, c: 24775}, {f: 5, c: 24780}, {f: 3, c: 24786},
  15008. {f: 2, c: 24790}, 24793, 24795, 24798, {f: 4, c: 24802}, 24810, 24821,
  15009. {f: 2, c: 24823}, {f: 4, c: 24828}, {f: 4, c: 24834}, 24839,
  15010. {f: 3, c: 24842}, {f: 5, c: 24848}, {f: 4, c: 24854}, {f: 2, c: 24861},
  15011. {f: 2, c: 24865}, 24869, {f: 3, c: 24872}, {f: 8, c: 24876},
  15012. {f: 2, c: 24885}, {f: 6, c: 24888}, {f: 8, c: 24896}, 24905, 24909,
  15013. {f: 2, c: 24911}, {f: 3, c: 24914}, {f: 2, c: 24918}, 24921,
  15014. {f: 2, c: 24923}, 24926, {f: 2, c: 24928}, {f: 2, c: 24933}, 24937,
  15015. {f: 2, c: 24940}, 24943, {f: 2, c: 24945}, 24948, {f: 10, c: 24952},
  15016. {f: 7, c: 24963}, {f: 2, c: 24972}, 24975, 24979, {f: 5, c: 24981},
  15017. {f: 2, c: 24987}, {f: 6, c: 24990}, {f: 2, c: 24997}, 25002, 25005,
  15018. {f: 3, c: 25007}, {f: 3, c: 25011}, {f: 6, c: 25016}, {f: 3, c: 25023},
  15019. {f: 4, c: 25027}, {f: 4, c: 25037}, 25043, {f: 9, c: 25045},
  15020. {f: 3, c: 25056}, {f: 2, c: 25060}, 25063, {f: 9, c: 25065},
  15021. {f: 2, c: 25075}, 25081, 25083, 25085, {f: 5, c: 25089}, 25097, 25107,
  15022. 25113, {f: 3, c: 25116}, 25120, 25123, 25126, {f: 2, c: 25128}, 25131,
  15023. 25133, 25135, 25137, 25141, [12094, 25142], {f: 5, c: 25144}, 25154,
  15024. {f: 3, c: 25156}, 25162, {f: 2, c: 25167}, {f: 3, c: 25173},
  15025. {f: 2, c: 25177}, {f: 7, c: 25180}, {f: 2, c: 25188}, 25192,
  15026. {f: 2, c: 25201}, {f: 2, c: 25204}, {f: 2, c: 25207}, {f: 2, c: 25210},
  15027. 25213, {f: 3, c: 25217}, {f: 4, c: 25221}, {f: 6, c: 25227}, 25236, 25241,
  15028. {f: 3, c: 25244}, 25251, {f: 2, c: 25254}, {f: 2, c: 25257},
  15029. {f: 4, c: 25261}, {f: 3, c: 25266}, {f: 3, c: 25270}, 25274, 25278,
  15030. {f: 2, c: 25280}, 25283, 25291, 25295, 25297, 25301, {f: 2, c: 25309},
  15031. {f: 2, c: 25312}, 25316, {f: 2, c: 25322}, 25328, 25330, 25333,
  15032. {f: 4, c: 25336}, 25344, {f: 4, c: 25347}, {f: 4, c: 25354},
  15033. {f: 2, c: 25359}, {f: 4, c: 25362}, {f: 3, c: 25367}, 25372,
  15034. {f: 2, c: 25382}, 25385, {f: 3, c: 25388}, {f: 2, c: 25392},
  15035. {f: 6, c: 25395}, {f: 2, c: 25403}, {f: 3, c: 25407}, 25412,
  15036. {f: 2, c: 25415}, 25418, {f: 4, c: 25425}, {f: 8, c: 25430}, 25440,
  15037. {f: 3, c: 25444}, 25450, 25452, {f: 2, c: 25455}, {f: 3, c: 25459},
  15038. {f: 2, c: 25464}, {f: 4, c: 25468}, 25473, {f: 2, c: 25477}, 25483, 25485,
  15039. 25489, {f: 3, c: 25491}, 25495, {f: 7, c: 25497}, 25505, 25508, 25510,
  15040. 25515, 25519, {f: 2, c: 25521}, {f: 2, c: 25525}, 25529, 25531, 25533,
  15041. 25535, {f: 3, c: 25537}, 25541, {f: 2, c: 25543}, {f: 3, c: 25546}, 25553,
  15042. {f: 3, c: 25555}, {f: 3, c: 25559}, {f: 3, c: 25563}, 25567, 25570,
  15043. {f: 5, c: 25572}, {f: 2, c: 25579}, {f: 3, c: 25583}, 25587, 25589, 25591,
  15044. {f: 4, c: 25593}, 25598, {f: 2, c: 25603}, {f: 5, c: 25606}, 25614,
  15045. {f: 2, c: 25617}, {f: 2, c: 25621}, {f: 3, c: 25624}, 25629, 25631,
  15046. {f: 4, c: 25634}, {f: 3, c: 25639}, 25643, {f: 6, c: 25646}, 25653,
  15047. {f: 3, c: 25655}, {f: 2, c: 25659}, 25662, 25664, {f: 2, c: 25666}, 25673,
  15048. {f: 6, c: 25675}, 25683, {f: 3, c: 25685}, {f: 3, c: 25689}, 25693,
  15049. {f: 7, c: 25696}, 25704, {f: 3, c: 25706}, 25710, {f: 3, c: 25712},
  15050. {f: 2, c: 25716}, 25719, {f: 6, c: 25724}, 25731, 25734, {f: 8, c: 25737},
  15051. 25748, {f: 2, c: 25751}, {f: 4, c: 25754}, {f: 3, c: 25760},
  15052. {f: 3, c: 25766}, 25770, 25775, 25777, 25780, 25782, 25785, 25789, 25795,
  15053. 25798, {f: 2, c: 25800}, 25804, 25807, 25809, 25811, {f: 2, c: 25813},
  15054. 25817, {f: 3, c: 25819}, 25823, 25825, 25827, 25829, {f: 5, c: 25831},
  15055. {f: 2, c: 25837}, 25843, {f: 2, c: 25845}, {f: 2, c: 25848}, 25853, 25855,
  15056. {f: 3, c: 25857}, 25861, {f: 2, c: 25863}, {f: 5, c: 25866},
  15057. {f: 2, c: 25872}, 25875, 25877, 25879, 25882, 25884, {f: 4, c: 25886},
  15058. {f: 4, c: 25894}, 25901, {f: 4, c: 25904}, 25911, 25914, {f: 2, c: 25916},
  15059. {f: 5, c: 25920}, {f: 2, c: 25926}, {f: 2, c: 25930}, {f: 2, c: 25933},
  15060. 25936, {f: 3, c: 25938}, 25944, 25946, 25948, {f: 3, c: 25951},
  15061. {f: 2, c: 25956}, {f: 4, c: 25959}, {f: 3, c: 25965}, 25969, 25971, 25974,
  15062. {f: 9, c: 25977}, {f: 3, c: 25988}, {f: 3, c: 25992}, {f: 3, c: 25997},
  15063. 26002, 26004, 26006, 26008, 26010, {f: 2, c: 26013}, 26016,
  15064. {f: 2, c: 26018}, 26022, 26024, 26026, 26030, {f: 6, c: 26033}, 26040,
  15065. {f: 2, c: 26042}, {f: 3, c: 26046}, 26050, {f: 4, c: 26055}, 26061,
  15066. {f: 2, c: 26064}, {f: 3, c: 26067}, {f: 8, c: 26072}, 26081,
  15067. {f: 2, c: 26083}, {f: 2, c: 26090}, {f: 4, c: 26098}, {f: 2, c: 26104},
  15068. {f: 5, c: 26107}, 26113, {f: 2, c: 26116}, {f: 3, c: 26119}, 26123, 26125,
  15069. {f: 3, c: 26128}, {f: 3, c: 26134}, {f: 3, c: 26138}, 26142,
  15070. {f: 4, c: 26145}, 26150, {f: 4, c: 26153}, 26158, 26160, {f: 2, c: 26162},
  15071. {f: 5, c: 26167}, 26173, {f: 2, c: 26175}, {f: 7, c: 26180},
  15072. {f: 2, c: 26189}, {f: 2, c: 26192}, {f: 2, c: 26200}, {f: 2, c: 26203},
  15073. 26206, 26208, {f: 2, c: 26210}, 26213, 26215, {f: 5, c: 26217},
  15074. {f: 3, c: 26225}, 26229, {f: 2, c: 26232}, {f: 3, c: 26235},
  15075. {f: 3, c: 26239}, 26243, {f: 2, c: 26245}, {f: 2, c: 26250},
  15076. {f: 4, c: 26253}, {f: 4, c: 26258}, {f: 5, c: 26264}, {f: 4, c: 26270},
  15077. {f: 4, c: 26275}, {f: 2, c: 26281}, {f: 2, c: 26284}, {f: 5, c: 26287},
  15078. {f: 4, c: 26293}, {f: 4, c: 26298}, {f: 5, c: 26303}, 26309, 26312,
  15079. {f: 12, c: 26314}, {f: 2, c: 26327}, 26330, {f: 2, c: 26334},
  15080. {f: 5, c: 26337}, {f: 2, c: 26343}, {f: 2, c: 26346}, {f: 3, c: 26349},
  15081. 26353, {f: 2, c: 26357}, {f: 2, c: 26362}, 26365, {f: 2, c: 26369},
  15082. {f: 4, c: 26372}, 26380, {f: 2, c: 26382}, {f: 3, c: 26385}, 26390,
  15083. {f: 3, c: 26392}, 26396, 26398, {f: 6, c: 26400}, 26409, 26414, 26416,
  15084. {f: 2, c: 26418}, {f: 4, c: 26422}, {f: 2, c: 26427}, {f: 2, c: 26430},
  15085. 26433, {f: 2, c: 26436}, 26439, {f: 2, c: 26442}, 26445, 26450,
  15086. {f: 2, c: 26452}, {f: 5, c: 26455}, 26461, {f: 3, c: 26466},
  15087. {f: 2, c: 26470}, {f: 2, c: 26475}, 26478, 26484, 26486, {f: 4, c: 26488},
  15088. 26493, 26496, {f: 2, c: 26498}, {f: 2, c: 26501}, 26504, 26506,
  15089. {f: 4, c: 26508}, {f: 4, c: 26513}, 26518, 26521, 26523, {f: 3, c: 26527},
  15090. 26532, 26534, 26537, 26540, 26542, {f: 2, c: 26545}, 26548,
  15091. {f: 8, c: 26553}, 26562, {f: 10, c: 26565}, {f: 3, c: 26581}, 26587, 26591,
  15092. 26593, {f: 2, c: 26595}, {f: 3, c: 26598}, {f: 2, c: 26602},
  15093. {f: 2, c: 26605}, 26610, {f: 8, c: 26613}, 26622, {f: 4, c: 26625}, 26630,
  15094. 26637, 26640, 26642, {f: 2, c: 26644}, {f: 5, c: 26648}, {f: 3, c: 26654},
  15095. {f: 7, c: 26658}, {f: 7, c: 26667}, {f: 3, c: 26676}, {f: 2, c: 26682},
  15096. 26687, 26695, 26699, 26701, 26703, 26706, {f: 10, c: 26710}, 26730,
  15097. {f: 8, c: 26732}, 26741, {f: 9, c: 26744}, 26754, 26756, {f: 8, c: 26759},
  15098. {f: 3, c: 26768}, {f: 3, c: 26772}, {f: 4, c: 26777}, 26782,
  15099. {f: 2, c: 26784}, {f: 3, c: 26787}, {f: 4, c: 26793}, 26798,
  15100. {f: 2, c: 26801}, 26804, {f: 10, c: 26806}, 26817, {f: 6, c: 26819}, 26826,
  15101. 26828, {f: 4, c: 26830}, {f: 2, c: 26835}, 26841, {f: 4, c: 26843},
  15102. {f: 2, c: 26849}, {f: 3, c: 26852}, {f: 6, c: 26856}, 26863,
  15103. {f: 3, c: 26866}, {f: 3, c: 26870}, 26875, {f: 4, c: 26877},
  15104. {f: 3, c: 26882}, {f: 5, c: 26886}, 26892, 26897, {f: 12, c: 26899},
  15105. {f: 3, c: 26913}, {f: 8, c: 26917}, {f: 2, c: 26926}, {f: 3, c: 26929},
  15106. {f: 4, c: 26933}, {f: 3, c: 26938}, 26942, {f: 2, c: 26944},
  15107. {f: 7, c: 26947}, {f: 8, c: 26955}, {f: 2, c: 26965}, {f: 2, c: 26968},
  15108. {f: 2, c: 26971}, 26975, {f: 2, c: 26977}, {f: 2, c: 26980}, 26983,
  15109. {f: 2, c: 26985}, 26988, {f: 2, c: 26991}, {f: 3, c: 26994}, 26998,
  15110. {f: 2, c: 27002}, {f: 3, c: 27005}, 27009, 27011, 27013, {f: 3, c: 27018},
  15111. {f: 6, c: 27022}, {f: 2, c: 27030}, {f: 2, c: 27033}, {f: 10, c: 27037},
  15112. 27049, 27052, {f: 2, c: 27055}, {f: 2, c: 27058}, {f: 2, c: 27061},
  15113. {f: 3, c: 27064}, {f: 3, c: 27068}, 27072, {f: 8, c: 27074}, 27087,
  15114. {f: 3, c: 27089}, {f: 6, c: 27093}, {f: 3, c: 27100}, {f: 6, c: 27105},
  15115. {f: 5, c: 27112}, {f: 4, c: 27118}, {f: 9, c: 27124}, 27134, 27136,
  15116. {f: 2, c: 27139}, {f: 4, c: 27142}, {f: 8, c: 27147}, {f: 3, c: 27156},
  15117. {f: 4, c: 27162}, 27168, 27170, {f: 4, c: 27172}, 27177, {f: 4, c: 27179},
  15118. 27184, {f: 3, c: 27186}, {f: 2, c: 27190}, {f: 2, c: 27195},
  15119. {f: 5, c: 27199}, {f: 2, c: 27205}, {f: 2, c: 27209}, {f: 4, c: 27212},
  15120. {f: 7, c: 27217}, 27226, {f: 3, c: 27228}, 27232, {f: 2, c: 27235},
  15121. {f: 11, c: 27238}, {f: 7, c: 27250}, {f: 2, c: 27258}, {f: 3, c: 27261},
  15122. {f: 3, c: 27265}, {f: 4, c: 27269}, {f: 4, c: 27274}, 27279,
  15123. {f: 2, c: 27282}, {f: 2, c: 27285}, {f: 4, c: 27288}, {f: 3, c: 27293},
  15124. 27297, {f: 5, c: 27300}, 27306, {f: 2, c: 27309}, {f: 3, c: 27312},
  15125. {f: 4, c: 27316}, {f: 2, c: 27321}, {f: 7, c: 27324}, {f: 15, c: 27332},
  15126. {f: 6, c: 27348}, 27356, {f: 7, c: 27360}, 27369, 27371, {f: 6, c: 27373},
  15127. {f: 4, c: 27380}, {f: 2, c: 27385}, {f: 8, c: 27388}, {f: 5, c: 27397},
  15128. {f: 4, c: 27403}, {f: 2, c: 27408}, {f: 3, c: 27411}, {f: 7, c: 27415},
  15129. 27423, {f: 2, c: 27429}, {f: 10, c: 27432}, {f: 4, c: 27443}, 27448,
  15130. {f: 2, c: 27451}, {f: 4, c: 27455}, {f: 2, c: 27460}, 27464,
  15131. {f: 2, c: 27466}, {f: 3, c: 27469}, {f: 8, c: 27473}, {f: 5, c: 27482},
  15132. 27488, {f: 2, c: 27496}, {f: 7, c: 27499}, {f: 4, c: 27507}, 27514,
  15133. {f: 4, c: 27517}, 27525, 27528, 27532, {f: 4, c: 27534}, {f: 2, c: 27540},
  15134. 27543, 27545, {f: 2, c: 27548}, {f: 2, c: 27551}, {f: 2, c: 27554},
  15135. {f: 5, c: 27557}, {f: 2, c: 27564}, {f: 2, c: 27568}, 27574,
  15136. {f: 2, c: 27576}, {f: 3, c: 27580}, 27584, {f: 2, c: 27587},
  15137. {f: 4, c: 27591}, 27596, 27598, {f: 2, c: 27600}, 27608, 27610,
  15138. {f: 5, c: 27612}, {f: 8, c: 27618}, {f: 3, c: 27628}, {f: 3, c: 27632},
  15139. 27636, {f: 3, c: 27638}, {f: 3, c: 27642}, 27646, {f: 5, c: 27648},
  15140. {f: 3, c: 27657}, 27662, 27666, 27671, {f: 3, c: 27676}, 27680, 27685,
  15141. 27693, 27697, 27699, {f: 2, c: 27702}, {f: 4, c: 27705}, {f: 2, c: 27710},
  15142. {f: 3, c: 27715}, 27720, {f: 5, c: 27723}, {f: 3, c: 27729}, 27734,
  15143. {f: 3, c: 27736}, {f: 2, c: 27746}, {f: 3, c: 27749}, {f: 5, c: 27755},
  15144. 27761, 27763, 27765, {f: 2, c: 27767}, {f: 3, c: 27770}, {f: 2, c: 27775},
  15145. 27780, 27783, {f: 2, c: 27786}, {f: 2, c: 27789}, {f: 2, c: 27793},
  15146. {f: 4, c: 27797}, 27802, {f: 3, c: 27804}, 27808, 27810, 27816, 27820,
  15147. {f: 2, c: 27823}, {f: 4, c: 27828}, 27834, {f: 4, c: 27840},
  15148. {f: 3, c: 27846}, 27851, {f: 3, c: 27853}, {f: 2, c: 27857},
  15149. {f: 3, c: 27864}, {f: 2, c: 27868}, 27871, 27876, {f: 2, c: 27878}, 27881,
  15150. {f: 2, c: 27884}, 27890, 27892, 27897, {f: 2, c: 27903}, {f: 2, c: 27906},
  15151. {f: 2, c: 27909}, {f: 3, c: 27912}, 27917, {f: 3, c: 27919},
  15152. {f: 4, c: 27923}, 27928, {f: 2, c: 27932}, {f: 6, c: 27935}, 27942,
  15153. {f: 2, c: 27944}, {f: 2, c: 27948}, {f: 2, c: 27951}, 27956,
  15154. {f: 3, c: 27958}, 27962, {f: 2, c: 27967}, 27970, 27972, 27977, 27980,
  15155. 27984, {f: 4, c: 27989}, 27995, 27997, 27999, {f: 2, c: 28001},
  15156. {f: 2, c: 28004}, {f: 2, c: 28007}, {f: 3, c: 28011}, {f: 4, c: 28016},
  15157. {f: 2, c: 28021}, {f: 2, c: 28026}, {f: 5, c: 28029}, {f: 2, c: 28035},
  15158. 28038, {f: 2, c: 28042}, 28045, {f: 2, c: 28047}, 28050, {f: 5, c: 28054},
  15159. 28060, 28066, 28069, {f: 2, c: 28076}, {f: 2, c: 28080}, {f: 2, c: 28083},
  15160. {f: 2, c: 28086}, {f: 6, c: 28089}, {f: 3, c: 28097}, {f: 3, c: 28104},
  15161. {f: 4, c: 28109}, {f: 4, c: 28114}, 28119, {f: 3, c: 28122}, 28127,
  15162. {f: 2, c: 28130}, 28133, {f: 3, c: 28135}, 28141, {f: 2, c: 28143}, 28146,
  15163. 28148, 28152, {f: 8, c: 28157}, {f: 4, c: 28166}, 28171, 28175,
  15164. {f: 2, c: 28178}, 28181, {f: 2, c: 28184}, {f: 2, c: 28187},
  15165. {f: 2, c: 28190}, 28194, {f: 2, c: 28199}, 28202, 28206, {f: 2, c: 28208},
  15166. 28211, {f: 3, c: 28213}, 28217, {f: 3, c: 28219}, {f: 4, c: 28223},
  15167. {f: 8, c: 28229}, {f: 4, c: 28239}, 28245, 28247, {f: 2, c: 28249},
  15168. {f: 2, c: 28252}, {f: 11, c: 28256}, {f: 2, c: 28268}, {f: 14, c: 28272},
  15169. {f: 3, c: 28288}, 28292, {f: 2, c: 28295}, {f: 5, c: 28298},
  15170. {f: 5, c: 28305}, 28311, {f: 3, c: 28313}, 28318, {f: 2, c: 28320},
  15171. {f: 2, c: 28323}, 28326, {f: 2, c: 28328}, {f: 4, c: 28331}, 28336, 28339,
  15172. 28341, {f: 2, c: 28344}, 28348, {f: 3, c: 28350}, 28355, 28358,
  15173. {f: 3, c: 28360}, 28365, 28368, 28370, 28374, {f: 2, c: 28376},
  15174. {f: 3, c: 28379}, 28387, 28391, {f: 2, c: 28394}, {f: 2, c: 28397},
  15175. {f: 2, c: 28400}, 28403, {f: 2, c: 28405}, {f: 5, c: 28410}, 28416,
  15176. {f: 3, c: 28419}, {f: 2, c: 28423}, {f: 5, c: 28426}, {f: 3, c: 28432},
  15177. {f: 4, c: 28438}, {f: 5, c: 28443}, 28449, {f: 4, c: 28453}, 28462, 28464,
  15178. {f: 2, c: 28468}, 28471, {f: 5, c: 28473}, 28480, {f: 4, c: 28482},
  15179. {f: 3, c: 28488}, 28492, {f: 3, c: 28494}, {f: 2, c: 28498},
  15180. {f: 3, c: 28501}, {f: 2, c: 28506}, 28509, {f: 3, c: 28511}, 28515, 28517,
  15181. {f: 6, c: 28519}, 28529, 28531, {f: 2, c: 28533}, 28537, 28539,
  15182. {f: 2, c: 28541}, {f: 3, c: 28545}, 28549, {f: 2, c: 28554},
  15183. {f: 8, c: 28559}, {f: 4, c: 28568}, {f: 3, c: 28573}, {f: 2, c: 28578},
  15184. {f: 2, c: 28581}, 28584, {f: 4, c: 28586}, {f: 2, c: 28591}, 28594,
  15185. {f: 2, c: 28596}, {f: 2, c: 28599}, {f: 6, c: 28602}, {f: 5, c: 28612},
  15186. {f: 7, c: 28618}, {f: 2, c: 28627}, {f: 2, c: 28630}, {f: 2, c: 28633},
  15187. {f: 2, c: 28636}, {f: 2, c: 28642}, {f: 6, c: 28645}, {f: 2, c: 28652},
  15188. {f: 8, c: 28658}, 28667, 28669, {f: 6, c: 28671}, {f: 2, c: 28679}, 28682,
  15189. {f: 3, c: 28684}, 28688, {f: 3, c: 28690}, {f: 2, c: 28694}, 28697, 28700,
  15190. 28702, {f: 2, c: 28705}, {f: 3, c: 28708}, {f: 7, c: 28713}, 28721,
  15191. {f: 2, c: 28723}, {f: 3, c: 28726}, {f: 4, c: 28730}, {f: 4, c: 28735},
  15192. {f: 7, c: 28741}, {f: 2, c: 28749}, 28752, {f: 3, c: 28754},
  15193. {f: 2, c: 28758}, {f: 4, c: 28761}, {f: 4, c: 28767}, {f: 2, c: 28773},
  15194. {f: 3, c: 28776}, 28782, {f: 4, c: 28785}, 28791, {f: 3, c: 28793}, 28797,
  15195. {f: 4, c: 28801}, {f: 3, c: 28806}, {f: 3, c: 28811}, {f: 3, c: 28815},
  15196. 28819, {f: 2, c: 28823}, {f: 2, c: 28826}, {f: 13, c: 28830}, 28848, 28850,
  15197. {f: 3, c: 28852}, 28858, {f: 2, c: 28862}, {f: 4, c: 28868}, 28873,
  15198. {f: 4, c: 28875}, {f: 8, c: 28880}, 28890, {f: 3, c: 28892},
  15199. {f: 4, c: 28896}, 28901, 28906, 28910, {f: 4, c: 28912}, {f: 2, c: 28917},
  15200. 28920, {f: 3, c: 28922}, {f: 11, c: 28926}, {f: 5, c: 28939},
  15201. {f: 2, c: 28945}, 28948, 28951, {f: 6, c: 28955}, {f: 4, c: 28962},
  15202. {f: 8, c: 28967}, {f: 4, c: 28978}, {f: 14, c: 28983}, {f: 3, c: 28998},
  15203. 29003, 29005, {f: 3, c: 29007}, {f: 9, c: 29011}, 29021, {f: 3, c: 29023},
  15204. 29027, 29029, {f: 2, c: 29034}, 29037, {f: 3, c: 29039}, {f: 4, c: 29044},
  15205. 29049, {f: 2, c: 29051}, {f: 6, c: 29054}, {f: 5, c: 29061},
  15206. {f: 4, c: 29067}, {f: 2, c: 29072}, 29075, {f: 2, c: 29077},
  15207. {f: 5, c: 29082}, {f: 7, c: 29089}, {f: 3, c: 29097}, {f: 4, c: 29101},
  15208. 29106, 29108, {f: 3, c: 29110}, {f: 4, c: 29114}, {f: 2, c: 29119}, 29122,
  15209. {f: 4, c: 29124}, {f: 5, c: 29129}, {f: 3, c: 29135}, 29139,
  15210. {f: 3, c: 29142}, {f: 2, c: 29146}, {f: 2, c: 29149}, {f: 4, c: 29153},
  15211. {f: 5, c: 29160}, {f: 5, c: 29167}, {f: 4, c: 29173}, {f: 2, c: 29178},
  15212. 29181, {f: 7, c: 29183}, {f: 6, c: 29191}, {f: 2, c: 29198},
  15213. {f: 10, c: 29201}, 29212, {f: 10, c: 29214}, 29225, 29227,
  15214. {f: 3, c: 29229}, {f: 2, c: 29235}, 29244, {f: 7, c: 29248},
  15215. {f: 3, c: 29257}, {f: 4, c: 29262}, {f: 3, c: 29267}, 29271, 29274, 29276,
  15216. 29278, 29280, {f: 3, c: 29283}, 29288, {f: 4, c: 29290}, {f: 2, c: 29296},
  15217. {f: 2, c: 29299}, {f: 3, c: 29302}, {f: 2, c: 29307}, {f: 2, c: 29314},
  15218. {f: 5, c: 29317}, 29324, 29326, {f: 2, c: 29328}, {f: 3, c: 29331},
  15219. {f: 8, c: 29335}, {f: 2, c: 29344}, {f: 4, c: 29347}, {f: 4, c: 29352},
  15220. 29358, {f: 3, c: 29361}, 29365, {f: 6, c: 29370}, {f: 3, c: 29381},
  15221. {f: 4, c: 29385}, 29391, 29393, {f: 4, c: 29395}, 29400, {f: 4, c: 29402},
  15222. 29407, {f: 6, c: 29410}, {f: 2, c: 29418}, {f: 2, c: 29429},
  15223. {f: 3, c: 29438}, 29442, {f: 6, c: 29444}, {f: 3, c: 29451},
  15224. {f: 4, c: 29455}, 29460, {f: 3, c: 29464}, {f: 2, c: 29471},
  15225. {f: 2, c: 29475}, {f: 3, c: 29478}, 29485, {f: 2, c: 29487},
  15226. {f: 2, c: 29490}, 29493, 29498, {f: 2, c: 29500}, 29504, {f: 2, c: 29506},
  15227. {f: 7, c: 29510}, {f: 2, c: 29518}, 29521, {f: 4, c: 29523},
  15228. {f: 8, c: 29528}, {f: 7, c: 29537}, 29545, 29550, 29553, {f: 2, c: 29555},
  15229. 29558, 29561, 29565, 29567, {f: 3, c: 29569}, {f: 2, c: 29573}, 29576,
  15230. 29578, {f: 2, c: 29580}, {f: 2, c: 29583}, {f: 4, c: 29586},
  15231. {f: 4, c: 29591}, {f: 3, c: 29596}, {f: 2, c: 29600}, {f: 6, c: 29603},
  15232. 29610, {f: 2, c: 29612}, 29617, {f: 3, c: 29620}, {f: 2, c: 29624},
  15233. {f: 4, c: 29628}, 29633, {f: 5, c: 29635}, {f: 2, c: 29643}, 29646,
  15234. {f: 7, c: 29650}, {f: 4, c: 29658}, 29663, {f: 4, c: 29665}, 29670, 29672,
  15235. {f: 3, c: 29674}, {f: 4, c: 29678}, {f: 11, c: 29683}, {f: 4, c: 29695},
  15236. 29700, {f: 2, c: 29703}, {f: 4, c: 29707}, {f: 9, c: 29713},
  15237. {f: 6, c: 29724}, {f: 2, c: 29731}, 29735, 29737, 29739, 29741, 29743,
  15238. {f: 2, c: 29745}, {f: 5, c: 29751}, {f: 2, c: 29757}, 29760,
  15239. {f: 9, c: 29762}, {f: 9, c: 29772}, 29782, 29784, 29789, {f: 3, c: 29792},
  15240. {f: 5, c: 29796}, {f: 2, c: 29803}, {f: 2, c: 29806}, {f: 5, c: 29809},
  15241. {f: 6, c: 29816}, 29823, 29826, {f: 3, c: 29828}, 29832, 29834,
  15242. {f: 2, c: 29836}, 29839, {f: 11, c: 29841}, 29853, {f: 4, c: 29855},
  15243. {f: 2, c: 29860}, {f: 6, c: 29866}, {f: 9, c: 29873}, {f: 2, c: 29883},
  15244. {f: 12, c: 29886}, {f: 4, c: 29899}, {f: 2, c: 29904}, 29907,
  15245. {f: 5, c: 29909}, 29915, 29917, 29919, 29921, 29925, {f: 7, c: 29927},
  15246. {f: 4, c: 29936}, 29941, {f: 7, c: 29944}, {f: 4, c: 29952},
  15247. {f: 7, c: 29957}, 29966, 29968, 29970, {f: 4, c: 29972}, 29979,
  15248. {f: 2, c: 29981}, {f: 3, c: 29984}, 29988, {f: 2, c: 29990}, 29994, 29998,
  15249. 30004, 30006, 30009, {f: 2, c: 30012}, 30015, {f: 4, c: 30017},
  15250. {f: 2, c: 30022}, {f: 2, c: 30025}, 30029, {f: 4, c: 30032},
  15251. {f: 4, c: 30037}, {f: 4, c: 30046}, {f: 2, c: 30051}, {f: 3, c: 30055},
  15252. {f: 6, c: 30060}, 30067, 30069, 30071, {f: 5, c: 30074}, {f: 3, c: 30080},
  15253. {f: 2, c: 30084}, {f: 3, c: 30088}, {f: 3, c: 30092}, 30096, 30099, 30101,
  15254. 30104, {f: 2, c: 30107}, 30110, 30114, {f: 5, c: 30118}, 30125,
  15255. {f: 2, c: 30134}, {f: 2, c: 30138}, {f: 3, c: 30143}, 30150,
  15256. {f: 2, c: 30155}, {f: 4, c: 30158}, 30163, 30167, 30170, {f: 2, c: 30172},
  15257. {f: 3, c: 30175}, 30181, 30185, {f: 4, c: 30188}, {f: 2, c: 30194},
  15258. {f: 4, c: 30197}, {f: 2, c: 30202}, {f: 2, c: 30205}, 30212,
  15259. {f: 4, c: 30214}, {f: 2, c: 30222}, {f: 4, c: 30225}, 30230, 30234,
  15260. {f: 2, c: 30236}, 30243, 30248, 30252, {f: 2, c: 30254}, {f: 2, c: 30257},
  15261. {f: 2, c: 30262}, {f: 2, c: 30265}, 30269, 30273, {f: 2, c: 30276}, 30280,
  15262. {f: 2, c: 30282}, {f: 6, c: 30286}, 30293, 30295, {f: 3, c: 30297}, 30301,
  15263. {f: 2, c: 30304}, 30310, 30312, 30314, {f: 3, c: 30323}, [12136, 30326],
  15264. 30327, {f: 2, c: 30329}, {f: 3, c: 30335}, 30339, 30341, {f: 2, c: 30345},
  15265. {f: 2, c: 30348}, {f: 2, c: 30351}, 30354, {f: 2, c: 30356},
  15266. {f: 2, c: 30359}, {f: 9, c: 30363}, {f: 9, c: 30373}, {f: 2, c: 30383},
  15267. 30387, {f: 3, c: 30389}, 30393, {f: 4, c: 30395}, {f: 2, c: 30400},
  15268. {f: 2, c: 30403}, 30407, 30409, {f: 2, c: 30411}, 30419, 30421,
  15269. {f: 2, c: 30425}, {f: 2, c: 30428}, 30432, 30434, 30438, {f: 6, c: 30440},
  15270. 30448, 30451, {f: 3, c: 30453}, {f: 2, c: 30458}, 30461, {f: 2, c: 30463},
  15271. {f: 2, c: 30466}, {f: 2, c: 30469}, 30474, 30476, {f: 11, c: 30478},
  15272. {f: 4, c: 30491}, 30497, {f: 3, c: 30499}, 30503, {f: 3, c: 30506}, 30510,
  15273. {f: 5, c: 30512}, 30521, 30523, {f: 3, c: 30525}, 30530, {f: 3, c: 30532},
  15274. {f: 7, c: 30536}, {f: 8, c: 30546}, {f: 2, c: 30556}, {f: 2, c: 30559},
  15275. 30564, 30567, {f: 2, c: 30569}, {f: 12, c: 30573}, {f: 3, c: 30586},
  15276. {f: 3, c: 30593}, {f: 6, c: 30598}, {f: 2, c: 30607}, {f: 5, c: 30611},
  15277. {f: 5, c: 30617}, 30625, {f: 2, c: 30627}, 30630, 30632, 30635,
  15278. {f: 2, c: 30638}, {f: 2, c: 30641}, 30644, {f: 5, c: 30646}, 30654,
  15279. {f: 7, c: 30656}, {f: 5, c: 30664}, {f: 9, c: 30670}, {f: 2, c: 30680},
  15280. {f: 5, c: 30685}, 30692, 30694, 30696, 30698, {f: 3, c: 30704},
  15281. {f: 2, c: 30708}, 30711, {f: 4, c: 30713}, {f: 6, c: 30723},
  15282. {f: 2, c: 30730}, {f: 3, c: 30734}, 30739, 30741, 30745, 30747, 30750,
  15283. {f: 3, c: 30752}, 30756, 30760, {f: 2, c: 30762}, {f: 2, c: 30766},
  15284. {f: 3, c: 30769}, {f: 2, c: 30773}, 30781, 30783, {f: 2, c: 30785}, 30788,
  15285. 30790, {f: 4, c: 30792}, 30797, 30799, 30801, {f: 2, c: 30803},
  15286. {f: 5, c: 30808}, {f: 6, c: 30814}, {f: 3, c: 30821}, 30825,
  15287. {f: 7, c: 30832}, {f: 4, c: 30840}, {f: 10, c: 30845}, 30856,
  15288. {f: 2, c: 30858}, {f: 2, c: 30863}, 30866, {f: 3, c: 30868}, 30873,
  15289. {f: 2, c: 30877}, 30880, 30882, 30884, 30886, 30888, {f: 3, c: 30890},
  15290. {f: 2, c: 30894}, {f: 3, c: 30901}, 30907, 30909, {f: 2, c: 30911},
  15291. {f: 3, c: 30914}, {f: 3, c: 30918}, {f: 4, c: 30924}, {f: 3, c: 30929},
  15292. {f: 3, c: 30934}, {f: 8, c: 30939}, {f: 3, c: 30948}, {f: 3, c: 30953},
  15293. {f: 2, c: 30957}, {f: 2, c: 30960}, 30963, {f: 2, c: 30965},
  15294. {f: 2, c: 30968}, {f: 2, c: 30971}, {f: 3, c: 30974}, {f: 3, c: 30978},
  15295. {f: 8, c: 30982}, {f: 4, c: 30991}, {f: 5, c: 30996}, {f: 4, c: 31002},
  15296. {f: 5, c: 31007}, 31013, {f: 3, c: 31015}, {f: 4, c: 31021},
  15297. {f: 2, c: 31026}, {f: 5, c: 31029}, 31037, 31039, {f: 4, c: 31042}, 31047,
  15298. {f: 9, c: 31050}, {f: 2, c: 31060}, {f: 2, c: 31064}, 31073,
  15299. {f: 2, c: 31075}, 31078, {f: 4, c: 31081}, 31086, {f: 7, c: 31088}, 31097,
  15300. {f: 5, c: 31099}, {f: 2, c: 31106}, {f: 4, c: 31110}, {f: 2, c: 31115},
  15301. {f: 10, c: 31120}, {f: 11, c: 31131}, {f: 2, c: 31144}, {f: 3, c: 31147},
  15302. 31151, 31154, {f: 4, c: 31156}, [12145, 31160], 31164, 31167, 31170,
  15303. {f: 2, c: 31172}, {f: 2, c: 31175}, 31178, 31180, {f: 3, c: 31182},
  15304. {f: 2, c: 31187}, {f: 2, c: 31190}, {f: 6, c: 31193}, {f: 3, c: 31200},
  15305. 31205, 31208, 31210, 31212, 31214, {f: 7, c: 31217}, {f: 2, c: 31225},
  15306. 31228, {f: 2, c: 31230}, 31233, {f: 2, c: 31236}, {f: 4, c: 31239}, 31244,
  15307. {f: 5, c: 31247}, {f: 2, c: 31253}, {f: 2, c: 31256}, {f: 3, c: 31259},
  15308. 31263, {f: 2, c: 31265}, {f: 10, c: 31268}, {f: 2, c: 31279}, 31282,
  15309. {f: 3, c: 31284}, 31288, 31290, 31294, {f: 5, c: 31297}, {f: 5, c: 31303},
  15310. {f: 2, c: 31311}, {f: 5, c: 31314}, {f: 9, c: 31320}, {f: 6, c: 31331},
  15311. 31338, {f: 4, c: 31340}, {f: 3, c: 31345}, 31349, {f: 4, c: 31355}, 31362,
  15312. 31365, 31367, {f: 4, c: 31369}, {f: 3, c: 31374}, {f: 2, c: 31379},
  15313. {f: 3, c: 31385}, 31390, {f: 4, c: 31393}, 31399, 31403, {f: 4, c: 31407},
  15314. {f: 2, c: 31412}, {f: 3, c: 31415}, {f: 4, c: 31419}, {f: 4, c: 31424},
  15315. 31430, 31433, {f: 10, c: 31436}, {f: 2, c: 31447}, {f: 4, c: 31450},
  15316. {f: 2, c: 31457}, 31460, {f: 3, c: 31463}, {f: 2, c: 31467}, 31470,
  15317. {f: 6, c: 31472}, {f: 2, c: 31479}, {f: 2, c: 31483}, 31486,
  15318. {f: 3, c: 31488}, 31493, 31495, 31497, {f: 3, c: 31500}, 31504,
  15319. {f: 2, c: 31506}, {f: 3, c: 31510}, 31514, {f: 2, c: 31516}, 31519,
  15320. {f: 3, c: 31521}, 31527, 31529, 31533, {f: 2, c: 31535}, 31538,
  15321. {f: 4, c: 31540}, 31545, 31547, 31549, {f: 6, c: 31551}, 31560, 31562,
  15322. {f: 2, c: 31565}, 31571, 31573, 31575, 31577, 31580, {f: 2, c: 31582},
  15323. 31585, {f: 4, c: 31587}, {f: 6, c: 31592}, {f: 2, c: 31599},
  15324. {f: 2, c: 31603}, 31606, 31608, 31610, {f: 2, c: 31612}, 31615,
  15325. {f: 4, c: 31617}, {f: 5, c: 31622}, 31628, {f: 2, c: 31630},
  15326. {f: 3, c: 31633}, 31638, {f: 4, c: 31640}, {f: 3, c: 31646},
  15327. {f: 3, c: 31651}, {f: 3, c: 31662}, {f: 2, c: 31666}, {f: 3, c: 31669},
  15328. {f: 7, c: 31673}, {f: 2, c: 31682}, 31685, 31688, 31690, {f: 4, c: 31693},
  15329. 31698, {f: 5, c: 31700}, {f: 2, c: 31707}, {f: 3, c: 31710},
  15330. {f: 2, c: 31714}, {f: 2, c: 31719}, {f: 3, c: 31723}, {f: 2, c: 31727},
  15331. 31730, {f: 3, c: 31732}, {f: 4, c: 31736}, 31741, 31743, {f: 6, c: 31745},
  15332. {f: 3, c: 31752}, 31758, {f: 6, c: 31760}, {f: 7, c: 31767}, 31776, 31778,
  15333. {f: 2, c: 31780}, {f: 2, c: 31784}, {f: 12, c: 31788}, {f: 4, c: 31801},
  15334. 31810, {f: 8, c: 31812}, {f: 14, c: 31822}, {f: 2, c: 31837},
  15335. {f: 3, c: 31841}, {f: 4, c: 31845}, 31851, 31853, {f: 3, c: 31855},
  15336. {f: 6, c: 31861}, {f: 11, c: 31870}, {f: 7, c: 31882}, {f: 2, c: 31891},
  15337. 31894, {f: 3, c: 31897}, {f: 2, c: 31904}, 31907, {f: 4, c: 31910},
  15338. {f: 3, c: 31915}, {f: 2, c: 31919}, {f: 5, c: 31924}, {f: 2, c: 31930},
  15339. {f: 2, c: 31935}, {f: 3, c: 31938}, 31942, 31945, 31947, {f: 7, c: 31950},
  15340. 31960, {f: 2, c: 31962}, {f: 6, c: 31969}, {f: 6, c: 31977}, 31985, 31987,
  15341. 31989, 31991, 31994, {f: 2, c: 31996}, 31999, 32001, 32003, 32012,
  15342. {f: 2, c: 32014}, {f: 2, c: 32017}, 32022, 32024, {f: 3, c: 32029},
  15343. {f: 4, c: 32035}, {f: 3, c: 32040}, {f: 3, c: 32044}, {f: 5, c: 32052},
  15344. 32059, {f: 2, c: 32061}, 32065, 32067, 32069, {f: 7, c: 32071}, 32079,
  15345. {f: 12, c: 32081}, {f: 2, c: 32095}, {f: 3, c: 32099}, 32103,
  15346. {f: 5, c: 32105}, {f: 2, c: 32111}, {f: 2, c: 32116}, 32120,
  15347. {f: 7, c: 32122}, 32130, {f: 2, c: 32132}, 32135, {f: 5, c: 32138},
  15348. {f: 3, c: 32144}, {f: 8, c: 32148}, 32157, {f: 3, c: 32159},
  15349. {f: 2, c: 32164}, {f: 4, c: 32167}, 32175, {f: 3, c: 32181}, 32188,
  15350. {f: 4, c: 32192}, {f: 2, c: 32197}, {f: 2, c: 32200}, {f: 5, c: 32204},
  15351. 32211, {f: 2, c: 32213}, {f: 3, c: 32218}, 32223, 32226, {f: 2, c: 32228},
  15352. 32231, {f: 2, c: 32234}, {f: 2, c: 32237}, 32240, 32243, 32245,
  15353. {f: 2, c: 32247}, 32250, {f: 12, c: 32252}, {f: 4, c: 32268},
  15354. {f: 9, c: 32274}, 32284, {f: 3, c: 32288}, {f: 3, c: 32292},
  15355. {f: 3, c: 32296}, 32300, {f: 2, c: 32303}, 32307, 32312, 32314, 32316,
  15356. {f: 2, c: 32319}, {f: 3, c: 32322}, {f: 10, c: 32328}, 32339,
  15357. {f: 4, c: 32342}, {f: 3, c: 32347}, {f: 3, c: 32351}, {f: 6, c: 32355},
  15358. 32364, {f: 2, c: 32369}, {f: 5, c: 32372}, {f: 2, c: 32378},
  15359. {f: 3, c: 32383}, {f: 5, c: 32387}, 32393, 32395, 32398, {f: 3, c: 32400},
  15360. 32405, 32407, {f: 2, c: 32409}, {f: 2, c: 32413}, 32430, 32436,
  15361. {f: 2, c: 32443}, 32470, 32484, 32492, 32505, 32522, 32528, 32542, 32567,
  15362. 32569, {f: 7, c: 32571}, 32579, {f: 6, c: 32582}, 32589, 32591,
  15363. {f: 2, c: 32594}, 32598, 32601, {f: 4, c: 32603}, 32608, {f: 5, c: 32611},
  15364. {f: 3, c: 32619}, 32623, 32627, {f: 2, c: 32629}, 32632, {f: 4, c: 32634},
  15365. {f: 2, c: 32639}, {f: 3, c: 32642}, 32647, 32649, 32651, 32653,
  15366. {f: 5, c: 32655}, {f: 5, c: 32661}, {f: 2, c: 32667}, 32672,
  15367. {f: 2, c: 32674}, 32678, 32680, {f: 5, c: 32682}, 32689, {f: 5, c: 32691},
  15368. {f: 2, c: 32698}, 32702, 32704, {f: 3, c: 32706}, {f: 4, c: 32710}, 32715,
  15369. 32717, {f: 3, c: 32719}, 32723, {f: 2, c: 32726}, {f: 6, c: 32729},
  15370. {f: 3, c: 32738}, {f: 2, c: 32743}, {f: 4, c: 32746}, 32751, 32754,
  15371. {f: 5, c: 32756}, 32762, {f: 3, c: 32765}, 32770, {f: 4, c: 32775},
  15372. {f: 2, c: 32782}, 32785, 32787, {f: 2, c: 32794}, {f: 3, c: 32797}, 32801,
  15373. {f: 2, c: 32803}, 32811, 32813, {f: 2, c: 32815}, 32818, 32820,
  15374. {f: 2, c: 32825}, 32828, 32830, {f: 2, c: 32832}, {f: 2, c: 32836},
  15375. {f: 3, c: 32839}, {f: 4, c: 32846}, 32851, 32853, 32855, 32857,
  15376. {f: 3, c: 32859}, {f: 10, c: 32863}, {f: 4, c: 32875}, 32884, 32888,
  15377. {f: 3, c: 32890}, {f: 2, c: 32897}, 32904, 32906, {f: 6, c: 32909},
  15378. {f: 2, c: 32916}, 32919, 32921, 32926, 32931, {f: 3, c: 32934}, 32940,
  15379. 32944, 32947, {f: 2, c: 32949}, {f: 2, c: 32952}, 32955, 32965,
  15380. {f: 5, c: 32967}, {f: 7, c: 32975}, 32984, {f: 2, c: 32991},
  15381. {f: 2, c: 32994}, 32998, 33006, 33013, 33015, 33017, 33019,
  15382. {f: 4, c: 33022}, {f: 2, c: 33027}, {f: 2, c: 33031}, {f: 2, c: 33035},
  15383. 33045, 33047, 33049, {f: 2, c: 33052}, {f: 13, c: 33055}, {f: 2, c: 33069},
  15384. 33072, {f: 3, c: 33075}, 33079, {f: 4, c: 33082}, {f: 7, c: 33087}, 33095,
  15385. 33097, 33101, 33103, 33106, {f: 2, c: 33111}, {f: 5, c: 33115},
  15386. {f: 3, c: 33122}, 33128, 33130, 33132, 33135, {f: 2, c: 33138},
  15387. {f: 3, c: 33141}, 33153, {f: 5, c: 33155}, 33161, {f: 4, c: 33163}, 33168,
  15388. {f: 6, c: 33170}, 33177, {f: 2, c: 33182}, {f: 2, c: 33185},
  15389. {f: 2, c: 33188}, 33191, {f: 8, c: 33195}, {f: 6, c: 33204}, 33212,
  15390. {f: 2, c: 33220}, {f: 2, c: 33223}, 33227, 33230, {f: 8, c: 33232}, 33241,
  15391. {f: 4, c: 33243}, {f: 2, c: 33249}, {f: 3, c: 33252}, 33257, 33259,
  15392. {f: 5, c: 33262}, {f: 5, c: 33269}, 33277, 33279, 33283, 33291,
  15393. {f: 2, c: 33294}, 33297, 33299, {f: 6, c: 33301}, 33309, 33312,
  15394. {f: 4, c: 33316}, 33321, 33326, 33330, 33338, {f: 2, c: 33340},
  15395. {f: 5, c: 33343}, {f: 2, c: 33349}, 33352, 33354, {f: 3, c: 33356},
  15396. {f: 8, c: 33360}, {f: 4, c: 33371}, {f: 4, c: 33376}, 33381, 33383,
  15397. {f: 2, c: 33385}, {f: 2, c: 33388}, {f: 2, c: 33397}, [12171, 33400],
  15398. {f: 2, c: 33403}, {f: 2, c: 33408}, 33411, {f: 3, c: 33413}, 33417, 33420,
  15399. 33424, {f: 4, c: 33427}, {f: 2, c: 33434}, 33438, 33440, {f: 2, c: 33442},
  15400. 33447, 33458, {f: 2, c: 33461}, 33466, 33468, {f: 2, c: 33471},
  15401. {f: 2, c: 33474}, {f: 2, c: 33477}, 33481, 33488, 33494, {f: 2, c: 33497},
  15402. 33501, 33506, {f: 3, c: 33512}, {f: 3, c: 33516}, 33520, {f: 2, c: 33522},
  15403. {f: 2, c: 33525}, 33528, 33530, {f: 5, c: 33532}, {f: 2, c: 33546}, 33549,
  15404. 33552, {f: 2, c: 33554}, 33558, {f: 2, c: 33560}, {f: 10, c: 33565},
  15405. {f: 2, c: 33577}, 33582, 33584, 33586, 33591, 33595, {f: 3, c: 33597},
  15406. {f: 2, c: 33601}, {f: 2, c: 33604}, 33608, {f: 5, c: 33610}, 33619,
  15407. {f: 5, c: 33621}, 33629, 33634, {f: 7, c: 33648}, {f: 2, c: 33657},
  15408. {f: 7, c: 33662}, {f: 2, c: 33671}, {f: 3, c: 33675}, {f: 3, c: 33679},
  15409. {f: 2, c: 33684}, 33687, {f: 2, c: 33689}, 33693, 33695, 33697,
  15410. {f: 4, c: 33699}, {f: 4, c: 33708}, 33717, 33723, {f: 2, c: 33726},
  15411. {f: 3, c: 33730}, 33734, {f: 2, c: 33736}, 33739, {f: 2, c: 33741},
  15412. {f: 4, c: 33744}, 33749, 33751, {f: 3, c: 33753}, 33758, {f: 3, c: 33762},
  15413. {f: 3, c: 33766}, {f: 4, c: 33771}, {f: 5, c: 33779}, {f: 3, c: 33786},
  15414. {f: 3, c: 33790}, 33794, 33797, {f: 2, c: 33800}, 33808, {f: 6, c: 33810},
  15415. {f: 3, c: 33817}, {f: 6, c: 33822}, {f: 3, c: 33833}, {f: 4, c: 33837},
  15416. {f: 3, c: 33842}, {f: 2, c: 33846}, {f: 3, c: 33849}, {f: 8, c: 33854},
  15417. {f: 2, c: 33863}, {f: 7, c: 33866}, {f: 4, c: 33875}, 33880,
  15418. {f: 4, c: 33885}, 33890, 33893, {f: 2, c: 33895}, 33898, 33902, 33904,
  15419. 33906, 33908, 33913, {f: 7, c: 33915}, {f: 4, c: 33923}, 33930, 33933,
  15420. {f: 4, c: 33935}, {f: 2, c: 33941}, 33944, {f: 2, c: 33946},
  15421. {f: 4, c: 33949}, {f: 13, c: 33954}, {f: 2, c: 33968}, 33971,
  15422. {f: 3, c: 33973}, 33979, 33982, {f: 2, c: 33986}, {f: 4, c: 33989}, 33996,
  15423. {f: 2, c: 33998}, 34002, {f: 2, c: 34004}, {f: 6, c: 34007}, 34014,
  15424. {f: 2, c: 34017}, 34020, {f: 5, c: 34023}, 34029, {f: 11, c: 34033}, 34046,
  15425. {f: 12, c: 34048}, {f: 4, c: 34061}, 34066, {f: 2, c: 34069},
  15426. {f: 2, c: 34072}, {f: 3, c: 34075}, 34080, 34082, {f: 2, c: 34084},
  15427. {f: 4, c: 34087}, {f: 9, c: 34094}, {f: 3, c: 34110}, 34114,
  15428. {f: 2, c: 34116}, 34119, {f: 3, c: 34123}, {f: 3, c: 34127}, 34132, 34135,
  15429. {f: 4, c: 34138}, {f: 3, c: 34143}, 34147, {f: 3, c: 34149},
  15430. {f: 2, c: 34155}, {f: 4, c: 34158}, 34163, {f: 2, c: 34165}, 34168,
  15431. {f: 2, c: 34172}, {f: 5, c: 34175}, 34182, 34185, 34187, {f: 2, c: 34189},
  15432. 34192, {f: 2, c: 34194}, {f: 6, c: 34197}, {f: 2, c: 34205},
  15433. {f: 4, c: 34208}, 34213, 34215, {f: 3, c: 34219}, {f: 6, c: 34225}, 34232,
  15434. {f: 6, c: 34235}, {f: 7, c: 34242}, {f: 3, c: 34250}, {f: 2, c: 34257},
  15435. 34260, {f: 6, c: 34262}, {f: 6, c: 34270}, {f: 3, c: 34278},
  15436. {f: 9, c: 34283}, 34293, {f: 2, c: 34295}, {f: 3, c: 34300},
  15437. {f: 4, c: 34304}, {f: 3, c: 34312}, {f: 5, c: 34316}, {f: 4, c: 34322},
  15438. {f: 3, c: 34327}, {f: 3, c: 34331}, {f: 3, c: 34335}, {f: 4, c: 34339},
  15439. 34344, {f: 3, c: 34346}, {f: 10, c: 34350}, 34361, 34363, {f: 2, c: 34365},
  15440. {f: 13, c: 34368}, {f: 2, c: 34386}, {f: 4, c: 34390}, 34395, 34397,
  15441. {f: 2, c: 34400}, {f: 4, c: 34403}, {f: 3, c: 34408}, 34413,
  15442. {f: 2, c: 34415}, {f: 7, c: 34418}, {f: 7, c: 34435}, {f: 5, c: 34446},
  15443. 34452, {f: 6, c: 34454}, {f: 5, c: 34462}, {f: 2, c: 34469}, 34475,
  15444. {f: 2, c: 34477}, {f: 2, c: 34482}, {f: 3, c: 34487}, {f: 5, c: 34491},
  15445. {f: 3, c: 34497}, 34501, 34504, {f: 2, c: 34508}, {f: 2, c: 34514},
  15446. {f: 3, c: 34517}, 34522, {f: 2, c: 34524}, {f: 4, c: 34528},
  15447. {f: 4, c: 34533}, {f: 3, c: 34538}, 34543, {f: 3, c: 34549},
  15448. {f: 3, c: 34555}, 34559, 34561, {f: 2, c: 34564}, {f: 2, c: 34571},
  15449. {f: 4, c: 34574}, 34580, 34582, 34585, 34587, 34589, {f: 2, c: 34591},
  15450. 34596, {f: 3, c: 34598}, {f: 4, c: 34602}, {f: 2, c: 34607},
  15451. {f: 2, c: 34610}, {f: 2, c: 34613}, {f: 3, c: 34616}, {f: 2, c: 34620},
  15452. {f: 7, c: 34624}, {f: 2, c: 34634}, 34637, {f: 4, c: 34639}, 34644, 34646,
  15453. 34648, {f: 6, c: 34650}, {f: 2, c: 34657}, {f: 7, c: 34663}, 34671,
  15454. {f: 3, c: 34673}, 34677, 34679, {f: 2, c: 34681}, {f: 3, c: 34687},
  15455. {f: 2, c: 34694}, {f: 2, c: 34697}, 34700, {f: 5, c: 34702},
  15456. {f: 3, c: 34708}, {f: 6, c: 34712}, {f: 2, c: 34720}, {f: 5, c: 34723},
  15457. {f: 2, c: 34729}, 34734, {f: 3, c: 34736}, 34740, {f: 4, c: 34742}, 34748,
  15458. {f: 2, c: 34750}, {f: 3, c: 34753}, 34757, 34759, 34761, {f: 2, c: 34764},
  15459. {f: 2, c: 34767}, {f: 7, c: 34772}, {f: 4, c: 34780}, {f: 2, c: 34785},
  15460. 34788, {f: 4, c: 34790}, 34795, 34797, {f: 2, c: 34800}, {f: 3, c: 34803},
  15461. {f: 2, c: 34807}, 34810, {f: 2, c: 34812}, {f: 4, c: 34815}, 34820,
  15462. {f: 3, c: 34823}, {f: 5, c: 34827}, 34834, 34836, {f: 4, c: 34839},
  15463. {f: 3, c: 34844}, 34848, {f: 13, c: 34852}, {f: 3, c: 34867},
  15464. {f: 2, c: 34871}, 34874, {f: 3, c: 34877}, {f: 3, c: 34881},
  15465. {f: 3, c: 34887}, 34891, {f: 5, c: 34894}, {f: 2, c: 34901}, 34904, 34906,
  15466. 34908, {f: 3, c: 34910}, {f: 2, c: 34918}, 34922, 34925, 34927, 34929,
  15467. {f: 4, c: 34931}, 34936, {f: 3, c: 34938}, 34944, 34947, {f: 2, c: 34950},
  15468. {f: 2, c: 34953}, 34956, {f: 4, c: 34958}, {f: 3, c: 34963},
  15469. {f: 5, c: 34967}, {f: 5, c: 34973}, 34979, {f: 6, c: 34981}, 34988,
  15470. {f: 3, c: 34990}, {f: 5, c: 34994}, {f: 4, c: 35000}, {f: 4, c: 35005},
  15471. {f: 2, c: 35011}, {f: 2, c: 35015}, {f: 3, c: 35019}, {f: 2, c: 35024},
  15472. 35027, {f: 2, c: 35030}, {f: 2, c: 35034}, 35038, {f: 2, c: 35040},
  15473. {f: 2, c: 35046}, {f: 7, c: 35049}, 35058, {f: 3, c: 35061},
  15474. {f: 2, c: 35066}, {f: 3, c: 35071}, {f: 4, c: 35075}, {f: 2, c: 35080},
  15475. {f: 5, c: 35083}, 35089, {f: 5, c: 35092}, {f: 5, c: 35100},
  15476. {f: 3, c: 35106}, {f: 4, c: 35110}, {f: 4, c: 35116}, 35121, 35125, 35127,
  15477. {f: 2, c: 35129}, {f: 5, c: 35132}, {f: 2, c: 35138}, {f: 2, c: 35141},
  15478. {f: 14, c: 35144}, {f: 6, c: 35159}, {f: 3, c: 35169}, 35173,
  15479. {f: 3, c: 35175}, 35179, {f: 2, c: 35181}, {f: 2, c: 35184},
  15480. {f: 8, c: 35187}, {f: 2, c: 35196}, [12177, 35198], 35200, 35202,
  15481. {f: 2, c: 35204}, {f: 4, c: 35207}, {f: 3, c: 35212}, {f: 3, c: 35216},
  15482. {f: 2, c: 35220}, 35223, {f: 8, c: 35225}, {f: 4, c: 35234},
  15483. {f: 3, c: 35239}, 35243, {f: 2, c: 35245}, {f: 2, c: 35248},
  15484. {f: 4, c: 35251}, {f: 2, c: 35256}, {f: 2, c: 35259}, 35262, 35267, 35277,
  15485. {f: 3, c: 35283}, {f: 3, c: 35287}, 35291, 35293, {f: 4, c: 35295}, 35300,
  15486. {f: 4, c: 35303}, {f: 3, c: 35308}, {f: 3, c: 35312}, 35317, 35319,
  15487. {f: 7, c: 35321}, {f: 3, c: 35332}, 35337, 35339, 35341, 35343,
  15488. {f: 2, c: 35345}, 35348, 35351, {f: 2, c: 35353}, 35356, 35358,
  15489. {f: 3, c: 35360}, 35364, {f: 4, c: 35366}, {f: 2, c: 35371},
  15490. {f: 3, c: 35374}, {f: 2, c: 35378}, 35381, {f: 3, c: 35383},
  15491. {f: 3, c: 35387}, {f: 2, c: 35391}, {f: 4, c: 35394}, 35399,
  15492. {f: 5, c: 35401}, 35407, 35409, 35411, {f: 2, c: 35414}, {f: 2, c: 35417},
  15493. {f: 2, c: 35420}, {f: 2, c: 35423}, {f: 2, c: 35428}, {f: 2, c: 35431},
  15494. 35434, 35439, 35444, {f: 3, c: 35446}, {f: 2, c: 35450}, {f: 2, c: 35453},
  15495. {f: 4, c: 35456}, 35464, {f: 2, c: 35467}, {f: 3, c: 35470}, 35476,
  15496. {f: 2, c: 35478}, 35481, {f: 3, c: 35483}, 35487, 35490, 35495,
  15497. {f: 3, c: 35497}, {f: 3, c: 35501}, 35505, {f: 3, c: 35507},
  15498. {f: 2, c: 35511}, {f: 2, c: 35514}, {f: 2, c: 35517}, {f: 2, c: 35520},
  15499. 35523, {f: 2, c: 35525}, 35528, 35530, 35532, 35534, 35536,
  15500. {f: 3, c: 35539}, {f: 3, c: 35544}, 35549, {f: 3, c: 35551}, 35555, 35557,
  15501. {f: 3, c: 35560}, 35564, {f: 2, c: 35567}, 35570, {f: 2, c: 35572}, 35577,
  15502. 35579, 35581, 35583, 35587, 35590, {f: 2, c: 35592}, {f: 3, c: 35595},
  15503. 35599, {f: 3, c: 35601}, 35605, 35608, 35612, {f: 3, c: 35614},
  15504. {f: 4, c: 35618}, 35623, {f: 2, c: 35625}, {f: 5, c: 35630},
  15505. {f: 5, c: 35636}, {f: 4, c: 35642}, {f: 10, c: 35647}, {f: 4, c: 35658},
  15506. {f: 6, c: 35664}, 35671, 35675, {f: 9, c: 35677}, {f: 4, c: 35687},
  15507. {f: 2, c: 35693}, {f: 3, c: 35697}, {f: 2, c: 35701}, {f: 5, c: 35704},
  15508. {f: 2, c: 35710}, {f: 9, c: 35713}, {f: 3, c: 35723}, {f: 3, c: 35727},
  15509. 35732, {f: 5, c: 35735}, 35741, 35743, 35756, 35761, 35771, 35783, 35792,
  15510. 35818, 35849, 35870, {f: 9, c: 35896}, {f: 4, c: 35906}, {f: 2, c: 35914},
  15511. {f: 3, c: 35917}, {f: 4, c: 35921}, {f: 4, c: 35926}, {f: 6, c: 35931},
  15512. {f: 7, c: 35939}, {f: 7, c: 35948}, {f: 4, c: 35956}, {f: 7, c: 35963},
  15513. {f: 2, c: 35971}, {f: 3, c: 35974}, 35979, {f: 7, c: 35981},
  15514. {f: 3, c: 35989}, {f: 4, c: 35993}, 35999, {f: 4, c: 36003},
  15515. {f: 2, c: 36013}, 36017, 36021, 36025, 36030, 36038, 36041,
  15516. {f: 6, c: 36043}, 36052, {f: 4, c: 36054}, 36059, 36061, 36063, 36069,
  15517. {f: 2, c: 36072}, {f: 6, c: 36078}, {f: 5, c: 36085}, {f: 5, c: 36095},
  15518. {f: 2, c: 36102}, 36105, 36108, 36110, {f: 5, c: 36113}, {f: 4, c: 36119},
  15519. 36128, {f: 2, c: 36177}, 36183, 36191, 36197, {f: 3, c: 36200}, 36204,
  15520. {f: 2, c: 36206}, {f: 2, c: 36209}, {f: 9, c: 36216}, {f: 2, c: 36226},
  15521. {f: 4, c: 36230}, {f: 5, c: 36236}, {f: 2, c: 36242}, {f: 3, c: 36246},
  15522. {f: 5, c: 36250}, {f: 3, c: 36256}, {f: 4, c: 36260}, {f: 8, c: 36265},
  15523. {f: 2, c: 36278}, 36281, 36283, 36285, {f: 3, c: 36288}, 36293,
  15524. {f: 4, c: 36295}, 36301, 36304, {f: 4, c: 36306}, {f: 2, c: 36312}, 36316,
  15525. {f: 3, c: 36320}, {f: 3, c: 36325}, 36329, {f: 2, c: 36333},
  15526. {f: 3, c: 36336}, 36340, 36342, 36348, {f: 7, c: 36350}, {f: 3, c: 36358},
  15527. 36363, {f: 2, c: 36365}, {f: 3, c: 36369}, {f: 8, c: 36373},
  15528. {f: 2, c: 36384}, {f: 5, c: 36388}, 36395, 36397, 36400, {f: 2, c: 36402},
  15529. {f: 3, c: 36406}, {f: 2, c: 36411}, {f: 2, c: 36414}, 36419,
  15530. {f: 2, c: 36421}, {f: 4, c: 36429}, {f: 2, c: 36435}, {f: 3, c: 36438},
  15531. {f: 9, c: 36442}, {f: 2, c: 36452}, {f: 2, c: 36455}, {f: 2, c: 36458},
  15532. 36462, 36465, 36467, 36469, {f: 3, c: 36471}, 36475, {f: 2, c: 36477},
  15533. 36480, {f: 3, c: 36482}, 36486, 36488, 36492, 36494, {f: 5, c: 36501},
  15534. 36507, 36509, {f: 2, c: 36511}, {f: 3, c: 36514}, {f: 3, c: 36519},
  15535. {f: 2, c: 36525}, {f: 2, c: 36528}, {f: 7, c: 36531}, {f: 5, c: 36539},
  15536. {f: 9, c: 36545}, {f: 3, c: 36559}, 36563, {f: 6, c: 36565},
  15537. {f: 3, c: 36572}, {f: 4, c: 36576}, {f: 6, c: 36581}, {f: 6, c: 36588},
  15538. {f: 5, c: 36595}, 36605, {f: 4, c: 36607}, 36612, 36614, 36616,
  15539. {f: 7, c: 36619}, 36627, {f: 5, c: 36630}, {f: 5, c: 36640},
  15540. {f: 2, c: 36647}, {f: 4, c: 36651}, {f: 3, c: 36656}, {f: 4, c: 36660},
  15541. {f: 2, c: 36665}, {f: 2, c: 36668}, {f: 2, c: 36672}, 36675,
  15542. {f: 2, c: 36679}, {f: 3, c: 36682}, {f: 5, c: 36687}, {f: 10, c: 36693},
  15543. 36704, 36707, 36709, 36714, 36736, 36748, 36754, 36765, {f: 3, c: 36768},
  15544. {f: 2, c: 36772}, 36775, 36778, 36780, {f: 2, c: 36787}, [12193, 36789],
  15545. {f: 2, c: 36791}, {f: 3, c: 36794}, {f: 2, c: 36799}, 36803, 36806,
  15546. {f: 5, c: 36809}, 36815, 36818, {f: 2, c: 36822}, 36826, {f: 2, c: 36832},
  15547. 36835, 36839, 36844, 36847, {f: 2, c: 36849}, {f: 2, c: 36853},
  15548. {f: 3, c: 36858}, {f: 2, c: 36862}, {f: 2, c: 36871}, 36876, 36878, 36883,
  15549. 36888, 36892, {f: 2, c: 36900}, {f: 6, c: 36903}, {f: 2, c: 36912},
  15550. {f: 2, c: 36915}, 36919, {f: 2, c: 36921}, 36925, {f: 2, c: 36927}, 36931,
  15551. {f: 2, c: 36933}, {f: 3, c: 36936}, 36940, 36950, {f: 2, c: 36953}, 36957,
  15552. 36959, 36961, 36964, {f: 2, c: 36966}, {f: 3, c: 36970}, {f: 3, c: 36975},
  15553. 36979, 36982, 36985, 36987, 36990, {f: 2, c: 36997}, 37001,
  15554. {f: 3, c: 37004}, 37010, 37012, 37014, 37016, 37018, 37020,
  15555. {f: 3, c: 37022}, {f: 2, c: 37028}, {f: 3, c: 37031}, 37035, 37037, 37042,
  15556. 37047, {f: 2, c: 37052}, {f: 2, c: 37055}, {f: 2, c: 37058}, 37062,
  15557. {f: 2, c: 37064}, {f: 3, c: 37067}, 37074, {f: 3, c: 37076},
  15558. {f: 3, c: 37080}, 37086, 37088, {f: 3, c: 37091}, {f: 2, c: 37097}, 37100,
  15559. 37102, {f: 4, c: 37104}, {f: 2, c: 37110}, {f: 4, c: 37113},
  15560. {f: 3, c: 37119}, 37123, 37125, {f: 2, c: 37127}, {f: 8, c: 37130}, 37139,
  15561. 37141, {f: 2, c: 37143}, {f: 4, c: 37146}, {f: 3, c: 37151},
  15562. {f: 3, c: 37156}, {f: 5, c: 37160}, 37166, 37171, 37173, {f: 2, c: 37175},
  15563. {f: 8, c: 37179}, {f: 2, c: 37188}, 37191, 37201, {f: 4, c: 37203},
  15564. {f: 2, c: 37208}, {f: 2, c: 37211}, {f: 2, c: 37215}, {f: 3, c: 37222},
  15565. 37227, 37229, 37235, {f: 3, c: 37242}, {f: 5, c: 37248}, 37254, 37256,
  15566. 37258, {f: 2, c: 37262}, {f: 3, c: 37267}, {f: 3, c: 37271},
  15567. {f: 5, c: 37277}, {f: 6, c: 37284}, {f: 4, c: 37296}, {f: 4, c: 37302},
  15568. {f: 5, c: 37307}, 37314, 37316, [12196, 37318], 37320, 37328, 37334,
  15569. {f: 2, c: 37338}, {f: 5, c: 37342}, {f: 2, c: 37349}, 37352,
  15570. {f: 11, c: 37354}, 37366, 37368, {f: 5, c: 37371}, {f: 2, c: 37378},
  15571. {f: 3, c: 37381}, {f: 3, c: 37386}, 37391, {f: 2, c: 37394},
  15572. {f: 8, c: 37398}, {f: 4, c: 37407}, 37412, {f: 6, c: 37416}, 37423,
  15573. {f: 2, c: 37425}, {f: 2, c: 37429}, {f: 2, c: 37435}, {f: 4, c: 37441},
  15574. {f: 2, c: 37446}, {f: 3, c: 37450}, {f: 3, c: 37454}, {f: 3, c: 37458},
  15575. 37462, {f: 2, c: 37464}, {f: 2, c: 37468}, {f: 3, c: 37471},
  15576. {f: 3, c: 37475}, {f: 5, c: 37479}, {f: 6, c: 37486}, {f: 3, c: 37493},
  15577. 37497, {f: 3, c: 37500}, {f: 2, c: 37505}, 37508, {f: 8, c: 37510},
  15578. {f: 2, c: 37519}, 37522, {f: 2, c: 37524}, 37527, 37529, 37531,
  15579. {f: 3, c: 37533}, {f: 2, c: 37537}, 37540, 37543, 37549, {f: 2, c: 37551},
  15580. {f: 5, c: 37554}, 37560, 37562, {f: 4, c: 37565}, 37570, 37572, 37574,
  15581. {f: 3, c: 37577}, {f: 2, c: 37581}, {f: 2, c: 37584}, {f: 10, c: 37587},
  15582. 37598, {f: 3, c: 37600}, 37607, 37609, {f: 2, c: 37611}, {f: 4, c: 37618},
  15583. 37623, {f: 3, c: 37625}, {f: 4, c: 37629}, {f: 4, c: 37634},
  15584. {f: 7, c: 37641}, 37649, {f: 2, c: 37651}, {f: 2, c: 37654},
  15585. {f: 3, c: 37660}, 37665, {f: 3, c: 37667}, 37671, {f: 2, c: 37673},
  15586. {f: 2, c: 37676}, {f: 2, c: 37680}, {f: 2, c: 37684}, 37687,
  15587. {f: 5, c: 37689}, 37695, 37698, {f: 2, c: 37700}, {f: 3, c: 37704}, 37708,
  15588. {f: 6, c: 37710}, {f: 3, c: 37717}, {f: 2, c: 37721}, {f: 8, c: 37724},
  15589. {f: 3, c: 37734}, 37739, {f: 3, c: 37741}, {f: 4, c: 37745},
  15590. {f: 3, c: 37751}, {f: 3, c: 37755}, {f: 3, c: 37759}, 37763,
  15591. {f: 2, c: 37765}, {f: 2, c: 37768}, {f: 4, c: 37771}, {f: 6, c: 37776},
  15592. 37783, {f: 9, c: 37785}, {f: 2, c: 37796}, 37800, 37803, 37805, 37807,
  15593. {f: 2, c: 37809}, 37812, {f: 2, c: 37814}, {f: 6, c: 37817},
  15594. {f: 3, c: 37824}, {f: 3, c: 37828}, 37833, 37835, {f: 3, c: 37838},
  15595. {f: 4, c: 37842}, {f: 3, c: 37849}, 37856, 37859, {f: 3, c: 37861},
  15596. {f: 12, c: 37865}, 37878, 37880, {f: 9, c: 37882}, {f: 7, c: 37892},
  15597. {f: 4, c: 37900}, 37905, {f: 3, c: 37909}, {f: 3, c: 37914},
  15598. {f: 2, c: 37918}, {f: 5, c: 37921}, {f: 5, c: 37929}, {f: 3, c: 37935},
  15599. 37940, {f: 2, c: 37942}, 37945, {f: 3, c: 37947}, {f: 4, c: 37952},
  15600. {f: 5, c: 37957}, 37963, {f: 5, c: 37965}, 37971, {f: 11, c: 37973},
  15601. {f: 2, c: 37985}, 37988, {f: 5, c: 37990}, 37996, {f: 2, c: 37998}, 38001,
  15602. {f: 4, c: 38003}, 38008, {f: 2, c: 38010}, {f: 5, c: 38016}, 38033, 38038,
  15603. 38040, 38087, 38095, {f: 2, c: 38099}, 38106, 38118, 38139, 38172, 38176,
  15604. 38183, 38195, 38205, 38211, 38216, 38219, 38229, 38234, 38240, 38254,
  15605. {f: 2, c: 38260}, {f: 7, c: 38264}, 38273, {f: 2, c: 38276},
  15606. {f: 2, c: 38279}, 38282, 38285, 38288, 38290, {f: 3, c: 38293},
  15607. {f: 8, c: 38297}, 38306, {f: 2, c: 38310}, 38314, {f: 4, c: 38318},
  15608. {f: 3, c: 38323}, {f: 2, c: 38327}, 38330, {f: 3, c: 38336},
  15609. {f: 2, c: 38340}, 38343, 38345, {f: 3, c: 38349}, {f: 3, c: 38353},
  15610. {f: 5, c: 38359}, 38365, {f: 2, c: 38367}, {f: 2, c: 38371},
  15611. {f: 2, c: 38374}, 38380, 38399, 38407, 38419, 38424, 38427, 38430, 38432,
  15612. {f: 7, c: 38435}, {f: 3, c: 38443}, {f: 2, c: 38447}, {f: 4, c: 38455},
  15613. 38462, 38465, 38467, 38474, {f: 2, c: 38478}, {f: 3, c: 38481},
  15614. {f: 2, c: 38486}, {f: 2, c: 38489}, 38492, 38494, 38496, {f: 2, c: 38501},
  15615. 38507, {f: 3, c: 38509}, 38513, {f: 4, c: 38521}, {f: 7, c: 38526}, 38535,
  15616. 38537, 38540, {f: 3, c: 38545}, 38550, 38554, {f: 10, c: 38557}, 38569,
  15617. {f: 5, c: 38571}, 38578, 38581, 38583, 38586, 38591, {f: 2, c: 38594},
  15618. 38600, {f: 2, c: 38602}, {f: 2, c: 38608}, {f: 2, c: 38611},
  15619. {f: 2, c: 38615}, 38618, {f: 3, c: 38621}, 38625, {f: 4, c: 38628},
  15620. {f: 4, c: 38635}, {f: 2, c: 38640}, {f: 2, c: 38644}, 38648, 38650,
  15621. {f: 2, c: 38652}, 38655, {f: 2, c: 38658}, 38661, {f: 3, c: 38666},
  15622. {f: 3, c: 38672}, {f: 2, c: 38676}, {f: 5, c: 38679}, 38685,
  15623. {f: 8, c: 38687}, {f: 2, c: 38696}, {f: 2, c: 38699}, {f: 2, c: 38702},
  15624. 38705, {f: 5, c: 38707}, {f: 3, c: 38714}, {f: 3, c: 38719}, 38723,
  15625. {f: 3, c: 38725}, {f: 8, c: 38729}, [12205, 38737], {f: 2, c: 38740},
  15626. {f: 2, c: 38743}, {f: 2, c: 38748}, 38751, {f: 2, c: 38755},
  15627. {f: 2, c: 38758}, {f: 9, c: 38762}, 38773, {f: 5, c: 38775},
  15628. {f: 8, c: 38781}, {f: 5, c: 38790}, 38796, 38798, 38800, 38803,
  15629. {f: 3, c: 38805}, {f: 7, c: 38809}, {f: 2, c: 38817}, {f: 2, c: 38820},
  15630. {f: 4, c: 38823}, 38828, 38830, {f: 2, c: 38832}, 38835, {f: 8, c: 38837},
  15631. {f: 5, c: 38846}, {f: 2, c: 38852}, {f: 2, c: 38855}, 38858,
  15632. {f: 6, c: 38861}, {f: 5, c: 38868}, {f: 2, c: 38874}, 38877,
  15633. {f: 7, c: 38879}, 38888, {f: 5, c: 38894}, 38900, {f: 8, c: 38903}, 38912,
  15634. 38916, 38921, 38923, 38925, {f: 3, c: 38932}, {f: 3, c: 38937},
  15635. {f: 4, c: 38941}, {f: 2, c: 38946}, 38949, {f: 6, c: 38951},
  15636. {f: 2, c: 38958}, {f: 6, c: 38961}, {f: 2, c: 38969}, 38972,
  15637. {f: 8, c: 38974}, {f: 5, c: 38983}, {f: 4, c: 38991}, {f: 3, c: 38997},
  15638. 39002, {f: 2, c: 39004}, {f: 3, c: 39007}, {f: 2, c: 39011}, 39014,
  15639. {f: 3, c: 39016}, {f: 2, c: 39021}, 39026, 39051, 39054, 39058, 39061,
  15640. 39065, 39075, {f: 5, c: 39081}, 39088, 39090, {f: 2, c: 39092},
  15641. {f: 5, c: 39095}, {f: 7, c: 39101}, 39109, 39111, {f: 5, c: 39113},
  15642. {f: 2, c: 39119}, 39124, {f: 2, c: 39126}, {f: 2, c: 39132}, 39137,
  15643. {f: 4, c: 39139}, 39148, 39150, {f: 2, c: 39152}, 39155, {f: 7, c: 39157},
  15644. {f: 4, c: 39167}, 39172, {f: 3, c: 39174}, 39179, {f: 2, c: 39182},
  15645. {f: 4, c: 39188}, {f: 2, c: 39193}, {f: 2, c: 39196}, {f: 2, c: 39199},
  15646. {f: 6, c: 39202}, {f: 5, c: 39209}, {f: 4, c: 39215}, {f: 3, c: 39220},
  15647. {f: 4, c: 39224}, 39229, {f: 3, c: 39232}, 39236, {f: 2, c: 39238},
  15648. {f: 4, c: 39245}, 39251, 39254, {f: 4, c: 39256}, 39261, {f: 3, c: 39263},
  15649. 39268, 39270, 39283, {f: 2, c: 39288}, 39291, 39294, {f: 2, c: 39298},
  15650. 39305, 39308, 39310, {f: 11, c: 39322}, {f: 2, c: 39334}, {f: 3, c: 39337},
  15651. {f: 2, c: 39343}, 39346, {f: 12, c: 39349}, {f: 14, c: 39362}, 39379,
  15652. {f: 2, c: 39382}, 39386, 39388, 39390, 39392, {f: 10, c: 39395},
  15653. {f: 3, c: 39406}, {f: 13, c: 39410}, 39424, {f: 3, c: 39426},
  15654. {f: 7, c: 39430}, {f: 6, c: 39440}, {f: 2, c: 39447}, {f: 17, c: 39450},
  15655. 39468, 39471, {f: 5, c: 39473}, {f: 5, c: 39481}, 39487, {f: 4, c: 39494},
  15656. {f: 2, c: 39499}, 39502, {f: 5, c: 39504}, 39510, {f: 2, c: 39512},
  15657. {f: 3, c: 39516}, {f: 2, c: 39520}, 39523, {f: 4, c: 39526}, 39531, 39538,
  15658. 39555, 39561, {f: 2, c: 39565}, {f: 2, c: 39572}, 39577, 39590,
  15659. {f: 6, c: 39593}, {f: 4, c: 39602}, 39609, 39611, {f: 3, c: 39613},
  15660. {f: 2, c: 39619}, {f: 5, c: 39622}, {f: 2, c: 39629}, 39632, 39639,
  15661. {f: 6, c: 39641}, 39648, {f: 4, c: 39650}, {f: 4, c: 39655}, 39660,
  15662. {f: 9, c: 39664}, 39674, {f: 7, c: 39676}, {f: 2, c: 39684}, 39687,
  15663. {f: 4, c: 39689}, 39694, {f: 3, c: 39696}, {f: 6, c: 39700},
  15664. {f: 4, c: 39707}, {f: 2, c: 39712}, 39716, 39718, 39720, {f: 4, c: 39722},
  15665. 39728, {f: 8, c: 39731}, {f: 4, c: 39741}, 39750, {f: 3, c: 39754}, 39760,
  15666. {f: 2, c: 39762}, {f: 3, c: 39765}, 39769, {f: 20, c: 39771},
  15667. {f: 4, c: 39792}, {f: 2, c: 39797}, {f: 9, c: 39800}, 39810,
  15668. {f: 10, c: 39812}, 39823, {f: 7, c: 39827}, {f: 2, c: 39835},
  15669. {f: 11, c: 39839}, 39852, {f: 17, c: 39855}, {f: 5, c: 39874}, 39880,
  15670. {f: 9, c: 39883}, 39893, {f: 4, c: 39895}, 39900, {f: 3, c: 39902}, 39907,
  15671. {f: 2, c: 39909}, 39913, {f: 4, c: 39916}, {f: 3, c: 39921},
  15672. {f: 8, c: 39925}, 39934, {f: 8, c: 39936}, {f: 3, c: 39946},
  15673. {f: 2, c: 39950}, 39953, {f: 12, c: 39956}, {f: 2, c: 39969}, 39972,
  15674. {f: 2, c: 39974}, {f: 3, c: 39978}, {f: 3, c: 39982}, 39988, 39990, 39992,
  15675. 39994, {f: 2, c: 39996}, {f: 6, c: 39999}, {f: 2, c: 40006},
  15676. {f: 8, c: 40010}, 40019, 40021, {f: 4, c: 40025}, 40030, {f: 7, c: 40032},
  15677. {f: 5, c: 40040}, {f: 10, c: 40046}, 40057, 40059, {f: 2, c: 40061}, 40064,
  15678. {f: 2, c: 40067}, {f: 2, c: 40073}, 40076, 40079, 40083, {f: 4, c: 40086},
  15679. 40093, 40106, 40108, 40111, 40121, {f: 5, c: 40126}, {f: 2, c: 40136},
  15680. {f: 2, c: 40145}, {f: 2, c: 40154}, {f: 2, c: 40160}, {f: 2, c: 40163},
  15681. {f: 3, c: 40166}, {f: 2, c: 40170}, {f: 6, c: 40173}, 40181,
  15682. {f: 15, c: 40183}, 40200, {f: 11, c: 40202}, {f: 5, c: 40214}, 40220,
  15683. 40222, {f: 3, c: 40224}, {f: 2, c: 40228}, 40231, {f: 6, c: 40233},
  15684. {f: 10, c: 40241}, {f: 3, c: 40252}, {f: 2, c: 40256}, {f: 14, c: 40259},
  15685. {f: 8, c: 40276}, {f: 2, c: 40286}, {f: 8, c: 40290}, 40299,
  15686. {f: 2, c: 40301}, {f: 2, c: 40304}, {f: 20, c: 40307}, 40328,
  15687. {f: 9, c: 40330}, {f: 4, c: 40340}, 40345, {f: 10, c: 40347},
  15688. {f: 3, c: 40358}, {f: 5, c: 40362}, {f: 4, c: 40368}, {f: 6, c: 40373},
  15689. {f: 3, c: 40381}, 40385, 40387, {f: 14, c: 40389}, {f: 3, c: 40404}, 40408,
  15690. {f: 10, c: 40411}, {f: 8, c: 40423}, {f: 2, c: 40432}, {f: 4, c: 40436},
  15691. {f: 17, c: 40443}, {f: 8, c: 40461}, {f: 4, c: 40470}, 40476, 40484, 40487,
  15692. 40494, 40496, 40500, {f: 2, c: 40507}, 40512, 40525, 40528,
  15693. {f: 3, c: 40530}, 40534, 40537, 40541, {f: 4, c: 40543}, 40549,
  15694. {f: 2, c: 40558}, 40562, 40564, {f: 3, c: 40566}, 40571, {f: 2, c: 40576},
  15695. {f: 4, c: 40579}, {f: 2, c: 40585}, {f: 6, c: 40588}, {f: 3, c: 40596},
  15696. {f: 5, c: 40600}, 40606, {f: 5, c: 40608}, {f: 2, c: 40615},
  15697. {f: 5, c: 40618}, {f: 4, c: 40624}, {f: 2, c: 40630}, {f: 2, c: 40633},
  15698. 40636, {f: 4, c: 40639}, [12232, 40643], {f: 4, c: 40645},
  15699. {f: 2, c: 40650}, 40656, {f: 2, c: 40658}, {f: 3, c: 40661},
  15700. {f: 2, c: 40665}, 40673, {f: 2, c: 40675}, 40678, {f: 4, c: 40683},
  15701. {f: 2, c: 40688}, 40691, {f: 2, c: 40693}, 40696, 40698, {f: 9, c: 40704},
  15702. 40714, 40716, 40719, {f: 2, c: 40721}, 40724, 40726, 40728,
  15703. {f: 6, c: 40730}, 40737, {f: 9, c: 40739}, {f: 2, c: 40749},
  15704. {f: 7, c: 40752}, 40760, 40762, 40764, {f: 5, c: 40767}, {f: 5, c: 40773},
  15705. {f: 3, c: 40780}, 40787, {f: 4, c: 40789}, {f: 2, c: 40794},
  15706. {f: 2, c: 40797}, 40802, {f: 2, c: 40804}, {f: 3, c: 40807}, 40811,
  15707. {f: 5, c: 40813}, {f: 4, c: 40819}, {f: 7, c: 40824}, {f: 2, c: 40833},
  15708. {f: 2, c: 40846}, {f: 3, c: 40849}, {f: 3, c: 40854}, {f: 2, c: 40861},
  15709. {f: 5, c: 40865}, 63788, {f: 3, c: 64013}, 64017, {f: 2, c: 64019}, 64024,
  15710. {f: 3, c: 64031}, {f: 2, c: 64035}, {f: 3, c: 64039}, 11905,
  15711. [59414, 131207], [59415, 131209], [59416, 131276], 11908, 13427, 13383,
  15712. 11912, 11915, 59422, 13726, 13850, 13838, 11916, 11927, 14702, 14616,
  15713. 59430, 14799, 14815, 14963, 14800, {f: 2, c: 59435}, 15182, 15470, 15584,
  15714. 11943, [59441, 136663], 59442, 11946, 16470, 16735, 11950, 17207, 11955,
  15715. {f: 2, c: 11958}, [59451, 141711], 17329, 17324, 11963, 17373, 17622,
  15716. 18017, 17996, [59459, 132361], 18211, 18217, 18300, 18317, 11978, 18759,
  15717. 18810, 18813, {f: 2, c: 18818}, {f: 2, c: 18821}, 18847, 18843, 18871,
  15718. 18870, [59476, 133533], [59477, 147966], 19619, {f: 3, c: 19615}, 19575,
  15719. 19618, {f: 7, c: 19731}, 19886, 59492, {s: 226}, 8364, 165, 0, 0, 12351,
  15720. {s: 17}, 12436, {s: 14}, 12535, 12537, 12536, 12538, 0, {f: 3, c: 12339},
  15721. {f: 3, c: 12344}, {f: 3, c: 12586}, {f: 24, c: 12704}, 11904,
  15722. {f: 2, c: 11906}, {f: 3, c: 11909}, {f: 2, c: 11913}, {f: 10, c: 11917},
  15723. {f: 2, c: 11928}, {f: 12, c: 11931}, {f: 2, c: 11944}, {f: 3, c: 11947},
  15724. {f: 4, c: 11951}, {f: 2, c: 11956}, {f: 3, c: 11960}, {f: 14, c: 11964},
  15725. {f: 41, c: 11979}, {f: 71, c: 13312}, {f: 43, c: 13384},
  15726. {f: 298, c: 13428}, {f: 111, c: 13727}, {f: 11, c: 13839},
  15727. {f: 765, c: 13851}, {f: 85, c: 14617}, {f: 96, c: 14703},
  15728. {f: 14, c: 14801}, {f: 147, c: 14816}, {f: 218, c: 14964},
  15729. {f: 287, c: 15183}, {f: 113, c: 15471}, {f: 885, c: 15585},
  15730. {f: 264, c: 16471}, {f: 471, c: 16736}, {f: 116, c: 17208},
  15731. {f: 4, c: 17325}, {f: 43, c: 17330}, {f: 248, c: 17374},
  15732. {f: 373, c: 17623}, {f: 20, c: 17997}, {f: 193, c: 18018},
  15733. {f: 5, c: 18212}, {f: 82, c: 18218}, {f: 16, c: 18301}, {f: 441, c: 18318},
  15734. {f: 50, c: 18760}, {f: 2, c: 18811}, {f: 4, c: 18814}, 18820,
  15735. {f: 20, c: 18823}, {f: 3, c: 18844}, {f: 22, c: 18848}, {f: 703, c: 18872},
  15736. {f: 39, c: 19576}, {f: 111, c: 19620}, {f: 148, c: 19738},
  15737. {f: 7, c: 19887}]
  15738. };
  15739. var PDFFunction = (function PDFFunctionClosure() {
  15740. var CONSTRUCT_SAMPLED = 0;
  15741. var CONSTRUCT_INTERPOLATED = 2;
  15742. var CONSTRUCT_STICHED = 3;
  15743. var CONSTRUCT_POSTSCRIPT = 4;
  15744. return {
  15745. getSampleArray: function PDFFunction_getSampleArray(size, outputSize, bps,
  15746. str) {
  15747. var i, ii;
  15748. var length = 1;
  15749. for (i = 0, ii = size.length; i < ii; i++) {
  15750. length *= size[i];
  15751. }
  15752. length *= outputSize;
  15753. var array = [];
  15754. var codeSize = 0;
  15755. var codeBuf = 0;
  15756. // 32 is a valid bps so shifting won't work
  15757. var sampleMul = 1.0 / (Math.pow(2.0, bps) - 1);
  15758. var strBytes = str.getBytes((length * bps + 7) / 8);
  15759. var strIdx = 0;
  15760. for (i = 0; i < length; i++) {
  15761. while (codeSize < bps) {
  15762. codeBuf <<= 8;
  15763. codeBuf |= strBytes[strIdx++];
  15764. codeSize += 8;
  15765. }
  15766. codeSize -= bps;
  15767. array.push((codeBuf >> codeSize) * sampleMul);
  15768. codeBuf &= (1 << codeSize) - 1;
  15769. }
  15770. return array;
  15771. },
  15772. getIR: function PDFFunction_getIR(xref, fn) {
  15773. var dict = fn.dict;
  15774. if (!dict) {
  15775. dict = fn;
  15776. }
  15777. var types = [this.constructSampled,
  15778. null,
  15779. this.constructInterpolated,
  15780. this.constructStiched,
  15781. this.constructPostScript];
  15782. var typeNum = dict.get('FunctionType');
  15783. var typeFn = types[typeNum];
  15784. if (!typeFn) {
  15785. error('Unknown type of function');
  15786. }
  15787. return typeFn.call(this, fn, dict, xref);
  15788. },
  15789. fromIR: function PDFFunction_fromIR(IR) {
  15790. var type = IR[0];
  15791. switch (type) {
  15792. case CONSTRUCT_SAMPLED:
  15793. return this.constructSampledFromIR(IR);
  15794. case CONSTRUCT_INTERPOLATED:
  15795. return this.constructInterpolatedFromIR(IR);
  15796. case CONSTRUCT_STICHED:
  15797. return this.constructStichedFromIR(IR);
  15798. //case CONSTRUCT_POSTSCRIPT:
  15799. default:
  15800. return this.constructPostScriptFromIR(IR);
  15801. }
  15802. },
  15803. parse: function PDFFunction_parse(xref, fn) {
  15804. var IR = this.getIR(xref, fn);
  15805. return this.fromIR(IR);
  15806. },
  15807. constructSampled: function PDFFunction_constructSampled(str, dict) {
  15808. function toMultiArray(arr) {
  15809. var inputLength = arr.length;
  15810. var out = [];
  15811. var index = 0;
  15812. for (var i = 0; i < inputLength; i += 2) {
  15813. out[index] = [arr[i], arr[i + 1]];
  15814. ++index;
  15815. }
  15816. return out;
  15817. }
  15818. var domain = dict.get('Domain');
  15819. var range = dict.get('Range');
  15820. if (!domain || !range) {
  15821. error('No domain or range');
  15822. }
  15823. var inputSize = domain.length / 2;
  15824. var outputSize = range.length / 2;
  15825. domain = toMultiArray(domain);
  15826. range = toMultiArray(range);
  15827. var size = dict.get('Size');
  15828. var bps = dict.get('BitsPerSample');
  15829. var order = dict.get('Order') || 1;
  15830. if (order !== 1) {
  15831. // No description how cubic spline interpolation works in PDF32000:2008
  15832. // As in poppler, ignoring order, linear interpolation may work as good
  15833. info('No support for cubic spline interpolation: ' + order);
  15834. }
  15835. var encode = dict.get('Encode');
  15836. if (!encode) {
  15837. encode = [];
  15838. for (var i = 0; i < inputSize; ++i) {
  15839. encode.push(0);
  15840. encode.push(size[i] - 1);
  15841. }
  15842. }
  15843. encode = toMultiArray(encode);
  15844. var decode = dict.get('Decode');
  15845. if (!decode) {
  15846. decode = range;
  15847. } else {
  15848. decode = toMultiArray(decode);
  15849. }
  15850. var samples = this.getSampleArray(size, outputSize, bps, str);
  15851. return [
  15852. CONSTRUCT_SAMPLED, inputSize, domain, encode, decode, samples, size,
  15853. outputSize, Math.pow(2, bps) - 1, range
  15854. ];
  15855. },
  15856. constructSampledFromIR: function PDFFunction_constructSampledFromIR(IR) {
  15857. // See chapter 3, page 109 of the PDF reference
  15858. function interpolate(x, xmin, xmax, ymin, ymax) {
  15859. return ymin + ((x - xmin) * ((ymax - ymin) / (xmax - xmin)));
  15860. }
  15861. return function constructSampledFromIRResult(args) {
  15862. // See chapter 3, page 110 of the PDF reference.
  15863. var m = IR[1];
  15864. var domain = IR[2];
  15865. var encode = IR[3];
  15866. var decode = IR[4];
  15867. var samples = IR[5];
  15868. var size = IR[6];
  15869. var n = IR[7];
  15870. //var mask = IR[8];
  15871. var range = IR[9];
  15872. if (m != args.length) {
  15873. error('Incorrect number of arguments: ' + m + ' != ' +
  15874. args.length);
  15875. }
  15876. var x = args;
  15877. // Building the cube vertices: its part and sample index
  15878. // http://rjwagner49.com/Mathematics/Interpolation.pdf
  15879. var cubeVertices = 1 << m;
  15880. var cubeN = new Float64Array(cubeVertices);
  15881. var cubeVertex = new Uint32Array(cubeVertices);
  15882. var i, j;
  15883. for (j = 0; j < cubeVertices; j++) {
  15884. cubeN[j] = 1;
  15885. }
  15886. var k = n, pos = 1;
  15887. // Map x_i to y_j for 0 <= i < m using the sampled function.
  15888. for (i = 0; i < m; ++i) {
  15889. // x_i' = min(max(x_i, Domain_2i), Domain_2i+1)
  15890. var domain_2i = domain[i][0];
  15891. var domain_2i_1 = domain[i][1];
  15892. var xi = Math.min(Math.max(x[i], domain_2i), domain_2i_1);
  15893. // e_i = Interpolate(x_i', Domain_2i, Domain_2i+1,
  15894. // Encode_2i, Encode_2i+1)
  15895. var e = interpolate(xi, domain_2i, domain_2i_1,
  15896. encode[i][0], encode[i][1]);
  15897. // e_i' = min(max(e_i, 0), Size_i - 1)
  15898. var size_i = size[i];
  15899. e = Math.min(Math.max(e, 0), size_i - 1);
  15900. // Adjusting the cube: N and vertex sample index
  15901. var e0 = e < size_i - 1 ? Math.floor(e) : e - 1; // e1 = e0 + 1;
  15902. var n0 = e0 + 1 - e; // (e1 - e) / (e1 - e0);
  15903. var n1 = e - e0; // (e - e0) / (e1 - e0);
  15904. var offset0 = e0 * k;
  15905. var offset1 = offset0 + k; // e1 * k
  15906. for (j = 0; j < cubeVertices; j++) {
  15907. if (j & pos) {
  15908. cubeN[j] *= n1;
  15909. cubeVertex[j] += offset1;
  15910. } else {
  15911. cubeN[j] *= n0;
  15912. cubeVertex[j] += offset0;
  15913. }
  15914. }
  15915. k *= size_i;
  15916. pos <<= 1;
  15917. }
  15918. var y = new Float64Array(n);
  15919. for (j = 0; j < n; ++j) {
  15920. // Sum all cube vertices' samples portions
  15921. var rj = 0;
  15922. for (i = 0; i < cubeVertices; i++) {
  15923. rj += samples[cubeVertex[i] + j] * cubeN[i];
  15924. }
  15925. // r_j' = Interpolate(r_j, 0, 2^BitsPerSample - 1,
  15926. // Decode_2j, Decode_2j+1)
  15927. rj = interpolate(rj, 0, 1, decode[j][0], decode[j][1]);
  15928. // y_j = min(max(r_j, range_2j), range_2j+1)
  15929. y[j] = Math.min(Math.max(rj, range[j][0]), range[j][1]);
  15930. }
  15931. return y;
  15932. };
  15933. },
  15934. constructInterpolated: function PDFFunction_constructInterpolated(str,
  15935. dict) {
  15936. var c0 = dict.get('C0') || [0];
  15937. var c1 = dict.get('C1') || [1];
  15938. var n = dict.get('N');
  15939. if (!isArray(c0) || !isArray(c1)) {
  15940. error('Illegal dictionary for interpolated function');
  15941. }
  15942. var length = c0.length;
  15943. var diff = [];
  15944. for (var i = 0; i < length; ++i) {
  15945. diff.push(c1[i] - c0[i]);
  15946. }
  15947. return [CONSTRUCT_INTERPOLATED, c0, diff, n];
  15948. },
  15949. constructInterpolatedFromIR:
  15950. function PDFFunction_constructInterpolatedFromIR(IR) {
  15951. var c0 = IR[1];
  15952. var diff = IR[2];
  15953. var n = IR[3];
  15954. var length = diff.length;
  15955. return function constructInterpolatedFromIRResult(args) {
  15956. var x = n == 1 ? args[0] : Math.pow(args[0], n);
  15957. var out = [];
  15958. for (var j = 0; j < length; ++j) {
  15959. out.push(c0[j] + (x * diff[j]));
  15960. }
  15961. return out;
  15962. };
  15963. },
  15964. constructStiched: function PDFFunction_constructStiched(fn, dict, xref) {
  15965. var domain = dict.get('Domain');
  15966. if (!domain) {
  15967. error('No domain');
  15968. }
  15969. var inputSize = domain.length / 2;
  15970. if (inputSize != 1) {
  15971. error('Bad domain for stiched function');
  15972. }
  15973. var fnRefs = dict.get('Functions');
  15974. var fns = [];
  15975. for (var i = 0, ii = fnRefs.length; i < ii; ++i) {
  15976. fns.push(PDFFunction.getIR(xref, xref.fetchIfRef(fnRefs[i])));
  15977. }
  15978. var bounds = dict.get('Bounds');
  15979. var encode = dict.get('Encode');
  15980. return [CONSTRUCT_STICHED, domain, bounds, encode, fns];
  15981. },
  15982. constructStichedFromIR: function PDFFunction_constructStichedFromIR(IR) {
  15983. var domain = IR[1];
  15984. var bounds = IR[2];
  15985. var encode = IR[3];
  15986. var fnsIR = IR[4];
  15987. var fns = [];
  15988. for (var i = 0, ii = fnsIR.length; i < ii; i++) {
  15989. fns.push(PDFFunction.fromIR(fnsIR[i]));
  15990. }
  15991. return function constructStichedFromIRResult(args) {
  15992. var clip = function constructStichedFromIRClip(v, min, max) {
  15993. if (v > max) {
  15994. v = max;
  15995. } else if (v < min) {
  15996. v = min;
  15997. }
  15998. return v;
  15999. };
  16000. // clip to domain
  16001. var v = clip(args[0], domain[0], domain[1]);
  16002. // calulate which bound the value is in
  16003. for (var i = 0, ii = bounds.length; i < ii; ++i) {
  16004. if (v < bounds[i]) {
  16005. break;
  16006. }
  16007. }
  16008. // encode value into domain of function
  16009. var dmin = domain[0];
  16010. if (i > 0) {
  16011. dmin = bounds[i - 1];
  16012. }
  16013. var dmax = domain[1];
  16014. if (i < bounds.length) {
  16015. dmax = bounds[i];
  16016. }
  16017. var rmin = encode[2 * i];
  16018. var rmax = encode[2 * i + 1];
  16019. var v2 = rmin + (v - dmin) * (rmax - rmin) / (dmax - dmin);
  16020. // call the appropriate function
  16021. return fns[i]([v2]);
  16022. };
  16023. },
  16024. constructPostScript: function PDFFunction_constructPostScript(fn, dict,
  16025. xref) {
  16026. var domain = dict.get('Domain');
  16027. var range = dict.get('Range');
  16028. if (!domain) {
  16029. error('No domain.');
  16030. }
  16031. if (!range) {
  16032. error('No range.');
  16033. }
  16034. var lexer = new PostScriptLexer(fn);
  16035. var parser = new PostScriptParser(lexer);
  16036. var code = parser.parse();
  16037. return [CONSTRUCT_POSTSCRIPT, domain, range, code];
  16038. },
  16039. constructPostScriptFromIR: function PDFFunction_constructPostScriptFromIR(
  16040. IR) {
  16041. var domain = IR[1];
  16042. var range = IR[2];
  16043. var code = IR[3];
  16044. var numOutputs = range.length >> 1;
  16045. var numInputs = domain.length >> 1;
  16046. var evaluator = new PostScriptEvaluator(code);
  16047. // Cache the values for a big speed up, the cache size is limited though
  16048. // since the number of possible values can be huge from a PS function.
  16049. var cache = {};
  16050. // The MAX_CACHE_SIZE is set to ~4x the maximum number of distinct values
  16051. // seen in our tests.
  16052. var MAX_CACHE_SIZE = 2048 * 4;
  16053. var cache_available = MAX_CACHE_SIZE;
  16054. return function constructPostScriptFromIRResult(args) {
  16055. var i, value;
  16056. var key = '';
  16057. var input = new Array(numInputs);
  16058. for (i = 0; i < numInputs; i++) {
  16059. value = args[i];
  16060. input[i] = value;
  16061. key += value + '_';
  16062. }
  16063. var cachedValue = cache[key];
  16064. if (cachedValue !== undefined) {
  16065. return cachedValue;
  16066. }
  16067. var output = new Array(numOutputs);
  16068. var stack = evaluator.execute(input);
  16069. var stackIndex = stack.length - numOutputs;
  16070. for (i = 0; i < numOutputs; i++) {
  16071. value = stack[stackIndex + i];
  16072. var bound = range[i * 2];
  16073. if (value < bound) {
  16074. value = bound;
  16075. } else {
  16076. bound = range[i * 2 +1];
  16077. if (value > bound) {
  16078. value = bound;
  16079. }
  16080. }
  16081. output[i] = value;
  16082. }
  16083. if (cache_available > 0) {
  16084. cache_available--;
  16085. cache[key] = output;
  16086. }
  16087. return output;
  16088. };
  16089. }
  16090. };
  16091. })();
  16092. function isPDFFunction(v) {
  16093. var fnDict;
  16094. if (typeof v != 'object') {
  16095. return false;
  16096. } else if (isDict(v)) {
  16097. fnDict = v;
  16098. } else if (isStream(v)) {
  16099. fnDict = v.dict;
  16100. } else {
  16101. return false;
  16102. }
  16103. return fnDict.has('FunctionType');
  16104. }
  16105. var PostScriptStack = (function PostScriptStackClosure() {
  16106. var MAX_STACK_SIZE = 100;
  16107. function PostScriptStack(initialStack) {
  16108. this.stack = initialStack || [];
  16109. }
  16110. PostScriptStack.prototype = {
  16111. push: function PostScriptStack_push(value) {
  16112. if (this.stack.length >= MAX_STACK_SIZE) {
  16113. error('PostScript function stack overflow.');
  16114. }
  16115. this.stack.push(value);
  16116. },
  16117. pop: function PostScriptStack_pop() {
  16118. if (this.stack.length <= 0) {
  16119. error('PostScript function stack underflow.');
  16120. }
  16121. return this.stack.pop();
  16122. },
  16123. copy: function PostScriptStack_copy(n) {
  16124. if (this.stack.length + n >= MAX_STACK_SIZE) {
  16125. error('PostScript function stack overflow.');
  16126. }
  16127. var stack = this.stack;
  16128. for (var i = stack.length - n, j = n - 1; j >= 0; j--, i++) {
  16129. stack.push(stack[i]);
  16130. }
  16131. },
  16132. index: function PostScriptStack_index(n) {
  16133. this.push(this.stack[this.stack.length - n - 1]);
  16134. },
  16135. // rotate the last n stack elements p times
  16136. roll: function PostScriptStack_roll(n, p) {
  16137. var stack = this.stack;
  16138. var l = stack.length - n;
  16139. var r = stack.length - 1, c = l + (p - Math.floor(p / n) * n), i, j, t;
  16140. for (i = l, j = r; i < j; i++, j--) {
  16141. t = stack[i]; stack[i] = stack[j]; stack[j] = t;
  16142. }
  16143. for (i = l, j = c - 1; i < j; i++, j--) {
  16144. t = stack[i]; stack[i] = stack[j]; stack[j] = t;
  16145. }
  16146. for (i = c, j = r; i < j; i++, j--) {
  16147. t = stack[i]; stack[i] = stack[j]; stack[j] = t;
  16148. }
  16149. }
  16150. };
  16151. return PostScriptStack;
  16152. })();
  16153. var PostScriptEvaluator = (function PostScriptEvaluatorClosure() {
  16154. function PostScriptEvaluator(operators) {
  16155. this.operators = operators;
  16156. }
  16157. PostScriptEvaluator.prototype = {
  16158. execute: function PostScriptEvaluator_execute(initialStack) {
  16159. var stack = new PostScriptStack(initialStack);
  16160. var counter = 0;
  16161. var operators = this.operators;
  16162. var length = operators.length;
  16163. var operator, a, b;
  16164. while (counter < length) {
  16165. operator = operators[counter++];
  16166. if (typeof operator == 'number') {
  16167. // Operator is really an operand and should be pushed to the stack.
  16168. stack.push(operator);
  16169. continue;
  16170. }
  16171. switch (operator) {
  16172. // non standard ps operators
  16173. case 'jz': // jump if false
  16174. b = stack.pop();
  16175. a = stack.pop();
  16176. if (!a) {
  16177. counter = b;
  16178. }
  16179. break;
  16180. case 'j': // jump
  16181. a = stack.pop();
  16182. counter = a;
  16183. break;
  16184. // all ps operators in alphabetical order (excluding if/ifelse)
  16185. case 'abs':
  16186. a = stack.pop();
  16187. stack.push(Math.abs(a));
  16188. break;
  16189. case 'add':
  16190. b = stack.pop();
  16191. a = stack.pop();
  16192. stack.push(a + b);
  16193. break;
  16194. case 'and':
  16195. b = stack.pop();
  16196. a = stack.pop();
  16197. if (isBool(a) && isBool(b)) {
  16198. stack.push(a && b);
  16199. } else {
  16200. stack.push(a & b);
  16201. }
  16202. break;
  16203. case 'atan':
  16204. a = stack.pop();
  16205. stack.push(Math.atan(a));
  16206. break;
  16207. case 'bitshift':
  16208. b = stack.pop();
  16209. a = stack.pop();
  16210. if (a > 0) {
  16211. stack.push(a << b);
  16212. } else {
  16213. stack.push(a >> b);
  16214. }
  16215. break;
  16216. case 'ceiling':
  16217. a = stack.pop();
  16218. stack.push(Math.ceil(a));
  16219. break;
  16220. case 'copy':
  16221. a = stack.pop();
  16222. stack.copy(a);
  16223. break;
  16224. case 'cos':
  16225. a = stack.pop();
  16226. stack.push(Math.cos(a));
  16227. break;
  16228. case 'cvi':
  16229. a = stack.pop() | 0;
  16230. stack.push(a);
  16231. break;
  16232. case 'cvr':
  16233. // noop
  16234. break;
  16235. case 'div':
  16236. b = stack.pop();
  16237. a = stack.pop();
  16238. stack.push(a / b);
  16239. break;
  16240. case 'dup':
  16241. stack.copy(1);
  16242. break;
  16243. case 'eq':
  16244. b = stack.pop();
  16245. a = stack.pop();
  16246. stack.push(a == b);
  16247. break;
  16248. case 'exch':
  16249. stack.roll(2, 1);
  16250. break;
  16251. case 'exp':
  16252. b = stack.pop();
  16253. a = stack.pop();
  16254. stack.push(Math.pow(a, b));
  16255. break;
  16256. case 'false':
  16257. stack.push(false);
  16258. break;
  16259. case 'floor':
  16260. a = stack.pop();
  16261. stack.push(Math.floor(a));
  16262. break;
  16263. case 'ge':
  16264. b = stack.pop();
  16265. a = stack.pop();
  16266. stack.push(a >= b);
  16267. break;
  16268. case 'gt':
  16269. b = stack.pop();
  16270. a = stack.pop();
  16271. stack.push(a > b);
  16272. break;
  16273. case 'idiv':
  16274. b = stack.pop();
  16275. a = stack.pop();
  16276. stack.push((a / b) | 0);
  16277. break;
  16278. case 'index':
  16279. a = stack.pop();
  16280. stack.index(a);
  16281. break;
  16282. case 'le':
  16283. b = stack.pop();
  16284. a = stack.pop();
  16285. stack.push(a <= b);
  16286. break;
  16287. case 'ln':
  16288. a = stack.pop();
  16289. stack.push(Math.log(a));
  16290. break;
  16291. case 'log':
  16292. a = stack.pop();
  16293. stack.push(Math.log(a) / Math.LN10);
  16294. break;
  16295. case 'lt':
  16296. b = stack.pop();
  16297. a = stack.pop();
  16298. stack.push(a < b);
  16299. break;
  16300. case 'mod':
  16301. b = stack.pop();
  16302. a = stack.pop();
  16303. stack.push(a % b);
  16304. break;
  16305. case 'mul':
  16306. b = stack.pop();
  16307. a = stack.pop();
  16308. stack.push(a * b);
  16309. break;
  16310. case 'ne':
  16311. b = stack.pop();
  16312. a = stack.pop();
  16313. stack.push(a != b);
  16314. break;
  16315. case 'neg':
  16316. a = stack.pop();
  16317. stack.push(-a);
  16318. break;
  16319. case 'not':
  16320. a = stack.pop();
  16321. if (isBool(a)) {
  16322. stack.push(!a);
  16323. } else {
  16324. stack.push(~a);
  16325. }
  16326. break;
  16327. case 'or':
  16328. b = stack.pop();
  16329. a = stack.pop();
  16330. if (isBool(a) && isBool(b)) {
  16331. stack.push(a || b);
  16332. } else {
  16333. stack.push(a | b);
  16334. }
  16335. break;
  16336. case 'pop':
  16337. stack.pop();
  16338. break;
  16339. case 'roll':
  16340. b = stack.pop();
  16341. a = stack.pop();
  16342. stack.roll(a, b);
  16343. break;
  16344. case 'round':
  16345. a = stack.pop();
  16346. stack.push(Math.round(a));
  16347. break;
  16348. case 'sin':
  16349. a = stack.pop();
  16350. stack.push(Math.sin(a));
  16351. break;
  16352. case 'sqrt':
  16353. a = stack.pop();
  16354. stack.push(Math.sqrt(a));
  16355. break;
  16356. case 'sub':
  16357. b = stack.pop();
  16358. a = stack.pop();
  16359. stack.push(a - b);
  16360. break;
  16361. case 'true':
  16362. stack.push(true);
  16363. break;
  16364. case 'truncate':
  16365. a = stack.pop();
  16366. a = a < 0 ? Math.ceil(a) : Math.floor(a);
  16367. stack.push(a);
  16368. break;
  16369. case 'xor':
  16370. b = stack.pop();
  16371. a = stack.pop();
  16372. if (isBool(a) && isBool(b)) {
  16373. stack.push(a != b);
  16374. } else {
  16375. stack.push(a ^ b);
  16376. }
  16377. break;
  16378. default:
  16379. error('Unknown operator ' + operator);
  16380. break;
  16381. }
  16382. }
  16383. return stack.stack;
  16384. }
  16385. };
  16386. return PostScriptEvaluator;
  16387. })();
  16388. var ColorSpace = (function ColorSpaceClosure() {
  16389. // Constructor should define this.numComps, this.defaultColor, this.name
  16390. function ColorSpace() {
  16391. error('should not call ColorSpace constructor');
  16392. }
  16393. ColorSpace.prototype = {
  16394. /**
  16395. * Converts the color value to the RGB color. The color components are
  16396. * located in the src array starting from the srcOffset. Returns the array
  16397. * of the rgb components, each value ranging from [0,255].
  16398. */
  16399. getRgb: function ColorSpace_getRgb(src, srcOffset) {
  16400. var rgb = new Uint8Array(3);
  16401. this.getRgbItem(src, srcOffset, rgb, 0);
  16402. return rgb;
  16403. },
  16404. /**
  16405. * Converts the color value to the RGB color, similar to the getRgb method.
  16406. * The result placed into the dest array starting from the destOffset.
  16407. */
  16408. getRgbItem: function ColorSpace_getRgbItem(src, srcOffset,
  16409. dest, destOffset) {
  16410. error('Should not call ColorSpace.getRgbItem');
  16411. },
  16412. /**
  16413. * Converts the specified number of the color values to the RGB colors.
  16414. * The colors are located in the src array starting from the srcOffset.
  16415. * The result is placed into the dest array starting from the destOffset.
  16416. * The src array items shall be in [0,2^bits) range, the dest array items
  16417. * will be in [0,255] range. alpha01 indicates how many alpha components
  16418. * there are in the dest array; it will be either 0 (RGB array) or 1 (RGBA
  16419. * array).
  16420. */
  16421. getRgbBuffer: function ColorSpace_getRgbBuffer(src, srcOffset, count,
  16422. dest, destOffset, bits,
  16423. alpha01) {
  16424. error('Should not call ColorSpace.getRgbBuffer');
  16425. },
  16426. /**
  16427. * Determines the number of bytes required to store the result of the
  16428. * conversion done by the getRgbBuffer method. As in getRgbBuffer,
  16429. * |alpha01| is either 0 (RGB output) or 1 (RGBA output).
  16430. */
  16431. getOutputLength: function ColorSpace_getOutputLength(inputLength,
  16432. alpha01) {
  16433. error('Should not call ColorSpace.getOutputLength');
  16434. },
  16435. /**
  16436. * Returns true if source data will be equal the result/output data.
  16437. */
  16438. isPassthrough: function ColorSpace_isPassthrough(bits) {
  16439. return false;
  16440. },
  16441. /**
  16442. * Fills in the RGB colors in the destination buffer. alpha01 indicates
  16443. * how many alpha components there are in the dest array; it will be either
  16444. * 0 (RGB array) or 1 (RGBA array).
  16445. */
  16446. fillRgb: function ColorSpace_fillRgb(dest, originalWidth,
  16447. originalHeight, width, height,
  16448. actualHeight, bpc, comps, alpha01) {
  16449. var count = originalWidth * originalHeight;
  16450. var rgbBuf = null;
  16451. var numComponentColors = 1 << bpc;
  16452. var needsResizing = originalHeight != height || originalWidth != width;
  16453. var i, ii;
  16454. if (this.isPassthrough(bpc)) {
  16455. rgbBuf = comps;
  16456. } else if (this.numComps === 1 && count > numComponentColors &&
  16457. this.name !== 'DeviceGray' && this.name !== 'DeviceRGB') {
  16458. // Optimization: create a color map when there is just one component and
  16459. // we are converting more colors than the size of the color map. We
  16460. // don't build the map if the colorspace is gray or rgb since those
  16461. // methods are faster than building a map. This mainly offers big speed
  16462. // ups for indexed and alternate colorspaces.
  16463. //
  16464. // TODO it may be worth while to cache the color map. While running
  16465. // testing I never hit a cache so I will leave that out for now (perhaps
  16466. // we are reparsing colorspaces too much?).
  16467. var allColors = bpc <= 8 ? new Uint8Array(numComponentColors) :
  16468. new Uint16Array(numComponentColors);
  16469. var key;
  16470. for (i = 0; i < numComponentColors; i++) {
  16471. allColors[i] = i;
  16472. }
  16473. var colorMap = new Uint8Array(numComponentColors * 3);
  16474. this.getRgbBuffer(allColors, 0, numComponentColors, colorMap, 0, bpc,
  16475. /* alpha01 = */ 0);
  16476. var destPos, rgbPos;
  16477. if (!needsResizing) {
  16478. // Fill in the RGB values directly into |dest|.
  16479. destPos = 0;
  16480. for (i = 0; i < count; ++i) {
  16481. key = comps[i] * 3;
  16482. dest[destPos++] = colorMap[key];
  16483. dest[destPos++] = colorMap[key + 1];
  16484. dest[destPos++] = colorMap[key + 2];
  16485. destPos += alpha01;
  16486. }
  16487. } else {
  16488. rgbBuf = new Uint8Array(count * 3);
  16489. rgbPos = 0;
  16490. for (i = 0; i < count; ++i) {
  16491. key = comps[i] * 3;
  16492. rgbBuf[rgbPos++] = colorMap[key];
  16493. rgbBuf[rgbPos++] = colorMap[key + 1];
  16494. rgbBuf[rgbPos++] = colorMap[key + 2];
  16495. }
  16496. }
  16497. } else {
  16498. if (!needsResizing) {
  16499. // Fill in the RGB values directly into |dest|.
  16500. this.getRgbBuffer(comps, 0, width * actualHeight, dest, 0, bpc,
  16501. alpha01);
  16502. } else {
  16503. rgbBuf = new Uint8Array(count * 3);
  16504. this.getRgbBuffer(comps, 0, count, rgbBuf, 0, bpc,
  16505. /* alpha01 = */ 0);
  16506. }
  16507. }
  16508. if (rgbBuf) {
  16509. if (needsResizing) {
  16510. PDFImage.resize(rgbBuf, bpc, 3, originalWidth, originalHeight, width,
  16511. height, dest, alpha01);
  16512. } else {
  16513. rgbPos = 0;
  16514. destPos = 0;
  16515. for (i = 0, ii = width * actualHeight; i < ii; i++) {
  16516. dest[destPos++] = rgbBuf[rgbPos++];
  16517. dest[destPos++] = rgbBuf[rgbPos++];
  16518. dest[destPos++] = rgbBuf[rgbPos++];
  16519. destPos += alpha01;
  16520. }
  16521. }
  16522. }
  16523. },
  16524. /**
  16525. * True if the colorspace has components in the default range of [0, 1].
  16526. * This should be true for all colorspaces except for lab color spaces
  16527. * which are [0,100], [-128, 127], [-128, 127].
  16528. */
  16529. usesZeroToOneRange: true
  16530. };
  16531. ColorSpace.parse = function ColorSpace_parse(cs, xref, res) {
  16532. var IR = ColorSpace.parseToIR(cs, xref, res);
  16533. if (IR instanceof AlternateCS) {
  16534. return IR;
  16535. }
  16536. return ColorSpace.fromIR(IR);
  16537. };
  16538. ColorSpace.fromIR = function ColorSpace_fromIR(IR) {
  16539. var name = isArray(IR) ? IR[0] : IR;
  16540. var whitePoint, blackPoint;
  16541. switch (name) {
  16542. case 'DeviceGrayCS':
  16543. return this.singletons.gray;
  16544. case 'DeviceRgbCS':
  16545. return this.singletons.rgb;
  16546. case 'DeviceCmykCS':
  16547. return this.singletons.cmyk;
  16548. case 'CalGrayCS':
  16549. whitePoint = IR[1].WhitePoint;
  16550. blackPoint = IR[1].BlackPoint;
  16551. var gamma = IR[1].Gamma;
  16552. return new CalGrayCS(whitePoint, blackPoint, gamma);
  16553. case 'PatternCS':
  16554. var basePatternCS = IR[1];
  16555. if (basePatternCS) {
  16556. basePatternCS = ColorSpace.fromIR(basePatternCS);
  16557. }
  16558. return new PatternCS(basePatternCS);
  16559. case 'IndexedCS':
  16560. var baseIndexedCS = IR[1];
  16561. var hiVal = IR[2];
  16562. var lookup = IR[3];
  16563. return new IndexedCS(ColorSpace.fromIR(baseIndexedCS), hiVal, lookup);
  16564. case 'AlternateCS':
  16565. var numComps = IR[1];
  16566. var alt = IR[2];
  16567. var tintFnIR = IR[3];
  16568. return new AlternateCS(numComps, ColorSpace.fromIR(alt),
  16569. PDFFunction.fromIR(tintFnIR));
  16570. case 'LabCS':
  16571. whitePoint = IR[1].WhitePoint;
  16572. blackPoint = IR[1].BlackPoint;
  16573. var range = IR[1].Range;
  16574. return new LabCS(whitePoint, blackPoint, range);
  16575. default:
  16576. error('Unkown name ' + name);
  16577. }
  16578. return null;
  16579. };
  16580. ColorSpace.parseToIR = function ColorSpace_parseToIR(cs, xref, res) {
  16581. if (isName(cs)) {
  16582. var colorSpaces = res.get('ColorSpace');
  16583. if (isDict(colorSpaces)) {
  16584. var refcs = colorSpaces.get(cs.name);
  16585. if (refcs) {
  16586. cs = refcs;
  16587. }
  16588. }
  16589. }
  16590. cs = xref.fetchIfRef(cs);
  16591. var mode;
  16592. if (isName(cs)) {
  16593. mode = cs.name;
  16594. this.mode = mode;
  16595. switch (mode) {
  16596. case 'DeviceGray':
  16597. case 'G':
  16598. return 'DeviceGrayCS';
  16599. case 'DeviceRGB':
  16600. case 'RGB':
  16601. return 'DeviceRgbCS';
  16602. case 'DeviceCMYK':
  16603. case 'CMYK':
  16604. return 'DeviceCmykCS';
  16605. case 'Pattern':
  16606. return ['PatternCS', null];
  16607. default:
  16608. error('unrecognized colorspace ' + mode);
  16609. }
  16610. } else if (isArray(cs)) {
  16611. mode = cs[0].name;
  16612. this.mode = mode;
  16613. var numComps, params;
  16614. switch (mode) {
  16615. case 'DeviceGray':
  16616. case 'G':
  16617. return 'DeviceGrayCS';
  16618. case 'DeviceRGB':
  16619. case 'RGB':
  16620. return 'DeviceRgbCS';
  16621. case 'DeviceCMYK':
  16622. case 'CMYK':
  16623. return 'DeviceCmykCS';
  16624. case 'CalGray':
  16625. params = cs[1].getAll();
  16626. return ['CalGrayCS', params];
  16627. case 'CalRGB':
  16628. return 'DeviceRgbCS';
  16629. case 'ICCBased':
  16630. var stream = xref.fetchIfRef(cs[1]);
  16631. var dict = stream.dict;
  16632. numComps = dict.get('N');
  16633. if (numComps == 1) {
  16634. return 'DeviceGrayCS';
  16635. } else if (numComps == 3) {
  16636. return 'DeviceRgbCS';
  16637. } else if (numComps == 4) {
  16638. return 'DeviceCmykCS';
  16639. }
  16640. break;
  16641. case 'Pattern':
  16642. var basePatternCS = cs[1];
  16643. if (basePatternCS) {
  16644. basePatternCS = ColorSpace.parseToIR(basePatternCS, xref, res);
  16645. }
  16646. return ['PatternCS', basePatternCS];
  16647. case 'Indexed':
  16648. case 'I':
  16649. var baseIndexedCS = ColorSpace.parseToIR(cs[1], xref, res);
  16650. var hiVal = cs[2] + 1;
  16651. var lookup = xref.fetchIfRef(cs[3]);
  16652. if (isStream(lookup)) {
  16653. lookup = lookup.getBytes();
  16654. }
  16655. return ['IndexedCS', baseIndexedCS, hiVal, lookup];
  16656. case 'Separation':
  16657. case 'DeviceN':
  16658. var name = cs[1];
  16659. numComps = 1;
  16660. if (isName(name)) {
  16661. numComps = 1;
  16662. } else if (isArray(name)) {
  16663. numComps = name.length;
  16664. }
  16665. var alt = ColorSpace.parseToIR(cs[2], xref, res);
  16666. var tintFnIR = PDFFunction.getIR(xref, xref.fetchIfRef(cs[3]));
  16667. return ['AlternateCS', numComps, alt, tintFnIR];
  16668. case 'Lab':
  16669. params = cs[1].getAll();
  16670. return ['LabCS', params];
  16671. default:
  16672. error('unimplemented color space object "' + mode + '"');
  16673. }
  16674. } else {
  16675. error('unrecognized color space object: "' + cs + '"');
  16676. }
  16677. return null;
  16678. };
  16679. /**
  16680. * Checks if a decode map matches the default decode map for a color space.
  16681. * This handles the general decode maps where there are two values per
  16682. * component. e.g. [0, 1, 0, 1, 0, 1] for a RGB color.
  16683. * This does not handle Lab, Indexed, or Pattern decode maps since they are
  16684. * slightly different.
  16685. * @param {Array} decode Decode map (usually from an image).
  16686. * @param {Number} n Number of components the color space has.
  16687. */
  16688. ColorSpace.isDefaultDecode = function ColorSpace_isDefaultDecode(decode, n) {
  16689. if (!decode) {
  16690. return true;
  16691. }
  16692. if (n * 2 !== decode.length) {
  16693. warn('The decode map is not the correct length');
  16694. return true;
  16695. }
  16696. for (var i = 0, ii = decode.length; i < ii; i += 2) {
  16697. if (decode[i] !== 0 || decode[i + 1] != 1) {
  16698. return false;
  16699. }
  16700. }
  16701. return true;
  16702. };
  16703. ColorSpace.singletons = {
  16704. get gray() {
  16705. return shadow(this, 'gray', new DeviceGrayCS());
  16706. },
  16707. get rgb() {
  16708. return shadow(this, 'rgb', new DeviceRgbCS());
  16709. },
  16710. get cmyk() {
  16711. return shadow(this, 'cmyk', new DeviceCmykCS());
  16712. }
  16713. };
  16714. return ColorSpace;
  16715. })();
  16716. /**
  16717. * Alternate color space handles both Separation and DeviceN color spaces. A
  16718. * Separation color space is actually just a DeviceN with one color component.
  16719. * Both color spaces use a tinting function to convert colors to a base color
  16720. * space.
  16721. */
  16722. var AlternateCS = (function AlternateCSClosure() {
  16723. function AlternateCS(numComps, base, tintFn) {
  16724. this.name = 'Alternate';
  16725. this.numComps = numComps;
  16726. this.defaultColor = new Float32Array(numComps);
  16727. for (var i = 0; i < numComps; ++i) {
  16728. this.defaultColor[i] = 1;
  16729. }
  16730. this.base = base;
  16731. this.tintFn = tintFn;
  16732. }
  16733. AlternateCS.prototype = {
  16734. getRgb: ColorSpace.prototype.getRgb,
  16735. getRgbItem: function AlternateCS_getRgbItem(src, srcOffset,
  16736. dest, destOffset) {
  16737. var baseNumComps = this.base.numComps;
  16738. var input = 'subarray' in src ?
  16739. src.subarray(srcOffset, srcOffset + this.numComps) :
  16740. Array.prototype.slice.call(src, srcOffset, srcOffset + this.numComps);
  16741. var tinted = this.tintFn(input);
  16742. this.base.getRgbItem(tinted, 0, dest, destOffset);
  16743. },
  16744. getRgbBuffer: function AlternateCS_getRgbBuffer(src, srcOffset, count,
  16745. dest, destOffset, bits,
  16746. alpha01) {
  16747. var tinted;
  16748. var tintFn = this.tintFn;
  16749. var base = this.base;
  16750. var scale = 1 / ((1 << bits) - 1);
  16751. var baseNumComps = base.numComps;
  16752. var usesZeroToOneRange = base.usesZeroToOneRange;
  16753. var isPassthrough = (base.isPassthrough(8) || !usesZeroToOneRange) &&
  16754. alpha01 === 0;
  16755. var pos = isPassthrough ? destOffset : 0;
  16756. var baseBuf = isPassthrough ? dest : new Uint8Array(baseNumComps * count);
  16757. var numComps = this.numComps;
  16758. var scaled = new Float32Array(numComps);
  16759. var i, j;
  16760. if (usesZeroToOneRange) {
  16761. for (i = 0; i < count; i++) {
  16762. for (j = 0; j < numComps; j++) {
  16763. scaled[j] = src[srcOffset++] * scale;
  16764. }
  16765. tinted = tintFn(scaled);
  16766. for (j = 0; j < baseNumComps; j++) {
  16767. baseBuf[pos++] = tinted[j] * 255;
  16768. }
  16769. }
  16770. } else {
  16771. for (i = 0; i < count; i++) {
  16772. for (j = 0; j < numComps; j++) {
  16773. scaled[j] = src[srcOffset++] * scale;
  16774. }
  16775. tinted = tintFn(scaled);
  16776. base.getRgbItem(tinted, 0, baseBuf, pos);
  16777. pos += baseNumComps;
  16778. }
  16779. }
  16780. if (!isPassthrough) {
  16781. base.getRgbBuffer(baseBuf, 0, count, dest, destOffset, 8, alpha01);
  16782. }
  16783. },
  16784. getOutputLength: function AlternateCS_getOutputLength(inputLength,
  16785. alpha01) {
  16786. return this.base.getOutputLength(inputLength *
  16787. this.base.numComps / this.numComps,
  16788. alpha01);
  16789. },
  16790. isPassthrough: ColorSpace.prototype.isPassthrough,
  16791. fillRgb: ColorSpace.prototype.fillRgb,
  16792. isDefaultDecode: function AlternateCS_isDefaultDecode(decodeMap) {
  16793. return ColorSpace.isDefaultDecode(decodeMap, this.numComps);
  16794. },
  16795. usesZeroToOneRange: true
  16796. };
  16797. return AlternateCS;
  16798. })();
  16799. var PatternCS = (function PatternCSClosure() {
  16800. function PatternCS(baseCS) {
  16801. this.name = 'Pattern';
  16802. this.base = baseCS;
  16803. }
  16804. PatternCS.prototype = {};
  16805. return PatternCS;
  16806. })();
  16807. var IndexedCS = (function IndexedCSClosure() {
  16808. function IndexedCS(base, highVal, lookup) {
  16809. this.name = 'Indexed';
  16810. this.numComps = 1;
  16811. this.defaultColor = new Uint8Array([0]);
  16812. this.base = base;
  16813. this.highVal = highVal;
  16814. var baseNumComps = base.numComps;
  16815. var length = baseNumComps * highVal;
  16816. var lookupArray;
  16817. if (isStream(lookup)) {
  16818. lookupArray = new Uint8Array(length);
  16819. var bytes = lookup.getBytes(length);
  16820. lookupArray.set(bytes);
  16821. } else if (isString(lookup)) {
  16822. lookupArray = new Uint8Array(length);
  16823. for (var i = 0; i < length; ++i) {
  16824. lookupArray[i] = lookup.charCodeAt(i);
  16825. }
  16826. } else if (lookup instanceof Uint8Array || lookup instanceof Array) {
  16827. lookupArray = lookup;
  16828. } else {
  16829. error('Unrecognized lookup table: ' + lookup);
  16830. }
  16831. this.lookup = lookupArray;
  16832. }
  16833. IndexedCS.prototype = {
  16834. getRgb: ColorSpace.prototype.getRgb,
  16835. getRgbItem: function IndexedCS_getRgbItem(src, srcOffset,
  16836. dest, destOffset) {
  16837. var numComps = this.base.numComps;
  16838. var start = src[srcOffset] * numComps;
  16839. this.base.getRgbItem(this.lookup, start, dest, destOffset);
  16840. },
  16841. getRgbBuffer: function IndexedCS_getRgbBuffer(src, srcOffset, count,
  16842. dest, destOffset, bits,
  16843. alpha01) {
  16844. var base = this.base;
  16845. var numComps = base.numComps;
  16846. var outputDelta = base.getOutputLength(numComps, alpha01);
  16847. var lookup = this.lookup;
  16848. for (var i = 0; i < count; ++i) {
  16849. var lookupPos = src[srcOffset++] * numComps;
  16850. base.getRgbBuffer(lookup, lookupPos, 1, dest, destOffset, 8, alpha01);
  16851. destOffset += outputDelta;
  16852. }
  16853. },
  16854. getOutputLength: function IndexedCS_getOutputLength(inputLength, alpha01) {
  16855. return this.base.getOutputLength(inputLength * this.base.numComps,
  16856. alpha01);
  16857. },
  16858. isPassthrough: ColorSpace.prototype.isPassthrough,
  16859. fillRgb: ColorSpace.prototype.fillRgb,
  16860. isDefaultDecode: function IndexedCS_isDefaultDecode(decodeMap) {
  16861. // indexed color maps shouldn't be changed
  16862. return true;
  16863. },
  16864. usesZeroToOneRange: true
  16865. };
  16866. return IndexedCS;
  16867. })();
  16868. var DeviceGrayCS = (function DeviceGrayCSClosure() {
  16869. function DeviceGrayCS() {
  16870. this.name = 'DeviceGray';
  16871. this.numComps = 1;
  16872. this.defaultColor = new Float32Array([0]);
  16873. }
  16874. DeviceGrayCS.prototype = {
  16875. getRgb: ColorSpace.prototype.getRgb,
  16876. getRgbItem: function DeviceGrayCS_getRgbItem(src, srcOffset,
  16877. dest, destOffset) {
  16878. var c = (src[srcOffset] * 255) | 0;
  16879. c = c < 0 ? 0 : c > 255 ? 255 : c;
  16880. dest[destOffset] = dest[destOffset + 1] = dest[destOffset + 2] = c;
  16881. },
  16882. getRgbBuffer: function DeviceGrayCS_getRgbBuffer(src, srcOffset, count,
  16883. dest, destOffset, bits,
  16884. alpha01) {
  16885. var scale = 255 / ((1 << bits) - 1);
  16886. var j = srcOffset, q = destOffset;
  16887. for (var i = 0; i < count; ++i) {
  16888. var c = (scale * src[j++]) | 0;
  16889. dest[q++] = c;
  16890. dest[q++] = c;
  16891. dest[q++] = c;
  16892. q += alpha01;
  16893. }
  16894. },
  16895. getOutputLength: function DeviceGrayCS_getOutputLength(inputLength,
  16896. alpha01) {
  16897. return inputLength * (3 + alpha01);
  16898. },
  16899. isPassthrough: ColorSpace.prototype.isPassthrough,
  16900. fillRgb: ColorSpace.prototype.fillRgb,
  16901. isDefaultDecode: function DeviceGrayCS_isDefaultDecode(decodeMap) {
  16902. return ColorSpace.isDefaultDecode(decodeMap, this.numComps);
  16903. },
  16904. usesZeroToOneRange: true
  16905. };
  16906. return DeviceGrayCS;
  16907. })();
  16908. var DeviceRgbCS = (function DeviceRgbCSClosure() {
  16909. function DeviceRgbCS() {
  16910. this.name = 'DeviceRGB';
  16911. this.numComps = 3;
  16912. this.defaultColor = new Float32Array([0, 0, 0]);
  16913. }
  16914. DeviceRgbCS.prototype = {
  16915. getRgb: ColorSpace.prototype.getRgb,
  16916. getRgbItem: function DeviceRgbCS_getRgbItem(src, srcOffset,
  16917. dest, destOffset) {
  16918. var r = (src[srcOffset] * 255) | 0;
  16919. var g = (src[srcOffset + 1] * 255) | 0;
  16920. var b = (src[srcOffset + 2] * 255) | 0;
  16921. dest[destOffset] = r < 0 ? 0 : r > 255 ? 255 : r;
  16922. dest[destOffset + 1] = g < 0 ? 0 : g > 255 ? 255 : g;
  16923. dest[destOffset + 2] = b < 0 ? 0 : b > 255 ? 255 : b;
  16924. },
  16925. getRgbBuffer: function DeviceRgbCS_getRgbBuffer(src, srcOffset, count,
  16926. dest, destOffset, bits,
  16927. alpha01) {
  16928. if (bits === 8 && alpha01 === 0) {
  16929. dest.set(src.subarray(srcOffset, srcOffset + count * 3), destOffset);
  16930. return;
  16931. }
  16932. var scale = 255 / ((1 << bits) - 1);
  16933. var j = srcOffset, q = destOffset;
  16934. for (var i = 0; i < count; ++i) {
  16935. dest[q++] = (scale * src[j++]) | 0;
  16936. dest[q++] = (scale * src[j++]) | 0;
  16937. dest[q++] = (scale * src[j++]) | 0;
  16938. q += alpha01;
  16939. }
  16940. },
  16941. getOutputLength: function DeviceRgbCS_getOutputLength(inputLength,
  16942. alpha01) {
  16943. return (inputLength * (3 + alpha01) / 3) | 0;
  16944. },
  16945. isPassthrough: function DeviceRgbCS_isPassthrough(bits) {
  16946. return bits == 8;
  16947. },
  16948. fillRgb: ColorSpace.prototype.fillRgb,
  16949. isDefaultDecode: function DeviceRgbCS_isDefaultDecode(decodeMap) {
  16950. return ColorSpace.isDefaultDecode(decodeMap, this.numComps);
  16951. },
  16952. usesZeroToOneRange: true
  16953. };
  16954. return DeviceRgbCS;
  16955. })();
  16956. var DeviceCmykCS = (function DeviceCmykCSClosure() {
  16957. // The coefficients below was found using numerical analysis: the method of
  16958. // steepest descent for the sum((f_i - color_value_i)^2) for r/g/b colors,
  16959. // where color_value is the tabular value from the table of sampled RGB colors
  16960. // from CMYK US Web Coated (SWOP) colorspace, and f_i is the corresponding
  16961. // CMYK color conversion using the estimation below:
  16962. // f(A, B,.. N) = Acc+Bcm+Ccy+Dck+c+Fmm+Gmy+Hmk+Im+Jyy+Kyk+Ly+Mkk+Nk+255
  16963. function convertToRgb(src, srcOffset, srcScale, dest, destOffset) {
  16964. var c = src[srcOffset + 0] * srcScale;
  16965. var m = src[srcOffset + 1] * srcScale;
  16966. var y = src[srcOffset + 2] * srcScale;
  16967. var k = src[srcOffset + 3] * srcScale;
  16968. var r =
  16969. (c * (-4.387332384609988 * c + 54.48615194189176 * m +
  16970. 18.82290502165302 * y + 212.25662451639585 * k +
  16971. -285.2331026137004) +
  16972. m * (1.7149763477362134 * m - 5.6096736904047315 * y +
  16973. -17.873870861415444 * k - 5.497006427196366) +
  16974. y * (-2.5217340131683033 * y - 21.248923337353073 * k +
  16975. 17.5119270841813) +
  16976. k * (-21.86122147463605 * k - 189.48180835922747) + 255) | 0;
  16977. var g =
  16978. (c * (8.841041422036149 * c + 60.118027045597366 * m +
  16979. 6.871425592049007 * y + 31.159100130055922 * k +
  16980. -79.2970844816548) +
  16981. m * (-15.310361306967817 * m + 17.575251261109482 * y +
  16982. 131.35250912493976 * k - 190.9453302588951) +
  16983. y * (4.444339102852739 * y + 9.8632861493405 * k - 24.86741582555878) +
  16984. k * (-20.737325471181034 * k - 187.80453709719578) + 255) | 0;
  16985. var b =
  16986. (c * (0.8842522430003296 * c + 8.078677503112928 * m +
  16987. 30.89978309703729 * y - 0.23883238689178934 * k +
  16988. -14.183576799673286) +
  16989. m * (10.49593273432072 * m + 63.02378494754052 * y +
  16990. 50.606957656360734 * k - 112.23884253719248) +
  16991. y * (0.03296041114873217 * y + 115.60384449646641 * k +
  16992. -193.58209356861505) +
  16993. k * (-22.33816807309886 * k - 180.12613974708367) + 255) | 0;
  16994. dest[destOffset] = r > 255 ? 255 : r < 0 ? 0 : r;
  16995. dest[destOffset + 1] = g > 255 ? 255 : g < 0 ? 0 : g;
  16996. dest[destOffset + 2] = b > 255 ? 255 : b < 0 ? 0 : b;
  16997. }
  16998. function DeviceCmykCS() {
  16999. this.name = 'DeviceCMYK';
  17000. this.numComps = 4;
  17001. this.defaultColor = new Float32Array([0, 0, 0, 1]);
  17002. }
  17003. DeviceCmykCS.prototype = {
  17004. getRgb: ColorSpace.prototype.getRgb,
  17005. getRgbItem: function DeviceCmykCS_getRgbItem(src, srcOffset,
  17006. dest, destOffset) {
  17007. convertToRgb(src, srcOffset, 1, dest, destOffset);
  17008. },
  17009. getRgbBuffer: function DeviceCmykCS_getRgbBuffer(src, srcOffset, count,
  17010. dest, destOffset, bits,
  17011. alpha01) {
  17012. var scale = 1 / ((1 << bits) - 1);
  17013. for (var i = 0; i < count; i++) {
  17014. convertToRgb(src, srcOffset, scale, dest, destOffset);
  17015. srcOffset += 4;
  17016. destOffset += 3 + alpha01;
  17017. }
  17018. },
  17019. getOutputLength: function DeviceCmykCS_getOutputLength(inputLength,
  17020. alpha01) {
  17021. return (inputLength / 4 * (3 + alpha01)) | 0;
  17022. },
  17023. isPassthrough: ColorSpace.prototype.isPassthrough,
  17024. fillRgb: ColorSpace.prototype.fillRgb,
  17025. isDefaultDecode: function DeviceCmykCS_isDefaultDecode(decodeMap) {
  17026. return ColorSpace.isDefaultDecode(decodeMap, this.numComps);
  17027. },
  17028. usesZeroToOneRange: true
  17029. };
  17030. return DeviceCmykCS;
  17031. })();
  17032. //
  17033. // CalGrayCS: Based on "PDF Reference, Sixth Ed", p.245
  17034. //
  17035. var CalGrayCS = (function CalGrayCSClosure() {
  17036. function CalGrayCS(whitePoint, blackPoint, gamma) {
  17037. this.name = 'CalGray';
  17038. this.numComps = 1;
  17039. this.defaultColor = new Float32Array([0]);
  17040. if (!whitePoint) {
  17041. error('WhitePoint missing - required for color space CalGray');
  17042. }
  17043. blackPoint = blackPoint || [0, 0, 0];
  17044. gamma = gamma || 1;
  17045. // Translate arguments to spec variables.
  17046. this.XW = whitePoint[0];
  17047. this.YW = whitePoint[1];
  17048. this.ZW = whitePoint[2];
  17049. this.XB = blackPoint[0];
  17050. this.YB = blackPoint[1];
  17051. this.ZB = blackPoint[2];
  17052. this.G = gamma;
  17053. // Validate variables as per spec.
  17054. if (this.XW < 0 || this.ZW < 0 || this.YW !== 1) {
  17055. error('Invalid WhitePoint components for ' + this.name +
  17056. ', no fallback available');
  17057. }
  17058. if (this.XB < 0 || this.YB < 0 || this.ZB < 0) {
  17059. info('Invalid BlackPoint for ' + this.name + ', falling back to default');
  17060. this.XB = this.YB = this.ZB = 0;
  17061. }
  17062. if (this.XB !== 0 || this.YB !== 0 || this.ZB !== 0) {
  17063. warn(this.name + ', BlackPoint: XB: ' + this.XB + ', YB: ' + this.YB +
  17064. ', ZB: ' + this.ZB + ', only default values are supported.');
  17065. }
  17066. if (this.G < 1) {
  17067. info('Invalid Gamma: ' + this.G + ' for ' + this.name +
  17068. ', falling back to default');
  17069. this.G = 1;
  17070. }
  17071. }
  17072. function convertToRgb(cs, src, srcOffset, dest, destOffset, scale) {
  17073. // A represents a gray component of a calibrated gray space.
  17074. // A <---> AG in the spec
  17075. var A = src[srcOffset] * scale;
  17076. var AG = Math.pow(A, cs.G);
  17077. // Computes L as per spec. ( = cs.YW * AG )
  17078. // Except if other than default BlackPoint values are used.
  17079. var L = cs.YW * AG;
  17080. // http://www.poynton.com/notes/colour_and_gamma/ColorFAQ.html, Ch 4.
  17081. // Convert values to rgb range [0, 255].
  17082. var val = Math.max(295.8 * Math.pow(L, 0.333333333333333333) - 40.8, 0) | 0;
  17083. dest[destOffset] = val;
  17084. dest[destOffset + 1] = val;
  17085. dest[destOffset + 2] = val;
  17086. }
  17087. CalGrayCS.prototype = {
  17088. getRgb: ColorSpace.prototype.getRgb,
  17089. getRgbItem: function CalGrayCS_getRgbItem(src, srcOffset,
  17090. dest, destOffset) {
  17091. convertToRgb(this, src, srcOffset, dest, destOffset, 1);
  17092. },
  17093. getRgbBuffer: function CalGrayCS_getRgbBuffer(src, srcOffset, count,
  17094. dest, destOffset, bits,
  17095. alpha01) {
  17096. var scale = 1 / ((1 << bits) - 1);
  17097. for (var i = 0; i < count; ++i) {
  17098. convertToRgb(this, src, srcOffset, dest, destOffset, scale);
  17099. srcOffset += 1;
  17100. destOffset += 3 + alpha01;
  17101. }
  17102. },
  17103. getOutputLength: function CalGrayCS_getOutputLength(inputLength, alpha01) {
  17104. return inputLength * (3 + alpha01);
  17105. },
  17106. isPassthrough: ColorSpace.prototype.isPassthrough,
  17107. fillRgb: ColorSpace.prototype.fillRgb,
  17108. isDefaultDecode: function CalGrayCS_isDefaultDecode(decodeMap) {
  17109. return ColorSpace.isDefaultDecode(decodeMap, this.numComps);
  17110. },
  17111. usesZeroToOneRange: true
  17112. };
  17113. return CalGrayCS;
  17114. })();
  17115. //
  17116. // LabCS: Based on "PDF Reference, Sixth Ed", p.250
  17117. //
  17118. var LabCS = (function LabCSClosure() {
  17119. function LabCS(whitePoint, blackPoint, range) {
  17120. this.name = 'Lab';
  17121. this.numComps = 3;
  17122. this.defaultColor = new Float32Array([0, 0, 0]);
  17123. if (!whitePoint) {
  17124. error('WhitePoint missing - required for color space Lab');
  17125. }
  17126. blackPoint = blackPoint || [0, 0, 0];
  17127. range = range || [-100, 100, -100, 100];
  17128. // Translate args to spec variables
  17129. this.XW = whitePoint[0];
  17130. this.YW = whitePoint[1];
  17131. this.ZW = whitePoint[2];
  17132. this.amin = range[0];
  17133. this.amax = range[1];
  17134. this.bmin = range[2];
  17135. this.bmax = range[3];
  17136. // These are here just for completeness - the spec doesn't offer any
  17137. // formulas that use BlackPoint in Lab
  17138. this.XB = blackPoint[0];
  17139. this.YB = blackPoint[1];
  17140. this.ZB = blackPoint[2];
  17141. // Validate vars as per spec
  17142. if (this.XW < 0 || this.ZW < 0 || this.YW !== 1) {
  17143. error('Invalid WhitePoint components, no fallback available');
  17144. }
  17145. if (this.XB < 0 || this.YB < 0 || this.ZB < 0) {
  17146. info('Invalid BlackPoint, falling back to default');
  17147. this.XB = this.YB = this.ZB = 0;
  17148. }
  17149. if (this.amin > this.amax || this.bmin > this.bmax) {
  17150. info('Invalid Range, falling back to defaults');
  17151. this.amin = -100;
  17152. this.amax = 100;
  17153. this.bmin = -100;
  17154. this.bmax = 100;
  17155. }
  17156. }
  17157. // Function g(x) from spec
  17158. function fn_g(x) {
  17159. if (x >= 6 / 29) {
  17160. return x * x * x;
  17161. } else {
  17162. return (108 / 841) * (x - 4 / 29);
  17163. }
  17164. }
  17165. function decode(value, high1, low2, high2) {
  17166. return low2 + (value) * (high2 - low2) / (high1);
  17167. }
  17168. // If decoding is needed maxVal should be 2^bits per component - 1.
  17169. function convertToRgb(cs, src, srcOffset, maxVal, dest, destOffset) {
  17170. // XXX: Lab input is in the range of [0, 100], [amin, amax], [bmin, bmax]
  17171. // not the usual [0, 1]. If a command like setFillColor is used the src
  17172. // values will already be within the correct range. However, if we are
  17173. // converting an image we have to map the values to the correct range given
  17174. // above.
  17175. // Ls,as,bs <---> L*,a*,b* in the spec
  17176. var Ls = src[srcOffset];
  17177. var as = src[srcOffset + 1];
  17178. var bs = src[srcOffset + 2];
  17179. if (maxVal !== false) {
  17180. Ls = decode(Ls, maxVal, 0, 100);
  17181. as = decode(as, maxVal, cs.amin, cs.amax);
  17182. bs = decode(bs, maxVal, cs.bmin, cs.bmax);
  17183. }
  17184. // Adjust limits of 'as' and 'bs'
  17185. as = as > cs.amax ? cs.amax : as < cs.amin ? cs.amin : as;
  17186. bs = bs > cs.bmax ? cs.bmax : bs < cs.bmin ? cs.bmin : bs;
  17187. // Computes intermediate variables X,Y,Z as per spec
  17188. var M = (Ls + 16) / 116;
  17189. var L = M + (as / 500);
  17190. var N = M - (bs / 200);
  17191. var X = cs.XW * fn_g(L);
  17192. var Y = cs.YW * fn_g(M);
  17193. var Z = cs.ZW * fn_g(N);
  17194. var r, g, b;
  17195. // Using different conversions for D50 and D65 white points,
  17196. // per http://www.color.org/srgb.pdf
  17197. if (cs.ZW < 1) {
  17198. // Assuming D50 (X=0.9642, Y=1.00, Z=0.8249)
  17199. r = X * 3.1339 + Y * -1.6170 + Z * -0.4906;
  17200. g = X * -0.9785 + Y * 1.9160 + Z * 0.0333;
  17201. b = X * 0.0720 + Y * -0.2290 + Z * 1.4057;
  17202. } else {
  17203. // Assuming D65 (X=0.9505, Y=1.00, Z=1.0888)
  17204. r = X * 3.2406 + Y * -1.5372 + Z * -0.4986;
  17205. g = X * -0.9689 + Y * 1.8758 + Z * 0.0415;
  17206. b = X * 0.0557 + Y * -0.2040 + Z * 1.0570;
  17207. }
  17208. // clamp color values to [0,1] range then convert to [0,255] range.
  17209. dest[destOffset] = r <= 0 ? 0 : r >= 1 ? 255 : Math.sqrt(r) * 255 | 0;
  17210. dest[destOffset + 1] = g <= 0 ? 0 : g >= 1 ? 255 : Math.sqrt(g) * 255 | 0;
  17211. dest[destOffset + 2] = b <= 0 ? 0 : b >= 1 ? 255 : Math.sqrt(b) * 255 | 0;
  17212. }
  17213. LabCS.prototype = {
  17214. getRgb: ColorSpace.prototype.getRgb,
  17215. getRgbItem: function LabCS_getRgbItem(src, srcOffset, dest, destOffset) {
  17216. convertToRgb(this, src, srcOffset, false, dest, destOffset);
  17217. },
  17218. getRgbBuffer: function LabCS_getRgbBuffer(src, srcOffset, count,
  17219. dest, destOffset, bits,
  17220. alpha01) {
  17221. var maxVal = (1 << bits) - 1;
  17222. for (var i = 0; i < count; i++) {
  17223. convertToRgb(this, src, srcOffset, maxVal, dest, destOffset);
  17224. srcOffset += 3;
  17225. destOffset += 3 + alpha01;
  17226. }
  17227. },
  17228. getOutputLength: function LabCS_getOutputLength(inputLength, alpha01) {
  17229. return (inputLength * (3 + alpha01) / 3) | 0;
  17230. },
  17231. isPassthrough: ColorSpace.prototype.isPassthrough,
  17232. isDefaultDecode: function LabCS_isDefaultDecode(decodeMap) {
  17233. // XXX: Decoding is handled with the lab conversion because of the strange
  17234. // ranges that are used.
  17235. return true;
  17236. },
  17237. usesZeroToOneRange: false
  17238. };
  17239. return LabCS;
  17240. })();
  17241. var ARCFourCipher = (function ARCFourCipherClosure() {
  17242. function ARCFourCipher(key) {
  17243. this.a = 0;
  17244. this.b = 0;
  17245. var s = new Uint8Array(256);
  17246. var i, j = 0, tmp, keyLength = key.length;
  17247. for (i = 0; i < 256; ++i) {
  17248. s[i] = i;
  17249. }
  17250. for (i = 0; i < 256; ++i) {
  17251. tmp = s[i];
  17252. j = (j + tmp + key[i % keyLength]) & 0xFF;
  17253. s[i] = s[j];
  17254. s[j] = tmp;
  17255. }
  17256. this.s = s;
  17257. }
  17258. ARCFourCipher.prototype = {
  17259. encryptBlock: function ARCFourCipher_encryptBlock(data) {
  17260. var i, n = data.length, tmp, tmp2;
  17261. var a = this.a, b = this.b, s = this.s;
  17262. var output = new Uint8Array(n);
  17263. for (i = 0; i < n; ++i) {
  17264. a = (a + 1) & 0xFF;
  17265. tmp = s[a];
  17266. b = (b + tmp) & 0xFF;
  17267. tmp2 = s[b];
  17268. s[a] = tmp2;
  17269. s[b] = tmp;
  17270. output[i] = data[i] ^ s[(tmp + tmp2) & 0xFF];
  17271. }
  17272. this.a = a;
  17273. this.b = b;
  17274. return output;
  17275. }
  17276. };
  17277. ARCFourCipher.prototype.decryptBlock = ARCFourCipher.prototype.encryptBlock;
  17278. return ARCFourCipher;
  17279. })();
  17280. var calculateMD5 = (function calculateMD5Closure() {
  17281. var r = new Uint8Array([
  17282. 7, 12, 17, 22, 7, 12, 17, 22, 7, 12, 17, 22, 7, 12, 17, 22,
  17283. 5, 9, 14, 20, 5, 9, 14, 20, 5, 9, 14, 20, 5, 9, 14, 20,
  17284. 4, 11, 16, 23, 4, 11, 16, 23, 4, 11, 16, 23, 4, 11, 16, 23,
  17285. 6, 10, 15, 21, 6, 10, 15, 21, 6, 10, 15, 21, 6, 10, 15, 21]);
  17286. var k = new Int32Array([
  17287. -680876936, -389564586, 606105819, -1044525330, -176418897, 1200080426,
  17288. -1473231341, -45705983, 1770035416, -1958414417, -42063, -1990404162,
  17289. 1804603682, -40341101, -1502002290, 1236535329, -165796510, -1069501632,
  17290. 643717713, -373897302, -701558691, 38016083, -660478335, -405537848,
  17291. 568446438, -1019803690, -187363961, 1163531501, -1444681467, -51403784,
  17292. 1735328473, -1926607734, -378558, -2022574463, 1839030562, -35309556,
  17293. -1530992060, 1272893353, -155497632, -1094730640, 681279174, -358537222,
  17294. -722521979, 76029189, -640364487, -421815835, 530742520, -995338651,
  17295. -198630844, 1126891415, -1416354905, -57434055, 1700485571, -1894986606,
  17296. -1051523, -2054922799, 1873313359, -30611744, -1560198380, 1309151649,
  17297. -145523070, -1120210379, 718787259, -343485551]);
  17298. function hash(data, offset, length) {
  17299. var h0 = 1732584193, h1 = -271733879, h2 = -1732584194, h3 = 271733878;
  17300. // pre-processing
  17301. var paddedLength = (length + 72) & ~63; // data + 9 extra bytes
  17302. var padded = new Uint8Array(paddedLength);
  17303. var i, j, n;
  17304. for (i = 0; i < length; ++i) {
  17305. padded[i] = data[offset++];
  17306. }
  17307. padded[i++] = 0x80;
  17308. n = paddedLength - 8;
  17309. while (i < n) {
  17310. padded[i++] = 0;
  17311. }
  17312. padded[i++] = (length << 3) & 0xFF;
  17313. padded[i++] = (length >> 5) & 0xFF;
  17314. padded[i++] = (length >> 13) & 0xFF;
  17315. padded[i++] = (length >> 21) & 0xFF;
  17316. padded[i++] = (length >>> 29) & 0xFF;
  17317. padded[i++] = 0;
  17318. padded[i++] = 0;
  17319. padded[i++] = 0;
  17320. // chunking
  17321. // TODO ArrayBuffer ?
  17322. var w = new Int32Array(16);
  17323. for (i = 0; i < paddedLength;) {
  17324. for (j = 0; j < 16; ++j, i += 4) {
  17325. w[j] = (padded[i] | (padded[i + 1] << 8) |
  17326. (padded[i + 2] << 16) | (padded[i + 3] << 24));
  17327. }
  17328. var a = h0, b = h1, c = h2, d = h3, f, g;
  17329. for (j = 0; j < 64; ++j) {
  17330. if (j < 16) {
  17331. f = (b & c) | ((~b) & d);
  17332. g = j;
  17333. } else if (j < 32) {
  17334. f = (d & b) | ((~d) & c);
  17335. g = (5 * j + 1) & 15;
  17336. } else if (j < 48) {
  17337. f = b ^ c ^ d;
  17338. g = (3 * j + 5) & 15;
  17339. } else {
  17340. f = c ^ (b | (~d));
  17341. g = (7 * j) & 15;
  17342. }
  17343. var tmp = d, rotateArg = (a + f + k[j] + w[g]) | 0, rotate = r[j];
  17344. d = c;
  17345. c = b;
  17346. b = (b + ((rotateArg << rotate) | (rotateArg >>> (32 - rotate)))) | 0;
  17347. a = tmp;
  17348. }
  17349. h0 = (h0 + a) | 0;
  17350. h1 = (h1 + b) | 0;
  17351. h2 = (h2 + c) | 0;
  17352. h3 = (h3 + d) | 0;
  17353. }
  17354. return new Uint8Array([
  17355. h0 & 0xFF, (h0 >> 8) & 0xFF, (h0 >> 16) & 0xFF, (h0 >>> 24) & 0xFF,
  17356. h1 & 0xFF, (h1 >> 8) & 0xFF, (h1 >> 16) & 0xFF, (h1 >>> 24) & 0xFF,
  17357. h2 & 0xFF, (h2 >> 8) & 0xFF, (h2 >> 16) & 0xFF, (h2 >>> 24) & 0xFF,
  17358. h3 & 0xFF, (h3 >> 8) & 0xFF, (h3 >> 16) & 0xFF, (h3 >>> 24) & 0xFF
  17359. ]);
  17360. }
  17361. return hash;
  17362. })();
  17363. var NullCipher = (function NullCipherClosure() {
  17364. function NullCipher() {}
  17365. NullCipher.prototype = {
  17366. decryptBlock: function NullCipher_decryptBlock(data) {
  17367. return data;
  17368. }
  17369. };
  17370. return NullCipher;
  17371. })();
  17372. var AES128Cipher = (function AES128CipherClosure() {
  17373. var rcon = new Uint8Array([
  17374. 0x8d, 0x01, 0x02, 0x04, 0x08, 0x10, 0x20, 0x40, 0x80, 0x1b, 0x36, 0x6c,
  17375. 0xd8, 0xab, 0x4d, 0x9a, 0x2f, 0x5e, 0xbc, 0x63, 0xc6, 0x97, 0x35, 0x6a,
  17376. 0xd4, 0xb3, 0x7d, 0xfa, 0xef, 0xc5, 0x91, 0x39, 0x72, 0xe4, 0xd3, 0xbd,
  17377. 0x61, 0xc2, 0x9f, 0x25, 0x4a, 0x94, 0x33, 0x66, 0xcc, 0x83, 0x1d, 0x3a,
  17378. 0x74, 0xe8, 0xcb, 0x8d, 0x01, 0x02, 0x04, 0x08, 0x10, 0x20, 0x40, 0x80,
  17379. 0x1b, 0x36, 0x6c, 0xd8, 0xab, 0x4d, 0x9a, 0x2f, 0x5e, 0xbc, 0x63, 0xc6,
  17380. 0x97, 0x35, 0x6a, 0xd4, 0xb3, 0x7d, 0xfa, 0xef, 0xc5, 0x91, 0x39, 0x72,
  17381. 0xe4, 0xd3, 0xbd, 0x61, 0xc2, 0x9f, 0x25, 0x4a, 0x94, 0x33, 0x66, 0xcc,
  17382. 0x83, 0x1d, 0x3a, 0x74, 0xe8, 0xcb, 0x8d, 0x01, 0x02, 0x04, 0x08, 0x10,
  17383. 0x20, 0x40, 0x80, 0x1b, 0x36, 0x6c, 0xd8, 0xab, 0x4d, 0x9a, 0x2f, 0x5e,
  17384. 0xbc, 0x63, 0xc6, 0x97, 0x35, 0x6a, 0xd4, 0xb3, 0x7d, 0xfa, 0xef, 0xc5,
  17385. 0x91, 0x39, 0x72, 0xe4, 0xd3, 0xbd, 0x61, 0xc2, 0x9f, 0x25, 0x4a, 0x94,
  17386. 0x33, 0x66, 0xcc, 0x83, 0x1d, 0x3a, 0x74, 0xe8, 0xcb, 0x8d, 0x01, 0x02,
  17387. 0x04, 0x08, 0x10, 0x20, 0x40, 0x80, 0x1b, 0x36, 0x6c, 0xd8, 0xab, 0x4d,
  17388. 0x9a, 0x2f, 0x5e, 0xbc, 0x63, 0xc6, 0x97, 0x35, 0x6a, 0xd4, 0xb3, 0x7d,
  17389. 0xfa, 0xef, 0xc5, 0x91, 0x39, 0x72, 0xe4, 0xd3, 0xbd, 0x61, 0xc2, 0x9f,
  17390. 0x25, 0x4a, 0x94, 0x33, 0x66, 0xcc, 0x83, 0x1d, 0x3a, 0x74, 0xe8, 0xcb,
  17391. 0x8d, 0x01, 0x02, 0x04, 0x08, 0x10, 0x20, 0x40, 0x80, 0x1b, 0x36, 0x6c,
  17392. 0xd8, 0xab, 0x4d, 0x9a, 0x2f, 0x5e, 0xbc, 0x63, 0xc6, 0x97, 0x35, 0x6a,
  17393. 0xd4, 0xb3, 0x7d, 0xfa, 0xef, 0xc5, 0x91, 0x39, 0x72, 0xe4, 0xd3, 0xbd,
  17394. 0x61, 0xc2, 0x9f, 0x25, 0x4a, 0x94, 0x33, 0x66, 0xcc, 0x83, 0x1d, 0x3a,
  17395. 0x74, 0xe8, 0xcb, 0x8d]);
  17396. var s = new Uint8Array([
  17397. 0x63, 0x7c, 0x77, 0x7b, 0xf2, 0x6b, 0x6f, 0xc5, 0x30, 0x01, 0x67, 0x2b,
  17398. 0xfe, 0xd7, 0xab, 0x76, 0xca, 0x82, 0xc9, 0x7d, 0xfa, 0x59, 0x47, 0xf0,
  17399. 0xad, 0xd4, 0xa2, 0xaf, 0x9c, 0xa4, 0x72, 0xc0, 0xb7, 0xfd, 0x93, 0x26,
  17400. 0x36, 0x3f, 0xf7, 0xcc, 0x34, 0xa5, 0xe5, 0xf1, 0x71, 0xd8, 0x31, 0x15,
  17401. 0x04, 0xc7, 0x23, 0xc3, 0x18, 0x96, 0x05, 0x9a, 0x07, 0x12, 0x80, 0xe2,
  17402. 0xeb, 0x27, 0xb2, 0x75, 0x09, 0x83, 0x2c, 0x1a, 0x1b, 0x6e, 0x5a, 0xa0,
  17403. 0x52, 0x3b, 0xd6, 0xb3, 0x29, 0xe3, 0x2f, 0x84, 0x53, 0xd1, 0x00, 0xed,
  17404. 0x20, 0xfc, 0xb1, 0x5b, 0x6a, 0xcb, 0xbe, 0x39, 0x4a, 0x4c, 0x58, 0xcf,
  17405. 0xd0, 0xef, 0xaa, 0xfb, 0x43, 0x4d, 0x33, 0x85, 0x45, 0xf9, 0x02, 0x7f,
  17406. 0x50, 0x3c, 0x9f, 0xa8, 0x51, 0xa3, 0x40, 0x8f, 0x92, 0x9d, 0x38, 0xf5,
  17407. 0xbc, 0xb6, 0xda, 0x21, 0x10, 0xff, 0xf3, 0xd2, 0xcd, 0x0c, 0x13, 0xec,
  17408. 0x5f, 0x97, 0x44, 0x17, 0xc4, 0xa7, 0x7e, 0x3d, 0x64, 0x5d, 0x19, 0x73,
  17409. 0x60, 0x81, 0x4f, 0xdc, 0x22, 0x2a, 0x90, 0x88, 0x46, 0xee, 0xb8, 0x14,
  17410. 0xde, 0x5e, 0x0b, 0xdb, 0xe0, 0x32, 0x3a, 0x0a, 0x49, 0x06, 0x24, 0x5c,
  17411. 0xc2, 0xd3, 0xac, 0x62, 0x91, 0x95, 0xe4, 0x79, 0xe7, 0xc8, 0x37, 0x6d,
  17412. 0x8d, 0xd5, 0x4e, 0xa9, 0x6c, 0x56, 0xf4, 0xea, 0x65, 0x7a, 0xae, 0x08,
  17413. 0xba, 0x78, 0x25, 0x2e, 0x1c, 0xa6, 0xb4, 0xc6, 0xe8, 0xdd, 0x74, 0x1f,
  17414. 0x4b, 0xbd, 0x8b, 0x8a, 0x70, 0x3e, 0xb5, 0x66, 0x48, 0x03, 0xf6, 0x0e,
  17415. 0x61, 0x35, 0x57, 0xb9, 0x86, 0xc1, 0x1d, 0x9e, 0xe1, 0xf8, 0x98, 0x11,
  17416. 0x69, 0xd9, 0x8e, 0x94, 0x9b, 0x1e, 0x87, 0xe9, 0xce, 0x55, 0x28, 0xdf,
  17417. 0x8c, 0xa1, 0x89, 0x0d, 0xbf, 0xe6, 0x42, 0x68, 0x41, 0x99, 0x2d, 0x0f,
  17418. 0xb0, 0x54, 0xbb, 0x16]);
  17419. var inv_s = new Uint8Array([
  17420. 0x52, 0x09, 0x6a, 0xd5, 0x30, 0x36, 0xa5, 0x38, 0xbf, 0x40, 0xa3, 0x9e,
  17421. 0x81, 0xf3, 0xd7, 0xfb, 0x7c, 0xe3, 0x39, 0x82, 0x9b, 0x2f, 0xff, 0x87,
  17422. 0x34, 0x8e, 0x43, 0x44, 0xc4, 0xde, 0xe9, 0xcb, 0x54, 0x7b, 0x94, 0x32,
  17423. 0xa6, 0xc2, 0x23, 0x3d, 0xee, 0x4c, 0x95, 0x0b, 0x42, 0xfa, 0xc3, 0x4e,
  17424. 0x08, 0x2e, 0xa1, 0x66, 0x28, 0xd9, 0x24, 0xb2, 0x76, 0x5b, 0xa2, 0x49,
  17425. 0x6d, 0x8b, 0xd1, 0x25, 0x72, 0xf8, 0xf6, 0x64, 0x86, 0x68, 0x98, 0x16,
  17426. 0xd4, 0xa4, 0x5c, 0xcc, 0x5d, 0x65, 0xb6, 0x92, 0x6c, 0x70, 0x48, 0x50,
  17427. 0xfd, 0xed, 0xb9, 0xda, 0x5e, 0x15, 0x46, 0x57, 0xa7, 0x8d, 0x9d, 0x84,
  17428. 0x90, 0xd8, 0xab, 0x00, 0x8c, 0xbc, 0xd3, 0x0a, 0xf7, 0xe4, 0x58, 0x05,
  17429. 0xb8, 0xb3, 0x45, 0x06, 0xd0, 0x2c, 0x1e, 0x8f, 0xca, 0x3f, 0x0f, 0x02,
  17430. 0xc1, 0xaf, 0xbd, 0x03, 0x01, 0x13, 0x8a, 0x6b, 0x3a, 0x91, 0x11, 0x41,
  17431. 0x4f, 0x67, 0xdc, 0xea, 0x97, 0xf2, 0xcf, 0xce, 0xf0, 0xb4, 0xe6, 0x73,
  17432. 0x96, 0xac, 0x74, 0x22, 0xe7, 0xad, 0x35, 0x85, 0xe2, 0xf9, 0x37, 0xe8,
  17433. 0x1c, 0x75, 0xdf, 0x6e, 0x47, 0xf1, 0x1a, 0x71, 0x1d, 0x29, 0xc5, 0x89,
  17434. 0x6f, 0xb7, 0x62, 0x0e, 0xaa, 0x18, 0xbe, 0x1b, 0xfc, 0x56, 0x3e, 0x4b,
  17435. 0xc6, 0xd2, 0x79, 0x20, 0x9a, 0xdb, 0xc0, 0xfe, 0x78, 0xcd, 0x5a, 0xf4,
  17436. 0x1f, 0xdd, 0xa8, 0x33, 0x88, 0x07, 0xc7, 0x31, 0xb1, 0x12, 0x10, 0x59,
  17437. 0x27, 0x80, 0xec, 0x5f, 0x60, 0x51, 0x7f, 0xa9, 0x19, 0xb5, 0x4a, 0x0d,
  17438. 0x2d, 0xe5, 0x7a, 0x9f, 0x93, 0xc9, 0x9c, 0xef, 0xa0, 0xe0, 0x3b, 0x4d,
  17439. 0xae, 0x2a, 0xf5, 0xb0, 0xc8, 0xeb, 0xbb, 0x3c, 0x83, 0x53, 0x99, 0x61,
  17440. 0x17, 0x2b, 0x04, 0x7e, 0xba, 0x77, 0xd6, 0x26, 0xe1, 0x69, 0x14, 0x63,
  17441. 0x55, 0x21, 0x0c, 0x7d]);
  17442. var mix = new Uint32Array([
  17443. 0x00000000, 0x0e090d0b, 0x1c121a16, 0x121b171d, 0x3824342c, 0x362d3927,
  17444. 0x24362e3a, 0x2a3f2331, 0x70486858, 0x7e416553, 0x6c5a724e, 0x62537f45,
  17445. 0x486c5c74, 0x4665517f, 0x547e4662, 0x5a774b69, 0xe090d0b0, 0xee99ddbb,
  17446. 0xfc82caa6, 0xf28bc7ad, 0xd8b4e49c, 0xd6bde997, 0xc4a6fe8a, 0xcaaff381,
  17447. 0x90d8b8e8, 0x9ed1b5e3, 0x8ccaa2fe, 0x82c3aff5, 0xa8fc8cc4, 0xa6f581cf,
  17448. 0xb4ee96d2, 0xbae79bd9, 0xdb3bbb7b, 0xd532b670, 0xc729a16d, 0xc920ac66,
  17449. 0xe31f8f57, 0xed16825c, 0xff0d9541, 0xf104984a, 0xab73d323, 0xa57ade28,
  17450. 0xb761c935, 0xb968c43e, 0x9357e70f, 0x9d5eea04, 0x8f45fd19, 0x814cf012,
  17451. 0x3bab6bcb, 0x35a266c0, 0x27b971dd, 0x29b07cd6, 0x038f5fe7, 0x0d8652ec,
  17452. 0x1f9d45f1, 0x119448fa, 0x4be30393, 0x45ea0e98, 0x57f11985, 0x59f8148e,
  17453. 0x73c737bf, 0x7dce3ab4, 0x6fd52da9, 0x61dc20a2, 0xad766df6, 0xa37f60fd,
  17454. 0xb16477e0, 0xbf6d7aeb, 0x955259da, 0x9b5b54d1, 0x894043cc, 0x87494ec7,
  17455. 0xdd3e05ae, 0xd33708a5, 0xc12c1fb8, 0xcf2512b3, 0xe51a3182, 0xeb133c89,
  17456. 0xf9082b94, 0xf701269f, 0x4de6bd46, 0x43efb04d, 0x51f4a750, 0x5ffdaa5b,
  17457. 0x75c2896a, 0x7bcb8461, 0x69d0937c, 0x67d99e77, 0x3daed51e, 0x33a7d815,
  17458. 0x21bccf08, 0x2fb5c203, 0x058ae132, 0x0b83ec39, 0x1998fb24, 0x1791f62f,
  17459. 0x764dd68d, 0x7844db86, 0x6a5fcc9b, 0x6456c190, 0x4e69e2a1, 0x4060efaa,
  17460. 0x527bf8b7, 0x5c72f5bc, 0x0605bed5, 0x080cb3de, 0x1a17a4c3, 0x141ea9c8,
  17461. 0x3e218af9, 0x302887f2, 0x223390ef, 0x2c3a9de4, 0x96dd063d, 0x98d40b36,
  17462. 0x8acf1c2b, 0x84c61120, 0xaef93211, 0xa0f03f1a, 0xb2eb2807, 0xbce2250c,
  17463. 0xe6956e65, 0xe89c636e, 0xfa877473, 0xf48e7978, 0xdeb15a49, 0xd0b85742,
  17464. 0xc2a3405f, 0xccaa4d54, 0x41ecdaf7, 0x4fe5d7fc, 0x5dfec0e1, 0x53f7cdea,
  17465. 0x79c8eedb, 0x77c1e3d0, 0x65daf4cd, 0x6bd3f9c6, 0x31a4b2af, 0x3fadbfa4,
  17466. 0x2db6a8b9, 0x23bfa5b2, 0x09808683, 0x07898b88, 0x15929c95, 0x1b9b919e,
  17467. 0xa17c0a47, 0xaf75074c, 0xbd6e1051, 0xb3671d5a, 0x99583e6b, 0x97513360,
  17468. 0x854a247d, 0x8b432976, 0xd134621f, 0xdf3d6f14, 0xcd267809, 0xc32f7502,
  17469. 0xe9105633, 0xe7195b38, 0xf5024c25, 0xfb0b412e, 0x9ad7618c, 0x94de6c87,
  17470. 0x86c57b9a, 0x88cc7691, 0xa2f355a0, 0xacfa58ab, 0xbee14fb6, 0xb0e842bd,
  17471. 0xea9f09d4, 0xe49604df, 0xf68d13c2, 0xf8841ec9, 0xd2bb3df8, 0xdcb230f3,
  17472. 0xcea927ee, 0xc0a02ae5, 0x7a47b13c, 0x744ebc37, 0x6655ab2a, 0x685ca621,
  17473. 0x42638510, 0x4c6a881b, 0x5e719f06, 0x5078920d, 0x0a0fd964, 0x0406d46f,
  17474. 0x161dc372, 0x1814ce79, 0x322bed48, 0x3c22e043, 0x2e39f75e, 0x2030fa55,
  17475. 0xec9ab701, 0xe293ba0a, 0xf088ad17, 0xfe81a01c, 0xd4be832d, 0xdab78e26,
  17476. 0xc8ac993b, 0xc6a59430, 0x9cd2df59, 0x92dbd252, 0x80c0c54f, 0x8ec9c844,
  17477. 0xa4f6eb75, 0xaaffe67e, 0xb8e4f163, 0xb6edfc68, 0x0c0a67b1, 0x02036aba,
  17478. 0x10187da7, 0x1e1170ac, 0x342e539d, 0x3a275e96, 0x283c498b, 0x26354480,
  17479. 0x7c420fe9, 0x724b02e2, 0x605015ff, 0x6e5918f4, 0x44663bc5, 0x4a6f36ce,
  17480. 0x587421d3, 0x567d2cd8, 0x37a10c7a, 0x39a80171, 0x2bb3166c, 0x25ba1b67,
  17481. 0x0f853856, 0x018c355d, 0x13972240, 0x1d9e2f4b, 0x47e96422, 0x49e06929,
  17482. 0x5bfb7e34, 0x55f2733f, 0x7fcd500e, 0x71c45d05, 0x63df4a18, 0x6dd64713,
  17483. 0xd731dcca, 0xd938d1c1, 0xcb23c6dc, 0xc52acbd7, 0xef15e8e6, 0xe11ce5ed,
  17484. 0xf307f2f0, 0xfd0efffb, 0xa779b492, 0xa970b999, 0xbb6bae84, 0xb562a38f,
  17485. 0x9f5d80be, 0x91548db5, 0x834f9aa8, 0x8d4697a3]);
  17486. function expandKey128(cipherKey) {
  17487. var b = 176, result = new Uint8Array(b);
  17488. result.set(cipherKey);
  17489. for (var j = 16, i = 1; j < b; ++i) {
  17490. // RotWord
  17491. var t1 = result[j - 3], t2 = result[j - 2],
  17492. t3 = result[j - 1], t4 = result[j - 4];
  17493. // SubWord
  17494. t1 = s[t1]; t2 = s[t2]; t3 = s[t3]; t4 = s[t4];
  17495. // Rcon
  17496. t1 = t1 ^ rcon[i];
  17497. for (var n = 0; n < 4; ++n) {
  17498. result[j] = (t1 ^= result[j - 16]); j++;
  17499. result[j] = (t2 ^= result[j - 16]); j++;
  17500. result[j] = (t3 ^= result[j - 16]); j++;
  17501. result[j] = (t4 ^= result[j - 16]); j++;
  17502. }
  17503. }
  17504. return result;
  17505. }
  17506. function decrypt128(input, key) {
  17507. var state = new Uint8Array(16);
  17508. state.set(input);
  17509. var i, j, k;
  17510. var t, u, v;
  17511. // AddRoundKey
  17512. for (j = 0, k = 160; j < 16; ++j, ++k) {
  17513. state[j] ^= key[k];
  17514. }
  17515. for (i = 9; i >= 1; --i) {
  17516. // InvShiftRows
  17517. t = state[13]; state[13] = state[9]; state[9] = state[5];
  17518. state[5] = state[1]; state[1] = t;
  17519. t = state[14]; u = state[10]; state[14] = state[6];
  17520. state[10] = state[2]; state[6] = t; state[2] = u;
  17521. t = state[15]; u = state[11]; v = state[7]; state[15] = state[3];
  17522. state[11] = t; state[7] = u; state[3] = v;
  17523. // InvSubBytes
  17524. for (j = 0; j < 16; ++j) {
  17525. state[j] = inv_s[state[j]];
  17526. }
  17527. // AddRoundKey
  17528. for (j = 0, k = i * 16; j < 16; ++j, ++k) {
  17529. state[j] ^= key[k];
  17530. }
  17531. // InvMixColumns
  17532. for (j = 0; j < 16; j += 4) {
  17533. var s0 = mix[state[j]], s1 = mix[state[j + 1]],
  17534. s2 = mix[state[j + 2]], s3 = mix[state[j + 3]];
  17535. t = (s0 ^ (s1 >>> 8) ^ (s1 << 24) ^ (s2 >>> 16) ^ (s2 << 16) ^
  17536. (s3 >>> 24) ^ (s3 << 8));
  17537. state[j] = (t >>> 24) & 0xFF;
  17538. state[j + 1] = (t >> 16) & 0xFF;
  17539. state[j + 2] = (t >> 8) & 0xFF;
  17540. state[j + 3] = t & 0xFF;
  17541. }
  17542. }
  17543. // InvShiftRows
  17544. t = state[13]; state[13] = state[9]; state[9] = state[5];
  17545. state[5] = state[1]; state[1] = t;
  17546. t = state[14]; u = state[10]; state[14] = state[6];
  17547. state[10] = state[2]; state[6] = t; state[2] = u;
  17548. t = state[15]; u = state[11]; v = state[7]; state[15] = state[3];
  17549. state[11] = t; state[7] = u; state[3] = v;
  17550. for (j = 0; j < 16; ++j) {
  17551. // InvSubBytes
  17552. state[j] = inv_s[state[j]];
  17553. // AddRoundKey
  17554. state[j] ^= key[j];
  17555. }
  17556. return state;
  17557. }
  17558. function AES128Cipher(key) {
  17559. this.key = expandKey128(key);
  17560. this.buffer = new Uint8Array(16);
  17561. this.bufferPosition = 0;
  17562. }
  17563. function decryptBlock2(data, finalize) {
  17564. var i, j, ii, sourceLength = data.length,
  17565. buffer = this.buffer, bufferLength = this.bufferPosition,
  17566. result = [], iv = this.iv;
  17567. for (i = 0; i < sourceLength; ++i) {
  17568. buffer[bufferLength] = data[i];
  17569. ++bufferLength;
  17570. if (bufferLength < 16) {
  17571. continue;
  17572. }
  17573. // buffer is full, decrypting
  17574. var plain = decrypt128(buffer, this.key);
  17575. // xor-ing the IV vector to get plain text
  17576. for (j = 0; j < 16; ++j) {
  17577. plain[j] ^= iv[j];
  17578. }
  17579. iv = buffer;
  17580. result.push(plain);
  17581. buffer = new Uint8Array(16);
  17582. bufferLength = 0;
  17583. }
  17584. // saving incomplete buffer
  17585. this.buffer = buffer;
  17586. this.bufferLength = bufferLength;
  17587. this.iv = iv;
  17588. if (result.length === 0) {
  17589. return new Uint8Array([]);
  17590. }
  17591. // combining plain text blocks into one
  17592. var outputLength = 16 * result.length;
  17593. if (finalize) {
  17594. // undo a padding that is described in RFC 2898
  17595. var lastBlock = result[result.length - 1];
  17596. outputLength -= lastBlock[15];
  17597. result[result.length - 1] = lastBlock.subarray(0, 16 - lastBlock[15]);
  17598. }
  17599. var output = new Uint8Array(outputLength);
  17600. for (i = 0, j = 0, ii = result.length; i < ii; ++i, j += 16) {
  17601. output.set(result[i], j);
  17602. }
  17603. return output;
  17604. }
  17605. AES128Cipher.prototype = {
  17606. decryptBlock: function AES128Cipher_decryptBlock(data, finalize) {
  17607. var i, sourceLength = data.length;
  17608. var buffer = this.buffer, bufferLength = this.bufferPosition;
  17609. // waiting for IV values -- they are at the start of the stream
  17610. for (i = 0; bufferLength < 16 && i < sourceLength; ++i, ++bufferLength) {
  17611. buffer[bufferLength] = data[i];
  17612. }
  17613. if (bufferLength < 16) {
  17614. // need more data
  17615. this.bufferLength = bufferLength;
  17616. return new Uint8Array([]);
  17617. }
  17618. this.iv = buffer;
  17619. this.buffer = new Uint8Array(16);
  17620. this.bufferLength = 0;
  17621. // starting decryption
  17622. this.decryptBlock = decryptBlock2;
  17623. return this.decryptBlock(data.subarray(16), finalize);
  17624. }
  17625. };
  17626. return AES128Cipher;
  17627. })();
  17628. var CipherTransform = (function CipherTransformClosure() {
  17629. function CipherTransform(stringCipherConstructor, streamCipherConstructor) {
  17630. this.stringCipherConstructor = stringCipherConstructor;
  17631. this.streamCipherConstructor = streamCipherConstructor;
  17632. }
  17633. CipherTransform.prototype = {
  17634. createStream: function CipherTransform_createStream(stream, length) {
  17635. var cipher = new this.streamCipherConstructor();
  17636. return new DecryptStream(stream, length,
  17637. function cipherTransformDecryptStream(data, finalize) {
  17638. return cipher.decryptBlock(data, finalize);
  17639. }
  17640. );
  17641. },
  17642. decryptString: function CipherTransform_decryptString(s) {
  17643. var cipher = new this.stringCipherConstructor();
  17644. var data = stringToBytes(s);
  17645. data = cipher.decryptBlock(data, true);
  17646. return bytesToString(data);
  17647. }
  17648. };
  17649. return CipherTransform;
  17650. })();
  17651. var CipherTransformFactory = (function CipherTransformFactoryClosure() {
  17652. var defaultPasswordBytes = new Uint8Array([
  17653. 0x28, 0xBF, 0x4E, 0x5E, 0x4E, 0x75, 0x8A, 0x41,
  17654. 0x64, 0x00, 0x4E, 0x56, 0xFF, 0xFA, 0x01, 0x08,
  17655. 0x2E, 0x2E, 0x00, 0xB6, 0xD0, 0x68, 0x3E, 0x80,
  17656. 0x2F, 0x0C, 0xA9, 0xFE, 0x64, 0x53, 0x69, 0x7A]);
  17657. function prepareKeyData(fileId, password, ownerPassword, userPassword,
  17658. flags, revision, keyLength, encryptMetadata) {
  17659. var hashDataSize = 40 + ownerPassword.length + fileId.length;
  17660. var hashData = new Uint8Array(hashDataSize), i = 0, j, n;
  17661. if (password) {
  17662. n = Math.min(32, password.length);
  17663. for (; i < n; ++i) {
  17664. hashData[i] = password[i];
  17665. }
  17666. }
  17667. j = 0;
  17668. while (i < 32) {
  17669. hashData[i++] = defaultPasswordBytes[j++];
  17670. }
  17671. // as now the padded password in the hashData[0..i]
  17672. for (j = 0, n = ownerPassword.length; j < n; ++j) {
  17673. hashData[i++] = ownerPassword[j];
  17674. }
  17675. hashData[i++] = flags & 0xFF;
  17676. hashData[i++] = (flags >> 8) & 0xFF;
  17677. hashData[i++] = (flags >> 16) & 0xFF;
  17678. hashData[i++] = (flags >>> 24) & 0xFF;
  17679. for (j = 0, n = fileId.length; j < n; ++j) {
  17680. hashData[i++] = fileId[j];
  17681. }
  17682. if (revision >= 4 && !encryptMetadata) {
  17683. hashData[i++] = 0xFF;
  17684. hashData[i++] = 0xFF;
  17685. hashData[i++] = 0xFF;
  17686. hashData[i++] = 0xFF;
  17687. }
  17688. var hash = calculateMD5(hashData, 0, i);
  17689. var keyLengthInBytes = keyLength >> 3;
  17690. if (revision >= 3) {
  17691. for (j = 0; j < 50; ++j) {
  17692. hash = calculateMD5(hash, 0, keyLengthInBytes);
  17693. }
  17694. }
  17695. var encryptionKey = hash.subarray(0, keyLengthInBytes);
  17696. var cipher, checkData;
  17697. if (revision >= 3) {
  17698. for (i = 0; i < 32; ++i) {
  17699. hashData[i] = defaultPasswordBytes[i];
  17700. }
  17701. for (j = 0, n = fileId.length; j < n; ++j) {
  17702. hashData[i++] = fileId[j];
  17703. }
  17704. cipher = new ARCFourCipher(encryptionKey);
  17705. checkData = cipher.encryptBlock(calculateMD5(hashData, 0, i));
  17706. n = encryptionKey.length;
  17707. var derivedKey = new Uint8Array(n), k;
  17708. for (j = 1; j <= 19; ++j) {
  17709. for (k = 0; k < n; ++k) {
  17710. derivedKey[k] = encryptionKey[k] ^ j;
  17711. }
  17712. cipher = new ARCFourCipher(derivedKey);
  17713. checkData = cipher.encryptBlock(checkData);
  17714. }
  17715. for (j = 0, n = checkData.length; j < n; ++j) {
  17716. if (userPassword[j] != checkData[j]) {
  17717. return null;
  17718. }
  17719. }
  17720. } else {
  17721. cipher = new ARCFourCipher(encryptionKey);
  17722. checkData = cipher.encryptBlock(defaultPasswordBytes);
  17723. for (j = 0, n = checkData.length; j < n; ++j) {
  17724. if (userPassword[j] != checkData[j]) {
  17725. return null;
  17726. }
  17727. }
  17728. }
  17729. return encryptionKey;
  17730. }
  17731. function decodeUserPassword(password, ownerPassword, revision, keyLength) {
  17732. var hashData = new Uint8Array(32), i = 0, j, n;
  17733. n = Math.min(32, password.length);
  17734. for (; i < n; ++i) {
  17735. hashData[i] = password[i];
  17736. }
  17737. j = 0;
  17738. while (i < 32) {
  17739. hashData[i++] = defaultPasswordBytes[j++];
  17740. }
  17741. var hash = calculateMD5(hashData, 0, i);
  17742. var keyLengthInBytes = keyLength >> 3;
  17743. if (revision >= 3) {
  17744. for (j = 0; j < 50; ++j) {
  17745. hash = calculateMD5(hash, 0, hash.length);
  17746. }
  17747. }
  17748. var cipher, userPassword;
  17749. if (revision >= 3) {
  17750. userPassword = ownerPassword;
  17751. var derivedKey = new Uint8Array(keyLengthInBytes), k;
  17752. for (j = 19; j >= 0; j--) {
  17753. for (k = 0; k < keyLengthInBytes; ++k) {
  17754. derivedKey[k] = hash[k] ^ j;
  17755. }
  17756. cipher = new ARCFourCipher(derivedKey);
  17757. userPassword = cipher.encryptBlock(userPassword);
  17758. }
  17759. } else {
  17760. cipher = new ARCFourCipher(hash.subarray(0, keyLengthInBytes));
  17761. userPassword = cipher.encryptBlock(ownerPassword);
  17762. }
  17763. return userPassword;
  17764. }
  17765. var identityName = Name.get('Identity');
  17766. function CipherTransformFactory(dict, fileId, password) {
  17767. var filter = dict.get('Filter');
  17768. if (!isName(filter) || filter.name != 'Standard') {
  17769. error('unknown encryption method');
  17770. }
  17771. this.dict = dict;
  17772. var algorithm = dict.get('V');
  17773. if (!isInt(algorithm) ||
  17774. (algorithm != 1 && algorithm != 2 && algorithm != 4)) {
  17775. error('unsupported encryption algorithm');
  17776. }
  17777. this.algorithm = algorithm;
  17778. var keyLength = dict.get('Length') || 40;
  17779. if (!isInt(keyLength) ||
  17780. keyLength < 40 || (keyLength % 8) !== 0) {
  17781. error('invalid key length');
  17782. }
  17783. // prepare keys
  17784. var ownerPassword = stringToBytes(dict.get('O')).subarray(0, 32);
  17785. var userPassword = stringToBytes(dict.get('U')).subarray(0, 32);
  17786. var flags = dict.get('P');
  17787. var revision = dict.get('R');
  17788. var encryptMetadata = (algorithm == 4 && // meaningful when V is 4
  17789. dict.get('EncryptMetadata') !== false); // makes true as default value
  17790. this.encryptMetadata = encryptMetadata;
  17791. var fileIdBytes = stringToBytes(fileId);
  17792. var passwordBytes;
  17793. if (password) {
  17794. passwordBytes = stringToBytes(password);
  17795. }
  17796. var encryptionKey = prepareKeyData(fileIdBytes, passwordBytes,
  17797. ownerPassword, userPassword, flags,
  17798. revision, keyLength, encryptMetadata);
  17799. if (!encryptionKey && !password) {
  17800. throw new PasswordException('No password given',
  17801. PasswordResponses.NEED_PASSWORD);
  17802. } else if (!encryptionKey && password) {
  17803. // Attempting use the password as an owner password
  17804. var decodedPassword = decodeUserPassword(passwordBytes, ownerPassword,
  17805. revision, keyLength);
  17806. encryptionKey = prepareKeyData(fileIdBytes, decodedPassword,
  17807. ownerPassword, userPassword, flags,
  17808. revision, keyLength, encryptMetadata);
  17809. }
  17810. if (!encryptionKey) {
  17811. throw new PasswordException('Incorrect Password',
  17812. PasswordResponses.INCORRECT_PASSWORD);
  17813. }
  17814. this.encryptionKey = encryptionKey;
  17815. if (algorithm == 4) {
  17816. this.cf = dict.get('CF');
  17817. this.stmf = dict.get('StmF') || identityName;
  17818. this.strf = dict.get('StrF') || identityName;
  17819. this.eff = dict.get('EFF') || this.strf;
  17820. }
  17821. }
  17822. function buildObjectKey(num, gen, encryptionKey, isAes) {
  17823. var key = new Uint8Array(encryptionKey.length + 9), i, n;
  17824. for (i = 0, n = encryptionKey.length; i < n; ++i) {
  17825. key[i] = encryptionKey[i];
  17826. }
  17827. key[i++] = num & 0xFF;
  17828. key[i++] = (num >> 8) & 0xFF;
  17829. key[i++] = (num >> 16) & 0xFF;
  17830. key[i++] = gen & 0xFF;
  17831. key[i++] = (gen >> 8) & 0xFF;
  17832. if (isAes) {
  17833. key[i++] = 0x73;
  17834. key[i++] = 0x41;
  17835. key[i++] = 0x6C;
  17836. key[i++] = 0x54;
  17837. }
  17838. var hash = calculateMD5(key, 0, i);
  17839. return hash.subarray(0, Math.min(encryptionKey.length + 5, 16));
  17840. }
  17841. function buildCipherConstructor(cf, name, num, gen, key) {
  17842. var cryptFilter = cf.get(name.name);
  17843. var cfm;
  17844. if (cryptFilter !== null && cryptFilter !== undefined) {
  17845. cfm = cryptFilter.get('CFM');
  17846. }
  17847. if (!cfm || cfm.name == 'None') {
  17848. return function cipherTransformFactoryBuildCipherConstructorNone() {
  17849. return new NullCipher();
  17850. };
  17851. }
  17852. if ('V2' == cfm.name) {
  17853. return function cipherTransformFactoryBuildCipherConstructorV2() {
  17854. return new ARCFourCipher(buildObjectKey(num, gen, key, false));
  17855. };
  17856. }
  17857. if ('AESV2' == cfm.name) {
  17858. return function cipherTransformFactoryBuildCipherConstructorAESV2() {
  17859. return new AES128Cipher(buildObjectKey(num, gen, key, true));
  17860. };
  17861. }
  17862. error('Unknown crypto method');
  17863. }
  17864. CipherTransformFactory.prototype = {
  17865. createCipherTransform:
  17866. function CipherTransformFactory_createCipherTransform(num, gen) {
  17867. if (this.algorithm == 4) {
  17868. return new CipherTransform(
  17869. buildCipherConstructor(this.cf, this.stmf,
  17870. num, gen, this.encryptionKey),
  17871. buildCipherConstructor(this.cf, this.strf,
  17872. num, gen, this.encryptionKey));
  17873. }
  17874. // algorithms 1 and 2
  17875. var key = buildObjectKey(num, gen, this.encryptionKey, false);
  17876. var cipherConstructor = function buildCipherCipherConstructor() {
  17877. return new ARCFourCipher(key);
  17878. };
  17879. return new CipherTransform(cipherConstructor, cipherConstructor);
  17880. }
  17881. };
  17882. return CipherTransformFactory;
  17883. })();
  17884. var PatternType = {
  17885. FUNCTION_BASED: 1,
  17886. AXIAL: 2,
  17887. RADIAL: 3,
  17888. FREE_FORM_MESH: 4,
  17889. LATTICE_FORM_MESH: 5,
  17890. COONS_PATCH_MESH: 6,
  17891. TENSOR_PATCH_MESH: 7
  17892. };
  17893. var Pattern = (function PatternClosure() {
  17894. // Constructor should define this.getPattern
  17895. function Pattern() {
  17896. error('should not call Pattern constructor');
  17897. }
  17898. Pattern.prototype = {
  17899. // Input: current Canvas context
  17900. // Output: the appropriate fillStyle or strokeStyle
  17901. getPattern: function Pattern_getPattern(ctx) {
  17902. error('Should not call Pattern.getStyle: ' + ctx);
  17903. }
  17904. };
  17905. Pattern.parseShading = function Pattern_parseShading(shading, matrix, xref,
  17906. res) {
  17907. var dict = isStream(shading) ? shading.dict : shading;
  17908. var type = dict.get('ShadingType');
  17909. switch (type) {
  17910. case PatternType.AXIAL:
  17911. case PatternType.RADIAL:
  17912. // Both radial and axial shadings are handled by RadialAxial shading.
  17913. return new Shadings.RadialAxial(dict, matrix, xref, res);
  17914. case PatternType.FREE_FORM_MESH:
  17915. case PatternType.LATTICE_FORM_MESH:
  17916. case PatternType.COONS_PATCH_MESH:
  17917. case PatternType.TENSOR_PATCH_MESH:
  17918. return new Shadings.Mesh(shading, matrix, xref, res);
  17919. default:
  17920. UnsupportedManager.notify(UNSUPPORTED_FEATURES.shadingPattern);
  17921. return new Shadings.Dummy();
  17922. }
  17923. };
  17924. return Pattern;
  17925. })();
  17926. var Shadings = {};
  17927. // A small number to offset the first/last color stops so we can insert ones to
  17928. // support extend. Number.MIN_VALUE appears to be too small and breaks the
  17929. // extend. 1e-7 works in FF but chrome seems to use an even smaller sized number
  17930. // internally so we have to go bigger.
  17931. Shadings.SMALL_NUMBER = 1e-2;
  17932. // Radial and axial shading have very similar implementations
  17933. // If needed, the implementations can be broken into two classes
  17934. Shadings.RadialAxial = (function RadialAxialClosure() {
  17935. function RadialAxial(dict, matrix, xref, res) {
  17936. this.matrix = matrix;
  17937. this.coordsArr = dict.get('Coords');
  17938. this.shadingType = dict.get('ShadingType');
  17939. this.type = 'Pattern';
  17940. var cs = dict.get('ColorSpace', 'CS');
  17941. cs = ColorSpace.parse(cs, xref, res);
  17942. this.cs = cs;
  17943. var t0 = 0.0, t1 = 1.0;
  17944. if (dict.has('Domain')) {
  17945. var domainArr = dict.get('Domain');
  17946. t0 = domainArr[0];
  17947. t1 = domainArr[1];
  17948. }
  17949. var extendStart = false, extendEnd = false;
  17950. if (dict.has('Extend')) {
  17951. var extendArr = dict.get('Extend');
  17952. extendStart = extendArr[0];
  17953. extendEnd = extendArr[1];
  17954. }
  17955. if (this.shadingType === PatternType.RADIAL &&
  17956. (!extendStart || !extendEnd)) {
  17957. // Radial gradient only currently works if either circle is fully within
  17958. // the other circle.
  17959. var x1 = this.coordsArr[0];
  17960. var y1 = this.coordsArr[1];
  17961. var r1 = this.coordsArr[2];
  17962. var x2 = this.coordsArr[3];
  17963. var y2 = this.coordsArr[4];
  17964. var r2 = this.coordsArr[5];
  17965. var distance = Math.sqrt((x1 - x2) * (x1 - x2) + (y1 - y2) * (y1 - y2));
  17966. if (r1 <= r2 + distance &&
  17967. r2 <= r1 + distance) {
  17968. warn('Unsupported radial gradient.');
  17969. }
  17970. }
  17971. this.extendStart = extendStart;
  17972. this.extendEnd = extendEnd;
  17973. var fnObj = dict.get('Function');
  17974. var fn;
  17975. if (isArray(fnObj)) {
  17976. var fnArray = [];
  17977. for (var j = 0, jj = fnObj.length; j < jj; j++) {
  17978. var obj = xref.fetchIfRef(fnObj[j]);
  17979. if (!isPDFFunction(obj)) {
  17980. error('Invalid function');
  17981. }
  17982. fnArray.push(PDFFunction.parse(xref, obj));
  17983. }
  17984. fn = function radialAxialColorFunction(arg) {
  17985. var out = [];
  17986. for (var i = 0, ii = fnArray.length; i < ii; i++) {
  17987. out.push(fnArray[i](arg)[0]);
  17988. }
  17989. return out;
  17990. };
  17991. } else {
  17992. if (!isPDFFunction(fnObj)) {
  17993. error('Invalid function');
  17994. }
  17995. fn = PDFFunction.parse(xref, fnObj);
  17996. }
  17997. // 10 samples seems good enough for now, but probably won't work
  17998. // if there are sharp color changes. Ideally, we would implement
  17999. // the spec faithfully and add lossless optimizations.
  18000. var diff = t1 - t0;
  18001. var step = diff / 10;
  18002. var colorStops = this.colorStops = [];
  18003. // Protect against bad domains so we don't end up in an infinte loop below.
  18004. if (t0 >= t1 || step <= 0) {
  18005. // Acrobat doesn't seem to handle these cases so we'll ignore for
  18006. // now.
  18007. info('Bad shading domain.');
  18008. return;
  18009. }
  18010. var rgbColor;
  18011. for (var i = t0; i <= t1; i += step) {
  18012. rgbColor = cs.getRgb(fn([i]), 0);
  18013. var cssColor = Util.makeCssRgb(rgbColor);
  18014. colorStops.push([(i - t0) / diff, cssColor]);
  18015. }
  18016. var background = 'transparent';
  18017. if (dict.has('Background')) {
  18018. rgbColor = cs.getRgb(dict.get('Background'), 0);
  18019. background = Util.makeCssRgb(rgbColor);
  18020. }
  18021. if (!extendStart) {
  18022. // Insert a color stop at the front and offset the first real color stop
  18023. // so it doesn't conflict with the one we insert.
  18024. colorStops.unshift([0, background]);
  18025. colorStops[1][0] += Shadings.SMALL_NUMBER;
  18026. }
  18027. if (!extendEnd) {
  18028. // Same idea as above in extendStart but for the end.
  18029. colorStops[colorStops.length - 1][0] -= Shadings.SMALL_NUMBER;
  18030. colorStops.push([1, background]);
  18031. }
  18032. this.colorStops = colorStops;
  18033. }
  18034. RadialAxial.prototype = {
  18035. getIR: function RadialAxial_getIR() {
  18036. var coordsArr = this.coordsArr;
  18037. var shadingType = this.shadingType;
  18038. var type, p0, p1, r0, r1;
  18039. if (shadingType == PatternType.AXIAL) {
  18040. p0 = [coordsArr[0], coordsArr[1]];
  18041. p1 = [coordsArr[2], coordsArr[3]];
  18042. r0 = null;
  18043. r1 = null;
  18044. type = 'axial';
  18045. } else if (shadingType == PatternType.RADIAL) {
  18046. p0 = [coordsArr[0], coordsArr[1]];
  18047. p1 = [coordsArr[3], coordsArr[4]];
  18048. r0 = coordsArr[2];
  18049. r1 = coordsArr[5];
  18050. type = 'radial';
  18051. } else {
  18052. error('getPattern type unknown: ' + shadingType);
  18053. }
  18054. var matrix = this.matrix;
  18055. if (matrix) {
  18056. p0 = Util.applyTransform(p0, matrix);
  18057. p1 = Util.applyTransform(p1, matrix);
  18058. }
  18059. return ['RadialAxial', type, this.colorStops, p0, p1, r0, r1];
  18060. }
  18061. };
  18062. return RadialAxial;
  18063. })();
  18064. // All mesh shading. For now, they will be presented as set of the triangles
  18065. // to be drawn on the canvas and rgb color for each vertex.
  18066. Shadings.Mesh = (function MeshClosure() {
  18067. function MeshStreamReader(stream, context) {
  18068. this.stream = stream;
  18069. this.context = context;
  18070. this.buffer = 0;
  18071. this.bufferLength = 0;
  18072. }
  18073. MeshStreamReader.prototype = {
  18074. get hasData() {
  18075. if (this.stream.end) {
  18076. return this.stream.pos < this.stream.end;
  18077. }
  18078. if (this.bufferLength > 0) {
  18079. return true;
  18080. }
  18081. var nextByte = this.stream.getByte();
  18082. if (nextByte < 0) {
  18083. return false;
  18084. }
  18085. this.buffer = nextByte;
  18086. this.bufferLength = 8;
  18087. return true;
  18088. },
  18089. readBits: function MeshStreamReader_readBits(n) {
  18090. var buffer = this.buffer;
  18091. var bufferLength = this.bufferLength;
  18092. if (n === 32) {
  18093. if (bufferLength === 0) {
  18094. return ((this.stream.getByte() << 24) |
  18095. (this.stream.getByte() << 16) | (this.stream.getByte() << 8) |
  18096. this.stream.getByte()) >>> 0;
  18097. }
  18098. buffer = (buffer << 24) | (this.stream.getByte() << 16) |
  18099. (this.stream.getByte() << 8) | this.stream.getByte();
  18100. var nextByte = this.stream.getByte();
  18101. this.buffer = nextByte & ((1 << bufferLength) - 1);
  18102. return ((buffer << (8 - bufferLength)) |
  18103. ((nextByte & 0xFF) >> bufferLength)) >>> 0;
  18104. }
  18105. if (n === 8 && bufferLength === 0) {
  18106. return this.stream.getByte();
  18107. }
  18108. while (bufferLength < n) {
  18109. buffer = (buffer << 8) | this.stream.getByte();
  18110. bufferLength += 8;
  18111. }
  18112. bufferLength -= n;
  18113. this.bufferLength = bufferLength;
  18114. this.buffer = buffer & ((1 << bufferLength) - 1);
  18115. return buffer >> bufferLength;
  18116. },
  18117. align: function MeshStreamReader_align() {
  18118. this.buffer = 0;
  18119. this.bufferLength = 0;
  18120. },
  18121. readFlag: function MeshStreamReader_readFlag() {
  18122. return this.readBits(this.context.bitsPerFlag);
  18123. },
  18124. readCoordinate: function MeshStreamReader_readCoordinate() {
  18125. var bitsPerCoordinate = this.context.bitsPerCoordinate;
  18126. var xi = this.readBits(bitsPerCoordinate);
  18127. var yi = this.readBits(bitsPerCoordinate);
  18128. var decode = this.context.decode;
  18129. var scale = bitsPerCoordinate < 32 ? 1 / ((1 << bitsPerCoordinate) - 1) :
  18130. 2.3283064365386963e-10; // 2 ^ -32
  18131. return [
  18132. xi * scale * (decode[1] - decode[0]) + decode[0],
  18133. yi * scale * (decode[3] - decode[2]) + decode[2]
  18134. ];
  18135. },
  18136. readComponents: function MeshStreamReader_readComponents() {
  18137. var numComps = this.context.numComps;
  18138. var bitsPerComponent = this.context.bitsPerComponent;
  18139. var scale = bitsPerComponent < 32 ? 1 / ((1 << bitsPerComponent) - 1) :
  18140. 2.3283064365386963e-10; // 2 ^ -32
  18141. var decode = this.context.decode;
  18142. var components = [];
  18143. for (var i = 0, j = 4; i < numComps; i++, j += 2) {
  18144. var ci = this.readBits(bitsPerComponent);
  18145. components.push(ci * scale * (decode[j + 1] - decode[j]) + decode[j]);
  18146. }
  18147. if (this.context.colorFn) {
  18148. components = this.context.colorFn(components);
  18149. }
  18150. return this.context.colorSpace.getRgb(components, 0);
  18151. }
  18152. };
  18153. function decodeType4Shading(mesh, reader) {
  18154. var coords = mesh.coords;
  18155. var colors = mesh.colors;
  18156. var operators = [];
  18157. var ps = []; // not maintaining cs since that will match ps
  18158. var verticesLeft = 0; // assuming we have all data to start a new triangle
  18159. while (reader.hasData) {
  18160. var f = reader.readFlag();
  18161. var coord = reader.readCoordinate();
  18162. var color = reader.readComponents();
  18163. if (verticesLeft === 0) { // ignoring flags if we started a triangle
  18164. assert(0 <= f && f <= 2, 'Unknown type4 flag');
  18165. switch (f) {
  18166. case 0:
  18167. verticesLeft = 3;
  18168. break;
  18169. case 1:
  18170. ps.push(ps[ps.length - 2], ps[ps.length - 1]);
  18171. verticesLeft = 1;
  18172. break;
  18173. case 2:
  18174. ps.push(ps[ps.length - 3], ps[ps.length - 1]);
  18175. verticesLeft = 1;
  18176. break;
  18177. }
  18178. operators.push(f);
  18179. }
  18180. ps.push(coords.length);
  18181. coords.push(coord);
  18182. colors.push(color);
  18183. verticesLeft--;
  18184. reader.align();
  18185. }
  18186. var psPacked = new Int32Array(ps);
  18187. mesh.figures.push({
  18188. type: 'triangles',
  18189. coords: psPacked,
  18190. colors: psPacked
  18191. });
  18192. }
  18193. function decodeType5Shading(mesh, reader, verticesPerRow) {
  18194. var coords = mesh.coords;
  18195. var colors = mesh.colors;
  18196. var ps = []; // not maintaining cs since that will match ps
  18197. while (reader.hasData) {
  18198. var coord = reader.readCoordinate();
  18199. var color = reader.readComponents();
  18200. ps.push(coords.length);
  18201. coords.push(coord);
  18202. colors.push(color);
  18203. }
  18204. var psPacked = new Int32Array(ps);
  18205. mesh.figures.push({
  18206. type: 'lattice',
  18207. coords: psPacked,
  18208. colors: psPacked,
  18209. verticesPerRow: verticesPerRow
  18210. });
  18211. }
  18212. var MIN_SPLIT_PATCH_CHUNKS_AMOUNT = 3;
  18213. var MAX_SPLIT_PATCH_CHUNKS_AMOUNT = 20;
  18214. var TRIANGLE_DENSITY = 20; // count of triangles per entire mesh bounds
  18215. var getB = (function getBClosure() {
  18216. function buildB(count) {
  18217. var lut = [];
  18218. for (var i = 0; i <= count; i++) {
  18219. var t = i / count, t_ = 1 - t;
  18220. lut.push(new Float32Array([t_ * t_ * t_, 3 * t * t_ * t_,
  18221. 3 * t * t * t_, t * t * t]));
  18222. }
  18223. return lut;
  18224. }
  18225. var cache = [];
  18226. return function getB(count) {
  18227. if (!cache[count]) {
  18228. cache[count] = buildB(count);
  18229. }
  18230. return cache[count];
  18231. };
  18232. })();
  18233. function buildFigureFromPatch(mesh, index) {
  18234. var figure = mesh.figures[index];
  18235. assert(figure.type === 'patch', 'Unexpected patch mesh figure');
  18236. var coords = mesh.coords, colors = mesh.colors;
  18237. var pi = figure.coords;
  18238. var ci = figure.colors;
  18239. var figureMinX = Math.min(coords[pi[0]][0], coords[pi[3]][0],
  18240. coords[pi[12]][0], coords[pi[15]][0]);
  18241. var figureMinY = Math.min(coords[pi[0]][1], coords[pi[3]][1],
  18242. coords[pi[12]][1], coords[pi[15]][1]);
  18243. var figureMaxX = Math.max(coords[pi[0]][0], coords[pi[3]][0],
  18244. coords[pi[12]][0], coords[pi[15]][0]);
  18245. var figureMaxY = Math.max(coords[pi[0]][1], coords[pi[3]][1],
  18246. coords[pi[12]][1], coords[pi[15]][1]);
  18247. var splitXBy = Math.ceil((figureMaxX - figureMinX) * TRIANGLE_DENSITY /
  18248. (mesh.bounds[2] - mesh.bounds[0]));
  18249. splitXBy = Math.max(MIN_SPLIT_PATCH_CHUNKS_AMOUNT,
  18250. Math.min(MAX_SPLIT_PATCH_CHUNKS_AMOUNT, splitXBy));
  18251. var splitYBy = Math.ceil((figureMaxY - figureMinY) * TRIANGLE_DENSITY /
  18252. (mesh.bounds[3] - mesh.bounds[1]));
  18253. splitYBy = Math.max(MIN_SPLIT_PATCH_CHUNKS_AMOUNT,
  18254. Math.min(MAX_SPLIT_PATCH_CHUNKS_AMOUNT, splitYBy));
  18255. var verticesPerRow = splitXBy + 1;
  18256. var figureCoords = new Int32Array((splitYBy + 1) * verticesPerRow);
  18257. var figureColors = new Int32Array((splitYBy + 1) * verticesPerRow);
  18258. var k = 0;
  18259. var cl = new Uint8Array(3), cr = new Uint8Array(3);
  18260. var c0 = colors[ci[0]], c1 = colors[ci[1]],
  18261. c2 = colors[ci[2]], c3 = colors[ci[3]];
  18262. var bRow = getB(splitYBy), bCol = getB(splitXBy);
  18263. for (var row = 0; row <= splitYBy; row++) {
  18264. cl[0] = ((c0[0] * (splitYBy - row) + c2[0] * row) / splitYBy) | 0;
  18265. cl[1] = ((c0[1] * (splitYBy - row) + c2[1] * row) / splitYBy) | 0;
  18266. cl[2] = ((c0[2] * (splitYBy - row) + c2[2] * row) / splitYBy) | 0;
  18267. cr[0] = ((c1[0] * (splitYBy - row) + c3[0] * row) / splitYBy) | 0;
  18268. cr[1] = ((c1[1] * (splitYBy - row) + c3[1] * row) / splitYBy) | 0;
  18269. cr[2] = ((c1[2] * (splitYBy - row) + c3[2] * row) / splitYBy) | 0;
  18270. for (var col = 0; col <= splitXBy; col++, k++) {
  18271. if ((row === 0 || row === splitYBy) &&
  18272. (col === 0 || col === splitXBy)) {
  18273. continue;
  18274. }
  18275. var x = 0, y = 0;
  18276. var q = 0;
  18277. for (var i = 0; i <= 3; i++) {
  18278. for (var j = 0; j <= 3; j++, q++) {
  18279. var m = bRow[row][i] * bCol[col][j];
  18280. x += coords[pi[q]][0] * m;
  18281. y += coords[pi[q]][1] * m;
  18282. }
  18283. }
  18284. figureCoords[k] = coords.length;
  18285. coords.push([x, y]);
  18286. figureColors[k] = colors.length;
  18287. var newColor = new Uint8Array(3);
  18288. newColor[0] = ((cl[0] * (splitXBy - col) + cr[0] * col) / splitXBy) | 0;
  18289. newColor[1] = ((cl[1] * (splitXBy - col) + cr[1] * col) / splitXBy) | 0;
  18290. newColor[2] = ((cl[2] * (splitXBy - col) + cr[2] * col) / splitXBy) | 0;
  18291. colors.push(newColor);
  18292. }
  18293. }
  18294. figureCoords[0] = pi[0];
  18295. figureColors[0] = ci[0];
  18296. figureCoords[splitXBy] = pi[3];
  18297. figureColors[splitXBy] = ci[1];
  18298. figureCoords[verticesPerRow * splitYBy] = pi[12];
  18299. figureColors[verticesPerRow * splitYBy] = ci[2];
  18300. figureCoords[verticesPerRow * splitYBy + splitXBy] = pi[15];
  18301. figureColors[verticesPerRow * splitYBy + splitXBy] = ci[3];
  18302. mesh.figures[index] = {
  18303. type: 'lattice',
  18304. coords: figureCoords,
  18305. colors: figureColors,
  18306. verticesPerRow: verticesPerRow
  18307. };
  18308. }
  18309. function decodeType6Shading(mesh, reader) {
  18310. // A special case of Type 7. The p11, p12, p21, p22 automatically filled
  18311. var coords = mesh.coords;
  18312. var colors = mesh.colors;
  18313. var ps = new Int32Array(16); // p00, p10, ..., p30, p01, ..., p33
  18314. var cs = new Int32Array(4); // c00, c30, c03, c33
  18315. while (reader.hasData) {
  18316. var f = reader.readFlag();
  18317. assert(0 <= f && f <= 3, 'Unknown type6 flag');
  18318. var i, ii;
  18319. var pi = coords.length;
  18320. for (i = 0, ii = (f !== 0 ? 8 : 12); i < ii; i++) {
  18321. coords.push(reader.readCoordinate());
  18322. }
  18323. var ci = colors.length;
  18324. for (i = 0, ii = (f !== 0 ? 2 : 4); i < ii; i++) {
  18325. colors.push(reader.readComponents());
  18326. }
  18327. var tmp1, tmp2, tmp3, tmp4;
  18328. switch (f) {
  18329. case 0:
  18330. ps[12] = pi + 3; ps[13] = pi + 4; ps[14] = pi + 5; ps[15] = pi + 6;
  18331. ps[ 8] = pi + 2; /* values for 5, 6, 9, 10 are */ ps[11] = pi + 7;
  18332. ps[ 4] = pi + 1; /* calculated below */ ps[ 7] = pi + 8;
  18333. ps[ 0] = pi; ps[ 1] = pi + 11; ps[ 2] = pi + 10; ps[ 3] = pi + 9;
  18334. cs[2] = ci + 1; cs[3] = ci + 2;
  18335. cs[0] = ci; cs[1] = ci + 3;
  18336. break;
  18337. case 1:
  18338. tmp1 = ps[12]; tmp2 = ps[13]; tmp3 = ps[14]; tmp4 = ps[15];
  18339. ps[12] = pi + 5; ps[13] = pi + 4; ps[14] = pi + 3; ps[15] = pi + 2;
  18340. ps[ 8] = pi + 6; /* values for 5, 6, 9, 10 are */ ps[11] = pi + 1;
  18341. ps[ 4] = pi + 7; /* calculated below */ ps[ 7] = pi;
  18342. ps[ 0] = tmp1; ps[ 1] = tmp2; ps[ 2] = tmp3; ps[ 3] = tmp4;
  18343. tmp1 = cs[2]; tmp2 = cs[3];
  18344. cs[2] = ci + 1; cs[3] = ci;
  18345. cs[0] = tmp1; cs[1] = tmp2;
  18346. break;
  18347. case 2:
  18348. ps[12] = ps[15]; ps[13] = pi + 7; ps[14] = pi + 6; ps[15] = pi + 5;
  18349. ps[ 8] = ps[11]; /* values for 5, 6, 9, 10 are */ ps[11] = pi + 4;
  18350. ps[ 4] = ps[7]; /* calculated below */ ps[ 7] = pi + 3;
  18351. ps[ 0] = ps[3]; ps[ 1] = pi; ps[ 2] = pi + 1; ps[ 3] = pi + 2;
  18352. cs[2] = cs[3]; cs[3] = ci + 1;
  18353. cs[0] = cs[1]; cs[1] = ci;
  18354. break;
  18355. case 3:
  18356. ps[12] = ps[0]; ps[13] = ps[1]; ps[14] = ps[2]; ps[15] = ps[3];
  18357. ps[ 8] = pi; /* values for 5, 6, 9, 10 are */ ps[11] = pi + 7;
  18358. ps[ 4] = pi + 1; /* calculated below */ ps[ 7] = pi + 6;
  18359. ps[ 0] = pi + 2; ps[ 1] = pi + 3; ps[ 2] = pi + 4; ps[ 3] = pi + 5;
  18360. cs[2] = cs[0]; cs[3] = cs[1];
  18361. cs[0] = ci; cs[1] = ci + 1;
  18362. break;
  18363. }
  18364. // set p11, p12, p21, p22
  18365. ps[5] = coords.length;
  18366. coords.push([
  18367. (-4 * coords[ps[0]][0] - coords[ps[15]][0] +
  18368. 6 * (coords[ps[4]][0] + coords[ps[1]][0]) -
  18369. 2 * (coords[ps[12]][0] + coords[ps[3]][0]) +
  18370. 3 * (coords[ps[13]][0] + coords[ps[7]][0])) / 9,
  18371. (-4 * coords[ps[0]][1] - coords[ps[15]][1] +
  18372. 6 * (coords[ps[4]][1] + coords[ps[1]][1]) -
  18373. 2 * (coords[ps[12]][1] + coords[ps[3]][1]) +
  18374. 3 * (coords[ps[13]][1] + coords[ps[7]][1])) / 9
  18375. ]);
  18376. ps[6] = coords.length;
  18377. coords.push([
  18378. (-4 * coords[ps[3]][0] - coords[ps[12]][0] +
  18379. 6 * (coords[ps[2]][0] + coords[ps[7]][0]) -
  18380. 2 * (coords[ps[0]][0] + coords[ps[15]][0]) +
  18381. 3 * (coords[ps[4]][0] + coords[ps[14]][0])) / 9,
  18382. (-4 * coords[ps[3]][1] - coords[ps[12]][1] +
  18383. 6 * (coords[ps[2]][1] + coords[ps[7]][1]) -
  18384. 2 * (coords[ps[0]][1] + coords[ps[15]][1]) +
  18385. 3 * (coords[ps[4]][1] + coords[ps[14]][1])) / 9
  18386. ]);
  18387. ps[9] = coords.length;
  18388. coords.push([
  18389. (-4 * coords[ps[12]][0] - coords[ps[3]][0] +
  18390. 6 * (coords[ps[8]][0] + coords[ps[13]][0]) -
  18391. 2 * (coords[ps[0]][0] + coords[ps[15]][0]) +
  18392. 3 * (coords[ps[11]][0] + coords[ps[1]][0])) / 9,
  18393. (-4 * coords[ps[12]][1] - coords[ps[3]][1] +
  18394. 6 * (coords[ps[8]][1] + coords[ps[13]][1]) -
  18395. 2 * (coords[ps[0]][1] + coords[ps[15]][1]) +
  18396. 3 * (coords[ps[11]][1] + coords[ps[1]][1])) / 9
  18397. ]);
  18398. ps[10] = coords.length;
  18399. coords.push([
  18400. (-4 * coords[ps[15]][0] - coords[ps[0]][0] +
  18401. 6 * (coords[ps[11]][0] + coords[ps[14]][0]) -
  18402. 2 * (coords[ps[12]][0] + coords[ps[3]][0]) +
  18403. 3 * (coords[ps[2]][0] + coords[ps[8]][0])) / 9,
  18404. (-4 * coords[ps[15]][1] - coords[ps[0]][1] +
  18405. 6 * (coords[ps[11]][1] + coords[ps[14]][1]) -
  18406. 2 * (coords[ps[12]][1] + coords[ps[3]][1]) +
  18407. 3 * (coords[ps[2]][1] + coords[ps[8]][1])) / 9
  18408. ]);
  18409. mesh.figures.push({
  18410. type: 'patch',
  18411. coords: new Int32Array(ps), // making copies of ps and cs
  18412. colors: new Int32Array(cs)
  18413. });
  18414. }
  18415. }
  18416. function decodeType7Shading(mesh, reader) {
  18417. var coords = mesh.coords;
  18418. var colors = mesh.colors;
  18419. var ps = new Int32Array(16); // p00, p10, ..., p30, p01, ..., p33
  18420. var cs = new Int32Array(4); // c00, c30, c03, c33
  18421. while (reader.hasData) {
  18422. var f = reader.readFlag();
  18423. assert(0 <= f && f <= 3, 'Unknown type7 flag');
  18424. var i, ii;
  18425. var pi = coords.length;
  18426. for (i = 0, ii = (f !== 0 ? 12 : 16); i < ii; i++) {
  18427. coords.push(reader.readCoordinate());
  18428. }
  18429. var ci = colors.length;
  18430. for (i = 0, ii = (f !== 0 ? 2 : 4); i < ii; i++) {
  18431. colors.push(reader.readComponents());
  18432. }
  18433. var tmp1, tmp2, tmp3, tmp4;
  18434. switch (f) {
  18435. case 0:
  18436. ps[12] = pi + 3; ps[13] = pi + 4; ps[14] = pi + 5; ps[15] = pi + 6;
  18437. ps[ 8] = pi + 2; ps[ 9] = pi + 13; ps[10] = pi + 14; ps[11] = pi + 7;
  18438. ps[ 4] = pi + 1; ps[ 5] = pi + 12; ps[ 6] = pi + 15; ps[ 7] = pi + 8;
  18439. ps[ 0] = pi; ps[ 1] = pi + 11; ps[ 2] = pi + 10; ps[ 3] = pi + 9;
  18440. cs[2] = ci + 1; cs[3] = ci + 2;
  18441. cs[0] = ci; cs[1] = ci + 3;
  18442. break;
  18443. case 1:
  18444. tmp1 = ps[12]; tmp2 = ps[13]; tmp3 = ps[14]; tmp4 = ps[15];
  18445. ps[12] = pi + 5; ps[13] = pi + 4; ps[14] = pi + 3; ps[15] = pi + 2;
  18446. ps[ 8] = pi + 6; ps[ 9] = pi + 11; ps[10] = pi + 10; ps[11] = pi + 1;
  18447. ps[ 4] = pi + 7; ps[ 5] = pi + 8; ps[ 6] = pi + 9; ps[ 7] = pi;
  18448. ps[ 0] = tmp1; ps[ 1] = tmp2; ps[ 2] = tmp3; ps[ 3] = tmp4;
  18449. tmp1 = cs[2]; tmp2 = cs[3];
  18450. cs[2] = ci + 1; cs[3] = ci;
  18451. cs[0] = tmp1; cs[1] = tmp2;
  18452. break;
  18453. case 2:
  18454. ps[12] = ps[15]; ps[13] = pi + 7; ps[14] = pi + 6; ps[15] = pi + 5;
  18455. ps[ 8] = ps[11]; ps[ 9] = pi + 8; ps[10] = pi + 11; ps[11] = pi + 4;
  18456. ps[ 4] = ps[7]; ps[ 5] = pi + 9; ps[ 6] = pi + 10; ps[ 7] = pi + 3;
  18457. ps[ 0] = ps[3]; ps[ 1] = pi; ps[ 2] = pi + 1; ps[ 3] = pi + 2;
  18458. cs[2] = cs[3]; cs[3] = ci + 1;
  18459. cs[0] = cs[1]; cs[1] = ci;
  18460. break;
  18461. case 3:
  18462. ps[12] = ps[0]; ps[13] = ps[1]; ps[14] = ps[2]; ps[15] = ps[3];
  18463. ps[ 8] = pi; ps[ 9] = pi + 9; ps[10] = pi + 8; ps[11] = pi + 7;
  18464. ps[ 4] = pi + 1; ps[ 5] = pi + 10; ps[ 6] = pi + 11; ps[ 7] = pi + 6;
  18465. ps[ 0] = pi + 2; ps[ 1] = pi + 3; ps[ 2] = pi + 4; ps[ 3] = pi + 5;
  18466. cs[2] = cs[0]; cs[3] = cs[1];
  18467. cs[0] = ci; cs[1] = ci + 1;
  18468. break;
  18469. }
  18470. mesh.figures.push({
  18471. type: 'patch',
  18472. coords: new Int32Array(ps), // making copies of ps and cs
  18473. colors: new Int32Array(cs)
  18474. });
  18475. }
  18476. }
  18477. function updateBounds(mesh) {
  18478. var minX = mesh.coords[0][0], minY = mesh.coords[0][1],
  18479. maxX = minX, maxY = minY;
  18480. for (var i = 1, ii = mesh.coords.length; i < ii; i++) {
  18481. var x = mesh.coords[i][0], y = mesh.coords[i][1];
  18482. minX = minX > x ? x : minX;
  18483. minY = minY > y ? y : minY;
  18484. maxX = maxX < x ? x : maxX;
  18485. maxY = maxY < y ? y : maxY;
  18486. }
  18487. mesh.bounds = [minX, minY, maxX, maxY];
  18488. }
  18489. function packData(mesh) {
  18490. var i, ii, j, jj;
  18491. var coords = mesh.coords;
  18492. var coordsPacked = new Float32Array(coords.length * 2);
  18493. for (i = 0, j = 0, ii = coords.length; i < ii; i++) {
  18494. var xy = coords[i];
  18495. coordsPacked[j++] = xy[0];
  18496. coordsPacked[j++] = xy[1];
  18497. }
  18498. mesh.coords = coordsPacked;
  18499. var colors = mesh.colors;
  18500. var colorsPacked = new Uint8Array(colors.length * 3);
  18501. for (i = 0, j = 0, ii = colors.length; i < ii; i++) {
  18502. var c = colors[i];
  18503. colorsPacked[j++] = c[0];
  18504. colorsPacked[j++] = c[1];
  18505. colorsPacked[j++] = c[2];
  18506. }
  18507. mesh.colors = colorsPacked;
  18508. var figures = mesh.figures;
  18509. for (i = 0, ii = figures.length; i < ii; i++) {
  18510. var figure = figures[i], ps = figure.coords, cs = figure.colors;
  18511. for (j = 0, jj = ps.length; j < jj; j++) {
  18512. ps[j] *= 2;
  18513. cs[j] *= 3;
  18514. }
  18515. }
  18516. }
  18517. function Mesh(stream, matrix, xref, res) {
  18518. assert(isStream(stream), 'Mesh data is not a stream');
  18519. var dict = stream.dict;
  18520. this.matrix = matrix;
  18521. this.shadingType = dict.get('ShadingType');
  18522. this.type = 'Pattern';
  18523. this.bbox = dict.get('BBox');
  18524. var cs = dict.get('ColorSpace', 'CS');
  18525. cs = ColorSpace.parse(cs, xref, res);
  18526. this.cs = cs;
  18527. this.background = dict.has('Background') ?
  18528. cs.getRgb(dict.get('Background'), 0) : null;
  18529. var fnObj = dict.get('Function');
  18530. var fn;
  18531. if (!fnObj) {
  18532. fn = null;
  18533. } else if (isArray(fnObj)) {
  18534. var fnArray = [];
  18535. for (var j = 0, jj = fnObj.length; j < jj; j++) {
  18536. var obj = xref.fetchIfRef(fnObj[j]);
  18537. if (!isPDFFunction(obj)) {
  18538. error('Invalid function');
  18539. }
  18540. fnArray.push(PDFFunction.parse(xref, obj));
  18541. }
  18542. fn = function radialAxialColorFunction(arg) {
  18543. var out = [];
  18544. for (var i = 0, ii = fnArray.length; i < ii; i++) {
  18545. out.push(fnArray[i](arg)[0]);
  18546. }
  18547. return out;
  18548. };
  18549. } else {
  18550. if (!isPDFFunction(fnObj)) {
  18551. error('Invalid function');
  18552. }
  18553. fn = PDFFunction.parse(xref, fnObj);
  18554. }
  18555. this.coords = [];
  18556. this.colors = [];
  18557. this.figures = [];
  18558. var decodeContext = {
  18559. bitsPerCoordinate: dict.get('BitsPerCoordinate'),
  18560. bitsPerComponent: dict.get('BitsPerComponent'),
  18561. bitsPerFlag: dict.get('BitsPerFlag'),
  18562. decode: dict.get('Decode'),
  18563. colorFn: fn,
  18564. colorSpace: cs,
  18565. numComps: fn ? 1 : cs.numComps
  18566. };
  18567. var reader = new MeshStreamReader(stream, decodeContext);
  18568. var patchMesh = false;
  18569. switch (this.shadingType) {
  18570. case PatternType.FREE_FORM_MESH:
  18571. decodeType4Shading(this, reader);
  18572. break;
  18573. case PatternType.LATTICE_FORM_MESH:
  18574. var verticesPerRow = dict.get('VerticesPerRow') | 0;
  18575. assert(verticesPerRow >= 2, 'Invalid VerticesPerRow');
  18576. decodeType5Shading(this, reader, verticesPerRow);
  18577. break;
  18578. case PatternType.COONS_PATCH_MESH:
  18579. decodeType6Shading(this, reader);
  18580. patchMesh = true;
  18581. break;
  18582. case PatternType.TENSOR_PATCH_MESH:
  18583. decodeType7Shading(this, reader);
  18584. patchMesh = true;
  18585. break;
  18586. default:
  18587. error('Unsupported mesh type.');
  18588. break;
  18589. }
  18590. if (patchMesh) {
  18591. // dirty bounds calculation for determining, how dense shall be triangles
  18592. updateBounds(this);
  18593. for (var i = 0, ii = this.figures.length; i < ii; i++) {
  18594. buildFigureFromPatch(this, i);
  18595. }
  18596. }
  18597. // calculate bounds
  18598. updateBounds(this);
  18599. packData(this);
  18600. }
  18601. Mesh.prototype = {
  18602. getIR: function Mesh_getIR() {
  18603. return ['Mesh', this.shadingType, this.coords, this.colors, this.figures,
  18604. this.bounds, this.matrix, this.bbox, this.background];
  18605. }
  18606. };
  18607. return Mesh;
  18608. })();
  18609. Shadings.Dummy = (function DummyClosure() {
  18610. function Dummy() {
  18611. this.type = 'Pattern';
  18612. }
  18613. Dummy.prototype = {
  18614. getIR: function Dummy_getIR() {
  18615. return ['Dummy'];
  18616. }
  18617. };
  18618. return Dummy;
  18619. })();
  18620. function getTilingPatternIR(operatorList, dict, args) {
  18621. var matrix = dict.get('Matrix');
  18622. var bbox = dict.get('BBox');
  18623. var xstep = dict.get('XStep');
  18624. var ystep = dict.get('YStep');
  18625. var paintType = dict.get('PaintType');
  18626. var tilingType = dict.get('TilingType');
  18627. return [
  18628. 'TilingPattern', args, operatorList, matrix, bbox, xstep, ystep,
  18629. paintType, tilingType
  18630. ];
  18631. }
  18632. var PartialEvaluator = (function PartialEvaluatorClosure() {
  18633. function PartialEvaluator(pdfManager, xref, handler, pageIndex,
  18634. uniquePrefix, idCounters, fontCache) {
  18635. this.pdfManager = pdfManager;
  18636. this.xref = xref;
  18637. this.handler = handler;
  18638. this.pageIndex = pageIndex;
  18639. this.uniquePrefix = uniquePrefix;
  18640. this.idCounters = idCounters;
  18641. this.fontCache = fontCache;
  18642. }
  18643. // Trying to minimize Date.now() usage and check every 100 time
  18644. var TIME_SLOT_DURATION_MS = 20;
  18645. var CHECK_TIME_EVERY = 100;
  18646. function TimeSlotManager() {
  18647. this.reset();
  18648. }
  18649. TimeSlotManager.prototype = {
  18650. check: function TimeSlotManager_check() {
  18651. if (++this.checked < CHECK_TIME_EVERY) {
  18652. return false;
  18653. }
  18654. this.checked = 0;
  18655. return this.endTime <= Date.now();
  18656. },
  18657. reset: function TimeSlotManager_reset() {
  18658. this.endTime = Date.now() + TIME_SLOT_DURATION_MS;
  18659. this.checked = 0;
  18660. }
  18661. };
  18662. var deferred = Promise.resolve();
  18663. var TILING_PATTERN = 1, SHADING_PATTERN = 2;
  18664. PartialEvaluator.prototype = {
  18665. hasBlendModes: function PartialEvaluator_hasBlendModes(resources) {
  18666. if (!isDict(resources)) {
  18667. return false;
  18668. }
  18669. var processed = Object.create(null);
  18670. if (resources.objId) {
  18671. processed[resources.objId] = true;
  18672. }
  18673. var nodes = [resources];
  18674. while (nodes.length) {
  18675. var key;
  18676. var node = nodes.shift();
  18677. // First check the current resources for blend modes.
  18678. var graphicStates = node.get('ExtGState');
  18679. if (isDict(graphicStates)) {
  18680. graphicStates = graphicStates.getAll();
  18681. for (key in graphicStates) {
  18682. var graphicState = graphicStates[key];
  18683. var bm = graphicState['BM'];
  18684. if (isName(bm) && bm.name !== 'Normal') {
  18685. return true;
  18686. }
  18687. }
  18688. }
  18689. // Descend into the XObjects to look for more resources and blend modes.
  18690. var xObjects = node.get('XObject');
  18691. if (!isDict(xObjects)) {
  18692. continue;
  18693. }
  18694. xObjects = xObjects.getAll();
  18695. for (key in xObjects) {
  18696. var xObject = xObjects[key];
  18697. if (!isStream(xObject)) {
  18698. continue;
  18699. }
  18700. var xResources = xObject.dict.get('Resources');
  18701. // Checking objId to detect an infinite loop.
  18702. if (isDict(xResources) &&
  18703. (!xResources.objId || !processed[xResources.objId])) {
  18704. nodes.push(xResources);
  18705. if (xResources.objId) {
  18706. processed[xResources.objId] = true;
  18707. }
  18708. }
  18709. }
  18710. }
  18711. return false;
  18712. },
  18713. buildFormXObject: function PartialEvaluator_buildFormXObject(resources,
  18714. xobj, smask,
  18715. operatorList,
  18716. initialState) {
  18717. var matrix = xobj.dict.get('Matrix');
  18718. var bbox = xobj.dict.get('BBox');
  18719. var group = xobj.dict.get('Group');
  18720. if (group) {
  18721. var groupOptions = {
  18722. matrix: matrix,
  18723. bbox: bbox,
  18724. smask: smask,
  18725. isolated: false,
  18726. knockout: false
  18727. };
  18728. var groupSubtype = group.get('S');
  18729. var colorSpace;
  18730. if (isName(groupSubtype) && groupSubtype.name === 'Transparency') {
  18731. groupOptions.isolated = (group.get('I') || false);
  18732. groupOptions.knockout = (group.get('K') || false);
  18733. colorSpace = (group.has('CS') ?
  18734. ColorSpace.parse(group.get('CS'), this.xref, resources) : null);
  18735. }
  18736. if (smask && smask.backdrop) {
  18737. colorSpace = colorSpace || ColorSpace.singletons.rgb;
  18738. smask.backdrop = colorSpace.getRgb(smask.backdrop, 0);
  18739. }
  18740. operatorList.addOp(OPS.beginGroup, [groupOptions]);
  18741. }
  18742. operatorList.addOp(OPS.paintFormXObjectBegin, [matrix, bbox]);
  18743. return this.getOperatorList(xobj,
  18744. (xobj.dict.get('Resources') || resources), operatorList, initialState).
  18745. then(function () {
  18746. operatorList.addOp(OPS.paintFormXObjectEnd, []);
  18747. if (group) {
  18748. operatorList.addOp(OPS.endGroup, [groupOptions]);
  18749. }
  18750. });
  18751. },
  18752. buildPaintImageXObject:
  18753. function PartialEvaluator_buildPaintImageXObject(resources, image,
  18754. inline, operatorList,
  18755. cacheKey, cache) {
  18756. var self = this;
  18757. var dict = image.dict;
  18758. var w = dict.get('Width', 'W');
  18759. var h = dict.get('Height', 'H');
  18760. if (!(w && isNum(w)) || !(h && isNum(h))) {
  18761. warn('Image dimensions are missing, or not numbers.');
  18762. return;
  18763. }
  18764. if (PDFJS.maxImageSize !== -1 && w * h > PDFJS.maxImageSize) {
  18765. warn('Image exceeded maximum allowed size and was removed.');
  18766. return;
  18767. }
  18768. var imageMask = (dict.get('ImageMask', 'IM') || false);
  18769. var imgData, args;
  18770. if (imageMask) {
  18771. // This depends on a tmpCanvas being filled with the
  18772. // current fillStyle, such that processing the pixel
  18773. // data can't be done here. Instead of creating a
  18774. // complete PDFImage, only read the information needed
  18775. // for later.
  18776. var width = dict.get('Width', 'W');
  18777. var height = dict.get('Height', 'H');
  18778. var bitStrideLength = (width + 7) >> 3;
  18779. var imgArray = image.getBytes(bitStrideLength * height);
  18780. var decode = dict.get('Decode', 'D');
  18781. var canTransfer = image instanceof DecodeStream;
  18782. var inverseDecode = (!!decode && decode[0] > 0);
  18783. imgData = PDFImage.createMask(imgArray, width, height,
  18784. canTransfer, inverseDecode);
  18785. imgData.cached = true;
  18786. args = [imgData];
  18787. operatorList.addOp(OPS.paintImageMaskXObject, args);
  18788. if (cacheKey) {
  18789. cache.key = cacheKey;
  18790. cache.fn = OPS.paintImageMaskXObject;
  18791. cache.args = args;
  18792. }
  18793. return;
  18794. }
  18795. var softMask = (dict.get('SMask', 'SM') || false);
  18796. var mask = (dict.get('Mask') || false);
  18797. var SMALL_IMAGE_DIMENSIONS = 200;
  18798. // Inlining small images into the queue as RGB data
  18799. if (inline && !softMask && !mask && !(image instanceof JpegStream) &&
  18800. (w + h) < SMALL_IMAGE_DIMENSIONS) {
  18801. var imageObj = new PDFImage(this.xref, resources, image,
  18802. inline, null, null);
  18803. // We force the use of RGBA_32BPP images here, because we can't handle
  18804. // any other kind.
  18805. imgData = imageObj.createImageData(/* forceRGBA = */ true);
  18806. operatorList.addOp(OPS.paintInlineImageXObject, [imgData]);
  18807. return;
  18808. }
  18809. // If there is no imageMask, create the PDFImage and a lot
  18810. // of image processing can be done here.
  18811. var uniquePrefix = (this.uniquePrefix || '');
  18812. var objId = 'img_' + uniquePrefix + (++this.idCounters.obj);
  18813. operatorList.addDependency(objId);
  18814. args = [objId, w, h];
  18815. if (!softMask && !mask && image instanceof JpegStream &&
  18816. image.isNativelySupported(this.xref, resources)) {
  18817. // These JPEGs don't need any more processing so we can just send it.
  18818. operatorList.addOp(OPS.paintJpegXObject, args);
  18819. this.handler.send('obj',
  18820. [objId, this.pageIndex, 'JpegStream', image.getIR()]);
  18821. return;
  18822. }
  18823. PDFImage.buildImage(self.handler, self.xref, resources, image, inline).
  18824. then(function(imageObj) {
  18825. var imgData = imageObj.createImageData(/* forceRGBA = */ false);
  18826. self.handler.send('obj', [objId, self.pageIndex, 'Image', imgData],
  18827. [imgData.data.buffer]);
  18828. }).then(null, function (reason) {
  18829. warn('Unable to decode image: ' + reason);
  18830. self.handler.send('obj', [objId, self.pageIndex, 'Image', null]);
  18831. });
  18832. operatorList.addOp(OPS.paintImageXObject, args);
  18833. if (cacheKey) {
  18834. cache.key = cacheKey;
  18835. cache.fn = OPS.paintImageXObject;
  18836. cache.args = args;
  18837. }
  18838. },
  18839. handleSMask: function PartialEvaluator_handleSmask(smask, resources,
  18840. operatorList,
  18841. stateManager) {
  18842. var smaskContent = smask.get('G');
  18843. var smaskOptions = {
  18844. subtype: smask.get('S').name,
  18845. backdrop: smask.get('BC')
  18846. };
  18847. return this.buildFormXObject(resources, smaskContent, smaskOptions,
  18848. operatorList, stateManager.state.clone());
  18849. },
  18850. handleTilingType:
  18851. function PartialEvaluator_handleTilingType(fn, args, resources,
  18852. pattern, patternDict,
  18853. operatorList) {
  18854. // Create an IR of the pattern code.
  18855. var tilingOpList = new OperatorList();
  18856. return this.getOperatorList(pattern,
  18857. (patternDict.get('Resources') || resources), tilingOpList).
  18858. then(function () {
  18859. // Add the dependencies to the parent operator list so they are
  18860. // resolved before sub operator list is executed synchronously.
  18861. operatorList.addDependencies(tilingOpList.dependencies);
  18862. operatorList.addOp(fn, getTilingPatternIR({
  18863. fnArray: tilingOpList.fnArray,
  18864. argsArray: tilingOpList.argsArray
  18865. }, patternDict, args));
  18866. });
  18867. },
  18868. handleSetFont:
  18869. function PartialEvaluator_handleSetFont(resources, fontArgs, fontRef,
  18870. operatorList, state) {
  18871. // TODO(mack): Not needed?
  18872. var fontName;
  18873. if (fontArgs) {
  18874. fontArgs = fontArgs.slice();
  18875. fontName = fontArgs[0].name;
  18876. }
  18877. var self = this;
  18878. return this.loadFont(fontName, fontRef, this.xref, resources).then(
  18879. function (translated) {
  18880. if (!translated.font.isType3Font) {
  18881. return translated;
  18882. }
  18883. return translated.loadType3Data(self, resources, operatorList).then(
  18884. function () {
  18885. return translated;
  18886. });
  18887. }).then(function (translated) {
  18888. state.font = translated.font;
  18889. translated.send(self.handler);
  18890. return translated.loadedName;
  18891. });
  18892. },
  18893. handleText: function PartialEvaluator_handleText(chars, state) {
  18894. var font = state.font;
  18895. var glyphs = font.charsToGlyphs(chars);
  18896. var isAddToPathSet = !!(state.textRenderingMode &
  18897. TextRenderingMode.ADD_TO_PATH_FLAG);
  18898. if (font.data && (isAddToPathSet || PDFJS.disableFontFace)) {
  18899. var buildPath = function (fontChar) {
  18900. if (!font.renderer.hasBuiltPath(fontChar)) {
  18901. var path = font.renderer.getPathJs(fontChar);
  18902. this.handler.send('commonobj', [
  18903. font.loadedName + '_path_' + fontChar,
  18904. 'FontPath',
  18905. path
  18906. ]);
  18907. }
  18908. }.bind(this);
  18909. for (var i = 0, ii = glyphs.length; i < ii; i++) {
  18910. var glyph = glyphs[i];
  18911. if (glyph === null) {
  18912. continue;
  18913. }
  18914. buildPath(glyph.fontChar);
  18915. // If the glyph has an accent we need to build a path for its
  18916. // fontChar too, otherwise CanvasGraphics_paintChar will fail.
  18917. var accent = glyph.accent;
  18918. if (accent && accent.fontChar) {
  18919. buildPath(accent.fontChar);
  18920. }
  18921. }
  18922. }
  18923. return glyphs;
  18924. },
  18925. setGState: function PartialEvaluator_setGState(resources, gState,
  18926. operatorList, xref,
  18927. stateManager) {
  18928. // TODO(mack): This should be rewritten so that this function returns
  18929. // what should be added to the queue during each iteration
  18930. function setGStateForKey(gStateObj, key, value) {
  18931. switch (key) {
  18932. case 'Type':
  18933. break;
  18934. case 'LW':
  18935. case 'LC':
  18936. case 'LJ':
  18937. case 'ML':
  18938. case 'D':
  18939. case 'RI':
  18940. case 'FL':
  18941. case 'CA':
  18942. case 'ca':
  18943. gStateObj.push([key, value]);
  18944. break;
  18945. case 'Font':
  18946. promise = promise.then(function () {
  18947. return self.handleSetFont(resources, null, value[0],
  18948. operatorList, stateManager.state).
  18949. then(function (loadedName) {
  18950. operatorList.addDependency(loadedName);
  18951. gStateObj.push([key, [loadedName, value[1]]]);
  18952. });
  18953. });
  18954. break;
  18955. case 'BM':
  18956. gStateObj.push([key, value]);
  18957. break;
  18958. case 'SMask':
  18959. if (isName(value) && value.name === 'None') {
  18960. gStateObj.push([key, false]);
  18961. break;
  18962. }
  18963. var dict = xref.fetchIfRef(value);
  18964. if (isDict(dict)) {
  18965. promise = promise.then(function () {
  18966. return self.handleSMask(dict, resources, operatorList,
  18967. stateManager);
  18968. });
  18969. gStateObj.push([key, true]);
  18970. } else {
  18971. warn('Unsupported SMask type');
  18972. }
  18973. break;
  18974. // Only generate info log messages for the following since
  18975. // they are unlikey to have a big impact on the rendering.
  18976. case 'OP':
  18977. case 'op':
  18978. case 'OPM':
  18979. case 'BG':
  18980. case 'BG2':
  18981. case 'UCR':
  18982. case 'UCR2':
  18983. case 'TR':
  18984. case 'TR2':
  18985. case 'HT':
  18986. case 'SM':
  18987. case 'SA':
  18988. case 'AIS':
  18989. case 'TK':
  18990. // TODO implement these operators.
  18991. info('graphic state operator ' + key);
  18992. break;
  18993. default:
  18994. info('Unknown graphic state operator ' + key);
  18995. break;
  18996. }
  18997. }
  18998. // This array holds the converted/processed state data.
  18999. var gStateObj = [];
  19000. var gStateMap = gState.map;
  19001. var self = this;
  19002. var promise = Promise.resolve();
  19003. for (var key in gStateMap) {
  19004. var value = gStateMap[key];
  19005. setGStateForKey(gStateObj, key, value);
  19006. }
  19007. return promise.then(function () {
  19008. operatorList.addOp(OPS.setGState, [gStateObj]);
  19009. });
  19010. },
  19011. loadFont: function PartialEvaluator_loadFont(fontName, font, xref,
  19012. resources) {
  19013. function errorFont() {
  19014. return Promise.resolve(new TranslatedFont('g_font_error',
  19015. new ErrorFont('Font ' + fontName + ' is not available'), font));
  19016. }
  19017. var fontRef;
  19018. if (font) { // Loading by ref.
  19019. assert(isRef(font));
  19020. fontRef = font;
  19021. } else { // Loading by name.
  19022. var fontRes = resources.get('Font');
  19023. if (fontRes) {
  19024. fontRef = fontRes.getRaw(fontName);
  19025. } else {
  19026. warn('fontRes not available');
  19027. return errorFont();
  19028. }
  19029. }
  19030. if (this.fontCache.has(fontRef)) {
  19031. return this.fontCache.get(fontRef);
  19032. }
  19033. font = xref.fetchIfRef(fontRef);
  19034. if (!isDict(font)) {
  19035. return errorFont();
  19036. }
  19037. // We are holding font.translated references just for fontRef that are not
  19038. // dictionaries (Dict). See explanation below.
  19039. if (font.translated) {
  19040. return font.translated;
  19041. }
  19042. var fontCapability = createPromiseCapability();
  19043. var preEvaluatedFont = this.preEvaluateFont(font, xref);
  19044. var descriptor = preEvaluatedFont.descriptor;
  19045. var fontID = fontRef.num + '_' + fontRef.gen;
  19046. if (isDict(descriptor)) {
  19047. if (!descriptor.fontAliases) {
  19048. descriptor.fontAliases = Object.create(null);
  19049. }
  19050. var fontAliases = descriptor.fontAliases;
  19051. var hash = preEvaluatedFont.hash;
  19052. if (fontAliases[hash]) {
  19053. var aliasFontRef = fontAliases[hash].aliasRef;
  19054. if (aliasFontRef && this.fontCache.has(aliasFontRef)) {
  19055. this.fontCache.putAlias(fontRef, aliasFontRef);
  19056. return this.fontCache.get(fontRef);
  19057. }
  19058. }
  19059. if (!fontAliases[hash]) {
  19060. fontAliases[hash] = {
  19061. fontID: Font.getFontID()
  19062. };
  19063. }
  19064. fontAliases[hash].aliasRef = fontRef;
  19065. fontID = fontAliases[hash].fontID;
  19066. }
  19067. // Workaround for bad PDF generators that don't reference fonts
  19068. // properly, i.e. by not using an object identifier.
  19069. // Check if the fontRef is a Dict (as opposed to a standard object),
  19070. // in which case we don't cache the font and instead reference it by
  19071. // fontName in font.loadedName below.
  19072. var fontRefIsDict = isDict(fontRef);
  19073. if (!fontRefIsDict) {
  19074. this.fontCache.put(fontRef, fontCapability.promise);
  19075. }
  19076. // Keep track of each font we translated so the caller can
  19077. // load them asynchronously before calling display on a page.
  19078. font.loadedName = 'g_font_' + (fontRefIsDict ?
  19079. fontName.replace(/\W/g, '') : fontID);
  19080. font.translated = fontCapability.promise;
  19081. // TODO move promises into translate font
  19082. var translatedPromise;
  19083. try {
  19084. translatedPromise = Promise.resolve(
  19085. this.translateFont(preEvaluatedFont, xref));
  19086. } catch (e) {
  19087. translatedPromise = Promise.reject(e);
  19088. }
  19089. translatedPromise.then(function (translatedFont) {
  19090. fontCapability.resolve(new TranslatedFont(font.loadedName,
  19091. translatedFont, font));
  19092. }, function (reason) {
  19093. // TODO fontCapability.reject?
  19094. UnsupportedManager.notify(UNSUPPORTED_FEATURES.font);
  19095. fontCapability.resolve(new TranslatedFont(font.loadedName,
  19096. new ErrorFont(reason instanceof Error ? reason.message : reason),
  19097. font));
  19098. });
  19099. return fontCapability.promise;
  19100. },
  19101. buildPath: function PartialEvaluator_buildPath(operatorList, fn, args) {
  19102. var lastIndex = operatorList.length - 1;
  19103. if (lastIndex < 0 ||
  19104. operatorList.fnArray[lastIndex] !== OPS.constructPath) {
  19105. operatorList.addOp(OPS.constructPath, [[fn], args]);
  19106. } else {
  19107. var opArgs = operatorList.argsArray[lastIndex];
  19108. opArgs[0].push(fn);
  19109. Array.prototype.push.apply(opArgs[1], args);
  19110. }
  19111. },
  19112. handleColorN: function PartialEvaluator_handleColorN(operatorList, fn, args,
  19113. cs, patterns, resources, xref) {
  19114. // compile tiling patterns
  19115. var patternName = args[args.length - 1];
  19116. // SCN/scn applies patterns along with normal colors
  19117. var pattern;
  19118. if (isName(patternName) &&
  19119. (pattern = patterns.get(patternName.name))) {
  19120. var dict = (isStream(pattern) ? pattern.dict : pattern);
  19121. var typeNum = dict.get('PatternType');
  19122. if (typeNum == TILING_PATTERN) {
  19123. var color = cs.base ? cs.base.getRgb(args, 0) : null;
  19124. return this.handleTilingType(fn, color, resources, pattern,
  19125. dict, operatorList);
  19126. } else if (typeNum == SHADING_PATTERN) {
  19127. var shading = dict.get('Shading');
  19128. var matrix = dict.get('Matrix');
  19129. pattern = Pattern.parseShading(shading, matrix, xref, resources);
  19130. operatorList.addOp(fn, pattern.getIR());
  19131. return Promise.resolve();
  19132. } else {
  19133. return Promise.reject('Unknown PatternType: ' + typeNum);
  19134. }
  19135. }
  19136. // TODO shall we fail here?
  19137. operatorList.addOp(fn, args);
  19138. return Promise.resolve();
  19139. },
  19140. getOperatorList: function PartialEvaluator_getOperatorList(stream,
  19141. resources,
  19142. operatorList,
  19143. initialState) {
  19144. var self = this;
  19145. var xref = this.xref;
  19146. var imageCache = {};
  19147. assert(operatorList);
  19148. resources = (resources || Dict.empty);
  19149. var xobjs = (resources.get('XObject') || Dict.empty);
  19150. var patterns = (resources.get('Pattern') || Dict.empty);
  19151. var stateManager = new StateManager(initialState || new EvalState());
  19152. var preprocessor = new EvaluatorPreprocessor(stream, xref, stateManager);
  19153. var timeSlotManager = new TimeSlotManager();
  19154. return new Promise(function next(resolve, reject) {
  19155. timeSlotManager.reset();
  19156. var stop, operation, i, ii, cs;
  19157. while (!(stop = timeSlotManager.check()) &&
  19158. (operation = preprocessor.read())) {
  19159. var args = operation.args;
  19160. var fn = operation.fn;
  19161. switch (fn | 0) {
  19162. case OPS.paintXObject:
  19163. if (args[0].code) {
  19164. break;
  19165. }
  19166. // eagerly compile XForm objects
  19167. var name = args[0].name;
  19168. if (imageCache.key === name) {
  19169. operatorList.addOp(imageCache.fn, imageCache.args);
  19170. args = [];
  19171. continue;
  19172. }
  19173. var xobj = xobjs.get(name);
  19174. if (xobj) {
  19175. assert(isStream(xobj), 'XObject should be a stream');
  19176. var type = xobj.dict.get('Subtype');
  19177. assert(isName(type),
  19178. 'XObject should have a Name subtype');
  19179. if (type.name === 'Form') {
  19180. stateManager.save();
  19181. return self.buildFormXObject(resources, xobj, null,
  19182. operatorList,
  19183. stateManager.state.clone()).
  19184. then(function () {
  19185. stateManager.restore();
  19186. next(resolve, reject);
  19187. }, reject);
  19188. } else if (type.name === 'Image') {
  19189. self.buildPaintImageXObject(resources, xobj, false,
  19190. operatorList, name, imageCache);
  19191. args = [];
  19192. continue;
  19193. } else if (type.name === 'PS') {
  19194. // PostScript XObjects are unused when viewing documents.
  19195. // See section 4.7.1 of Adobe's PDF reference.
  19196. info('Ignored XObject subtype PS');
  19197. continue;
  19198. } else {
  19199. error('Unhandled XObject subtype ' + type.name);
  19200. }
  19201. }
  19202. break;
  19203. case OPS.setFont:
  19204. var fontSize = args[1];
  19205. // eagerly collect all fonts
  19206. return self.handleSetFont(resources, args, null,
  19207. operatorList, stateManager.state).
  19208. then(function (loadedName) {
  19209. operatorList.addDependency(loadedName);
  19210. operatorList.addOp(OPS.setFont, [loadedName, fontSize]);
  19211. next(resolve, reject);
  19212. }, reject);
  19213. case OPS.endInlineImage:
  19214. var cacheKey = args[0].cacheKey;
  19215. if (cacheKey && imageCache.key === cacheKey) {
  19216. operatorList.addOp(imageCache.fn, imageCache.args);
  19217. args = [];
  19218. continue;
  19219. }
  19220. self.buildPaintImageXObject(resources, args[0], true,
  19221. operatorList, cacheKey, imageCache);
  19222. args = [];
  19223. continue;
  19224. case OPS.showText:
  19225. args[0] = self.handleText(args[0], stateManager.state);
  19226. break;
  19227. case OPS.showSpacedText:
  19228. var arr = args[0];
  19229. var combinedGlyphs = [];
  19230. var arrLength = arr.length;
  19231. for (i = 0; i < arrLength; ++i) {
  19232. var arrItem = arr[i];
  19233. if (isString(arrItem)) {
  19234. Array.prototype.push.apply(combinedGlyphs,
  19235. self.handleText(arrItem, stateManager.state));
  19236. } else if (isNum(arrItem)) {
  19237. combinedGlyphs.push(arrItem);
  19238. }
  19239. }
  19240. args[0] = combinedGlyphs;
  19241. fn = OPS.showText;
  19242. break;
  19243. case OPS.nextLineShowText:
  19244. operatorList.addOp(OPS.nextLine);
  19245. args[0] = self.handleText(args[0], stateManager.state);
  19246. fn = OPS.showText;
  19247. break;
  19248. case OPS.nextLineSetSpacingShowText:
  19249. operatorList.addOp(OPS.nextLine);
  19250. operatorList.addOp(OPS.setWordSpacing, [args.shift()]);
  19251. operatorList.addOp(OPS.setCharSpacing, [args.shift()]);
  19252. args[0] = self.handleText(args[0], stateManager.state);
  19253. fn = OPS.showText;
  19254. break;
  19255. case OPS.setTextRenderingMode:
  19256. stateManager.state.textRenderingMode = args[0];
  19257. break;
  19258. case OPS.setFillColorSpace:
  19259. stateManager.state.fillColorSpace =
  19260. ColorSpace.parse(args[0], xref, resources);
  19261. continue;
  19262. case OPS.setStrokeColorSpace:
  19263. stateManager.state.strokeColorSpace =
  19264. ColorSpace.parse(args[0], xref, resources);
  19265. continue;
  19266. case OPS.setFillColor:
  19267. cs = stateManager.state.fillColorSpace;
  19268. args = cs.getRgb(args, 0);
  19269. fn = OPS.setFillRGBColor;
  19270. break;
  19271. case OPS.setStrokeColor:
  19272. cs = stateManager.state.strokeColorSpace;
  19273. args = cs.getRgb(args, 0);
  19274. fn = OPS.setStrokeRGBColor;
  19275. break;
  19276. case OPS.setFillGray:
  19277. stateManager.state.fillColorSpace = ColorSpace.singletons.gray;
  19278. args = ColorSpace.singletons.gray.getRgb(args, 0);
  19279. fn = OPS.setFillRGBColor;
  19280. break;
  19281. case OPS.setStrokeGray:
  19282. stateManager.state.strokeColorSpace = ColorSpace.singletons.gray;
  19283. args = ColorSpace.singletons.gray.getRgb(args, 0);
  19284. fn = OPS.setStrokeRGBColor;
  19285. break;
  19286. case OPS.setFillCMYKColor:
  19287. stateManager.state.fillColorSpace = ColorSpace.singletons.cmyk;
  19288. args = ColorSpace.singletons.cmyk.getRgb(args, 0);
  19289. fn = OPS.setFillRGBColor;
  19290. break;
  19291. case OPS.setStrokeCMYKColor:
  19292. stateManager.state.strokeColorSpace = ColorSpace.singletons.cmyk;
  19293. args = ColorSpace.singletons.cmyk.getRgb(args, 0);
  19294. fn = OPS.setStrokeRGBColor;
  19295. break;
  19296. case OPS.setFillRGBColor:
  19297. stateManager.state.fillColorSpace = ColorSpace.singletons.rgb;
  19298. args = ColorSpace.singletons.rgb.getRgb(args, 0);
  19299. break;
  19300. case OPS.setStrokeRGBColor:
  19301. stateManager.state.strokeColorSpace = ColorSpace.singletons.rgb;
  19302. args = ColorSpace.singletons.rgb.getRgb(args, 0);
  19303. break;
  19304. case OPS.setFillColorN:
  19305. cs = stateManager.state.fillColorSpace;
  19306. if (cs.name === 'Pattern') {
  19307. return self.handleColorN(operatorList, OPS.setFillColorN,
  19308. args, cs, patterns, resources, xref).then(function() {
  19309. next(resolve, reject);
  19310. }, reject);
  19311. }
  19312. args = cs.getRgb(args, 0);
  19313. fn = OPS.setFillRGBColor;
  19314. break;
  19315. case OPS.setStrokeColorN:
  19316. cs = stateManager.state.strokeColorSpace;
  19317. if (cs.name === 'Pattern') {
  19318. return self.handleColorN(operatorList, OPS.setStrokeColorN,
  19319. args, cs, patterns, resources, xref).then(function() {
  19320. next(resolve, reject);
  19321. }, reject);
  19322. }
  19323. args = cs.getRgb(args, 0);
  19324. fn = OPS.setStrokeRGBColor;
  19325. break;
  19326. case OPS.shadingFill:
  19327. var shadingRes = resources.get('Shading');
  19328. if (!shadingRes) {
  19329. error('No shading resource found');
  19330. }
  19331. var shading = shadingRes.get(args[0].name);
  19332. if (!shading) {
  19333. error('No shading object found');
  19334. }
  19335. var shadingFill = Pattern.parseShading(shading, null, xref,
  19336. resources);
  19337. var patternIR = shadingFill.getIR();
  19338. args = [patternIR];
  19339. fn = OPS.shadingFill;
  19340. break;
  19341. case OPS.setGState:
  19342. var dictName = args[0];
  19343. var extGState = resources.get('ExtGState');
  19344. if (!isDict(extGState) || !extGState.has(dictName.name)) {
  19345. break;
  19346. }
  19347. var gState = extGState.get(dictName.name);
  19348. return self.setGState(resources, gState, operatorList, xref,
  19349. stateManager).then(function() {
  19350. next(resolve, reject);
  19351. }, reject);
  19352. case OPS.moveTo:
  19353. case OPS.lineTo:
  19354. case OPS.curveTo:
  19355. case OPS.curveTo2:
  19356. case OPS.curveTo3:
  19357. case OPS.closePath:
  19358. self.buildPath(operatorList, fn, args);
  19359. continue;
  19360. }
  19361. operatorList.addOp(fn, args);
  19362. }
  19363. if (stop) {
  19364. deferred.then(function () {
  19365. next(resolve, reject);
  19366. });
  19367. return;
  19368. }
  19369. // Some PDFs don't close all restores inside object/form.
  19370. // Closing those for them.
  19371. for (i = 0, ii = preprocessor.savedStatesDepth; i < ii; i++) {
  19372. operatorList.addOp(OPS.restore, []);
  19373. }
  19374. resolve();
  19375. });
  19376. },
  19377. getTextContent: function PartialEvaluator_getTextContent(stream, resources,
  19378. stateManager) {
  19379. stateManager = (stateManager || new StateManager(new TextState()));
  19380. var textContent = {
  19381. items: [],
  19382. styles: Object.create(null)
  19383. };
  19384. var bidiTexts = textContent.items;
  19385. var SPACE_FACTOR = 0.35;
  19386. var MULTI_SPACE_FACTOR = 1.5;
  19387. var self = this;
  19388. var xref = this.xref;
  19389. resources = (xref.fetchIfRef(resources) || Dict.empty);
  19390. // The xobj is parsed iff it's needed, e.g. if there is a `DO` cmd.
  19391. var xobjs = null;
  19392. var xobjsCache = {};
  19393. var preprocessor = new EvaluatorPreprocessor(stream, xref, stateManager);
  19394. var operation;
  19395. var textState;
  19396. function newTextChunk() {
  19397. var font = textState.font;
  19398. if (!(font.loadedName in textContent.styles)) {
  19399. textContent.styles[font.loadedName] = {
  19400. fontFamily: font.fallbackName,
  19401. ascent: font.ascent,
  19402. descent: font.descent,
  19403. vertical: font.vertical
  19404. };
  19405. }
  19406. return {
  19407. str: '',
  19408. dir: null,
  19409. width: 0,
  19410. height: 0,
  19411. transform: null,
  19412. fontName: font.loadedName
  19413. };
  19414. }
  19415. function runBidi(textChunk) {
  19416. var bidiResult = PDFJS.bidi(textChunk.str, -1, textState.font.vertical);
  19417. textChunk.str = bidiResult.str;
  19418. textChunk.dir = bidiResult.dir;
  19419. return textChunk;
  19420. }
  19421. function handleSetFont(fontName, fontRef) {
  19422. return self.loadFont(fontName, fontRef, xref, resources).
  19423. then(function (translated) {
  19424. textState.font = translated.font;
  19425. textState.fontMatrix = translated.font.fontMatrix ||
  19426. FONT_IDENTITY_MATRIX;
  19427. });
  19428. }
  19429. function buildTextGeometry(chars, textChunk) {
  19430. var font = textState.font;
  19431. textChunk = textChunk || newTextChunk();
  19432. if (!textChunk.transform) {
  19433. // 9.4.4 Text Space Details
  19434. var tsm = [textState.fontSize * textState.textHScale, 0,
  19435. 0, textState.fontSize,
  19436. 0, textState.textRise];
  19437. var trm = textChunk.transform = Util.transform(textState.ctm,
  19438. Util.transform(textState.textMatrix, tsm));
  19439. if (!font.vertical) {
  19440. textChunk.height = Math.sqrt(trm[2] * trm[2] + trm[3] * trm[3]);
  19441. } else {
  19442. textChunk.width = Math.sqrt(trm[0] * trm[0] + trm[1] * trm[1]);
  19443. }
  19444. }
  19445. var width = 0;
  19446. var height = 0;
  19447. var glyphs = font.charsToGlyphs(chars);
  19448. var defaultVMetrics = font.defaultVMetrics;
  19449. for (var i = 0; i < glyphs.length; i++) {
  19450. var glyph = glyphs[i];
  19451. if (!glyph) { // Previous glyph was a space.
  19452. width += textState.wordSpacing * textState.textHScale;
  19453. continue;
  19454. }
  19455. var vMetricX = null;
  19456. var vMetricY = null;
  19457. var glyphWidth = null;
  19458. if (font.vertical) {
  19459. if (glyph.vmetric) {
  19460. glyphWidth = glyph.vmetric[0];
  19461. vMetricX = glyph.vmetric[1];
  19462. vMetricY = glyph.vmetric[2];
  19463. } else {
  19464. glyphWidth = glyph.width;
  19465. vMetricX = glyph.width * 0.5;
  19466. vMetricY = defaultVMetrics[2];
  19467. }
  19468. } else {
  19469. glyphWidth = glyph.width;
  19470. }
  19471. var glyphUnicode = glyph.unicode;
  19472. if (glyphUnicode in NormalizedUnicodes) {
  19473. glyphUnicode = NormalizedUnicodes[glyphUnicode];
  19474. }
  19475. glyphUnicode = reverseIfRtl(glyphUnicode);
  19476. // The following will calculate the x and y of the individual glyphs.
  19477. // if (font.vertical) {
  19478. // tsm[4] -= vMetricX * Math.abs(textState.fontSize) *
  19479. // textState.fontMatrix[0];
  19480. // tsm[5] -= vMetricY * textState.fontSize *
  19481. // textState.fontMatrix[0];
  19482. // }
  19483. // var trm = Util.transform(textState.textMatrix, tsm);
  19484. // var pt = Util.applyTransform([trm[4], trm[5]], textState.ctm);
  19485. // var x = pt[0];
  19486. // var y = pt[1];
  19487. var tx = 0;
  19488. var ty = 0;
  19489. if (!font.vertical) {
  19490. var w0 = glyphWidth * textState.fontMatrix[0];
  19491. tx = (w0 * textState.fontSize + textState.charSpacing) *
  19492. textState.textHScale;
  19493. width += tx;
  19494. } else {
  19495. var w1 = glyphWidth * textState.fontMatrix[0];
  19496. ty = w1 * textState.fontSize + textState.charSpacing;
  19497. height += ty;
  19498. }
  19499. textState.translateTextMatrix(tx, ty);
  19500. textChunk.str += glyphUnicode;
  19501. }
  19502. var a = textState.textLineMatrix[0];
  19503. var b = textState.textLineMatrix[1];
  19504. var scaleLineX = Math.sqrt(a * a + b * b);
  19505. a = textState.ctm[0];
  19506. b = textState.ctm[1];
  19507. var scaleCtmX = Math.sqrt(a * a + b * b);
  19508. if (!font.vertical) {
  19509. textChunk.width += width * scaleCtmX * scaleLineX;
  19510. } else {
  19511. textChunk.height += Math.abs(height * scaleCtmX * scaleLineX);
  19512. }
  19513. return textChunk;
  19514. }
  19515. var timeSlotManager = new TimeSlotManager();
  19516. return new Promise(function next(resolve, reject) {
  19517. timeSlotManager.reset();
  19518. var stop;
  19519. while (!(stop = timeSlotManager.check()) &&
  19520. (operation = preprocessor.read())) {
  19521. textState = stateManager.state;
  19522. var fn = operation.fn;
  19523. var args = operation.args;
  19524. switch (fn | 0) {
  19525. case OPS.setFont:
  19526. textState.fontSize = args[1];
  19527. return handleSetFont(args[0].name).then(function() {
  19528. next(resolve, reject);
  19529. }, reject);
  19530. case OPS.setTextRise:
  19531. textState.textRise = args[0];
  19532. break;
  19533. case OPS.setHScale:
  19534. textState.textHScale = args[0] / 100;
  19535. break;
  19536. case OPS.setLeading:
  19537. textState.leading = args[0];
  19538. break;
  19539. case OPS.moveText:
  19540. textState.translateTextLineMatrix(args[0], args[1]);
  19541. textState.textMatrix = textState.textLineMatrix.slice();
  19542. break;
  19543. case OPS.setLeadingMoveText:
  19544. textState.leading = -args[1];
  19545. textState.translateTextLineMatrix(args[0], args[1]);
  19546. textState.textMatrix = textState.textLineMatrix.slice();
  19547. break;
  19548. case OPS.nextLine:
  19549. textState.carriageReturn();
  19550. break;
  19551. case OPS.setTextMatrix:
  19552. textState.setTextMatrix(args[0], args[1], args[2], args[3],
  19553. args[4], args[5]);
  19554. textState.setTextLineMatrix(args[0], args[1], args[2], args[3],
  19555. args[4], args[5]);
  19556. break;
  19557. case OPS.setCharSpacing:
  19558. textState.charSpacing = args[0];
  19559. break;
  19560. case OPS.setWordSpacing:
  19561. textState.wordSpacing = args[0];
  19562. break;
  19563. case OPS.beginText:
  19564. textState.textMatrix = IDENTITY_MATRIX.slice();
  19565. textState.textLineMatrix = IDENTITY_MATRIX.slice();
  19566. break;
  19567. case OPS.showSpacedText:
  19568. var items = args[0];
  19569. var textChunk = newTextChunk();
  19570. var offset;
  19571. for (var j = 0, jj = items.length; j < jj; j++) {
  19572. if (typeof items[j] === 'string') {
  19573. buildTextGeometry(items[j], textChunk);
  19574. } else {
  19575. var val = items[j] / 1000;
  19576. if (!textState.font.vertical) {
  19577. offset = -val * textState.fontSize * textState.textHScale *
  19578. textState.textMatrix[0];
  19579. textState.translateTextMatrix(offset, 0);
  19580. textChunk.width += offset;
  19581. } else {
  19582. offset = -val * textState.fontSize *
  19583. textState.textMatrix[3];
  19584. textState.translateTextMatrix(0, offset);
  19585. textChunk.height += offset;
  19586. }
  19587. if (items[j] < 0 && textState.font.spaceWidth > 0) {
  19588. var fakeSpaces = -items[j] / textState.font.spaceWidth;
  19589. if (fakeSpaces > MULTI_SPACE_FACTOR) {
  19590. fakeSpaces = Math.round(fakeSpaces);
  19591. while (fakeSpaces--) {
  19592. textChunk.str += ' ';
  19593. }
  19594. } else if (fakeSpaces > SPACE_FACTOR) {
  19595. textChunk.str += ' ';
  19596. }
  19597. }
  19598. }
  19599. }
  19600. bidiTexts.push(runBidi(textChunk));
  19601. break;
  19602. case OPS.showText:
  19603. bidiTexts.push(runBidi(buildTextGeometry(args[0])));
  19604. break;
  19605. case OPS.nextLineShowText:
  19606. textState.carriageReturn();
  19607. bidiTexts.push(runBidi(buildTextGeometry(args[0])));
  19608. break;
  19609. case OPS.nextLineSetSpacingShowText:
  19610. textState.wordSpacing = args[0];
  19611. textState.charSpacing = args[1];
  19612. textState.carriageReturn();
  19613. bidiTexts.push(runBidi(buildTextGeometry(args[2])));
  19614. break;
  19615. case OPS.paintXObject:
  19616. if (args[0].code) {
  19617. break;
  19618. }
  19619. if (!xobjs) {
  19620. xobjs = (resources.get('XObject') || Dict.empty);
  19621. }
  19622. var name = args[0].name;
  19623. if (xobjsCache.key === name) {
  19624. if (xobjsCache.texts) {
  19625. Util.concatenateToArray(bidiTexts, xobjsCache.texts.items);
  19626. Util.extendObj(textContent.styles, xobjsCache.texts.styles);
  19627. }
  19628. break;
  19629. }
  19630. var xobj = xobjs.get(name);
  19631. if (!xobj) {
  19632. break;
  19633. }
  19634. assert(isStream(xobj), 'XObject should be a stream');
  19635. var type = xobj.dict.get('Subtype');
  19636. assert(isName(type),
  19637. 'XObject should have a Name subtype');
  19638. if ('Form' !== type.name) {
  19639. xobjsCache.key = name;
  19640. xobjsCache.texts = null;
  19641. break;
  19642. }
  19643. stateManager.save();
  19644. var matrix = xobj.dict.get('Matrix');
  19645. if (isArray(matrix) && matrix.length === 6) {
  19646. stateManager.transform(matrix);
  19647. }
  19648. return self.getTextContent(xobj,
  19649. xobj.dict.get('Resources') || resources, stateManager).
  19650. then(function (formTextContent) {
  19651. Util.concatenateToArray(bidiTexts, formTextContent.items);
  19652. Util.extendObj(textContent.styles, formTextContent.styles);
  19653. stateManager.restore();
  19654. xobjsCache.key = name;
  19655. xobjsCache.texts = formTextContent;
  19656. next(resolve, reject);
  19657. }, reject);
  19658. case OPS.setGState:
  19659. var dictName = args[0];
  19660. var extGState = resources.get('ExtGState');
  19661. if (!isDict(extGState) || !extGState.has(dictName.name)) {
  19662. break;
  19663. }
  19664. var gsStateMap = extGState.get(dictName.name);
  19665. var gsStateFont = null;
  19666. for (var key in gsStateMap) {
  19667. if (key === 'Font') {
  19668. assert(!gsStateFont);
  19669. gsStateFont = gsStateMap[key];
  19670. }
  19671. }
  19672. if (gsStateFont) {
  19673. textState.fontSize = gsStateFont[1];
  19674. return handleSetFont(gsStateFont[0]).then(function() {
  19675. next(resolve, reject);
  19676. }, reject);
  19677. }
  19678. break;
  19679. } // switch
  19680. } // while
  19681. if (stop) {
  19682. deferred.then(function () {
  19683. next(resolve, reject);
  19684. });
  19685. return;
  19686. }
  19687. resolve(textContent);
  19688. });
  19689. },
  19690. extractDataStructures: function
  19691. partialEvaluatorExtractDataStructures(dict, baseDict,
  19692. xref, properties) {
  19693. // 9.10.2
  19694. var toUnicode = (dict.get('ToUnicode') || baseDict.get('ToUnicode'));
  19695. if (toUnicode) {
  19696. properties.toUnicode = this.readToUnicode(toUnicode, xref, properties);
  19697. }
  19698. if (properties.composite) {
  19699. // CIDSystemInfo helps to match CID to glyphs
  19700. var cidSystemInfo = dict.get('CIDSystemInfo');
  19701. if (isDict(cidSystemInfo)) {
  19702. properties.cidSystemInfo = {
  19703. registry: cidSystemInfo.get('Registry'),
  19704. ordering: cidSystemInfo.get('Ordering'),
  19705. supplement: cidSystemInfo.get('Supplement')
  19706. };
  19707. }
  19708. var cidToGidMap = dict.get('CIDToGIDMap');
  19709. if (isStream(cidToGidMap)) {
  19710. properties.cidToGidMap = this.readCidToGidMap(cidToGidMap);
  19711. }
  19712. }
  19713. // Based on 9.6.6 of the spec the encoding can come from multiple places
  19714. // and depends on the font type. The base encoding and differences are
  19715. // read here, but the encoding that is actually used is chosen during
  19716. // glyph mapping in the font.
  19717. // TODO: Loading the built in encoding in the font would allow the
  19718. // differences to be merged in here not require us to hold on to it.
  19719. var differences = [];
  19720. var baseEncodingName = null;
  19721. var encoding;
  19722. if (dict.has('Encoding')) {
  19723. encoding = dict.get('Encoding');
  19724. if (isDict(encoding)) {
  19725. baseEncodingName = encoding.get('BaseEncoding');
  19726. baseEncodingName = (isName(baseEncodingName) ?
  19727. baseEncodingName.name : null);
  19728. // Load the differences between the base and original
  19729. if (encoding.has('Differences')) {
  19730. var diffEncoding = encoding.get('Differences');
  19731. var index = 0;
  19732. for (var j = 0, jj = diffEncoding.length; j < jj; j++) {
  19733. var data = diffEncoding[j];
  19734. if (isNum(data)) {
  19735. index = data;
  19736. } else {
  19737. differences[index++] = data.name;
  19738. }
  19739. }
  19740. }
  19741. } else if (isName(encoding)) {
  19742. baseEncodingName = encoding.name;
  19743. } else {
  19744. error('Encoding is not a Name nor a Dict');
  19745. }
  19746. // According to table 114 if the encoding is a named encoding it must be
  19747. // one of these predefined encodings.
  19748. if ((baseEncodingName !== 'MacRomanEncoding' &&
  19749. baseEncodingName !== 'MacExpertEncoding' &&
  19750. baseEncodingName !== 'WinAnsiEncoding')) {
  19751. baseEncodingName = null;
  19752. }
  19753. }
  19754. if (baseEncodingName) {
  19755. properties.defaultEncoding = Encodings[baseEncodingName].slice();
  19756. } else {
  19757. encoding = (properties.type === 'TrueType' ?
  19758. Encodings.WinAnsiEncoding : Encodings.StandardEncoding);
  19759. // The Symbolic attribute can be misused for regular fonts
  19760. // Heuristic: we have to check if the font is a standard one also
  19761. if (!!(properties.flags & FontFlags.Symbolic)) {
  19762. encoding = (!properties.file && /Symbol/i.test(properties.name) ?
  19763. Encodings.SymbolSetEncoding :
  19764. Encodings.MacRomanEncoding);
  19765. }
  19766. properties.defaultEncoding = encoding;
  19767. }
  19768. properties.differences = differences;
  19769. properties.baseEncodingName = baseEncodingName;
  19770. properties.dict = dict;
  19771. },
  19772. readToUnicode: function PartialEvaluator_readToUnicode(toUnicode) {
  19773. var cmapObj = toUnicode;
  19774. if (isName(cmapObj)) {
  19775. return CMapFactory.create(cmapObj).map;
  19776. } else if (isStream(cmapObj)) {
  19777. var cmap = CMapFactory.create(cmapObj).map;
  19778. // Convert UTF-16BE
  19779. // NOTE: cmap can be a sparse array, so use forEach instead of for(;;)
  19780. // to iterate over all keys.
  19781. cmap.forEach(function(token, i) {
  19782. var str = [];
  19783. for (var k = 0; k < token.length; k += 2) {
  19784. var w1 = (token.charCodeAt(k) << 8) | token.charCodeAt(k + 1);
  19785. if ((w1 & 0xF800) !== 0xD800) { // w1 < 0xD800 || w1 > 0xDFFF
  19786. str.push(w1);
  19787. continue;
  19788. }
  19789. k += 2;
  19790. var w2 = (token.charCodeAt(k) << 8) | token.charCodeAt(k + 1);
  19791. str.push(((w1 & 0x3ff) << 10) + (w2 & 0x3ff) + 0x10000);
  19792. }
  19793. cmap[i] = String.fromCharCode.apply(String, str);
  19794. });
  19795. return cmap;
  19796. }
  19797. return null;
  19798. },
  19799. readCidToGidMap: function PartialEvaluator_readCidToGidMap(cidToGidStream) {
  19800. // Extract the encoding from the CIDToGIDMap
  19801. var glyphsData = cidToGidStream.getBytes();
  19802. // Set encoding 0 to later verify the font has an encoding
  19803. var result = [];
  19804. for (var j = 0, jj = glyphsData.length; j < jj; j++) {
  19805. var glyphID = (glyphsData[j++] << 8) | glyphsData[j];
  19806. if (glyphID === 0) {
  19807. continue;
  19808. }
  19809. var code = j >> 1;
  19810. result[code] = glyphID;
  19811. }
  19812. return result;
  19813. },
  19814. extractWidths: function PartialEvaluator_extractWidths(dict, xref,
  19815. descriptor,
  19816. properties) {
  19817. var glyphsWidths = [];
  19818. var defaultWidth = 0;
  19819. var glyphsVMetrics = [];
  19820. var defaultVMetrics;
  19821. var i, ii, j, jj, start, code, widths;
  19822. if (properties.composite) {
  19823. defaultWidth = dict.get('DW') || 1000;
  19824. widths = dict.get('W');
  19825. if (widths) {
  19826. for (i = 0, ii = widths.length; i < ii; i++) {
  19827. start = widths[i++];
  19828. code = xref.fetchIfRef(widths[i]);
  19829. if (isArray(code)) {
  19830. for (j = 0, jj = code.length; j < jj; j++) {
  19831. glyphsWidths[start++] = code[j];
  19832. }
  19833. } else {
  19834. var width = widths[++i];
  19835. for (j = start; j <= code; j++) {
  19836. glyphsWidths[j] = width;
  19837. }
  19838. }
  19839. }
  19840. }
  19841. if (properties.vertical) {
  19842. var vmetrics = (dict.get('DW2') || [880, -1000]);
  19843. defaultVMetrics = [vmetrics[1], defaultWidth * 0.5, vmetrics[0]];
  19844. vmetrics = dict.get('W2');
  19845. if (vmetrics) {
  19846. for (i = 0, ii = vmetrics.length; i < ii; i++) {
  19847. start = vmetrics[i++];
  19848. code = xref.fetchIfRef(vmetrics[i]);
  19849. if (isArray(code)) {
  19850. for (j = 0, jj = code.length; j < jj; j++) {
  19851. glyphsVMetrics[start++] = [code[j++], code[j++], code[j]];
  19852. }
  19853. } else {
  19854. var vmetric = [vmetrics[++i], vmetrics[++i], vmetrics[++i]];
  19855. for (j = start; j <= code; j++) {
  19856. glyphsVMetrics[j] = vmetric;
  19857. }
  19858. }
  19859. }
  19860. }
  19861. }
  19862. } else {
  19863. var firstChar = properties.firstChar;
  19864. widths = dict.get('Widths');
  19865. if (widths) {
  19866. j = firstChar;
  19867. for (i = 0, ii = widths.length; i < ii; i++) {
  19868. glyphsWidths[j++] = widths[i];
  19869. }
  19870. defaultWidth = (parseFloat(descriptor.get('MissingWidth')) || 0);
  19871. } else {
  19872. // Trying get the BaseFont metrics (see comment above).
  19873. var baseFontName = dict.get('BaseFont');
  19874. if (isName(baseFontName)) {
  19875. var metrics = this.getBaseFontMetrics(baseFontName.name);
  19876. glyphsWidths = this.buildCharCodeToWidth(metrics.widths,
  19877. properties);
  19878. defaultWidth = metrics.defaultWidth;
  19879. }
  19880. }
  19881. }
  19882. // Heuristic: detection of monospace font by checking all non-zero widths
  19883. var isMonospace = true;
  19884. var firstWidth = defaultWidth;
  19885. for (var glyph in glyphsWidths) {
  19886. var glyphWidth = glyphsWidths[glyph];
  19887. if (!glyphWidth) {
  19888. continue;
  19889. }
  19890. if (!firstWidth) {
  19891. firstWidth = glyphWidth;
  19892. continue;
  19893. }
  19894. if (firstWidth != glyphWidth) {
  19895. isMonospace = false;
  19896. break;
  19897. }
  19898. }
  19899. if (isMonospace) {
  19900. properties.flags |= FontFlags.FixedPitch;
  19901. }
  19902. properties.defaultWidth = defaultWidth;
  19903. properties.widths = glyphsWidths;
  19904. properties.defaultVMetrics = defaultVMetrics;
  19905. properties.vmetrics = glyphsVMetrics;
  19906. },
  19907. isSerifFont: function PartialEvaluator_isSerifFont(baseFontName) {
  19908. // Simulating descriptor flags attribute
  19909. var fontNameWoStyle = baseFontName.split('-')[0];
  19910. return (fontNameWoStyle in serifFonts) ||
  19911. (fontNameWoStyle.search(/serif/gi) !== -1);
  19912. },
  19913. getBaseFontMetrics: function PartialEvaluator_getBaseFontMetrics(name) {
  19914. var defaultWidth = 0;
  19915. var widths = [];
  19916. var monospace = false;
  19917. var lookupName = (stdFontMap[name] || name);
  19918. if (!(lookupName in Metrics)) {
  19919. // Use default fonts for looking up font metrics if the passed
  19920. // font is not a base font
  19921. if (this.isSerifFont(name)) {
  19922. lookupName = 'Times-Roman';
  19923. } else {
  19924. lookupName = 'Helvetica';
  19925. }
  19926. }
  19927. var glyphWidths = Metrics[lookupName];
  19928. if (isNum(glyphWidths)) {
  19929. defaultWidth = glyphWidths;
  19930. monospace = true;
  19931. } else {
  19932. widths = glyphWidths;
  19933. }
  19934. return {
  19935. defaultWidth: defaultWidth,
  19936. monospace: monospace,
  19937. widths: widths
  19938. };
  19939. },
  19940. buildCharCodeToWidth:
  19941. function PartialEvaluator_bulildCharCodeToWidth(widthsByGlyphName,
  19942. properties) {
  19943. var widths = Object.create(null);
  19944. var differences = properties.differences;
  19945. var encoding = properties.defaultEncoding;
  19946. for (var charCode = 0; charCode < 256; charCode++) {
  19947. if (charCode in differences &&
  19948. widthsByGlyphName[differences[charCode]]) {
  19949. widths[charCode] = widthsByGlyphName[differences[charCode]];
  19950. continue;
  19951. }
  19952. if (charCode in encoding && widthsByGlyphName[encoding[charCode]]) {
  19953. widths[charCode] = widthsByGlyphName[encoding[charCode]];
  19954. continue;
  19955. }
  19956. }
  19957. return widths;
  19958. },
  19959. preEvaluateFont: function PartialEvaluator_preEvaluateFont(dict, xref) {
  19960. var baseDict = dict;
  19961. var type = dict.get('Subtype');
  19962. assert(isName(type), 'invalid font Subtype');
  19963. var composite = false;
  19964. var uint8array;
  19965. if (type.name == 'Type0') {
  19966. // If font is a composite
  19967. // - get the descendant font
  19968. // - set the type according to the descendant font
  19969. // - get the FontDescriptor from the descendant font
  19970. var df = dict.get('DescendantFonts');
  19971. if (!df) {
  19972. error('Descendant fonts are not specified');
  19973. }
  19974. dict = (isArray(df) ? xref.fetchIfRef(df[0]) : df);
  19975. type = dict.get('Subtype');
  19976. assert(isName(type), 'invalid font Subtype');
  19977. composite = true;
  19978. }
  19979. var descriptor = dict.get('FontDescriptor');
  19980. if (descriptor) {
  19981. var hash = new MurmurHash3_64();
  19982. var encoding = baseDict.getRaw('Encoding');
  19983. if (isName(encoding)) {
  19984. hash.update(encoding.name);
  19985. } else if (isRef(encoding)) {
  19986. hash.update(encoding.num + '_' + encoding.gen);
  19987. }
  19988. var toUnicode = dict.get('ToUnicode') || baseDict.get('ToUnicode');
  19989. if (isStream(toUnicode)) {
  19990. var stream = toUnicode.str || toUnicode;
  19991. uint8array = stream.buffer ?
  19992. new Uint8Array(stream.buffer.buffer, 0, stream.bufferLength) :
  19993. new Uint8Array(stream.bytes.buffer,
  19994. stream.start, stream.end - stream.start);
  19995. hash.update(uint8array);
  19996. } else if (isName(toUnicode)) {
  19997. hash.update(toUnicode.name);
  19998. }
  19999. var widths = dict.get('Widths') || baseDict.get('Widths');
  20000. if (widths) {
  20001. uint8array = new Uint8Array(new Uint32Array(widths).buffer);
  20002. hash.update(uint8array);
  20003. }
  20004. }
  20005. return {
  20006. descriptor: descriptor,
  20007. dict: dict,
  20008. baseDict: baseDict,
  20009. composite: composite,
  20010. hash: hash ? hash.hexdigest() : ''
  20011. };
  20012. },
  20013. translateFont: function PartialEvaluator_translateFont(preEvaluatedFont,
  20014. xref) {
  20015. var baseDict = preEvaluatedFont.baseDict;
  20016. var dict = preEvaluatedFont.dict;
  20017. var composite = preEvaluatedFont.composite;
  20018. var descriptor = preEvaluatedFont.descriptor;
  20019. var type = dict.get('Subtype');
  20020. var maxCharIndex = (composite ? 0xFFFF : 0xFF);
  20021. var properties;
  20022. if (!descriptor) {
  20023. if (type.name == 'Type3') {
  20024. // FontDescriptor is only required for Type3 fonts when the document
  20025. // is a tagged pdf. Create a barbebones one to get by.
  20026. descriptor = new Dict(null);
  20027. descriptor.set('FontName', Name.get(type.name));
  20028. } else {
  20029. // Before PDF 1.5 if the font was one of the base 14 fonts, having a
  20030. // FontDescriptor was not required.
  20031. // This case is here for compatibility.
  20032. var baseFontName = dict.get('BaseFont');
  20033. if (!isName(baseFontName)) {
  20034. error('Base font is not specified');
  20035. }
  20036. // Using base font name as a font name.
  20037. baseFontName = baseFontName.name.replace(/[,_]/g, '-');
  20038. var metrics = this.getBaseFontMetrics(baseFontName);
  20039. // Simulating descriptor flags attribute
  20040. var fontNameWoStyle = baseFontName.split('-')[0];
  20041. var flags =
  20042. (this.isSerifFont(fontNameWoStyle) ? FontFlags.Serif : 0) |
  20043. (metrics.monospace ? FontFlags.FixedPitch : 0) |
  20044. (symbolsFonts[fontNameWoStyle] ? FontFlags.Symbolic :
  20045. FontFlags.Nonsymbolic);
  20046. properties = {
  20047. type: type.name,
  20048. name: baseFontName,
  20049. widths: metrics.widths,
  20050. defaultWidth: metrics.defaultWidth,
  20051. flags: flags,
  20052. firstChar: 0,
  20053. lastChar: maxCharIndex
  20054. };
  20055. this.extractDataStructures(dict, dict, xref, properties);
  20056. properties.widths = this.buildCharCodeToWidth(metrics.widths,
  20057. properties);
  20058. return new Font(baseFontName, null, properties);
  20059. }
  20060. }
  20061. // According to the spec if 'FontDescriptor' is declared, 'FirstChar',
  20062. // 'LastChar' and 'Widths' should exist too, but some PDF encoders seem
  20063. // to ignore this rule when a variant of a standart font is used.
  20064. // TODO Fill the width array depending on which of the base font this is
  20065. // a variant.
  20066. var firstChar = (dict.get('FirstChar') || 0);
  20067. var lastChar = (dict.get('LastChar') || maxCharIndex);
  20068. var fontName = descriptor.get('FontName');
  20069. var baseFont = dict.get('BaseFont');
  20070. // Some bad PDFs have a string as the font name.
  20071. if (isString(fontName)) {
  20072. fontName = Name.get(fontName);
  20073. }
  20074. if (isString(baseFont)) {
  20075. baseFont = Name.get(baseFont);
  20076. }
  20077. if (type.name !== 'Type3') {
  20078. var fontNameStr = fontName && fontName.name;
  20079. var baseFontStr = baseFont && baseFont.name;
  20080. if (fontNameStr !== baseFontStr) {
  20081. info('The FontDescriptor\'s FontName is "' + fontNameStr +
  20082. '" but should be the same as the Font\'s BaseFont "' +
  20083. baseFontStr + '"');
  20084. // Workaround for cases where e.g. fontNameStr = 'Arial' and
  20085. // baseFontStr = 'Arial,Bold' (needed when no font file is embedded).
  20086. if (fontNameStr && baseFontStr &&
  20087. baseFontStr.search(fontNameStr) === 0) {
  20088. fontName = baseFont;
  20089. }
  20090. }
  20091. }
  20092. fontName = (fontName || baseFont);
  20093. assert(isName(fontName), 'invalid font name');
  20094. var fontFile = descriptor.get('FontFile', 'FontFile2', 'FontFile3');
  20095. if (fontFile) {
  20096. if (fontFile.dict) {
  20097. var subtype = fontFile.dict.get('Subtype');
  20098. if (subtype) {
  20099. subtype = subtype.name;
  20100. }
  20101. var length1 = fontFile.dict.get('Length1');
  20102. var length2 = fontFile.dict.get('Length2');
  20103. }
  20104. }
  20105. properties = {
  20106. type: type.name,
  20107. name: fontName.name,
  20108. subtype: subtype,
  20109. file: fontFile,
  20110. length1: length1,
  20111. length2: length2,
  20112. loadedName: baseDict.loadedName,
  20113. composite: composite,
  20114. wideChars: composite,
  20115. fixedPitch: false,
  20116. fontMatrix: (dict.get('FontMatrix') || FONT_IDENTITY_MATRIX),
  20117. firstChar: firstChar || 0,
  20118. lastChar: (lastChar || maxCharIndex),
  20119. bbox: descriptor.get('FontBBox'),
  20120. ascent: descriptor.get('Ascent'),
  20121. descent: descriptor.get('Descent'),
  20122. xHeight: descriptor.get('XHeight'),
  20123. capHeight: descriptor.get('CapHeight'),
  20124. flags: descriptor.get('Flags'),
  20125. italicAngle: descriptor.get('ItalicAngle'),
  20126. coded: false
  20127. };
  20128. if (composite) {
  20129. var cidEncoding = baseDict.get('Encoding');
  20130. if (isName(cidEncoding)) {
  20131. properties.cidEncoding = cidEncoding.name;
  20132. }
  20133. properties.cMap = CMapFactory.create(cidEncoding,
  20134. { url: PDFJS.cMapUrl, packed: PDFJS.cMapPacked }, null);
  20135. properties.vertical = properties.cMap.vertical;
  20136. }
  20137. this.extractDataStructures(dict, baseDict, xref, properties);
  20138. this.extractWidths(dict, xref, descriptor, properties);
  20139. if (type.name === 'Type3') {
  20140. properties.isType3Font = true;
  20141. }
  20142. return new Font(fontName.name, fontFile, properties);
  20143. }
  20144. };
  20145. return PartialEvaluator;
  20146. })();
  20147. var TranslatedFont = (function TranslatedFontClosure() {
  20148. function TranslatedFont(loadedName, font, dict) {
  20149. this.loadedName = loadedName;
  20150. this.font = font;
  20151. this.dict = dict;
  20152. this.type3Loaded = null;
  20153. this.sent = false;
  20154. }
  20155. TranslatedFont.prototype = {
  20156. send: function (handler) {
  20157. if (this.sent) {
  20158. return;
  20159. }
  20160. var fontData = this.font.exportData();
  20161. handler.send('commonobj', [
  20162. this.loadedName,
  20163. 'Font',
  20164. fontData
  20165. ]);
  20166. this.sent = true;
  20167. },
  20168. loadType3Data: function (evaluator, resources, parentOperatorList) {
  20169. assert(this.font.isType3Font);
  20170. if (this.type3Loaded) {
  20171. return this.type3Loaded;
  20172. }
  20173. var translatedFont = this.font;
  20174. var loadCharProcsPromise = Promise.resolve();
  20175. var charProcs = this.dict.get('CharProcs').getAll();
  20176. var fontResources = this.dict.get('Resources') || resources;
  20177. var charProcKeys = Object.keys(charProcs);
  20178. var charProcOperatorList = {};
  20179. for (var i = 0, n = charProcKeys.length; i < n; ++i) {
  20180. loadCharProcsPromise = loadCharProcsPromise.then(function (key) {
  20181. var glyphStream = charProcs[key];
  20182. var operatorList = new OperatorList();
  20183. return evaluator.getOperatorList(glyphStream, fontResources,
  20184. operatorList).
  20185. then(function () {
  20186. charProcOperatorList[key] = operatorList.getIR();
  20187. // Add the dependencies to the parent operator list so they are
  20188. // resolved before sub operator list is executed synchronously.
  20189. parentOperatorList.addDependencies(operatorList.dependencies);
  20190. });
  20191. }.bind(this, charProcKeys[i]));
  20192. }
  20193. this.type3Loaded = loadCharProcsPromise.then(function () {
  20194. translatedFont.charProcOperatorList = charProcOperatorList;
  20195. });
  20196. return this.type3Loaded;
  20197. }
  20198. };
  20199. return TranslatedFont;
  20200. })();
  20201. var OperatorList = (function OperatorListClosure() {
  20202. var CHUNK_SIZE = 1000;
  20203. var CHUNK_SIZE_ABOUT = CHUNK_SIZE - 5; // close to chunk size
  20204. function getTransfers(queue) {
  20205. var transfers = [];
  20206. var fnArray = queue.fnArray, argsArray = queue.argsArray;
  20207. for (var i = 0, ii = queue.length; i < ii; i++) {
  20208. switch (fnArray[i]) {
  20209. case OPS.paintInlineImageXObject:
  20210. case OPS.paintInlineImageXObjectGroup:
  20211. case OPS.paintImageMaskXObject:
  20212. var arg = argsArray[i][0]; // first param in imgData
  20213. if (!arg.cached) {
  20214. transfers.push(arg.data.buffer);
  20215. }
  20216. break;
  20217. }
  20218. }
  20219. return transfers;
  20220. }
  20221. function OperatorList(intent, messageHandler, pageIndex) {
  20222. this.messageHandler = messageHandler;
  20223. this.fnArray = [];
  20224. this.argsArray = [];
  20225. this.dependencies = {};
  20226. this.pageIndex = pageIndex;
  20227. this.intent = intent;
  20228. }
  20229. OperatorList.prototype = {
  20230. get length() {
  20231. return this.argsArray.length;
  20232. },
  20233. addOp: function(fn, args) {
  20234. this.fnArray.push(fn);
  20235. this.argsArray.push(args);
  20236. if (this.messageHandler) {
  20237. if (this.fnArray.length >= CHUNK_SIZE) {
  20238. this.flush();
  20239. } else if (this.fnArray.length >= CHUNK_SIZE_ABOUT &&
  20240. (fn === OPS.restore || fn === OPS.endText)) {
  20241. // heuristic to flush on boundary of restore or endText
  20242. this.flush();
  20243. }
  20244. }
  20245. },
  20246. addDependency: function(dependency) {
  20247. if (dependency in this.dependencies) {
  20248. return;
  20249. }
  20250. this.dependencies[dependency] = true;
  20251. this.addOp(OPS.dependency, [dependency]);
  20252. },
  20253. addDependencies: function(dependencies) {
  20254. for (var key in dependencies) {
  20255. this.addDependency(key);
  20256. }
  20257. },
  20258. addOpList: function(opList) {
  20259. Util.extendObj(this.dependencies, opList.dependencies);
  20260. for (var i = 0, ii = opList.length; i < ii; i++) {
  20261. this.addOp(opList.fnArray[i], opList.argsArray[i]);
  20262. }
  20263. },
  20264. getIR: function() {
  20265. return {
  20266. fnArray: this.fnArray,
  20267. argsArray: this.argsArray,
  20268. length: this.length
  20269. };
  20270. },
  20271. flush: function(lastChunk) {
  20272. new QueueOptimizer().optimize(this);
  20273. var transfers = getTransfers(this);
  20274. this.messageHandler.send('RenderPageChunk', {
  20275. operatorList: {
  20276. fnArray: this.fnArray,
  20277. argsArray: this.argsArray,
  20278. lastChunk: lastChunk,
  20279. length: this.length
  20280. },
  20281. pageIndex: this.pageIndex,
  20282. intent: this.intent
  20283. }, transfers);
  20284. this.dependencies = {};
  20285. this.fnArray.length = 0;
  20286. this.argsArray.length = 0;
  20287. }
  20288. };
  20289. return OperatorList;
  20290. })();
  20291. var StateManager = (function StateManagerClosure() {
  20292. function StateManager(initialState) {
  20293. this.state = initialState;
  20294. this.stateStack = [];
  20295. }
  20296. StateManager.prototype = {
  20297. save: function () {
  20298. var old = this.state;
  20299. this.stateStack.push(this.state);
  20300. this.state = old.clone();
  20301. },
  20302. restore: function () {
  20303. var prev = this.stateStack.pop();
  20304. if (prev) {
  20305. this.state = prev;
  20306. }
  20307. },
  20308. transform: function (args) {
  20309. this.state.ctm = Util.transform(this.state.ctm, args);
  20310. }
  20311. };
  20312. return StateManager;
  20313. })();
  20314. var TextState = (function TextStateClosure() {
  20315. function TextState() {
  20316. this.ctm = new Float32Array(IDENTITY_MATRIX);
  20317. this.fontSize = 0;
  20318. this.font = null;
  20319. this.fontMatrix = FONT_IDENTITY_MATRIX;
  20320. this.textMatrix = IDENTITY_MATRIX.slice();
  20321. this.textLineMatrix = IDENTITY_MATRIX.slice();
  20322. this.charSpacing = 0;
  20323. this.wordSpacing = 0;
  20324. this.leading = 0;
  20325. this.textHScale = 1;
  20326. this.textRise = 0;
  20327. }
  20328. TextState.prototype = {
  20329. setTextMatrix: function TextState_setTextMatrix(a, b, c, d, e, f) {
  20330. var m = this.textMatrix;
  20331. m[0] = a; m[1] = b; m[2] = c; m[3] = d; m[4] = e; m[5] = f;
  20332. },
  20333. setTextLineMatrix: function TextState_setTextMatrix(a, b, c, d, e, f) {
  20334. var m = this.textLineMatrix;
  20335. m[0] = a; m[1] = b; m[2] = c; m[3] = d; m[4] = e; m[5] = f;
  20336. },
  20337. translateTextMatrix: function TextState_translateTextMatrix(x, y) {
  20338. var m = this.textMatrix;
  20339. m[4] = m[0] * x + m[2] * y + m[4];
  20340. m[5] = m[1] * x + m[3] * y + m[5];
  20341. },
  20342. translateTextLineMatrix: function TextState_translateTextMatrix(x, y) {
  20343. var m = this.textLineMatrix;
  20344. m[4] = m[0] * x + m[2] * y + m[4];
  20345. m[5] = m[1] * x + m[3] * y + m[5];
  20346. },
  20347. calcRenderMatrix: function TextState_calcRendeMatrix(ctm) {
  20348. // 9.4.4 Text Space Details
  20349. var tsm = [this.fontSize * this.textHScale, 0,
  20350. 0, this.fontSize,
  20351. 0, this.textRise];
  20352. return Util.transform(ctm, Util.transform(this.textMatrix, tsm));
  20353. },
  20354. carriageReturn: function TextState_carriageReturn() {
  20355. this.translateTextLineMatrix(0, -this.leading);
  20356. this.textMatrix = this.textLineMatrix.slice();
  20357. },
  20358. clone: function TextState_clone() {
  20359. var clone = Object.create(this);
  20360. clone.textMatrix = this.textMatrix.slice();
  20361. clone.textLineMatrix = this.textLineMatrix.slice();
  20362. clone.fontMatrix = this.fontMatrix.slice();
  20363. return clone;
  20364. }
  20365. };
  20366. return TextState;
  20367. })();
  20368. var EvalState = (function EvalStateClosure() {
  20369. function EvalState() {
  20370. this.ctm = new Float32Array(IDENTITY_MATRIX);
  20371. this.font = null;
  20372. this.textRenderingMode = TextRenderingMode.FILL;
  20373. this.fillColorSpace = ColorSpace.singletons.gray;
  20374. this.strokeColorSpace = ColorSpace.singletons.gray;
  20375. }
  20376. EvalState.prototype = {
  20377. clone: function CanvasExtraState_clone() {
  20378. return Object.create(this);
  20379. },
  20380. };
  20381. return EvalState;
  20382. })();
  20383. var EvaluatorPreprocessor = (function EvaluatorPreprocessorClosure() {
  20384. // Specifies properties for each command
  20385. //
  20386. // If variableArgs === true: [0, `numArgs`] expected
  20387. // If variableArgs === false: exactly `numArgs` expected
  20388. var OP_MAP = {
  20389. // Graphic state
  20390. w: { id: OPS.setLineWidth, numArgs: 1, variableArgs: false },
  20391. J: { id: OPS.setLineCap, numArgs: 1, variableArgs: false },
  20392. j: { id: OPS.setLineJoin, numArgs: 1, variableArgs: false },
  20393. M: { id: OPS.setMiterLimit, numArgs: 1, variableArgs: false },
  20394. d: { id: OPS.setDash, numArgs: 2, variableArgs: false },
  20395. ri: { id: OPS.setRenderingIntent, numArgs: 1, variableArgs: false },
  20396. i: { id: OPS.setFlatness, numArgs: 1, variableArgs: false },
  20397. gs: { id: OPS.setGState, numArgs: 1, variableArgs: false },
  20398. q: { id: OPS.save, numArgs: 0, variableArgs: false },
  20399. Q: { id: OPS.restore, numArgs: 0, variableArgs: false },
  20400. cm: { id: OPS.transform, numArgs: 6, variableArgs: false },
  20401. // Path
  20402. m: { id: OPS.moveTo, numArgs: 2, variableArgs: false },
  20403. l: { id: OPS.lineTo, numArgs: 2, variableArgs: false },
  20404. c: { id: OPS.curveTo, numArgs: 6, variableArgs: false },
  20405. v: { id: OPS.curveTo2, numArgs: 4, variableArgs: false },
  20406. y: { id: OPS.curveTo3, numArgs: 4, variableArgs: false },
  20407. h: { id: OPS.closePath, numArgs: 0, variableArgs: false },
  20408. re: { id: OPS.rectangle, numArgs: 4, variableArgs: false },
  20409. S: { id: OPS.stroke, numArgs: 0, variableArgs: false },
  20410. s: { id: OPS.closeStroke, numArgs: 0, variableArgs: false },
  20411. f: { id: OPS.fill, numArgs: 0, variableArgs: false },
  20412. F: { id: OPS.fill, numArgs: 0, variableArgs: false },
  20413. 'f*': { id: OPS.eoFill, numArgs: 0, variableArgs: false },
  20414. B: { id: OPS.fillStroke, numArgs: 0, variableArgs: false },
  20415. 'B*': { id: OPS.eoFillStroke, numArgs: 0, variableArgs: false },
  20416. b: { id: OPS.closeFillStroke, numArgs: 0, variableArgs: false },
  20417. 'b*': { id: OPS.closeEOFillStroke, numArgs: 0, variableArgs: false },
  20418. n: { id: OPS.endPath, numArgs: 0, variableArgs: false },
  20419. // Clipping
  20420. W: { id: OPS.clip, numArgs: 0, variableArgs: false },
  20421. 'W*': { id: OPS.eoClip, numArgs: 0, variableArgs: false },
  20422. // Text
  20423. BT: { id: OPS.beginText, numArgs: 0, variableArgs: false },
  20424. ET: { id: OPS.endText, numArgs: 0, variableArgs: false },
  20425. Tc: { id: OPS.setCharSpacing, numArgs: 1, variableArgs: false },
  20426. Tw: { id: OPS.setWordSpacing, numArgs: 1, variableArgs: false },
  20427. Tz: { id: OPS.setHScale, numArgs: 1, variableArgs: false },
  20428. TL: { id: OPS.setLeading, numArgs: 1, variableArgs: false },
  20429. Tf: { id: OPS.setFont, numArgs: 2, variableArgs: false },
  20430. Tr: { id: OPS.setTextRenderingMode, numArgs: 1, variableArgs: false },
  20431. Ts: { id: OPS.setTextRise, numArgs: 1, variableArgs: false },
  20432. Td: { id: OPS.moveText, numArgs: 2, variableArgs: false },
  20433. TD: { id: OPS.setLeadingMoveText, numArgs: 2, variableArgs: false },
  20434. Tm: { id: OPS.setTextMatrix, numArgs: 6, variableArgs: false },
  20435. 'T*': { id: OPS.nextLine, numArgs: 0, variableArgs: false },
  20436. Tj: { id: OPS.showText, numArgs: 1, variableArgs: false },
  20437. TJ: { id: OPS.showSpacedText, numArgs: 1, variableArgs: false },
  20438. '\'': { id: OPS.nextLineShowText, numArgs: 1, variableArgs: false },
  20439. '"': { id: OPS.nextLineSetSpacingShowText, numArgs: 3,
  20440. variableArgs: false },
  20441. // Type3 fonts
  20442. d0: { id: OPS.setCharWidth, numArgs: 2, variableArgs: false },
  20443. d1: { id: OPS.setCharWidthAndBounds, numArgs: 6, variableArgs: false },
  20444. // Color
  20445. CS: { id: OPS.setStrokeColorSpace, numArgs: 1, variableArgs: false },
  20446. cs: { id: OPS.setFillColorSpace, numArgs: 1, variableArgs: false },
  20447. SC: { id: OPS.setStrokeColor, numArgs: 4, variableArgs: true },
  20448. SCN: { id: OPS.setStrokeColorN, numArgs: 33, variableArgs: true },
  20449. sc: { id: OPS.setFillColor, numArgs: 4, variableArgs: true },
  20450. scn: { id: OPS.setFillColorN, numArgs: 33, variableArgs: true },
  20451. G: { id: OPS.setStrokeGray, numArgs: 1, variableArgs: false },
  20452. g: { id: OPS.setFillGray, numArgs: 1, variableArgs: false },
  20453. RG: { id: OPS.setStrokeRGBColor, numArgs: 3, variableArgs: false },
  20454. rg: { id: OPS.setFillRGBColor, numArgs: 3, variableArgs: false },
  20455. K: { id: OPS.setStrokeCMYKColor, numArgs: 4, variableArgs: false },
  20456. k: { id: OPS.setFillCMYKColor, numArgs: 4, variableArgs: false },
  20457. // Shading
  20458. sh: { id: OPS.shadingFill, numArgs: 1, variableArgs: false },
  20459. // Images
  20460. BI: { id: OPS.beginInlineImage, numArgs: 0, variableArgs: false },
  20461. ID: { id: OPS.beginImageData, numArgs: 0, variableArgs: false },
  20462. EI: { id: OPS.endInlineImage, numArgs: 1, variableArgs: false },
  20463. // XObjects
  20464. Do: { id: OPS.paintXObject, numArgs: 1, variableArgs: false },
  20465. MP: { id: OPS.markPoint, numArgs: 1, variableArgs: false },
  20466. DP: { id: OPS.markPointProps, numArgs: 2, variableArgs: false },
  20467. BMC: { id: OPS.beginMarkedContent, numArgs: 1, variableArgs: false },
  20468. BDC: { id: OPS.beginMarkedContentProps, numArgs: 2,
  20469. variableArgs: false },
  20470. EMC: { id: OPS.endMarkedContent, numArgs: 0, variableArgs: false },
  20471. // Compatibility
  20472. BX: { id: OPS.beginCompat, numArgs: 0, variableArgs: false },
  20473. EX: { id: OPS.endCompat, numArgs: 0, variableArgs: false },
  20474. // (reserved partial commands for the lexer)
  20475. BM: null,
  20476. BD: null,
  20477. 'true': null,
  20478. fa: null,
  20479. fal: null,
  20480. fals: null,
  20481. 'false': null,
  20482. nu: null,
  20483. nul: null,
  20484. 'null': null
  20485. };
  20486. function EvaluatorPreprocessor(stream, xref, stateManager) {
  20487. // TODO(mduan): pass array of knownCommands rather than OP_MAP
  20488. // dictionary
  20489. this.parser = new Parser(new Lexer(stream, OP_MAP), false, xref);
  20490. this.stateManager = stateManager;
  20491. this.nonProcessedArgs = [];
  20492. }
  20493. EvaluatorPreprocessor.prototype = {
  20494. get savedStatesDepth() {
  20495. return this.stateManager.stateStack.length;
  20496. },
  20497. read: function EvaluatorPreprocessor_read() {
  20498. var args = [];
  20499. while (true) {
  20500. var obj = this.parser.getObj();
  20501. if (isEOF(obj)) {
  20502. return null; // no more commands
  20503. }
  20504. if (!isCmd(obj)) {
  20505. // argument
  20506. if (obj !== null && obj !== undefined) {
  20507. args.push((obj instanceof Dict ? obj.getAll() : obj));
  20508. assert(args.length <= 33, 'Too many arguments');
  20509. }
  20510. continue;
  20511. }
  20512. var cmd = obj.cmd;
  20513. // Check that the command is valid
  20514. var opSpec = OP_MAP[cmd];
  20515. if (!opSpec) {
  20516. warn('Unknown command "' + cmd + '"');
  20517. continue;
  20518. }
  20519. var fn = opSpec.id;
  20520. // Some post script commands can be nested, e.g. /F2 /GS2 gs 5.711 Tf
  20521. if (!opSpec.variableArgs && args.length !== opSpec.numArgs) {
  20522. while (args.length > opSpec.numArgs) {
  20523. this.nonProcessedArgs.push(args.shift());
  20524. }
  20525. while (args.length < opSpec.numArgs && this.nonProcessedArgs.length) {
  20526. args.unshift(this.nonProcessedArgs.pop());
  20527. }
  20528. }
  20529. // Validate the number of arguments for the command
  20530. if (opSpec.variableArgs) {
  20531. if (args.length > opSpec.numArgs) {
  20532. info('Command ' + fn + ': expected [0,' + opSpec.numArgs +
  20533. '] args, but received ' + args.length + ' args');
  20534. }
  20535. } else {
  20536. if (args.length < opSpec.numArgs) {
  20537. // If we receive too few args, it's not possible to possible
  20538. // to execute the command, so skip the command
  20539. info('Command ' + fn + ': because expected ' +
  20540. opSpec.numArgs + ' args, but received ' + args.length +
  20541. ' args; skipping');
  20542. args = [];
  20543. continue;
  20544. } else if (args.length > opSpec.numArgs) {
  20545. info('Command ' + fn + ': expected ' + opSpec.numArgs +
  20546. ' args, but received ' + args.length + ' args');
  20547. }
  20548. }
  20549. // TODO figure out how to type-check vararg functions
  20550. this.preprocessCommand(fn, args);
  20551. return { fn: fn, args: args };
  20552. }
  20553. },
  20554. preprocessCommand:
  20555. function EvaluatorPreprocessor_preprocessCommand(fn, args) {
  20556. switch (fn | 0) {
  20557. case OPS.save:
  20558. this.stateManager.save();
  20559. break;
  20560. case OPS.restore:
  20561. this.stateManager.restore();
  20562. break;
  20563. case OPS.transform:
  20564. this.stateManager.transform(args);
  20565. break;
  20566. }
  20567. }
  20568. };
  20569. return EvaluatorPreprocessor;
  20570. })();
  20571. var QueueOptimizer = (function QueueOptimizerClosure() {
  20572. function addState(parentState, pattern, fn) {
  20573. var state = parentState;
  20574. for (var i = 0, ii = pattern.length - 1; i < ii; i++) {
  20575. var item = pattern[i];
  20576. state = (state[item] || (state[item] = []));
  20577. }
  20578. state[pattern[pattern.length - 1]] = fn;
  20579. }
  20580. function handlePaintSolidColorImageMask(index, count, fnArray, argsArray) {
  20581. // Handles special case of mainly LaTeX documents which
  20582. // use image masks to draw lines with the current fill style.
  20583. // 'count' groups of (save, transform, paintImageMaskXObject, restore)+
  20584. // have been found at index.
  20585. for (var i = 0; i < count; i++) {
  20586. var arg = argsArray[index + 4 * i + 2];
  20587. var imageMask = arg.length == 1 && arg[0];
  20588. if (imageMask && imageMask.width == 1 && imageMask.height == 1 &&
  20589. (!imageMask.data.length || (imageMask.data.length == 1 &&
  20590. imageMask.data[0] === 0))) {
  20591. fnArray[index + 4 * i + 2] = OPS.paintSolidColorImageMask;
  20592. continue;
  20593. }
  20594. break;
  20595. }
  20596. return count - i;
  20597. }
  20598. var InitialState = [];
  20599. addState(InitialState,
  20600. [OPS.save, OPS.transform, OPS.paintInlineImageXObject, OPS.restore],
  20601. function foundInlineImageGroup(context) {
  20602. // grouping paintInlineImageXObject's into paintInlineImageXObjectGroup
  20603. // searching for (save, transform, paintInlineImageXObject, restore)+
  20604. var MIN_IMAGES_IN_INLINE_IMAGES_BLOCK = 10;
  20605. var MAX_IMAGES_IN_INLINE_IMAGES_BLOCK = 200;
  20606. var MAX_WIDTH = 1000;
  20607. var IMAGE_PADDING = 1;
  20608. var fnArray = context.fnArray, argsArray = context.argsArray;
  20609. var j = context.currentOperation - 3, i = j + 4;
  20610. var ii = fnArray.length;
  20611. for (; i < ii && fnArray[i - 4] === fnArray[i]; i++) {}
  20612. var count = Math.min((i - j) >> 2, MAX_IMAGES_IN_INLINE_IMAGES_BLOCK);
  20613. if (count < MIN_IMAGES_IN_INLINE_IMAGES_BLOCK) {
  20614. context.currentOperation = i - 1;
  20615. return;
  20616. }
  20617. // assuming that heights of those image is too small (~1 pixel)
  20618. // packing as much as possible by lines
  20619. var maxX = 0;
  20620. var map = [], maxLineHeight = 0;
  20621. var currentX = IMAGE_PADDING, currentY = IMAGE_PADDING;
  20622. var q;
  20623. for (q = 0; q < count; q++) {
  20624. var transform = argsArray[j + (q << 2) + 1];
  20625. var img = argsArray[j + (q << 2) + 2][0];
  20626. if (currentX + img.width > MAX_WIDTH) {
  20627. // starting new line
  20628. maxX = Math.max(maxX, currentX);
  20629. currentY += maxLineHeight + 2 * IMAGE_PADDING;
  20630. currentX = 0;
  20631. maxLineHeight = 0;
  20632. }
  20633. map.push({
  20634. transform: transform,
  20635. x: currentX, y: currentY,
  20636. w: img.width, h: img.height
  20637. });
  20638. currentX += img.width + 2 * IMAGE_PADDING;
  20639. maxLineHeight = Math.max(maxLineHeight, img.height);
  20640. }
  20641. var imgWidth = Math.max(maxX, currentX) + IMAGE_PADDING;
  20642. var imgHeight = currentY + maxLineHeight + IMAGE_PADDING;
  20643. var imgData = new Uint8Array(imgWidth * imgHeight * 4);
  20644. var imgRowSize = imgWidth << 2;
  20645. for (q = 0; q < count; q++) {
  20646. var data = argsArray[j + (q << 2) + 2][0].data;
  20647. // copy image by lines and extends pixels into padding
  20648. var rowSize = map[q].w << 2;
  20649. var dataOffset = 0;
  20650. var offset = (map[q].x + map[q].y * imgWidth) << 2;
  20651. imgData.set(data.subarray(0, rowSize), offset - imgRowSize);
  20652. for (var k = 0, kk = map[q].h; k < kk; k++) {
  20653. imgData.set(data.subarray(dataOffset, dataOffset + rowSize), offset);
  20654. dataOffset += rowSize;
  20655. offset += imgRowSize;
  20656. }
  20657. imgData.set(data.subarray(dataOffset - rowSize, dataOffset), offset);
  20658. while (offset >= 0) {
  20659. data[offset - 4] = data[offset];
  20660. data[offset - 3] = data[offset + 1];
  20661. data[offset - 2] = data[offset + 2];
  20662. data[offset - 1] = data[offset + 3];
  20663. data[offset + rowSize] = data[offset + rowSize - 4];
  20664. data[offset + rowSize + 1] = data[offset + rowSize - 3];
  20665. data[offset + rowSize + 2] = data[offset + rowSize - 2];
  20666. data[offset + rowSize + 3] = data[offset + rowSize - 1];
  20667. offset -= imgRowSize;
  20668. }
  20669. }
  20670. // replacing queue items
  20671. fnArray.splice(j, count * 4, OPS.paintInlineImageXObjectGroup);
  20672. argsArray.splice(j, count * 4,
  20673. [{ width: imgWidth, height: imgHeight, kind: ImageKind.RGBA_32BPP,
  20674. data: imgData }, map]);
  20675. context.currentOperation = j;
  20676. });
  20677. addState(InitialState,
  20678. [OPS.save, OPS.transform, OPS.paintImageMaskXObject, OPS.restore],
  20679. function foundImageMaskGroup(context) {
  20680. // grouping paintImageMaskXObject's into paintImageMaskXObjectGroup
  20681. // searching for (save, transform, paintImageMaskXObject, restore)+
  20682. var MIN_IMAGES_IN_MASKS_BLOCK = 10;
  20683. var MAX_IMAGES_IN_MASKS_BLOCK = 100;
  20684. var MAX_SAME_IMAGES_IN_MASKS_BLOCK = 1000;
  20685. var fnArray = context.fnArray, argsArray = context.argsArray;
  20686. var j = context.currentOperation - 3, i = j + 4;
  20687. var ii = fnArray.length, q;
  20688. for (; i < ii && fnArray[i - 4] === fnArray[i]; i++) {}
  20689. var count = (i - j) >> 2;
  20690. count = handlePaintSolidColorImageMask(j, count, fnArray, argsArray);
  20691. if (count < MIN_IMAGES_IN_MASKS_BLOCK) {
  20692. context.currentOperation = i - 1;
  20693. return;
  20694. }
  20695. var isSameImage = false;
  20696. var transformArgs;
  20697. if (argsArray[j + 1][1] === 0 && argsArray[j + 1][2] === 0) {
  20698. i = j + 4;
  20699. isSameImage = true;
  20700. for (q = 1; q < count; q++, i += 4) {
  20701. var prevTransformArgs = argsArray[i - 3];
  20702. transformArgs = argsArray[i + 1];
  20703. if (argsArray[i - 2][0] !== argsArray[i + 2][0] ||
  20704. prevTransformArgs[0] !== transformArgs[0] ||
  20705. prevTransformArgs[1] !== transformArgs[1] ||
  20706. prevTransformArgs[2] !== transformArgs[2] ||
  20707. prevTransformArgs[3] !== transformArgs[3]) {
  20708. if (q < MIN_IMAGES_IN_MASKS_BLOCK) {
  20709. isSameImage = false;
  20710. } else {
  20711. count = q;
  20712. }
  20713. break; // different image or transform
  20714. }
  20715. }
  20716. }
  20717. if (isSameImage) {
  20718. count = Math.min(count, MAX_SAME_IMAGES_IN_MASKS_BLOCK);
  20719. var positions = new Float32Array(count * 2);
  20720. i = j + 1;
  20721. for (q = 0; q < count; q++) {
  20722. transformArgs = argsArray[i];
  20723. positions[(q << 1)] = transformArgs[4];
  20724. positions[(q << 1) + 1] = transformArgs[5];
  20725. i += 4;
  20726. }
  20727. // replacing queue items
  20728. fnArray.splice(j, count * 4, OPS.paintImageMaskXObjectRepeat);
  20729. argsArray.splice(j, count * 4, [argsArray[j + 2][0],
  20730. argsArray[j + 1][0], argsArray[j + 1][3], positions]);
  20731. context.currentOperation = j;
  20732. } else {
  20733. count = Math.min(count, MAX_IMAGES_IN_MASKS_BLOCK);
  20734. var images = [];
  20735. for (q = 0; q < count; q++) {
  20736. transformArgs = argsArray[j + (q << 2) + 1];
  20737. var maskParams = argsArray[j + (q << 2) + 2][0];
  20738. images.push({ data: maskParams.data, width: maskParams.width,
  20739. height: maskParams.height,
  20740. transform: transformArgs });
  20741. }
  20742. // replacing queue items
  20743. fnArray.splice(j, count * 4, OPS.paintImageMaskXObjectGroup);
  20744. argsArray.splice(j, count * 4, [images]);
  20745. context.currentOperation = j;
  20746. }
  20747. });
  20748. addState(InitialState,
  20749. [OPS.save, OPS.transform, OPS.paintImageXObject, OPS.restore],
  20750. function (context) {
  20751. var MIN_IMAGES_IN_BLOCK = 3;
  20752. var MAX_IMAGES_IN_BLOCK = 1000;
  20753. var fnArray = context.fnArray, argsArray = context.argsArray;
  20754. var j = context.currentOperation - 3, i = j + 4;
  20755. if (argsArray[j + 1][1] !== 0 || argsArray[j + 1][2] !== 0) {
  20756. return;
  20757. }
  20758. var ii = fnArray.length;
  20759. var transformArgs;
  20760. for (; i + 3 < ii && fnArray[i - 4] === fnArray[i]; i += 4) {
  20761. if (fnArray[i - 3] !== fnArray[i + 1] ||
  20762. fnArray[i - 2] !== fnArray[i + 2] ||
  20763. fnArray[i - 1] !== fnArray[i + 3]) {
  20764. break;
  20765. }
  20766. if (argsArray[i - 2][0] !== argsArray[i + 2][0]) {
  20767. break; // different image
  20768. }
  20769. var prevTransformArgs = argsArray[i - 3];
  20770. transformArgs = argsArray[i + 1];
  20771. if (prevTransformArgs[0] !== transformArgs[0] ||
  20772. prevTransformArgs[1] !== transformArgs[1] ||
  20773. prevTransformArgs[2] !== transformArgs[2] ||
  20774. prevTransformArgs[3] !== transformArgs[3]) {
  20775. break; // different transform
  20776. }
  20777. }
  20778. var count = Math.min((i - j) >> 2, MAX_IMAGES_IN_BLOCK);
  20779. if (count < MIN_IMAGES_IN_BLOCK) {
  20780. context.currentOperation = i - 1;
  20781. return;
  20782. }
  20783. var positions = new Float32Array(count * 2);
  20784. i = j + 1;
  20785. for (var q = 0; q < count; q++) {
  20786. transformArgs = argsArray[i];
  20787. positions[(q << 1)] = transformArgs[4];
  20788. positions[(q << 1) + 1] = transformArgs[5];
  20789. i += 4;
  20790. }
  20791. var args = [argsArray[j + 2][0], argsArray[j + 1][0],
  20792. argsArray[j + 1][3], positions];
  20793. // replacing queue items
  20794. fnArray.splice(j, count * 4, OPS.paintImageXObjectRepeat);
  20795. argsArray.splice(j, count * 4, args);
  20796. context.currentOperation = j;
  20797. });
  20798. addState(InitialState,
  20799. [OPS.beginText, OPS.setFont, OPS.setTextMatrix, OPS.showText, OPS.endText],
  20800. function (context) {
  20801. // moving single chars with same font into beginText/endText groups
  20802. // searching for (beginText, setFont, setTextMatrix, showText, endText)+
  20803. var MIN_CHARS_IN_BLOCK = 3;
  20804. var MAX_CHARS_IN_BLOCK = 1000;
  20805. var fnArray = context.fnArray, argsArray = context.argsArray;
  20806. var j = context.currentOperation - 4, i = j + 5;
  20807. var ii = fnArray.length;
  20808. for (; i < ii && fnArray[i - 5] === fnArray[i]; i++) {
  20809. if (fnArray[i] === OPS.setFont) {
  20810. if (argsArray[i - 5][0] !== argsArray[i][0] ||
  20811. argsArray[i - 5][1] !== argsArray[i][1]) {
  20812. break;
  20813. }
  20814. }
  20815. }
  20816. var count = Math.min(((i - j) / 5) | 0, MAX_CHARS_IN_BLOCK);
  20817. if (count < MIN_CHARS_IN_BLOCK) {
  20818. context.currentOperation = i - 1;
  20819. return;
  20820. }
  20821. if (j >= 4 && fnArray[j - 4] === fnArray[j + 1] &&
  20822. fnArray[j - 3] === fnArray[j + 2] &&
  20823. fnArray[j - 2] === fnArray[j + 3] &&
  20824. fnArray[j - 1] === fnArray[j + 4] &&
  20825. argsArray[j - 4][0] === argsArray[j + 1][0] &&
  20826. argsArray[j - 4][1] === argsArray[j + 1][1]) {
  20827. // extending one block ahead (very first block might have 'dependency')
  20828. count++;
  20829. j -= 5;
  20830. }
  20831. var k = j + 7;
  20832. i = j + 4;
  20833. for (var q = 1; q < count; q++) {
  20834. fnArray[i] = fnArray[k];
  20835. argsArray[i] = argsArray[k];
  20836. fnArray[i + 1] = fnArray[k + 1];
  20837. argsArray[i + 1] = argsArray[k + 1];
  20838. i += 2;
  20839. k += 5;
  20840. }
  20841. var removed = (count - 1) * 3;
  20842. fnArray.splice(i, removed);
  20843. argsArray.splice(i, removed);
  20844. context.currentOperation = i;
  20845. });
  20846. function QueueOptimizer() {}
  20847. QueueOptimizer.prototype = {
  20848. optimize: function QueueOptimizer_optimize(queue) {
  20849. var fnArray = queue.fnArray, argsArray = queue.argsArray;
  20850. var context = {
  20851. currentOperation: 0,
  20852. fnArray: fnArray,
  20853. argsArray: argsArray
  20854. };
  20855. var i, ii = argsArray.length;
  20856. var state;
  20857. for (i = 0; i < ii; i++) {
  20858. state = (state || InitialState)[fnArray[i]];
  20859. if (typeof state === 'function') { // we found some handler
  20860. context.currentOperation = i;
  20861. state = state(context);
  20862. i = context.currentOperation;
  20863. ii = context.fnArray.length;
  20864. }
  20865. }
  20866. }
  20867. };
  20868. return QueueOptimizer;
  20869. })();
  20870. var BUILT_IN_CMAPS = [
  20871. // << Start unicode maps.
  20872. 'Adobe-GB1-UCS2',
  20873. 'Adobe-CNS1-UCS2',
  20874. 'Adobe-Japan1-UCS2',
  20875. 'Adobe-Korea1-UCS2',
  20876. // >> End unicode maps.
  20877. '78-EUC-H',
  20878. '78-EUC-V',
  20879. '78-H',
  20880. '78-RKSJ-H',
  20881. '78-RKSJ-V',
  20882. '78-V',
  20883. '78ms-RKSJ-H',
  20884. '78ms-RKSJ-V',
  20885. '83pv-RKSJ-H',
  20886. '90ms-RKSJ-H',
  20887. '90ms-RKSJ-V',
  20888. '90msp-RKSJ-H',
  20889. '90msp-RKSJ-V',
  20890. '90pv-RKSJ-H',
  20891. '90pv-RKSJ-V',
  20892. 'Add-H',
  20893. 'Add-RKSJ-H',
  20894. 'Add-RKSJ-V',
  20895. 'Add-V',
  20896. 'Adobe-CNS1-0',
  20897. 'Adobe-CNS1-1',
  20898. 'Adobe-CNS1-2',
  20899. 'Adobe-CNS1-3',
  20900. 'Adobe-CNS1-4',
  20901. 'Adobe-CNS1-5',
  20902. 'Adobe-CNS1-6',
  20903. 'Adobe-GB1-0',
  20904. 'Adobe-GB1-1',
  20905. 'Adobe-GB1-2',
  20906. 'Adobe-GB1-3',
  20907. 'Adobe-GB1-4',
  20908. 'Adobe-GB1-5',
  20909. 'Adobe-Japan1-0',
  20910. 'Adobe-Japan1-1',
  20911. 'Adobe-Japan1-2',
  20912. 'Adobe-Japan1-3',
  20913. 'Adobe-Japan1-4',
  20914. 'Adobe-Japan1-5',
  20915. 'Adobe-Japan1-6',
  20916. 'Adobe-Korea1-0',
  20917. 'Adobe-Korea1-1',
  20918. 'Adobe-Korea1-2',
  20919. 'B5-H',
  20920. 'B5-V',
  20921. 'B5pc-H',
  20922. 'B5pc-V',
  20923. 'CNS-EUC-H',
  20924. 'CNS-EUC-V',
  20925. 'CNS1-H',
  20926. 'CNS1-V',
  20927. 'CNS2-H',
  20928. 'CNS2-V',
  20929. 'ETHK-B5-H',
  20930. 'ETHK-B5-V',
  20931. 'ETen-B5-H',
  20932. 'ETen-B5-V',
  20933. 'ETenms-B5-H',
  20934. 'ETenms-B5-V',
  20935. 'EUC-H',
  20936. 'EUC-V',
  20937. 'Ext-H',
  20938. 'Ext-RKSJ-H',
  20939. 'Ext-RKSJ-V',
  20940. 'Ext-V',
  20941. 'GB-EUC-H',
  20942. 'GB-EUC-V',
  20943. 'GB-H',
  20944. 'GB-V',
  20945. 'GBK-EUC-H',
  20946. 'GBK-EUC-V',
  20947. 'GBK2K-H',
  20948. 'GBK2K-V',
  20949. 'GBKp-EUC-H',
  20950. 'GBKp-EUC-V',
  20951. 'GBT-EUC-H',
  20952. 'GBT-EUC-V',
  20953. 'GBT-H',
  20954. 'GBT-V',
  20955. 'GBTpc-EUC-H',
  20956. 'GBTpc-EUC-V',
  20957. 'GBpc-EUC-H',
  20958. 'GBpc-EUC-V',
  20959. 'H',
  20960. 'HKdla-B5-H',
  20961. 'HKdla-B5-V',
  20962. 'HKdlb-B5-H',
  20963. 'HKdlb-B5-V',
  20964. 'HKgccs-B5-H',
  20965. 'HKgccs-B5-V',
  20966. 'HKm314-B5-H',
  20967. 'HKm314-B5-V',
  20968. 'HKm471-B5-H',
  20969. 'HKm471-B5-V',
  20970. 'HKscs-B5-H',
  20971. 'HKscs-B5-V',
  20972. 'Hankaku',
  20973. 'Hiragana',
  20974. 'KSC-EUC-H',
  20975. 'KSC-EUC-V',
  20976. 'KSC-H',
  20977. 'KSC-Johab-H',
  20978. 'KSC-Johab-V',
  20979. 'KSC-V',
  20980. 'KSCms-UHC-H',
  20981. 'KSCms-UHC-HW-H',
  20982. 'KSCms-UHC-HW-V',
  20983. 'KSCms-UHC-V',
  20984. 'KSCpc-EUC-H',
  20985. 'KSCpc-EUC-V',
  20986. 'Katakana',
  20987. 'NWP-H',
  20988. 'NWP-V',
  20989. 'RKSJ-H',
  20990. 'RKSJ-V',
  20991. 'Roman',
  20992. 'UniCNS-UCS2-H',
  20993. 'UniCNS-UCS2-V',
  20994. 'UniCNS-UTF16-H',
  20995. 'UniCNS-UTF16-V',
  20996. 'UniCNS-UTF32-H',
  20997. 'UniCNS-UTF32-V',
  20998. 'UniCNS-UTF8-H',
  20999. 'UniCNS-UTF8-V',
  21000. 'UniGB-UCS2-H',
  21001. 'UniGB-UCS2-V',
  21002. 'UniGB-UTF16-H',
  21003. 'UniGB-UTF16-V',
  21004. 'UniGB-UTF32-H',
  21005. 'UniGB-UTF32-V',
  21006. 'UniGB-UTF8-H',
  21007. 'UniGB-UTF8-V',
  21008. 'UniJIS-UCS2-H',
  21009. 'UniJIS-UCS2-HW-H',
  21010. 'UniJIS-UCS2-HW-V',
  21011. 'UniJIS-UCS2-V',
  21012. 'UniJIS-UTF16-H',
  21013. 'UniJIS-UTF16-V',
  21014. 'UniJIS-UTF32-H',
  21015. 'UniJIS-UTF32-V',
  21016. 'UniJIS-UTF8-H',
  21017. 'UniJIS-UTF8-V',
  21018. 'UniJIS2004-UTF16-H',
  21019. 'UniJIS2004-UTF16-V',
  21020. 'UniJIS2004-UTF32-H',
  21021. 'UniJIS2004-UTF32-V',
  21022. 'UniJIS2004-UTF8-H',
  21023. 'UniJIS2004-UTF8-V',
  21024. 'UniJISPro-UCS2-HW-V',
  21025. 'UniJISPro-UCS2-V',
  21026. 'UniJISPro-UTF8-V',
  21027. 'UniJISX0213-UTF32-H',
  21028. 'UniJISX0213-UTF32-V',
  21029. 'UniJISX02132004-UTF32-H',
  21030. 'UniJISX02132004-UTF32-V',
  21031. 'UniKS-UCS2-H',
  21032. 'UniKS-UCS2-V',
  21033. 'UniKS-UTF16-H',
  21034. 'UniKS-UTF16-V',
  21035. 'UniKS-UTF32-H',
  21036. 'UniKS-UTF32-V',
  21037. 'UniKS-UTF8-H',
  21038. 'UniKS-UTF8-V',
  21039. 'V',
  21040. 'WP-Symbol'];
  21041. // CMap, not to be confused with TrueType's cmap.
  21042. var CMap = (function CMapClosure() {
  21043. function CMap(builtInCMap) {
  21044. // Codespace ranges are stored as follows:
  21045. // [[1BytePairs], [2BytePairs], [3BytePairs], [4BytePairs]]
  21046. // where nBytePairs are ranges e.g. [low1, high1, low2, high2, ...]
  21047. this.codespaceRanges = [[], [], [], []];
  21048. this.numCodespaceRanges = 0;
  21049. this.map = [];
  21050. this.vertical = false;
  21051. this.useCMap = null;
  21052. this.builtInCMap = builtInCMap;
  21053. }
  21054. CMap.prototype = {
  21055. addCodespaceRange: function(n, low, high) {
  21056. this.codespaceRanges[n - 1].push(low, high);
  21057. this.numCodespaceRanges++;
  21058. },
  21059. mapRange: function(low, high, dstLow) {
  21060. var lastByte = dstLow.length - 1;
  21061. while (low <= high) {
  21062. this.map[low] = dstLow;
  21063. // Only the last byte has to be incremented.
  21064. dstLow = dstLow.substr(0, lastByte) +
  21065. String.fromCharCode(dstLow.charCodeAt(lastByte) + 1);
  21066. ++low;
  21067. }
  21068. },
  21069. mapRangeToArray: function(low, high, array) {
  21070. var i = 0;
  21071. while (low <= high) {
  21072. this.map[low] = array[i++];
  21073. ++low;
  21074. }
  21075. },
  21076. mapOne: function(src, dst) {
  21077. this.map[src] = dst;
  21078. },
  21079. lookup: function(code) {
  21080. return this.map[code];
  21081. },
  21082. readCharCode: function(str, offset) {
  21083. var c = 0;
  21084. var codespaceRanges = this.codespaceRanges;
  21085. var codespaceRangesLen = this.codespaceRanges.length;
  21086. // 9.7.6.2 CMap Mapping
  21087. // The code length is at most 4.
  21088. for (var n = 0; n < codespaceRangesLen; n++) {
  21089. c = ((c << 8) | str.charCodeAt(offset + n)) >>> 0;
  21090. // Check each codespace range to see if it falls within.
  21091. var codespaceRange = codespaceRanges[n];
  21092. for (var k = 0, kk = codespaceRange.length; k < kk;) {
  21093. var low = codespaceRange[k++];
  21094. var high = codespaceRange[k++];
  21095. if (c >= low && c <= high) {
  21096. return [c, n + 1];
  21097. }
  21098. }
  21099. }
  21100. return [0, 1];
  21101. }
  21102. };
  21103. return CMap;
  21104. })();
  21105. var IdentityCMap = (function IdentityCMapClosure() {
  21106. function IdentityCMap(vertical, n) {
  21107. CMap.call(this);
  21108. this.vertical = vertical;
  21109. this.addCodespaceRange(n, 0, 0xffff);
  21110. this.mapRange(0, 0xffff, '\u0000');
  21111. }
  21112. Util.inherit(IdentityCMap, CMap, {});
  21113. return IdentityCMap;
  21114. })();
  21115. var BinaryCMapReader = (function BinaryCMapReaderClosure() {
  21116. function fetchBinaryData(url) {
  21117. var nonBinaryRequest = PDFJS.disableWorker;
  21118. var request = new XMLHttpRequest();
  21119. request.open('GET', url, false);
  21120. if (!nonBinaryRequest) {
  21121. try {
  21122. request.responseType = 'arraybuffer';
  21123. nonBinaryRequest = request.responseType !== 'arraybuffer';
  21124. } catch (e) {
  21125. nonBinaryRequest = true;
  21126. }
  21127. }
  21128. if (nonBinaryRequest && request.overrideMimeType) {
  21129. request.overrideMimeType('text/plain; charset=x-user-defined');
  21130. }
  21131. request.send(null);
  21132. if (request.status === 0 && /^https?:/i.test(url)) {
  21133. error('Unable to get binary cMap at: ' + url);
  21134. }
  21135. if (nonBinaryRequest) {
  21136. var data = Array.prototype.map.call(request.responseText, function (ch) {
  21137. return ch.charCodeAt(0) & 255;
  21138. });
  21139. return new Uint8Array(data);
  21140. }
  21141. return new Uint8Array(request.response);
  21142. }
  21143. function hexToInt(a, size) {
  21144. var n = 0;
  21145. for (var i = 0; i <= size; i++) {
  21146. n = (n << 8) | a[i];
  21147. }
  21148. return n >>> 0;
  21149. }
  21150. function hexToStr(a, size) {
  21151. return String.fromCharCode.apply(null, a.subarray(0, size + 1));
  21152. }
  21153. function addHex(a, b, size) {
  21154. var c = 0;
  21155. for (var i = size; i >= 0; i--) {
  21156. c += a[i] + b[i];
  21157. a[i] = c & 255;
  21158. c >>= 8;
  21159. }
  21160. }
  21161. function incHex(a, size) {
  21162. var c = 1;
  21163. for (var i = size; i >= 0 && c > 0; i--) {
  21164. c += a[i];
  21165. a[i] = c & 255;
  21166. c >>= 8;
  21167. }
  21168. }
  21169. var MAX_NUM_SIZE = 16;
  21170. var MAX_ENCODED_NUM_SIZE = 19; // ceil(MAX_NUM_SIZE * 7 / 8)
  21171. function BinaryCMapStream(data) {
  21172. this.buffer = data;
  21173. this.pos = 0;
  21174. this.end = data.length;
  21175. this.tmpBuf = new Uint8Array(MAX_ENCODED_NUM_SIZE);
  21176. }
  21177. BinaryCMapStream.prototype = {
  21178. readByte: function () {
  21179. if (this.pos >= this.end) {
  21180. return -1;
  21181. }
  21182. return this.buffer[this.pos++];
  21183. },
  21184. readNumber: function () {
  21185. var n = 0;
  21186. var last;
  21187. do {
  21188. var b = this.readByte();
  21189. if (b < 0) {
  21190. error('unexpected EOF in bcmap');
  21191. }
  21192. last = !(b & 0x80);
  21193. n = (n << 7) | (b & 0x7F);
  21194. } while (!last);
  21195. return n;
  21196. },
  21197. readSigned: function () {
  21198. var n = this.readNumber();
  21199. return (n & 1) ? ~(n >>> 1) : n >>> 1;
  21200. },
  21201. readHex: function (num, size) {
  21202. num.set(this.buffer.subarray(this.pos,
  21203. this.pos + size + 1));
  21204. this.pos += size + 1;
  21205. },
  21206. readHexNumber: function (num, size) {
  21207. var last;
  21208. var stack = this.tmpBuf, sp = 0;
  21209. do {
  21210. var b = this.readByte();
  21211. if (b < 0) {
  21212. error('unexpected EOF in bcmap');
  21213. }
  21214. last = !(b & 0x80);
  21215. stack[sp++] = b & 0x7F;
  21216. } while (!last);
  21217. var i = size, buffer = 0, bufferSize = 0;
  21218. while (i >= 0) {
  21219. while (bufferSize < 8 && stack.length > 0) {
  21220. buffer = (stack[--sp] << bufferSize) | buffer;
  21221. bufferSize += 7;
  21222. }
  21223. num[i] = buffer & 255;
  21224. i--;
  21225. buffer >>= 8;
  21226. bufferSize -= 8;
  21227. }
  21228. },
  21229. readHexSigned: function (num, size) {
  21230. this.readHexNumber(num, size);
  21231. var sign = num[size] & 1 ? 255 : 0;
  21232. var c = 0;
  21233. for (var i = 0; i <= size; i++) {
  21234. c = ((c & 1) << 8) | num[i];
  21235. num[i] = (c >> 1) ^ sign;
  21236. }
  21237. },
  21238. readString: function () {
  21239. var len = this.readNumber();
  21240. var s = '';
  21241. for (var i = 0; i < len; i++) {
  21242. s += String.fromCharCode(this.readNumber());
  21243. }
  21244. return s;
  21245. }
  21246. };
  21247. function processBinaryCMap(url, cMap, extend) {
  21248. var data = fetchBinaryData(url);
  21249. var stream = new BinaryCMapStream(data);
  21250. var header = stream.readByte();
  21251. cMap.vertical = !!(header & 1);
  21252. var useCMap = null;
  21253. var start = new Uint8Array(MAX_NUM_SIZE);
  21254. var end = new Uint8Array(MAX_NUM_SIZE);
  21255. var char = new Uint8Array(MAX_NUM_SIZE);
  21256. var charCode = new Uint8Array(MAX_NUM_SIZE);
  21257. var tmp = new Uint8Array(MAX_NUM_SIZE);
  21258. var code;
  21259. var b;
  21260. while ((b = stream.readByte()) >= 0) {
  21261. var type = b >> 5;
  21262. if (type === 7) { // metadata, e.g. comment or usecmap
  21263. switch (b & 0x1F) {
  21264. case 0:
  21265. stream.readString(); // skipping comment
  21266. break;
  21267. case 1:
  21268. useCMap = stream.readString();
  21269. break;
  21270. }
  21271. continue;
  21272. }
  21273. var sequence = !!(b & 0x10);
  21274. var dataSize = b & 15;
  21275. assert(dataSize + 1 <= MAX_NUM_SIZE);
  21276. var ucs2DataSize = 1;
  21277. var subitemsCount = stream.readNumber();
  21278. var i;
  21279. switch (type) {
  21280. case 0: // codespacerange
  21281. stream.readHex(start, dataSize);
  21282. stream.readHexNumber(end, dataSize);
  21283. addHex(end, start, dataSize);
  21284. cMap.addCodespaceRange(dataSize + 1, hexToInt(start, dataSize),
  21285. hexToInt(end, dataSize));
  21286. for (i = 1; i < subitemsCount; i++) {
  21287. incHex(end, dataSize);
  21288. stream.readHexNumber(start, dataSize);
  21289. addHex(start, end, dataSize);
  21290. stream.readHexNumber(end, dataSize);
  21291. addHex(end, start, dataSize);
  21292. cMap.addCodespaceRange(dataSize + 1, hexToInt(start, dataSize),
  21293. hexToInt(end, dataSize));
  21294. }
  21295. break;
  21296. case 1: // notdefrange
  21297. stream.readHex(start, dataSize);
  21298. stream.readHexNumber(end, dataSize);
  21299. addHex(end, start, dataSize);
  21300. code = stream.readNumber();
  21301. // undefined range, skipping
  21302. for (i = 1; i < subitemsCount; i++) {
  21303. incHex(end, dataSize);
  21304. stream.readHexNumber(start, dataSize);
  21305. addHex(start, end, dataSize);
  21306. stream.readHexNumber(end, dataSize);
  21307. addHex(end, start, dataSize);
  21308. code = stream.readNumber();
  21309. // nop
  21310. }
  21311. break;
  21312. case 2: // cidchar
  21313. stream.readHex(char, dataSize);
  21314. code = stream.readNumber();
  21315. cMap.mapOne(hexToInt(char, dataSize), String.fromCharCode(code));
  21316. for (i = 1; i < subitemsCount; i++) {
  21317. incHex(char, dataSize);
  21318. if (!sequence) {
  21319. stream.readHexNumber(tmp, dataSize);
  21320. addHex(char, tmp, dataSize);
  21321. }
  21322. code = stream.readSigned() + (code + 1);
  21323. cMap.mapOne(hexToInt(char, dataSize), String.fromCharCode(code));
  21324. }
  21325. break;
  21326. case 3: // cidrange
  21327. stream.readHex(start, dataSize);
  21328. stream.readHexNumber(end, dataSize);
  21329. addHex(end, start, dataSize);
  21330. code = stream.readNumber();
  21331. cMap.mapRange(hexToInt(start, dataSize), hexToInt(end, dataSize),
  21332. String.fromCharCode(code));
  21333. for (i = 1; i < subitemsCount; i++) {
  21334. incHex(end, dataSize);
  21335. if (!sequence) {
  21336. stream.readHexNumber(start, dataSize);
  21337. addHex(start, end, dataSize);
  21338. } else {
  21339. start.set(end);
  21340. }
  21341. stream.readHexNumber(end, dataSize);
  21342. addHex(end, start, dataSize);
  21343. code = stream.readNumber();
  21344. cMap.mapRange(hexToInt(start, dataSize), hexToInt(end, dataSize),
  21345. String.fromCharCode(code));
  21346. }
  21347. break;
  21348. case 4: // bfchar
  21349. stream.readHex(char, ucs2DataSize);
  21350. stream.readHex(charCode, dataSize);
  21351. cMap.mapOne(hexToInt(char, ucs2DataSize),
  21352. hexToStr(charCode, dataSize));
  21353. for (i = 1; i < subitemsCount; i++) {
  21354. incHex(char, ucs2DataSize);
  21355. if (!sequence) {
  21356. stream.readHexNumber(tmp, ucs2DataSize);
  21357. addHex(char, tmp, ucs2DataSize);
  21358. }
  21359. incHex(charCode, dataSize);
  21360. stream.readHexSigned(tmp, dataSize);
  21361. addHex(charCode, tmp, dataSize);
  21362. cMap.mapOne(hexToInt(char, ucs2DataSize),
  21363. hexToStr(charCode, dataSize));
  21364. }
  21365. break;
  21366. case 5: // bfrange
  21367. stream.readHex(start, ucs2DataSize);
  21368. stream.readHexNumber(end, ucs2DataSize);
  21369. addHex(end, start, ucs2DataSize);
  21370. stream.readHex(charCode, dataSize);
  21371. cMap.mapRange(hexToInt(start, ucs2DataSize),
  21372. hexToInt(end, ucs2DataSize),
  21373. hexToStr(charCode, dataSize));
  21374. for (i = 1; i < subitemsCount; i++) {
  21375. incHex(end, ucs2DataSize);
  21376. if (!sequence) {
  21377. stream.readHexNumber(start, ucs2DataSize);
  21378. addHex(start, end, ucs2DataSize);
  21379. } else {
  21380. start.set(end);
  21381. }
  21382. stream.readHexNumber(end, ucs2DataSize);
  21383. addHex(end, start, ucs2DataSize);
  21384. stream.readHex(charCode, dataSize);
  21385. cMap.mapRange(hexToInt(start, ucs2DataSize),
  21386. hexToInt(end, ucs2DataSize),
  21387. hexToStr(charCode, dataSize));
  21388. }
  21389. break;
  21390. default:
  21391. error('Unknown type: ' + type);
  21392. break;
  21393. }
  21394. }
  21395. if (useCMap) {
  21396. extend(useCMap);
  21397. }
  21398. return cMap;
  21399. }
  21400. function BinaryCMapReader() {}
  21401. BinaryCMapReader.prototype = {
  21402. read: processBinaryCMap
  21403. };
  21404. return BinaryCMapReader;
  21405. })();
  21406. var CMapFactory = (function CMapFactoryClosure() {
  21407. function strToInt(str) {
  21408. var a = 0;
  21409. for (var i = 0; i < str.length; i++) {
  21410. a = (a << 8) | str.charCodeAt(i);
  21411. }
  21412. return a >>> 0;
  21413. }
  21414. function expectString(obj) {
  21415. if (!isString(obj)) {
  21416. error('Malformed CMap: expected string.');
  21417. }
  21418. }
  21419. function expectInt(obj) {
  21420. if (!isInt(obj)) {
  21421. error('Malformed CMap: expected int.');
  21422. }
  21423. }
  21424. function parseBfChar(cMap, lexer) {
  21425. while (true) {
  21426. var obj = lexer.getObj();
  21427. if (isEOF(obj)) {
  21428. break;
  21429. }
  21430. if (isCmd(obj, 'endbfchar')) {
  21431. return;
  21432. }
  21433. expectString(obj);
  21434. var src = strToInt(obj);
  21435. obj = lexer.getObj();
  21436. // TODO are /dstName used?
  21437. expectString(obj);
  21438. var dst = obj;
  21439. cMap.mapOne(src, dst);
  21440. }
  21441. }
  21442. function parseBfRange(cMap, lexer) {
  21443. while (true) {
  21444. var obj = lexer.getObj();
  21445. if (isEOF(obj)) {
  21446. break;
  21447. }
  21448. if (isCmd(obj, 'endbfrange')) {
  21449. return;
  21450. }
  21451. expectString(obj);
  21452. var low = strToInt(obj);
  21453. obj = lexer.getObj();
  21454. expectString(obj);
  21455. var high = strToInt(obj);
  21456. obj = lexer.getObj();
  21457. if (isInt(obj) || isString(obj)) {
  21458. var dstLow = isInt(obj) ? String.fromCharCode(obj) : obj;
  21459. cMap.mapRange(low, high, dstLow);
  21460. } else if (isCmd(obj, '[')) {
  21461. obj = lexer.getObj();
  21462. var array = [];
  21463. while (!isCmd(obj, ']') && !isEOF(obj)) {
  21464. array.push(obj);
  21465. obj = lexer.getObj();
  21466. }
  21467. cMap.mapRangeToArray(low, high, array);
  21468. } else {
  21469. break;
  21470. }
  21471. }
  21472. error('Invalid bf range.');
  21473. }
  21474. function parseCidChar(cMap, lexer) {
  21475. while (true) {
  21476. var obj = lexer.getObj();
  21477. if (isEOF(obj)) {
  21478. break;
  21479. }
  21480. if (isCmd(obj, 'endcidchar')) {
  21481. return;
  21482. }
  21483. expectString(obj);
  21484. var src = strToInt(obj);
  21485. obj = lexer.getObj();
  21486. expectInt(obj);
  21487. var dst = String.fromCharCode(obj);
  21488. cMap.mapOne(src, dst);
  21489. }
  21490. }
  21491. function parseCidRange(cMap, lexer) {
  21492. while (true) {
  21493. var obj = lexer.getObj();
  21494. if (isEOF(obj)) {
  21495. break;
  21496. }
  21497. if (isCmd(obj, 'endcidrange')) {
  21498. return;
  21499. }
  21500. expectString(obj);
  21501. var low = strToInt(obj);
  21502. obj = lexer.getObj();
  21503. expectString(obj);
  21504. var high = strToInt(obj);
  21505. obj = lexer.getObj();
  21506. expectInt(obj);
  21507. var dstLow = String.fromCharCode(obj);
  21508. cMap.mapRange(low, high, dstLow);
  21509. }
  21510. }
  21511. function parseCodespaceRange(cMap, lexer) {
  21512. while (true) {
  21513. var obj = lexer.getObj();
  21514. if (isEOF(obj)) {
  21515. break;
  21516. }
  21517. if (isCmd(obj, 'endcodespacerange')) {
  21518. return;
  21519. }
  21520. if (!isString(obj)) {
  21521. break;
  21522. }
  21523. var low = strToInt(obj);
  21524. obj = lexer.getObj();
  21525. if (!isString(obj)) {
  21526. break;
  21527. }
  21528. var high = strToInt(obj);
  21529. cMap.addCodespaceRange(obj.length, low, high);
  21530. }
  21531. error('Invalid codespace range.');
  21532. }
  21533. function parseWMode(cMap, lexer) {
  21534. var obj = lexer.getObj();
  21535. if (isInt(obj)) {
  21536. cMap.vertical = !!obj;
  21537. }
  21538. }
  21539. function parseCMap(cMap, lexer, builtInCMapParams, useCMap) {
  21540. var previous;
  21541. var embededUseCMap;
  21542. objLoop: while (true) {
  21543. var obj = lexer.getObj();
  21544. if (isEOF(obj)) {
  21545. break;
  21546. } else if (isName(obj)) {
  21547. if (obj.name === 'WMode') {
  21548. parseWMode(cMap, lexer);
  21549. }
  21550. previous = obj;
  21551. } else if (isCmd(obj)) {
  21552. switch (obj.cmd) {
  21553. case 'endcmap':
  21554. break objLoop;
  21555. case 'usecmap':
  21556. if (isName(previous)) {
  21557. embededUseCMap = previous.name;
  21558. }
  21559. break;
  21560. case 'begincodespacerange':
  21561. parseCodespaceRange(cMap, lexer);
  21562. break;
  21563. case 'beginbfchar':
  21564. parseBfChar(cMap, lexer);
  21565. break;
  21566. case 'begincidchar':
  21567. parseCidChar(cMap, lexer);
  21568. break;
  21569. case 'beginbfrange':
  21570. parseBfRange(cMap, lexer);
  21571. break;
  21572. case 'begincidrange':
  21573. parseCidRange(cMap, lexer);
  21574. break;
  21575. }
  21576. }
  21577. }
  21578. if (!useCMap && embededUseCMap) {
  21579. // Load the usecmap definition from the file only if there wasn't one
  21580. // specified.
  21581. useCMap = embededUseCMap;
  21582. }
  21583. if (useCMap) {
  21584. extendCMap(cMap, builtInCMapParams, useCMap);
  21585. }
  21586. }
  21587. function extendCMap(cMap, builtInCMapParams, useCMap) {
  21588. cMap.useCMap = createBuiltInCMap(useCMap, builtInCMapParams);
  21589. // If there aren't any code space ranges defined clone all the parent ones
  21590. // into this cMap.
  21591. if (cMap.numCodespaceRanges === 0) {
  21592. var useCodespaceRanges = cMap.useCMap.codespaceRanges;
  21593. for (var i = 0; i < useCodespaceRanges.length; i++) {
  21594. cMap.codespaceRanges[i] = useCodespaceRanges[i].slice();
  21595. }
  21596. cMap.numCodespaceRanges = cMap.useCMap.numCodespaceRanges;
  21597. }
  21598. // Merge the map into the current one, making sure not to override
  21599. // any previously defined entries.
  21600. for (var key in cMap.useCMap.map) {
  21601. if (key in cMap.map) {
  21602. continue;
  21603. }
  21604. cMap.map[key] = cMap.useCMap.map[key];
  21605. }
  21606. }
  21607. function parseBinaryCMap(name, builtInCMapParams) {
  21608. var url = builtInCMapParams.url + name + '.bcmap';
  21609. var cMap = new CMap(true);
  21610. new BinaryCMapReader().read(url, cMap, function (useCMap) {
  21611. extendCMap(cMap, builtInCMapParams, useCMap);
  21612. });
  21613. return cMap;
  21614. }
  21615. function createBuiltInCMap(name, builtInCMapParams) {
  21616. if (name === 'Identity-H') {
  21617. return new IdentityCMap(false, 2);
  21618. } else if (name === 'Identity-V') {
  21619. return new IdentityCMap(true, 2);
  21620. }
  21621. if (BUILT_IN_CMAPS.indexOf(name) === -1) {
  21622. error('Unknown cMap name: ' + name);
  21623. }
  21624. assert (builtInCMapParams, 'buildin cmap parameters are not provided');
  21625. if (builtInCMapParams.packed) {
  21626. return parseBinaryCMap(name, builtInCMapParams);
  21627. }
  21628. var request = new XMLHttpRequest();
  21629. var url = builtInCMapParams.url + name;
  21630. request.open('GET', url, false);
  21631. request.send(null);
  21632. if (request.status === 0 && /^https?:/i.test(url)) {
  21633. error('Unable to get cMap at: ' + url);
  21634. }
  21635. var cMap = new CMap(true);
  21636. var lexer = new Lexer(new StringStream(request.responseText));
  21637. parseCMap(cMap, lexer, builtInCMapParams, null);
  21638. return cMap;
  21639. }
  21640. return {
  21641. create: function (encoding, builtInCMapParams, useCMap) {
  21642. if (isName(encoding)) {
  21643. return createBuiltInCMap(encoding.name, builtInCMapParams);
  21644. } else if (isStream(encoding)) {
  21645. var cMap = new CMap();
  21646. var lexer = new Lexer(encoding);
  21647. try {
  21648. parseCMap(cMap, lexer, builtInCMapParams, useCMap);
  21649. } catch (e) {
  21650. warn('Invalid CMap data. ' + e);
  21651. }
  21652. return cMap;
  21653. }
  21654. error('Encoding required.');
  21655. }
  21656. };
  21657. })();
  21658. // Unicode Private Use Area
  21659. var PRIVATE_USE_OFFSET_START = 0xE000;
  21660. var PRIVATE_USE_OFFSET_END = 0xF8FF;
  21661. var SKIP_PRIVATE_USE_RANGE_F000_TO_F01F = false;
  21662. // PDF Glyph Space Units are one Thousandth of a TextSpace Unit
  21663. // except for Type 3 fonts
  21664. var PDF_GLYPH_SPACE_UNITS = 1000;
  21665. // Hinting is currently disabled due to unknown problems on windows
  21666. // in tracemonkey and various other pdfs with type1 fonts.
  21667. var HINTING_ENABLED = false;
  21668. // Accented charactars are not displayed properly on windows, using this flag
  21669. // to control analysis of seac charstrings.
  21670. var SEAC_ANALYSIS_ENABLED = false;
  21671. var FontFlags = {
  21672. FixedPitch: 1,
  21673. Serif: 2,
  21674. Symbolic: 4,
  21675. Script: 8,
  21676. Nonsymbolic: 32,
  21677. Italic: 64,
  21678. AllCap: 65536,
  21679. SmallCap: 131072,
  21680. ForceBold: 262144
  21681. };
  21682. var Encodings = {
  21683. ExpertEncoding: ['', '', '', '', '', '', '', '', '', '', '', '', '', '', '',
  21684. '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '',
  21685. 'space', 'exclamsmall', 'Hungarumlautsmall', '', 'dollaroldstyle',
  21686. 'dollarsuperior', 'ampersandsmall', 'Acutesmall', 'parenleftsuperior',
  21687. 'parenrightsuperior', 'twodotenleader', 'onedotenleader', 'comma',
  21688. 'hyphen', 'period', 'fraction', 'zerooldstyle', 'oneoldstyle',
  21689. 'twooldstyle', 'threeoldstyle', 'fouroldstyle', 'fiveoldstyle',
  21690. 'sixoldstyle', 'sevenoldstyle', 'eightoldstyle', 'nineoldstyle', 'colon',
  21691. 'semicolon', 'commasuperior', 'threequartersemdash', 'periodsuperior',
  21692. 'questionsmall', '', 'asuperior', 'bsuperior', 'centsuperior', 'dsuperior',
  21693. 'esuperior', '', '', 'isuperior', '', '', 'lsuperior', 'msuperior',
  21694. 'nsuperior', 'osuperior', '', '', 'rsuperior', 'ssuperior', 'tsuperior',
  21695. '', 'ff', 'fi', 'fl', 'ffi', 'ffl', 'parenleftinferior', '',
  21696. 'parenrightinferior', 'Circumflexsmall', 'hyphensuperior', 'Gravesmall',
  21697. 'Asmall', 'Bsmall', 'Csmall', 'Dsmall', 'Esmall', 'Fsmall', 'Gsmall',
  21698. 'Hsmall', 'Ismall', 'Jsmall', 'Ksmall', 'Lsmall', 'Msmall', 'Nsmall',
  21699. 'Osmall', 'Psmall', 'Qsmall', 'Rsmall', 'Ssmall', 'Tsmall', 'Usmall',
  21700. 'Vsmall', 'Wsmall', 'Xsmall', 'Ysmall', 'Zsmall', 'colonmonetary',
  21701. 'onefitted', 'rupiah', 'Tildesmall', '', '', '', '', '', '', '', '', '',
  21702. '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '',
  21703. '', '', '', '', '', '', 'exclamdownsmall', 'centoldstyle', 'Lslashsmall',
  21704. '', '', 'Scaronsmall', 'Zcaronsmall', 'Dieresissmall', 'Brevesmall',
  21705. 'Caronsmall', '', 'Dotaccentsmall', '', '', 'Macronsmall', '', '',
  21706. 'figuredash', 'hypheninferior', '', '', 'Ogoneksmall', 'Ringsmall',
  21707. 'Cedillasmall', '', '', '', 'onequarter', 'onehalf', 'threequarters',
  21708. 'questiondownsmall', 'oneeighth', 'threeeighths', 'fiveeighths',
  21709. 'seveneighths', 'onethird', 'twothirds', '', '', 'zerosuperior',
  21710. 'onesuperior', 'twosuperior', 'threesuperior', 'foursuperior',
  21711. 'fivesuperior', 'sixsuperior', 'sevensuperior', 'eightsuperior',
  21712. 'ninesuperior', 'zeroinferior', 'oneinferior', 'twoinferior',
  21713. 'threeinferior', 'fourinferior', 'fiveinferior', 'sixinferior',
  21714. 'seveninferior', 'eightinferior', 'nineinferior', 'centinferior',
  21715. 'dollarinferior', 'periodinferior', 'commainferior', 'Agravesmall',
  21716. 'Aacutesmall', 'Acircumflexsmall', 'Atildesmall', 'Adieresissmall',
  21717. 'Aringsmall', 'AEsmall', 'Ccedillasmall', 'Egravesmall', 'Eacutesmall',
  21718. 'Ecircumflexsmall', 'Edieresissmall', 'Igravesmall', 'Iacutesmall',
  21719. 'Icircumflexsmall', 'Idieresissmall', 'Ethsmall', 'Ntildesmall',
  21720. 'Ogravesmall', 'Oacutesmall', 'Ocircumflexsmall', 'Otildesmall',
  21721. 'Odieresissmall', 'OEsmall', 'Oslashsmall', 'Ugravesmall', 'Uacutesmall',
  21722. 'Ucircumflexsmall', 'Udieresissmall', 'Yacutesmall', 'Thornsmall',
  21723. 'Ydieresissmall'],
  21724. MacExpertEncoding: ['', '', '', '', '', '', '', '', '', '', '', '', '', '',
  21725. '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '',
  21726. 'space', 'exclamsmall', 'Hungarumlautsmall', 'centoldstyle',
  21727. 'dollaroldstyle', 'dollarsuperior', 'ampersandsmall', 'Acutesmall',
  21728. 'parenleftsuperior', 'parenrightsuperior', 'twodotenleader',
  21729. 'onedotenleader', 'comma', 'hyphen', 'period', 'fraction', 'zerooldstyle',
  21730. 'oneoldstyle', 'twooldstyle', 'threeoldstyle', 'fouroldstyle',
  21731. 'fiveoldstyle', 'sixoldstyle', 'sevenoldstyle', 'eightoldstyle',
  21732. 'nineoldstyle', 'colon', 'semicolon', '', 'threequartersemdash', '',
  21733. 'questionsmall', '', '', '', '', 'Ethsmall', '', '', 'onequarter',
  21734. 'onehalf', 'threequarters', 'oneeighth', 'threeeighths', 'fiveeighths',
  21735. 'seveneighths', 'onethird', 'twothirds', '', '', '', '', '', '', 'ff',
  21736. 'fi', 'fl', 'ffi', 'ffl', 'parenleftinferior', '', 'parenrightinferior',
  21737. 'Circumflexsmall', 'hypheninferior', 'Gravesmall', 'Asmall', 'Bsmall',
  21738. 'Csmall', 'Dsmall', 'Esmall', 'Fsmall', 'Gsmall', 'Hsmall', 'Ismall',
  21739. 'Jsmall', 'Ksmall', 'Lsmall', 'Msmall', 'Nsmall', 'Osmall', 'Psmall',
  21740. 'Qsmall', 'Rsmall', 'Ssmall', 'Tsmall', 'Usmall', 'Vsmall', 'Wsmall',
  21741. 'Xsmall', 'Ysmall', 'Zsmall', 'colonmonetary', 'onefitted', 'rupiah',
  21742. 'Tildesmall', '', '', 'asuperior', 'centsuperior', '', '', '', '',
  21743. 'Aacutesmall', 'Agravesmall', 'Acircumflexsmall', 'Adieresissmall',
  21744. 'Atildesmall', 'Aringsmall', 'Ccedillasmall', 'Eacutesmall', 'Egravesmall',
  21745. 'Ecircumflexsmall', 'Edieresissmall', 'Iacutesmall', 'Igravesmall',
  21746. 'Icircumflexsmall', 'Idieresissmall', 'Ntildesmall', 'Oacutesmall',
  21747. 'Ogravesmall', 'Ocircumflexsmall', 'Odieresissmall', 'Otildesmall',
  21748. 'Uacutesmall', 'Ugravesmall', 'Ucircumflexsmall', 'Udieresissmall', '',
  21749. 'eightsuperior', 'fourinferior', 'threeinferior', 'sixinferior',
  21750. 'eightinferior', 'seveninferior', 'Scaronsmall', '', 'centinferior',
  21751. 'twoinferior', '', 'Dieresissmall', '', 'Caronsmall', 'osuperior',
  21752. 'fiveinferior', '', 'commainferior', 'periodinferior', 'Yacutesmall', '',
  21753. 'dollarinferior', '', 'Thornsmall', '', 'nineinferior', 'zeroinferior',
  21754. 'Zcaronsmall', 'AEsmall', 'Oslashsmall', 'questiondownsmall',
  21755. 'oneinferior', 'Lslashsmall', '', '', '', '', '', '', 'Cedillasmall', '',
  21756. '', '', '', '', 'OEsmall', 'figuredash', 'hyphensuperior', '', '', '', '',
  21757. 'exclamdownsmall', '', 'Ydieresissmall', '', 'onesuperior', 'twosuperior',
  21758. 'threesuperior', 'foursuperior', 'fivesuperior', 'sixsuperior',
  21759. 'sevensuperior', 'ninesuperior', 'zerosuperior', '', 'esuperior',
  21760. 'rsuperior', 'tsuperior', '', '', 'isuperior', 'ssuperior', 'dsuperior',
  21761. '', '', '', '', '', 'lsuperior', 'Ogoneksmall', 'Brevesmall',
  21762. 'Macronsmall', 'bsuperior', 'nsuperior', 'msuperior', 'commasuperior',
  21763. 'periodsuperior', 'Dotaccentsmall', 'Ringsmall'],
  21764. MacRomanEncoding: ['', '', '', '', '', '', '', '', '', '', '', '', '', '', '',
  21765. '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '',
  21766. 'space', 'exclam', 'quotedbl', 'numbersign', 'dollar', 'percent',
  21767. 'ampersand', 'quotesingle', 'parenleft', 'parenright', 'asterisk', 'plus',
  21768. 'comma', 'hyphen', 'period', 'slash', 'zero', 'one', 'two', 'three',
  21769. 'four', 'five', 'six', 'seven', 'eight', 'nine', 'colon', 'semicolon',
  21770. 'less', 'equal', 'greater', 'question', 'at', 'A', 'B', 'C', 'D', 'E', 'F',
  21771. 'G', 'H', 'I', 'J', 'K', 'L', 'M', 'N', 'O', 'P', 'Q', 'R', 'S', 'T', 'U',
  21772. 'V', 'W', 'X', 'Y', 'Z', 'bracketleft', 'backslash', 'bracketright',
  21773. 'asciicircum', 'underscore', 'grave', 'a', 'b', 'c', 'd', 'e', 'f', 'g',
  21774. 'h', 'i', 'j', 'k', 'l', 'm', 'n', 'o', 'p', 'q', 'r', 's', 't', 'u', 'v',
  21775. 'w', 'x', 'y', 'z', 'braceleft', 'bar', 'braceright', 'asciitilde', '',
  21776. 'Adieresis', 'Aring', 'Ccedilla', 'Eacute', 'Ntilde', 'Odieresis',
  21777. 'Udieresis', 'aacute', 'agrave', 'acircumflex', 'adieresis', 'atilde',
  21778. 'aring', 'ccedilla', 'eacute', 'egrave', 'ecircumflex', 'edieresis',
  21779. 'iacute', 'igrave', 'icircumflex', 'idieresis', 'ntilde', 'oacute',
  21780. 'ograve', 'ocircumflex', 'odieresis', 'otilde', 'uacute', 'ugrave',
  21781. 'ucircumflex', 'udieresis', 'dagger', 'degree', 'cent', 'sterling',
  21782. 'section', 'bullet', 'paragraph', 'germandbls', 'registered', 'copyright',
  21783. 'trademark', 'acute', 'dieresis', 'notequal', 'AE', 'Oslash', 'infinity',
  21784. 'plusminus', 'lessequal', 'greaterequal', 'yen', 'mu', 'partialdiff',
  21785. 'summation', 'product', 'pi', 'integral', 'ordfeminine', 'ordmasculine',
  21786. 'Omega', 'ae', 'oslash', 'questiondown', 'exclamdown', 'logicalnot',
  21787. 'radical', 'florin', 'approxequal', 'Delta', 'guillemotleft',
  21788. 'guillemotright', 'ellipsis', 'space', 'Agrave', 'Atilde', 'Otilde', 'OE',
  21789. 'oe', 'endash', 'emdash', 'quotedblleft', 'quotedblright', 'quoteleft',
  21790. 'quoteright', 'divide', 'lozenge', 'ydieresis', 'Ydieresis', 'fraction',
  21791. 'currency', 'guilsinglleft', 'guilsinglright', 'fi', 'fl', 'daggerdbl',
  21792. 'periodcentered', 'quotesinglbase', 'quotedblbase', 'perthousand',
  21793. 'Acircumflex', 'Ecircumflex', 'Aacute', 'Edieresis', 'Egrave', 'Iacute',
  21794. 'Icircumflex', 'Idieresis', 'Igrave', 'Oacute', 'Ocircumflex', 'apple',
  21795. 'Ograve', 'Uacute', 'Ucircumflex', 'Ugrave', 'dotlessi', 'circumflex',
  21796. 'tilde', 'macron', 'breve', 'dotaccent', 'ring', 'cedilla', 'hungarumlaut',
  21797. 'ogonek', 'caron'],
  21798. StandardEncoding: ['', '', '', '', '', '', '', '', '', '', '', '', '', '', '',
  21799. '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '',
  21800. 'space', 'exclam', 'quotedbl', 'numbersign', 'dollar', 'percent',
  21801. 'ampersand', 'quoteright', 'parenleft', 'parenright', 'asterisk', 'plus',
  21802. 'comma', 'hyphen', 'period', 'slash', 'zero', 'one', 'two', 'three',
  21803. 'four', 'five', 'six', 'seven', 'eight', 'nine', 'colon', 'semicolon',
  21804. 'less', 'equal', 'greater', 'question', 'at', 'A', 'B', 'C', 'D', 'E', 'F',
  21805. 'G', 'H', 'I', 'J', 'K', 'L', 'M', 'N', 'O', 'P', 'Q', 'R', 'S', 'T', 'U',
  21806. 'V', 'W', 'X', 'Y', 'Z', 'bracketleft', 'backslash', 'bracketright',
  21807. 'asciicircum', 'underscore', 'quoteleft', 'a', 'b', 'c', 'd', 'e', 'f',
  21808. 'g', 'h', 'i', 'j', 'k', 'l', 'm', 'n', 'o', 'p', 'q', 'r', 's', 't', 'u',
  21809. 'v', 'w', 'x', 'y', 'z', 'braceleft', 'bar', 'braceright', 'asciitilde',
  21810. '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '',
  21811. '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', 'exclamdown',
  21812. 'cent', 'sterling', 'fraction', 'yen', 'florin', 'section', 'currency',
  21813. 'quotesingle', 'quotedblleft', 'guillemotleft', 'guilsinglleft',
  21814. 'guilsinglright', 'fi', 'fl', '', 'endash', 'dagger', 'daggerdbl',
  21815. 'periodcentered', '', 'paragraph', 'bullet', 'quotesinglbase',
  21816. 'quotedblbase', 'quotedblright', 'guillemotright', 'ellipsis',
  21817. 'perthousand', '', 'questiondown', '', 'grave', 'acute', 'circumflex',
  21818. 'tilde', 'macron', 'breve', 'dotaccent', 'dieresis', '', 'ring', 'cedilla',
  21819. '', 'hungarumlaut', 'ogonek', 'caron', 'emdash', '', '', '', '', '', '',
  21820. '', '', '', '', '', '', '', '', '', '', 'AE', '', 'ordfeminine', '', '',
  21821. '', '', 'Lslash', 'Oslash', 'OE', 'ordmasculine', '', '', '', '', '', 'ae',
  21822. '', '', '', 'dotlessi', '', '', 'lslash', 'oslash', 'oe', 'germandbls'],
  21823. WinAnsiEncoding: ['', '', '', '', '', '', '', '', '', '', '', '', '', '', '',
  21824. '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '',
  21825. 'space', 'exclam', 'quotedbl', 'numbersign', 'dollar', 'percent',
  21826. 'ampersand', 'quotesingle', 'parenleft', 'parenright', 'asterisk', 'plus',
  21827. 'comma', 'hyphen', 'period', 'slash', 'zero', 'one', 'two', 'three',
  21828. 'four', 'five', 'six', 'seven', 'eight', 'nine', 'colon', 'semicolon',
  21829. 'less', 'equal', 'greater', 'question', 'at', 'A', 'B', 'C', 'D', 'E', 'F',
  21830. 'G', 'H', 'I', 'J', 'K', 'L', 'M', 'N', 'O', 'P', 'Q', 'R', 'S', 'T', 'U',
  21831. 'V', 'W', 'X', 'Y', 'Z', 'bracketleft', 'backslash', 'bracketright',
  21832. 'asciicircum', 'underscore', 'grave', 'a', 'b', 'c', 'd', 'e', 'f', 'g',
  21833. 'h', 'i', 'j', 'k', 'l', 'm', 'n', 'o', 'p', 'q', 'r', 's', 't', 'u', 'v',
  21834. 'w', 'x', 'y', 'z', 'braceleft', 'bar', 'braceright', 'asciitilde',
  21835. 'bullet', 'Euro', 'bullet', 'quotesinglbase', 'florin', 'quotedblbase',
  21836. 'ellipsis', 'dagger', 'daggerdbl', 'circumflex', 'perthousand', 'Scaron',
  21837. 'guilsinglleft', 'OE', 'bullet', 'Zcaron', 'bullet', 'bullet', 'quoteleft',
  21838. 'quoteright', 'quotedblleft', 'quotedblright', 'bullet', 'endash',
  21839. 'emdash', 'tilde', 'trademark', 'scaron', 'guilsinglright', 'oe', 'bullet',
  21840. 'zcaron', 'Ydieresis', 'space', 'exclamdown', 'cent', 'sterling',
  21841. 'currency', 'yen', 'brokenbar', 'section', 'dieresis', 'copyright',
  21842. 'ordfeminine', 'guillemotleft', 'logicalnot', 'hyphen', 'registered',
  21843. 'macron', 'degree', 'plusminus', 'twosuperior', 'threesuperior', 'acute',
  21844. 'mu', 'paragraph', 'periodcentered', 'cedilla', 'onesuperior',
  21845. 'ordmasculine', 'guillemotright', 'onequarter', 'onehalf', 'threequarters',
  21846. 'questiondown', 'Agrave', 'Aacute', 'Acircumflex', 'Atilde', 'Adieresis',
  21847. 'Aring', 'AE', 'Ccedilla', 'Egrave', 'Eacute', 'Ecircumflex', 'Edieresis',
  21848. 'Igrave', 'Iacute', 'Icircumflex', 'Idieresis', 'Eth', 'Ntilde', 'Ograve',
  21849. 'Oacute', 'Ocircumflex', 'Otilde', 'Odieresis', 'multiply', 'Oslash',
  21850. 'Ugrave', 'Uacute', 'Ucircumflex', 'Udieresis', 'Yacute', 'Thorn',
  21851. 'germandbls', 'agrave', 'aacute', 'acircumflex', 'atilde', 'adieresis',
  21852. 'aring', 'ae', 'ccedilla', 'egrave', 'eacute', 'ecircumflex', 'edieresis',
  21853. 'igrave', 'iacute', 'icircumflex', 'idieresis', 'eth', 'ntilde', 'ograve',
  21854. 'oacute', 'ocircumflex', 'otilde', 'odieresis', 'divide', 'oslash',
  21855. 'ugrave', 'uacute', 'ucircumflex', 'udieresis', 'yacute', 'thorn',
  21856. 'ydieresis'],
  21857. SymbolSetEncoding: ['', '', '', '', '', '', '', '', '', '', '', '', '', '',
  21858. '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '',
  21859. 'space', 'exclam', 'universal', 'numbersign', 'existential', 'percent',
  21860. 'ampersand', 'suchthat', 'parenleft', 'parenright', 'asteriskmath', 'plus',
  21861. 'comma', 'minus', 'period', 'slash', 'zero', 'one', 'two', 'three', 'four',
  21862. 'five', 'six', 'seven', 'eight', 'nine', 'colon', 'semicolon', 'less',
  21863. 'equal', 'greater', 'question', 'congruent', 'Alpha', 'Beta', 'Chi',
  21864. 'Delta', 'Epsilon', 'Phi', 'Gamma', 'Eta', 'Iota', 'theta1', 'Kappa',
  21865. 'Lambda', 'Mu', 'Nu', 'Omicron', 'Pi', 'Theta', 'Rho', 'Sigma', 'Tau',
  21866. 'Upsilon', 'sigma1', 'Omega', 'Xi', 'Psi', 'Zeta', 'bracketleft',
  21867. 'therefore', 'bracketright', 'perpendicular', 'underscore', 'radicalex',
  21868. 'alpha', 'beta', 'chi', 'delta', 'epsilon', 'phi', 'gamma', 'eta', 'iota',
  21869. 'phi1', 'kappa', 'lambda', 'mu', 'nu', 'omicron', 'pi', 'theta', 'rho',
  21870. 'sigma', 'tau', 'upsilon', 'omega1', 'omega', 'xi', 'psi', 'zeta',
  21871. 'braceleft', 'bar', 'braceright', 'similar', '', '', '', '', '', '', '',
  21872. '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '',
  21873. '', '', '', '', '', '', '', 'Euro', 'Upsilon1', 'minute', 'lessequal',
  21874. 'fraction', 'infinity', 'florin', 'club', 'diamond', 'heart', 'spade',
  21875. 'arrowboth', 'arrowleft', 'arrowup', 'arrowright', 'arrowdown', 'degree',
  21876. 'plusminus', 'second', 'greaterequal', 'multiply', 'proportional',
  21877. 'partialdiff', 'bullet', 'divide', 'notequal', 'equivalence',
  21878. 'approxequal', 'ellipsis', 'arrowvertex', 'arrowhorizex', 'carriagereturn',
  21879. 'aleph', 'Ifraktur', 'Rfraktur', 'weierstrass', 'circlemultiply',
  21880. 'circleplus', 'emptyset', 'intersection', 'union', 'propersuperset',
  21881. 'reflexsuperset', 'notsubset', 'propersubset', 'reflexsubset', 'element',
  21882. 'notelement', 'angle', 'gradient', 'registerserif', 'copyrightserif',
  21883. 'trademarkserif', 'product', 'radical', 'dotmath', 'logicalnot',
  21884. 'logicaland', 'logicalor', 'arrowdblboth', 'arrowdblleft', 'arrowdblup',
  21885. 'arrowdblright', 'arrowdbldown', 'lozenge', 'angleleft', 'registersans',
  21886. 'copyrightsans', 'trademarksans', 'summation', 'parenlefttp',
  21887. 'parenleftex', 'parenleftbt', 'bracketlefttp', 'bracketleftex',
  21888. 'bracketleftbt', 'bracelefttp', 'braceleftmid', 'braceleftbt', 'braceex',
  21889. '', 'angleright', 'integral', 'integraltp', 'integralex', 'integralbt',
  21890. 'parenrighttp', 'parenrightex', 'parenrightbt', 'bracketrighttp',
  21891. 'bracketrightex', 'bracketrightbt', 'bracerighttp', 'bracerightmid',
  21892. 'bracerightbt'],
  21893. zapfDingbatsEncoding: ['', '', '', '', '', '', '', '', '', '', '', '', '', '',
  21894. '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '',
  21895. 'space', 'a1', 'a2', 'a202', 'a3', 'a4', 'a5', 'a119', 'a118', 'a117',
  21896. 'a11', 'a12', 'a13', 'a14', 'a15', 'a16', 'a105', 'a17', 'a18', 'a19',
  21897. 'a20', 'a21', 'a22', 'a23', 'a24', 'a25', 'a26', 'a27', 'a28', 'a6', 'a7',
  21898. 'a8', 'a9', 'a10', 'a29', 'a30', 'a31', 'a32', 'a33', 'a34', 'a35', 'a36',
  21899. 'a37', 'a38', 'a39', 'a40', 'a41', 'a42', 'a43', 'a44', 'a45', 'a46',
  21900. 'a47', 'a48', 'a49', 'a50', 'a51', 'a52', 'a53', 'a54', 'a55', 'a56',
  21901. 'a57', 'a58', 'a59', 'a60', 'a61', 'a62', 'a63', 'a64', 'a65', 'a66',
  21902. 'a67', 'a68', 'a69', 'a70', 'a71', 'a72', 'a73', 'a74', 'a203', 'a75',
  21903. 'a204', 'a76', 'a77', 'a78', 'a79', 'a81', 'a82', 'a83', 'a84', 'a97',
  21904. 'a98', 'a99', 'a100', '', '', '', '', '', '', '', '', '', '', '', '', '',
  21905. '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '',
  21906. '', '', 'a101', 'a102', 'a103', 'a104', 'a106', 'a107', 'a108', 'a112',
  21907. 'a111', 'a110', 'a109', 'a120', 'a121', 'a122', 'a123', 'a124', 'a125',
  21908. 'a126', 'a127', 'a128', 'a129', 'a130', 'a131', 'a132', 'a133', 'a134',
  21909. 'a135', 'a136', 'a137', 'a138', 'a139', 'a140', 'a141', 'a142', 'a143',
  21910. 'a144', 'a145', 'a146', 'a147', 'a148', 'a149', 'a150', 'a151', 'a152',
  21911. 'a153', 'a154', 'a155', 'a156', 'a157', 'a158', 'a159', 'a160', 'a161',
  21912. 'a163', 'a164', 'a196', 'a165', 'a192', 'a166', 'a167', 'a168', 'a169',
  21913. 'a170', 'a171', 'a172', 'a173', 'a162', 'a174', 'a175', 'a176', 'a177',
  21914. 'a178', 'a179', 'a193', 'a180', 'a199', 'a181', 'a200', 'a182', '', 'a201',
  21915. 'a183', 'a184', 'a197', 'a185', 'a194', 'a198', 'a186', 'a195', 'a187',
  21916. 'a188', 'a189', 'a190', 'a191']
  21917. };
  21918. /**
  21919. * Hold a map of decoded fonts and of the standard fourteen Type1
  21920. * fonts and their acronyms.
  21921. */
  21922. var stdFontMap = {
  21923. 'ArialNarrow': 'Helvetica',
  21924. 'ArialNarrow-Bold': 'Helvetica-Bold',
  21925. 'ArialNarrow-BoldItalic': 'Helvetica-BoldOblique',
  21926. 'ArialNarrow-Italic': 'Helvetica-Oblique',
  21927. 'ArialBlack': 'Helvetica',
  21928. 'ArialBlack-Bold': 'Helvetica-Bold',
  21929. 'ArialBlack-BoldItalic': 'Helvetica-BoldOblique',
  21930. 'ArialBlack-Italic': 'Helvetica-Oblique',
  21931. 'Arial': 'Helvetica',
  21932. 'Arial-Bold': 'Helvetica-Bold',
  21933. 'Arial-BoldItalic': 'Helvetica-BoldOblique',
  21934. 'Arial-Italic': 'Helvetica-Oblique',
  21935. 'Arial-BoldItalicMT': 'Helvetica-BoldOblique',
  21936. 'Arial-BoldMT': 'Helvetica-Bold',
  21937. 'Arial-ItalicMT': 'Helvetica-Oblique',
  21938. 'ArialMT': 'Helvetica',
  21939. 'Courier-Bold': 'Courier-Bold',
  21940. 'Courier-BoldItalic': 'Courier-BoldOblique',
  21941. 'Courier-Italic': 'Courier-Oblique',
  21942. 'CourierNew': 'Courier',
  21943. 'CourierNew-Bold': 'Courier-Bold',
  21944. 'CourierNew-BoldItalic': 'Courier-BoldOblique',
  21945. 'CourierNew-Italic': 'Courier-Oblique',
  21946. 'CourierNewPS-BoldItalicMT': 'Courier-BoldOblique',
  21947. 'CourierNewPS-BoldMT': 'Courier-Bold',
  21948. 'CourierNewPS-ItalicMT': 'Courier-Oblique',
  21949. 'CourierNewPSMT': 'Courier',
  21950. 'Helvetica-Bold': 'Helvetica-Bold',
  21951. 'Helvetica-BoldItalic': 'Helvetica-BoldOblique',
  21952. 'Helvetica-Italic': 'Helvetica-Oblique',
  21953. 'Symbol-Bold': 'Symbol',
  21954. 'Symbol-BoldItalic': 'Symbol',
  21955. 'Symbol-Italic': 'Symbol',
  21956. 'TimesNewRoman': 'Times-Roman',
  21957. 'TimesNewRoman-Bold': 'Times-Bold',
  21958. 'TimesNewRoman-BoldItalic': 'Times-BoldItalic',
  21959. 'TimesNewRoman-Italic': 'Times-Italic',
  21960. 'TimesNewRomanPS': 'Times-Roman',
  21961. 'TimesNewRomanPS-Bold': 'Times-Bold',
  21962. 'TimesNewRomanPS-BoldItalic': 'Times-BoldItalic',
  21963. 'TimesNewRomanPS-BoldItalicMT': 'Times-BoldItalic',
  21964. 'TimesNewRomanPS-BoldMT': 'Times-Bold',
  21965. 'TimesNewRomanPS-Italic': 'Times-Italic',
  21966. 'TimesNewRomanPS-ItalicMT': 'Times-Italic',
  21967. 'TimesNewRomanPSMT': 'Times-Roman',
  21968. 'TimesNewRomanPSMT-Bold': 'Times-Bold',
  21969. 'TimesNewRomanPSMT-BoldItalic': 'Times-BoldItalic',
  21970. 'TimesNewRomanPSMT-Italic': 'Times-Italic'
  21971. };
  21972. /**
  21973. * Holds the map of the non-standard fonts that might be included as a standard
  21974. * fonts without glyph data.
  21975. */
  21976. var nonStdFontMap = {
  21977. 'ComicSansMS': 'Comic Sans MS',
  21978. 'ComicSansMS-Bold': 'Comic Sans MS-Bold',
  21979. 'ComicSansMS-BoldItalic': 'Comic Sans MS-BoldItalic',
  21980. 'ComicSansMS-Italic': 'Comic Sans MS-Italic',
  21981. 'LucidaConsole': 'Courier',
  21982. 'LucidaConsole-Bold': 'Courier-Bold',
  21983. 'LucidaConsole-BoldItalic': 'Courier-BoldOblique',
  21984. 'LucidaConsole-Italic': 'Courier-Oblique',
  21985. 'MS-Gothic': 'MS Gothic',
  21986. 'MS-Gothic-Bold': 'MS Gothic-Bold',
  21987. 'MS-Gothic-BoldItalic': 'MS Gothic-BoldItalic',
  21988. 'MS-Gothic-Italic': 'MS Gothic-Italic',
  21989. 'MS-Mincho': 'MS Mincho',
  21990. 'MS-Mincho-Bold': 'MS Mincho-Bold',
  21991. 'MS-Mincho-BoldItalic': 'MS Mincho-BoldItalic',
  21992. 'MS-Mincho-Italic': 'MS Mincho-Italic',
  21993. 'MS-PGothic': 'MS PGothic',
  21994. 'MS-PGothic-Bold': 'MS PGothic-Bold',
  21995. 'MS-PGothic-BoldItalic': 'MS PGothic-BoldItalic',
  21996. 'MS-PGothic-Italic': 'MS PGothic-Italic',
  21997. 'MS-PMincho': 'MS PMincho',
  21998. 'MS-PMincho-Bold': 'MS PMincho-Bold',
  21999. 'MS-PMincho-BoldItalic': 'MS PMincho-BoldItalic',
  22000. 'MS-PMincho-Italic': 'MS PMincho-Italic'
  22001. };
  22002. var serifFonts = {
  22003. 'Adobe Jenson': true, 'Adobe Text': true, 'Albertus': true,
  22004. 'Aldus': true, 'Alexandria': true, 'Algerian': true,
  22005. 'American Typewriter': true, 'Antiqua': true, 'Apex': true,
  22006. 'Arno': true, 'Aster': true, 'Aurora': true,
  22007. 'Baskerville': true, 'Bell': true, 'Bembo': true,
  22008. 'Bembo Schoolbook': true, 'Benguiat': true, 'Berkeley Old Style': true,
  22009. 'Bernhard Modern': true, 'Berthold City': true, 'Bodoni': true,
  22010. 'Bauer Bodoni': true, 'Book Antiqua': true, 'Bookman': true,
  22011. 'Bordeaux Roman': true, 'Californian FB': true, 'Calisto': true,
  22012. 'Calvert': true, 'Capitals': true, 'Cambria': true,
  22013. 'Cartier': true, 'Caslon': true, 'Catull': true,
  22014. 'Centaur': true, 'Century Old Style': true, 'Century Schoolbook': true,
  22015. 'Chaparral': true, 'Charis SIL': true, 'Cheltenham': true,
  22016. 'Cholla Slab': true, 'Clarendon': true, 'Clearface': true,
  22017. 'Cochin': true, 'Colonna': true, 'Computer Modern': true,
  22018. 'Concrete Roman': true, 'Constantia': true, 'Cooper Black': true,
  22019. 'Corona': true, 'Ecotype': true, 'Egyptienne': true,
  22020. 'Elephant': true, 'Excelsior': true, 'Fairfield': true,
  22021. 'FF Scala': true, 'Folkard': true, 'Footlight': true,
  22022. 'FreeSerif': true, 'Friz Quadrata': true, 'Garamond': true,
  22023. 'Gentium': true, 'Georgia': true, 'Gloucester': true,
  22024. 'Goudy Old Style': true, 'Goudy Schoolbook': true, 'Goudy Pro Font': true,
  22025. 'Granjon': true, 'Guardian Egyptian': true, 'Heather': true,
  22026. 'Hercules': true, 'High Tower Text': true, 'Hiroshige': true,
  22027. 'Hoefler Text': true, 'Humana Serif': true, 'Imprint': true,
  22028. 'Ionic No. 5': true, 'Janson': true, 'Joanna': true,
  22029. 'Korinna': true, 'Lexicon': true, 'Liberation Serif': true,
  22030. 'Linux Libertine': true, 'Literaturnaya': true, 'Lucida': true,
  22031. 'Lucida Bright': true, 'Melior': true, 'Memphis': true,
  22032. 'Miller': true, 'Minion': true, 'Modern': true,
  22033. 'Mona Lisa': true, 'Mrs Eaves': true, 'MS Serif': true,
  22034. 'Museo Slab': true, 'New York': true, 'Nimbus Roman': true,
  22035. 'NPS Rawlinson Roadway': true, 'Palatino': true, 'Perpetua': true,
  22036. 'Plantin': true, 'Plantin Schoolbook': true, 'Playbill': true,
  22037. 'Poor Richard': true, 'Rawlinson Roadway': true, 'Renault': true,
  22038. 'Requiem': true, 'Rockwell': true, 'Roman': true,
  22039. 'Rotis Serif': true, 'Sabon': true, 'Scala': true,
  22040. 'Seagull': true, 'Sistina': true, 'Souvenir': true,
  22041. 'STIX': true, 'Stone Informal': true, 'Stone Serif': true,
  22042. 'Sylfaen': true, 'Times': true, 'Trajan': true,
  22043. 'Trinité': true, 'Trump Mediaeval': true, 'Utopia': true,
  22044. 'Vale Type': true, 'Bitstream Vera': true, 'Vera Serif': true,
  22045. 'Versailles': true, 'Wanted': true, 'Weiss': true,
  22046. 'Wide Latin': true, 'Windsor': true, 'XITS': true
  22047. };
  22048. var symbolsFonts = {
  22049. 'Dingbats': true, 'Symbol': true, 'ZapfDingbats': true
  22050. };
  22051. // Glyph map for well-known standard fonts. Sometimes Ghostscript uses CID fonts
  22052. // but does not embed the CID to GID mapping. The mapping is incomplete for all
  22053. // glyphs, but common for some set of the standard fonts.
  22054. var GlyphMapForStandardFonts = {
  22055. '2': 10, '3': 32, '4': 33, '5': 34, '6': 35, '7': 36, '8': 37, '9': 38,
  22056. '10': 39, '11': 40, '12': 41, '13': 42, '14': 43, '15': 44, '16': 45,
  22057. '17': 46, '18': 47, '19': 48, '20': 49, '21': 50, '22': 51, '23': 52,
  22058. '24': 53, '25': 54, '26': 55, '27': 56, '28': 57, '29': 58, '30': 894,
  22059. '31': 60, '32': 61, '33': 62, '34': 63, '35': 64, '36': 65, '37': 66,
  22060. '38': 67, '39': 68, '40': 69, '41': 70, '42': 71, '43': 72, '44': 73,
  22061. '45': 74, '46': 75, '47': 76, '48': 77, '49': 78, '50': 79, '51': 80,
  22062. '52': 81, '53': 82, '54': 83, '55': 84, '56': 85, '57': 86, '58': 87,
  22063. '59': 88, '60': 89, '61': 90, '62': 91, '63': 92, '64': 93, '65': 94,
  22064. '66': 95, '67': 96, '68': 97, '69': 98, '70': 99, '71': 100, '72': 101,
  22065. '73': 102, '74': 103, '75': 104, '76': 105, '77': 106, '78': 107, '79': 108,
  22066. '80': 109, '81': 110, '82': 111, '83': 112, '84': 113, '85': 114, '86': 115,
  22067. '87': 116, '88': 117, '89': 118, '90': 119, '91': 120, '92': 121, '93': 122,
  22068. '94': 123, '95': 124, '96': 125, '97': 126, '98': 196, '99': 197, '100': 199,
  22069. '101': 201, '102': 209, '103': 214, '104': 220, '105': 225, '106': 224,
  22070. '107': 226, '108': 228, '109': 227, '110': 229, '111': 231, '112': 233,
  22071. '113': 232, '114': 234, '115': 235, '116': 237, '117': 236, '118': 238,
  22072. '119': 239, '120': 241, '121': 243, '122': 242, '123': 244, '124': 246,
  22073. '125': 245, '126': 250, '127': 249, '128': 251, '129': 252, '130': 8224,
  22074. '131': 176, '132': 162, '133': 163, '134': 167, '135': 8226, '136': 182,
  22075. '137': 223, '138': 174, '139': 169, '140': 8482, '141': 180, '142': 168,
  22076. '143': 8800, '144': 198, '145': 216, '146': 8734, '147': 177, '148': 8804,
  22077. '149': 8805, '150': 165, '151': 181, '152': 8706, '153': 8721, '154': 8719,
  22078. '156': 8747, '157': 170, '158': 186, '159': 8486, '160': 230, '161': 248,
  22079. '162': 191, '163': 161, '164': 172, '165': 8730, '166': 402, '167': 8776,
  22080. '168': 8710, '169': 171, '170': 187, '171': 8230, '210': 218, '223': 711,
  22081. '227': 353, '229': 382, '234': 253, '253': 268, '254': 269, '258': 258,
  22082. '268': 283, '269': 313, '278': 328, '284': 345, '292': 367, '305': 963,
  22083. '306': 964, '307': 966, '308': 8215, '309': 8252, '310': 8319, '311': 8359,
  22084. '312': 8592, '313': 8593, '337': 9552, '493': 1039, '494': 1040, '705': 1524,
  22085. '706': 8362, '710': 64288, '711': 64298, '759': 1617, '761': 1776,
  22086. '763': 1778, '775': 1652, '777': 1764, '778': 1780, '779': 1781, '780': 1782,
  22087. '782': 771, '783': 64726, '786': 8363, '788': 8532, '790': 768, '791': 769,
  22088. '792': 768, '795': 803, '797': 64336, '798': 64337, '799': 64342,
  22089. '800': 64343, '801': 64344, '802': 64345, '803': 64362, '804': 64363,
  22090. '805': 64364, '2424': 7821, '2425': 7822, '2426': 7823, '2427': 7824,
  22091. '2428': 7825, '2429': 7826, '2430': 7827, '2433': 7682, '2678': 8045,
  22092. '2679': 8046, '2830': 1552, '2838': 686, '2840': 751, '2842': 753,
  22093. '2843': 754, '2844': 755, '2846': 757, '2856': 767, '2857': 848, '2858': 849,
  22094. '2862': 853, '2863': 854, '2864': 855, '2865': 861, '2866': 862, '2906': 7460,
  22095. '2908': 7462, '2909': 7463, '2910': 7464, '2912': 7466, '2913': 7467,
  22096. '2914': 7468, '2916': 7470, '2917': 7471, '2918': 7472, '2920': 7474,
  22097. '2921': 7475, '2922': 7476, '2924': 7478, '2925': 7479, '2926': 7480,
  22098. '2928': 7482, '2929': 7483, '2930': 7484, '2932': 7486, '2933': 7487,
  22099. '2934': 7488, '2936': 7490, '2937': 7491, '2938': 7492, '2940': 7494,
  22100. '2941': 7495, '2942': 7496, '2944': 7498, '2946': 7500, '2948': 7502,
  22101. '2950': 7504, '2951': 7505, '2952': 7506, '2954': 7508, '2955': 7509,
  22102. '2956': 7510, '2958': 7512, '2959': 7513, '2960': 7514, '2962': 7516,
  22103. '2963': 7517, '2964': 7518, '2966': 7520, '2967': 7521, '2968': 7522,
  22104. '2970': 7524, '2971': 7525, '2972': 7526, '2974': 7528, '2975': 7529,
  22105. '2976': 7530, '2978': 1537, '2979': 1538, '2980': 1539, '2982': 1549,
  22106. '2983': 1551, '2984': 1552, '2986': 1554, '2987': 1555, '2988': 1556,
  22107. '2990': 1623, '2991': 1624, '2995': 1775, '2999': 1791, '3002': 64290,
  22108. '3003': 64291, '3004': 64292, '3006': 64294, '3007': 64295, '3008': 64296,
  22109. '3011': 1900, '3014': 8223, '3015': 8244, '3017': 7532, '3018': 7533,
  22110. '3019': 7534, '3075': 7590, '3076': 7591, '3079': 7594, '3080': 7595,
  22111. '3083': 7598, '3084': 7599, '3087': 7602, '3088': 7603, '3091': 7606,
  22112. '3092': 7607, '3095': 7610, '3096': 7611, '3099': 7614, '3100': 7615,
  22113. '3103': 7618, '3104': 7619, '3107': 8337, '3108': 8338, '3116': 1884,
  22114. '3119': 1885, '3120': 1885, '3123': 1886, '3124': 1886, '3127': 1887,
  22115. '3128': 1887, '3131': 1888, '3132': 1888, '3135': 1889, '3136': 1889,
  22116. '3139': 1890, '3140': 1890, '3143': 1891, '3144': 1891, '3147': 1892,
  22117. '3148': 1892, '3153': 580, '3154': 581, '3157': 584, '3158': 585, '3161': 588,
  22118. '3162': 589, '3165': 891, '3166': 892, '3169': 1274, '3170': 1275,
  22119. '3173': 1278, '3174': 1279, '3181': 7622, '3182': 7623, '3282': 11799,
  22120. '3316': 578, '3379': 42785, '3393': 1159, '3416': 8377
  22121. };
  22122. // Some characters, e.g. copyrightserif, mapped to the private use area and
  22123. // might not be displayed using standard fonts. Mapping/hacking well-known chars
  22124. // to the similar equivalents in the normal characters range.
  22125. function mapSpecialUnicodeValues(code) {
  22126. if (code >= 0xFFF0 && code <= 0xFFFF) { // Specials unicode block.
  22127. return 0;
  22128. }
  22129. switch (code) {
  22130. case 0xF8E9: // copyrightsans
  22131. case 0xF6D9: // copyrightserif
  22132. return 0x00A9; // copyright
  22133. case 0xF8E8: // registersans
  22134. case 0xF6DA: // registerserif
  22135. return 0x00AE; // registered
  22136. case 0xF8EA: // trademarksans
  22137. case 0xF6DB: // trademarkserif
  22138. return 0x2122; // trademark
  22139. default:
  22140. return code;
  22141. }
  22142. }
  22143. var UnicodeRanges = [
  22144. { 'begin': 0x0000, 'end': 0x007F }, // Basic Latin
  22145. { 'begin': 0x0080, 'end': 0x00FF }, // Latin-1 Supplement
  22146. { 'begin': 0x0100, 'end': 0x017F }, // Latin Extended-A
  22147. { 'begin': 0x0180, 'end': 0x024F }, // Latin Extended-B
  22148. { 'begin': 0x0250, 'end': 0x02AF }, // IPA Extensions
  22149. { 'begin': 0x02B0, 'end': 0x02FF }, // Spacing Modifier Letters
  22150. { 'begin': 0x0300, 'end': 0x036F }, // Combining Diacritical Marks
  22151. { 'begin': 0x0370, 'end': 0x03FF }, // Greek and Coptic
  22152. { 'begin': 0x2C80, 'end': 0x2CFF }, // Coptic
  22153. { 'begin': 0x0400, 'end': 0x04FF }, // Cyrillic
  22154. { 'begin': 0x0530, 'end': 0x058F }, // Armenian
  22155. { 'begin': 0x0590, 'end': 0x05FF }, // Hebrew
  22156. { 'begin': 0xA500, 'end': 0xA63F }, // Vai
  22157. { 'begin': 0x0600, 'end': 0x06FF }, // Arabic
  22158. { 'begin': 0x07C0, 'end': 0x07FF }, // NKo
  22159. { 'begin': 0x0900, 'end': 0x097F }, // Devanagari
  22160. { 'begin': 0x0980, 'end': 0x09FF }, // Bengali
  22161. { 'begin': 0x0A00, 'end': 0x0A7F }, // Gurmukhi
  22162. { 'begin': 0x0A80, 'end': 0x0AFF }, // Gujarati
  22163. { 'begin': 0x0B00, 'end': 0x0B7F }, // Oriya
  22164. { 'begin': 0x0B80, 'end': 0x0BFF }, // Tamil
  22165. { 'begin': 0x0C00, 'end': 0x0C7F }, // Telugu
  22166. { 'begin': 0x0C80, 'end': 0x0CFF }, // Kannada
  22167. { 'begin': 0x0D00, 'end': 0x0D7F }, // Malayalam
  22168. { 'begin': 0x0E00, 'end': 0x0E7F }, // Thai
  22169. { 'begin': 0x0E80, 'end': 0x0EFF }, // Lao
  22170. { 'begin': 0x10A0, 'end': 0x10FF }, // Georgian
  22171. { 'begin': 0x1B00, 'end': 0x1B7F }, // Balinese
  22172. { 'begin': 0x1100, 'end': 0x11FF }, // Hangul Jamo
  22173. { 'begin': 0x1E00, 'end': 0x1EFF }, // Latin Extended Additional
  22174. { 'begin': 0x1F00, 'end': 0x1FFF }, // Greek Extended
  22175. { 'begin': 0x2000, 'end': 0x206F }, // General Punctuation
  22176. { 'begin': 0x2070, 'end': 0x209F }, // Superscripts And Subscripts
  22177. { 'begin': 0x20A0, 'end': 0x20CF }, // Currency Symbol
  22178. { 'begin': 0x20D0, 'end': 0x20FF }, // Combining Diacritical Marks For Symbols
  22179. { 'begin': 0x2100, 'end': 0x214F }, // Letterlike Symbols
  22180. { 'begin': 0x2150, 'end': 0x218F }, // Number Forms
  22181. { 'begin': 0x2190, 'end': 0x21FF }, // Arrows
  22182. { 'begin': 0x2200, 'end': 0x22FF }, // Mathematical Operators
  22183. { 'begin': 0x2300, 'end': 0x23FF }, // Miscellaneous Technical
  22184. { 'begin': 0x2400, 'end': 0x243F }, // Control Pictures
  22185. { 'begin': 0x2440, 'end': 0x245F }, // Optical Character Recognition
  22186. { 'begin': 0x2460, 'end': 0x24FF }, // Enclosed Alphanumerics
  22187. { 'begin': 0x2500, 'end': 0x257F }, // Box Drawing
  22188. { 'begin': 0x2580, 'end': 0x259F }, // Block Elements
  22189. { 'begin': 0x25A0, 'end': 0x25FF }, // Geometric Shapes
  22190. { 'begin': 0x2600, 'end': 0x26FF }, // Miscellaneous Symbols
  22191. { 'begin': 0x2700, 'end': 0x27BF }, // Dingbats
  22192. { 'begin': 0x3000, 'end': 0x303F }, // CJK Symbols And Punctuation
  22193. { 'begin': 0x3040, 'end': 0x309F }, // Hiragana
  22194. { 'begin': 0x30A0, 'end': 0x30FF }, // Katakana
  22195. { 'begin': 0x3100, 'end': 0x312F }, // Bopomofo
  22196. { 'begin': 0x3130, 'end': 0x318F }, // Hangul Compatibility Jamo
  22197. { 'begin': 0xA840, 'end': 0xA87F }, // Phags-pa
  22198. { 'begin': 0x3200, 'end': 0x32FF }, // Enclosed CJK Letters And Months
  22199. { 'begin': 0x3300, 'end': 0x33FF }, // CJK Compatibility
  22200. { 'begin': 0xAC00, 'end': 0xD7AF }, // Hangul Syllables
  22201. { 'begin': 0xD800, 'end': 0xDFFF }, // Non-Plane 0 *
  22202. { 'begin': 0x10900, 'end': 0x1091F }, // Phoenicia
  22203. { 'begin': 0x4E00, 'end': 0x9FFF }, // CJK Unified Ideographs
  22204. { 'begin': 0xE000, 'end': 0xF8FF }, // Private Use Area (plane 0)
  22205. { 'begin': 0x31C0, 'end': 0x31EF }, // CJK Strokes
  22206. { 'begin': 0xFB00, 'end': 0xFB4F }, // Alphabetic Presentation Forms
  22207. { 'begin': 0xFB50, 'end': 0xFDFF }, // Arabic Presentation Forms-A
  22208. { 'begin': 0xFE20, 'end': 0xFE2F }, // Combining Half Marks
  22209. { 'begin': 0xFE10, 'end': 0xFE1F }, // Vertical Forms
  22210. { 'begin': 0xFE50, 'end': 0xFE6F }, // Small Form Variants
  22211. { 'begin': 0xFE70, 'end': 0xFEFF }, // Arabic Presentation Forms-B
  22212. { 'begin': 0xFF00, 'end': 0xFFEF }, // Halfwidth And Fullwidth Forms
  22213. { 'begin': 0xFFF0, 'end': 0xFFFF }, // Specials
  22214. { 'begin': 0x0F00, 'end': 0x0FFF }, // Tibetan
  22215. { 'begin': 0x0700, 'end': 0x074F }, // Syriac
  22216. { 'begin': 0x0780, 'end': 0x07BF }, // Thaana
  22217. { 'begin': 0x0D80, 'end': 0x0DFF }, // Sinhala
  22218. { 'begin': 0x1000, 'end': 0x109F }, // Myanmar
  22219. { 'begin': 0x1200, 'end': 0x137F }, // Ethiopic
  22220. { 'begin': 0x13A0, 'end': 0x13FF }, // Cherokee
  22221. { 'begin': 0x1400, 'end': 0x167F }, // Unified Canadian Aboriginal Syllabics
  22222. { 'begin': 0x1680, 'end': 0x169F }, // Ogham
  22223. { 'begin': 0x16A0, 'end': 0x16FF }, // Runic
  22224. { 'begin': 0x1780, 'end': 0x17FF }, // Khmer
  22225. { 'begin': 0x1800, 'end': 0x18AF }, // Mongolian
  22226. { 'begin': 0x2800, 'end': 0x28FF }, // Braille Patterns
  22227. { 'begin': 0xA000, 'end': 0xA48F }, // Yi Syllables
  22228. { 'begin': 0x1700, 'end': 0x171F }, // Tagalog
  22229. { 'begin': 0x10300, 'end': 0x1032F }, // Old Italic
  22230. { 'begin': 0x10330, 'end': 0x1034F }, // Gothic
  22231. { 'begin': 0x10400, 'end': 0x1044F }, // Deseret
  22232. { 'begin': 0x1D000, 'end': 0x1D0FF }, // Byzantine Musical Symbols
  22233. { 'begin': 0x1D400, 'end': 0x1D7FF }, // Mathematical Alphanumeric Symbols
  22234. { 'begin': 0xFF000, 'end': 0xFFFFD }, // Private Use (plane 15)
  22235. { 'begin': 0xFE00, 'end': 0xFE0F }, // Variation Selectors
  22236. { 'begin': 0xE0000, 'end': 0xE007F }, // Tags
  22237. { 'begin': 0x1900, 'end': 0x194F }, // Limbu
  22238. { 'begin': 0x1950, 'end': 0x197F }, // Tai Le
  22239. { 'begin': 0x1980, 'end': 0x19DF }, // New Tai Lue
  22240. { 'begin': 0x1A00, 'end': 0x1A1F }, // Buginese
  22241. { 'begin': 0x2C00, 'end': 0x2C5F }, // Glagolitic
  22242. { 'begin': 0x2D30, 'end': 0x2D7F }, // Tifinagh
  22243. { 'begin': 0x4DC0, 'end': 0x4DFF }, // Yijing Hexagram Symbols
  22244. { 'begin': 0xA800, 'end': 0xA82F }, // Syloti Nagri
  22245. { 'begin': 0x10000, 'end': 0x1007F }, // Linear B Syllabary
  22246. { 'begin': 0x10140, 'end': 0x1018F }, // Ancient Greek Numbers
  22247. { 'begin': 0x10380, 'end': 0x1039F }, // Ugaritic
  22248. { 'begin': 0x103A0, 'end': 0x103DF }, // Old Persian
  22249. { 'begin': 0x10450, 'end': 0x1047F }, // Shavian
  22250. { 'begin': 0x10480, 'end': 0x104AF }, // Osmanya
  22251. { 'begin': 0x10800, 'end': 0x1083F }, // Cypriot Syllabary
  22252. { 'begin': 0x10A00, 'end': 0x10A5F }, // Kharoshthi
  22253. { 'begin': 0x1D300, 'end': 0x1D35F }, // Tai Xuan Jing Symbols
  22254. { 'begin': 0x12000, 'end': 0x123FF }, // Cuneiform
  22255. { 'begin': 0x1D360, 'end': 0x1D37F }, // Counting Rod Numerals
  22256. { 'begin': 0x1B80, 'end': 0x1BBF }, // Sundanese
  22257. { 'begin': 0x1C00, 'end': 0x1C4F }, // Lepcha
  22258. { 'begin': 0x1C50, 'end': 0x1C7F }, // Ol Chiki
  22259. { 'begin': 0xA880, 'end': 0xA8DF }, // Saurashtra
  22260. { 'begin': 0xA900, 'end': 0xA92F }, // Kayah Li
  22261. { 'begin': 0xA930, 'end': 0xA95F }, // Rejang
  22262. { 'begin': 0xAA00, 'end': 0xAA5F }, // Cham
  22263. { 'begin': 0x10190, 'end': 0x101CF }, // Ancient Symbols
  22264. { 'begin': 0x101D0, 'end': 0x101FF }, // Phaistos Disc
  22265. { 'begin': 0x102A0, 'end': 0x102DF }, // Carian
  22266. { 'begin': 0x1F030, 'end': 0x1F09F } // Domino Tiles
  22267. ];
  22268. var MacStandardGlyphOrdering = [
  22269. '.notdef', '.null', 'nonmarkingreturn', 'space', 'exclam', 'quotedbl',
  22270. 'numbersign', 'dollar', 'percent', 'ampersand', 'quotesingle', 'parenleft',
  22271. 'parenright', 'asterisk', 'plus', 'comma', 'hyphen', 'period', 'slash',
  22272. 'zero', 'one', 'two', 'three', 'four', 'five', 'six', 'seven', 'eight',
  22273. 'nine', 'colon', 'semicolon', 'less', 'equal', 'greater', 'question', 'at',
  22274. 'A', 'B', 'C', 'D', 'E', 'F', 'G', 'H', 'I', 'J', 'K', 'L', 'M', 'N', 'O',
  22275. 'P', 'Q', 'R', 'S', 'T', 'U', 'V', 'W', 'X', 'Y', 'Z', 'bracketleft',
  22276. 'backslash', 'bracketright', 'asciicircum', 'underscore', 'grave', 'a', 'b',
  22277. 'c', 'd', 'e', 'f', 'g', 'h', 'i', 'j', 'k', 'l', 'm', 'n', 'o', 'p', 'q',
  22278. 'r', 's', 't', 'u', 'v', 'w', 'x', 'y', 'z', 'braceleft', 'bar', 'braceright',
  22279. 'asciitilde', 'Adieresis', 'Aring', 'Ccedilla', 'Eacute', 'Ntilde',
  22280. 'Odieresis', 'Udieresis', 'aacute', 'agrave', 'acircumflex', 'adieresis',
  22281. 'atilde', 'aring', 'ccedilla', 'eacute', 'egrave', 'ecircumflex', 'edieresis',
  22282. 'iacute', 'igrave', 'icircumflex', 'idieresis', 'ntilde', 'oacute', 'ograve',
  22283. 'ocircumflex', 'odieresis', 'otilde', 'uacute', 'ugrave', 'ucircumflex',
  22284. 'udieresis', 'dagger', 'degree', 'cent', 'sterling', 'section', 'bullet',
  22285. 'paragraph', 'germandbls', 'registered', 'copyright', 'trademark', 'acute',
  22286. 'dieresis', 'notequal', 'AE', 'Oslash', 'infinity', 'plusminus', 'lessequal',
  22287. 'greaterequal', 'yen', 'mu', 'partialdiff', 'summation', 'product', 'pi',
  22288. 'integral', 'ordfeminine', 'ordmasculine', 'Omega', 'ae', 'oslash',
  22289. 'questiondown', 'exclamdown', 'logicalnot', 'radical', 'florin',
  22290. 'approxequal', 'Delta', 'guillemotleft', 'guillemotright', 'ellipsis',
  22291. 'nonbreakingspace', 'Agrave', 'Atilde', 'Otilde', 'OE', 'oe', 'endash',
  22292. 'emdash', 'quotedblleft', 'quotedblright', 'quoteleft', 'quoteright',
  22293. 'divide', 'lozenge', 'ydieresis', 'Ydieresis', 'fraction', 'currency',
  22294. 'guilsinglleft', 'guilsinglright', 'fi', 'fl', 'daggerdbl', 'periodcentered',
  22295. 'quotesinglbase', 'quotedblbase', 'perthousand', 'Acircumflex',
  22296. 'Ecircumflex', 'Aacute', 'Edieresis', 'Egrave', 'Iacute', 'Icircumflex',
  22297. 'Idieresis', 'Igrave', 'Oacute', 'Ocircumflex', 'apple', 'Ograve', 'Uacute',
  22298. 'Ucircumflex', 'Ugrave', 'dotlessi', 'circumflex', 'tilde', 'macron',
  22299. 'breve', 'dotaccent', 'ring', 'cedilla', 'hungarumlaut', 'ogonek', 'caron',
  22300. 'Lslash', 'lslash', 'Scaron', 'scaron', 'Zcaron', 'zcaron', 'brokenbar',
  22301. 'Eth', 'eth', 'Yacute', 'yacute', 'Thorn', 'thorn', 'minus', 'multiply',
  22302. 'onesuperior', 'twosuperior', 'threesuperior', 'onehalf', 'onequarter',
  22303. 'threequarters', 'franc', 'Gbreve', 'gbreve', 'Idotaccent', 'Scedilla',
  22304. 'scedilla', 'Cacute', 'cacute', 'Ccaron', 'ccaron', 'dcroat'];
  22305. function getUnicodeRangeFor(value) {
  22306. for (var i = 0, ii = UnicodeRanges.length; i < ii; i++) {
  22307. var range = UnicodeRanges[i];
  22308. if (value >= range.begin && value < range.end) {
  22309. return i;
  22310. }
  22311. }
  22312. return -1;
  22313. }
  22314. function isRTLRangeFor(value) {
  22315. var range = UnicodeRanges[13];
  22316. if (value >= range.begin && value < range.end) {
  22317. return true;
  22318. }
  22319. range = UnicodeRanges[11];
  22320. if (value >= range.begin && value < range.end) {
  22321. return true;
  22322. }
  22323. return false;
  22324. }
  22325. // The normalization table is obtained by filtering the Unicode characters
  22326. // database with <compat> entries.
  22327. var NormalizedUnicodes = {
  22328. '\u00A8': '\u0020\u0308',
  22329. '\u00AF': '\u0020\u0304',
  22330. '\u00B4': '\u0020\u0301',
  22331. '\u00B5': '\u03BC',
  22332. '\u00B8': '\u0020\u0327',
  22333. '\u0132': '\u0049\u004A',
  22334. '\u0133': '\u0069\u006A',
  22335. '\u013F': '\u004C\u00B7',
  22336. '\u0140': '\u006C\u00B7',
  22337. '\u0149': '\u02BC\u006E',
  22338. '\u017F': '\u0073',
  22339. '\u01C4': '\u0044\u017D',
  22340. '\u01C5': '\u0044\u017E',
  22341. '\u01C6': '\u0064\u017E',
  22342. '\u01C7': '\u004C\u004A',
  22343. '\u01C8': '\u004C\u006A',
  22344. '\u01C9': '\u006C\u006A',
  22345. '\u01CA': '\u004E\u004A',
  22346. '\u01CB': '\u004E\u006A',
  22347. '\u01CC': '\u006E\u006A',
  22348. '\u01F1': '\u0044\u005A',
  22349. '\u01F2': '\u0044\u007A',
  22350. '\u01F3': '\u0064\u007A',
  22351. '\u02D8': '\u0020\u0306',
  22352. '\u02D9': '\u0020\u0307',
  22353. '\u02DA': '\u0020\u030A',
  22354. '\u02DB': '\u0020\u0328',
  22355. '\u02DC': '\u0020\u0303',
  22356. '\u02DD': '\u0020\u030B',
  22357. '\u037A': '\u0020\u0345',
  22358. '\u0384': '\u0020\u0301',
  22359. '\u03D0': '\u03B2',
  22360. '\u03D1': '\u03B8',
  22361. '\u03D2': '\u03A5',
  22362. '\u03D5': '\u03C6',
  22363. '\u03D6': '\u03C0',
  22364. '\u03F0': '\u03BA',
  22365. '\u03F1': '\u03C1',
  22366. '\u03F2': '\u03C2',
  22367. '\u03F4': '\u0398',
  22368. '\u03F5': '\u03B5',
  22369. '\u03F9': '\u03A3',
  22370. '\u0587': '\u0565\u0582',
  22371. '\u0675': '\u0627\u0674',
  22372. '\u0676': '\u0648\u0674',
  22373. '\u0677': '\u06C7\u0674',
  22374. '\u0678': '\u064A\u0674',
  22375. '\u0E33': '\u0E4D\u0E32',
  22376. '\u0EB3': '\u0ECD\u0EB2',
  22377. '\u0EDC': '\u0EAB\u0E99',
  22378. '\u0EDD': '\u0EAB\u0EA1',
  22379. '\u0F77': '\u0FB2\u0F81',
  22380. '\u0F79': '\u0FB3\u0F81',
  22381. '\u1E9A': '\u0061\u02BE',
  22382. '\u1FBD': '\u0020\u0313',
  22383. '\u1FBF': '\u0020\u0313',
  22384. '\u1FC0': '\u0020\u0342',
  22385. '\u1FFE': '\u0020\u0314',
  22386. '\u2002': '\u0020',
  22387. '\u2003': '\u0020',
  22388. '\u2004': '\u0020',
  22389. '\u2005': '\u0020',
  22390. '\u2006': '\u0020',
  22391. '\u2008': '\u0020',
  22392. '\u2009': '\u0020',
  22393. '\u200A': '\u0020',
  22394. '\u2017': '\u0020\u0333',
  22395. '\u2024': '\u002E',
  22396. '\u2025': '\u002E\u002E',
  22397. '\u2026': '\u002E\u002E\u002E',
  22398. '\u2033': '\u2032\u2032',
  22399. '\u2034': '\u2032\u2032\u2032',
  22400. '\u2036': '\u2035\u2035',
  22401. '\u2037': '\u2035\u2035\u2035',
  22402. '\u203C': '\u0021\u0021',
  22403. '\u203E': '\u0020\u0305',
  22404. '\u2047': '\u003F\u003F',
  22405. '\u2048': '\u003F\u0021',
  22406. '\u2049': '\u0021\u003F',
  22407. '\u2057': '\u2032\u2032\u2032\u2032',
  22408. '\u205F': '\u0020',
  22409. '\u20A8': '\u0052\u0073',
  22410. '\u2100': '\u0061\u002F\u0063',
  22411. '\u2101': '\u0061\u002F\u0073',
  22412. '\u2103': '\u00B0\u0043',
  22413. '\u2105': '\u0063\u002F\u006F',
  22414. '\u2106': '\u0063\u002F\u0075',
  22415. '\u2107': '\u0190',
  22416. '\u2109': '\u00B0\u0046',
  22417. '\u2116': '\u004E\u006F',
  22418. '\u2121': '\u0054\u0045\u004C',
  22419. '\u2135': '\u05D0',
  22420. '\u2136': '\u05D1',
  22421. '\u2137': '\u05D2',
  22422. '\u2138': '\u05D3',
  22423. '\u213B': '\u0046\u0041\u0058',
  22424. '\u2160': '\u0049',
  22425. '\u2161': '\u0049\u0049',
  22426. '\u2162': '\u0049\u0049\u0049',
  22427. '\u2163': '\u0049\u0056',
  22428. '\u2164': '\u0056',
  22429. '\u2165': '\u0056\u0049',
  22430. '\u2166': '\u0056\u0049\u0049',
  22431. '\u2167': '\u0056\u0049\u0049\u0049',
  22432. '\u2168': '\u0049\u0058',
  22433. '\u2169': '\u0058',
  22434. '\u216A': '\u0058\u0049',
  22435. '\u216B': '\u0058\u0049\u0049',
  22436. '\u216C': '\u004C',
  22437. '\u216D': '\u0043',
  22438. '\u216E': '\u0044',
  22439. '\u216F': '\u004D',
  22440. '\u2170': '\u0069',
  22441. '\u2171': '\u0069\u0069',
  22442. '\u2172': '\u0069\u0069\u0069',
  22443. '\u2173': '\u0069\u0076',
  22444. '\u2174': '\u0076',
  22445. '\u2175': '\u0076\u0069',
  22446. '\u2176': '\u0076\u0069\u0069',
  22447. '\u2177': '\u0076\u0069\u0069\u0069',
  22448. '\u2178': '\u0069\u0078',
  22449. '\u2179': '\u0078',
  22450. '\u217A': '\u0078\u0069',
  22451. '\u217B': '\u0078\u0069\u0069',
  22452. '\u217C': '\u006C',
  22453. '\u217D': '\u0063',
  22454. '\u217E': '\u0064',
  22455. '\u217F': '\u006D',
  22456. '\u222C': '\u222B\u222B',
  22457. '\u222D': '\u222B\u222B\u222B',
  22458. '\u222F': '\u222E\u222E',
  22459. '\u2230': '\u222E\u222E\u222E',
  22460. '\u2474': '\u0028\u0031\u0029',
  22461. '\u2475': '\u0028\u0032\u0029',
  22462. '\u2476': '\u0028\u0033\u0029',
  22463. '\u2477': '\u0028\u0034\u0029',
  22464. '\u2478': '\u0028\u0035\u0029',
  22465. '\u2479': '\u0028\u0036\u0029',
  22466. '\u247A': '\u0028\u0037\u0029',
  22467. '\u247B': '\u0028\u0038\u0029',
  22468. '\u247C': '\u0028\u0039\u0029',
  22469. '\u247D': '\u0028\u0031\u0030\u0029',
  22470. '\u247E': '\u0028\u0031\u0031\u0029',
  22471. '\u247F': '\u0028\u0031\u0032\u0029',
  22472. '\u2480': '\u0028\u0031\u0033\u0029',
  22473. '\u2481': '\u0028\u0031\u0034\u0029',
  22474. '\u2482': '\u0028\u0031\u0035\u0029',
  22475. '\u2483': '\u0028\u0031\u0036\u0029',
  22476. '\u2484': '\u0028\u0031\u0037\u0029',
  22477. '\u2485': '\u0028\u0031\u0038\u0029',
  22478. '\u2486': '\u0028\u0031\u0039\u0029',
  22479. '\u2487': '\u0028\u0032\u0030\u0029',
  22480. '\u2488': '\u0031\u002E',
  22481. '\u2489': '\u0032\u002E',
  22482. '\u248A': '\u0033\u002E',
  22483. '\u248B': '\u0034\u002E',
  22484. '\u248C': '\u0035\u002E',
  22485. '\u248D': '\u0036\u002E',
  22486. '\u248E': '\u0037\u002E',
  22487. '\u248F': '\u0038\u002E',
  22488. '\u2490': '\u0039\u002E',
  22489. '\u2491': '\u0031\u0030\u002E',
  22490. '\u2492': '\u0031\u0031\u002E',
  22491. '\u2493': '\u0031\u0032\u002E',
  22492. '\u2494': '\u0031\u0033\u002E',
  22493. '\u2495': '\u0031\u0034\u002E',
  22494. '\u2496': '\u0031\u0035\u002E',
  22495. '\u2497': '\u0031\u0036\u002E',
  22496. '\u2498': '\u0031\u0037\u002E',
  22497. '\u2499': '\u0031\u0038\u002E',
  22498. '\u249A': '\u0031\u0039\u002E',
  22499. '\u249B': '\u0032\u0030\u002E',
  22500. '\u249C': '\u0028\u0061\u0029',
  22501. '\u249D': '\u0028\u0062\u0029',
  22502. '\u249E': '\u0028\u0063\u0029',
  22503. '\u249F': '\u0028\u0064\u0029',
  22504. '\u24A0': '\u0028\u0065\u0029',
  22505. '\u24A1': '\u0028\u0066\u0029',
  22506. '\u24A2': '\u0028\u0067\u0029',
  22507. '\u24A3': '\u0028\u0068\u0029',
  22508. '\u24A4': '\u0028\u0069\u0029',
  22509. '\u24A5': '\u0028\u006A\u0029',
  22510. '\u24A6': '\u0028\u006B\u0029',
  22511. '\u24A7': '\u0028\u006C\u0029',
  22512. '\u24A8': '\u0028\u006D\u0029',
  22513. '\u24A9': '\u0028\u006E\u0029',
  22514. '\u24AA': '\u0028\u006F\u0029',
  22515. '\u24AB': '\u0028\u0070\u0029',
  22516. '\u24AC': '\u0028\u0071\u0029',
  22517. '\u24AD': '\u0028\u0072\u0029',
  22518. '\u24AE': '\u0028\u0073\u0029',
  22519. '\u24AF': '\u0028\u0074\u0029',
  22520. '\u24B0': '\u0028\u0075\u0029',
  22521. '\u24B1': '\u0028\u0076\u0029',
  22522. '\u24B2': '\u0028\u0077\u0029',
  22523. '\u24B3': '\u0028\u0078\u0029',
  22524. '\u24B4': '\u0028\u0079\u0029',
  22525. '\u24B5': '\u0028\u007A\u0029',
  22526. '\u2A0C': '\u222B\u222B\u222B\u222B',
  22527. '\u2A74': '\u003A\u003A\u003D',
  22528. '\u2A75': '\u003D\u003D',
  22529. '\u2A76': '\u003D\u003D\u003D',
  22530. '\u2E9F': '\u6BCD',
  22531. '\u2EF3': '\u9F9F',
  22532. '\u2F00': '\u4E00',
  22533. '\u2F01': '\u4E28',
  22534. '\u2F02': '\u4E36',
  22535. '\u2F03': '\u4E3F',
  22536. '\u2F04': '\u4E59',
  22537. '\u2F05': '\u4E85',
  22538. '\u2F06': '\u4E8C',
  22539. '\u2F07': '\u4EA0',
  22540. '\u2F08': '\u4EBA',
  22541. '\u2F09': '\u513F',
  22542. '\u2F0A': '\u5165',
  22543. '\u2F0B': '\u516B',
  22544. '\u2F0C': '\u5182',
  22545. '\u2F0D': '\u5196',
  22546. '\u2F0E': '\u51AB',
  22547. '\u2F0F': '\u51E0',
  22548. '\u2F10': '\u51F5',
  22549. '\u2F11': '\u5200',
  22550. '\u2F12': '\u529B',
  22551. '\u2F13': '\u52F9',
  22552. '\u2F14': '\u5315',
  22553. '\u2F15': '\u531A',
  22554. '\u2F16': '\u5338',
  22555. '\u2F17': '\u5341',
  22556. '\u2F18': '\u535C',
  22557. '\u2F19': '\u5369',
  22558. '\u2F1A': '\u5382',
  22559. '\u2F1B': '\u53B6',
  22560. '\u2F1C': '\u53C8',
  22561. '\u2F1D': '\u53E3',
  22562. '\u2F1E': '\u56D7',
  22563. '\u2F1F': '\u571F',
  22564. '\u2F20': '\u58EB',
  22565. '\u2F21': '\u5902',
  22566. '\u2F22': '\u590A',
  22567. '\u2F23': '\u5915',
  22568. '\u2F24': '\u5927',
  22569. '\u2F25': '\u5973',
  22570. '\u2F26': '\u5B50',
  22571. '\u2F27': '\u5B80',
  22572. '\u2F28': '\u5BF8',
  22573. '\u2F29': '\u5C0F',
  22574. '\u2F2A': '\u5C22',
  22575. '\u2F2B': '\u5C38',
  22576. '\u2F2C': '\u5C6E',
  22577. '\u2F2D': '\u5C71',
  22578. '\u2F2E': '\u5DDB',
  22579. '\u2F2F': '\u5DE5',
  22580. '\u2F30': '\u5DF1',
  22581. '\u2F31': '\u5DFE',
  22582. '\u2F32': '\u5E72',
  22583. '\u2F33': '\u5E7A',
  22584. '\u2F34': '\u5E7F',
  22585. '\u2F35': '\u5EF4',
  22586. '\u2F36': '\u5EFE',
  22587. '\u2F37': '\u5F0B',
  22588. '\u2F38': '\u5F13',
  22589. '\u2F39': '\u5F50',
  22590. '\u2F3A': '\u5F61',
  22591. '\u2F3B': '\u5F73',
  22592. '\u2F3C': '\u5FC3',
  22593. '\u2F3D': '\u6208',
  22594. '\u2F3E': '\u6236',
  22595. '\u2F3F': '\u624B',
  22596. '\u2F40': '\u652F',
  22597. '\u2F41': '\u6534',
  22598. '\u2F42': '\u6587',
  22599. '\u2F43': '\u6597',
  22600. '\u2F44': '\u65A4',
  22601. '\u2F45': '\u65B9',
  22602. '\u2F46': '\u65E0',
  22603. '\u2F47': '\u65E5',
  22604. '\u2F48': '\u66F0',
  22605. '\u2F49': '\u6708',
  22606. '\u2F4A': '\u6728',
  22607. '\u2F4B': '\u6B20',
  22608. '\u2F4C': '\u6B62',
  22609. '\u2F4D': '\u6B79',
  22610. '\u2F4E': '\u6BB3',
  22611. '\u2F4F': '\u6BCB',
  22612. '\u2F50': '\u6BD4',
  22613. '\u2F51': '\u6BDB',
  22614. '\u2F52': '\u6C0F',
  22615. '\u2F53': '\u6C14',
  22616. '\u2F54': '\u6C34',
  22617. '\u2F55': '\u706B',
  22618. '\u2F56': '\u722A',
  22619. '\u2F57': '\u7236',
  22620. '\u2F58': '\u723B',
  22621. '\u2F59': '\u723F',
  22622. '\u2F5A': '\u7247',
  22623. '\u2F5B': '\u7259',
  22624. '\u2F5C': '\u725B',
  22625. '\u2F5D': '\u72AC',
  22626. '\u2F5E': '\u7384',
  22627. '\u2F5F': '\u7389',
  22628. '\u2F60': '\u74DC',
  22629. '\u2F61': '\u74E6',
  22630. '\u2F62': '\u7518',
  22631. '\u2F63': '\u751F',
  22632. '\u2F64': '\u7528',
  22633. '\u2F65': '\u7530',
  22634. '\u2F66': '\u758B',
  22635. '\u2F67': '\u7592',
  22636. '\u2F68': '\u7676',
  22637. '\u2F69': '\u767D',
  22638. '\u2F6A': '\u76AE',
  22639. '\u2F6B': '\u76BF',
  22640. '\u2F6C': '\u76EE',
  22641. '\u2F6D': '\u77DB',
  22642. '\u2F6E': '\u77E2',
  22643. '\u2F6F': '\u77F3',
  22644. '\u2F70': '\u793A',
  22645. '\u2F71': '\u79B8',
  22646. '\u2F72': '\u79BE',
  22647. '\u2F73': '\u7A74',
  22648. '\u2F74': '\u7ACB',
  22649. '\u2F75': '\u7AF9',
  22650. '\u2F76': '\u7C73',
  22651. '\u2F77': '\u7CF8',
  22652. '\u2F78': '\u7F36',
  22653. '\u2F79': '\u7F51',
  22654. '\u2F7A': '\u7F8A',
  22655. '\u2F7B': '\u7FBD',
  22656. '\u2F7C': '\u8001',
  22657. '\u2F7D': '\u800C',
  22658. '\u2F7E': '\u8012',
  22659. '\u2F7F': '\u8033',
  22660. '\u2F80': '\u807F',
  22661. '\u2F81': '\u8089',
  22662. '\u2F82': '\u81E3',
  22663. '\u2F83': '\u81EA',
  22664. '\u2F84': '\u81F3',
  22665. '\u2F85': '\u81FC',
  22666. '\u2F86': '\u820C',
  22667. '\u2F87': '\u821B',
  22668. '\u2F88': '\u821F',
  22669. '\u2F89': '\u826E',
  22670. '\u2F8A': '\u8272',
  22671. '\u2F8B': '\u8278',
  22672. '\u2F8C': '\u864D',
  22673. '\u2F8D': '\u866B',
  22674. '\u2F8E': '\u8840',
  22675. '\u2F8F': '\u884C',
  22676. '\u2F90': '\u8863',
  22677. '\u2F91': '\u897E',
  22678. '\u2F92': '\u898B',
  22679. '\u2F93': '\u89D2',
  22680. '\u2F94': '\u8A00',
  22681. '\u2F95': '\u8C37',
  22682. '\u2F96': '\u8C46',
  22683. '\u2F97': '\u8C55',
  22684. '\u2F98': '\u8C78',
  22685. '\u2F99': '\u8C9D',
  22686. '\u2F9A': '\u8D64',
  22687. '\u2F9B': '\u8D70',
  22688. '\u2F9C': '\u8DB3',
  22689. '\u2F9D': '\u8EAB',
  22690. '\u2F9E': '\u8ECA',
  22691. '\u2F9F': '\u8F9B',
  22692. '\u2FA0': '\u8FB0',
  22693. '\u2FA1': '\u8FB5',
  22694. '\u2FA2': '\u9091',
  22695. '\u2FA3': '\u9149',
  22696. '\u2FA4': '\u91C6',
  22697. '\u2FA5': '\u91CC',
  22698. '\u2FA6': '\u91D1',
  22699. '\u2FA7': '\u9577',
  22700. '\u2FA8': '\u9580',
  22701. '\u2FA9': '\u961C',
  22702. '\u2FAA': '\u96B6',
  22703. '\u2FAB': '\u96B9',
  22704. '\u2FAC': '\u96E8',
  22705. '\u2FAD': '\u9751',
  22706. '\u2FAE': '\u975E',
  22707. '\u2FAF': '\u9762',
  22708. '\u2FB0': '\u9769',
  22709. '\u2FB1': '\u97CB',
  22710. '\u2FB2': '\u97ED',
  22711. '\u2FB3': '\u97F3',
  22712. '\u2FB4': '\u9801',
  22713. '\u2FB5': '\u98A8',
  22714. '\u2FB6': '\u98DB',
  22715. '\u2FB7': '\u98DF',
  22716. '\u2FB8': '\u9996',
  22717. '\u2FB9': '\u9999',
  22718. '\u2FBA': '\u99AC',
  22719. '\u2FBB': '\u9AA8',
  22720. '\u2FBC': '\u9AD8',
  22721. '\u2FBD': '\u9ADF',
  22722. '\u2FBE': '\u9B25',
  22723. '\u2FBF': '\u9B2F',
  22724. '\u2FC0': '\u9B32',
  22725. '\u2FC1': '\u9B3C',
  22726. '\u2FC2': '\u9B5A',
  22727. '\u2FC3': '\u9CE5',
  22728. '\u2FC4': '\u9E75',
  22729. '\u2FC5': '\u9E7F',
  22730. '\u2FC6': '\u9EA5',
  22731. '\u2FC7': '\u9EBB',
  22732. '\u2FC8': '\u9EC3',
  22733. '\u2FC9': '\u9ECD',
  22734. '\u2FCA': '\u9ED1',
  22735. '\u2FCB': '\u9EF9',
  22736. '\u2FCC': '\u9EFD',
  22737. '\u2FCD': '\u9F0E',
  22738. '\u2FCE': '\u9F13',
  22739. '\u2FCF': '\u9F20',
  22740. '\u2FD0': '\u9F3B',
  22741. '\u2FD1': '\u9F4A',
  22742. '\u2FD2': '\u9F52',
  22743. '\u2FD3': '\u9F8D',
  22744. '\u2FD4': '\u9F9C',
  22745. '\u2FD5': '\u9FA0',
  22746. '\u3036': '\u3012',
  22747. '\u3038': '\u5341',
  22748. '\u3039': '\u5344',
  22749. '\u303A': '\u5345',
  22750. '\u309B': '\u0020\u3099',
  22751. '\u309C': '\u0020\u309A',
  22752. '\u3131': '\u1100',
  22753. '\u3132': '\u1101',
  22754. '\u3133': '\u11AA',
  22755. '\u3134': '\u1102',
  22756. '\u3135': '\u11AC',
  22757. '\u3136': '\u11AD',
  22758. '\u3137': '\u1103',
  22759. '\u3138': '\u1104',
  22760. '\u3139': '\u1105',
  22761. '\u313A': '\u11B0',
  22762. '\u313B': '\u11B1',
  22763. '\u313C': '\u11B2',
  22764. '\u313D': '\u11B3',
  22765. '\u313E': '\u11B4',
  22766. '\u313F': '\u11B5',
  22767. '\u3140': '\u111A',
  22768. '\u3141': '\u1106',
  22769. '\u3142': '\u1107',
  22770. '\u3143': '\u1108',
  22771. '\u3144': '\u1121',
  22772. '\u3145': '\u1109',
  22773. '\u3146': '\u110A',
  22774. '\u3147': '\u110B',
  22775. '\u3148': '\u110C',
  22776. '\u3149': '\u110D',
  22777. '\u314A': '\u110E',
  22778. '\u314B': '\u110F',
  22779. '\u314C': '\u1110',
  22780. '\u314D': '\u1111',
  22781. '\u314E': '\u1112',
  22782. '\u314F': '\u1161',
  22783. '\u3150': '\u1162',
  22784. '\u3151': '\u1163',
  22785. '\u3152': '\u1164',
  22786. '\u3153': '\u1165',
  22787. '\u3154': '\u1166',
  22788. '\u3155': '\u1167',
  22789. '\u3156': '\u1168',
  22790. '\u3157': '\u1169',
  22791. '\u3158': '\u116A',
  22792. '\u3159': '\u116B',
  22793. '\u315A': '\u116C',
  22794. '\u315B': '\u116D',
  22795. '\u315C': '\u116E',
  22796. '\u315D': '\u116F',
  22797. '\u315E': '\u1170',
  22798. '\u315F': '\u1171',
  22799. '\u3160': '\u1172',
  22800. '\u3161': '\u1173',
  22801. '\u3162': '\u1174',
  22802. '\u3163': '\u1175',
  22803. '\u3164': '\u1160',
  22804. '\u3165': '\u1114',
  22805. '\u3166': '\u1115',
  22806. '\u3167': '\u11C7',
  22807. '\u3168': '\u11C8',
  22808. '\u3169': '\u11CC',
  22809. '\u316A': '\u11CE',
  22810. '\u316B': '\u11D3',
  22811. '\u316C': '\u11D7',
  22812. '\u316D': '\u11D9',
  22813. '\u316E': '\u111C',
  22814. '\u316F': '\u11DD',
  22815. '\u3170': '\u11DF',
  22816. '\u3171': '\u111D',
  22817. '\u3172': '\u111E',
  22818. '\u3173': '\u1120',
  22819. '\u3174': '\u1122',
  22820. '\u3175': '\u1123',
  22821. '\u3176': '\u1127',
  22822. '\u3177': '\u1129',
  22823. '\u3178': '\u112B',
  22824. '\u3179': '\u112C',
  22825. '\u317A': '\u112D',
  22826. '\u317B': '\u112E',
  22827. '\u317C': '\u112F',
  22828. '\u317D': '\u1132',
  22829. '\u317E': '\u1136',
  22830. '\u317F': '\u1140',
  22831. '\u3180': '\u1147',
  22832. '\u3181': '\u114C',
  22833. '\u3182': '\u11F1',
  22834. '\u3183': '\u11F2',
  22835. '\u3184': '\u1157',
  22836. '\u3185': '\u1158',
  22837. '\u3186': '\u1159',
  22838. '\u3187': '\u1184',
  22839. '\u3188': '\u1185',
  22840. '\u3189': '\u1188',
  22841. '\u318A': '\u1191',
  22842. '\u318B': '\u1192',
  22843. '\u318C': '\u1194',
  22844. '\u318D': '\u119E',
  22845. '\u318E': '\u11A1',
  22846. '\u3200': '\u0028\u1100\u0029',
  22847. '\u3201': '\u0028\u1102\u0029',
  22848. '\u3202': '\u0028\u1103\u0029',
  22849. '\u3203': '\u0028\u1105\u0029',
  22850. '\u3204': '\u0028\u1106\u0029',
  22851. '\u3205': '\u0028\u1107\u0029',
  22852. '\u3206': '\u0028\u1109\u0029',
  22853. '\u3207': '\u0028\u110B\u0029',
  22854. '\u3208': '\u0028\u110C\u0029',
  22855. '\u3209': '\u0028\u110E\u0029',
  22856. '\u320A': '\u0028\u110F\u0029',
  22857. '\u320B': '\u0028\u1110\u0029',
  22858. '\u320C': '\u0028\u1111\u0029',
  22859. '\u320D': '\u0028\u1112\u0029',
  22860. '\u320E': '\u0028\u1100\u1161\u0029',
  22861. '\u320F': '\u0028\u1102\u1161\u0029',
  22862. '\u3210': '\u0028\u1103\u1161\u0029',
  22863. '\u3211': '\u0028\u1105\u1161\u0029',
  22864. '\u3212': '\u0028\u1106\u1161\u0029',
  22865. '\u3213': '\u0028\u1107\u1161\u0029',
  22866. '\u3214': '\u0028\u1109\u1161\u0029',
  22867. '\u3215': '\u0028\u110B\u1161\u0029',
  22868. '\u3216': '\u0028\u110C\u1161\u0029',
  22869. '\u3217': '\u0028\u110E\u1161\u0029',
  22870. '\u3218': '\u0028\u110F\u1161\u0029',
  22871. '\u3219': '\u0028\u1110\u1161\u0029',
  22872. '\u321A': '\u0028\u1111\u1161\u0029',
  22873. '\u321B': '\u0028\u1112\u1161\u0029',
  22874. '\u321C': '\u0028\u110C\u116E\u0029',
  22875. '\u321D': '\u0028\u110B\u1169\u110C\u1165\u11AB\u0029',
  22876. '\u321E': '\u0028\u110B\u1169\u1112\u116E\u0029',
  22877. '\u3220': '\u0028\u4E00\u0029',
  22878. '\u3221': '\u0028\u4E8C\u0029',
  22879. '\u3222': '\u0028\u4E09\u0029',
  22880. '\u3223': '\u0028\u56DB\u0029',
  22881. '\u3224': '\u0028\u4E94\u0029',
  22882. '\u3225': '\u0028\u516D\u0029',
  22883. '\u3226': '\u0028\u4E03\u0029',
  22884. '\u3227': '\u0028\u516B\u0029',
  22885. '\u3228': '\u0028\u4E5D\u0029',
  22886. '\u3229': '\u0028\u5341\u0029',
  22887. '\u322A': '\u0028\u6708\u0029',
  22888. '\u322B': '\u0028\u706B\u0029',
  22889. '\u322C': '\u0028\u6C34\u0029',
  22890. '\u322D': '\u0028\u6728\u0029',
  22891. '\u322E': '\u0028\u91D1\u0029',
  22892. '\u322F': '\u0028\u571F\u0029',
  22893. '\u3230': '\u0028\u65E5\u0029',
  22894. '\u3231': '\u0028\u682A\u0029',
  22895. '\u3232': '\u0028\u6709\u0029',
  22896. '\u3233': '\u0028\u793E\u0029',
  22897. '\u3234': '\u0028\u540D\u0029',
  22898. '\u3235': '\u0028\u7279\u0029',
  22899. '\u3236': '\u0028\u8CA1\u0029',
  22900. '\u3237': '\u0028\u795D\u0029',
  22901. '\u3238': '\u0028\u52B4\u0029',
  22902. '\u3239': '\u0028\u4EE3\u0029',
  22903. '\u323A': '\u0028\u547C\u0029',
  22904. '\u323B': '\u0028\u5B66\u0029',
  22905. '\u323C': '\u0028\u76E3\u0029',
  22906. '\u323D': '\u0028\u4F01\u0029',
  22907. '\u323E': '\u0028\u8CC7\u0029',
  22908. '\u323F': '\u0028\u5354\u0029',
  22909. '\u3240': '\u0028\u796D\u0029',
  22910. '\u3241': '\u0028\u4F11\u0029',
  22911. '\u3242': '\u0028\u81EA\u0029',
  22912. '\u3243': '\u0028\u81F3\u0029',
  22913. '\u32C0': '\u0031\u6708',
  22914. '\u32C1': '\u0032\u6708',
  22915. '\u32C2': '\u0033\u6708',
  22916. '\u32C3': '\u0034\u6708',
  22917. '\u32C4': '\u0035\u6708',
  22918. '\u32C5': '\u0036\u6708',
  22919. '\u32C6': '\u0037\u6708',
  22920. '\u32C7': '\u0038\u6708',
  22921. '\u32C8': '\u0039\u6708',
  22922. '\u32C9': '\u0031\u0030\u6708',
  22923. '\u32CA': '\u0031\u0031\u6708',
  22924. '\u32CB': '\u0031\u0032\u6708',
  22925. '\u3358': '\u0030\u70B9',
  22926. '\u3359': '\u0031\u70B9',
  22927. '\u335A': '\u0032\u70B9',
  22928. '\u335B': '\u0033\u70B9',
  22929. '\u335C': '\u0034\u70B9',
  22930. '\u335D': '\u0035\u70B9',
  22931. '\u335E': '\u0036\u70B9',
  22932. '\u335F': '\u0037\u70B9',
  22933. '\u3360': '\u0038\u70B9',
  22934. '\u3361': '\u0039\u70B9',
  22935. '\u3362': '\u0031\u0030\u70B9',
  22936. '\u3363': '\u0031\u0031\u70B9',
  22937. '\u3364': '\u0031\u0032\u70B9',
  22938. '\u3365': '\u0031\u0033\u70B9',
  22939. '\u3366': '\u0031\u0034\u70B9',
  22940. '\u3367': '\u0031\u0035\u70B9',
  22941. '\u3368': '\u0031\u0036\u70B9',
  22942. '\u3369': '\u0031\u0037\u70B9',
  22943. '\u336A': '\u0031\u0038\u70B9',
  22944. '\u336B': '\u0031\u0039\u70B9',
  22945. '\u336C': '\u0032\u0030\u70B9',
  22946. '\u336D': '\u0032\u0031\u70B9',
  22947. '\u336E': '\u0032\u0032\u70B9',
  22948. '\u336F': '\u0032\u0033\u70B9',
  22949. '\u3370': '\u0032\u0034\u70B9',
  22950. '\u33E0': '\u0031\u65E5',
  22951. '\u33E1': '\u0032\u65E5',
  22952. '\u33E2': '\u0033\u65E5',
  22953. '\u33E3': '\u0034\u65E5',
  22954. '\u33E4': '\u0035\u65E5',
  22955. '\u33E5': '\u0036\u65E5',
  22956. '\u33E6': '\u0037\u65E5',
  22957. '\u33E7': '\u0038\u65E5',
  22958. '\u33E8': '\u0039\u65E5',
  22959. '\u33E9': '\u0031\u0030\u65E5',
  22960. '\u33EA': '\u0031\u0031\u65E5',
  22961. '\u33EB': '\u0031\u0032\u65E5',
  22962. '\u33EC': '\u0031\u0033\u65E5',
  22963. '\u33ED': '\u0031\u0034\u65E5',
  22964. '\u33EE': '\u0031\u0035\u65E5',
  22965. '\u33EF': '\u0031\u0036\u65E5',
  22966. '\u33F0': '\u0031\u0037\u65E5',
  22967. '\u33F1': '\u0031\u0038\u65E5',
  22968. '\u33F2': '\u0031\u0039\u65E5',
  22969. '\u33F3': '\u0032\u0030\u65E5',
  22970. '\u33F4': '\u0032\u0031\u65E5',
  22971. '\u33F5': '\u0032\u0032\u65E5',
  22972. '\u33F6': '\u0032\u0033\u65E5',
  22973. '\u33F7': '\u0032\u0034\u65E5',
  22974. '\u33F8': '\u0032\u0035\u65E5',
  22975. '\u33F9': '\u0032\u0036\u65E5',
  22976. '\u33FA': '\u0032\u0037\u65E5',
  22977. '\u33FB': '\u0032\u0038\u65E5',
  22978. '\u33FC': '\u0032\u0039\u65E5',
  22979. '\u33FD': '\u0033\u0030\u65E5',
  22980. '\u33FE': '\u0033\u0031\u65E5',
  22981. '\uFB00': '\u0066\u0066',
  22982. '\uFB01': '\u0066\u0069',
  22983. '\uFB02': '\u0066\u006C',
  22984. '\uFB03': '\u0066\u0066\u0069',
  22985. '\uFB04': '\u0066\u0066\u006C',
  22986. '\uFB05': '\u017F\u0074',
  22987. '\uFB06': '\u0073\u0074',
  22988. '\uFB13': '\u0574\u0576',
  22989. '\uFB14': '\u0574\u0565',
  22990. '\uFB15': '\u0574\u056B',
  22991. '\uFB16': '\u057E\u0576',
  22992. '\uFB17': '\u0574\u056D',
  22993. '\uFB4F': '\u05D0\u05DC',
  22994. '\uFB50': '\u0671',
  22995. '\uFB51': '\u0671',
  22996. '\uFB52': '\u067B',
  22997. '\uFB53': '\u067B',
  22998. '\uFB54': '\u067B',
  22999. '\uFB55': '\u067B',
  23000. '\uFB56': '\u067E',
  23001. '\uFB57': '\u067E',
  23002. '\uFB58': '\u067E',
  23003. '\uFB59': '\u067E',
  23004. '\uFB5A': '\u0680',
  23005. '\uFB5B': '\u0680',
  23006. '\uFB5C': '\u0680',
  23007. '\uFB5D': '\u0680',
  23008. '\uFB5E': '\u067A',
  23009. '\uFB5F': '\u067A',
  23010. '\uFB60': '\u067A',
  23011. '\uFB61': '\u067A',
  23012. '\uFB62': '\u067F',
  23013. '\uFB63': '\u067F',
  23014. '\uFB64': '\u067F',
  23015. '\uFB65': '\u067F',
  23016. '\uFB66': '\u0679',
  23017. '\uFB67': '\u0679',
  23018. '\uFB68': '\u0679',
  23019. '\uFB69': '\u0679',
  23020. '\uFB6A': '\u06A4',
  23021. '\uFB6B': '\u06A4',
  23022. '\uFB6C': '\u06A4',
  23023. '\uFB6D': '\u06A4',
  23024. '\uFB6E': '\u06A6',
  23025. '\uFB6F': '\u06A6',
  23026. '\uFB70': '\u06A6',
  23027. '\uFB71': '\u06A6',
  23028. '\uFB72': '\u0684',
  23029. '\uFB73': '\u0684',
  23030. '\uFB74': '\u0684',
  23031. '\uFB75': '\u0684',
  23032. '\uFB76': '\u0683',
  23033. '\uFB77': '\u0683',
  23034. '\uFB78': '\u0683',
  23035. '\uFB79': '\u0683',
  23036. '\uFB7A': '\u0686',
  23037. '\uFB7B': '\u0686',
  23038. '\uFB7C': '\u0686',
  23039. '\uFB7D': '\u0686',
  23040. '\uFB7E': '\u0687',
  23041. '\uFB7F': '\u0687',
  23042. '\uFB80': '\u0687',
  23043. '\uFB81': '\u0687',
  23044. '\uFB82': '\u068D',
  23045. '\uFB83': '\u068D',
  23046. '\uFB84': '\u068C',
  23047. '\uFB85': '\u068C',
  23048. '\uFB86': '\u068E',
  23049. '\uFB87': '\u068E',
  23050. '\uFB88': '\u0688',
  23051. '\uFB89': '\u0688',
  23052. '\uFB8A': '\u0698',
  23053. '\uFB8B': '\u0698',
  23054. '\uFB8C': '\u0691',
  23055. '\uFB8D': '\u0691',
  23056. '\uFB8E': '\u06A9',
  23057. '\uFB8F': '\u06A9',
  23058. '\uFB90': '\u06A9',
  23059. '\uFB91': '\u06A9',
  23060. '\uFB92': '\u06AF',
  23061. '\uFB93': '\u06AF',
  23062. '\uFB94': '\u06AF',
  23063. '\uFB95': '\u06AF',
  23064. '\uFB96': '\u06B3',
  23065. '\uFB97': '\u06B3',
  23066. '\uFB98': '\u06B3',
  23067. '\uFB99': '\u06B3',
  23068. '\uFB9A': '\u06B1',
  23069. '\uFB9B': '\u06B1',
  23070. '\uFB9C': '\u06B1',
  23071. '\uFB9D': '\u06B1',
  23072. '\uFB9E': '\u06BA',
  23073. '\uFB9F': '\u06BA',
  23074. '\uFBA0': '\u06BB',
  23075. '\uFBA1': '\u06BB',
  23076. '\uFBA2': '\u06BB',
  23077. '\uFBA3': '\u06BB',
  23078. '\uFBA4': '\u06C0',
  23079. '\uFBA5': '\u06C0',
  23080. '\uFBA6': '\u06C1',
  23081. '\uFBA7': '\u06C1',
  23082. '\uFBA8': '\u06C1',
  23083. '\uFBA9': '\u06C1',
  23084. '\uFBAA': '\u06BE',
  23085. '\uFBAB': '\u06BE',
  23086. '\uFBAC': '\u06BE',
  23087. '\uFBAD': '\u06BE',
  23088. '\uFBAE': '\u06D2',
  23089. '\uFBAF': '\u06D2',
  23090. '\uFBB0': '\u06D3',
  23091. '\uFBB1': '\u06D3',
  23092. '\uFBD3': '\u06AD',
  23093. '\uFBD4': '\u06AD',
  23094. '\uFBD5': '\u06AD',
  23095. '\uFBD6': '\u06AD',
  23096. '\uFBD7': '\u06C7',
  23097. '\uFBD8': '\u06C7',
  23098. '\uFBD9': '\u06C6',
  23099. '\uFBDA': '\u06C6',
  23100. '\uFBDB': '\u06C8',
  23101. '\uFBDC': '\u06C8',
  23102. '\uFBDD': '\u0677',
  23103. '\uFBDE': '\u06CB',
  23104. '\uFBDF': '\u06CB',
  23105. '\uFBE0': '\u06C5',
  23106. '\uFBE1': '\u06C5',
  23107. '\uFBE2': '\u06C9',
  23108. '\uFBE3': '\u06C9',
  23109. '\uFBE4': '\u06D0',
  23110. '\uFBE5': '\u06D0',
  23111. '\uFBE6': '\u06D0',
  23112. '\uFBE7': '\u06D0',
  23113. '\uFBE8': '\u0649',
  23114. '\uFBE9': '\u0649',
  23115. '\uFBEA': '\u0626\u0627',
  23116. '\uFBEB': '\u0626\u0627',
  23117. '\uFBEC': '\u0626\u06D5',
  23118. '\uFBED': '\u0626\u06D5',
  23119. '\uFBEE': '\u0626\u0648',
  23120. '\uFBEF': '\u0626\u0648',
  23121. '\uFBF0': '\u0626\u06C7',
  23122. '\uFBF1': '\u0626\u06C7',
  23123. '\uFBF2': '\u0626\u06C6',
  23124. '\uFBF3': '\u0626\u06C6',
  23125. '\uFBF4': '\u0626\u06C8',
  23126. '\uFBF5': '\u0626\u06C8',
  23127. '\uFBF6': '\u0626\u06D0',
  23128. '\uFBF7': '\u0626\u06D0',
  23129. '\uFBF8': '\u0626\u06D0',
  23130. '\uFBF9': '\u0626\u0649',
  23131. '\uFBFA': '\u0626\u0649',
  23132. '\uFBFB': '\u0626\u0649',
  23133. '\uFBFC': '\u06CC',
  23134. '\uFBFD': '\u06CC',
  23135. '\uFBFE': '\u06CC',
  23136. '\uFBFF': '\u06CC',
  23137. '\uFC00': '\u0626\u062C',
  23138. '\uFC01': '\u0626\u062D',
  23139. '\uFC02': '\u0626\u0645',
  23140. '\uFC03': '\u0626\u0649',
  23141. '\uFC04': '\u0626\u064A',
  23142. '\uFC05': '\u0628\u062C',
  23143. '\uFC06': '\u0628\u062D',
  23144. '\uFC07': '\u0628\u062E',
  23145. '\uFC08': '\u0628\u0645',
  23146. '\uFC09': '\u0628\u0649',
  23147. '\uFC0A': '\u0628\u064A',
  23148. '\uFC0B': '\u062A\u062C',
  23149. '\uFC0C': '\u062A\u062D',
  23150. '\uFC0D': '\u062A\u062E',
  23151. '\uFC0E': '\u062A\u0645',
  23152. '\uFC0F': '\u062A\u0649',
  23153. '\uFC10': '\u062A\u064A',
  23154. '\uFC11': '\u062B\u062C',
  23155. '\uFC12': '\u062B\u0645',
  23156. '\uFC13': '\u062B\u0649',
  23157. '\uFC14': '\u062B\u064A',
  23158. '\uFC15': '\u062C\u062D',
  23159. '\uFC16': '\u062C\u0645',
  23160. '\uFC17': '\u062D\u062C',
  23161. '\uFC18': '\u062D\u0645',
  23162. '\uFC19': '\u062E\u062C',
  23163. '\uFC1A': '\u062E\u062D',
  23164. '\uFC1B': '\u062E\u0645',
  23165. '\uFC1C': '\u0633\u062C',
  23166. '\uFC1D': '\u0633\u062D',
  23167. '\uFC1E': '\u0633\u062E',
  23168. '\uFC1F': '\u0633\u0645',
  23169. '\uFC20': '\u0635\u062D',
  23170. '\uFC21': '\u0635\u0645',
  23171. '\uFC22': '\u0636\u062C',
  23172. '\uFC23': '\u0636\u062D',
  23173. '\uFC24': '\u0636\u062E',
  23174. '\uFC25': '\u0636\u0645',
  23175. '\uFC26': '\u0637\u062D',
  23176. '\uFC27': '\u0637\u0645',
  23177. '\uFC28': '\u0638\u0645',
  23178. '\uFC29': '\u0639\u062C',
  23179. '\uFC2A': '\u0639\u0645',
  23180. '\uFC2B': '\u063A\u062C',
  23181. '\uFC2C': '\u063A\u0645',
  23182. '\uFC2D': '\u0641\u062C',
  23183. '\uFC2E': '\u0641\u062D',
  23184. '\uFC2F': '\u0641\u062E',
  23185. '\uFC30': '\u0641\u0645',
  23186. '\uFC31': '\u0641\u0649',
  23187. '\uFC32': '\u0641\u064A',
  23188. '\uFC33': '\u0642\u062D',
  23189. '\uFC34': '\u0642\u0645',
  23190. '\uFC35': '\u0642\u0649',
  23191. '\uFC36': '\u0642\u064A',
  23192. '\uFC37': '\u0643\u0627',
  23193. '\uFC38': '\u0643\u062C',
  23194. '\uFC39': '\u0643\u062D',
  23195. '\uFC3A': '\u0643\u062E',
  23196. '\uFC3B': '\u0643\u0644',
  23197. '\uFC3C': '\u0643\u0645',
  23198. '\uFC3D': '\u0643\u0649',
  23199. '\uFC3E': '\u0643\u064A',
  23200. '\uFC3F': '\u0644\u062C',
  23201. '\uFC40': '\u0644\u062D',
  23202. '\uFC41': '\u0644\u062E',
  23203. '\uFC42': '\u0644\u0645',
  23204. '\uFC43': '\u0644\u0649',
  23205. '\uFC44': '\u0644\u064A',
  23206. '\uFC45': '\u0645\u062C',
  23207. '\uFC46': '\u0645\u062D',
  23208. '\uFC47': '\u0645\u062E',
  23209. '\uFC48': '\u0645\u0645',
  23210. '\uFC49': '\u0645\u0649',
  23211. '\uFC4A': '\u0645\u064A',
  23212. '\uFC4B': '\u0646\u062C',
  23213. '\uFC4C': '\u0646\u062D',
  23214. '\uFC4D': '\u0646\u062E',
  23215. '\uFC4E': '\u0646\u0645',
  23216. '\uFC4F': '\u0646\u0649',
  23217. '\uFC50': '\u0646\u064A',
  23218. '\uFC51': '\u0647\u062C',
  23219. '\uFC52': '\u0647\u0645',
  23220. '\uFC53': '\u0647\u0649',
  23221. '\uFC54': '\u0647\u064A',
  23222. '\uFC55': '\u064A\u062C',
  23223. '\uFC56': '\u064A\u062D',
  23224. '\uFC57': '\u064A\u062E',
  23225. '\uFC58': '\u064A\u0645',
  23226. '\uFC59': '\u064A\u0649',
  23227. '\uFC5A': '\u064A\u064A',
  23228. '\uFC5B': '\u0630\u0670',
  23229. '\uFC5C': '\u0631\u0670',
  23230. '\uFC5D': '\u0649\u0670',
  23231. '\uFC5E': '\u0020\u064C\u0651',
  23232. '\uFC5F': '\u0020\u064D\u0651',
  23233. '\uFC60': '\u0020\u064E\u0651',
  23234. '\uFC61': '\u0020\u064F\u0651',
  23235. '\uFC62': '\u0020\u0650\u0651',
  23236. '\uFC63': '\u0020\u0651\u0670',
  23237. '\uFC64': '\u0626\u0631',
  23238. '\uFC65': '\u0626\u0632',
  23239. '\uFC66': '\u0626\u0645',
  23240. '\uFC67': '\u0626\u0646',
  23241. '\uFC68': '\u0626\u0649',
  23242. '\uFC69': '\u0626\u064A',
  23243. '\uFC6A': '\u0628\u0631',
  23244. '\uFC6B': '\u0628\u0632',
  23245. '\uFC6C': '\u0628\u0645',
  23246. '\uFC6D': '\u0628\u0646',
  23247. '\uFC6E': '\u0628\u0649',
  23248. '\uFC6F': '\u0628\u064A',
  23249. '\uFC70': '\u062A\u0631',
  23250. '\uFC71': '\u062A\u0632',
  23251. '\uFC72': '\u062A\u0645',
  23252. '\uFC73': '\u062A\u0646',
  23253. '\uFC74': '\u062A\u0649',
  23254. '\uFC75': '\u062A\u064A',
  23255. '\uFC76': '\u062B\u0631',
  23256. '\uFC77': '\u062B\u0632',
  23257. '\uFC78': '\u062B\u0645',
  23258. '\uFC79': '\u062B\u0646',
  23259. '\uFC7A': '\u062B\u0649',
  23260. '\uFC7B': '\u062B\u064A',
  23261. '\uFC7C': '\u0641\u0649',
  23262. '\uFC7D': '\u0641\u064A',
  23263. '\uFC7E': '\u0642\u0649',
  23264. '\uFC7F': '\u0642\u064A',
  23265. '\uFC80': '\u0643\u0627',
  23266. '\uFC81': '\u0643\u0644',
  23267. '\uFC82': '\u0643\u0645',
  23268. '\uFC83': '\u0643\u0649',
  23269. '\uFC84': '\u0643\u064A',
  23270. '\uFC85': '\u0644\u0645',
  23271. '\uFC86': '\u0644\u0649',
  23272. '\uFC87': '\u0644\u064A',
  23273. '\uFC88': '\u0645\u0627',
  23274. '\uFC89': '\u0645\u0645',
  23275. '\uFC8A': '\u0646\u0631',
  23276. '\uFC8B': '\u0646\u0632',
  23277. '\uFC8C': '\u0646\u0645',
  23278. '\uFC8D': '\u0646\u0646',
  23279. '\uFC8E': '\u0646\u0649',
  23280. '\uFC8F': '\u0646\u064A',
  23281. '\uFC90': '\u0649\u0670',
  23282. '\uFC91': '\u064A\u0631',
  23283. '\uFC92': '\u064A\u0632',
  23284. '\uFC93': '\u064A\u0645',
  23285. '\uFC94': '\u064A\u0646',
  23286. '\uFC95': '\u064A\u0649',
  23287. '\uFC96': '\u064A\u064A',
  23288. '\uFC97': '\u0626\u062C',
  23289. '\uFC98': '\u0626\u062D',
  23290. '\uFC99': '\u0626\u062E',
  23291. '\uFC9A': '\u0626\u0645',
  23292. '\uFC9B': '\u0626\u0647',
  23293. '\uFC9C': '\u0628\u062C',
  23294. '\uFC9D': '\u0628\u062D',
  23295. '\uFC9E': '\u0628\u062E',
  23296. '\uFC9F': '\u0628\u0645',
  23297. '\uFCA0': '\u0628\u0647',
  23298. '\uFCA1': '\u062A\u062C',
  23299. '\uFCA2': '\u062A\u062D',
  23300. '\uFCA3': '\u062A\u062E',
  23301. '\uFCA4': '\u062A\u0645',
  23302. '\uFCA5': '\u062A\u0647',
  23303. '\uFCA6': '\u062B\u0645',
  23304. '\uFCA7': '\u062C\u062D',
  23305. '\uFCA8': '\u062C\u0645',
  23306. '\uFCA9': '\u062D\u062C',
  23307. '\uFCAA': '\u062D\u0645',
  23308. '\uFCAB': '\u062E\u062C',
  23309. '\uFCAC': '\u062E\u0645',
  23310. '\uFCAD': '\u0633\u062C',
  23311. '\uFCAE': '\u0633\u062D',
  23312. '\uFCAF': '\u0633\u062E',
  23313. '\uFCB0': '\u0633\u0645',
  23314. '\uFCB1': '\u0635\u062D',
  23315. '\uFCB2': '\u0635\u062E',
  23316. '\uFCB3': '\u0635\u0645',
  23317. '\uFCB4': '\u0636\u062C',
  23318. '\uFCB5': '\u0636\u062D',
  23319. '\uFCB6': '\u0636\u062E',
  23320. '\uFCB7': '\u0636\u0645',
  23321. '\uFCB8': '\u0637\u062D',
  23322. '\uFCB9': '\u0638\u0645',
  23323. '\uFCBA': '\u0639\u062C',
  23324. '\uFCBB': '\u0639\u0645',
  23325. '\uFCBC': '\u063A\u062C',
  23326. '\uFCBD': '\u063A\u0645',
  23327. '\uFCBE': '\u0641\u062C',
  23328. '\uFCBF': '\u0641\u062D',
  23329. '\uFCC0': '\u0641\u062E',
  23330. '\uFCC1': '\u0641\u0645',
  23331. '\uFCC2': '\u0642\u062D',
  23332. '\uFCC3': '\u0642\u0645',
  23333. '\uFCC4': '\u0643\u062C',
  23334. '\uFCC5': '\u0643\u062D',
  23335. '\uFCC6': '\u0643\u062E',
  23336. '\uFCC7': '\u0643\u0644',
  23337. '\uFCC8': '\u0643\u0645',
  23338. '\uFCC9': '\u0644\u062C',
  23339. '\uFCCA': '\u0644\u062D',
  23340. '\uFCCB': '\u0644\u062E',
  23341. '\uFCCC': '\u0644\u0645',
  23342. '\uFCCD': '\u0644\u0647',
  23343. '\uFCCE': '\u0645\u062C',
  23344. '\uFCCF': '\u0645\u062D',
  23345. '\uFCD0': '\u0645\u062E',
  23346. '\uFCD1': '\u0645\u0645',
  23347. '\uFCD2': '\u0646\u062C',
  23348. '\uFCD3': '\u0646\u062D',
  23349. '\uFCD4': '\u0646\u062E',
  23350. '\uFCD5': '\u0646\u0645',
  23351. '\uFCD6': '\u0646\u0647',
  23352. '\uFCD7': '\u0647\u062C',
  23353. '\uFCD8': '\u0647\u0645',
  23354. '\uFCD9': '\u0647\u0670',
  23355. '\uFCDA': '\u064A\u062C',
  23356. '\uFCDB': '\u064A\u062D',
  23357. '\uFCDC': '\u064A\u062E',
  23358. '\uFCDD': '\u064A\u0645',
  23359. '\uFCDE': '\u064A\u0647',
  23360. '\uFCDF': '\u0626\u0645',
  23361. '\uFCE0': '\u0626\u0647',
  23362. '\uFCE1': '\u0628\u0645',
  23363. '\uFCE2': '\u0628\u0647',
  23364. '\uFCE3': '\u062A\u0645',
  23365. '\uFCE4': '\u062A\u0647',
  23366. '\uFCE5': '\u062B\u0645',
  23367. '\uFCE6': '\u062B\u0647',
  23368. '\uFCE7': '\u0633\u0645',
  23369. '\uFCE8': '\u0633\u0647',
  23370. '\uFCE9': '\u0634\u0645',
  23371. '\uFCEA': '\u0634\u0647',
  23372. '\uFCEB': '\u0643\u0644',
  23373. '\uFCEC': '\u0643\u0645',
  23374. '\uFCED': '\u0644\u0645',
  23375. '\uFCEE': '\u0646\u0645',
  23376. '\uFCEF': '\u0646\u0647',
  23377. '\uFCF0': '\u064A\u0645',
  23378. '\uFCF1': '\u064A\u0647',
  23379. '\uFCF2': '\u0640\u064E\u0651',
  23380. '\uFCF3': '\u0640\u064F\u0651',
  23381. '\uFCF4': '\u0640\u0650\u0651',
  23382. '\uFCF5': '\u0637\u0649',
  23383. '\uFCF6': '\u0637\u064A',
  23384. '\uFCF7': '\u0639\u0649',
  23385. '\uFCF8': '\u0639\u064A',
  23386. '\uFCF9': '\u063A\u0649',
  23387. '\uFCFA': '\u063A\u064A',
  23388. '\uFCFB': '\u0633\u0649',
  23389. '\uFCFC': '\u0633\u064A',
  23390. '\uFCFD': '\u0634\u0649',
  23391. '\uFCFE': '\u0634\u064A',
  23392. '\uFCFF': '\u062D\u0649',
  23393. '\uFD00': '\u062D\u064A',
  23394. '\uFD01': '\u062C\u0649',
  23395. '\uFD02': '\u062C\u064A',
  23396. '\uFD03': '\u062E\u0649',
  23397. '\uFD04': '\u062E\u064A',
  23398. '\uFD05': '\u0635\u0649',
  23399. '\uFD06': '\u0635\u064A',
  23400. '\uFD07': '\u0636\u0649',
  23401. '\uFD08': '\u0636\u064A',
  23402. '\uFD09': '\u0634\u062C',
  23403. '\uFD0A': '\u0634\u062D',
  23404. '\uFD0B': '\u0634\u062E',
  23405. '\uFD0C': '\u0634\u0645',
  23406. '\uFD0D': '\u0634\u0631',
  23407. '\uFD0E': '\u0633\u0631',
  23408. '\uFD0F': '\u0635\u0631',
  23409. '\uFD10': '\u0636\u0631',
  23410. '\uFD11': '\u0637\u0649',
  23411. '\uFD12': '\u0637\u064A',
  23412. '\uFD13': '\u0639\u0649',
  23413. '\uFD14': '\u0639\u064A',
  23414. '\uFD15': '\u063A\u0649',
  23415. '\uFD16': '\u063A\u064A',
  23416. '\uFD17': '\u0633\u0649',
  23417. '\uFD18': '\u0633\u064A',
  23418. '\uFD19': '\u0634\u0649',
  23419. '\uFD1A': '\u0634\u064A',
  23420. '\uFD1B': '\u062D\u0649',
  23421. '\uFD1C': '\u062D\u064A',
  23422. '\uFD1D': '\u062C\u0649',
  23423. '\uFD1E': '\u062C\u064A',
  23424. '\uFD1F': '\u062E\u0649',
  23425. '\uFD20': '\u062E\u064A',
  23426. '\uFD21': '\u0635\u0649',
  23427. '\uFD22': '\u0635\u064A',
  23428. '\uFD23': '\u0636\u0649',
  23429. '\uFD24': '\u0636\u064A',
  23430. '\uFD25': '\u0634\u062C',
  23431. '\uFD26': '\u0634\u062D',
  23432. '\uFD27': '\u0634\u062E',
  23433. '\uFD28': '\u0634\u0645',
  23434. '\uFD29': '\u0634\u0631',
  23435. '\uFD2A': '\u0633\u0631',
  23436. '\uFD2B': '\u0635\u0631',
  23437. '\uFD2C': '\u0636\u0631',
  23438. '\uFD2D': '\u0634\u062C',
  23439. '\uFD2E': '\u0634\u062D',
  23440. '\uFD2F': '\u0634\u062E',
  23441. '\uFD30': '\u0634\u0645',
  23442. '\uFD31': '\u0633\u0647',
  23443. '\uFD32': '\u0634\u0647',
  23444. '\uFD33': '\u0637\u0645',
  23445. '\uFD34': '\u0633\u062C',
  23446. '\uFD35': '\u0633\u062D',
  23447. '\uFD36': '\u0633\u062E',
  23448. '\uFD37': '\u0634\u062C',
  23449. '\uFD38': '\u0634\u062D',
  23450. '\uFD39': '\u0634\u062E',
  23451. '\uFD3A': '\u0637\u0645',
  23452. '\uFD3B': '\u0638\u0645',
  23453. '\uFD3C': '\u0627\u064B',
  23454. '\uFD3D': '\u0627\u064B',
  23455. '\uFD50': '\u062A\u062C\u0645',
  23456. '\uFD51': '\u062A\u062D\u062C',
  23457. '\uFD52': '\u062A\u062D\u062C',
  23458. '\uFD53': '\u062A\u062D\u0645',
  23459. '\uFD54': '\u062A\u062E\u0645',
  23460. '\uFD55': '\u062A\u0645\u062C',
  23461. '\uFD56': '\u062A\u0645\u062D',
  23462. '\uFD57': '\u062A\u0645\u062E',
  23463. '\uFD58': '\u062C\u0645\u062D',
  23464. '\uFD59': '\u062C\u0645\u062D',
  23465. '\uFD5A': '\u062D\u0645\u064A',
  23466. '\uFD5B': '\u062D\u0645\u0649',
  23467. '\uFD5C': '\u0633\u062D\u062C',
  23468. '\uFD5D': '\u0633\u062C\u062D',
  23469. '\uFD5E': '\u0633\u062C\u0649',
  23470. '\uFD5F': '\u0633\u0645\u062D',
  23471. '\uFD60': '\u0633\u0645\u062D',
  23472. '\uFD61': '\u0633\u0645\u062C',
  23473. '\uFD62': '\u0633\u0645\u0645',
  23474. '\uFD63': '\u0633\u0645\u0645',
  23475. '\uFD64': '\u0635\u062D\u062D',
  23476. '\uFD65': '\u0635\u062D\u062D',
  23477. '\uFD66': '\u0635\u0645\u0645',
  23478. '\uFD67': '\u0634\u062D\u0645',
  23479. '\uFD68': '\u0634\u062D\u0645',
  23480. '\uFD69': '\u0634\u062C\u064A',
  23481. '\uFD6A': '\u0634\u0645\u062E',
  23482. '\uFD6B': '\u0634\u0645\u062E',
  23483. '\uFD6C': '\u0634\u0645\u0645',
  23484. '\uFD6D': '\u0634\u0645\u0645',
  23485. '\uFD6E': '\u0636\u062D\u0649',
  23486. '\uFD6F': '\u0636\u062E\u0645',
  23487. '\uFD70': '\u0636\u062E\u0645',
  23488. '\uFD71': '\u0637\u0645\u062D',
  23489. '\uFD72': '\u0637\u0645\u062D',
  23490. '\uFD73': '\u0637\u0645\u0645',
  23491. '\uFD74': '\u0637\u0645\u064A',
  23492. '\uFD75': '\u0639\u062C\u0645',
  23493. '\uFD76': '\u0639\u0645\u0645',
  23494. '\uFD77': '\u0639\u0645\u0645',
  23495. '\uFD78': '\u0639\u0645\u0649',
  23496. '\uFD79': '\u063A\u0645\u0645',
  23497. '\uFD7A': '\u063A\u0645\u064A',
  23498. '\uFD7B': '\u063A\u0645\u0649',
  23499. '\uFD7C': '\u0641\u062E\u0645',
  23500. '\uFD7D': '\u0641\u062E\u0645',
  23501. '\uFD7E': '\u0642\u0645\u062D',
  23502. '\uFD7F': '\u0642\u0645\u0645',
  23503. '\uFD80': '\u0644\u062D\u0645',
  23504. '\uFD81': '\u0644\u062D\u064A',
  23505. '\uFD82': '\u0644\u062D\u0649',
  23506. '\uFD83': '\u0644\u062C\u062C',
  23507. '\uFD84': '\u0644\u062C\u062C',
  23508. '\uFD85': '\u0644\u062E\u0645',
  23509. '\uFD86': '\u0644\u062E\u0645',
  23510. '\uFD87': '\u0644\u0645\u062D',
  23511. '\uFD88': '\u0644\u0645\u062D',
  23512. '\uFD89': '\u0645\u062D\u062C',
  23513. '\uFD8A': '\u0645\u062D\u0645',
  23514. '\uFD8B': '\u0645\u062D\u064A',
  23515. '\uFD8C': '\u0645\u062C\u062D',
  23516. '\uFD8D': '\u0645\u062C\u0645',
  23517. '\uFD8E': '\u0645\u062E\u062C',
  23518. '\uFD8F': '\u0645\u062E\u0645',
  23519. '\uFD92': '\u0645\u062C\u062E',
  23520. '\uFD93': '\u0647\u0645\u062C',
  23521. '\uFD94': '\u0647\u0645\u0645',
  23522. '\uFD95': '\u0646\u062D\u0645',
  23523. '\uFD96': '\u0646\u062D\u0649',
  23524. '\uFD97': '\u0646\u062C\u0645',
  23525. '\uFD98': '\u0646\u062C\u0645',
  23526. '\uFD99': '\u0646\u062C\u0649',
  23527. '\uFD9A': '\u0646\u0645\u064A',
  23528. '\uFD9B': '\u0646\u0645\u0649',
  23529. '\uFD9C': '\u064A\u0645\u0645',
  23530. '\uFD9D': '\u064A\u0645\u0645',
  23531. '\uFD9E': '\u0628\u062E\u064A',
  23532. '\uFD9F': '\u062A\u062C\u064A',
  23533. '\uFDA0': '\u062A\u062C\u0649',
  23534. '\uFDA1': '\u062A\u062E\u064A',
  23535. '\uFDA2': '\u062A\u062E\u0649',
  23536. '\uFDA3': '\u062A\u0645\u064A',
  23537. '\uFDA4': '\u062A\u0645\u0649',
  23538. '\uFDA5': '\u062C\u0645\u064A',
  23539. '\uFDA6': '\u062C\u062D\u0649',
  23540. '\uFDA7': '\u062C\u0645\u0649',
  23541. '\uFDA8': '\u0633\u062E\u0649',
  23542. '\uFDA9': '\u0635\u062D\u064A',
  23543. '\uFDAA': '\u0634\u062D\u064A',
  23544. '\uFDAB': '\u0636\u062D\u064A',
  23545. '\uFDAC': '\u0644\u062C\u064A',
  23546. '\uFDAD': '\u0644\u0645\u064A',
  23547. '\uFDAE': '\u064A\u062D\u064A',
  23548. '\uFDAF': '\u064A\u062C\u064A',
  23549. '\uFDB0': '\u064A\u0645\u064A',
  23550. '\uFDB1': '\u0645\u0645\u064A',
  23551. '\uFDB2': '\u0642\u0645\u064A',
  23552. '\uFDB3': '\u0646\u062D\u064A',
  23553. '\uFDB4': '\u0642\u0645\u062D',
  23554. '\uFDB5': '\u0644\u062D\u0645',
  23555. '\uFDB6': '\u0639\u0645\u064A',
  23556. '\uFDB7': '\u0643\u0645\u064A',
  23557. '\uFDB8': '\u0646\u062C\u062D',
  23558. '\uFDB9': '\u0645\u062E\u064A',
  23559. '\uFDBA': '\u0644\u062C\u0645',
  23560. '\uFDBB': '\u0643\u0645\u0645',
  23561. '\uFDBC': '\u0644\u062C\u0645',
  23562. '\uFDBD': '\u0646\u062C\u062D',
  23563. '\uFDBE': '\u062C\u062D\u064A',
  23564. '\uFDBF': '\u062D\u062C\u064A',
  23565. '\uFDC0': '\u0645\u062C\u064A',
  23566. '\uFDC1': '\u0641\u0645\u064A',
  23567. '\uFDC2': '\u0628\u062D\u064A',
  23568. '\uFDC3': '\u0643\u0645\u0645',
  23569. '\uFDC4': '\u0639\u062C\u0645',
  23570. '\uFDC5': '\u0635\u0645\u0645',
  23571. '\uFDC6': '\u0633\u062E\u064A',
  23572. '\uFDC7': '\u0646\u062C\u064A',
  23573. '\uFE49': '\u203E',
  23574. '\uFE4A': '\u203E',
  23575. '\uFE4B': '\u203E',
  23576. '\uFE4C': '\u203E',
  23577. '\uFE4D': '\u005F',
  23578. '\uFE4E': '\u005F',
  23579. '\uFE4F': '\u005F',
  23580. '\uFE80': '\u0621',
  23581. '\uFE81': '\u0622',
  23582. '\uFE82': '\u0622',
  23583. '\uFE83': '\u0623',
  23584. '\uFE84': '\u0623',
  23585. '\uFE85': '\u0624',
  23586. '\uFE86': '\u0624',
  23587. '\uFE87': '\u0625',
  23588. '\uFE88': '\u0625',
  23589. '\uFE89': '\u0626',
  23590. '\uFE8A': '\u0626',
  23591. '\uFE8B': '\u0626',
  23592. '\uFE8C': '\u0626',
  23593. '\uFE8D': '\u0627',
  23594. '\uFE8E': '\u0627',
  23595. '\uFE8F': '\u0628',
  23596. '\uFE90': '\u0628',
  23597. '\uFE91': '\u0628',
  23598. '\uFE92': '\u0628',
  23599. '\uFE93': '\u0629',
  23600. '\uFE94': '\u0629',
  23601. '\uFE95': '\u062A',
  23602. '\uFE96': '\u062A',
  23603. '\uFE97': '\u062A',
  23604. '\uFE98': '\u062A',
  23605. '\uFE99': '\u062B',
  23606. '\uFE9A': '\u062B',
  23607. '\uFE9B': '\u062B',
  23608. '\uFE9C': '\u062B',
  23609. '\uFE9D': '\u062C',
  23610. '\uFE9E': '\u062C',
  23611. '\uFE9F': '\u062C',
  23612. '\uFEA0': '\u062C',
  23613. '\uFEA1': '\u062D',
  23614. '\uFEA2': '\u062D',
  23615. '\uFEA3': '\u062D',
  23616. '\uFEA4': '\u062D',
  23617. '\uFEA5': '\u062E',
  23618. '\uFEA6': '\u062E',
  23619. '\uFEA7': '\u062E',
  23620. '\uFEA8': '\u062E',
  23621. '\uFEA9': '\u062F',
  23622. '\uFEAA': '\u062F',
  23623. '\uFEAB': '\u0630',
  23624. '\uFEAC': '\u0630',
  23625. '\uFEAD': '\u0631',
  23626. '\uFEAE': '\u0631',
  23627. '\uFEAF': '\u0632',
  23628. '\uFEB0': '\u0632',
  23629. '\uFEB1': '\u0633',
  23630. '\uFEB2': '\u0633',
  23631. '\uFEB3': '\u0633',
  23632. '\uFEB4': '\u0633',
  23633. '\uFEB5': '\u0634',
  23634. '\uFEB6': '\u0634',
  23635. '\uFEB7': '\u0634',
  23636. '\uFEB8': '\u0634',
  23637. '\uFEB9': '\u0635',
  23638. '\uFEBA': '\u0635',
  23639. '\uFEBB': '\u0635',
  23640. '\uFEBC': '\u0635',
  23641. '\uFEBD': '\u0636',
  23642. '\uFEBE': '\u0636',
  23643. '\uFEBF': '\u0636',
  23644. '\uFEC0': '\u0636',
  23645. '\uFEC1': '\u0637',
  23646. '\uFEC2': '\u0637',
  23647. '\uFEC3': '\u0637',
  23648. '\uFEC4': '\u0637',
  23649. '\uFEC5': '\u0638',
  23650. '\uFEC6': '\u0638',
  23651. '\uFEC7': '\u0638',
  23652. '\uFEC8': '\u0638',
  23653. '\uFEC9': '\u0639',
  23654. '\uFECA': '\u0639',
  23655. '\uFECB': '\u0639',
  23656. '\uFECC': '\u0639',
  23657. '\uFECD': '\u063A',
  23658. '\uFECE': '\u063A',
  23659. '\uFECF': '\u063A',
  23660. '\uFED0': '\u063A',
  23661. '\uFED1': '\u0641',
  23662. '\uFED2': '\u0641',
  23663. '\uFED3': '\u0641',
  23664. '\uFED4': '\u0641',
  23665. '\uFED5': '\u0642',
  23666. '\uFED6': '\u0642',
  23667. '\uFED7': '\u0642',
  23668. '\uFED8': '\u0642',
  23669. '\uFED9': '\u0643',
  23670. '\uFEDA': '\u0643',
  23671. '\uFEDB': '\u0643',
  23672. '\uFEDC': '\u0643',
  23673. '\uFEDD': '\u0644',
  23674. '\uFEDE': '\u0644',
  23675. '\uFEDF': '\u0644',
  23676. '\uFEE0': '\u0644',
  23677. '\uFEE1': '\u0645',
  23678. '\uFEE2': '\u0645',
  23679. '\uFEE3': '\u0645',
  23680. '\uFEE4': '\u0645',
  23681. '\uFEE5': '\u0646',
  23682. '\uFEE6': '\u0646',
  23683. '\uFEE7': '\u0646',
  23684. '\uFEE8': '\u0646',
  23685. '\uFEE9': '\u0647',
  23686. '\uFEEA': '\u0647',
  23687. '\uFEEB': '\u0647',
  23688. '\uFEEC': '\u0647',
  23689. '\uFEED': '\u0648',
  23690. '\uFEEE': '\u0648',
  23691. '\uFEEF': '\u0649',
  23692. '\uFEF0': '\u0649',
  23693. '\uFEF1': '\u064A',
  23694. '\uFEF2': '\u064A',
  23695. '\uFEF3': '\u064A',
  23696. '\uFEF4': '\u064A',
  23697. '\uFEF5': '\u0644\u0622',
  23698. '\uFEF6': '\u0644\u0622',
  23699. '\uFEF7': '\u0644\u0623',
  23700. '\uFEF8': '\u0644\u0623',
  23701. '\uFEF9': '\u0644\u0625',
  23702. '\uFEFA': '\u0644\u0625',
  23703. '\uFEFB': '\u0644\u0627',
  23704. '\uFEFC': '\u0644\u0627'
  23705. };
  23706. function reverseIfRtl(chars) {
  23707. var charsLength = chars.length;
  23708. //reverse an arabic ligature
  23709. if (charsLength <= 1 || !isRTLRangeFor(chars.charCodeAt(0))) {
  23710. return chars;
  23711. }
  23712. var s = '';
  23713. for (var ii = charsLength - 1; ii >= 0; ii--) {
  23714. s += chars[ii];
  23715. }
  23716. return s;
  23717. }
  23718. function adjustWidths(properties) {
  23719. if (properties.fontMatrix[0] === FONT_IDENTITY_MATRIX[0]) {
  23720. return;
  23721. }
  23722. // adjusting width to fontMatrix scale
  23723. var scale = 0.001 / properties.fontMatrix[0];
  23724. var glyphsWidths = properties.widths;
  23725. for (var glyph in glyphsWidths) {
  23726. glyphsWidths[glyph] *= scale;
  23727. }
  23728. properties.defaultWidth *= scale;
  23729. }
  23730. var Glyph = (function GlyphClosure() {
  23731. function Glyph(fontChar, unicode, accent, width, vmetric, operatorListId) {
  23732. this.fontChar = fontChar;
  23733. this.unicode = unicode;
  23734. this.accent = accent;
  23735. this.width = width;
  23736. this.vmetric = vmetric;
  23737. this.operatorListId = operatorListId;
  23738. }
  23739. Glyph.prototype.matchesForCache =
  23740. function(fontChar, unicode, accent, width, vmetric, operatorListId) {
  23741. return this.fontChar === fontChar &&
  23742. this.unicode === unicode &&
  23743. this.accent === accent &&
  23744. this.width === width &&
  23745. this.vmetric === vmetric &&
  23746. this.operatorListId === operatorListId;
  23747. };
  23748. return Glyph;
  23749. })();
  23750. /**
  23751. * 'Font' is the class the outside world should use, it encapsulate all the font
  23752. * decoding logics whatever type it is (assuming the font type is supported).
  23753. *
  23754. * For example to read a Type1 font and to attach it to the document:
  23755. * var type1Font = new Font("MyFontName", binaryFile, propertiesObject);
  23756. * type1Font.bind();
  23757. */
  23758. var Font = (function FontClosure() {
  23759. function Font(name, file, properties) {
  23760. var charCode;
  23761. this.name = name;
  23762. this.loadedName = properties.loadedName;
  23763. this.isType3Font = properties.isType3Font;
  23764. this.sizes = [];
  23765. this.glyphCache = {};
  23766. var names = name.split('+');
  23767. names = names.length > 1 ? names[1] : names[0];
  23768. names = names.split(/[-,_]/g)[0];
  23769. this.isSerifFont = !!(properties.flags & FontFlags.Serif);
  23770. this.isSymbolicFont = !!(properties.flags & FontFlags.Symbolic);
  23771. this.isMonospace = !!(properties.flags & FontFlags.FixedPitch);
  23772. var type = properties.type;
  23773. this.type = type;
  23774. this.fallbackName = (this.isMonospace ? 'monospace' :
  23775. (this.isSerifFont ? 'serif' : 'sans-serif'));
  23776. this.differences = properties.differences;
  23777. this.widths = properties.widths;
  23778. this.defaultWidth = properties.defaultWidth;
  23779. this.composite = properties.composite;
  23780. this.wideChars = properties.wideChars;
  23781. this.cMap = properties.cMap;
  23782. this.ascent = properties.ascent / PDF_GLYPH_SPACE_UNITS;
  23783. this.descent = properties.descent / PDF_GLYPH_SPACE_UNITS;
  23784. this.fontMatrix = properties.fontMatrix;
  23785. var unicode = this.buildToUnicode(properties);
  23786. this.toUnicode = properties.toUnicode = unicode.toUnicode;
  23787. this.isIdentityUnicode = properties.isIdentityUnicode = unicode.isIdentity;
  23788. this.toFontChar = [];
  23789. if (properties.type == 'Type3') {
  23790. for (charCode = 0; charCode < 256; charCode++) {
  23791. this.toFontChar[charCode] = (this.differences[charCode] ||
  23792. properties.defaultEncoding[charCode]);
  23793. }
  23794. return;
  23795. }
  23796. this.cidEncoding = properties.cidEncoding;
  23797. this.vertical = properties.vertical;
  23798. if (this.vertical) {
  23799. this.vmetrics = properties.vmetrics;
  23800. this.defaultVMetrics = properties.defaultVMetrics;
  23801. }
  23802. if (!file || file.isEmpty) {
  23803. if (file) {
  23804. // Some bad PDF generators will include empty font files,
  23805. // attempting to recover by assuming that no file exists.
  23806. warn('Font file is empty in "' + name + '" (' + this.loadedName + ')');
  23807. }
  23808. this.missingFile = true;
  23809. // The file data is not specified. Trying to fix the font name
  23810. // to be used with the canvas.font.
  23811. var fontName = name.replace(/[,_]/g, '-');
  23812. var isStandardFont = fontName in stdFontMap;
  23813. fontName = stdFontMap[fontName] || nonStdFontMap[fontName] || fontName;
  23814. this.bold = (fontName.search(/bold/gi) != -1);
  23815. this.italic = ((fontName.search(/oblique/gi) != -1) ||
  23816. (fontName.search(/italic/gi) != -1));
  23817. // Use 'name' instead of 'fontName' here because the original
  23818. // name ArialBlack for example will be replaced by Helvetica.
  23819. this.black = (name.search(/Black/g) != -1);
  23820. // if at least one width is present, remeasure all chars when exists
  23821. this.remeasure = Object.keys(this.widths).length > 0;
  23822. if (isStandardFont && type === 'CIDFontType2' &&
  23823. properties.cidEncoding.indexOf('Identity-') === 0) {
  23824. // Standard fonts might be embedded as CID font without glyph mapping.
  23825. // Building one based on GlyphMapForStandardFonts.
  23826. var map = [];
  23827. for (var code in GlyphMapForStandardFonts) {
  23828. map[+code] = GlyphMapForStandardFonts[code];
  23829. }
  23830. this.toFontChar = map;
  23831. this.toUnicode = map;
  23832. } else if (/Symbol/i.test(fontName)) {
  23833. var symbols = Encodings.SymbolSetEncoding;
  23834. for (charCode in symbols) {
  23835. var fontChar = GlyphsUnicode[symbols[charCode]];
  23836. if (!fontChar) {
  23837. continue;
  23838. }
  23839. this.toFontChar[charCode] = fontChar;
  23840. }
  23841. } else if (isStandardFont) {
  23842. this.toFontChar = [];
  23843. for (charCode in properties.defaultEncoding) {
  23844. var glyphName = properties.differences[charCode] ||
  23845. properties.defaultEncoding[charCode];
  23846. this.toFontChar[charCode] = GlyphsUnicode[glyphName];
  23847. }
  23848. } else {
  23849. for (charCode in this.toUnicode) {
  23850. this.toFontChar[charCode] = this.toUnicode[charCode].charCodeAt(0);
  23851. }
  23852. }
  23853. this.loadedName = fontName.split('-')[0];
  23854. this.loading = false;
  23855. return;
  23856. }
  23857. // Some fonts might use wrong font types for Type1C or CIDFontType0C
  23858. var subtype = properties.subtype;
  23859. if (subtype == 'Type1C' && (type != 'Type1' && type != 'MMType1')) {
  23860. // Some TrueType fonts by mistake claim Type1C
  23861. if (isTrueTypeFile(file)) {
  23862. subtype = 'TrueType';
  23863. } else {
  23864. type = 'Type1';
  23865. }
  23866. }
  23867. if (subtype == 'CIDFontType0C' && type != 'CIDFontType0') {
  23868. type = 'CIDFontType0';
  23869. }
  23870. // XXX: Temporarily change the type for open type so we trigger a warning.
  23871. // This should be removed when we add support for open type.
  23872. if (subtype === 'OpenType') {
  23873. type = 'OpenType';
  23874. }
  23875. var data;
  23876. switch (type) {
  23877. case 'Type1':
  23878. case 'CIDFontType0':
  23879. this.mimetype = 'font/opentype';
  23880. var cff = (subtype == 'Type1C' || subtype == 'CIDFontType0C') ?
  23881. new CFFFont(file, properties) : new Type1Font(name, file, properties);
  23882. adjustWidths(properties);
  23883. // Wrap the CFF data inside an OTF font file
  23884. data = this.convert(name, cff, properties);
  23885. break;
  23886. case 'OpenType':
  23887. case 'TrueType':
  23888. case 'CIDFontType2':
  23889. this.mimetype = 'font/opentype';
  23890. // Repair the TrueType file. It is can be damaged in the point of
  23891. // view of the sanitizer
  23892. data = this.checkAndRepair(name, file, properties);
  23893. break;
  23894. default:
  23895. error('Font ' + type + ' is not supported');
  23896. break;
  23897. }
  23898. this.data = data;
  23899. // Transfer some properties again that could change during font conversion
  23900. this.fontMatrix = properties.fontMatrix;
  23901. this.widths = properties.widths;
  23902. this.defaultWidth = properties.defaultWidth;
  23903. this.encoding = properties.baseEncoding;
  23904. this.seacMap = properties.seacMap;
  23905. this.loading = true;
  23906. }
  23907. Font.getFontID = (function () {
  23908. var ID = 1;
  23909. return function Font_getFontID() {
  23910. return String(ID++);
  23911. };
  23912. })();
  23913. function int16(b0, b1) {
  23914. return (b0 << 8) + b1;
  23915. }
  23916. function int32(b0, b1, b2, b3) {
  23917. return (b0 << 24) + (b1 << 16) + (b2 << 8) + b3;
  23918. }
  23919. function getMaxPower2(number) {
  23920. var maxPower = 0;
  23921. var value = number;
  23922. while (value >= 2) {
  23923. value /= 2;
  23924. maxPower++;
  23925. }
  23926. value = 2;
  23927. for (var i = 1; i < maxPower; i++) {
  23928. value *= 2;
  23929. }
  23930. return value;
  23931. }
  23932. function string16(value) {
  23933. return String.fromCharCode((value >> 8) & 0xff, value & 0xff);
  23934. }
  23935. function safeString16(value) {
  23936. // clamp value to the 16-bit int range
  23937. value = (value > 0x7FFF ? 0x7FFF : (value < -0x8000 ? -0x8000 : value));
  23938. return String.fromCharCode((value >> 8) & 0xff, value & 0xff);
  23939. }
  23940. function createOpenTypeHeader(sfnt, file, numTables) {
  23941. // Windows hates the Mac TrueType sfnt version number
  23942. if (sfnt == 'true') {
  23943. sfnt = string32(0x00010000);
  23944. }
  23945. // sfnt version (4 bytes)
  23946. var header = sfnt;
  23947. // numTables (2 bytes)
  23948. header += string16(numTables);
  23949. // searchRange (2 bytes)
  23950. var tablesMaxPower2 = getMaxPower2(numTables);
  23951. var searchRange = tablesMaxPower2 * 16;
  23952. header += string16(searchRange);
  23953. // entrySelector (2 bytes)
  23954. header += string16(Math.log(tablesMaxPower2) / Math.log(2));
  23955. // rangeShift (2 bytes)
  23956. header += string16(numTables * 16 - searchRange);
  23957. file.file += header;
  23958. file.virtualOffset += header.length;
  23959. }
  23960. function createTableEntry(file, tag, data) {
  23961. // offset
  23962. var offset = file.virtualOffset;
  23963. // length
  23964. var length = data.length;
  23965. // Per spec tables must be 4-bytes align so add padding as needed
  23966. while (data.length & 3) {
  23967. data.push(0x00);
  23968. }
  23969. while (file.virtualOffset & 3) {
  23970. file.virtualOffset++;
  23971. }
  23972. // checksum
  23973. var checksum = 0, n = data.length;
  23974. for (var i = 0; i < n; i += 4) {
  23975. checksum = (checksum + int32(data[i], data[i + 1], data[i + 2],
  23976. data[i + 3])) | 0;
  23977. }
  23978. var tableEntry = (tag + string32(checksum) +
  23979. string32(offset) + string32(length));
  23980. file.file += tableEntry;
  23981. file.virtualOffset += data.length;
  23982. }
  23983. function isTrueTypeFile(file) {
  23984. var header = file.peekBytes(4);
  23985. return readUint32(header, 0) === 0x00010000;
  23986. }
  23987. /**
  23988. * Rebuilds the char code to glyph ID map by trying to replace the char codes
  23989. * with their unicode value. It also moves char codes that are in known
  23990. * problematic locations.
  23991. * @return {Object} Two properties:
  23992. * 'toFontChar' - maps original char codes(the value that will be read
  23993. * from commands such as show text) to the char codes that will be used in the
  23994. * font that we build
  23995. * 'charCodeToGlyphId' - maps the new font char codes to glyph ids
  23996. */
  23997. function adjustMapping(charCodeToGlyphId, properties) {
  23998. var toUnicode = properties.toUnicode;
  23999. var isSymbolic = !!(properties.flags & FontFlags.Symbolic);
  24000. var isIdentityUnicode = properties.isIdentityUnicode;
  24001. var newMap = Object.create(null);
  24002. var toFontChar = [];
  24003. var usedFontCharCodes = [];
  24004. var nextAvailableFontCharCode = PRIVATE_USE_OFFSET_START;
  24005. for (var originalCharCode in charCodeToGlyphId) {
  24006. originalCharCode |= 0;
  24007. var glyphId = charCodeToGlyphId[originalCharCode];
  24008. var fontCharCode = originalCharCode;
  24009. // First try to map the value to a unicode position if a non identity map
  24010. // was created.
  24011. if (!isIdentityUnicode && originalCharCode in toUnicode) {
  24012. var unicode = toUnicode[fontCharCode];
  24013. // TODO: Try to map ligatures to the correct spot.
  24014. if (unicode.length === 1) {
  24015. fontCharCode = unicode.charCodeAt(0);
  24016. }
  24017. }
  24018. // Try to move control characters, special characters and already mapped
  24019. // characters to the private use area since they will not be drawn by
  24020. // canvas if left in their current position. Also, move characters if the
  24021. // font was symbolic and there is only an identity unicode map since the
  24022. // characters probably aren't in the correct position (fixes an issue
  24023. // with firefox and thuluthfont).
  24024. if ((fontCharCode in usedFontCharCodes ||
  24025. fontCharCode <= 0x1f || // Control chars
  24026. fontCharCode === 0x7F || // Control char
  24027. fontCharCode === 0xAD || // Soft hyphen
  24028. (fontCharCode >= 0x80 && fontCharCode <= 0x9F) || // Control chars
  24029. // Prevent drawing characters in the specials unicode block.
  24030. (fontCharCode >= 0xFFF0 && fontCharCode <= 0xFFFF) ||
  24031. (isSymbolic && isIdentityUnicode)) &&
  24032. nextAvailableFontCharCode <= PRIVATE_USE_OFFSET_END) { // Room left.
  24033. // Loop to try and find a free spot in the private use area.
  24034. do {
  24035. fontCharCode = nextAvailableFontCharCode++;
  24036. if (SKIP_PRIVATE_USE_RANGE_F000_TO_F01F && fontCharCode === 0xF000) {
  24037. fontCharCode = 0xF020;
  24038. nextAvailableFontCharCode = fontCharCode + 1;
  24039. }
  24040. } while (fontCharCode in usedFontCharCodes &&
  24041. nextAvailableFontCharCode <= PRIVATE_USE_OFFSET_END);
  24042. }
  24043. newMap[fontCharCode] = glyphId;
  24044. toFontChar[originalCharCode] = fontCharCode;
  24045. usedFontCharCodes[fontCharCode] = true;
  24046. }
  24047. return {
  24048. toFontChar: toFontChar,
  24049. charCodeToGlyphId: newMap,
  24050. nextAvailableFontCharCode: nextAvailableFontCharCode
  24051. };
  24052. }
  24053. function getRanges(glyphs) {
  24054. // Array.sort() sorts by characters, not numerically, so convert to an
  24055. // array of characters.
  24056. var codes = [];
  24057. for (var charCode in glyphs) {
  24058. codes.push({ fontCharCode: charCode | 0, glyphId: glyphs[charCode] });
  24059. }
  24060. codes.sort(function fontGetRangesSort(a, b) {
  24061. return a.fontCharCode - b.fontCharCode;
  24062. });
  24063. // Split the sorted codes into ranges.
  24064. var ranges = [];
  24065. var length = codes.length;
  24066. for (var n = 0; n < length; ) {
  24067. var start = codes[n].fontCharCode;
  24068. var codeIndices = [codes[n].glyphId];
  24069. ++n;
  24070. var end = start;
  24071. while (n < length && end + 1 == codes[n].fontCharCode) {
  24072. codeIndices.push(codes[n].glyphId);
  24073. ++end;
  24074. ++n;
  24075. if (end === 0xFFFF) {
  24076. break;
  24077. }
  24078. }
  24079. ranges.push([start, end, codeIndices]);
  24080. }
  24081. return ranges;
  24082. }
  24083. function createCmapTable(glyphs) {
  24084. var ranges = getRanges(glyphs);
  24085. var numTables = ranges[ranges.length - 1][1] > 0xFFFF ? 2 : 1;
  24086. var cmap = '\x00\x00' + // version
  24087. string16(numTables) + // numTables
  24088. '\x00\x03' + // platformID
  24089. '\x00\x01' + // encodingID
  24090. string32(4 + numTables * 8); // start of the table record
  24091. var i, ii, j, jj;
  24092. for (i = ranges.length - 1; i >= 0; --i) {
  24093. if (ranges[i][0] <= 0xFFFF) { break; }
  24094. }
  24095. var bmpLength = i + 1;
  24096. if (ranges[i][0] < 0xFFFF && ranges[i][1] === 0xFFFF) {
  24097. ranges[i][1] = 0xFFFE;
  24098. }
  24099. var trailingRangesCount = ranges[i][1] < 0xFFFF ? 1 : 0;
  24100. var segCount = bmpLength + trailingRangesCount;
  24101. var segCount2 = segCount * 2;
  24102. var searchRange = getMaxPower2(segCount) * 2;
  24103. var searchEntry = Math.log(segCount) / Math.log(2);
  24104. var rangeShift = 2 * segCount - searchRange;
  24105. // Fill up the 4 parallel arrays describing the segments.
  24106. var startCount = '';
  24107. var endCount = '';
  24108. var idDeltas = '';
  24109. var idRangeOffsets = '';
  24110. var glyphsIds = '';
  24111. var bias = 0;
  24112. var range, start, end, codes;
  24113. for (i = 0, ii = bmpLength; i < ii; i++) {
  24114. range = ranges[i];
  24115. start = range[0];
  24116. end = range[1];
  24117. startCount += string16(start);
  24118. endCount += string16(end);
  24119. codes = range[2];
  24120. var contiguous = true;
  24121. for (j = 1, jj = codes.length; j < jj; ++j) {
  24122. if (codes[j] !== codes[j - 1] + 1) {
  24123. contiguous = false;
  24124. break;
  24125. }
  24126. }
  24127. if (!contiguous) {
  24128. var offset = (segCount - i) * 2 + bias * 2;
  24129. bias += (end - start + 1);
  24130. idDeltas += string16(0);
  24131. idRangeOffsets += string16(offset);
  24132. for (j = 0, jj = codes.length; j < jj; ++j) {
  24133. glyphsIds += string16(codes[j]);
  24134. }
  24135. } else {
  24136. var startCode = codes[0];
  24137. idDeltas += string16((startCode - start) & 0xFFFF);
  24138. idRangeOffsets += string16(0);
  24139. }
  24140. }
  24141. if (trailingRangesCount > 0) {
  24142. endCount += '\xFF\xFF';
  24143. startCount += '\xFF\xFF';
  24144. idDeltas += '\x00\x01';
  24145. idRangeOffsets += '\x00\x00';
  24146. }
  24147. var format314 = '\x00\x00' + // language
  24148. string16(segCount2) +
  24149. string16(searchRange) +
  24150. string16(searchEntry) +
  24151. string16(rangeShift) +
  24152. endCount + '\x00\x00' + startCount +
  24153. idDeltas + idRangeOffsets + glyphsIds;
  24154. var format31012 = '';
  24155. var header31012 = '';
  24156. if (numTables > 1) {
  24157. cmap += '\x00\x03' + // platformID
  24158. '\x00\x0A' + // encodingID
  24159. string32(4 + numTables * 8 +
  24160. 4 + format314.length); // start of the table record
  24161. format31012 = '';
  24162. for (i = 0, ii = ranges.length; i < ii; i++) {
  24163. range = ranges[i];
  24164. start = range[0];
  24165. codes = range[2];
  24166. var code = codes[0];
  24167. for (j = 1, jj = codes.length; j < jj; ++j) {
  24168. if (codes[j] !== codes[j - 1] + 1) {
  24169. end = range[0] + j - 1;
  24170. format31012 += string32(start) + // startCharCode
  24171. string32(end) + // endCharCode
  24172. string32(code); // startGlyphID
  24173. start = end + 1;
  24174. code = codes[j];
  24175. }
  24176. }
  24177. format31012 += string32(start) + // startCharCode
  24178. string32(range[1]) + // endCharCode
  24179. string32(code); // startGlyphID
  24180. }
  24181. header31012 = '\x00\x0C' + // format
  24182. '\x00\x00' + // reserved
  24183. string32(format31012.length + 16) + // length
  24184. '\x00\x00\x00\x00' + // language
  24185. string32(format31012.length / 12); // nGroups
  24186. }
  24187. return stringToArray(cmap +
  24188. '\x00\x04' + // format
  24189. string16(format314.length + 4) + // length
  24190. format314 + header31012 + format31012);
  24191. }
  24192. function validateOS2Table(os2) {
  24193. var stream = new Stream(os2.data);
  24194. var version = stream.getUint16();
  24195. // TODO verify all OS/2 tables fields, but currently we validate only those
  24196. // that give us issues
  24197. stream.getBytes(60); // skipping type, misc sizes, panose, unicode ranges
  24198. var selection = stream.getUint16();
  24199. if (version < 4 && (selection & 0x0300)) {
  24200. return false;
  24201. }
  24202. var firstChar = stream.getUint16();
  24203. var lastChar = stream.getUint16();
  24204. if (firstChar > lastChar) {
  24205. return false;
  24206. }
  24207. stream.getBytes(6); // skipping sTypoAscender/Descender/LineGap
  24208. var usWinAscent = stream.getUint16();
  24209. if (usWinAscent === 0) { // makes font unreadable by windows
  24210. return false;
  24211. }
  24212. // OS/2 appears to be valid, resetting some fields
  24213. os2.data[8] = os2.data[9] = 0; // IE rejects fonts if fsType != 0
  24214. return true;
  24215. }
  24216. function createOS2Table(properties, charstrings, override) {
  24217. override = override || {
  24218. unitsPerEm: 0,
  24219. yMax: 0,
  24220. yMin: 0,
  24221. ascent: 0,
  24222. descent: 0
  24223. };
  24224. var ulUnicodeRange1 = 0;
  24225. var ulUnicodeRange2 = 0;
  24226. var ulUnicodeRange3 = 0;
  24227. var ulUnicodeRange4 = 0;
  24228. var firstCharIndex = null;
  24229. var lastCharIndex = 0;
  24230. if (charstrings) {
  24231. for (var code in charstrings) {
  24232. code |= 0;
  24233. if (firstCharIndex > code || !firstCharIndex) {
  24234. firstCharIndex = code;
  24235. }
  24236. if (lastCharIndex < code) {
  24237. lastCharIndex = code;
  24238. }
  24239. var position = getUnicodeRangeFor(code);
  24240. if (position < 32) {
  24241. ulUnicodeRange1 |= 1 << position;
  24242. } else if (position < 64) {
  24243. ulUnicodeRange2 |= 1 << position - 32;
  24244. } else if (position < 96) {
  24245. ulUnicodeRange3 |= 1 << position - 64;
  24246. } else if (position < 123) {
  24247. ulUnicodeRange4 |= 1 << position - 96;
  24248. } else {
  24249. error('Unicode ranges Bits > 123 are reserved for internal usage');
  24250. }
  24251. }
  24252. } else {
  24253. // TODO
  24254. firstCharIndex = 0;
  24255. lastCharIndex = 255;
  24256. }
  24257. var bbox = properties.bbox || [0, 0, 0, 0];
  24258. var unitsPerEm = (override.unitsPerEm ||
  24259. 1 / (properties.fontMatrix || FONT_IDENTITY_MATRIX)[0]);
  24260. // if the font units differ to the PDF glyph space units
  24261. // then scale up the values
  24262. var scale = (properties.ascentScaled ? 1.0 :
  24263. unitsPerEm / PDF_GLYPH_SPACE_UNITS);
  24264. var typoAscent = (override.ascent ||
  24265. Math.round(scale * (properties.ascent || bbox[3])));
  24266. var typoDescent = (override.descent ||
  24267. Math.round(scale * (properties.descent || bbox[1])));
  24268. if (typoDescent > 0 && properties.descent > 0 && bbox[1] < 0) {
  24269. typoDescent = -typoDescent; // fixing incorrect descent
  24270. }
  24271. var winAscent = override.yMax || typoAscent;
  24272. var winDescent = -override.yMin || -typoDescent;
  24273. return '\x00\x03' + // version
  24274. '\x02\x24' + // xAvgCharWidth
  24275. '\x01\xF4' + // usWeightClass
  24276. '\x00\x05' + // usWidthClass
  24277. '\x00\x00' + // fstype (0 to let the font loads via font-face on IE)
  24278. '\x02\x8A' + // ySubscriptXSize
  24279. '\x02\xBB' + // ySubscriptYSize
  24280. '\x00\x00' + // ySubscriptXOffset
  24281. '\x00\x8C' + // ySubscriptYOffset
  24282. '\x02\x8A' + // ySuperScriptXSize
  24283. '\x02\xBB' + // ySuperScriptYSize
  24284. '\x00\x00' + // ySuperScriptXOffset
  24285. '\x01\xDF' + // ySuperScriptYOffset
  24286. '\x00\x31' + // yStrikeOutSize
  24287. '\x01\x02' + // yStrikeOutPosition
  24288. '\x00\x00' + // sFamilyClass
  24289. '\x00\x00\x06' +
  24290. String.fromCharCode(properties.fixedPitch ? 0x09 : 0x00) +
  24291. '\x00\x00\x00\x00\x00\x00' + // Panose
  24292. string32(ulUnicodeRange1) + // ulUnicodeRange1 (Bits 0-31)
  24293. string32(ulUnicodeRange2) + // ulUnicodeRange2 (Bits 32-63)
  24294. string32(ulUnicodeRange3) + // ulUnicodeRange3 (Bits 64-95)
  24295. string32(ulUnicodeRange4) + // ulUnicodeRange4 (Bits 96-127)
  24296. '\x2A\x32\x31\x2A' + // achVendID
  24297. string16(properties.italicAngle ? 1 : 0) + // fsSelection
  24298. string16(firstCharIndex ||
  24299. properties.firstChar) + // usFirstCharIndex
  24300. string16(lastCharIndex || properties.lastChar) + // usLastCharIndex
  24301. string16(typoAscent) + // sTypoAscender
  24302. string16(typoDescent) + // sTypoDescender
  24303. '\x00\x64' + // sTypoLineGap (7%-10% of the unitsPerEM value)
  24304. string16(winAscent) + // usWinAscent
  24305. string16(winDescent) + // usWinDescent
  24306. '\x00\x00\x00\x00' + // ulCodePageRange1 (Bits 0-31)
  24307. '\x00\x00\x00\x00' + // ulCodePageRange2 (Bits 32-63)
  24308. string16(properties.xHeight) + // sxHeight
  24309. string16(properties.capHeight) + // sCapHeight
  24310. string16(0) + // usDefaultChar
  24311. string16(firstCharIndex || properties.firstChar) + // usBreakChar
  24312. '\x00\x03'; // usMaxContext
  24313. }
  24314. function createPostTable(properties) {
  24315. var angle = Math.floor(properties.italicAngle * (Math.pow(2, 16)));
  24316. return ('\x00\x03\x00\x00' + // Version number
  24317. string32(angle) + // italicAngle
  24318. '\x00\x00' + // underlinePosition
  24319. '\x00\x00' + // underlineThickness
  24320. string32(properties.fixedPitch) + // isFixedPitch
  24321. '\x00\x00\x00\x00' + // minMemType42
  24322. '\x00\x00\x00\x00' + // maxMemType42
  24323. '\x00\x00\x00\x00' + // minMemType1
  24324. '\x00\x00\x00\x00'); // maxMemType1
  24325. }
  24326. function createNameTable(name, proto) {
  24327. if (!proto) {
  24328. proto = [[], []]; // no strings and unicode strings
  24329. }
  24330. var strings = [
  24331. proto[0][0] || 'Original licence', // 0.Copyright
  24332. proto[0][1] || name, // 1.Font family
  24333. proto[0][2] || 'Unknown', // 2.Font subfamily (font weight)
  24334. proto[0][3] || 'uniqueID', // 3.Unique ID
  24335. proto[0][4] || name, // 4.Full font name
  24336. proto[0][5] || 'Version 0.11', // 5.Version
  24337. proto[0][6] || '', // 6.Postscript name
  24338. proto[0][7] || 'Unknown', // 7.Trademark
  24339. proto[0][8] || 'Unknown', // 8.Manufacturer
  24340. proto[0][9] || 'Unknown' // 9.Designer
  24341. ];
  24342. // Mac want 1-byte per character strings while Windows want
  24343. // 2-bytes per character, so duplicate the names table
  24344. var stringsUnicode = [];
  24345. var i, ii, j, jj, str;
  24346. for (i = 0, ii = strings.length; i < ii; i++) {
  24347. str = proto[1][i] || strings[i];
  24348. var strBufUnicode = [];
  24349. for (j = 0, jj = str.length; j < jj; j++) {
  24350. strBufUnicode.push(string16(str.charCodeAt(j)));
  24351. }
  24352. stringsUnicode.push(strBufUnicode.join(''));
  24353. }
  24354. var names = [strings, stringsUnicode];
  24355. var platforms = ['\x00\x01', '\x00\x03'];
  24356. var encodings = ['\x00\x00', '\x00\x01'];
  24357. var languages = ['\x00\x00', '\x04\x09'];
  24358. var namesRecordCount = strings.length * platforms.length;
  24359. var nameTable =
  24360. '\x00\x00' + // format
  24361. string16(namesRecordCount) + // Number of names Record
  24362. string16(namesRecordCount * 12 + 6); // Storage
  24363. // Build the name records field
  24364. var strOffset = 0;
  24365. for (i = 0, ii = platforms.length; i < ii; i++) {
  24366. var strs = names[i];
  24367. for (j = 0, jj = strs.length; j < jj; j++) {
  24368. str = strs[j];
  24369. var nameRecord =
  24370. platforms[i] + // platform ID
  24371. encodings[i] + // encoding ID
  24372. languages[i] + // language ID
  24373. string16(j) + // name ID
  24374. string16(str.length) +
  24375. string16(strOffset);
  24376. nameTable += nameRecord;
  24377. strOffset += str.length;
  24378. }
  24379. }
  24380. nameTable += strings.join('') + stringsUnicode.join('');
  24381. return nameTable;
  24382. }
  24383. Font.prototype = {
  24384. name: null,
  24385. font: null,
  24386. mimetype: null,
  24387. encoding: null,
  24388. get renderer() {
  24389. var renderer = FontRendererFactory.create(this);
  24390. return shadow(this, 'renderer', renderer);
  24391. },
  24392. exportData: function Font_exportData() {
  24393. var data = {};
  24394. for (var i in this) {
  24395. if (this.hasOwnProperty(i)) {
  24396. data[i] = this[i];
  24397. }
  24398. }
  24399. return data;
  24400. },
  24401. checkAndRepair: function Font_checkAndRepair(name, font, properties) {
  24402. function readTableEntry(file) {
  24403. var tag = bytesToString(file.getBytes(4));
  24404. var checksum = file.getInt32();
  24405. var offset = file.getInt32() >>> 0;
  24406. var length = file.getInt32() >>> 0;
  24407. // Read the table associated data
  24408. var previousPosition = file.pos;
  24409. file.pos = file.start ? file.start : 0;
  24410. file.skip(offset);
  24411. var data = file.getBytes(length);
  24412. file.pos = previousPosition;
  24413. if (tag == 'head') {
  24414. // clearing checksum adjustment
  24415. data[8] = data[9] = data[10] = data[11] = 0;
  24416. data[17] |= 0x20; //Set font optimized for cleartype flag
  24417. }
  24418. return {
  24419. tag: tag,
  24420. checksum: checksum,
  24421. length: length,
  24422. offset: offset,
  24423. data: data
  24424. };
  24425. }
  24426. function readOpenTypeHeader(ttf) {
  24427. return {
  24428. version: bytesToString(ttf.getBytes(4)),
  24429. numTables: ttf.getUint16(),
  24430. searchRange: ttf.getUint16(),
  24431. entrySelector: ttf.getUint16(),
  24432. rangeShift: ttf.getUint16()
  24433. };
  24434. }
  24435. /**
  24436. * Read the appropriate subtable from the cmap according to 9.6.6.4 from
  24437. * PDF spec
  24438. */
  24439. function readCmapTable(cmap, font, isSymbolicFont) {
  24440. var segment;
  24441. var start = (font.start ? font.start : 0) + cmap.offset;
  24442. font.pos = start;
  24443. var version = font.getUint16();
  24444. var numTables = font.getUint16();
  24445. var potentialTable;
  24446. var canBreak = false;
  24447. // There's an order of preference in terms of which cmap subtable to
  24448. // use:
  24449. // - non-symbolic fonts the preference is a 3,1 table then a 1,0 table
  24450. // - symbolic fonts the preference is a 3,0 table then a 1,0 table
  24451. // The following takes advantage of the fact that the tables are sorted
  24452. // to work.
  24453. for (var i = 0; i < numTables; i++) {
  24454. var platformId = font.getUint16();
  24455. var encodingId = font.getUint16();
  24456. var offset = font.getInt32() >>> 0;
  24457. var useTable = false;
  24458. if (platformId == 1 && encodingId === 0) {
  24459. useTable = true;
  24460. // Continue the loop since there still may be a higher priority
  24461. // table.
  24462. } else if (!isSymbolicFont && platformId === 3 && encodingId === 1) {
  24463. useTable = true;
  24464. canBreak = true;
  24465. } else if (isSymbolicFont && platformId === 3 && encodingId === 0) {
  24466. useTable = true;
  24467. canBreak = true;
  24468. }
  24469. if (useTable) {
  24470. potentialTable = {
  24471. platformId: platformId,
  24472. encodingId: encodingId,
  24473. offset: offset
  24474. };
  24475. }
  24476. if (canBreak) {
  24477. break;
  24478. }
  24479. }
  24480. if (!potentialTable) {
  24481. warn('Could not find a preferred cmap table.');
  24482. return [];
  24483. }
  24484. font.pos = start + potentialTable.offset;
  24485. var format = font.getUint16();
  24486. var length = font.getUint16();
  24487. var language = font.getUint16();
  24488. var hasShortCmap = false;
  24489. var mappings = [];
  24490. var j, glyphId;
  24491. // TODO(mack): refactor this cmap subtable reading logic out
  24492. if (format === 0) {
  24493. for (j = 0; j < 256; j++) {
  24494. var index = font.getByte();
  24495. if (!index) {
  24496. continue;
  24497. }
  24498. mappings.push({
  24499. charCode: j,
  24500. glyphId: index
  24501. });
  24502. }
  24503. hasShortCmap = true;
  24504. } else if (format === 4) {
  24505. // re-creating the table in format 4 since the encoding
  24506. // might be changed
  24507. var segCount = (font.getUint16() >> 1);
  24508. font.getBytes(6); // skipping range fields
  24509. var segIndex, segments = [];
  24510. for (segIndex = 0; segIndex < segCount; segIndex++) {
  24511. segments.push({ end: font.getUint16() });
  24512. }
  24513. font.getUint16();
  24514. for (segIndex = 0; segIndex < segCount; segIndex++) {
  24515. segments[segIndex].start = font.getUint16();
  24516. }
  24517. for (segIndex = 0; segIndex < segCount; segIndex++) {
  24518. segments[segIndex].delta = font.getUint16();
  24519. }
  24520. var offsetsCount = 0;
  24521. for (segIndex = 0; segIndex < segCount; segIndex++) {
  24522. segment = segments[segIndex];
  24523. var rangeOffset = font.getUint16();
  24524. if (!rangeOffset) {
  24525. segment.offsetIndex = -1;
  24526. continue;
  24527. }
  24528. var offsetIndex = (rangeOffset >> 1) - (segCount - segIndex);
  24529. segment.offsetIndex = offsetIndex;
  24530. offsetsCount = Math.max(offsetsCount, offsetIndex +
  24531. segment.end - segment.start + 1);
  24532. }
  24533. var offsets = [];
  24534. for (j = 0; j < offsetsCount; j++) {
  24535. offsets.push(font.getUint16());
  24536. }
  24537. for (segIndex = 0; segIndex < segCount; segIndex++) {
  24538. segment = segments[segIndex];
  24539. start = segment.start;
  24540. var end = segment.end;
  24541. var delta = segment.delta;
  24542. offsetIndex = segment.offsetIndex;
  24543. for (j = start; j <= end; j++) {
  24544. if (j == 0xFFFF) {
  24545. continue;
  24546. }
  24547. glyphId = (offsetIndex < 0 ?
  24548. j : offsets[offsetIndex + j - start]);
  24549. glyphId = (glyphId + delta) & 0xFFFF;
  24550. if (glyphId === 0) {
  24551. continue;
  24552. }
  24553. mappings.push({
  24554. charCode: j,
  24555. glyphId: glyphId
  24556. });
  24557. }
  24558. }
  24559. } else if (format == 6) {
  24560. // Format 6 is a 2-bytes dense mapping, which means the font data
  24561. // lives glue together even if they are pretty far in the unicode
  24562. // table. (This looks weird, so I can have missed something), this
  24563. // works on Linux but seems to fails on Mac so let's rewrite the
  24564. // cmap table to a 3-1-4 style
  24565. var firstCode = font.getUint16();
  24566. var entryCount = font.getUint16();
  24567. for (j = 0; j < entryCount; j++) {
  24568. glyphId = font.getUint16();
  24569. var charCode = firstCode + j;
  24570. mappings.push({
  24571. charCode: charCode,
  24572. glyphId: glyphId
  24573. });
  24574. }
  24575. } else {
  24576. error('cmap table has unsupported format: ' + format);
  24577. }
  24578. // removing duplicate entries
  24579. mappings.sort(function (a, b) {
  24580. return a.charCode - b.charCode;
  24581. });
  24582. for (i = 1; i < mappings.length; i++) {
  24583. if (mappings[i - 1].charCode === mappings[i].charCode) {
  24584. mappings.splice(i, 1);
  24585. i--;
  24586. }
  24587. }
  24588. return {
  24589. platformId: potentialTable.platformId,
  24590. encodingId: potentialTable.encodingId,
  24591. mappings: mappings,
  24592. hasShortCmap: hasShortCmap
  24593. };
  24594. }
  24595. function sanitizeMetrics(font, header, metrics, numGlyphs) {
  24596. if (!header) {
  24597. if (metrics) {
  24598. metrics.data = null;
  24599. }
  24600. return;
  24601. }
  24602. font.pos = (font.start ? font.start : 0) + header.offset;
  24603. font.pos += header.length - 2;
  24604. var numOfMetrics = font.getUint16();
  24605. if (numOfMetrics > numGlyphs) {
  24606. info('The numOfMetrics (' + numOfMetrics + ') should not be ' +
  24607. 'greater than the numGlyphs (' + numGlyphs + ')');
  24608. // Reduce numOfMetrics if it is greater than numGlyphs
  24609. numOfMetrics = numGlyphs;
  24610. header.data[34] = (numOfMetrics & 0xff00) >> 8;
  24611. header.data[35] = numOfMetrics & 0x00ff;
  24612. }
  24613. var numOfSidebearings = numGlyphs - numOfMetrics;
  24614. var numMissing = numOfSidebearings -
  24615. ((metrics.length - numOfMetrics * 4) >> 1);
  24616. var i, ii;
  24617. if (numMissing > 0) {
  24618. font.pos = (font.start ? font.start : 0) + metrics.offset;
  24619. var entries = '';
  24620. for (i = 0, ii = metrics.length; i < ii; i++) {
  24621. entries += String.fromCharCode(font.getByte());
  24622. }
  24623. for (i = 0; i < numMissing; i++) {
  24624. entries += '\x00\x00';
  24625. }
  24626. metrics.data = stringToArray(entries);
  24627. }
  24628. }
  24629. function sanitizeGlyph(source, sourceStart, sourceEnd, dest, destStart,
  24630. hintsValid) {
  24631. if (sourceEnd - sourceStart <= 12) {
  24632. // glyph with data less than 12 is invalid one
  24633. return 0;
  24634. }
  24635. var glyf = source.subarray(sourceStart, sourceEnd);
  24636. var contoursCount = (glyf[0] << 8) | glyf[1];
  24637. if (contoursCount & 0x8000) {
  24638. // complex glyph, writing as is
  24639. dest.set(glyf, destStart);
  24640. return glyf.length;
  24641. }
  24642. var i, j = 10, flagsCount = 0;
  24643. for (i = 0; i < contoursCount; i++) {
  24644. var endPoint = (glyf[j] << 8) | glyf[j + 1];
  24645. flagsCount = endPoint + 1;
  24646. j += 2;
  24647. }
  24648. // skipping instructions
  24649. var instructionsStart = j;
  24650. var instructionsLength = (glyf[j] << 8) | glyf[j + 1];
  24651. j += 2 + instructionsLength;
  24652. var instructionsEnd = j;
  24653. // validating flags
  24654. var coordinatesLength = 0;
  24655. for (i = 0; i < flagsCount; i++) {
  24656. var flag = glyf[j++];
  24657. if (flag & 0xC0) {
  24658. // reserved flags must be zero, cleaning up
  24659. glyf[j - 1] = flag & 0x3F;
  24660. }
  24661. var xyLength = ((flag & 2) ? 1 : (flag & 16) ? 0 : 2) +
  24662. ((flag & 4) ? 1 : (flag & 32) ? 0 : 2);
  24663. coordinatesLength += xyLength;
  24664. if (flag & 8) {
  24665. var repeat = glyf[j++];
  24666. i += repeat;
  24667. coordinatesLength += repeat * xyLength;
  24668. }
  24669. }
  24670. // glyph without coordinates will be rejected
  24671. if (coordinatesLength === 0) {
  24672. return 0;
  24673. }
  24674. var glyphDataLength = j + coordinatesLength;
  24675. if (glyphDataLength > glyf.length) {
  24676. // not enough data for coordinates
  24677. return 0;
  24678. }
  24679. if (!hintsValid && instructionsLength > 0) {
  24680. dest.set(glyf.subarray(0, instructionsStart), destStart);
  24681. dest.set([0, 0], destStart + instructionsStart);
  24682. dest.set(glyf.subarray(instructionsEnd, glyphDataLength),
  24683. destStart + instructionsStart + 2);
  24684. glyphDataLength -= instructionsLength;
  24685. if (glyf.length - glyphDataLength > 3) {
  24686. glyphDataLength = (glyphDataLength + 3) & ~3;
  24687. }
  24688. return glyphDataLength;
  24689. }
  24690. if (glyf.length - glyphDataLength > 3) {
  24691. // truncating and aligning to 4 bytes the long glyph data
  24692. glyphDataLength = (glyphDataLength + 3) & ~3;
  24693. dest.set(glyf.subarray(0, glyphDataLength), destStart);
  24694. return glyphDataLength;
  24695. }
  24696. // glyph data is fine
  24697. dest.set(glyf, destStart);
  24698. return glyf.length;
  24699. }
  24700. function sanitizeHead(head, numGlyphs, locaLength) {
  24701. var data = head.data;
  24702. // Validate version:
  24703. // Should always be 0x00010000
  24704. var version = int32(data[0], data[1], data[2], data[3]);
  24705. if (version >> 16 !== 1) {
  24706. info('Attempting to fix invalid version in head table: ' + version);
  24707. data[0] = 0;
  24708. data[1] = 1;
  24709. data[2] = 0;
  24710. data[3] = 0;
  24711. }
  24712. var indexToLocFormat = int16(data[50], data[51]);
  24713. if (indexToLocFormat < 0 || indexToLocFormat > 1) {
  24714. info('Attempting to fix invalid indexToLocFormat in head table: ' +
  24715. indexToLocFormat);
  24716. // The value of indexToLocFormat should be 0 if the loca table
  24717. // consists of short offsets, and should be 1 if the loca table
  24718. // consists of long offsets.
  24719. //
  24720. // The number of entries in the loca table should be numGlyphs + 1.
  24721. //
  24722. // Using this information, we can work backwards to deduce if the
  24723. // size of each offset in the loca table, and thus figure out the
  24724. // appropriate value for indexToLocFormat.
  24725. var numGlyphsPlusOne = numGlyphs + 1;
  24726. if (locaLength === numGlyphsPlusOne << 1) {
  24727. // 0x0000 indicates the loca table consists of short offsets
  24728. data[50] = 0;
  24729. data[51] = 0;
  24730. } else if (locaLength === numGlyphsPlusOne << 2) {
  24731. // 0x0001 indicates the loca table consists of long offsets
  24732. data[50] = 0;
  24733. data[51] = 1;
  24734. } else {
  24735. warn('Could not fix indexToLocFormat: ' + indexToLocFormat);
  24736. }
  24737. }
  24738. }
  24739. function sanitizeGlyphLocations(loca, glyf, numGlyphs,
  24740. isGlyphLocationsLong, hintsValid,
  24741. dupFirstEntry) {
  24742. var itemSize, itemDecode, itemEncode;
  24743. if (isGlyphLocationsLong) {
  24744. itemSize = 4;
  24745. itemDecode = function fontItemDecodeLong(data, offset) {
  24746. return (data[offset] << 24) | (data[offset + 1] << 16) |
  24747. (data[offset + 2] << 8) | data[offset + 3];
  24748. };
  24749. itemEncode = function fontItemEncodeLong(data, offset, value) {
  24750. data[offset] = (value >>> 24) & 0xFF;
  24751. data[offset + 1] = (value >> 16) & 0xFF;
  24752. data[offset + 2] = (value >> 8) & 0xFF;
  24753. data[offset + 3] = value & 0xFF;
  24754. };
  24755. } else {
  24756. itemSize = 2;
  24757. itemDecode = function fontItemDecode(data, offset) {
  24758. return (data[offset] << 9) | (data[offset + 1] << 1);
  24759. };
  24760. itemEncode = function fontItemEncode(data, offset, value) {
  24761. data[offset] = (value >> 9) & 0xFF;
  24762. data[offset + 1] = (value >> 1) & 0xFF;
  24763. };
  24764. }
  24765. var locaData = loca.data;
  24766. var locaDataSize = itemSize * (1 + numGlyphs);
  24767. // is loca.data too short or long?
  24768. if (locaData.length !== locaDataSize) {
  24769. locaData = new Uint8Array(locaDataSize);
  24770. locaData.set(loca.data.subarray(0, locaDataSize));
  24771. loca.data = locaData;
  24772. }
  24773. // removing the invalid glyphs
  24774. var oldGlyfData = glyf.data;
  24775. var oldGlyfDataLength = oldGlyfData.length;
  24776. var newGlyfData = new Uint8Array(oldGlyfDataLength);
  24777. var startOffset = itemDecode(locaData, 0);
  24778. var writeOffset = 0;
  24779. itemEncode(locaData, 0, writeOffset);
  24780. var i, j;
  24781. for (i = 0, j = itemSize; i < numGlyphs; i++, j += itemSize) {
  24782. var endOffset = itemDecode(locaData, j);
  24783. if (endOffset > oldGlyfDataLength &&
  24784. ((oldGlyfDataLength + 3) & ~3) === endOffset) {
  24785. // Aspose breaks fonts by aligning the glyphs to the qword, but not
  24786. // the glyf table size, which makes last glyph out of range.
  24787. endOffset = oldGlyfDataLength;
  24788. }
  24789. if (endOffset > oldGlyfDataLength) {
  24790. // glyph end offset points outside glyf data, rejecting the glyph
  24791. itemEncode(locaData, j, writeOffset);
  24792. startOffset = endOffset;
  24793. continue;
  24794. }
  24795. var newLength = sanitizeGlyph(oldGlyfData, startOffset, endOffset,
  24796. newGlyfData, writeOffset, hintsValid);
  24797. writeOffset += newLength;
  24798. itemEncode(locaData, j, writeOffset);
  24799. startOffset = endOffset;
  24800. }
  24801. if (writeOffset === 0) {
  24802. // glyf table cannot be empty -- redoing the glyf and loca tables
  24803. // to have single glyph with one point
  24804. var simpleGlyph = new Uint8Array(
  24805. [0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 49, 0]);
  24806. for (i = 0, j = itemSize; i < numGlyphs; i++, j += itemSize) {
  24807. itemEncode(locaData, j, simpleGlyph.length);
  24808. }
  24809. glyf.data = simpleGlyph;
  24810. return;
  24811. }
  24812. if (dupFirstEntry) {
  24813. var firstEntryLength = itemDecode(locaData, itemSize);
  24814. if (newGlyfData.length > firstEntryLength + writeOffset) {
  24815. glyf.data = newGlyfData.subarray(0, firstEntryLength + writeOffset);
  24816. } else {
  24817. glyf.data = new Uint8Array(firstEntryLength + writeOffset);
  24818. glyf.data.set(newGlyfData.subarray(0, writeOffset));
  24819. }
  24820. glyf.data.set(newGlyfData.subarray(0, firstEntryLength), writeOffset);
  24821. itemEncode(loca.data, locaData.length - itemSize,
  24822. writeOffset + firstEntryLength);
  24823. } else {
  24824. glyf.data = newGlyfData.subarray(0, writeOffset);
  24825. }
  24826. }
  24827. function readPostScriptTable(post, properties, maxpNumGlyphs) {
  24828. var start = (font.start ? font.start : 0) + post.offset;
  24829. font.pos = start;
  24830. var length = post.length, end = start + length;
  24831. var version = font.getInt32();
  24832. // skip rest to the tables
  24833. font.getBytes(28);
  24834. var glyphNames;
  24835. var valid = true;
  24836. var i;
  24837. switch (version) {
  24838. case 0x00010000:
  24839. glyphNames = MacStandardGlyphOrdering;
  24840. break;
  24841. case 0x00020000:
  24842. var numGlyphs = font.getUint16();
  24843. if (numGlyphs != maxpNumGlyphs) {
  24844. valid = false;
  24845. break;
  24846. }
  24847. var glyphNameIndexes = [];
  24848. for (i = 0; i < numGlyphs; ++i) {
  24849. var index = font.getUint16();
  24850. if (index >= 32768) {
  24851. valid = false;
  24852. break;
  24853. }
  24854. glyphNameIndexes.push(index);
  24855. }
  24856. if (!valid) {
  24857. break;
  24858. }
  24859. var customNames = [];
  24860. while (font.pos < end) {
  24861. var stringLength = font.getByte();
  24862. var string = '';
  24863. for (i = 0; i < stringLength; ++i) {
  24864. string += String.fromCharCode(font.getByte());
  24865. }
  24866. customNames.push(string);
  24867. }
  24868. glyphNames = [];
  24869. for (i = 0; i < numGlyphs; ++i) {
  24870. var j = glyphNameIndexes[i];
  24871. if (j < 258) {
  24872. glyphNames.push(MacStandardGlyphOrdering[j]);
  24873. continue;
  24874. }
  24875. glyphNames.push(customNames[j - 258]);
  24876. }
  24877. break;
  24878. case 0x00030000:
  24879. break;
  24880. default:
  24881. warn('Unknown/unsupported post table version ' + version);
  24882. valid = false;
  24883. break;
  24884. }
  24885. properties.glyphNames = glyphNames;
  24886. return valid;
  24887. }
  24888. function readNameTable(nameTable) {
  24889. var start = (font.start ? font.start : 0) + nameTable.offset;
  24890. font.pos = start;
  24891. var names = [[], []];
  24892. var length = nameTable.length, end = start + length;
  24893. var format = font.getUint16();
  24894. var FORMAT_0_HEADER_LENGTH = 6;
  24895. if (format !== 0 || length < FORMAT_0_HEADER_LENGTH) {
  24896. // unsupported name table format or table "too" small
  24897. return names;
  24898. }
  24899. var numRecords = font.getUint16();
  24900. var stringsStart = font.getUint16();
  24901. var records = [];
  24902. var NAME_RECORD_LENGTH = 12;
  24903. var i, ii;
  24904. for (i = 0; i < numRecords &&
  24905. font.pos + NAME_RECORD_LENGTH <= end; i++) {
  24906. var r = {
  24907. platform: font.getUint16(),
  24908. encoding: font.getUint16(),
  24909. language: font.getUint16(),
  24910. name: font.getUint16(),
  24911. length: font.getUint16(),
  24912. offset: font.getUint16()
  24913. };
  24914. // using only Macintosh and Windows platform/encoding names
  24915. if ((r.platform == 1 && r.encoding === 0 && r.language === 0) ||
  24916. (r.platform == 3 && r.encoding == 1 && r.language == 0x409)) {
  24917. records.push(r);
  24918. }
  24919. }
  24920. for (i = 0, ii = records.length; i < ii; i++) {
  24921. var record = records[i];
  24922. var pos = start + stringsStart + record.offset;
  24923. if (pos + record.length > end) {
  24924. continue; // outside of name table, ignoring
  24925. }
  24926. font.pos = pos;
  24927. var nameIndex = record.name;
  24928. if (record.encoding) {
  24929. // unicode
  24930. var str = '';
  24931. for (var j = 0, jj = record.length; j < jj; j += 2) {
  24932. str += String.fromCharCode(font.getUint16());
  24933. }
  24934. names[1][nameIndex] = str;
  24935. } else {
  24936. names[0][nameIndex] = bytesToString(font.getBytes(record.length));
  24937. }
  24938. }
  24939. return names;
  24940. }
  24941. var TTOpsStackDeltas = [
  24942. 0, 0, 0, 0, 0, 0, 0, 0, -2, -2, -2, -2, 0, 0, -2, -5,
  24943. -1, -1, -1, -1, -1, -1, -1, -1, 0, 0, -1, 0, -1, -1, -1, -1,
  24944. 1, -1, -999, 0, 1, 0, -1, -2, 0, -1, -2, -1, -1, 0, -1, -1,
  24945. 0, 0, -999, -999, -1, -1, -1, -1, -2, -999, -2, -2, -999, 0, -2, -2,
  24946. 0, 0, -2, 0, -2, 0, 0, 0, -2, -1, -1, 1, 1, 0, 0, -1,
  24947. -1, -1, -1, -1, -1, -1, 0, 0, -1, 0, -1, -1, 0, -999, -1, -1,
  24948. -1, -1, -1, -1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
  24949. -2, -999, -999, -999, -999, -999, -1, -1, -2, -2, 0, 0, 0, 0, -1, -1,
  24950. -999, -2, -2, 0, 0, -1, -2, -2, 0, 0, 0, -1, -1, -1, -2];
  24951. // 0xC0-DF == -1 and 0xE0-FF == -2
  24952. function sanitizeTTProgram(table, ttContext) {
  24953. var data = table.data;
  24954. var i = 0, j, n, b, funcId, pc, lastEndf = 0, lastDeff = 0;
  24955. var stack = [];
  24956. var callstack = [];
  24957. var functionsCalled = [];
  24958. var tooComplexToFollowFunctions =
  24959. ttContext.tooComplexToFollowFunctions;
  24960. var inFDEF = false, ifLevel = 0, inELSE = 0;
  24961. for (var ii = data.length; i < ii;) {
  24962. var op = data[i++];
  24963. // The TrueType instruction set docs can be found at
  24964. // https://developer.apple.com/fonts/TTRefMan/RM05/Chap5.html
  24965. if (op === 0x40) { // NPUSHB - pushes n bytes
  24966. n = data[i++];
  24967. if (inFDEF || inELSE) {
  24968. i += n;
  24969. } else {
  24970. for (j = 0; j < n; j++) {
  24971. stack.push(data[i++]);
  24972. }
  24973. }
  24974. } else if (op === 0x41) { // NPUSHW - pushes n words
  24975. n = data[i++];
  24976. if (inFDEF || inELSE) {
  24977. i += n * 2;
  24978. } else {
  24979. for (j = 0; j < n; j++) {
  24980. b = data[i++];
  24981. stack.push((b << 8) | data[i++]);
  24982. }
  24983. }
  24984. } else if ((op & 0xF8) === 0xB0) { // PUSHB - pushes bytes
  24985. n = op - 0xB0 + 1;
  24986. if (inFDEF || inELSE) {
  24987. i += n;
  24988. } else {
  24989. for (j = 0; j < n; j++) {
  24990. stack.push(data[i++]);
  24991. }
  24992. }
  24993. } else if ((op & 0xF8) === 0xB8) { // PUSHW - pushes words
  24994. n = op - 0xB8 + 1;
  24995. if (inFDEF || inELSE) {
  24996. i += n * 2;
  24997. } else {
  24998. for (j = 0; j < n; j++) {
  24999. b = data[i++];
  25000. stack.push((b << 8) | data[i++]);
  25001. }
  25002. }
  25003. } else if (op === 0x2B && !tooComplexToFollowFunctions) { // CALL
  25004. if (!inFDEF && !inELSE) {
  25005. // collecting inforamtion about which functions are used
  25006. funcId = stack[stack.length - 1];
  25007. ttContext.functionsUsed[funcId] = true;
  25008. if (funcId in ttContext.functionsStackDeltas) {
  25009. stack.length += ttContext.functionsStackDeltas[funcId];
  25010. } else if (funcId in ttContext.functionsDefined &&
  25011. functionsCalled.indexOf(funcId) < 0) {
  25012. callstack.push({data: data, i: i, stackTop: stack.length - 1});
  25013. functionsCalled.push(funcId);
  25014. pc = ttContext.functionsDefined[funcId];
  25015. if (!pc) {
  25016. warn('TT: CALL non-existent function');
  25017. ttContext.hintsValid = false;
  25018. return;
  25019. }
  25020. data = pc.data;
  25021. i = pc.i;
  25022. }
  25023. }
  25024. } else if (op === 0x2C && !tooComplexToFollowFunctions) { // FDEF
  25025. if (inFDEF || inELSE) {
  25026. warn('TT: nested FDEFs not allowed');
  25027. tooComplexToFollowFunctions = true;
  25028. }
  25029. inFDEF = true;
  25030. // collecting inforamtion about which functions are defined
  25031. lastDeff = i;
  25032. funcId = stack.pop();
  25033. ttContext.functionsDefined[funcId] = {data: data, i: i};
  25034. } else if (op === 0x2D) { // ENDF - end of function
  25035. if (inFDEF) {
  25036. inFDEF = false;
  25037. lastEndf = i;
  25038. } else {
  25039. pc = callstack.pop();
  25040. if (!pc) {
  25041. warn('TT: ENDF bad stack');
  25042. ttContext.hintsValid = false;
  25043. return;
  25044. }
  25045. funcId = functionsCalled.pop();
  25046. data = pc.data;
  25047. i = pc.i;
  25048. ttContext.functionsStackDeltas[funcId] =
  25049. stack.length - pc.stackTop;
  25050. }
  25051. } else if (op === 0x89) { // IDEF - instruction definition
  25052. if (inFDEF || inELSE) {
  25053. warn('TT: nested IDEFs not allowed');
  25054. tooComplexToFollowFunctions = true;
  25055. }
  25056. inFDEF = true;
  25057. // recording it as a function to track ENDF
  25058. lastDeff = i;
  25059. } else if (op === 0x58) { // IF
  25060. ++ifLevel;
  25061. } else if (op === 0x1B) { // ELSE
  25062. inELSE = ifLevel;
  25063. } else if (op === 0x59) { // EIF
  25064. if (inELSE === ifLevel) {
  25065. inELSE = 0;
  25066. }
  25067. --ifLevel;
  25068. } else if (op === 0x1C) { // JMPR
  25069. if (!inFDEF && !inELSE) {
  25070. var offset = stack[stack.length - 1];
  25071. // only jumping forward to prevent infinite loop
  25072. if (offset > 0) {
  25073. i += offset - 1;
  25074. }
  25075. }
  25076. }
  25077. // Adjusting stack not extactly, but just enough to get function id
  25078. if (!inFDEF && !inELSE) {
  25079. var stackDelta = op <= 0x8E ? TTOpsStackDeltas[op] :
  25080. op >= 0xC0 && op <= 0xDF ? -1 : op >= 0xE0 ? -2 : 0;
  25081. if (op >= 0x71 && op <= 0x75) {
  25082. n = stack.pop();
  25083. if (n === n) {
  25084. stackDelta = -n * 2;
  25085. }
  25086. }
  25087. while (stackDelta < 0 && stack.length > 0) {
  25088. stack.pop();
  25089. stackDelta++;
  25090. }
  25091. while (stackDelta > 0) {
  25092. stack.push(NaN); // pushing any number into stack
  25093. stackDelta--;
  25094. }
  25095. }
  25096. }
  25097. ttContext.tooComplexToFollowFunctions = tooComplexToFollowFunctions;
  25098. var content = [data];
  25099. if (i > data.length) {
  25100. content.push(new Uint8Array(i - data.length));
  25101. }
  25102. if (lastDeff > lastEndf) {
  25103. warn('TT: complementing a missing function tail');
  25104. // new function definition started, but not finished
  25105. // complete function by [CLEAR, ENDF]
  25106. content.push(new Uint8Array([0x22, 0x2D]));
  25107. }
  25108. foldTTTable(table, content);
  25109. }
  25110. function checkInvalidFunctions(ttContext, maxFunctionDefs) {
  25111. if (ttContext.tooComplexToFollowFunctions) {
  25112. return;
  25113. }
  25114. if (ttContext.functionsDefined.length > maxFunctionDefs) {
  25115. warn('TT: more functions defined than expected');
  25116. ttContext.hintsValid = false;
  25117. return;
  25118. }
  25119. for (var j = 0, jj = ttContext.functionsUsed.length; j < jj; j++) {
  25120. if (j > maxFunctionDefs) {
  25121. warn('TT: invalid function id: ' + j);
  25122. ttContext.hintsValid = false;
  25123. return;
  25124. }
  25125. if (ttContext.functionsUsed[j] && !ttContext.functionsDefined[j]) {
  25126. warn('TT: undefined function: ' + j);
  25127. ttContext.hintsValid = false;
  25128. return;
  25129. }
  25130. }
  25131. }
  25132. function foldTTTable(table, content) {
  25133. if (content.length > 1) {
  25134. // concatenating the content items
  25135. var newLength = 0;
  25136. var j, jj;
  25137. for (j = 0, jj = content.length; j < jj; j++) {
  25138. newLength += content[j].length;
  25139. }
  25140. newLength = (newLength + 3) & ~3;
  25141. var result = new Uint8Array(newLength);
  25142. var pos = 0;
  25143. for (j = 0, jj = content.length; j < jj; j++) {
  25144. result.set(content[j], pos);
  25145. pos += content[j].length;
  25146. }
  25147. table.data = result;
  25148. table.length = newLength;
  25149. }
  25150. }
  25151. function sanitizeTTPrograms(fpgm, prep, cvt) {
  25152. var ttContext = {
  25153. functionsDefined: [],
  25154. functionsUsed: [],
  25155. functionsStackDeltas: [],
  25156. tooComplexToFollowFunctions: false,
  25157. hintsValid: true
  25158. };
  25159. if (fpgm) {
  25160. sanitizeTTProgram(fpgm, ttContext);
  25161. }
  25162. if (prep) {
  25163. sanitizeTTProgram(prep, ttContext);
  25164. }
  25165. if (fpgm) {
  25166. checkInvalidFunctions(ttContext, maxFunctionDefs);
  25167. }
  25168. if (cvt && (cvt.length & 1)) {
  25169. var cvtData = new Uint8Array(cvt.length + 1);
  25170. cvtData.set(cvt.data);
  25171. cvt.data = cvtData;
  25172. }
  25173. return ttContext.hintsValid;
  25174. }
  25175. // The following steps modify the original font data, making copy
  25176. font = new Stream(new Uint8Array(font.getBytes()));
  25177. var VALID_TABLES = ['OS/2', 'cmap', 'head', 'hhea', 'hmtx', 'maxp',
  25178. 'name', 'post', 'loca', 'glyf', 'fpgm', 'prep', 'cvt ', 'CFF '];
  25179. var header = readOpenTypeHeader(font);
  25180. var numTables = header.numTables;
  25181. var cff, cffFile;
  25182. var tables = { 'OS/2': null, cmap: null, head: null, hhea: null,
  25183. hmtx: null, maxp: null, name: null, post: null };
  25184. var table, tableData;
  25185. for (var i = 0; i < numTables; i++) {
  25186. table = readTableEntry(font);
  25187. if (VALID_TABLES.indexOf(table.tag) < 0) {
  25188. continue; // skipping table if it's not a required or optional table
  25189. }
  25190. if (table.length === 0) {
  25191. continue; // skipping empty tables
  25192. }
  25193. tables[table.tag] = table;
  25194. }
  25195. var isTrueType = !tables['CFF '];
  25196. if (!isTrueType) {
  25197. // OpenType font
  25198. if (!tables.head || !tables.hhea || !tables.maxp || !tables.post) {
  25199. // no major tables: throwing everything at CFFFont
  25200. cffFile = new Stream(tables['CFF '].data);
  25201. cff = new CFFFont(cffFile, properties);
  25202. return this.convert(name, cff, properties);
  25203. }
  25204. delete tables.glyf;
  25205. delete tables.loca;
  25206. delete tables.fpgm;
  25207. delete tables.prep;
  25208. delete tables['cvt '];
  25209. } else {
  25210. if (!tables.glyf || !tables.loca) {
  25211. error('Required "glyf" or "loca" tables are not found');
  25212. }
  25213. }
  25214. if (!tables.maxp) {
  25215. error('Required "maxp" table is not found');
  25216. }
  25217. font.pos = (font.start || 0) + tables.maxp.offset;
  25218. var version = font.getInt32();
  25219. var numGlyphs = font.getUint16();
  25220. var maxFunctionDefs = 0;
  25221. if (version >= 0x00010000 && tables.maxp.length >= 22) {
  25222. // maxZones can be invalid
  25223. font.pos += 8;
  25224. var maxZones = font.getUint16();
  25225. if (maxZones > 2) { // reset to 2 if font has invalid maxZones
  25226. tables.maxp.data[14] = 0;
  25227. tables.maxp.data[15] = 2;
  25228. }
  25229. font.pos += 4;
  25230. maxFunctionDefs = font.getUint16();
  25231. }
  25232. var dupFirstEntry = false;
  25233. if (properties.type == 'CIDFontType2' && properties.toUnicode &&
  25234. properties.toUnicode[0] > '\u0000') {
  25235. // oracle's defect (see 3427), duplicating first entry
  25236. dupFirstEntry = true;
  25237. numGlyphs++;
  25238. tables.maxp.data[4] = numGlyphs >> 8;
  25239. tables.maxp.data[5] = numGlyphs & 255;
  25240. }
  25241. var hintsValid = sanitizeTTPrograms(tables.fpgm, tables.prep,
  25242. tables['cvt '], maxFunctionDefs);
  25243. if (!hintsValid) {
  25244. delete tables.fpgm;
  25245. delete tables.prep;
  25246. delete tables['cvt '];
  25247. }
  25248. // Tables needs to be written by ascendant alphabetic order
  25249. var tablesNames = Object.keys(tables);
  25250. tablesNames.sort();
  25251. numTables = tablesNames.length;
  25252. // header and new offsets. Table entry information is appended to the
  25253. // end of file. The virtualOffset represents where to put the actual
  25254. // data of a particular table;
  25255. var ttf = {
  25256. file: '',
  25257. virtualOffset: numTables * (4 * 4)
  25258. };
  25259. // The new numbers of tables will be the last one plus the num
  25260. // of missing tables
  25261. createOpenTypeHeader(header.version, ttf, numTables);
  25262. // Ensure the hmtx table contains the advance width and
  25263. // sidebearings information for numGlyphs in the maxp table
  25264. sanitizeMetrics(font, tables.hhea, tables.hmtx, numGlyphs);
  25265. if (!tables.head) {
  25266. error('Required "head" table is not found');
  25267. }
  25268. sanitizeHead(tables.head, numGlyphs, isTrueType ? tables.loca.length : 0);
  25269. if (isTrueType) {
  25270. var isGlyphLocationsLong = int16(tables.head.data[50],
  25271. tables.head.data[51]);
  25272. sanitizeGlyphLocations(tables.loca, tables.glyf, numGlyphs,
  25273. isGlyphLocationsLong, hintsValid, dupFirstEntry);
  25274. }
  25275. if (!tables.hhea) {
  25276. error('Required "hhea" table is not found');
  25277. }
  25278. // Sanitizer reduces the glyph advanceWidth to the maxAdvanceWidth
  25279. // Sometimes it's 0. That needs to be fixed
  25280. if (tables.hhea.data[10] === 0 && tables.hhea.data[11] === 0) {
  25281. tables.hhea.data[10] = 0xFF;
  25282. tables.hhea.data[11] = 0xFF;
  25283. }
  25284. // The 'post' table has glyphs names.
  25285. if (tables.post) {
  25286. var valid = readPostScriptTable(tables.post, properties, numGlyphs);
  25287. if (!valid) {
  25288. tables.post = null;
  25289. }
  25290. }
  25291. var charCodeToGlyphId = [], charCode;
  25292. if (properties.type == 'CIDFontType2') {
  25293. var cidToGidMap = properties.cidToGidMap || [];
  25294. var cMap = properties.cMap.map;
  25295. for (charCode in cMap) {
  25296. charCode |= 0;
  25297. var cid = cMap[charCode];
  25298. assert(cid.length === 1, 'Max size of CID is 65,535');
  25299. cid = cid.charCodeAt(0);
  25300. var glyphId = -1;
  25301. if (cidToGidMap.length === 0) {
  25302. glyphId = charCode;
  25303. } else if (cid in cidToGidMap) {
  25304. glyphId = cidToGidMap[cid];
  25305. }
  25306. if (glyphId >= 0 && glyphId < numGlyphs) {
  25307. charCodeToGlyphId[charCode] = glyphId;
  25308. }
  25309. }
  25310. if (dupFirstEntry) {
  25311. charCodeToGlyphId[0] = numGlyphs - 1;
  25312. }
  25313. } else {
  25314. // Most of the following logic in this code branch is based on the
  25315. // 9.6.6.4 of the PDF spec.
  25316. var cmapTable = readCmapTable(tables.cmap, font, this.isSymbolicFont);
  25317. var cmapPlatformId = cmapTable.platformId;
  25318. var cmapEncodingId = cmapTable.encodingId;
  25319. var cmapMappings = cmapTable.mappings;
  25320. var cmapMappingsLength = cmapMappings.length;
  25321. var hasEncoding = properties.differences.length ||
  25322. !!properties.baseEncodingName;
  25323. // The spec seems to imply that if the font is symbolic the encoding
  25324. // should be ignored, this doesn't appear to work for 'preistabelle.pdf'
  25325. // where the the font is symbolic and it has an encoding.
  25326. if (hasEncoding &&
  25327. (cmapPlatformId === 3 && cmapEncodingId === 1 ||
  25328. cmapPlatformId === 1 && cmapEncodingId === 0)) {
  25329. var baseEncoding = [];
  25330. if (properties.baseEncodingName === 'MacRomanEncoding' ||
  25331. properties.baseEncodingName === 'WinAnsiEncoding') {
  25332. baseEncoding = Encodings[properties.baseEncodingName];
  25333. }
  25334. for (charCode = 0; charCode < 256; charCode++) {
  25335. var glyphName;
  25336. if (this.differences && charCode in this.differences) {
  25337. glyphName = this.differences[charCode];
  25338. } else if (charCode in baseEncoding &&
  25339. baseEncoding[charCode] !== '') {
  25340. glyphName = baseEncoding[charCode];
  25341. } else {
  25342. glyphName = Encodings.StandardEncoding[charCode];
  25343. }
  25344. if (!glyphName) {
  25345. continue;
  25346. }
  25347. var unicodeOrCharCode;
  25348. if (cmapPlatformId === 3 && cmapEncodingId === 1) {
  25349. unicodeOrCharCode = GlyphsUnicode[glyphName];
  25350. } else if (cmapPlatformId === 1 && cmapEncodingId === 0) {
  25351. // TODO: the encoding needs to be updated with mac os table.
  25352. unicodeOrCharCode = Encodings.MacRomanEncoding.indexOf(glyphName);
  25353. }
  25354. var found = false;
  25355. for (i = 0; i < cmapMappingsLength; ++i) {
  25356. if (cmapMappings[i].charCode === unicodeOrCharCode) {
  25357. charCodeToGlyphId[charCode] = cmapMappings[i].glyphId;
  25358. found = true;
  25359. break;
  25360. }
  25361. }
  25362. if (!found && properties.glyphNames) {
  25363. // Try to map using the post table. There are currently no known
  25364. // pdfs that this fixes.
  25365. glyphId = properties.glyphNames.indexOf(glyphName);
  25366. if (glyphId > 0) {
  25367. charCodeToGlyphId[charCode] = glyphId;
  25368. }
  25369. }
  25370. }
  25371. } else {
  25372. // For (3, 0) cmap tables:
  25373. // The charcode key being stored in charCodeToGlyphId is the lower
  25374. // byte of the two-byte charcodes of the cmap table since according to
  25375. // the spec: 'each byte from the string shall be prepended with the
  25376. // high byte of the range [of charcodes in the cmap table], to form
  25377. // a two-byte character, which shall be used to select the
  25378. // associated glyph description from the subtable'.
  25379. //
  25380. // For (1, 0) cmap tables:
  25381. // 'single bytes from the string shall be used to look up the
  25382. // associated glyph descriptions from the subtable'. This means
  25383. // charcodes in the cmap will be single bytes, so no-op since
  25384. // glyph.charCode & 0xFF === glyph.charCode
  25385. for (i = 0; i < cmapMappingsLength; ++i) {
  25386. charCode = cmapMappings[i].charCode & 0xFF;
  25387. charCodeToGlyphId[charCode] = cmapMappings[i].glyphId;
  25388. }
  25389. }
  25390. }
  25391. if (charCodeToGlyphId.length === 0) {
  25392. // defines at least one glyph
  25393. charCodeToGlyphId[0] = 0;
  25394. }
  25395. // Converting glyphs and ids into font's cmap table
  25396. var newMapping = adjustMapping(charCodeToGlyphId, properties);
  25397. this.toFontChar = newMapping.toFontChar;
  25398. tables.cmap = {
  25399. tag: 'cmap',
  25400. data: createCmapTable(newMapping.charCodeToGlyphId)
  25401. };
  25402. if (!tables['OS/2'] || !validateOS2Table(tables['OS/2'])) {
  25403. // extract some more font properties from the OpenType head and
  25404. // hhea tables; yMin and descent value are always negative
  25405. var override = {
  25406. unitsPerEm: int16(tables.head.data[18], tables.head.data[19]),
  25407. yMax: int16(tables.head.data[42], tables.head.data[43]),
  25408. yMin: int16(tables.head.data[38], tables.head.data[39]) - 0x10000,
  25409. ascent: int16(tables.hhea.data[4], tables.hhea.data[5]),
  25410. descent: int16(tables.hhea.data[6], tables.hhea.data[7]) - 0x10000
  25411. };
  25412. tables['OS/2'] = {
  25413. tag: 'OS/2',
  25414. data: stringToArray(createOS2Table(properties,
  25415. newMapping.charCodeToGlyphId,
  25416. override))
  25417. };
  25418. }
  25419. // Rewrite the 'post' table if needed
  25420. if (!tables.post) {
  25421. tables.post = {
  25422. tag: 'post',
  25423. data: stringToArray(createPostTable(properties))
  25424. };
  25425. }
  25426. if (!isTrueType) {
  25427. try {
  25428. // Trying to repair CFF file
  25429. cffFile = new Stream(tables['CFF '].data);
  25430. var parser = new CFFParser(cffFile, properties);
  25431. cff = parser.parse();
  25432. var compiler = new CFFCompiler(cff);
  25433. tables['CFF '].data = compiler.compile();
  25434. } catch (e) {
  25435. warn('Failed to compile font ' + properties.loadedName);
  25436. }
  25437. }
  25438. // Re-creating 'name' table
  25439. if (!tables.name) {
  25440. tables.name = {
  25441. tag: 'name',
  25442. data: stringToArray(createNameTable(this.name))
  25443. };
  25444. } else {
  25445. // ... using existing 'name' table as prototype
  25446. var namePrototype = readNameTable(tables.name);
  25447. tables.name.data = stringToArray(createNameTable(name, namePrototype));
  25448. }
  25449. // rewrite the tables but tweak offsets
  25450. for (i = 0; i < numTables; i++) {
  25451. table = tables[tablesNames[i]];
  25452. var data = [];
  25453. tableData = table.data;
  25454. for (var j = 0, jj = tableData.length; j < jj; j++) {
  25455. data.push(tableData[j]);
  25456. }
  25457. createTableEntry(ttf, table.tag, data);
  25458. }
  25459. // Add the table datas
  25460. for (i = 0; i < numTables; i++) {
  25461. table = tables[tablesNames[i]];
  25462. tableData = table.data;
  25463. ttf.file += bytesToString(new Uint8Array(tableData));
  25464. // 4-byte aligned data
  25465. while (ttf.file.length & 3) {
  25466. ttf.file += String.fromCharCode(0);
  25467. }
  25468. }
  25469. return stringToArray(ttf.file);
  25470. },
  25471. convert: function Font_convert(fontName, font, properties) {
  25472. // The offsets object holds at the same time a representation of where
  25473. // to write the table entry information about a table and another offset
  25474. // representing the offset where to draw the actual data of a particular
  25475. // table
  25476. var otf = {
  25477. file: '',
  25478. virtualOffset: 9 * (4 * 4)
  25479. };
  25480. createOpenTypeHeader('\x4F\x54\x54\x4F', otf, 9);
  25481. // TODO: Check the charstring widths to determine this.
  25482. properties.fixedPitch = false;
  25483. var mapping = font.getGlyphMapping(properties);
  25484. var newMapping = adjustMapping(mapping, properties);
  25485. this.toFontChar = newMapping.toFontChar;
  25486. var numGlyphs = font.numGlyphs;
  25487. function getCharCode(charCodeToGlyphId, glyphId, addMap) {
  25488. for (var charCode in charCodeToGlyphId) {
  25489. if (glyphId === charCodeToGlyphId[charCode]) {
  25490. return charCode | 0;
  25491. }
  25492. }
  25493. if (addMap) {
  25494. newMapping.charCodeToGlyphId[newMapping.nextAvailableFontCharCode] =
  25495. glyphId;
  25496. return newMapping.nextAvailableFontCharCode++;
  25497. }
  25498. return null;
  25499. }
  25500. var seacs = font.seacs;
  25501. if (SEAC_ANALYSIS_ENABLED && seacs && seacs.length) {
  25502. var matrix = properties.fontMatrix || FONT_IDENTITY_MATRIX;
  25503. var charset = font.getCharset();
  25504. var seacMap = Object.create(null);
  25505. for (var glyphId in seacs) {
  25506. glyphId |= 0;
  25507. var seac = seacs[glyphId];
  25508. var baseGlyphName = Encodings.StandardEncoding[seac[2]];
  25509. var accentGlyphName = Encodings.StandardEncoding[seac[3]];
  25510. var baseGlyphId = charset.indexOf(baseGlyphName);
  25511. var accentGlyphId = charset.indexOf(accentGlyphName);
  25512. if (baseGlyphId < 0 || accentGlyphId < 0) {
  25513. continue;
  25514. }
  25515. var accentOffset = {
  25516. x: seac[0] * matrix[0] + seac[1] * matrix[2] + matrix[4],
  25517. y: seac[0] * matrix[1] + seac[1] * matrix[3] + matrix[5]
  25518. };
  25519. var charCode = getCharCode(mapping, glyphId);
  25520. if (charCode === null) {
  25521. // There's no point in mapping it if the char code was never mapped
  25522. // to begin with.
  25523. continue;
  25524. }
  25525. // Find a fontCharCode that maps to the base and accent glyphs. If one
  25526. // doesn't exists, create it.
  25527. var charCodeToGlyphId = newMapping.charCodeToGlyphId;
  25528. var baseFontCharCode = getCharCode(charCodeToGlyphId, baseGlyphId,
  25529. true);
  25530. var accentFontCharCode = getCharCode(charCodeToGlyphId, accentGlyphId,
  25531. true);
  25532. seacMap[charCode] = {
  25533. baseFontCharCode: baseFontCharCode,
  25534. accentFontCharCode: accentFontCharCode,
  25535. accentOffset: accentOffset
  25536. };
  25537. }
  25538. properties.seacMap = seacMap;
  25539. }
  25540. var unitsPerEm = 1 / (properties.fontMatrix || FONT_IDENTITY_MATRIX)[0];
  25541. var fields = {
  25542. // PostScript Font Program
  25543. 'CFF ': font.data,
  25544. // OS/2 and Windows Specific metrics
  25545. 'OS/2': stringToArray(createOS2Table(properties,
  25546. newMapping.charCodeToGlyphId)),
  25547. // Character to glyphs mapping
  25548. 'cmap': createCmapTable(newMapping.charCodeToGlyphId),
  25549. // Font header
  25550. 'head': (function fontFieldsHead() {
  25551. return stringToArray(
  25552. '\x00\x01\x00\x00' + // Version number
  25553. '\x00\x00\x10\x00' + // fontRevision
  25554. '\x00\x00\x00\x00' + // checksumAdjustement
  25555. '\x5F\x0F\x3C\xF5' + // magicNumber
  25556. '\x00\x00' + // Flags
  25557. safeString16(unitsPerEm) + // unitsPerEM
  25558. '\x00\x00\x00\x00\x9e\x0b\x7e\x27' + // creation date
  25559. '\x00\x00\x00\x00\x9e\x0b\x7e\x27' + // modifification date
  25560. '\x00\x00' + // xMin
  25561. safeString16(properties.descent) + // yMin
  25562. '\x0F\xFF' + // xMax
  25563. safeString16(properties.ascent) + // yMax
  25564. string16(properties.italicAngle ? 2 : 0) + // macStyle
  25565. '\x00\x11' + // lowestRecPPEM
  25566. '\x00\x00' + // fontDirectionHint
  25567. '\x00\x00' + // indexToLocFormat
  25568. '\x00\x00'); // glyphDataFormat
  25569. })(),
  25570. // Horizontal header
  25571. 'hhea': (function fontFieldsHhea() {
  25572. return stringToArray(
  25573. '\x00\x01\x00\x00' + // Version number
  25574. safeString16(properties.ascent) + // Typographic Ascent
  25575. safeString16(properties.descent) + // Typographic Descent
  25576. '\x00\x00' + // Line Gap
  25577. '\xFF\xFF' + // advanceWidthMax
  25578. '\x00\x00' + // minLeftSidebearing
  25579. '\x00\x00' + // minRightSidebearing
  25580. '\x00\x00' + // xMaxExtent
  25581. safeString16(properties.capHeight) + // caretSlopeRise
  25582. safeString16(Math.tan(properties.italicAngle) *
  25583. properties.xHeight) + // caretSlopeRun
  25584. '\x00\x00' + // caretOffset
  25585. '\x00\x00' + // -reserved-
  25586. '\x00\x00' + // -reserved-
  25587. '\x00\x00' + // -reserved-
  25588. '\x00\x00' + // -reserved-
  25589. '\x00\x00' + // metricDataFormat
  25590. string16(numGlyphs)); // Number of HMetrics
  25591. })(),
  25592. // Horizontal metrics
  25593. 'hmtx': (function fontFieldsHmtx() {
  25594. var charstrings = font.charstrings;
  25595. var hmtx = '\x00\x00\x00\x00'; // Fake .notdef
  25596. for (var i = 1, ii = numGlyphs; i < ii; i++) {
  25597. // TODO: For CFF fonts the width should technically match th x in
  25598. // the glyph, but it doesn't seem to matter.
  25599. var charstring = charstrings ? charstrings[i - 1] : {};
  25600. var width = 'width' in charstring ? charstring.width : 0;
  25601. hmtx += string16(width) + string16(0);
  25602. }
  25603. return stringToArray(hmtx);
  25604. })(),
  25605. // Maximum profile
  25606. 'maxp': (function fontFieldsMaxp() {
  25607. return stringToArray(
  25608. '\x00\x00\x50\x00' + // Version number
  25609. string16(numGlyphs)); // Num of glyphs
  25610. })(),
  25611. // Naming tables
  25612. 'name': stringToArray(createNameTable(fontName)),
  25613. // PostScript informations
  25614. 'post': stringToArray(createPostTable(properties))
  25615. };
  25616. var field;
  25617. for (field in fields) {
  25618. createTableEntry(otf, field, fields[field]);
  25619. }
  25620. for (field in fields) {
  25621. var table = fields[field];
  25622. otf.file += bytesToString(new Uint8Array(table));
  25623. }
  25624. return stringToArray(otf.file);
  25625. },
  25626. /**
  25627. * Builds a char code to unicode map based on section 9.10 of the spec.
  25628. * @param {Object} properties Font properties object.
  25629. * @return {Object} Has two properties: 'toUnicode' which maps char codes to
  25630. * unicode (string) values and 'isIdentity' which is true if an identity map
  25631. * is used.
  25632. */
  25633. buildToUnicode: function Font_buildToUnicode(properties) {
  25634. var map = {
  25635. isIdentity: false,
  25636. toUnicode: null
  25637. };
  25638. // Section 9.10.2 Mapping Character Codes to Unicode Values
  25639. if (properties.toUnicode && properties.toUnicode.length !== 0) {
  25640. map.toUnicode = properties.toUnicode;
  25641. return map;
  25642. }
  25643. // According to the spec if the font is a simple font we should only map
  25644. // to unicode if the base encoding is MacRoman, MacExpert, or WinAnsi or
  25645. // the differences array only contains adobe standard or symbol set names,
  25646. // in pratice it seems better to always try to create a toUnicode
  25647. // map based of the default encoding.
  25648. var toUnicode, charcode;
  25649. if (!properties.composite /* is simple font */) {
  25650. toUnicode = [];
  25651. var encoding = properties.defaultEncoding.slice();
  25652. // Merge in the differences array.
  25653. var differences = properties.differences;
  25654. for (charcode in differences) {
  25655. encoding[charcode] = differences[charcode];
  25656. }
  25657. for (charcode in encoding) {
  25658. // a) Map the character code to a character name.
  25659. var glyphName = encoding[charcode];
  25660. // b) Look up the character name in the Adobe Glyph List (see the
  25661. // Bibliography) to obtain the corresponding Unicode value.
  25662. if (glyphName === '' || !(glyphName in GlyphsUnicode)) {
  25663. // (undocumented) c) Few heuristics to recognize unknown glyphs
  25664. // NOTE: Adobe Reader does not do this step, but OSX Preview does
  25665. var code;
  25666. // Gxx glyph
  25667. if (glyphName.length === 3 &&
  25668. glyphName[0] === 'G' &&
  25669. (code = parseInt(glyphName.substr(1), 16))) {
  25670. toUnicode[charcode] = String.fromCharCode(code);
  25671. }
  25672. // Cddd glyph
  25673. if (glyphName.length >= 3 &&
  25674. glyphName[0] === 'C' &&
  25675. (code = +glyphName.substr(1))) {
  25676. toUnicode[charcode] = String.fromCharCode(code);
  25677. }
  25678. continue;
  25679. }
  25680. toUnicode[charcode] = String.fromCharCode(GlyphsUnicode[glyphName]);
  25681. }
  25682. map.toUnicode = toUnicode;
  25683. return map;
  25684. }
  25685. // If the font is a composite font that uses one of the predefined CMaps
  25686. // listed in Table 118 (except Identity–H and Identity–V) or whose
  25687. // descendant CIDFont uses the Adobe-GB1, Adobe-CNS1, Adobe-Japan1, or
  25688. // Adobe-Korea1 character collection:
  25689. if (properties.composite && (
  25690. (properties.cMap.builtInCMap &&
  25691. !(properties.cMap instanceof IdentityCMap)) ||
  25692. (properties.cidSystemInfo.registry === 'Adobe' &&
  25693. (properties.cidSystemInfo.ordering === 'GB1' ||
  25694. properties.cidSystemInfo.ordering === 'CNS1' ||
  25695. properties.cidSystemInfo.ordering === 'Japan1' ||
  25696. properties.cidSystemInfo.ordering === 'Korea1')))) {
  25697. // Then:
  25698. // a) Map the character code to a character identifier (CID) according
  25699. // to the font’s CMap.
  25700. // b) Obtain the registry and ordering of the character collection used
  25701. // by the font’s CMap (for example, Adobe and Japan1) from its
  25702. // CIDSystemInfo dictionary.
  25703. var registry = properties.cidSystemInfo.registry;
  25704. var ordering = properties.cidSystemInfo.ordering;
  25705. // c) Construct a second CMap name by concatenating the registry and
  25706. // ordering obtained in step (b) in the format registry–ordering–UCS2
  25707. // (for example, Adobe–Japan1–UCS2).
  25708. var ucs2CMapName = new Name(registry + '-' + ordering + '-UCS2');
  25709. // d) Obtain the CMap with the name constructed in step (c) (available
  25710. // from the ASN Web site; see the Bibliography).
  25711. var ucs2CMap = CMapFactory.create(ucs2CMapName,
  25712. { url: PDFJS.cMapUrl, packed: PDFJS.cMapPacked }, null);
  25713. var cMap = properties.cMap;
  25714. toUnicode = [];
  25715. for (charcode in cMap.map) {
  25716. var cid = cMap.map[charcode];
  25717. assert(cid.length === 1, 'Max size of CID is 65,535');
  25718. // e) Map the CID obtained in step (a) according to the CMap obtained
  25719. // in step (d), producing a Unicode value.
  25720. var ucs2 = ucs2CMap.map[cid.charCodeAt(0)];
  25721. if (!ucs2) {
  25722. continue;
  25723. }
  25724. toUnicode[charcode] = String.fromCharCode((ucs2.charCodeAt(0) << 8) +
  25725. ucs2.charCodeAt(1));
  25726. }
  25727. map.toUnicode = toUnicode;
  25728. return map;
  25729. }
  25730. // The viewer's choice, just use an identity map.
  25731. toUnicode = [];
  25732. var firstChar = properties.firstChar, lastChar = properties.lastChar;
  25733. for (var i = firstChar; i <= lastChar; i++) {
  25734. toUnicode[i] = String.fromCharCode(i);
  25735. }
  25736. map.isIdentity = true;
  25737. map.toUnicode = toUnicode;
  25738. return map;
  25739. },
  25740. get spaceWidth() {
  25741. if ('_shadowWidth' in this) {
  25742. return this._shadowWidth;
  25743. }
  25744. // trying to estimate space character width
  25745. var possibleSpaceReplacements = ['space', 'minus', 'one', 'i'];
  25746. var width;
  25747. for (var i = 0, ii = possibleSpaceReplacements.length; i < ii; i++) {
  25748. var glyphName = possibleSpaceReplacements[i];
  25749. // if possible, getting width by glyph name
  25750. if (glyphName in this.widths) {
  25751. width = this.widths[glyphName];
  25752. break;
  25753. }
  25754. var glyphUnicode = GlyphsUnicode[glyphName];
  25755. // finding the charcode via unicodeToCID map
  25756. var charcode = 0;
  25757. if (this.composite) {
  25758. if (glyphUnicode in this.cMap.map) {
  25759. charcode = this.cMap.lookup(glyphUnicode).charCodeAt(0);
  25760. }
  25761. }
  25762. // ... via toUnicode map
  25763. if (!charcode && 'toUnicode' in this) {
  25764. charcode = this.toUnicode.indexOf(glyphUnicode);
  25765. }
  25766. // setting it to unicode if negative or undefined
  25767. if (charcode <= 0) {
  25768. charcode = glyphUnicode;
  25769. }
  25770. // trying to get width via charcode
  25771. width = this.widths[charcode];
  25772. if (width) {
  25773. break; // the non-zero width found
  25774. }
  25775. }
  25776. width = width || this.defaultWidth;
  25777. // Do not shadow the property here. See discussion:
  25778. // https://github.com/mozilla/pdf.js/pull/2127#discussion_r1662280
  25779. this._shadowWidth = width;
  25780. return width;
  25781. },
  25782. charToGlyph: function Font_charToGlyph(charcode) {
  25783. var fontCharCode, width, operatorListId;
  25784. var widthCode = charcode;
  25785. if (this.cMap && charcode in this.cMap.map) {
  25786. widthCode = this.cMap.map[charcode].charCodeAt(0);
  25787. }
  25788. width = this.widths[widthCode];
  25789. width = isNum(width) ? width : this.defaultWidth;
  25790. var vmetric = this.vmetrics && this.vmetrics[widthCode];
  25791. var unicode = this.toUnicode[charcode] || charcode;
  25792. if (typeof unicode === 'number') {
  25793. unicode = String.fromCharCode(unicode);
  25794. }
  25795. // First try the toFontChar map, if it's not there then try falling
  25796. // back to the char code.
  25797. fontCharCode = this.toFontChar[charcode] || charcode;
  25798. if (this.missingFile) {
  25799. fontCharCode = mapSpecialUnicodeValues(fontCharCode);
  25800. }
  25801. if (this.isType3Font) {
  25802. // Font char code in this case is actually a glyph name.
  25803. operatorListId = fontCharCode;
  25804. }
  25805. var accent = null;
  25806. if (this.seacMap && this.seacMap[charcode]) {
  25807. var seac = this.seacMap[charcode];
  25808. fontCharCode = seac.baseFontCharCode;
  25809. accent = {
  25810. fontChar: String.fromCharCode(seac.accentFontCharCode),
  25811. offset: seac.accentOffset
  25812. };
  25813. }
  25814. var fontChar = String.fromCharCode(fontCharCode);
  25815. var glyph = this.glyphCache[charcode];
  25816. if (!glyph ||
  25817. !glyph.matchesForCache(fontChar, unicode, accent, width, vmetric,
  25818. operatorListId)) {
  25819. glyph = new Glyph(fontChar, unicode, accent, width, vmetric,
  25820. operatorListId);
  25821. this.glyphCache[charcode] = glyph;
  25822. }
  25823. return glyph;
  25824. },
  25825. charsToGlyphs: function Font_charsToGlyphs(chars) {
  25826. var charsCache = this.charsCache;
  25827. var glyphs, glyph, charcode;
  25828. // if we translated this string before, just grab it from the cache
  25829. if (charsCache) {
  25830. glyphs = charsCache[chars];
  25831. if (glyphs) {
  25832. return glyphs;
  25833. }
  25834. }
  25835. // lazily create the translation cache
  25836. if (!charsCache) {
  25837. charsCache = this.charsCache = Object.create(null);
  25838. }
  25839. glyphs = [];
  25840. var charsCacheKey = chars;
  25841. var i = 0, ii;
  25842. if (this.cMap) {
  25843. // composite fonts have multi-byte strings convert the string from
  25844. // single-byte to multi-byte
  25845. while (i < chars.length) {
  25846. var c = this.cMap.readCharCode(chars, i);
  25847. charcode = c[0];
  25848. var length = c[1];
  25849. i += length;
  25850. glyph = this.charToGlyph(charcode);
  25851. glyphs.push(glyph);
  25852. // placing null after each word break charcode (ASCII SPACE)
  25853. // Ignore occurences of 0x20 in multiple-byte codes.
  25854. if (length === 1 && chars.charCodeAt(i - 1) === 0x20) {
  25855. glyphs.push(null);
  25856. }
  25857. }
  25858. } else {
  25859. for (i = 0, ii = chars.length; i < ii; ++i) {
  25860. charcode = chars.charCodeAt(i);
  25861. glyph = this.charToGlyph(charcode);
  25862. glyphs.push(glyph);
  25863. if (charcode == 0x20) {
  25864. glyphs.push(null);
  25865. }
  25866. }
  25867. }
  25868. // Enter the translated string into the cache
  25869. return (charsCache[charsCacheKey] = glyphs);
  25870. }
  25871. };
  25872. return Font;
  25873. })();
  25874. var ErrorFont = (function ErrorFontClosure() {
  25875. function ErrorFont(error) {
  25876. this.error = error;
  25877. this.loadedName = 'g_font_error';
  25878. this.loading = false;
  25879. }
  25880. ErrorFont.prototype = {
  25881. charsToGlyphs: function ErrorFont_charsToGlyphs() {
  25882. return [];
  25883. },
  25884. exportData: function ErrorFont_exportData() {
  25885. return {error: this.error};
  25886. }
  25887. };
  25888. return ErrorFont;
  25889. })();
  25890. /**
  25891. * Shared logic for building a char code to glyph id mapping for Type1 and
  25892. * simple CFF fonts. See section 9.6.6.2 of the spec.
  25893. * @param {Object} properties Font properties object.
  25894. * @param {Object} builtInEncoding The encoding contained within the actual font
  25895. * data.
  25896. * @param {Array} Array of glyph names where the index is the glyph ID.
  25897. * @returns {Object} A char code to glyph ID map.
  25898. */
  25899. function type1FontGlyphMapping(properties, builtInEncoding, glyphNames) {
  25900. var charCodeToGlyphId = Object.create(null);
  25901. var glyphId, charCode, baseEncoding;
  25902. if (properties.baseEncodingName) {
  25903. // If a valid base encoding name was used, the mapping is initialized with
  25904. // that.
  25905. baseEncoding = Encodings[properties.baseEncodingName];
  25906. for (charCode = 0; charCode < baseEncoding.length; charCode++) {
  25907. glyphId = glyphNames.indexOf(baseEncoding[charCode]);
  25908. if (glyphId >= 0) {
  25909. charCodeToGlyphId[charCode] = glyphId;
  25910. }
  25911. }
  25912. } else if (!!(properties.flags & FontFlags.Symbolic)) {
  25913. // For a symbolic font the encoding should be the fonts built-in
  25914. // encoding.
  25915. for (charCode in builtInEncoding) {
  25916. charCodeToGlyphId[charCode] = builtInEncoding[charCode];
  25917. }
  25918. } else {
  25919. // For non-symbolic fonts that don't have a base encoding the standard
  25920. // encoding should be used.
  25921. baseEncoding = Encodings.StandardEncoding;
  25922. for (charCode = 0; charCode < baseEncoding.length; charCode++) {
  25923. glyphId = glyphNames.indexOf(baseEncoding[charCode]);
  25924. if (glyphId >= 0) {
  25925. charCodeToGlyphId[charCode] = glyphId;
  25926. }
  25927. }
  25928. }
  25929. // Lastly, merge in the differences.
  25930. var differences = properties.differences;
  25931. if (differences) {
  25932. for (charCode in differences) {
  25933. var glyphName = differences[charCode];
  25934. glyphId = glyphNames.indexOf(glyphName);
  25935. if (glyphId >= 0) {
  25936. charCodeToGlyphId[charCode] = glyphId;
  25937. }
  25938. }
  25939. }
  25940. return charCodeToGlyphId;
  25941. }
  25942. /*
  25943. * CharStrings are encoded following the the CharString Encoding sequence
  25944. * describe in Chapter 6 of the "Adobe Type1 Font Format" specification.
  25945. * The value in a byte indicates a command, a number, or subsequent bytes
  25946. * that are to be interpreted in a special way.
  25947. *
  25948. * CharString Number Encoding:
  25949. * A CharString byte containing the values from 32 through 255 inclusive
  25950. * indicate an integer. These values are decoded in four ranges.
  25951. *
  25952. * 1. A CharString byte containing a value, v, between 32 and 246 inclusive,
  25953. * indicate the integer v - 139. Thus, the integer values from -107 through
  25954. * 107 inclusive may be encoded in single byte.
  25955. *
  25956. * 2. A CharString byte containing a value, v, between 247 and 250 inclusive,
  25957. * indicates an integer involving the next byte, w, according to the formula:
  25958. * [(v - 247) x 256] + w + 108
  25959. *
  25960. * 3. A CharString byte containing a value, v, between 251 and 254 inclusive,
  25961. * indicates an integer involving the next byte, w, according to the formula:
  25962. * -[(v - 251) * 256] - w - 108
  25963. *
  25964. * 4. A CharString containing the value 255 indicates that the next 4 bytes
  25965. * are a two complement signed integer. The first of these bytes contains the
  25966. * highest order bits, the second byte contains the next higher order bits
  25967. * and the fourth byte contain the lowest order bits.
  25968. *
  25969. *
  25970. * CharString Command Encoding:
  25971. * CharStrings commands are encoded in 1 or 2 bytes.
  25972. *
  25973. * Single byte commands are encoded in 1 byte that contains a value between
  25974. * 0 and 31 inclusive.
  25975. * If a command byte contains the value 12, then the value in the next byte
  25976. * indicates a command. This "escape" mechanism allows many extra commands
  25977. * to be encoded and this encoding technique helps to minimize the length of
  25978. * the charStrings.
  25979. */
  25980. var Type1CharString = (function Type1CharStringClosure() {
  25981. var COMMAND_MAP = {
  25982. 'hstem': [1],
  25983. 'vstem': [3],
  25984. 'vmoveto': [4],
  25985. 'rlineto': [5],
  25986. 'hlineto': [6],
  25987. 'vlineto': [7],
  25988. 'rrcurveto': [8],
  25989. 'callsubr': [10],
  25990. 'flex': [12, 35],
  25991. 'drop' : [12, 18],
  25992. 'endchar': [14],
  25993. 'rmoveto': [21],
  25994. 'hmoveto': [22],
  25995. 'vhcurveto': [30],
  25996. 'hvcurveto': [31]
  25997. };
  25998. function Type1CharString() {
  25999. this.width = 0;
  26000. this.lsb = 0;
  26001. this.flexing = false;
  26002. this.output = [];
  26003. this.stack = [];
  26004. }
  26005. Type1CharString.prototype = {
  26006. convert: function Type1CharString_convert(encoded, subrs) {
  26007. var count = encoded.length;
  26008. var error = false;
  26009. var wx, sbx, subrNumber;
  26010. for (var i = 0; i < count; i++) {
  26011. var value = encoded[i];
  26012. if (value < 32) {
  26013. if (value === 12) {
  26014. value = (value << 8) + encoded[++i];
  26015. }
  26016. switch (value) {
  26017. case 1: // hstem
  26018. if (!HINTING_ENABLED) {
  26019. this.stack = [];
  26020. break;
  26021. }
  26022. error = this.executeCommand(2, COMMAND_MAP.hstem);
  26023. break;
  26024. case 3: // vstem
  26025. if (!HINTING_ENABLED) {
  26026. this.stack = [];
  26027. break;
  26028. }
  26029. error = this.executeCommand(2, COMMAND_MAP.vstem);
  26030. break;
  26031. case 4: // vmoveto
  26032. if (this.flexing) {
  26033. if (this.stack.length < 1) {
  26034. error = true;
  26035. break;
  26036. }
  26037. // Add the dx for flex and but also swap the values so they are
  26038. // the right order.
  26039. var dy = this.stack.pop();
  26040. this.stack.push(0, dy);
  26041. break;
  26042. }
  26043. error = this.executeCommand(1, COMMAND_MAP.vmoveto);
  26044. break;
  26045. case 5: // rlineto
  26046. error = this.executeCommand(2, COMMAND_MAP.rlineto);
  26047. break;
  26048. case 6: // hlineto
  26049. error = this.executeCommand(1, COMMAND_MAP.hlineto);
  26050. break;
  26051. case 7: // vlineto
  26052. error = this.executeCommand(1, COMMAND_MAP.vlineto);
  26053. break;
  26054. case 8: // rrcurveto
  26055. error = this.executeCommand(6, COMMAND_MAP.rrcurveto);
  26056. break;
  26057. case 9: // closepath
  26058. // closepath is a Type1 command that does not take argument and is
  26059. // useless in Type2 and it can simply be ignored.
  26060. this.stack = [];
  26061. break;
  26062. case 10: // callsubr
  26063. if (this.stack.length < 1) {
  26064. error = true;
  26065. break;
  26066. }
  26067. subrNumber = this.stack.pop();
  26068. error = this.convert(subrs[subrNumber], subrs);
  26069. break;
  26070. case 11: // return
  26071. return error;
  26072. case 13: // hsbw
  26073. if (this.stack.length < 2) {
  26074. error = true;
  26075. break;
  26076. }
  26077. // To convert to type2 we have to move the width value to the
  26078. // first part of the charstring and then use hmoveto with lsb.
  26079. wx = this.stack.pop();
  26080. sbx = this.stack.pop();
  26081. this.lsb = sbx;
  26082. this.width = wx;
  26083. this.stack.push(sbx);
  26084. error = this.executeCommand(1, COMMAND_MAP.hmoveto);
  26085. break;
  26086. case 14: // endchar
  26087. this.output.push(COMMAND_MAP.endchar[0]);
  26088. break;
  26089. case 21: // rmoveto
  26090. if (this.flexing) {
  26091. break;
  26092. }
  26093. error = this.executeCommand(2, COMMAND_MAP.rmoveto);
  26094. break;
  26095. case 22: // hmoveto
  26096. if (this.flexing) {
  26097. // Add the dy for flex.
  26098. this.stack.push(0);
  26099. break;
  26100. }
  26101. error = this.executeCommand(1, COMMAND_MAP.hmoveto);
  26102. break;
  26103. case 30: // vhcurveto
  26104. error = this.executeCommand(4, COMMAND_MAP.vhcurveto);
  26105. break;
  26106. case 31: // hvcurveto
  26107. error = this.executeCommand(4, COMMAND_MAP.hvcurveto);
  26108. break;
  26109. case (12 << 8) + 0: // dotsection
  26110. // dotsection is a Type1 command to specify some hinting feature
  26111. // for dots that do not take a parameter and it can safely be
  26112. // ignored for Type2.
  26113. this.stack = [];
  26114. break;
  26115. case (12 << 8) + 1: // vstem3
  26116. if (!HINTING_ENABLED) {
  26117. this.stack = [];
  26118. break;
  26119. }
  26120. // [vh]stem3 are Type1 only and Type2 supports [vh]stem with
  26121. // multiple parameters, so instead of returning [vh]stem3 take a
  26122. // shortcut and return [vhstem] instead.
  26123. error = this.executeCommand(2, COMMAND_MAP.vstem);
  26124. break;
  26125. case (12 << 8) + 2: // hstem3
  26126. if (!HINTING_ENABLED) {
  26127. this.stack = [];
  26128. break;
  26129. }
  26130. // See vstem3.
  26131. error = this.executeCommand(2, COMMAND_MAP.hstem);
  26132. break;
  26133. case (12 << 8) + 6: // seac
  26134. // seac is like type 2's special endchar but it doesn't use the
  26135. // first argument asb, so remove it.
  26136. if (SEAC_ANALYSIS_ENABLED) {
  26137. this.seac = this.stack.splice(-4, 4);
  26138. error = this.executeCommand(0, COMMAND_MAP.endchar);
  26139. } else {
  26140. error = this.executeCommand(4, COMMAND_MAP.endchar);
  26141. }
  26142. break;
  26143. case (12 << 8) + 7: // sbw
  26144. if (this.stack.length < 4) {
  26145. error = true;
  26146. break;
  26147. }
  26148. // To convert to type2 we have to move the width value to the
  26149. // first part of the charstring and then use rmoveto with
  26150. // (dx, dy). The height argument will not be used for vmtx and
  26151. // vhea tables reconstruction -- ignoring it.
  26152. var wy = this.stack.pop();
  26153. wx = this.stack.pop();
  26154. var sby = this.stack.pop();
  26155. sbx = this.stack.pop();
  26156. this.lsb = sbx;
  26157. this.width = wx;
  26158. this.stack.push(sbx, sby);
  26159. error = this.executeCommand(2, COMMAND_MAP.rmoveto);
  26160. break;
  26161. case (12 << 8) + 12: // div
  26162. if (this.stack.length < 2) {
  26163. error = true;
  26164. break;
  26165. }
  26166. var num2 = this.stack.pop();
  26167. var num1 = this.stack.pop();
  26168. this.stack.push(num1 / num2);
  26169. break;
  26170. case (12 << 8) + 16: // callothersubr
  26171. if (this.stack.length < 2) {
  26172. error = true;
  26173. break;
  26174. }
  26175. subrNumber = this.stack.pop();
  26176. var numArgs = this.stack.pop();
  26177. if (subrNumber === 0 && numArgs === 3) {
  26178. var flexArgs = this.stack.splice(this.stack.length - 17, 17);
  26179. this.stack.push(
  26180. flexArgs[2] + flexArgs[0], // bcp1x + rpx
  26181. flexArgs[3] + flexArgs[1], // bcp1y + rpy
  26182. flexArgs[4], // bcp2x
  26183. flexArgs[5], // bcp2y
  26184. flexArgs[6], // p2x
  26185. flexArgs[7], // p2y
  26186. flexArgs[8], // bcp3x
  26187. flexArgs[9], // bcp3y
  26188. flexArgs[10], // bcp4x
  26189. flexArgs[11], // bcp4y
  26190. flexArgs[12], // p3x
  26191. flexArgs[13], // p3y
  26192. flexArgs[14] // flexDepth
  26193. // 15 = finalx unused by flex
  26194. // 16 = finaly unused by flex
  26195. );
  26196. error = this.executeCommand(13, COMMAND_MAP.flex, true);
  26197. this.flexing = false;
  26198. this.stack.push(flexArgs[15], flexArgs[16]);
  26199. } else if (subrNumber === 1 && numArgs === 0) {
  26200. this.flexing = true;
  26201. }
  26202. break;
  26203. case (12 << 8) + 17: // pop
  26204. // Ignore this since it is only used with othersubr.
  26205. break;
  26206. case (12 << 8) + 33: // setcurrentpoint
  26207. // Ignore for now.
  26208. this.stack = [];
  26209. break;
  26210. default:
  26211. warn('Unknown type 1 charstring command of "' + value + '"');
  26212. break;
  26213. }
  26214. if (error) {
  26215. break;
  26216. }
  26217. continue;
  26218. } else if (value <= 246) {
  26219. value = value - 139;
  26220. } else if (value <= 250) {
  26221. value = ((value - 247) * 256) + encoded[++i] + 108;
  26222. } else if (value <= 254) {
  26223. value = -((value - 251) * 256) - encoded[++i] - 108;
  26224. } else {
  26225. value = (encoded[++i] & 0xff) << 24 | (encoded[++i] & 0xff) << 16 |
  26226. (encoded[++i] & 0xff) << 8 | (encoded[++i] & 0xff) << 0;
  26227. }
  26228. this.stack.push(value);
  26229. }
  26230. return error;
  26231. },
  26232. executeCommand: function(howManyArgs, command, keepStack) {
  26233. var stackLength = this.stack.length;
  26234. if (howManyArgs > stackLength) {
  26235. return true;
  26236. }
  26237. var start = stackLength - howManyArgs;
  26238. for (var i = start; i < stackLength; i++) {
  26239. var value = this.stack[i];
  26240. if (value === (value | 0)) { // int
  26241. this.output.push(28, (value >> 8) & 0xff, value & 0xff);
  26242. } else { // fixed point
  26243. value = (65536 * value) | 0;
  26244. this.output.push(255,
  26245. (value >> 24) & 0xFF,
  26246. (value >> 16) & 0xFF,
  26247. (value >> 8) & 0xFF,
  26248. value & 0xFF);
  26249. }
  26250. }
  26251. this.output.push.apply(this.output, command);
  26252. if (keepStack) {
  26253. this.stack.splice(start, howManyArgs);
  26254. } else {
  26255. this.stack.length = 0;
  26256. }
  26257. return false;
  26258. }
  26259. };
  26260. return Type1CharString;
  26261. })();
  26262. /*
  26263. * Type1Parser encapsulate the needed code for parsing a Type1 font
  26264. * program. Some of its logic depends on the Type2 charstrings
  26265. * structure.
  26266. * Note: this doesn't really parse the font since that would require evaluation
  26267. * of PostScript, but it is possible in most cases to extract what we need
  26268. * without a full parse.
  26269. */
  26270. var Type1Parser = (function Type1ParserClosure() {
  26271. /*
  26272. * Decrypt a Sequence of Ciphertext Bytes to Produce the Original Sequence
  26273. * of Plaintext Bytes. The function took a key as a parameter which can be
  26274. * for decrypting the eexec block of for decoding charStrings.
  26275. */
  26276. var EEXEC_ENCRYPT_KEY = 55665;
  26277. var CHAR_STRS_ENCRYPT_KEY = 4330;
  26278. function isHexDigit(code) {
  26279. return code >= 48 && code <= 57 || // '0'-'9'
  26280. code >= 65 && code <= 70 || // 'A'-'F'
  26281. code >= 97 && code <= 102; // 'a'-'f'
  26282. }
  26283. function decrypt(data, key, discardNumber) {
  26284. var r = key | 0, c1 = 52845, c2 = 22719;
  26285. var count = data.length;
  26286. var decrypted = new Uint8Array(count);
  26287. for (var i = 0; i < count; i++) {
  26288. var value = data[i];
  26289. decrypted[i] = value ^ (r >> 8);
  26290. r = ((value + r) * c1 + c2) & ((1 << 16) - 1);
  26291. }
  26292. return Array.prototype.slice.call(decrypted, discardNumber);
  26293. }
  26294. function decryptAscii(data, key, discardNumber) {
  26295. var r = key | 0, c1 = 52845, c2 = 22719;
  26296. var count = data.length, maybeLength = count >>> 1;
  26297. var decrypted = new Uint8Array(maybeLength);
  26298. var i, j;
  26299. for (i = 0, j = 0; i < count; i++) {
  26300. var digit1 = data[i];
  26301. if (!isHexDigit(digit1)) {
  26302. continue;
  26303. }
  26304. i++;
  26305. var digit2;
  26306. while (i < count && !isHexDigit(digit2 = data[i])) {
  26307. i++;
  26308. }
  26309. if (i < count) {
  26310. var value = parseInt(String.fromCharCode(digit1, digit2), 16);
  26311. decrypted[j++] = value ^ (r >> 8);
  26312. r = ((value + r) * c1 + c2) & ((1 << 16) - 1);
  26313. }
  26314. }
  26315. return Array.prototype.slice.call(decrypted, discardNumber, j);
  26316. }
  26317. function isSpecial(c) {
  26318. return c === 0x2F || // '/'
  26319. c === 0x5B || c === 0x5D || // '[', ']'
  26320. c === 0x7B || c === 0x7D || // '{', '}'
  26321. c === 0x28 || c === 0x29; // '(', ')'
  26322. }
  26323. function Type1Parser(stream, encrypted) {
  26324. if (encrypted) {
  26325. var data = stream.getBytes();
  26326. var isBinary = !(isHexDigit(data[0]) && isHexDigit(data[1]) &&
  26327. isHexDigit(data[2]) && isHexDigit(data[3]));
  26328. stream = new Stream(isBinary ? decrypt(data, EEXEC_ENCRYPT_KEY, 4) :
  26329. decryptAscii(data, EEXEC_ENCRYPT_KEY, 4));
  26330. }
  26331. this.stream = stream;
  26332. this.nextChar();
  26333. }
  26334. Type1Parser.prototype = {
  26335. readNumberArray: function Type1Parser_readNumberArray() {
  26336. this.getToken(); // read '[' or '{' (arrays can start with either)
  26337. var array = [];
  26338. while (true) {
  26339. var token = this.getToken();
  26340. if (token === null || token === ']' || token === '}') {
  26341. break;
  26342. }
  26343. array.push(parseFloat(token || 0));
  26344. }
  26345. return array;
  26346. },
  26347. readNumber: function Type1Parser_readNumber() {
  26348. var token = this.getToken();
  26349. return parseFloat(token || 0);
  26350. },
  26351. readInt: function Type1Parser_readInt() {
  26352. // Use '| 0' to prevent setting a double into length such as the double
  26353. // does not flow into the loop variable.
  26354. var token = this.getToken();
  26355. return parseInt(token || 0, 10) | 0;
  26356. },
  26357. readBoolean: function Type1Parser_readBoolean() {
  26358. var token = this.getToken();
  26359. // Use 1 and 0 since that's what type2 charstrings use.
  26360. return token === 'true' ? 1 : 0;
  26361. },
  26362. nextChar : function Type1_nextChar() {
  26363. return (this.currentChar = this.stream.getByte());
  26364. },
  26365. getToken: function Type1Parser_getToken() {
  26366. // Eat whitespace and comments.
  26367. var comment = false;
  26368. var ch = this.currentChar;
  26369. while (true) {
  26370. if (ch === -1) {
  26371. return null;
  26372. }
  26373. if (comment) {
  26374. if (ch === 0x0A || ch === 0x0D) {
  26375. comment = false;
  26376. }
  26377. } else if (ch === 0x25) { // '%'
  26378. comment = true;
  26379. } else if (!Lexer.isSpace(ch)) {
  26380. break;
  26381. }
  26382. ch = this.nextChar();
  26383. }
  26384. if (isSpecial(ch)) {
  26385. this.nextChar();
  26386. return String.fromCharCode(ch);
  26387. }
  26388. var token = '';
  26389. do {
  26390. token += String.fromCharCode(ch);
  26391. ch = this.nextChar();
  26392. } while (ch >= 0 && !Lexer.isSpace(ch) && !isSpecial(ch));
  26393. return token;
  26394. },
  26395. /*
  26396. * Returns an object containing a Subrs array and a CharStrings
  26397. * array extracted from and eexec encrypted block of data
  26398. */
  26399. extractFontProgram: function Type1Parser_extractFontProgram() {
  26400. var stream = this.stream;
  26401. var subrs = [], charstrings = [];
  26402. var program = {
  26403. subrs: [],
  26404. charstrings: [],
  26405. properties: {
  26406. 'privateData': {
  26407. 'lenIV': 4
  26408. }
  26409. }
  26410. };
  26411. var token, length, data, lenIV, encoded;
  26412. while ((token = this.getToken()) !== null) {
  26413. if (token !== '/') {
  26414. continue;
  26415. }
  26416. token = this.getToken();
  26417. switch (token) {
  26418. case 'CharStrings':
  26419. // The number immediately following CharStrings must be greater or
  26420. // equal to the number of CharStrings.
  26421. this.getToken();
  26422. this.getToken(); // read in 'dict'
  26423. this.getToken(); // read in 'dup'
  26424. this.getToken(); // read in 'begin'
  26425. while(true) {
  26426. token = this.getToken();
  26427. if (token === null || token === 'end') {
  26428. break;
  26429. }
  26430. if (token !== '/') {
  26431. continue;
  26432. }
  26433. var glyph = this.getToken();
  26434. length = this.readInt();
  26435. this.getToken(); // read in 'RD' or '-|'
  26436. data = stream.makeSubStream(stream.pos, length);
  26437. lenIV = program.properties.privateData['lenIV'];
  26438. encoded = decrypt(data.getBytes(), CHAR_STRS_ENCRYPT_KEY, lenIV);
  26439. // Skip past the required space and binary data.
  26440. stream.skip(length);
  26441. this.nextChar();
  26442. token = this.getToken(); // read in 'ND' or '|-'
  26443. if (token === 'noaccess') {
  26444. this.getToken(); // read in 'def'
  26445. }
  26446. charstrings.push({
  26447. glyph: glyph,
  26448. encoded: encoded
  26449. });
  26450. }
  26451. break;
  26452. case 'Subrs':
  26453. var num = this.readInt();
  26454. this.getToken(); // read in 'array'
  26455. while ((token = this.getToken()) === 'dup') {
  26456. var index = this.readInt();
  26457. length = this.readInt();
  26458. this.getToken(); // read in 'RD' or '-|'
  26459. data = stream.makeSubStream(stream.pos, length);
  26460. lenIV = program.properties.privateData['lenIV'];
  26461. encoded = decrypt(data.getBytes(), CHAR_STRS_ENCRYPT_KEY, lenIV);
  26462. // Skip past the required space and binary data.
  26463. stream.skip(length);
  26464. this.nextChar();
  26465. token = this.getToken(); // read in 'NP' or '|'
  26466. if (token === 'noaccess') {
  26467. this.getToken(); // read in 'put'
  26468. }
  26469. subrs[index] = encoded;
  26470. }
  26471. break;
  26472. case 'BlueValues':
  26473. case 'OtherBlues':
  26474. case 'FamilyBlues':
  26475. case 'FamilyOtherBlues':
  26476. var blueArray = this.readNumberArray();
  26477. // *Blue* values may contain invalid data: disables reading of
  26478. // those values when hinting is disabled.
  26479. if (blueArray.length > 0 && (blueArray.length % 2) === 0 &&
  26480. HINTING_ENABLED) {
  26481. program.properties.privateData[token] = blueArray;
  26482. }
  26483. break;
  26484. case 'StemSnapH':
  26485. case 'StemSnapV':
  26486. program.properties.privateData[token] = this.readNumberArray();
  26487. break;
  26488. case 'StdHW':
  26489. case 'StdVW':
  26490. program.properties.privateData[token] =
  26491. this.readNumberArray()[0];
  26492. break;
  26493. case 'BlueShift':
  26494. case 'lenIV':
  26495. case 'BlueFuzz':
  26496. case 'BlueScale':
  26497. case 'LanguageGroup':
  26498. case 'ExpansionFactor':
  26499. program.properties.privateData[token] = this.readNumber();
  26500. break;
  26501. case 'ForceBold':
  26502. program.properties.privateData[token] = this.readBoolean();
  26503. break;
  26504. }
  26505. }
  26506. for (var i = 0; i < charstrings.length; i++) {
  26507. glyph = charstrings[i].glyph;
  26508. encoded = charstrings[i].encoded;
  26509. var charString = new Type1CharString();
  26510. var error = charString.convert(encoded, subrs);
  26511. var output = charString.output;
  26512. if (error) {
  26513. // It seems when FreeType encounters an error while evaluating a glyph
  26514. // that it completely ignores the glyph so we'll mimic that behaviour
  26515. // here and put an endchar to make the validator happy.
  26516. output = [14];
  26517. }
  26518. program.charstrings.push({
  26519. glyphName: glyph,
  26520. charstring: output,
  26521. width: charString.width,
  26522. lsb: charString.lsb,
  26523. seac: charString.seac
  26524. });
  26525. }
  26526. return program;
  26527. },
  26528. extractFontHeader: function Type1Parser_extractFontHeader(properties) {
  26529. var token;
  26530. while ((token = this.getToken()) !== null) {
  26531. if (token !== '/') {
  26532. continue;
  26533. }
  26534. token = this.getToken();
  26535. switch (token) {
  26536. case 'FontMatrix':
  26537. var matrix = this.readNumberArray();
  26538. properties.fontMatrix = matrix;
  26539. break;
  26540. case 'Encoding':
  26541. var encodingArg = this.getToken();
  26542. var encoding;
  26543. if (!/^\d+$/.test(encodingArg)) {
  26544. // encoding name is specified
  26545. encoding = Encodings[encodingArg];
  26546. } else {
  26547. encoding = [];
  26548. var size = parseInt(encodingArg, 10) | 0;
  26549. this.getToken(); // read in 'array'
  26550. for (var j = 0; j < size; j++) {
  26551. token = this.getToken();
  26552. // skipping till first dup or def (e.g. ignoring for statement)
  26553. while (token !== 'dup' && token !== 'def') {
  26554. token = this.getToken();
  26555. if (token === null) {
  26556. return; // invalid header
  26557. }
  26558. }
  26559. if (token === 'def') {
  26560. break; // read all array data
  26561. }
  26562. var index = this.readInt();
  26563. this.getToken(); // read in '/'
  26564. var glyph = this.getToken();
  26565. encoding[index] = glyph;
  26566. this.getToken(); // read the in 'put'
  26567. }
  26568. }
  26569. properties.builtInEncoding = encoding;
  26570. break;
  26571. case 'FontBBox':
  26572. var fontBBox = this.readNumberArray();
  26573. // adjusting ascent/descent
  26574. properties.ascent = fontBBox[3];
  26575. properties.descent = fontBBox[1];
  26576. properties.ascentScaled = true;
  26577. break;
  26578. }
  26579. }
  26580. }
  26581. };
  26582. return Type1Parser;
  26583. })();
  26584. /**
  26585. * The CFF class takes a Type1 file and wrap it into a
  26586. * 'Compact Font Format' which itself embed Type2 charstrings.
  26587. */
  26588. var CFFStandardStrings = [
  26589. '.notdef', 'space', 'exclam', 'quotedbl', 'numbersign', 'dollar', 'percent',
  26590. 'ampersand', 'quoteright', 'parenleft', 'parenright', 'asterisk', 'plus',
  26591. 'comma', 'hyphen', 'period', 'slash', 'zero', 'one', 'two', 'three', 'four',
  26592. 'five', 'six', 'seven', 'eight', 'nine', 'colon', 'semicolon', 'less',
  26593. 'equal', 'greater', 'question', 'at', 'A', 'B', 'C', 'D', 'E', 'F', 'G', 'H',
  26594. 'I', 'J', 'K', 'L', 'M', 'N', 'O', 'P', 'Q', 'R', 'S', 'T', 'U', 'V', 'W',
  26595. 'X', 'Y', 'Z', 'bracketleft', 'backslash', 'bracketright', 'asciicircum',
  26596. 'underscore', 'quoteleft', 'a', 'b', 'c', 'd', 'e', 'f', 'g', 'h', 'i', 'j',
  26597. 'k', 'l', 'm', 'n', 'o', 'p', 'q', 'r', 's', 't', 'u', 'v', 'w', 'x', 'y',
  26598. 'z', 'braceleft', 'bar', 'braceright', 'asciitilde', 'exclamdown', 'cent',
  26599. 'sterling', 'fraction', 'yen', 'florin', 'section', 'currency',
  26600. 'quotesingle', 'quotedblleft', 'guillemotleft', 'guilsinglleft',
  26601. 'guilsinglright', 'fi', 'fl', 'endash', 'dagger', 'daggerdbl',
  26602. 'periodcentered', 'paragraph', 'bullet', 'quotesinglbase', 'quotedblbase',
  26603. 'quotedblright', 'guillemotright', 'ellipsis', 'perthousand', 'questiondown',
  26604. 'grave', 'acute', 'circumflex', 'tilde', 'macron', 'breve', 'dotaccent',
  26605. 'dieresis', 'ring', 'cedilla', 'hungarumlaut', 'ogonek', 'caron', 'emdash',
  26606. 'AE', 'ordfeminine', 'Lslash', 'Oslash', 'OE', 'ordmasculine', 'ae',
  26607. 'dotlessi', 'lslash', 'oslash', 'oe', 'germandbls', 'onesuperior',
  26608. 'logicalnot', 'mu', 'trademark', 'Eth', 'onehalf', 'plusminus', 'Thorn',
  26609. 'onequarter', 'divide', 'brokenbar', 'degree', 'thorn', 'threequarters',
  26610. 'twosuperior', 'registered', 'minus', 'eth', 'multiply', 'threesuperior',
  26611. 'copyright', 'Aacute', 'Acircumflex', 'Adieresis', 'Agrave', 'Aring',
  26612. 'Atilde', 'Ccedilla', 'Eacute', 'Ecircumflex', 'Edieresis', 'Egrave',
  26613. 'Iacute', 'Icircumflex', 'Idieresis', 'Igrave', 'Ntilde', 'Oacute',
  26614. 'Ocircumflex', 'Odieresis', 'Ograve', 'Otilde', 'Scaron', 'Uacute',
  26615. 'Ucircumflex', 'Udieresis', 'Ugrave', 'Yacute', 'Ydieresis', 'Zcaron',
  26616. 'aacute', 'acircumflex', 'adieresis', 'agrave', 'aring', 'atilde',
  26617. 'ccedilla', 'eacute', 'ecircumflex', 'edieresis', 'egrave', 'iacute',
  26618. 'icircumflex', 'idieresis', 'igrave', 'ntilde', 'oacute', 'ocircumflex',
  26619. 'odieresis', 'ograve', 'otilde', 'scaron', 'uacute', 'ucircumflex',
  26620. 'udieresis', 'ugrave', 'yacute', 'ydieresis', 'zcaron', 'exclamsmall',
  26621. 'Hungarumlautsmall', 'dollaroldstyle', 'dollarsuperior', 'ampersandsmall',
  26622. 'Acutesmall', 'parenleftsuperior', 'parenrightsuperior', 'twodotenleader',
  26623. 'onedotenleader', 'zerooldstyle', 'oneoldstyle', 'twooldstyle',
  26624. 'threeoldstyle', 'fouroldstyle', 'fiveoldstyle', 'sixoldstyle',
  26625. 'sevenoldstyle', 'eightoldstyle', 'nineoldstyle', 'commasuperior',
  26626. 'threequartersemdash', 'periodsuperior', 'questionsmall', 'asuperior',
  26627. 'bsuperior', 'centsuperior', 'dsuperior', 'esuperior', 'isuperior',
  26628. 'lsuperior', 'msuperior', 'nsuperior', 'osuperior', 'rsuperior', 'ssuperior',
  26629. 'tsuperior', 'ff', 'ffi', 'ffl', 'parenleftinferior', 'parenrightinferior',
  26630. 'Circumflexsmall', 'hyphensuperior', 'Gravesmall', 'Asmall', 'Bsmall',
  26631. 'Csmall', 'Dsmall', 'Esmall', 'Fsmall', 'Gsmall', 'Hsmall', 'Ismall',
  26632. 'Jsmall', 'Ksmall', 'Lsmall', 'Msmall', 'Nsmall', 'Osmall', 'Psmall',
  26633. 'Qsmall', 'Rsmall', 'Ssmall', 'Tsmall', 'Usmall', 'Vsmall', 'Wsmall',
  26634. 'Xsmall', 'Ysmall', 'Zsmall', 'colonmonetary', 'onefitted', 'rupiah',
  26635. 'Tildesmall', 'exclamdownsmall', 'centoldstyle', 'Lslashsmall',
  26636. 'Scaronsmall', 'Zcaronsmall', 'Dieresissmall', 'Brevesmall', 'Caronsmall',
  26637. 'Dotaccentsmall', 'Macronsmall', 'figuredash', 'hypheninferior',
  26638. 'Ogoneksmall', 'Ringsmall', 'Cedillasmall', 'questiondownsmall', 'oneeighth',
  26639. 'threeeighths', 'fiveeighths', 'seveneighths', 'onethird', 'twothirds',
  26640. 'zerosuperior', 'foursuperior', 'fivesuperior', 'sixsuperior',
  26641. 'sevensuperior', 'eightsuperior', 'ninesuperior', 'zeroinferior',
  26642. 'oneinferior', 'twoinferior', 'threeinferior', 'fourinferior',
  26643. 'fiveinferior', 'sixinferior', 'seveninferior', 'eightinferior',
  26644. 'nineinferior', 'centinferior', 'dollarinferior', 'periodinferior',
  26645. 'commainferior', 'Agravesmall', 'Aacutesmall', 'Acircumflexsmall',
  26646. 'Atildesmall', 'Adieresissmall', 'Aringsmall', 'AEsmall', 'Ccedillasmall',
  26647. 'Egravesmall', 'Eacutesmall', 'Ecircumflexsmall', 'Edieresissmall',
  26648. 'Igravesmall', 'Iacutesmall', 'Icircumflexsmall', 'Idieresissmall',
  26649. 'Ethsmall', 'Ntildesmall', 'Ogravesmall', 'Oacutesmall', 'Ocircumflexsmall',
  26650. 'Otildesmall', 'Odieresissmall', 'OEsmall', 'Oslashsmall', 'Ugravesmall',
  26651. 'Uacutesmall', 'Ucircumflexsmall', 'Udieresissmall', 'Yacutesmall',
  26652. 'Thornsmall', 'Ydieresissmall', '001.000', '001.001', '001.002', '001.003',
  26653. 'Black', 'Bold', 'Book', 'Light', 'Medium', 'Regular', 'Roman', 'Semibold'
  26654. ];
  26655. // Type1Font is also a CIDFontType0.
  26656. var Type1Font = function Type1Font(name, file, properties) {
  26657. // Some bad generators embed pfb file as is, we have to strip 6-byte headers.
  26658. // Also, length1 and length2 might be off by 6 bytes as well.
  26659. // http://www.math.ubc.ca/~cass/piscript/type1.pdf
  26660. var PFB_HEADER_SIZE = 6;
  26661. var headerBlockLength = properties.length1;
  26662. var eexecBlockLength = properties.length2;
  26663. var pfbHeader = file.peekBytes(PFB_HEADER_SIZE);
  26664. var pfbHeaderPresent = pfbHeader[0] == 0x80 && pfbHeader[1] == 0x01;
  26665. if (pfbHeaderPresent) {
  26666. file.skip(PFB_HEADER_SIZE);
  26667. headerBlockLength = (pfbHeader[5] << 24) | (pfbHeader[4] << 16) |
  26668. (pfbHeader[3] << 8) | pfbHeader[2];
  26669. }
  26670. // Get the data block containing glyphs and subrs informations
  26671. var headerBlock = new Stream(file.getBytes(headerBlockLength));
  26672. var headerBlockParser = new Type1Parser(headerBlock);
  26673. headerBlockParser.extractFontHeader(properties);
  26674. if (pfbHeaderPresent) {
  26675. pfbHeader = file.getBytes(PFB_HEADER_SIZE);
  26676. eexecBlockLength = (pfbHeader[5] << 24) | (pfbHeader[4] << 16) |
  26677. (pfbHeader[3] << 8) | pfbHeader[2];
  26678. }
  26679. // Decrypt the data blocks and retrieve it's content
  26680. var eexecBlock = new Stream(file.getBytes(eexecBlockLength));
  26681. var eexecBlockParser = new Type1Parser(eexecBlock, true);
  26682. var data = eexecBlockParser.extractFontProgram();
  26683. for (var info in data.properties) {
  26684. properties[info] = data.properties[info];
  26685. }
  26686. var charstrings = data.charstrings;
  26687. var type2Charstrings = this.getType2Charstrings(charstrings);
  26688. var subrs = this.getType2Subrs(data.subrs);
  26689. this.charstrings = charstrings;
  26690. this.data = this.wrap(name, type2Charstrings, this.charstrings,
  26691. subrs, properties);
  26692. this.seacs = this.getSeacs(data.charstrings);
  26693. };
  26694. Type1Font.prototype = {
  26695. get numGlyphs() {
  26696. return this.charstrings.length + 1;
  26697. },
  26698. getCharset: function Type1Font_getCharset() {
  26699. var charset = ['.notdef'];
  26700. var charstrings = this.charstrings;
  26701. for (var glyphId = 0; glyphId < charstrings.length; glyphId++) {
  26702. charset.push(charstrings[glyphId].glyphName);
  26703. }
  26704. return charset;
  26705. },
  26706. getGlyphMapping: function Type1Font_getGlyphMapping(properties) {
  26707. var charstrings = this.charstrings;
  26708. var glyphNames = ['.notdef'], glyphId;
  26709. for (glyphId = 0; glyphId < charstrings.length; glyphId++) {
  26710. glyphNames.push(charstrings[glyphId].glyphName);
  26711. }
  26712. var encoding = properties.builtInEncoding;
  26713. if (encoding) {
  26714. var builtInEncoding = {};
  26715. for (var charCode in encoding) {
  26716. glyphId = glyphNames.indexOf(encoding[charCode]);
  26717. if (glyphId >= 0) {
  26718. builtInEncoding[charCode] = glyphId;
  26719. }
  26720. }
  26721. }
  26722. return type1FontGlyphMapping(properties, builtInEncoding, glyphNames);
  26723. },
  26724. getSeacs: function Type1Font_getSeacs(charstrings) {
  26725. var i, ii;
  26726. var seacMap = [];
  26727. for (i = 0, ii = charstrings.length; i < ii; i++) {
  26728. var charstring = charstrings[i];
  26729. if (charstring.seac) {
  26730. // Offset by 1 for .notdef
  26731. seacMap[i + 1] = charstring.seac;
  26732. }
  26733. }
  26734. return seacMap;
  26735. },
  26736. getType2Charstrings: function Type1Font_getType2Charstrings(
  26737. type1Charstrings) {
  26738. var type2Charstrings = [];
  26739. for (var i = 0, ii = type1Charstrings.length; i < ii; i++) {
  26740. type2Charstrings.push(type1Charstrings[i].charstring);
  26741. }
  26742. return type2Charstrings;
  26743. },
  26744. getType2Subrs: function Type1Font_getType2Subrs(type1Subrs) {
  26745. var bias = 0;
  26746. var count = type1Subrs.length;
  26747. if (count < 1133) {
  26748. bias = 107;
  26749. } else if (count < 33769) {
  26750. bias = 1131;
  26751. } else {
  26752. bias = 32768;
  26753. }
  26754. // Add a bunch of empty subrs to deal with the Type2 bias
  26755. var type2Subrs = [];
  26756. var i;
  26757. for (i = 0; i < bias; i++) {
  26758. type2Subrs.push([0x0B]);
  26759. }
  26760. for (i = 0; i < count; i++) {
  26761. type2Subrs.push(type1Subrs[i]);
  26762. }
  26763. return type2Subrs;
  26764. },
  26765. wrap: function Type1Font_wrap(name, glyphs, charstrings, subrs, properties) {
  26766. var cff = new CFF();
  26767. cff.header = new CFFHeader(1, 0, 4, 4);
  26768. cff.names = [name];
  26769. var topDict = new CFFTopDict();
  26770. // CFF strings IDs 0...390 are predefined names, so refering
  26771. // to entries in our own String INDEX starts at SID 391.
  26772. topDict.setByName('version', 391);
  26773. topDict.setByName('Notice', 392);
  26774. topDict.setByName('FullName', 393);
  26775. topDict.setByName('FamilyName', 394);
  26776. topDict.setByName('Weight', 395);
  26777. topDict.setByName('Encoding', null); // placeholder
  26778. topDict.setByName('FontMatrix', properties.fontMatrix);
  26779. topDict.setByName('FontBBox', properties.bbox);
  26780. topDict.setByName('charset', null); // placeholder
  26781. topDict.setByName('CharStrings', null); // placeholder
  26782. topDict.setByName('Private', null); // placeholder
  26783. cff.topDict = topDict;
  26784. var strings = new CFFStrings();
  26785. strings.add('Version 0.11'); // Version
  26786. strings.add('See original notice'); // Notice
  26787. strings.add(name); // FullName
  26788. strings.add(name); // FamilyName
  26789. strings.add('Medium'); // Weight
  26790. cff.strings = strings;
  26791. cff.globalSubrIndex = new CFFIndex();
  26792. var count = glyphs.length;
  26793. var charsetArray = [0];
  26794. var i, ii;
  26795. for (i = 0; i < count; i++) {
  26796. var index = CFFStandardStrings.indexOf(charstrings[i].glyphName);
  26797. // TODO: Insert the string and correctly map it. Previously it was
  26798. // thought mapping names that aren't in the standard strings to .notdef
  26799. // was fine, however in issue818 when mapping them all to .notdef the
  26800. // adieresis glyph no longer worked.
  26801. if (index == -1) {
  26802. index = 0;
  26803. }
  26804. charsetArray.push((index >> 8) & 0xff, index & 0xff);
  26805. }
  26806. cff.charset = new CFFCharset(false, 0, [], charsetArray);
  26807. var charStringsIndex = new CFFIndex();
  26808. charStringsIndex.add([0x8B, 0x0E]); // .notdef
  26809. for (i = 0; i < count; i++) {
  26810. charStringsIndex.add(glyphs[i]);
  26811. }
  26812. cff.charStrings = charStringsIndex;
  26813. var privateDict = new CFFPrivateDict();
  26814. privateDict.setByName('Subrs', null); // placeholder
  26815. var fields = [
  26816. 'BlueValues',
  26817. 'OtherBlues',
  26818. 'FamilyBlues',
  26819. 'FamilyOtherBlues',
  26820. 'StemSnapH',
  26821. 'StemSnapV',
  26822. 'BlueShift',
  26823. 'BlueFuzz',
  26824. 'BlueScale',
  26825. 'LanguageGroup',
  26826. 'ExpansionFactor',
  26827. 'ForceBold',
  26828. 'StdHW',
  26829. 'StdVW'
  26830. ];
  26831. for (i = 0, ii = fields.length; i < ii; i++) {
  26832. var field = fields[i];
  26833. if (!properties.privateData.hasOwnProperty(field)) {
  26834. continue;
  26835. }
  26836. var value = properties.privateData[field];
  26837. if (isArray(value)) {
  26838. // All of the private dictionary array data in CFF must be stored as
  26839. // "delta-encoded" numbers.
  26840. for (var j = value.length - 1; j > 0; j--) {
  26841. value[j] -= value[j - 1]; // ... difference from previous value
  26842. }
  26843. }
  26844. privateDict.setByName(field, value);
  26845. }
  26846. cff.topDict.privateDict = privateDict;
  26847. var subrIndex = new CFFIndex();
  26848. for (i = 0, ii = subrs.length; i < ii; i++) {
  26849. subrIndex.add(subrs[i]);
  26850. }
  26851. privateDict.subrsIndex = subrIndex;
  26852. var compiler = new CFFCompiler(cff);
  26853. return compiler.compile();
  26854. }
  26855. };
  26856. var CFFFont = (function CFFFontClosure() {
  26857. function CFFFont(file, properties) {
  26858. this.properties = properties;
  26859. var parser = new CFFParser(file, properties);
  26860. this.cff = parser.parse();
  26861. var compiler = new CFFCompiler(this.cff);
  26862. this.seacs = this.cff.seacs;
  26863. try {
  26864. this.data = compiler.compile();
  26865. } catch (e) {
  26866. warn('Failed to compile font ' + properties.loadedName);
  26867. // There may have just been an issue with the compiler, set the data
  26868. // anyway and hope the font loaded.
  26869. this.data = file;
  26870. }
  26871. }
  26872. CFFFont.prototype = {
  26873. get numGlyphs() {
  26874. return this.cff.charStrings.count;
  26875. },
  26876. getCharset: function CFFFont_getCharset() {
  26877. return this.cff.charset.charset;
  26878. },
  26879. getGlyphMapping: function CFFFont_getGlyphMapping() {
  26880. var cff = this.cff;
  26881. var properties = this.properties;
  26882. var charsets = cff.charset.charset;
  26883. var charCodeToGlyphId;
  26884. var glyphId;
  26885. if (properties.composite) {
  26886. charCodeToGlyphId = Object.create(null);
  26887. if (cff.isCIDFont) {
  26888. // If the font is actually a CID font then we should use the charset
  26889. // to map CIDs to GIDs.
  26890. for (glyphId = 0; glyphId < charsets.length; glyphId++) {
  26891. var cidString = String.fromCharCode(charsets[glyphId]);
  26892. var charCode = properties.cMap.map.indexOf(cidString);
  26893. charCodeToGlyphId[charCode] = glyphId;
  26894. }
  26895. } else {
  26896. // If it is NOT actually a CID font then CIDs should be mapped
  26897. // directly to GIDs.
  26898. for (glyphId = 0; glyphId < cff.charStrings.count; glyphId++) {
  26899. charCodeToGlyphId[glyphId] = glyphId;
  26900. }
  26901. }
  26902. return charCodeToGlyphId;
  26903. }
  26904. var encoding = cff.encoding ? cff.encoding.encoding : null;
  26905. charCodeToGlyphId = type1FontGlyphMapping(properties, encoding, charsets);
  26906. return charCodeToGlyphId;
  26907. }
  26908. };
  26909. return CFFFont;
  26910. })();
  26911. var CFFParser = (function CFFParserClosure() {
  26912. var CharstringValidationData = [
  26913. null,
  26914. { id: 'hstem', min: 2, resetStack: true, stem: true },
  26915. null,
  26916. { id: 'vstem', min: 2, resetStack: true, stem: true },
  26917. { id: 'vmoveto', min: 1, resetStack: true },
  26918. { id: 'rlineto', min: 2, resetStack: true },
  26919. { id: 'hlineto', min: 1, resetStack: true },
  26920. { id: 'vlineto', min: 1, resetStack: true },
  26921. { id: 'rrcurveto', min: 6, resetStack: true },
  26922. null,
  26923. { id: 'callsubr', min: 1, undefStack: true },
  26924. { id: 'return', min: 0, undefStack: true },
  26925. null, // 12
  26926. null,
  26927. null, // endchar
  26928. null,
  26929. null,
  26930. null,
  26931. { id: 'hstemhm', min: 2, resetStack: true, stem: true },
  26932. null, // hintmask
  26933. null, // cntrmask
  26934. { id: 'rmoveto', min: 2, resetStack: true },
  26935. { id: 'hmoveto', min: 1, resetStack: true },
  26936. { id: 'vstemhm', min: 2, resetStack: true, stem: true },
  26937. { id: 'rcurveline', min: 8, resetStack: true },
  26938. { id: 'rlinecurve', min: 8, resetStack: true },
  26939. { id: 'vvcurveto', min: 4, resetStack: true },
  26940. { id: 'hhcurveto', min: 4, resetStack: true },
  26941. null, // shortint
  26942. { id: 'callgsubr', min: 1, undefStack: true },
  26943. { id: 'vhcurveto', min: 4, resetStack: true },
  26944. { id: 'hvcurveto', min: 4, resetStack: true }
  26945. ];
  26946. var CharstringValidationData12 = [
  26947. null,
  26948. null,
  26949. null,
  26950. { id: 'and', min: 2, stackDelta: -1 },
  26951. { id: 'or', min: 2, stackDelta: -1 },
  26952. { id: 'not', min: 1, stackDelta: 0 },
  26953. null,
  26954. null,
  26955. null,
  26956. { id: 'abs', min: 1, stackDelta: 0 },
  26957. { id: 'add', min: 2, stackDelta: -1,
  26958. stackFn: function stack_div(stack, index) {
  26959. stack[index - 2] = stack[index - 2] + stack[index - 1];
  26960. }
  26961. },
  26962. { id: 'sub', min: 2, stackDelta: -1,
  26963. stackFn: function stack_div(stack, index) {
  26964. stack[index - 2] = stack[index - 2] - stack[index - 1];
  26965. }
  26966. },
  26967. { id: 'div', min: 2, stackDelta: -1,
  26968. stackFn: function stack_div(stack, index) {
  26969. stack[index - 2] = stack[index - 2] / stack[index - 1];
  26970. }
  26971. },
  26972. null,
  26973. { id: 'neg', min: 1, stackDelta: 0,
  26974. stackFn: function stack_div(stack, index) {
  26975. stack[index - 1] = -stack[index - 1];
  26976. }
  26977. },
  26978. { id: 'eq', min: 2, stackDelta: -1 },
  26979. null,
  26980. null,
  26981. { id: 'drop', min: 1, stackDelta: -1 },
  26982. null,
  26983. { id: 'put', min: 2, stackDelta: -2 },
  26984. { id: 'get', min: 1, stackDelta: 0 },
  26985. { id: 'ifelse', min: 4, stackDelta: -3 },
  26986. { id: 'random', min: 0, stackDelta: 1 },
  26987. { id: 'mul', min: 2, stackDelta: -1,
  26988. stackFn: function stack_div(stack, index) {
  26989. stack[index - 2] = stack[index - 2] * stack[index - 1];
  26990. }
  26991. },
  26992. null,
  26993. { id: 'sqrt', min: 1, stackDelta: 0 },
  26994. { id: 'dup', min: 1, stackDelta: 1 },
  26995. { id: 'exch', min: 2, stackDelta: 0 },
  26996. { id: 'index', min: 2, stackDelta: 0 },
  26997. { id: 'roll', min: 3, stackDelta: -2 },
  26998. null,
  26999. null,
  27000. null,
  27001. { id: 'hflex', min: 7, resetStack: true },
  27002. { id: 'flex', min: 13, resetStack: true },
  27003. { id: 'hflex1', min: 9, resetStack: true },
  27004. { id: 'flex1', min: 11, resetStack: true }
  27005. ];
  27006. function CFFParser(file, properties) {
  27007. this.bytes = file.getBytes();
  27008. this.properties = properties;
  27009. }
  27010. CFFParser.prototype = {
  27011. parse: function CFFParser_parse() {
  27012. var properties = this.properties;
  27013. var cff = new CFF();
  27014. this.cff = cff;
  27015. // The first five sections must be in order, all the others are reached
  27016. // via offsets contained in one of the below.
  27017. var header = this.parseHeader();
  27018. var nameIndex = this.parseIndex(header.endPos);
  27019. var topDictIndex = this.parseIndex(nameIndex.endPos);
  27020. var stringIndex = this.parseIndex(topDictIndex.endPos);
  27021. var globalSubrIndex = this.parseIndex(stringIndex.endPos);
  27022. var topDictParsed = this.parseDict(topDictIndex.obj.get(0));
  27023. var topDict = this.createDict(CFFTopDict, topDictParsed, cff.strings);
  27024. cff.header = header.obj;
  27025. cff.names = this.parseNameIndex(nameIndex.obj);
  27026. cff.strings = this.parseStringIndex(stringIndex.obj);
  27027. cff.topDict = topDict;
  27028. cff.globalSubrIndex = globalSubrIndex.obj;
  27029. this.parsePrivateDict(cff.topDict);
  27030. cff.isCIDFont = topDict.hasName('ROS');
  27031. var charStringOffset = topDict.getByName('CharStrings');
  27032. var charStringsAndSeacs = this.parseCharStrings(charStringOffset);
  27033. cff.charStrings = charStringsAndSeacs.charStrings;
  27034. cff.seacs = charStringsAndSeacs.seacs;
  27035. var fontMatrix = topDict.getByName('FontMatrix');
  27036. if (fontMatrix) {
  27037. properties.fontMatrix = fontMatrix;
  27038. }
  27039. var fontBBox = topDict.getByName('FontBBox');
  27040. if (fontBBox) {
  27041. // adjusting ascent/descent
  27042. properties.ascent = fontBBox[3];
  27043. properties.descent = fontBBox[1];
  27044. properties.ascentScaled = true;
  27045. }
  27046. var charset, encoding;
  27047. if (cff.isCIDFont) {
  27048. var fdArrayIndex = this.parseIndex(topDict.getByName('FDArray')).obj;
  27049. for (var i = 0, ii = fdArrayIndex.count; i < ii; ++i) {
  27050. var dictRaw = fdArrayIndex.get(i);
  27051. var fontDict = this.createDict(CFFTopDict, this.parseDict(dictRaw),
  27052. cff.strings);
  27053. this.parsePrivateDict(fontDict);
  27054. cff.fdArray.push(fontDict);
  27055. }
  27056. // cid fonts don't have an encoding
  27057. encoding = null;
  27058. charset = this.parseCharsets(topDict.getByName('charset'),
  27059. cff.charStrings.count, cff.strings, true);
  27060. cff.fdSelect = this.parseFDSelect(topDict.getByName('FDSelect'),
  27061. cff.charStrings.count);
  27062. } else {
  27063. charset = this.parseCharsets(topDict.getByName('charset'),
  27064. cff.charStrings.count, cff.strings, false);
  27065. encoding = this.parseEncoding(topDict.getByName('Encoding'),
  27066. properties,
  27067. cff.strings, charset.charset);
  27068. }
  27069. cff.charset = charset;
  27070. cff.encoding = encoding;
  27071. return cff;
  27072. },
  27073. parseHeader: function CFFParser_parseHeader() {
  27074. var bytes = this.bytes;
  27075. var bytesLength = bytes.length;
  27076. var offset = 0;
  27077. // Prevent an infinite loop, by checking that the offset is within the
  27078. // bounds of the bytes array. Necessary in empty, or invalid, font files.
  27079. while (offset < bytesLength && bytes[offset] !== 1) {
  27080. ++offset;
  27081. }
  27082. if (offset >= bytesLength) {
  27083. error('Invalid CFF header');
  27084. } else if (offset !== 0) {
  27085. info('cff data is shifted');
  27086. bytes = bytes.subarray(offset);
  27087. this.bytes = bytes;
  27088. }
  27089. var major = bytes[0];
  27090. var minor = bytes[1];
  27091. var hdrSize = bytes[2];
  27092. var offSize = bytes[3];
  27093. var header = new CFFHeader(major, minor, hdrSize, offSize);
  27094. return { obj: header, endPos: hdrSize };
  27095. },
  27096. parseDict: function CFFParser_parseDict(dict) {
  27097. var pos = 0;
  27098. function parseOperand() {
  27099. var value = dict[pos++];
  27100. if (value === 30) {
  27101. return parseFloatOperand(pos);
  27102. } else if (value === 28) {
  27103. value = dict[pos++];
  27104. value = ((value << 24) | (dict[pos++] << 16)) >> 16;
  27105. return value;
  27106. } else if (value === 29) {
  27107. value = dict[pos++];
  27108. value = (value << 8) | dict[pos++];
  27109. value = (value << 8) | dict[pos++];
  27110. value = (value << 8) | dict[pos++];
  27111. return value;
  27112. } else if (value >= 32 && value <= 246) {
  27113. return value - 139;
  27114. } else if (value >= 247 && value <= 250) {
  27115. return ((value - 247) * 256) + dict[pos++] + 108;
  27116. } else if (value >= 251 && value <= 254) {
  27117. return -((value - 251) * 256) - dict[pos++] - 108;
  27118. } else {
  27119. error('255 is not a valid DICT command');
  27120. }
  27121. return -1;
  27122. }
  27123. function parseFloatOperand() {
  27124. var str = '';
  27125. var eof = 15;
  27126. var lookup = ['0', '1', '2', '3', '4', '5', '6', '7', '8',
  27127. '9', '.', 'E', 'E-', null, '-'];
  27128. var length = dict.length;
  27129. while (pos < length) {
  27130. var b = dict[pos++];
  27131. var b1 = b >> 4;
  27132. var b2 = b & 15;
  27133. if (b1 == eof) {
  27134. break;
  27135. }
  27136. str += lookup[b1];
  27137. if (b2 == eof) {
  27138. break;
  27139. }
  27140. str += lookup[b2];
  27141. }
  27142. return parseFloat(str);
  27143. }
  27144. var operands = [];
  27145. var entries = [];
  27146. pos = 0;
  27147. var end = dict.length;
  27148. while (pos < end) {
  27149. var b = dict[pos];
  27150. if (b <= 21) {
  27151. if (b === 12) {
  27152. b = (b << 8) | dict[++pos];
  27153. }
  27154. entries.push([b, operands]);
  27155. operands = [];
  27156. ++pos;
  27157. } else {
  27158. operands.push(parseOperand());
  27159. }
  27160. }
  27161. return entries;
  27162. },
  27163. parseIndex: function CFFParser_parseIndex(pos) {
  27164. var cffIndex = new CFFIndex();
  27165. var bytes = this.bytes;
  27166. var count = (bytes[pos++] << 8) | bytes[pos++];
  27167. var offsets = [];
  27168. var end = pos;
  27169. var i, ii;
  27170. if (count !== 0) {
  27171. var offsetSize = bytes[pos++];
  27172. // add 1 for offset to determine size of last object
  27173. var startPos = pos + ((count + 1) * offsetSize) - 1;
  27174. for (i = 0, ii = count + 1; i < ii; ++i) {
  27175. var offset = 0;
  27176. for (var j = 0; j < offsetSize; ++j) {
  27177. offset <<= 8;
  27178. offset += bytes[pos++];
  27179. }
  27180. offsets.push(startPos + offset);
  27181. }
  27182. end = offsets[count];
  27183. }
  27184. for (i = 0, ii = offsets.length - 1; i < ii; ++i) {
  27185. var offsetStart = offsets[i];
  27186. var offsetEnd = offsets[i + 1];
  27187. cffIndex.add(bytes.subarray(offsetStart, offsetEnd));
  27188. }
  27189. return {obj: cffIndex, endPos: end};
  27190. },
  27191. parseNameIndex: function CFFParser_parseNameIndex(index) {
  27192. var names = [];
  27193. for (var i = 0, ii = index.count; i < ii; ++i) {
  27194. var name = index.get(i);
  27195. // OTS doesn't allow names to be over 127 characters.
  27196. var length = Math.min(name.length, 127);
  27197. var data = [];
  27198. // OTS also only permits certain characters in the name.
  27199. for (var j = 0; j < length; ++j) {
  27200. var c = name[j];
  27201. if (j === 0 && c === 0) {
  27202. data[j] = c;
  27203. continue;
  27204. }
  27205. if ((c < 33 || c > 126) || c === 91 /* [ */ || c === 93 /* ] */ ||
  27206. c === 40 /* ( */ || c === 41 /* ) */ || c === 123 /* { */ ||
  27207. c === 125 /* } */ || c === 60 /* < */ || c === 62 /* > */ ||
  27208. c === 47 /* / */ || c === 37 /* % */ || c === 35 /* # */) {
  27209. data[j] = 95;
  27210. continue;
  27211. }
  27212. data[j] = c;
  27213. }
  27214. names.push(bytesToString(data));
  27215. }
  27216. return names;
  27217. },
  27218. parseStringIndex: function CFFParser_parseStringIndex(index) {
  27219. var strings = new CFFStrings();
  27220. for (var i = 0, ii = index.count; i < ii; ++i) {
  27221. var data = index.get(i);
  27222. strings.add(bytesToString(data));
  27223. }
  27224. return strings;
  27225. },
  27226. createDict: function CFFParser_createDict(Type, dict, strings) {
  27227. var cffDict = new Type(strings);
  27228. for (var i = 0, ii = dict.length; i < ii; ++i) {
  27229. var pair = dict[i];
  27230. var key = pair[0];
  27231. var value = pair[1];
  27232. cffDict.setByKey(key, value);
  27233. }
  27234. return cffDict;
  27235. },
  27236. parseCharStrings: function CFFParser_parseCharStrings(charStringOffset) {
  27237. var charStrings = this.parseIndex(charStringOffset).obj;
  27238. var seacs = [];
  27239. var count = charStrings.count;
  27240. for (var i = 0; i < count; i++) {
  27241. var charstring = charStrings.get(i);
  27242. var stackSize = 0;
  27243. var stack = [];
  27244. var undefStack = true;
  27245. var hints = 0;
  27246. var valid = true;
  27247. var data = charstring;
  27248. var length = data.length;
  27249. for (var j = 0; j < length;) {
  27250. var value = data[j++];
  27251. var validationCommand = null;
  27252. if (value == 12) {
  27253. var q = data[j++];
  27254. if (q === 0) {
  27255. // The CFF specification state that the 'dotsection' command
  27256. // (12, 0) is deprecated and treated as a no-op, but all Type2
  27257. // charstrings processors should support them. Unfortunately
  27258. // the font sanitizer don't. As a workaround the sequence (12, 0)
  27259. // is replaced by a useless (0, hmoveto).
  27260. data[j - 2] = 139;
  27261. data[j - 1] = 22;
  27262. stackSize = 0;
  27263. } else {
  27264. validationCommand = CharstringValidationData12[q];
  27265. }
  27266. } else if (value === 28) { // number (16 bit)
  27267. stack[stackSize] = ((data[j] << 24) | (data[j + 1] << 16)) >> 16;
  27268. j += 2;
  27269. stackSize++;
  27270. } else if (value == 14) {
  27271. if (stackSize >= 4) {
  27272. stackSize -= 4;
  27273. if (SEAC_ANALYSIS_ENABLED) {
  27274. seacs[i] = stack.slice(stackSize, stackSize + 4);
  27275. valid = false;
  27276. }
  27277. }
  27278. } else if (value >= 32 && value <= 246) { // number
  27279. stack[stackSize] = value - 139;
  27280. stackSize++;
  27281. } else if (value >= 247 && value <= 254) { // number (+1 bytes)
  27282. stack[stackSize] = (value < 251 ?
  27283. ((value - 247) << 8) + data[j] + 108 :
  27284. -((value - 251) << 8) - data[j] - 108);
  27285. j++;
  27286. stackSize++;
  27287. } else if (value == 255) { // number (32 bit)
  27288. stack[stackSize] = ((data[j] << 24) | (data[j + 1] << 16) |
  27289. (data[j + 2] << 8) | data[j + 3]) / 65536;
  27290. j += 4;
  27291. stackSize++;
  27292. } else if (value == 19 || value == 20) {
  27293. hints += stackSize >> 1;
  27294. j += (hints + 7) >> 3; // skipping right amount of hints flag data
  27295. stackSize = 0;
  27296. } else {
  27297. validationCommand = CharstringValidationData[value];
  27298. }
  27299. if (validationCommand) {
  27300. if (validationCommand.stem) {
  27301. hints += stackSize >> 1;
  27302. }
  27303. if ('min' in validationCommand) {
  27304. if (!undefStack && stackSize < validationCommand.min) {
  27305. warn('Not enough parameters for ' + validationCommand.id +
  27306. '; actual: ' + stackSize +
  27307. ', expected: ' + validationCommand.min);
  27308. valid = false;
  27309. break;
  27310. }
  27311. }
  27312. if ('stackDelta' in validationCommand) {
  27313. if ('stackFn' in validationCommand) {
  27314. validationCommand.stackFn(stack, stackSize);
  27315. }
  27316. stackSize += validationCommand.stackDelta;
  27317. } else if (validationCommand.resetStack) {
  27318. stackSize = 0;
  27319. undefStack = false;
  27320. } else if (validationCommand.undefStack) {
  27321. stackSize = 0;
  27322. undefStack = true;
  27323. }
  27324. }
  27325. }
  27326. if (!valid) {
  27327. // resetting invalid charstring to single 'endchar'
  27328. charStrings.set(i, new Uint8Array([14]));
  27329. }
  27330. }
  27331. return { charStrings: charStrings, seacs: seacs };
  27332. },
  27333. emptyPrivateDictionary:
  27334. function CFFParser_emptyPrivateDictionary(parentDict) {
  27335. var privateDict = this.createDict(CFFPrivateDict, [],
  27336. parentDict.strings);
  27337. parentDict.setByKey(18, [0, 0]);
  27338. parentDict.privateDict = privateDict;
  27339. },
  27340. parsePrivateDict: function CFFParser_parsePrivateDict(parentDict) {
  27341. // no private dict, do nothing
  27342. if (!parentDict.hasName('Private')) {
  27343. this.emptyPrivateDictionary(parentDict);
  27344. return;
  27345. }
  27346. var privateOffset = parentDict.getByName('Private');
  27347. // make sure the params are formatted correctly
  27348. if (!isArray(privateOffset) || privateOffset.length !== 2) {
  27349. parentDict.removeByName('Private');
  27350. return;
  27351. }
  27352. var size = privateOffset[0];
  27353. var offset = privateOffset[1];
  27354. // remove empty dicts or ones that refer to invalid location
  27355. if (size === 0 || offset >= this.bytes.length) {
  27356. this.emptyPrivateDictionary(parentDict);
  27357. return;
  27358. }
  27359. var privateDictEnd = offset + size;
  27360. var dictData = this.bytes.subarray(offset, privateDictEnd);
  27361. var dict = this.parseDict(dictData);
  27362. var privateDict = this.createDict(CFFPrivateDict, dict,
  27363. parentDict.strings);
  27364. parentDict.privateDict = privateDict;
  27365. // Parse the Subrs index also since it's relative to the private dict.
  27366. if (!privateDict.getByName('Subrs')) {
  27367. return;
  27368. }
  27369. var subrsOffset = privateDict.getByName('Subrs');
  27370. var relativeOffset = offset + subrsOffset;
  27371. // Validate the offset.
  27372. if (subrsOffset === 0 || relativeOffset >= this.bytes.length) {
  27373. this.emptyPrivateDictionary(parentDict);
  27374. return;
  27375. }
  27376. var subrsIndex = this.parseIndex(relativeOffset);
  27377. privateDict.subrsIndex = subrsIndex.obj;
  27378. },
  27379. parseCharsets: function CFFParser_parseCharsets(pos, length, strings, cid) {
  27380. if (pos === 0) {
  27381. return new CFFCharset(true, CFFCharsetPredefinedTypes.ISO_ADOBE,
  27382. ISOAdobeCharset);
  27383. } else if (pos == 1) {
  27384. return new CFFCharset(true, CFFCharsetPredefinedTypes.EXPERT,
  27385. ExpertCharset);
  27386. } else if (pos == 2) {
  27387. return new CFFCharset(true, CFFCharsetPredefinedTypes.EXPERT_SUBSET,
  27388. ExpertSubsetCharset);
  27389. }
  27390. var bytes = this.bytes;
  27391. var start = pos;
  27392. var format = bytes[pos++];
  27393. var charset = ['.notdef'];
  27394. var id, count, i;
  27395. // subtract 1 for the .notdef glyph
  27396. length -= 1;
  27397. switch (format) {
  27398. case 0:
  27399. for (i = 0; i < length; i++) {
  27400. id = (bytes[pos++] << 8) | bytes[pos++];
  27401. charset.push(cid ? id : strings.get(id));
  27402. }
  27403. break;
  27404. case 1:
  27405. while (charset.length <= length) {
  27406. id = (bytes[pos++] << 8) | bytes[pos++];
  27407. count = bytes[pos++];
  27408. for (i = 0; i <= count; i++) {
  27409. charset.push(cid ? id++ : strings.get(id++));
  27410. }
  27411. }
  27412. break;
  27413. case 2:
  27414. while (charset.length <= length) {
  27415. id = (bytes[pos++] << 8) | bytes[pos++];
  27416. count = (bytes[pos++] << 8) | bytes[pos++];
  27417. for (i = 0; i <= count; i++) {
  27418. charset.push(cid ? id++ : strings.get(id++));
  27419. }
  27420. }
  27421. break;
  27422. default:
  27423. error('Unknown charset format');
  27424. }
  27425. // Raw won't be needed if we actually compile the charset.
  27426. var end = pos;
  27427. var raw = bytes.subarray(start, end);
  27428. return new CFFCharset(false, format, charset, raw);
  27429. },
  27430. parseEncoding: function CFFParser_parseEncoding(pos,
  27431. properties,
  27432. strings,
  27433. charset) {
  27434. var encoding = {};
  27435. var bytes = this.bytes;
  27436. var predefined = false;
  27437. var hasSupplement = false;
  27438. var format, i, ii;
  27439. var raw = null;
  27440. function readSupplement() {
  27441. var supplementsCount = bytes[pos++];
  27442. for (i = 0; i < supplementsCount; i++) {
  27443. var code = bytes[pos++];
  27444. var sid = (bytes[pos++] << 8) + (bytes[pos++] & 0xff);
  27445. encoding[code] = charset.indexOf(strings.get(sid));
  27446. }
  27447. }
  27448. if (pos === 0 || pos == 1) {
  27449. predefined = true;
  27450. format = pos;
  27451. var baseEncoding = pos ? Encodings.ExpertEncoding :
  27452. Encodings.StandardEncoding;
  27453. for (i = 0, ii = charset.length; i < ii; i++) {
  27454. var index = baseEncoding.indexOf(charset[i]);
  27455. if (index != -1) {
  27456. encoding[index] = i;
  27457. }
  27458. }
  27459. } else {
  27460. var dataStart = pos;
  27461. format = bytes[pos++];
  27462. switch (format & 0x7f) {
  27463. case 0:
  27464. var glyphsCount = bytes[pos++];
  27465. for (i = 1; i <= glyphsCount; i++) {
  27466. encoding[bytes[pos++]] = i;
  27467. }
  27468. break;
  27469. case 1:
  27470. var rangesCount = bytes[pos++];
  27471. var gid = 1;
  27472. for (i = 0; i < rangesCount; i++) {
  27473. var start = bytes[pos++];
  27474. var left = bytes[pos++];
  27475. for (var j = start; j <= start + left; j++) {
  27476. encoding[j] = gid++;
  27477. }
  27478. }
  27479. break;
  27480. default:
  27481. error('Unknow encoding format: ' + format + ' in CFF');
  27482. break;
  27483. }
  27484. var dataEnd = pos;
  27485. if (format & 0x80) {
  27486. // The font sanitizer does not support CFF encoding with a
  27487. // supplement, since the encoding is not really used to map
  27488. // between gid to glyph, let's overwrite what is declared in
  27489. // the top dictionary to let the sanitizer think the font use
  27490. // StandardEncoding, that's a lie but that's ok.
  27491. bytes[dataStart] &= 0x7f;
  27492. readSupplement();
  27493. hasSupplement = true;
  27494. }
  27495. raw = bytes.subarray(dataStart, dataEnd);
  27496. }
  27497. format = format & 0x7f;
  27498. return new CFFEncoding(predefined, format, encoding, raw);
  27499. },
  27500. parseFDSelect: function CFFParser_parseFDSelect(pos, length) {
  27501. var start = pos;
  27502. var bytes = this.bytes;
  27503. var format = bytes[pos++];
  27504. var fdSelect = [];
  27505. var i;
  27506. switch (format) {
  27507. case 0:
  27508. for (i = 0; i < length; ++i) {
  27509. var id = bytes[pos++];
  27510. fdSelect.push(id);
  27511. }
  27512. break;
  27513. case 3:
  27514. var rangesCount = (bytes[pos++] << 8) | bytes[pos++];
  27515. for (i = 0; i < rangesCount; ++i) {
  27516. var first = (bytes[pos++] << 8) | bytes[pos++];
  27517. var fdIndex = bytes[pos++];
  27518. var next = (bytes[pos] << 8) | bytes[pos + 1];
  27519. for (var j = first; j < next; ++j) {
  27520. fdSelect.push(fdIndex);
  27521. }
  27522. }
  27523. // Advance past the sentinel(next).
  27524. pos += 2;
  27525. break;
  27526. default:
  27527. error('Unknown fdselect format ' + format);
  27528. break;
  27529. }
  27530. var end = pos;
  27531. return new CFFFDSelect(fdSelect, bytes.subarray(start, end));
  27532. }
  27533. };
  27534. return CFFParser;
  27535. })();
  27536. // Compact Font Format
  27537. var CFF = (function CFFClosure() {
  27538. function CFF() {
  27539. this.header = null;
  27540. this.names = [];
  27541. this.topDict = null;
  27542. this.strings = new CFFStrings();
  27543. this.globalSubrIndex = null;
  27544. // The following could really be per font, but since we only have one font
  27545. // store them here.
  27546. this.encoding = null;
  27547. this.charset = null;
  27548. this.charStrings = null;
  27549. this.fdArray = [];
  27550. this.fdSelect = null;
  27551. this.isCIDFont = false;
  27552. }
  27553. return CFF;
  27554. })();
  27555. var CFFHeader = (function CFFHeaderClosure() {
  27556. function CFFHeader(major, minor, hdrSize, offSize) {
  27557. this.major = major;
  27558. this.minor = minor;
  27559. this.hdrSize = hdrSize;
  27560. this.offSize = offSize;
  27561. }
  27562. return CFFHeader;
  27563. })();
  27564. var CFFStrings = (function CFFStringsClosure() {
  27565. function CFFStrings() {
  27566. this.strings = [];
  27567. }
  27568. CFFStrings.prototype = {
  27569. get: function CFFStrings_get(index) {
  27570. if (index >= 0 && index <= 390) {
  27571. return CFFStandardStrings[index];
  27572. }
  27573. if (index - 391 <= this.strings.length) {
  27574. return this.strings[index - 391];
  27575. }
  27576. return CFFStandardStrings[0];
  27577. },
  27578. add: function CFFStrings_add(value) {
  27579. this.strings.push(value);
  27580. },
  27581. get count() {
  27582. return this.strings.length;
  27583. }
  27584. };
  27585. return CFFStrings;
  27586. })();
  27587. var CFFIndex = (function CFFIndexClosure() {
  27588. function CFFIndex() {
  27589. this.objects = [];
  27590. this.length = 0;
  27591. }
  27592. CFFIndex.prototype = {
  27593. add: function CFFIndex_add(data) {
  27594. this.length += data.length;
  27595. this.objects.push(data);
  27596. },
  27597. set: function CFFIndex_set(index, data) {
  27598. this.length += data.length - this.objects[index].length;
  27599. this.objects[index] = data;
  27600. },
  27601. get: function CFFIndex_get(index) {
  27602. return this.objects[index];
  27603. },
  27604. get count() {
  27605. return this.objects.length;
  27606. }
  27607. };
  27608. return CFFIndex;
  27609. })();
  27610. var CFFDict = (function CFFDictClosure() {
  27611. function CFFDict(tables, strings) {
  27612. this.keyToNameMap = tables.keyToNameMap;
  27613. this.nameToKeyMap = tables.nameToKeyMap;
  27614. this.defaults = tables.defaults;
  27615. this.types = tables.types;
  27616. this.opcodes = tables.opcodes;
  27617. this.order = tables.order;
  27618. this.strings = strings;
  27619. this.values = {};
  27620. }
  27621. CFFDict.prototype = {
  27622. // value should always be an array
  27623. setByKey: function CFFDict_setByKey(key, value) {
  27624. if (!(key in this.keyToNameMap)) {
  27625. return false;
  27626. }
  27627. // ignore empty values
  27628. if (value.length === 0) {
  27629. return true;
  27630. }
  27631. var type = this.types[key];
  27632. // remove the array wrapping these types of values
  27633. if (type === 'num' || type === 'sid' || type === 'offset') {
  27634. value = value[0];
  27635. }
  27636. this.values[key] = value;
  27637. return true;
  27638. },
  27639. setByName: function CFFDict_setByName(name, value) {
  27640. if (!(name in this.nameToKeyMap)) {
  27641. error('Invalid dictionary name "' + name + '"');
  27642. }
  27643. this.values[this.nameToKeyMap[name]] = value;
  27644. },
  27645. hasName: function CFFDict_hasName(name) {
  27646. return this.nameToKeyMap[name] in this.values;
  27647. },
  27648. getByName: function CFFDict_getByName(name) {
  27649. if (!(name in this.nameToKeyMap)) {
  27650. error('Invalid dictionary name "' + name + '"');
  27651. }
  27652. var key = this.nameToKeyMap[name];
  27653. if (!(key in this.values)) {
  27654. return this.defaults[key];
  27655. }
  27656. return this.values[key];
  27657. },
  27658. removeByName: function CFFDict_removeByName(name) {
  27659. delete this.values[this.nameToKeyMap[name]];
  27660. }
  27661. };
  27662. CFFDict.createTables = function CFFDict_createTables(layout) {
  27663. var tables = {
  27664. keyToNameMap: {},
  27665. nameToKeyMap: {},
  27666. defaults: {},
  27667. types: {},
  27668. opcodes: {},
  27669. order: []
  27670. };
  27671. for (var i = 0, ii = layout.length; i < ii; ++i) {
  27672. var entry = layout[i];
  27673. var key = isArray(entry[0]) ? (entry[0][0] << 8) + entry[0][1] : entry[0];
  27674. tables.keyToNameMap[key] = entry[1];
  27675. tables.nameToKeyMap[entry[1]] = key;
  27676. tables.types[key] = entry[2];
  27677. tables.defaults[key] = entry[3];
  27678. tables.opcodes[key] = isArray(entry[0]) ? entry[0] : [entry[0]];
  27679. tables.order.push(key);
  27680. }
  27681. return tables;
  27682. };
  27683. return CFFDict;
  27684. })();
  27685. var CFFTopDict = (function CFFTopDictClosure() {
  27686. var layout = [
  27687. [[12, 30], 'ROS', ['sid', 'sid', 'num'], null],
  27688. [[12, 20], 'SyntheticBase', 'num', null],
  27689. [0, 'version', 'sid', null],
  27690. [1, 'Notice', 'sid', null],
  27691. [[12, 0], 'Copyright', 'sid', null],
  27692. [2, 'FullName', 'sid', null],
  27693. [3, 'FamilyName', 'sid', null],
  27694. [4, 'Weight', 'sid', null],
  27695. [[12, 1], 'isFixedPitch', 'num', 0],
  27696. [[12, 2], 'ItalicAngle', 'num', 0],
  27697. [[12, 3], 'UnderlinePosition', 'num', -100],
  27698. [[12, 4], 'UnderlineThickness', 'num', 50],
  27699. [[12, 5], 'PaintType', 'num', 0],
  27700. [[12, 6], 'CharstringType', 'num', 2],
  27701. [[12, 7], 'FontMatrix', ['num', 'num', 'num', 'num', 'num', 'num'],
  27702. [0.001, 0, 0, 0.001, 0, 0]],
  27703. [13, 'UniqueID', 'num', null],
  27704. [5, 'FontBBox', ['num', 'num', 'num', 'num'], [0, 0, 0, 0]],
  27705. [[12, 8], 'StrokeWidth', 'num', 0],
  27706. [14, 'XUID', 'array', null],
  27707. [15, 'charset', 'offset', 0],
  27708. [16, 'Encoding', 'offset', 0],
  27709. [17, 'CharStrings', 'offset', 0],
  27710. [18, 'Private', ['offset', 'offset'], null],
  27711. [[12, 21], 'PostScript', 'sid', null],
  27712. [[12, 22], 'BaseFontName', 'sid', null],
  27713. [[12, 23], 'BaseFontBlend', 'delta', null],
  27714. [[12, 31], 'CIDFontVersion', 'num', 0],
  27715. [[12, 32], 'CIDFontRevision', 'num', 0],
  27716. [[12, 33], 'CIDFontType', 'num', 0],
  27717. [[12, 34], 'CIDCount', 'num', 8720],
  27718. [[12, 35], 'UIDBase', 'num', null],
  27719. // XXX: CID Fonts on DirectWrite 6.1 only seem to work if FDSelect comes
  27720. // before FDArray.
  27721. [[12, 37], 'FDSelect', 'offset', null],
  27722. [[12, 36], 'FDArray', 'offset', null],
  27723. [[12, 38], 'FontName', 'sid', null]
  27724. ];
  27725. var tables = null;
  27726. function CFFTopDict(strings) {
  27727. if (tables === null) {
  27728. tables = CFFDict.createTables(layout);
  27729. }
  27730. CFFDict.call(this, tables, strings);
  27731. this.privateDict = null;
  27732. }
  27733. CFFTopDict.prototype = Object.create(CFFDict.prototype);
  27734. return CFFTopDict;
  27735. })();
  27736. var CFFPrivateDict = (function CFFPrivateDictClosure() {
  27737. var layout = [
  27738. [6, 'BlueValues', 'delta', null],
  27739. [7, 'OtherBlues', 'delta', null],
  27740. [8, 'FamilyBlues', 'delta', null],
  27741. [9, 'FamilyOtherBlues', 'delta', null],
  27742. [[12, 9], 'BlueScale', 'num', 0.039625],
  27743. [[12, 10], 'BlueShift', 'num', 7],
  27744. [[12, 11], 'BlueFuzz', 'num', 1],
  27745. [10, 'StdHW', 'num', null],
  27746. [11, 'StdVW', 'num', null],
  27747. [[12, 12], 'StemSnapH', 'delta', null],
  27748. [[12, 13], 'StemSnapV', 'delta', null],
  27749. [[12, 14], 'ForceBold', 'num', 0],
  27750. [[12, 17], 'LanguageGroup', 'num', 0],
  27751. [[12, 18], 'ExpansionFactor', 'num', 0.06],
  27752. [[12, 19], 'initialRandomSeed', 'num', 0],
  27753. [20, 'defaultWidthX', 'num', 0],
  27754. [21, 'nominalWidthX', 'num', 0],
  27755. [19, 'Subrs', 'offset', null]
  27756. ];
  27757. var tables = null;
  27758. function CFFPrivateDict(strings) {
  27759. if (tables === null) {
  27760. tables = CFFDict.createTables(layout);
  27761. }
  27762. CFFDict.call(this, tables, strings);
  27763. this.subrsIndex = null;
  27764. }
  27765. CFFPrivateDict.prototype = Object.create(CFFDict.prototype);
  27766. return CFFPrivateDict;
  27767. })();
  27768. var CFFCharsetPredefinedTypes = {
  27769. ISO_ADOBE: 0,
  27770. EXPERT: 1,
  27771. EXPERT_SUBSET: 2
  27772. };
  27773. var CFFCharset = (function CFFCharsetClosure() {
  27774. function CFFCharset(predefined, format, charset, raw) {
  27775. this.predefined = predefined;
  27776. this.format = format;
  27777. this.charset = charset;
  27778. this.raw = raw;
  27779. }
  27780. return CFFCharset;
  27781. })();
  27782. var CFFEncoding = (function CFFEncodingClosure() {
  27783. function CFFEncoding(predefined, format, encoding, raw) {
  27784. this.predefined = predefined;
  27785. this.format = format;
  27786. this.encoding = encoding;
  27787. this.raw = raw;
  27788. }
  27789. return CFFEncoding;
  27790. })();
  27791. var CFFFDSelect = (function CFFFDSelectClosure() {
  27792. function CFFFDSelect(fdSelect, raw) {
  27793. this.fdSelect = fdSelect;
  27794. this.raw = raw;
  27795. }
  27796. return CFFFDSelect;
  27797. })();
  27798. // Helper class to keep track of where an offset is within the data and helps
  27799. // filling in that offset once it's known.
  27800. var CFFOffsetTracker = (function CFFOffsetTrackerClosure() {
  27801. function CFFOffsetTracker() {
  27802. this.offsets = {};
  27803. }
  27804. CFFOffsetTracker.prototype = {
  27805. isTracking: function CFFOffsetTracker_isTracking(key) {
  27806. return key in this.offsets;
  27807. },
  27808. track: function CFFOffsetTracker_track(key, location) {
  27809. if (key in this.offsets) {
  27810. error('Already tracking location of ' + key);
  27811. }
  27812. this.offsets[key] = location;
  27813. },
  27814. offset: function CFFOffsetTracker_offset(value) {
  27815. for (var key in this.offsets) {
  27816. this.offsets[key] += value;
  27817. }
  27818. },
  27819. setEntryLocation: function CFFOffsetTracker_setEntryLocation(key,
  27820. values,
  27821. output) {
  27822. if (!(key in this.offsets)) {
  27823. error('Not tracking location of ' + key);
  27824. }
  27825. var data = output.data;
  27826. var dataOffset = this.offsets[key];
  27827. var size = 5;
  27828. for (var i = 0, ii = values.length; i < ii; ++i) {
  27829. var offset0 = i * size + dataOffset;
  27830. var offset1 = offset0 + 1;
  27831. var offset2 = offset0 + 2;
  27832. var offset3 = offset0 + 3;
  27833. var offset4 = offset0 + 4;
  27834. // It's easy to screw up offsets so perform this sanity check.
  27835. if (data[offset0] !== 0x1d || data[offset1] !== 0 ||
  27836. data[offset2] !== 0 || data[offset3] !== 0 || data[offset4] !== 0) {
  27837. error('writing to an offset that is not empty');
  27838. }
  27839. var value = values[i];
  27840. data[offset0] = 0x1d;
  27841. data[offset1] = (value >> 24) & 0xFF;
  27842. data[offset2] = (value >> 16) & 0xFF;
  27843. data[offset3] = (value >> 8) & 0xFF;
  27844. data[offset4] = value & 0xFF;
  27845. }
  27846. }
  27847. };
  27848. return CFFOffsetTracker;
  27849. })();
  27850. // Takes a CFF and converts it to the binary representation.
  27851. var CFFCompiler = (function CFFCompilerClosure() {
  27852. function CFFCompiler(cff) {
  27853. this.cff = cff;
  27854. }
  27855. CFFCompiler.prototype = {
  27856. compile: function CFFCompiler_compile() {
  27857. var cff = this.cff;
  27858. var output = {
  27859. data: [],
  27860. length: 0,
  27861. add: function CFFCompiler_add(data) {
  27862. this.data = this.data.concat(data);
  27863. this.length = this.data.length;
  27864. }
  27865. };
  27866. // Compile the five entries that must be in order.
  27867. var header = this.compileHeader(cff.header);
  27868. output.add(header);
  27869. var nameIndex = this.compileNameIndex(cff.names);
  27870. output.add(nameIndex);
  27871. if (cff.isCIDFont) {
  27872. // The spec is unclear on how font matrices should relate to each other
  27873. // when there is one in the main top dict and the sub top dicts.
  27874. // Windows handles this differently than linux and osx so we have to
  27875. // normalize to work on all.
  27876. // Rules based off of some mailing list discussions:
  27877. // - If main font has a matrix and subfont doesn't, use the main matrix.
  27878. // - If no main font matrix and there is a subfont matrix, use the
  27879. // subfont matrix.
  27880. // - If both have matrices, concat together.
  27881. // - If neither have matrices, use default.
  27882. // To make this work on all platforms we move the top matrix into each
  27883. // sub top dict and concat if necessary.
  27884. if (cff.topDict.hasName('FontMatrix')) {
  27885. var base = cff.topDict.getByName('FontMatrix');
  27886. cff.topDict.removeByName('FontMatrix');
  27887. for (var i = 0, ii = cff.fdArray.length; i < ii; i++) {
  27888. var subDict = cff.fdArray[i];
  27889. var matrix = base.slice(0);
  27890. if (subDict.hasName('FontMatrix')) {
  27891. matrix = Util.transform(matrix, subDict.getByName('FontMatrix'));
  27892. }
  27893. subDict.setByName('FontMatrix', matrix);
  27894. }
  27895. }
  27896. }
  27897. var compiled = this.compileTopDicts([cff.topDict],
  27898. output.length,
  27899. cff.isCIDFont);
  27900. output.add(compiled.output);
  27901. var topDictTracker = compiled.trackers[0];
  27902. var stringIndex = this.compileStringIndex(cff.strings.strings);
  27903. output.add(stringIndex);
  27904. var globalSubrIndex = this.compileIndex(cff.globalSubrIndex);
  27905. output.add(globalSubrIndex);
  27906. // Now start on the other entries that have no specfic order.
  27907. if (cff.encoding && cff.topDict.hasName('Encoding')) {
  27908. if (cff.encoding.predefined) {
  27909. topDictTracker.setEntryLocation('Encoding', [cff.encoding.format],
  27910. output);
  27911. } else {
  27912. var encoding = this.compileEncoding(cff.encoding);
  27913. topDictTracker.setEntryLocation('Encoding', [output.length], output);
  27914. output.add(encoding);
  27915. }
  27916. }
  27917. if (cff.charset && cff.topDict.hasName('charset')) {
  27918. if (cff.charset.predefined) {
  27919. topDictTracker.setEntryLocation('charset', [cff.charset.format],
  27920. output);
  27921. } else {
  27922. var charset = this.compileCharset(cff.charset);
  27923. topDictTracker.setEntryLocation('charset', [output.length], output);
  27924. output.add(charset);
  27925. }
  27926. }
  27927. var charStrings = this.compileCharStrings(cff.charStrings);
  27928. topDictTracker.setEntryLocation('CharStrings', [output.length], output);
  27929. output.add(charStrings);
  27930. if (cff.isCIDFont) {
  27931. // For some reason FDSelect must be in front of FDArray on windows. OSX
  27932. // and linux don't seem to care.
  27933. topDictTracker.setEntryLocation('FDSelect', [output.length], output);
  27934. var fdSelect = this.compileFDSelect(cff.fdSelect.raw);
  27935. output.add(fdSelect);
  27936. // It is unclear if the sub font dictionary can have CID related
  27937. // dictionary keys, but the sanitizer doesn't like them so remove them.
  27938. compiled = this.compileTopDicts(cff.fdArray, output.length, true);
  27939. topDictTracker.setEntryLocation('FDArray', [output.length], output);
  27940. output.add(compiled.output);
  27941. var fontDictTrackers = compiled.trackers;
  27942. this.compilePrivateDicts(cff.fdArray, fontDictTrackers, output);
  27943. }
  27944. this.compilePrivateDicts([cff.topDict], [topDictTracker], output);
  27945. // If the font data ends with INDEX whose object data is zero-length,
  27946. // the sanitizer will bail out. Add a dummy byte to avoid that.
  27947. output.add([0]);
  27948. return output.data;
  27949. },
  27950. encodeNumber: function CFFCompiler_encodeNumber(value) {
  27951. if (parseFloat(value) == parseInt(value, 10) && !isNaN(value)) { // isInt
  27952. return this.encodeInteger(value);
  27953. } else {
  27954. return this.encodeFloat(value);
  27955. }
  27956. },
  27957. encodeFloat: function CFFCompiler_encodeFloat(num) {
  27958. var value = num.toString();
  27959. // rounding inaccurate doubles
  27960. var m = /\.(\d*?)(?:9{5,20}|0{5,20})\d{0,2}(?:e(.+)|$)/.exec(value);
  27961. if (m) {
  27962. var epsilon = parseFloat('1e' + ((m[2] ? +m[2] : 0) + m[1].length));
  27963. value = (Math.round(num * epsilon) / epsilon).toString();
  27964. }
  27965. var nibbles = '';
  27966. var i, ii;
  27967. for (i = 0, ii = value.length; i < ii; ++i) {
  27968. var a = value[i];
  27969. if (a === 'e') {
  27970. nibbles += value[++i] === '-' ? 'c' : 'b';
  27971. } else if (a === '.') {
  27972. nibbles += 'a';
  27973. } else if (a === '-') {
  27974. nibbles += 'e';
  27975. } else {
  27976. nibbles += a;
  27977. }
  27978. }
  27979. nibbles += (nibbles.length & 1) ? 'f' : 'ff';
  27980. var out = [30];
  27981. for (i = 0, ii = nibbles.length; i < ii; i += 2) {
  27982. out.push(parseInt(nibbles.substr(i, 2), 16));
  27983. }
  27984. return out;
  27985. },
  27986. encodeInteger: function CFFCompiler_encodeInteger(value) {
  27987. var code;
  27988. if (value >= -107 && value <= 107) {
  27989. code = [value + 139];
  27990. } else if (value >= 108 && value <= 1131) {
  27991. value = [value - 108];
  27992. code = [(value >> 8) + 247, value & 0xFF];
  27993. } else if (value >= -1131 && value <= -108) {
  27994. value = -value - 108;
  27995. code = [(value >> 8) + 251, value & 0xFF];
  27996. } else if (value >= -32768 && value <= 32767) {
  27997. code = [0x1c, (value >> 8) & 0xFF, value & 0xFF];
  27998. } else {
  27999. code = [0x1d,
  28000. (value >> 24) & 0xFF,
  28001. (value >> 16) & 0xFF,
  28002. (value >> 8) & 0xFF,
  28003. value & 0xFF];
  28004. }
  28005. return code;
  28006. },
  28007. compileHeader: function CFFCompiler_compileHeader(header) {
  28008. return [
  28009. header.major,
  28010. header.minor,
  28011. header.hdrSize,
  28012. header.offSize
  28013. ];
  28014. },
  28015. compileNameIndex: function CFFCompiler_compileNameIndex(names) {
  28016. var nameIndex = new CFFIndex();
  28017. for (var i = 0, ii = names.length; i < ii; ++i) {
  28018. nameIndex.add(stringToArray(names[i]));
  28019. }
  28020. return this.compileIndex(nameIndex);
  28021. },
  28022. compileTopDicts: function CFFCompiler_compileTopDicts(dicts,
  28023. length,
  28024. removeCidKeys) {
  28025. var fontDictTrackers = [];
  28026. var fdArrayIndex = new CFFIndex();
  28027. for (var i = 0, ii = dicts.length; i < ii; ++i) {
  28028. var fontDict = dicts[i];
  28029. if (removeCidKeys) {
  28030. fontDict.removeByName('CIDFontVersion');
  28031. fontDict.removeByName('CIDFontRevision');
  28032. fontDict.removeByName('CIDFontType');
  28033. fontDict.removeByName('CIDCount');
  28034. fontDict.removeByName('UIDBase');
  28035. }
  28036. var fontDictTracker = new CFFOffsetTracker();
  28037. var fontDictData = this.compileDict(fontDict, fontDictTracker);
  28038. fontDictTrackers.push(fontDictTracker);
  28039. fdArrayIndex.add(fontDictData);
  28040. fontDictTracker.offset(length);
  28041. }
  28042. fdArrayIndex = this.compileIndex(fdArrayIndex, fontDictTrackers);
  28043. return {
  28044. trackers: fontDictTrackers,
  28045. output: fdArrayIndex
  28046. };
  28047. },
  28048. compilePrivateDicts: function CFFCompiler_compilePrivateDicts(dicts,
  28049. trackers,
  28050. output) {
  28051. for (var i = 0, ii = dicts.length; i < ii; ++i) {
  28052. var fontDict = dicts[i];
  28053. assert(fontDict.privateDict && fontDict.hasName('Private'),
  28054. 'There must be an private dictionary.');
  28055. var privateDict = fontDict.privateDict;
  28056. var privateDictTracker = new CFFOffsetTracker();
  28057. var privateDictData = this.compileDict(privateDict, privateDictTracker);
  28058. var outputLength = output.length;
  28059. privateDictTracker.offset(outputLength);
  28060. if (!privateDictData.length) {
  28061. // The private dictionary was empty, set the output length to zero to
  28062. // ensure the offset length isn't out of bounds in the eyes of the
  28063. // sanitizer.
  28064. outputLength = 0;
  28065. }
  28066. trackers[i].setEntryLocation('Private',
  28067. [privateDictData.length, outputLength],
  28068. output);
  28069. output.add(privateDictData);
  28070. if (privateDict.subrsIndex && privateDict.hasName('Subrs')) {
  28071. var subrs = this.compileIndex(privateDict.subrsIndex);
  28072. privateDictTracker.setEntryLocation('Subrs', [privateDictData.length],
  28073. output);
  28074. output.add(subrs);
  28075. }
  28076. }
  28077. },
  28078. compileDict: function CFFCompiler_compileDict(dict, offsetTracker) {
  28079. var out = [];
  28080. // The dictionary keys must be in a certain order.
  28081. var order = dict.order;
  28082. for (var i = 0; i < order.length; ++i) {
  28083. var key = order[i];
  28084. if (!(key in dict.values)) {
  28085. continue;
  28086. }
  28087. var values = dict.values[key];
  28088. var types = dict.types[key];
  28089. if (!isArray(types)) {
  28090. types = [types];
  28091. }
  28092. if (!isArray(values)) {
  28093. values = [values];
  28094. }
  28095. // Remove any empty dict values.
  28096. if (values.length === 0) {
  28097. continue;
  28098. }
  28099. for (var j = 0, jj = types.length; j < jj; ++j) {
  28100. var type = types[j];
  28101. var value = values[j];
  28102. switch (type) {
  28103. case 'num':
  28104. case 'sid':
  28105. out = out.concat(this.encodeNumber(value));
  28106. break;
  28107. case 'offset':
  28108. // For offsets we just insert a 32bit integer so we don't have to
  28109. // deal with figuring out the length of the offset when it gets
  28110. // replaced later on by the compiler.
  28111. var name = dict.keyToNameMap[key];
  28112. // Some offsets have the offset and the length, so just record the
  28113. // position of the first one.
  28114. if (!offsetTracker.isTracking(name)) {
  28115. offsetTracker.track(name, out.length);
  28116. }
  28117. out = out.concat([0x1d, 0, 0, 0, 0]);
  28118. break;
  28119. case 'array':
  28120. case 'delta':
  28121. out = out.concat(this.encodeNumber(value));
  28122. for (var k = 1, kk = values.length; k < kk; ++k) {
  28123. out = out.concat(this.encodeNumber(values[k]));
  28124. }
  28125. break;
  28126. default:
  28127. error('Unknown data type of ' + type);
  28128. break;
  28129. }
  28130. }
  28131. out = out.concat(dict.opcodes[key]);
  28132. }
  28133. return out;
  28134. },
  28135. compileStringIndex: function CFFCompiler_compileStringIndex(strings) {
  28136. var stringIndex = new CFFIndex();
  28137. for (var i = 0, ii = strings.length; i < ii; ++i) {
  28138. stringIndex.add(stringToArray(strings[i]));
  28139. }
  28140. return this.compileIndex(stringIndex);
  28141. },
  28142. compileGlobalSubrIndex: function CFFCompiler_compileGlobalSubrIndex() {
  28143. var globalSubrIndex = this.cff.globalSubrIndex;
  28144. this.out.writeByteArray(this.compileIndex(globalSubrIndex));
  28145. },
  28146. compileCharStrings: function CFFCompiler_compileCharStrings(charStrings) {
  28147. return this.compileIndex(charStrings);
  28148. },
  28149. compileCharset: function CFFCompiler_compileCharset(charset) {
  28150. return this.compileTypedArray(charset.raw);
  28151. },
  28152. compileEncoding: function CFFCompiler_compileEncoding(encoding) {
  28153. return this.compileTypedArray(encoding.raw);
  28154. },
  28155. compileFDSelect: function CFFCompiler_compileFDSelect(fdSelect) {
  28156. return this.compileTypedArray(fdSelect);
  28157. },
  28158. compileTypedArray: function CFFCompiler_compileTypedArray(data) {
  28159. var out = [];
  28160. for (var i = 0, ii = data.length; i < ii; ++i) {
  28161. out[i] = data[i];
  28162. }
  28163. return out;
  28164. },
  28165. compileIndex: function CFFCompiler_compileIndex(index, trackers) {
  28166. trackers = trackers || [];
  28167. var objects = index.objects;
  28168. // First 2 bytes contains the number of objects contained into this index
  28169. var count = objects.length;
  28170. // If there is no object, just create an index. This technically
  28171. // should just be [0, 0] but OTS has an issue with that.
  28172. if (count === 0) {
  28173. return [0, 0, 0];
  28174. }
  28175. var data = [(count >> 8) & 0xFF, count & 0xff];
  28176. var lastOffset = 1, i;
  28177. for (i = 0; i < count; ++i) {
  28178. lastOffset += objects[i].length;
  28179. }
  28180. var offsetSize;
  28181. if (lastOffset < 0x100) {
  28182. offsetSize = 1;
  28183. } else if (lastOffset < 0x10000) {
  28184. offsetSize = 2;
  28185. } else if (lastOffset < 0x1000000) {
  28186. offsetSize = 3;
  28187. } else {
  28188. offsetSize = 4;
  28189. }
  28190. // Next byte contains the offset size use to reference object in the file
  28191. data.push(offsetSize);
  28192. // Add another offset after this one because we need a new offset
  28193. var relativeOffset = 1;
  28194. for (i = 0; i < count + 1; i++) {
  28195. if (offsetSize === 1) {
  28196. data.push(relativeOffset & 0xFF);
  28197. } else if (offsetSize === 2) {
  28198. data.push((relativeOffset >> 8) & 0xFF,
  28199. relativeOffset & 0xFF);
  28200. } else if (offsetSize === 3) {
  28201. data.push((relativeOffset >> 16) & 0xFF,
  28202. (relativeOffset >> 8) & 0xFF,
  28203. relativeOffset & 0xFF);
  28204. } else {
  28205. data.push((relativeOffset >>> 24) & 0xFF,
  28206. (relativeOffset >> 16) & 0xFF,
  28207. (relativeOffset >> 8) & 0xFF,
  28208. relativeOffset & 0xFF);
  28209. }
  28210. if (objects[i]) {
  28211. relativeOffset += objects[i].length;
  28212. }
  28213. }
  28214. for (i = 0; i < count; i++) {
  28215. // Notify the tracker where the object will be offset in the data.
  28216. if (trackers[i]) {
  28217. trackers[i].offset(data.length);
  28218. }
  28219. for (var j = 0, jj = objects[i].length; j < jj; j++) {
  28220. data.push(objects[i][j]);
  28221. }
  28222. }
  28223. return data;
  28224. }
  28225. };
  28226. return CFFCompiler;
  28227. })();
  28228. // Workaround for seac on Windows.
  28229. (function checkSeacSupport() {
  28230. if (/Windows/.test(navigator.userAgent)) {
  28231. SEAC_ANALYSIS_ENABLED = true;
  28232. }
  28233. })();
  28234. // Workaround for Private Use Area characters in Chrome on Windows
  28235. // http://code.google.com/p/chromium/issues/detail?id=122465
  28236. // https://github.com/mozilla/pdf.js/issues/1689
  28237. (function checkChromeWindows() {
  28238. if (/Windows.*Chrome/.test(navigator.userAgent)) {
  28239. SKIP_PRIVATE_USE_RANGE_F000_TO_F01F = true;
  28240. }
  28241. })();
  28242. var FontRendererFactory = (function FontRendererFactoryClosure() {
  28243. function getLong(data, offset) {
  28244. return (data[offset] << 24) | (data[offset + 1] << 16) |
  28245. (data[offset + 2] << 8) | data[offset + 3];
  28246. }
  28247. function getUshort(data, offset) {
  28248. return (data[offset] << 8) | data[offset + 1];
  28249. }
  28250. function parseCmap(data, start, end) {
  28251. var offset = (getUshort(data, start + 2) === 1 ?
  28252. getLong(data, start + 8) : getLong(data, start + 16));
  28253. var format = getUshort(data, start + offset);
  28254. var length, ranges, p, i;
  28255. if (format === 4) {
  28256. length = getUshort(data, start + offset + 2);
  28257. var segCount = getUshort(data, start + offset + 6) >> 1;
  28258. p = start + offset + 14;
  28259. ranges = [];
  28260. for (i = 0; i < segCount; i++, p += 2) {
  28261. ranges[i] = {end: getUshort(data, p)};
  28262. }
  28263. p += 2;
  28264. for (i = 0; i < segCount; i++, p += 2) {
  28265. ranges[i].start = getUshort(data, p);
  28266. }
  28267. for (i = 0; i < segCount; i++, p += 2) {
  28268. ranges[i].idDelta = getUshort(data, p);
  28269. }
  28270. for (i = 0; i < segCount; i++, p += 2) {
  28271. var idOffset = getUshort(data, p);
  28272. if (idOffset === 0) {
  28273. continue;
  28274. }
  28275. ranges[i].ids = [];
  28276. for (var j = 0, jj = ranges[i].end - ranges[i].start + 1; j < jj; j++) {
  28277. ranges[i].ids[j] = getUshort(data, p + idOffset);
  28278. idOffset += 2;
  28279. }
  28280. }
  28281. return ranges;
  28282. } else if (format === 12) {
  28283. length = getLong(data, start + offset + 4);
  28284. var groups = getLong(data, start + offset + 12);
  28285. p = start + offset + 16;
  28286. ranges = [];
  28287. for (i = 0; i < groups; i++) {
  28288. ranges.push({
  28289. start: getLong(data, p),
  28290. end: getLong(data, p + 4),
  28291. idDelta: getLong(data, p + 8) - getLong(data, p)
  28292. });
  28293. p += 12;
  28294. }
  28295. return ranges;
  28296. }
  28297. error('not supported cmap: ' + format);
  28298. }
  28299. function parseCff(data, start, end) {
  28300. var properties = {};
  28301. var parser = new CFFParser(new Stream(data, start, end - start),
  28302. properties);
  28303. var cff = parser.parse();
  28304. return {
  28305. glyphs: cff.charStrings.objects,
  28306. subrs: (cff.topDict.privateDict && cff.topDict.privateDict.subrsIndex &&
  28307. cff.topDict.privateDict.subrsIndex.objects),
  28308. gsubrs: cff.globalSubrIndex && cff.globalSubrIndex.objects
  28309. };
  28310. }
  28311. function parseGlyfTable(glyf, loca, isGlyphLocationsLong) {
  28312. var itemSize, itemDecode;
  28313. if (isGlyphLocationsLong) {
  28314. itemSize = 4;
  28315. itemDecode = function fontItemDecodeLong(data, offset) {
  28316. return (data[offset] << 24) | (data[offset + 1] << 16) |
  28317. (data[offset + 2] << 8) | data[offset + 3];
  28318. };
  28319. } else {
  28320. itemSize = 2;
  28321. itemDecode = function fontItemDecode(data, offset) {
  28322. return (data[offset] << 9) | (data[offset + 1] << 1);
  28323. };
  28324. }
  28325. var glyphs = [];
  28326. var startOffset = itemDecode(loca, 0);
  28327. for (var j = itemSize; j < loca.length; j += itemSize) {
  28328. var endOffset = itemDecode(loca, j);
  28329. glyphs.push(glyf.subarray(startOffset, endOffset));
  28330. startOffset = endOffset;
  28331. }
  28332. return glyphs;
  28333. }
  28334. function lookupCmap(ranges, unicode) {
  28335. var code = unicode.charCodeAt(0);
  28336. var l = 0, r = ranges.length - 1;
  28337. while (l < r) {
  28338. var c = (l + r + 1) >> 1;
  28339. if (code < ranges[c].start) {
  28340. r = c - 1;
  28341. } else {
  28342. l = c;
  28343. }
  28344. }
  28345. if (ranges[l].start <= code && code <= ranges[l].end) {
  28346. return (ranges[l].idDelta + (ranges[l].ids ?
  28347. ranges[l].ids[code - ranges[l].start] : code)) & 0xFFFF;
  28348. }
  28349. return 0;
  28350. }
  28351. function compileGlyf(code, js, font) {
  28352. function moveTo(x, y) {
  28353. js.push('c.moveTo(' + x + ',' + y + ');');
  28354. }
  28355. function lineTo(x, y) {
  28356. js.push('c.lineTo(' + x + ',' + y + ');');
  28357. }
  28358. function quadraticCurveTo(xa, ya, x, y) {
  28359. js.push('c.quadraticCurveTo(' + xa + ',' + ya + ',' +
  28360. x + ',' + y + ');');
  28361. }
  28362. var i = 0;
  28363. var numberOfContours = ((code[i] << 24) | (code[i + 1] << 16)) >> 16;
  28364. var flags;
  28365. var x = 0, y = 0;
  28366. i += 10;
  28367. if (numberOfContours < 0) {
  28368. // composite glyph
  28369. do {
  28370. flags = (code[i] << 8) | code[i + 1];
  28371. var glyphIndex = (code[i + 2] << 8) | code[i + 3];
  28372. i += 4;
  28373. var arg1, arg2;
  28374. if ((flags & 0x01)) {
  28375. arg1 = ((code[i] << 24) | (code[i + 1] << 16)) >> 16;
  28376. arg2 = ((code[i + 2] << 24) | (code[i + 3] << 16)) >> 16;
  28377. i += 4;
  28378. } else {
  28379. arg1 = code[i++]; arg2 = code[i++];
  28380. }
  28381. if ((flags & 0x02)) {
  28382. x = arg1;
  28383. y = arg2;
  28384. } else {
  28385. x = 0; y = 0; // TODO "they are points" ?
  28386. }
  28387. var scaleX = 1, scaleY = 1, scale01 = 0, scale10 = 0;
  28388. if ((flags & 0x08)) {
  28389. scaleX =
  28390. scaleY = ((code[i] << 24) | (code[i + 1] << 16)) / 1073741824;
  28391. i += 2;
  28392. } else if ((flags & 0x40)) {
  28393. scaleX = ((code[i] << 24) | (code[i + 1] << 16)) / 1073741824;
  28394. scaleY = ((code[i + 2] << 24) | (code[i + 3] << 16)) / 1073741824;
  28395. i += 4;
  28396. } else if ((flags & 0x80)) {
  28397. scaleX = ((code[i] << 24) | (code[i + 1] << 16)) / 1073741824;
  28398. scale01 = ((code[i + 2] << 24) | (code[i + 3] << 16)) / 1073741824;
  28399. scale10 = ((code[i + 4] << 24) | (code[i + 5] << 16)) / 1073741824;
  28400. scaleY = ((code[i + 6] << 24) | (code[i + 7] << 16)) / 1073741824;
  28401. i += 8;
  28402. }
  28403. var subglyph = font.glyphs[glyphIndex];
  28404. if (subglyph) {
  28405. js.push('c.save();');
  28406. js.push('c.transform(' + scaleX + ',' + scale01 + ',' +
  28407. scale10 + ',' + scaleY + ',' + x + ',' + y + ');');
  28408. compileGlyf(subglyph, js, font);
  28409. js.push('c.restore();');
  28410. }
  28411. } while ((flags & 0x20));
  28412. } else {
  28413. // simple glyph
  28414. var endPtsOfContours = [];
  28415. var j, jj;
  28416. for (j = 0; j < numberOfContours; j++) {
  28417. endPtsOfContours.push((code[i] << 8) | code[i + 1]);
  28418. i += 2;
  28419. }
  28420. var instructionLength = (code[i] << 8) | code[i + 1];
  28421. i += 2 + instructionLength; // skipping the instructions
  28422. var numberOfPoints = endPtsOfContours[endPtsOfContours.length - 1] + 1;
  28423. var points = [];
  28424. while (points.length < numberOfPoints) {
  28425. flags = code[i++];
  28426. var repeat = 1;
  28427. if ((flags & 0x08)) {
  28428. repeat += code[i++];
  28429. }
  28430. while (repeat-- > 0) {
  28431. points.push({flags: flags});
  28432. }
  28433. }
  28434. for (j = 0; j < numberOfPoints; j++) {
  28435. switch (points[j].flags & 0x12) {
  28436. case 0x00:
  28437. x += ((code[i] << 24) | (code[i + 1] << 16)) >> 16;
  28438. i += 2;
  28439. break;
  28440. case 0x02:
  28441. x -= code[i++];
  28442. break;
  28443. case 0x12:
  28444. x += code[i++];
  28445. break;
  28446. }
  28447. points[j].x = x;
  28448. }
  28449. for (j = 0; j < numberOfPoints; j++) {
  28450. switch (points[j].flags & 0x24) {
  28451. case 0x00:
  28452. y += ((code[i] << 24) | (code[i + 1] << 16)) >> 16;
  28453. i += 2;
  28454. break;
  28455. case 0x04:
  28456. y -= code[i++];
  28457. break;
  28458. case 0x24:
  28459. y += code[i++];
  28460. break;
  28461. }
  28462. points[j].y = y;
  28463. }
  28464. var startPoint = 0;
  28465. for (i = 0; i < numberOfContours; i++) {
  28466. var endPoint = endPtsOfContours[i];
  28467. // contours might have implicit points, which is located in the middle
  28468. // between two neighboring off-curve points
  28469. var contour = points.slice(startPoint, endPoint + 1);
  28470. if ((contour[0].flags & 1)) {
  28471. contour.push(contour[0]); // using start point at the contour end
  28472. } else if ((contour[contour.length - 1].flags & 1)) {
  28473. // first is off-curve point, trying to use one from the end
  28474. contour.unshift(contour[contour.length - 1]);
  28475. } else {
  28476. // start and end are off-curve points, creating implicit one
  28477. var p = {
  28478. flags: 1,
  28479. x: (contour[0].x + contour[contour.length - 1].x) / 2,
  28480. y: (contour[0].y + contour[contour.length - 1].y) / 2
  28481. };
  28482. contour.unshift(p);
  28483. contour.push(p);
  28484. }
  28485. moveTo(contour[0].x, contour[0].y);
  28486. for (j = 1, jj = contour.length; j < jj; j++) {
  28487. if ((contour[j].flags & 1)) {
  28488. lineTo(contour[j].x, contour[j].y);
  28489. } else if ((contour[j + 1].flags & 1)){
  28490. quadraticCurveTo(contour[j].x, contour[j].y,
  28491. contour[j + 1].x, contour[j + 1].y);
  28492. j++;
  28493. } else {
  28494. quadraticCurveTo(contour[j].x, contour[j].y,
  28495. (contour[j].x + contour[j + 1].x) / 2,
  28496. (contour[j].y + contour[j + 1].y) / 2);
  28497. }
  28498. }
  28499. startPoint = endPoint + 1;
  28500. }
  28501. }
  28502. }
  28503. function compileCharString(code, js, font) {
  28504. var stack = [];
  28505. var x = 0, y = 0;
  28506. var stems = 0;
  28507. function moveTo(x, y) {
  28508. js.push('c.moveTo(' + x + ',' + y + ');');
  28509. }
  28510. function lineTo(x, y) {
  28511. js.push('c.lineTo(' + x + ',' + y + ');');
  28512. }
  28513. function bezierCurveTo(x1, y1, x2, y2, x, y) {
  28514. js.push('c.bezierCurveTo(' + x1 + ',' + y1 + ',' + x2 + ',' + y2 + ',' +
  28515. x + ',' + y + ');');
  28516. }
  28517. function parse(code) {
  28518. var i = 0;
  28519. while (i < code.length) {
  28520. var stackClean = false;
  28521. var v = code[i++];
  28522. var xa, xb, ya, yb, y1, y2, y3, n, subrCode;
  28523. switch (v) {
  28524. case 1: // hstem
  28525. stems += stack.length >> 1;
  28526. stackClean = true;
  28527. break;
  28528. case 3: // vstem
  28529. stems += stack.length >> 1;
  28530. stackClean = true;
  28531. break;
  28532. case 4: // vmoveto
  28533. y += stack.pop();
  28534. moveTo(x, y);
  28535. stackClean = true;
  28536. break;
  28537. case 5: // rlineto
  28538. while (stack.length > 0) {
  28539. x += stack.shift();
  28540. y += stack.shift();
  28541. lineTo(x, y);
  28542. }
  28543. break;
  28544. case 6: // hlineto
  28545. while (stack.length > 0) {
  28546. x += stack.shift();
  28547. lineTo(x, y);
  28548. if (stack.length === 0) {
  28549. break;
  28550. }
  28551. y += stack.shift();
  28552. lineTo(x, y);
  28553. }
  28554. break;
  28555. case 7: // vlineto
  28556. while (stack.length > 0) {
  28557. y += stack.shift();
  28558. lineTo(x, y);
  28559. if (stack.length === 0) {
  28560. break;
  28561. }
  28562. x += stack.shift();
  28563. lineTo(x, y);
  28564. }
  28565. break;
  28566. case 8: // rrcurveto
  28567. while (stack.length > 0) {
  28568. xa = x + stack.shift(); ya = y + stack.shift();
  28569. xb = xa + stack.shift(); yb = ya + stack.shift();
  28570. x = xb + stack.shift(); y = yb + stack.shift();
  28571. bezierCurveTo(xa, ya, xb, yb, x, y);
  28572. }
  28573. break;
  28574. case 10: // callsubr
  28575. n = stack.pop() + font.subrsBias;
  28576. subrCode = font.subrs[n];
  28577. if (subrCode) {
  28578. parse(subrCode);
  28579. }
  28580. break;
  28581. case 11: // return
  28582. return;
  28583. case 12:
  28584. v = code[i++];
  28585. switch (v) {
  28586. case 34: // flex
  28587. xa = x + stack.shift();
  28588. xb = xa + stack.shift(); y1 = y + stack.shift();
  28589. x = xb + stack.shift();
  28590. bezierCurveTo(xa, y, xb, y1, x, y1);
  28591. xa = x + stack.shift();
  28592. xb = xa + stack.shift();
  28593. x = xb + stack.shift();
  28594. bezierCurveTo(xa, y1, xb, y, x, y);
  28595. break;
  28596. case 35: // flex
  28597. xa = x + stack.shift(); ya = y + stack.shift();
  28598. xb = xa + stack.shift(); yb = ya + stack.shift();
  28599. x = xb + stack.shift(); y = yb + stack.shift();
  28600. bezierCurveTo(xa, ya, xb, yb, x, y);
  28601. xa = x + stack.shift(); ya = y + stack.shift();
  28602. xb = xa + stack.shift(); yb = ya + stack.shift();
  28603. x = xb + stack.shift(); y = yb + stack.shift();
  28604. bezierCurveTo(xa, ya, xb, yb, x, y);
  28605. stack.pop(); // fd
  28606. break;
  28607. case 36: // hflex1
  28608. xa = x + stack.shift(); y1 = y + stack.shift();
  28609. xb = xa + stack.shift(); y2 = y1 + stack.shift();
  28610. x = xb + stack.shift();
  28611. bezierCurveTo(xa, y1, xb, y2, x, y2);
  28612. xa = x + stack.shift();
  28613. xb = xa + stack.shift(); y3 = y2 + stack.shift();
  28614. x = xb + stack.shift();
  28615. bezierCurveTo(xa, y2, xb, y3, x, y);
  28616. break;
  28617. case 37: // flex1
  28618. var x0 = x, y0 = y;
  28619. xa = x + stack.shift(); ya = y + stack.shift();
  28620. xb = xa + stack.shift(); yb = ya + stack.shift();
  28621. x = xb + stack.shift(); y = yb + stack.shift();
  28622. bezierCurveTo(xa, ya, xb, yb, x, y);
  28623. xa = x + stack.shift(); ya = y + stack.shift();
  28624. xb = xa + stack.shift(); yb = ya + stack.shift();
  28625. x = xb; y = yb;
  28626. if (Math.abs(x - x0) > Math.abs(y - y0)) {
  28627. x += stack.shift();
  28628. } else {
  28629. y += stack.shift();
  28630. }
  28631. bezierCurveTo(xa, ya, xb, yb, x, y);
  28632. break;
  28633. default:
  28634. error('unknown operator: 12 ' + v);
  28635. }
  28636. break;
  28637. case 14: // endchar
  28638. if (stack.length >= 4) {
  28639. var achar = stack.pop();
  28640. var bchar = stack.pop();
  28641. y = stack.pop();
  28642. x = stack.pop();
  28643. js.push('c.save();');
  28644. js.push('c.translate('+ x + ',' + y + ');');
  28645. var gid = lookupCmap(font.cmap, String.fromCharCode(
  28646. font.glyphNameMap[Encodings.StandardEncoding[achar]]));
  28647. compileCharString(font.glyphs[gid], js, font);
  28648. js.push('c.restore();');
  28649. gid = lookupCmap(font.cmap, String.fromCharCode(
  28650. font.glyphNameMap[Encodings.StandardEncoding[bchar]]));
  28651. compileCharString(font.glyphs[gid], js, font);
  28652. }
  28653. return;
  28654. case 18: // hstemhm
  28655. stems += stack.length >> 1;
  28656. stackClean = true;
  28657. break;
  28658. case 19: // hintmask
  28659. stems += stack.length >> 1;
  28660. i += (stems + 7) >> 3;
  28661. stackClean = true;
  28662. break;
  28663. case 20: // cntrmask
  28664. stems += stack.length >> 1;
  28665. i += (stems + 7) >> 3;
  28666. stackClean = true;
  28667. break;
  28668. case 21: // rmoveto
  28669. y += stack.pop();
  28670. x += stack.pop();
  28671. moveTo(x, y);
  28672. stackClean = true;
  28673. break;
  28674. case 22: // hmoveto
  28675. x += stack.pop();
  28676. moveTo(x, y);
  28677. stackClean = true;
  28678. break;
  28679. case 23: // vstemhm
  28680. stems += stack.length >> 1;
  28681. stackClean = true;
  28682. break;
  28683. case 24: // rcurveline
  28684. while (stack.length > 2) {
  28685. xa = x + stack.shift(); ya = y + stack.shift();
  28686. xb = xa + stack.shift(); yb = ya + stack.shift();
  28687. x = xb + stack.shift(); y = yb + stack.shift();
  28688. bezierCurveTo(xa, ya, xb, yb, x, y);
  28689. }
  28690. x += stack.shift();
  28691. y += stack.shift();
  28692. lineTo(x, y);
  28693. break;
  28694. case 25: // rlinecurve
  28695. while (stack.length > 6) {
  28696. x += stack.shift();
  28697. y += stack.shift();
  28698. lineTo(x, y);
  28699. }
  28700. xa = x + stack.shift(); ya = y + stack.shift();
  28701. xb = xa + stack.shift(); yb = ya + stack.shift();
  28702. x = xb + stack.shift(); y = yb + stack.shift();
  28703. bezierCurveTo(xa, ya, xb, yb, x, y);
  28704. break;
  28705. case 26: // vvcurveto
  28706. if (stack.length % 2) {
  28707. x += stack.shift();
  28708. }
  28709. while (stack.length > 0) {
  28710. xa = x; ya = y + stack.shift();
  28711. xb = xa + stack.shift(); yb = ya + stack.shift();
  28712. x = xb; y = yb + stack.shift();
  28713. bezierCurveTo(xa, ya, xb, yb, x, y);
  28714. }
  28715. break;
  28716. case 27: // hhcurveto
  28717. if (stack.length % 2) {
  28718. y += stack.shift();
  28719. }
  28720. while (stack.length > 0) {
  28721. xa = x + stack.shift(); ya = y;
  28722. xb = xa + stack.shift(); yb = ya + stack.shift();
  28723. x = xb + stack.shift(); y = yb;
  28724. bezierCurveTo(xa, ya, xb, yb, x, y);
  28725. }
  28726. break;
  28727. case 28:
  28728. stack.push(((code[i] << 24) | (code[i + 1] << 16)) >> 16);
  28729. i += 2;
  28730. break;
  28731. case 29: // callgsubr
  28732. n = stack.pop() + font.gsubrsBias;
  28733. subrCode = font.gsubrs[n];
  28734. if (subrCode) {
  28735. parse(subrCode);
  28736. }
  28737. break;
  28738. case 30: // vhcurveto
  28739. while (stack.length > 0) {
  28740. xa = x; ya = y + stack.shift();
  28741. xb = xa + stack.shift(); yb = ya + stack.shift();
  28742. x = xb + stack.shift();
  28743. y = yb + (stack.length === 1 ? stack.shift() : 0);
  28744. bezierCurveTo(xa, ya, xb, yb, x, y);
  28745. if (stack.length === 0) {
  28746. break;
  28747. }
  28748. xa = x + stack.shift(); ya = y;
  28749. xb = xa + stack.shift(); yb = ya + stack.shift();
  28750. y = yb + stack.shift();
  28751. x = xb + (stack.length === 1 ? stack.shift() : 0);
  28752. bezierCurveTo(xa, ya, xb, yb, x, y);
  28753. }
  28754. break;
  28755. case 31: // hvcurveto
  28756. while (stack.length > 0) {
  28757. xa = x + stack.shift(); ya = y;
  28758. xb = xa + stack.shift(); yb = ya + stack.shift();
  28759. y = yb + stack.shift();
  28760. x = xb + (stack.length === 1 ? stack.shift() : 0);
  28761. bezierCurveTo(xa, ya, xb, yb, x, y);
  28762. if (stack.length === 0) {
  28763. break;
  28764. }
  28765. xa = x; ya = y + stack.shift();
  28766. xb = xa + stack.shift(); yb = ya + stack.shift();
  28767. x = xb + stack.shift();
  28768. y = yb + (stack.length === 1 ? stack.shift() : 0);
  28769. bezierCurveTo(xa, ya, xb, yb, x, y);
  28770. }
  28771. break;
  28772. default:
  28773. if (v < 32) {
  28774. error('unknown operator: ' + v);
  28775. }
  28776. if (v < 247) {
  28777. stack.push(v - 139);
  28778. } else if (v < 251) {
  28779. stack.push((v - 247) * 256 + code[i++] + 108);
  28780. } else if (v < 255) {
  28781. stack.push(-(v - 251) * 256 - code[i++] - 108);
  28782. } else {
  28783. stack.push(((code[i] << 24) | (code[i + 1] << 16) |
  28784. (code[i + 2] << 8) | code[i + 3]) / 65536);
  28785. i += 4;
  28786. }
  28787. break;
  28788. }
  28789. if (stackClean) {
  28790. stack.length = 0;
  28791. }
  28792. }
  28793. }
  28794. parse(code);
  28795. }
  28796. var noop = '';
  28797. function CompiledFont(fontMatrix) {
  28798. this.compiledGlyphs = {};
  28799. this.fontMatrix = fontMatrix;
  28800. }
  28801. CompiledFont.prototype = {
  28802. getPathJs: function (unicode) {
  28803. var gid = lookupCmap(this.cmap, unicode);
  28804. var fn = this.compiledGlyphs[gid];
  28805. if (!fn) {
  28806. this.compiledGlyphs[gid] = fn = this.compileGlyph(this.glyphs[gid]);
  28807. }
  28808. return fn;
  28809. },
  28810. compileGlyph: function (code) {
  28811. if (!code || code.length === 0 || code[0] === 14) {
  28812. return noop;
  28813. }
  28814. var js = [];
  28815. js.push('c.save();');
  28816. js.push('c.transform(' + this.fontMatrix.join(',') + ');');
  28817. js.push('c.scale(size, -size);');
  28818. this.compileGlyphImpl(code, js);
  28819. js.push('c.restore();');
  28820. return js.join('\n');
  28821. },
  28822. compileGlyphImpl: function () {
  28823. error('Children classes should implement this.');
  28824. },
  28825. hasBuiltPath: function (unicode) {
  28826. var gid = lookupCmap(this.cmap, unicode);
  28827. return gid in this.compiledGlyphs;
  28828. }
  28829. };
  28830. function TrueTypeCompiled(glyphs, cmap, fontMatrix) {
  28831. fontMatrix = fontMatrix || [0.000488, 0, 0, 0.000488, 0, 0];
  28832. CompiledFont.call(this, fontMatrix);
  28833. this.glyphs = glyphs;
  28834. this.cmap = cmap;
  28835. this.compiledGlyphs = [];
  28836. }
  28837. Util.inherit(TrueTypeCompiled, CompiledFont, {
  28838. compileGlyphImpl: function (code, js) {
  28839. compileGlyf(code, js, this);
  28840. }
  28841. });
  28842. function Type2Compiled(cffInfo, cmap, fontMatrix, glyphNameMap) {
  28843. fontMatrix = fontMatrix || [0.001, 0, 0, 0.001, 0, 0];
  28844. CompiledFont.call(this, fontMatrix);
  28845. this.glyphs = cffInfo.glyphs;
  28846. this.gsubrs = cffInfo.gsubrs || [];
  28847. this.subrs = cffInfo.subrs || [];
  28848. this.cmap = cmap;
  28849. this.glyphNameMap = glyphNameMap || GlyphsUnicode;
  28850. this.compiledGlyphs = [];
  28851. this.gsubrsBias = (this.gsubrs.length < 1240 ?
  28852. 107 : (this.gsubrs.length < 33900 ? 1131 : 32768));
  28853. this.subrsBias = (this.subrs.length < 1240 ?
  28854. 107 : (this.subrs.length < 33900 ? 1131 : 32768));
  28855. }
  28856. Util.inherit(Type2Compiled, CompiledFont, {
  28857. compileGlyphImpl: function (code, js) {
  28858. compileCharString(code, js, this);
  28859. }
  28860. });
  28861. return {
  28862. create: function FontRendererFactory_create(font) {
  28863. var data = new Uint8Array(font.data);
  28864. var cmap, glyf, loca, cff, indexToLocFormat, unitsPerEm;
  28865. var numTables = getUshort(data, 4);
  28866. for (var i = 0, p = 12; i < numTables; i++, p += 16) {
  28867. var tag = bytesToString(data.subarray(p, p + 4));
  28868. var offset = getLong(data, p + 8);
  28869. var length = getLong(data, p + 12);
  28870. switch (tag) {
  28871. case 'cmap':
  28872. cmap = parseCmap(data, offset, offset + length);
  28873. break;
  28874. case 'glyf':
  28875. glyf = data.subarray(offset, offset + length);
  28876. break;
  28877. case 'loca':
  28878. loca = data.subarray(offset, offset + length);
  28879. break;
  28880. case 'head':
  28881. unitsPerEm = getUshort(data, offset + 18);
  28882. indexToLocFormat = getUshort(data, offset + 50);
  28883. break;
  28884. case 'CFF ':
  28885. cff = parseCff(data, offset, offset + length);
  28886. break;
  28887. }
  28888. }
  28889. if (glyf) {
  28890. var fontMatrix = (!unitsPerEm ? font.fontMatrix :
  28891. [1 / unitsPerEm, 0, 0, 1 / unitsPerEm, 0, 0]);
  28892. return new TrueTypeCompiled(
  28893. parseGlyfTable(glyf, loca, indexToLocFormat), cmap, fontMatrix);
  28894. } else {
  28895. return new Type2Compiled(cff, cmap, font.fontMatrix, font.glyphNameMap);
  28896. }
  28897. }
  28898. };
  28899. })();
  28900. var GlyphsUnicode = {
  28901. A: 0x0041,
  28902. AE: 0x00C6,
  28903. AEacute: 0x01FC,
  28904. AEmacron: 0x01E2,
  28905. AEsmall: 0xF7E6,
  28906. Aacute: 0x00C1,
  28907. Aacutesmall: 0xF7E1,
  28908. Abreve: 0x0102,
  28909. Abreveacute: 0x1EAE,
  28910. Abrevecyrillic: 0x04D0,
  28911. Abrevedotbelow: 0x1EB6,
  28912. Abrevegrave: 0x1EB0,
  28913. Abrevehookabove: 0x1EB2,
  28914. Abrevetilde: 0x1EB4,
  28915. Acaron: 0x01CD,
  28916. Acircle: 0x24B6,
  28917. Acircumflex: 0x00C2,
  28918. Acircumflexacute: 0x1EA4,
  28919. Acircumflexdotbelow: 0x1EAC,
  28920. Acircumflexgrave: 0x1EA6,
  28921. Acircumflexhookabove: 0x1EA8,
  28922. Acircumflexsmall: 0xF7E2,
  28923. Acircumflextilde: 0x1EAA,
  28924. Acute: 0xF6C9,
  28925. Acutesmall: 0xF7B4,
  28926. Acyrillic: 0x0410,
  28927. Adblgrave: 0x0200,
  28928. Adieresis: 0x00C4,
  28929. Adieresiscyrillic: 0x04D2,
  28930. Adieresismacron: 0x01DE,
  28931. Adieresissmall: 0xF7E4,
  28932. Adotbelow: 0x1EA0,
  28933. Adotmacron: 0x01E0,
  28934. Agrave: 0x00C0,
  28935. Agravesmall: 0xF7E0,
  28936. Ahookabove: 0x1EA2,
  28937. Aiecyrillic: 0x04D4,
  28938. Ainvertedbreve: 0x0202,
  28939. Alpha: 0x0391,
  28940. Alphatonos: 0x0386,
  28941. Amacron: 0x0100,
  28942. Amonospace: 0xFF21,
  28943. Aogonek: 0x0104,
  28944. Aring: 0x00C5,
  28945. Aringacute: 0x01FA,
  28946. Aringbelow: 0x1E00,
  28947. Aringsmall: 0xF7E5,
  28948. Asmall: 0xF761,
  28949. Atilde: 0x00C3,
  28950. Atildesmall: 0xF7E3,
  28951. Aybarmenian: 0x0531,
  28952. B: 0x0042,
  28953. Bcircle: 0x24B7,
  28954. Bdotaccent: 0x1E02,
  28955. Bdotbelow: 0x1E04,
  28956. Becyrillic: 0x0411,
  28957. Benarmenian: 0x0532,
  28958. Beta: 0x0392,
  28959. Bhook: 0x0181,
  28960. Blinebelow: 0x1E06,
  28961. Bmonospace: 0xFF22,
  28962. Brevesmall: 0xF6F4,
  28963. Bsmall: 0xF762,
  28964. Btopbar: 0x0182,
  28965. C: 0x0043,
  28966. Caarmenian: 0x053E,
  28967. Cacute: 0x0106,
  28968. Caron: 0xF6CA,
  28969. Caronsmall: 0xF6F5,
  28970. Ccaron: 0x010C,
  28971. Ccedilla: 0x00C7,
  28972. Ccedillaacute: 0x1E08,
  28973. Ccedillasmall: 0xF7E7,
  28974. Ccircle: 0x24B8,
  28975. Ccircumflex: 0x0108,
  28976. Cdot: 0x010A,
  28977. Cdotaccent: 0x010A,
  28978. Cedillasmall: 0xF7B8,
  28979. Chaarmenian: 0x0549,
  28980. Cheabkhasiancyrillic: 0x04BC,
  28981. Checyrillic: 0x0427,
  28982. Chedescenderabkhasiancyrillic: 0x04BE,
  28983. Chedescendercyrillic: 0x04B6,
  28984. Chedieresiscyrillic: 0x04F4,
  28985. Cheharmenian: 0x0543,
  28986. Chekhakassiancyrillic: 0x04CB,
  28987. Cheverticalstrokecyrillic: 0x04B8,
  28988. Chi: 0x03A7,
  28989. Chook: 0x0187,
  28990. Circumflexsmall: 0xF6F6,
  28991. Cmonospace: 0xFF23,
  28992. Coarmenian: 0x0551,
  28993. Csmall: 0xF763,
  28994. D: 0x0044,
  28995. DZ: 0x01F1,
  28996. DZcaron: 0x01C4,
  28997. Daarmenian: 0x0534,
  28998. Dafrican: 0x0189,
  28999. Dcaron: 0x010E,
  29000. Dcedilla: 0x1E10,
  29001. Dcircle: 0x24B9,
  29002. Dcircumflexbelow: 0x1E12,
  29003. Dcroat: 0x0110,
  29004. Ddotaccent: 0x1E0A,
  29005. Ddotbelow: 0x1E0C,
  29006. Decyrillic: 0x0414,
  29007. Deicoptic: 0x03EE,
  29008. Delta: 0x2206,
  29009. Deltagreek: 0x0394,
  29010. Dhook: 0x018A,
  29011. Dieresis: 0xF6CB,
  29012. DieresisAcute: 0xF6CC,
  29013. DieresisGrave: 0xF6CD,
  29014. Dieresissmall: 0xF7A8,
  29015. Digammagreek: 0x03DC,
  29016. Djecyrillic: 0x0402,
  29017. Dlinebelow: 0x1E0E,
  29018. Dmonospace: 0xFF24,
  29019. Dotaccentsmall: 0xF6F7,
  29020. Dslash: 0x0110,
  29021. Dsmall: 0xF764,
  29022. Dtopbar: 0x018B,
  29023. Dz: 0x01F2,
  29024. Dzcaron: 0x01C5,
  29025. Dzeabkhasiancyrillic: 0x04E0,
  29026. Dzecyrillic: 0x0405,
  29027. Dzhecyrillic: 0x040F,
  29028. E: 0x0045,
  29029. Eacute: 0x00C9,
  29030. Eacutesmall: 0xF7E9,
  29031. Ebreve: 0x0114,
  29032. Ecaron: 0x011A,
  29033. Ecedillabreve: 0x1E1C,
  29034. Echarmenian: 0x0535,
  29035. Ecircle: 0x24BA,
  29036. Ecircumflex: 0x00CA,
  29037. Ecircumflexacute: 0x1EBE,
  29038. Ecircumflexbelow: 0x1E18,
  29039. Ecircumflexdotbelow: 0x1EC6,
  29040. Ecircumflexgrave: 0x1EC0,
  29041. Ecircumflexhookabove: 0x1EC2,
  29042. Ecircumflexsmall: 0xF7EA,
  29043. Ecircumflextilde: 0x1EC4,
  29044. Ecyrillic: 0x0404,
  29045. Edblgrave: 0x0204,
  29046. Edieresis: 0x00CB,
  29047. Edieresissmall: 0xF7EB,
  29048. Edot: 0x0116,
  29049. Edotaccent: 0x0116,
  29050. Edotbelow: 0x1EB8,
  29051. Efcyrillic: 0x0424,
  29052. Egrave: 0x00C8,
  29053. Egravesmall: 0xF7E8,
  29054. Eharmenian: 0x0537,
  29055. Ehookabove: 0x1EBA,
  29056. Eightroman: 0x2167,
  29057. Einvertedbreve: 0x0206,
  29058. Eiotifiedcyrillic: 0x0464,
  29059. Elcyrillic: 0x041B,
  29060. Elevenroman: 0x216A,
  29061. Emacron: 0x0112,
  29062. Emacronacute: 0x1E16,
  29063. Emacrongrave: 0x1E14,
  29064. Emcyrillic: 0x041C,
  29065. Emonospace: 0xFF25,
  29066. Encyrillic: 0x041D,
  29067. Endescendercyrillic: 0x04A2,
  29068. Eng: 0x014A,
  29069. Enghecyrillic: 0x04A4,
  29070. Enhookcyrillic: 0x04C7,
  29071. Eogonek: 0x0118,
  29072. Eopen: 0x0190,
  29073. Epsilon: 0x0395,
  29074. Epsilontonos: 0x0388,
  29075. Ercyrillic: 0x0420,
  29076. Ereversed: 0x018E,
  29077. Ereversedcyrillic: 0x042D,
  29078. Escyrillic: 0x0421,
  29079. Esdescendercyrillic: 0x04AA,
  29080. Esh: 0x01A9,
  29081. Esmall: 0xF765,
  29082. Eta: 0x0397,
  29083. Etarmenian: 0x0538,
  29084. Etatonos: 0x0389,
  29085. Eth: 0x00D0,
  29086. Ethsmall: 0xF7F0,
  29087. Etilde: 0x1EBC,
  29088. Etildebelow: 0x1E1A,
  29089. Euro: 0x20AC,
  29090. Ezh: 0x01B7,
  29091. Ezhcaron: 0x01EE,
  29092. Ezhreversed: 0x01B8,
  29093. F: 0x0046,
  29094. Fcircle: 0x24BB,
  29095. Fdotaccent: 0x1E1E,
  29096. Feharmenian: 0x0556,
  29097. Feicoptic: 0x03E4,
  29098. Fhook: 0x0191,
  29099. Fitacyrillic: 0x0472,
  29100. Fiveroman: 0x2164,
  29101. Fmonospace: 0xFF26,
  29102. Fourroman: 0x2163,
  29103. Fsmall: 0xF766,
  29104. G: 0x0047,
  29105. GBsquare: 0x3387,
  29106. Gacute: 0x01F4,
  29107. Gamma: 0x0393,
  29108. Gammaafrican: 0x0194,
  29109. Gangiacoptic: 0x03EA,
  29110. Gbreve: 0x011E,
  29111. Gcaron: 0x01E6,
  29112. Gcedilla: 0x0122,
  29113. Gcircle: 0x24BC,
  29114. Gcircumflex: 0x011C,
  29115. Gcommaaccent: 0x0122,
  29116. Gdot: 0x0120,
  29117. Gdotaccent: 0x0120,
  29118. Gecyrillic: 0x0413,
  29119. Ghadarmenian: 0x0542,
  29120. Ghemiddlehookcyrillic: 0x0494,
  29121. Ghestrokecyrillic: 0x0492,
  29122. Gheupturncyrillic: 0x0490,
  29123. Ghook: 0x0193,
  29124. Gimarmenian: 0x0533,
  29125. Gjecyrillic: 0x0403,
  29126. Gmacron: 0x1E20,
  29127. Gmonospace: 0xFF27,
  29128. Grave: 0xF6CE,
  29129. Gravesmall: 0xF760,
  29130. Gsmall: 0xF767,
  29131. Gsmallhook: 0x029B,
  29132. Gstroke: 0x01E4,
  29133. H: 0x0048,
  29134. H18533: 0x25CF,
  29135. H18543: 0x25AA,
  29136. H18551: 0x25AB,
  29137. H22073: 0x25A1,
  29138. HPsquare: 0x33CB,
  29139. Haabkhasiancyrillic: 0x04A8,
  29140. Hadescendercyrillic: 0x04B2,
  29141. Hardsigncyrillic: 0x042A,
  29142. Hbar: 0x0126,
  29143. Hbrevebelow: 0x1E2A,
  29144. Hcedilla: 0x1E28,
  29145. Hcircle: 0x24BD,
  29146. Hcircumflex: 0x0124,
  29147. Hdieresis: 0x1E26,
  29148. Hdotaccent: 0x1E22,
  29149. Hdotbelow: 0x1E24,
  29150. Hmonospace: 0xFF28,
  29151. Hoarmenian: 0x0540,
  29152. Horicoptic: 0x03E8,
  29153. Hsmall: 0xF768,
  29154. Hungarumlaut: 0xF6CF,
  29155. Hungarumlautsmall: 0xF6F8,
  29156. Hzsquare: 0x3390,
  29157. I: 0x0049,
  29158. IAcyrillic: 0x042F,
  29159. IJ: 0x0132,
  29160. IUcyrillic: 0x042E,
  29161. Iacute: 0x00CD,
  29162. Iacutesmall: 0xF7ED,
  29163. Ibreve: 0x012C,
  29164. Icaron: 0x01CF,
  29165. Icircle: 0x24BE,
  29166. Icircumflex: 0x00CE,
  29167. Icircumflexsmall: 0xF7EE,
  29168. Icyrillic: 0x0406,
  29169. Idblgrave: 0x0208,
  29170. Idieresis: 0x00CF,
  29171. Idieresisacute: 0x1E2E,
  29172. Idieresiscyrillic: 0x04E4,
  29173. Idieresissmall: 0xF7EF,
  29174. Idot: 0x0130,
  29175. Idotaccent: 0x0130,
  29176. Idotbelow: 0x1ECA,
  29177. Iebrevecyrillic: 0x04D6,
  29178. Iecyrillic: 0x0415,
  29179. Ifraktur: 0x2111,
  29180. Igrave: 0x00CC,
  29181. Igravesmall: 0xF7EC,
  29182. Ihookabove: 0x1EC8,
  29183. Iicyrillic: 0x0418,
  29184. Iinvertedbreve: 0x020A,
  29185. Iishortcyrillic: 0x0419,
  29186. Imacron: 0x012A,
  29187. Imacroncyrillic: 0x04E2,
  29188. Imonospace: 0xFF29,
  29189. Iniarmenian: 0x053B,
  29190. Iocyrillic: 0x0401,
  29191. Iogonek: 0x012E,
  29192. Iota: 0x0399,
  29193. Iotaafrican: 0x0196,
  29194. Iotadieresis: 0x03AA,
  29195. Iotatonos: 0x038A,
  29196. Ismall: 0xF769,
  29197. Istroke: 0x0197,
  29198. Itilde: 0x0128,
  29199. Itildebelow: 0x1E2C,
  29200. Izhitsacyrillic: 0x0474,
  29201. Izhitsadblgravecyrillic: 0x0476,
  29202. J: 0x004A,
  29203. Jaarmenian: 0x0541,
  29204. Jcircle: 0x24BF,
  29205. Jcircumflex: 0x0134,
  29206. Jecyrillic: 0x0408,
  29207. Jheharmenian: 0x054B,
  29208. Jmonospace: 0xFF2A,
  29209. Jsmall: 0xF76A,
  29210. K: 0x004B,
  29211. KBsquare: 0x3385,
  29212. KKsquare: 0x33CD,
  29213. Kabashkircyrillic: 0x04A0,
  29214. Kacute: 0x1E30,
  29215. Kacyrillic: 0x041A,
  29216. Kadescendercyrillic: 0x049A,
  29217. Kahookcyrillic: 0x04C3,
  29218. Kappa: 0x039A,
  29219. Kastrokecyrillic: 0x049E,
  29220. Kaverticalstrokecyrillic: 0x049C,
  29221. Kcaron: 0x01E8,
  29222. Kcedilla: 0x0136,
  29223. Kcircle: 0x24C0,
  29224. Kcommaaccent: 0x0136,
  29225. Kdotbelow: 0x1E32,
  29226. Keharmenian: 0x0554,
  29227. Kenarmenian: 0x053F,
  29228. Khacyrillic: 0x0425,
  29229. Kheicoptic: 0x03E6,
  29230. Khook: 0x0198,
  29231. Kjecyrillic: 0x040C,
  29232. Klinebelow: 0x1E34,
  29233. Kmonospace: 0xFF2B,
  29234. Koppacyrillic: 0x0480,
  29235. Koppagreek: 0x03DE,
  29236. Ksicyrillic: 0x046E,
  29237. Ksmall: 0xF76B,
  29238. L: 0x004C,
  29239. LJ: 0x01C7,
  29240. LL: 0xF6BF,
  29241. Lacute: 0x0139,
  29242. Lambda: 0x039B,
  29243. Lcaron: 0x013D,
  29244. Lcedilla: 0x013B,
  29245. Lcircle: 0x24C1,
  29246. Lcircumflexbelow: 0x1E3C,
  29247. Lcommaaccent: 0x013B,
  29248. Ldot: 0x013F,
  29249. Ldotaccent: 0x013F,
  29250. Ldotbelow: 0x1E36,
  29251. Ldotbelowmacron: 0x1E38,
  29252. Liwnarmenian: 0x053C,
  29253. Lj: 0x01C8,
  29254. Ljecyrillic: 0x0409,
  29255. Llinebelow: 0x1E3A,
  29256. Lmonospace: 0xFF2C,
  29257. Lslash: 0x0141,
  29258. Lslashsmall: 0xF6F9,
  29259. Lsmall: 0xF76C,
  29260. M: 0x004D,
  29261. MBsquare: 0x3386,
  29262. Macron: 0xF6D0,
  29263. Macronsmall: 0xF7AF,
  29264. Macute: 0x1E3E,
  29265. Mcircle: 0x24C2,
  29266. Mdotaccent: 0x1E40,
  29267. Mdotbelow: 0x1E42,
  29268. Menarmenian: 0x0544,
  29269. Mmonospace: 0xFF2D,
  29270. Msmall: 0xF76D,
  29271. Mturned: 0x019C,
  29272. Mu: 0x039C,
  29273. N: 0x004E,
  29274. NJ: 0x01CA,
  29275. Nacute: 0x0143,
  29276. Ncaron: 0x0147,
  29277. Ncedilla: 0x0145,
  29278. Ncircle: 0x24C3,
  29279. Ncircumflexbelow: 0x1E4A,
  29280. Ncommaaccent: 0x0145,
  29281. Ndotaccent: 0x1E44,
  29282. Ndotbelow: 0x1E46,
  29283. Nhookleft: 0x019D,
  29284. Nineroman: 0x2168,
  29285. Nj: 0x01CB,
  29286. Njecyrillic: 0x040A,
  29287. Nlinebelow: 0x1E48,
  29288. Nmonospace: 0xFF2E,
  29289. Nowarmenian: 0x0546,
  29290. Nsmall: 0xF76E,
  29291. Ntilde: 0x00D1,
  29292. Ntildesmall: 0xF7F1,
  29293. Nu: 0x039D,
  29294. O: 0x004F,
  29295. OE: 0x0152,
  29296. OEsmall: 0xF6FA,
  29297. Oacute: 0x00D3,
  29298. Oacutesmall: 0xF7F3,
  29299. Obarredcyrillic: 0x04E8,
  29300. Obarreddieresiscyrillic: 0x04EA,
  29301. Obreve: 0x014E,
  29302. Ocaron: 0x01D1,
  29303. Ocenteredtilde: 0x019F,
  29304. Ocircle: 0x24C4,
  29305. Ocircumflex: 0x00D4,
  29306. Ocircumflexacute: 0x1ED0,
  29307. Ocircumflexdotbelow: 0x1ED8,
  29308. Ocircumflexgrave: 0x1ED2,
  29309. Ocircumflexhookabove: 0x1ED4,
  29310. Ocircumflexsmall: 0xF7F4,
  29311. Ocircumflextilde: 0x1ED6,
  29312. Ocyrillic: 0x041E,
  29313. Odblacute: 0x0150,
  29314. Odblgrave: 0x020C,
  29315. Odieresis: 0x00D6,
  29316. Odieresiscyrillic: 0x04E6,
  29317. Odieresissmall: 0xF7F6,
  29318. Odotbelow: 0x1ECC,
  29319. Ogoneksmall: 0xF6FB,
  29320. Ograve: 0x00D2,
  29321. Ogravesmall: 0xF7F2,
  29322. Oharmenian: 0x0555,
  29323. Ohm: 0x2126,
  29324. Ohookabove: 0x1ECE,
  29325. Ohorn: 0x01A0,
  29326. Ohornacute: 0x1EDA,
  29327. Ohorndotbelow: 0x1EE2,
  29328. Ohorngrave: 0x1EDC,
  29329. Ohornhookabove: 0x1EDE,
  29330. Ohorntilde: 0x1EE0,
  29331. Ohungarumlaut: 0x0150,
  29332. Oi: 0x01A2,
  29333. Oinvertedbreve: 0x020E,
  29334. Omacron: 0x014C,
  29335. Omacronacute: 0x1E52,
  29336. Omacrongrave: 0x1E50,
  29337. Omega: 0x2126,
  29338. Omegacyrillic: 0x0460,
  29339. Omegagreek: 0x03A9,
  29340. Omegaroundcyrillic: 0x047A,
  29341. Omegatitlocyrillic: 0x047C,
  29342. Omegatonos: 0x038F,
  29343. Omicron: 0x039F,
  29344. Omicrontonos: 0x038C,
  29345. Omonospace: 0xFF2F,
  29346. Oneroman: 0x2160,
  29347. Oogonek: 0x01EA,
  29348. Oogonekmacron: 0x01EC,
  29349. Oopen: 0x0186,
  29350. Oslash: 0x00D8,
  29351. Oslashacute: 0x01FE,
  29352. Oslashsmall: 0xF7F8,
  29353. Osmall: 0xF76F,
  29354. Ostrokeacute: 0x01FE,
  29355. Otcyrillic: 0x047E,
  29356. Otilde: 0x00D5,
  29357. Otildeacute: 0x1E4C,
  29358. Otildedieresis: 0x1E4E,
  29359. Otildesmall: 0xF7F5,
  29360. P: 0x0050,
  29361. Pacute: 0x1E54,
  29362. Pcircle: 0x24C5,
  29363. Pdotaccent: 0x1E56,
  29364. Pecyrillic: 0x041F,
  29365. Peharmenian: 0x054A,
  29366. Pemiddlehookcyrillic: 0x04A6,
  29367. Phi: 0x03A6,
  29368. Phook: 0x01A4,
  29369. Pi: 0x03A0,
  29370. Piwrarmenian: 0x0553,
  29371. Pmonospace: 0xFF30,
  29372. Psi: 0x03A8,
  29373. Psicyrillic: 0x0470,
  29374. Psmall: 0xF770,
  29375. Q: 0x0051,
  29376. Qcircle: 0x24C6,
  29377. Qmonospace: 0xFF31,
  29378. Qsmall: 0xF771,
  29379. R: 0x0052,
  29380. Raarmenian: 0x054C,
  29381. Racute: 0x0154,
  29382. Rcaron: 0x0158,
  29383. Rcedilla: 0x0156,
  29384. Rcircle: 0x24C7,
  29385. Rcommaaccent: 0x0156,
  29386. Rdblgrave: 0x0210,
  29387. Rdotaccent: 0x1E58,
  29388. Rdotbelow: 0x1E5A,
  29389. Rdotbelowmacron: 0x1E5C,
  29390. Reharmenian: 0x0550,
  29391. Rfraktur: 0x211C,
  29392. Rho: 0x03A1,
  29393. Ringsmall: 0xF6FC,
  29394. Rinvertedbreve: 0x0212,
  29395. Rlinebelow: 0x1E5E,
  29396. Rmonospace: 0xFF32,
  29397. Rsmall: 0xF772,
  29398. Rsmallinverted: 0x0281,
  29399. Rsmallinvertedsuperior: 0x02B6,
  29400. S: 0x0053,
  29401. SF010000: 0x250C,
  29402. SF020000: 0x2514,
  29403. SF030000: 0x2510,
  29404. SF040000: 0x2518,
  29405. SF050000: 0x253C,
  29406. SF060000: 0x252C,
  29407. SF070000: 0x2534,
  29408. SF080000: 0x251C,
  29409. SF090000: 0x2524,
  29410. SF100000: 0x2500,
  29411. SF110000: 0x2502,
  29412. SF190000: 0x2561,
  29413. SF200000: 0x2562,
  29414. SF210000: 0x2556,
  29415. SF220000: 0x2555,
  29416. SF230000: 0x2563,
  29417. SF240000: 0x2551,
  29418. SF250000: 0x2557,
  29419. SF260000: 0x255D,
  29420. SF270000: 0x255C,
  29421. SF280000: 0x255B,
  29422. SF360000: 0x255E,
  29423. SF370000: 0x255F,
  29424. SF380000: 0x255A,
  29425. SF390000: 0x2554,
  29426. SF400000: 0x2569,
  29427. SF410000: 0x2566,
  29428. SF420000: 0x2560,
  29429. SF430000: 0x2550,
  29430. SF440000: 0x256C,
  29431. SF450000: 0x2567,
  29432. SF460000: 0x2568,
  29433. SF470000: 0x2564,
  29434. SF480000: 0x2565,
  29435. SF490000: 0x2559,
  29436. SF500000: 0x2558,
  29437. SF510000: 0x2552,
  29438. SF520000: 0x2553,
  29439. SF530000: 0x256B,
  29440. SF540000: 0x256A,
  29441. Sacute: 0x015A,
  29442. Sacutedotaccent: 0x1E64,
  29443. Sampigreek: 0x03E0,
  29444. Scaron: 0x0160,
  29445. Scarondotaccent: 0x1E66,
  29446. Scaronsmall: 0xF6FD,
  29447. Scedilla: 0x015E,
  29448. Schwa: 0x018F,
  29449. Schwacyrillic: 0x04D8,
  29450. Schwadieresiscyrillic: 0x04DA,
  29451. Scircle: 0x24C8,
  29452. Scircumflex: 0x015C,
  29453. Scommaaccent: 0x0218,
  29454. Sdotaccent: 0x1E60,
  29455. Sdotbelow: 0x1E62,
  29456. Sdotbelowdotaccent: 0x1E68,
  29457. Seharmenian: 0x054D,
  29458. Sevenroman: 0x2166,
  29459. Shaarmenian: 0x0547,
  29460. Shacyrillic: 0x0428,
  29461. Shchacyrillic: 0x0429,
  29462. Sheicoptic: 0x03E2,
  29463. Shhacyrillic: 0x04BA,
  29464. Shimacoptic: 0x03EC,
  29465. Sigma: 0x03A3,
  29466. Sixroman: 0x2165,
  29467. Smonospace: 0xFF33,
  29468. Softsigncyrillic: 0x042C,
  29469. Ssmall: 0xF773,
  29470. Stigmagreek: 0x03DA,
  29471. T: 0x0054,
  29472. Tau: 0x03A4,
  29473. Tbar: 0x0166,
  29474. Tcaron: 0x0164,
  29475. Tcedilla: 0x0162,
  29476. Tcircle: 0x24C9,
  29477. Tcircumflexbelow: 0x1E70,
  29478. Tcommaaccent: 0x0162,
  29479. Tdotaccent: 0x1E6A,
  29480. Tdotbelow: 0x1E6C,
  29481. Tecyrillic: 0x0422,
  29482. Tedescendercyrillic: 0x04AC,
  29483. Tenroman: 0x2169,
  29484. Tetsecyrillic: 0x04B4,
  29485. Theta: 0x0398,
  29486. Thook: 0x01AC,
  29487. Thorn: 0x00DE,
  29488. Thornsmall: 0xF7FE,
  29489. Threeroman: 0x2162,
  29490. Tildesmall: 0xF6FE,
  29491. Tiwnarmenian: 0x054F,
  29492. Tlinebelow: 0x1E6E,
  29493. Tmonospace: 0xFF34,
  29494. Toarmenian: 0x0539,
  29495. Tonefive: 0x01BC,
  29496. Tonesix: 0x0184,
  29497. Tonetwo: 0x01A7,
  29498. Tretroflexhook: 0x01AE,
  29499. Tsecyrillic: 0x0426,
  29500. Tshecyrillic: 0x040B,
  29501. Tsmall: 0xF774,
  29502. Twelveroman: 0x216B,
  29503. Tworoman: 0x2161,
  29504. U: 0x0055,
  29505. Uacute: 0x00DA,
  29506. Uacutesmall: 0xF7FA,
  29507. Ubreve: 0x016C,
  29508. Ucaron: 0x01D3,
  29509. Ucircle: 0x24CA,
  29510. Ucircumflex: 0x00DB,
  29511. Ucircumflexbelow: 0x1E76,
  29512. Ucircumflexsmall: 0xF7FB,
  29513. Ucyrillic: 0x0423,
  29514. Udblacute: 0x0170,
  29515. Udblgrave: 0x0214,
  29516. Udieresis: 0x00DC,
  29517. Udieresisacute: 0x01D7,
  29518. Udieresisbelow: 0x1E72,
  29519. Udieresiscaron: 0x01D9,
  29520. Udieresiscyrillic: 0x04F0,
  29521. Udieresisgrave: 0x01DB,
  29522. Udieresismacron: 0x01D5,
  29523. Udieresissmall: 0xF7FC,
  29524. Udotbelow: 0x1EE4,
  29525. Ugrave: 0x00D9,
  29526. Ugravesmall: 0xF7F9,
  29527. Uhookabove: 0x1EE6,
  29528. Uhorn: 0x01AF,
  29529. Uhornacute: 0x1EE8,
  29530. Uhorndotbelow: 0x1EF0,
  29531. Uhorngrave: 0x1EEA,
  29532. Uhornhookabove: 0x1EEC,
  29533. Uhorntilde: 0x1EEE,
  29534. Uhungarumlaut: 0x0170,
  29535. Uhungarumlautcyrillic: 0x04F2,
  29536. Uinvertedbreve: 0x0216,
  29537. Ukcyrillic: 0x0478,
  29538. Umacron: 0x016A,
  29539. Umacroncyrillic: 0x04EE,
  29540. Umacrondieresis: 0x1E7A,
  29541. Umonospace: 0xFF35,
  29542. Uogonek: 0x0172,
  29543. Upsilon: 0x03A5,
  29544. Upsilon1: 0x03D2,
  29545. Upsilonacutehooksymbolgreek: 0x03D3,
  29546. Upsilonafrican: 0x01B1,
  29547. Upsilondieresis: 0x03AB,
  29548. Upsilondieresishooksymbolgreek: 0x03D4,
  29549. Upsilonhooksymbol: 0x03D2,
  29550. Upsilontonos: 0x038E,
  29551. Uring: 0x016E,
  29552. Ushortcyrillic: 0x040E,
  29553. Usmall: 0xF775,
  29554. Ustraightcyrillic: 0x04AE,
  29555. Ustraightstrokecyrillic: 0x04B0,
  29556. Utilde: 0x0168,
  29557. Utildeacute: 0x1E78,
  29558. Utildebelow: 0x1E74,
  29559. V: 0x0056,
  29560. Vcircle: 0x24CB,
  29561. Vdotbelow: 0x1E7E,
  29562. Vecyrillic: 0x0412,
  29563. Vewarmenian: 0x054E,
  29564. Vhook: 0x01B2,
  29565. Vmonospace: 0xFF36,
  29566. Voarmenian: 0x0548,
  29567. Vsmall: 0xF776,
  29568. Vtilde: 0x1E7C,
  29569. W: 0x0057,
  29570. Wacute: 0x1E82,
  29571. Wcircle: 0x24CC,
  29572. Wcircumflex: 0x0174,
  29573. Wdieresis: 0x1E84,
  29574. Wdotaccent: 0x1E86,
  29575. Wdotbelow: 0x1E88,
  29576. Wgrave: 0x1E80,
  29577. Wmonospace: 0xFF37,
  29578. Wsmall: 0xF777,
  29579. X: 0x0058,
  29580. Xcircle: 0x24CD,
  29581. Xdieresis: 0x1E8C,
  29582. Xdotaccent: 0x1E8A,
  29583. Xeharmenian: 0x053D,
  29584. Xi: 0x039E,
  29585. Xmonospace: 0xFF38,
  29586. Xsmall: 0xF778,
  29587. Y: 0x0059,
  29588. Yacute: 0x00DD,
  29589. Yacutesmall: 0xF7FD,
  29590. Yatcyrillic: 0x0462,
  29591. Ycircle: 0x24CE,
  29592. Ycircumflex: 0x0176,
  29593. Ydieresis: 0x0178,
  29594. Ydieresissmall: 0xF7FF,
  29595. Ydotaccent: 0x1E8E,
  29596. Ydotbelow: 0x1EF4,
  29597. Yericyrillic: 0x042B,
  29598. Yerudieresiscyrillic: 0x04F8,
  29599. Ygrave: 0x1EF2,
  29600. Yhook: 0x01B3,
  29601. Yhookabove: 0x1EF6,
  29602. Yiarmenian: 0x0545,
  29603. Yicyrillic: 0x0407,
  29604. Yiwnarmenian: 0x0552,
  29605. Ymonospace: 0xFF39,
  29606. Ysmall: 0xF779,
  29607. Ytilde: 0x1EF8,
  29608. Yusbigcyrillic: 0x046A,
  29609. Yusbigiotifiedcyrillic: 0x046C,
  29610. Yuslittlecyrillic: 0x0466,
  29611. Yuslittleiotifiedcyrillic: 0x0468,
  29612. Z: 0x005A,
  29613. Zaarmenian: 0x0536,
  29614. Zacute: 0x0179,
  29615. Zcaron: 0x017D,
  29616. Zcaronsmall: 0xF6FF,
  29617. Zcircle: 0x24CF,
  29618. Zcircumflex: 0x1E90,
  29619. Zdot: 0x017B,
  29620. Zdotaccent: 0x017B,
  29621. Zdotbelow: 0x1E92,
  29622. Zecyrillic: 0x0417,
  29623. Zedescendercyrillic: 0x0498,
  29624. Zedieresiscyrillic: 0x04DE,
  29625. Zeta: 0x0396,
  29626. Zhearmenian: 0x053A,
  29627. Zhebrevecyrillic: 0x04C1,
  29628. Zhecyrillic: 0x0416,
  29629. Zhedescendercyrillic: 0x0496,
  29630. Zhedieresiscyrillic: 0x04DC,
  29631. Zlinebelow: 0x1E94,
  29632. Zmonospace: 0xFF3A,
  29633. Zsmall: 0xF77A,
  29634. Zstroke: 0x01B5,
  29635. a: 0x0061,
  29636. aabengali: 0x0986,
  29637. aacute: 0x00E1,
  29638. aadeva: 0x0906,
  29639. aagujarati: 0x0A86,
  29640. aagurmukhi: 0x0A06,
  29641. aamatragurmukhi: 0x0A3E,
  29642. aarusquare: 0x3303,
  29643. aavowelsignbengali: 0x09BE,
  29644. aavowelsigndeva: 0x093E,
  29645. aavowelsigngujarati: 0x0ABE,
  29646. abbreviationmarkarmenian: 0x055F,
  29647. abbreviationsigndeva: 0x0970,
  29648. abengali: 0x0985,
  29649. abopomofo: 0x311A,
  29650. abreve: 0x0103,
  29651. abreveacute: 0x1EAF,
  29652. abrevecyrillic: 0x04D1,
  29653. abrevedotbelow: 0x1EB7,
  29654. abrevegrave: 0x1EB1,
  29655. abrevehookabove: 0x1EB3,
  29656. abrevetilde: 0x1EB5,
  29657. acaron: 0x01CE,
  29658. acircle: 0x24D0,
  29659. acircumflex: 0x00E2,
  29660. acircumflexacute: 0x1EA5,
  29661. acircumflexdotbelow: 0x1EAD,
  29662. acircumflexgrave: 0x1EA7,
  29663. acircumflexhookabove: 0x1EA9,
  29664. acircumflextilde: 0x1EAB,
  29665. acute: 0x00B4,
  29666. acutebelowcmb: 0x0317,
  29667. acutecmb: 0x0301,
  29668. acutecomb: 0x0301,
  29669. acutedeva: 0x0954,
  29670. acutelowmod: 0x02CF,
  29671. acutetonecmb: 0x0341,
  29672. acyrillic: 0x0430,
  29673. adblgrave: 0x0201,
  29674. addakgurmukhi: 0x0A71,
  29675. adeva: 0x0905,
  29676. adieresis: 0x00E4,
  29677. adieresiscyrillic: 0x04D3,
  29678. adieresismacron: 0x01DF,
  29679. adotbelow: 0x1EA1,
  29680. adotmacron: 0x01E1,
  29681. ae: 0x00E6,
  29682. aeacute: 0x01FD,
  29683. aekorean: 0x3150,
  29684. aemacron: 0x01E3,
  29685. afii00208: 0x2015,
  29686. afii08941: 0x20A4,
  29687. afii10017: 0x0410,
  29688. afii10018: 0x0411,
  29689. afii10019: 0x0412,
  29690. afii10020: 0x0413,
  29691. afii10021: 0x0414,
  29692. afii10022: 0x0415,
  29693. afii10023: 0x0401,
  29694. afii10024: 0x0416,
  29695. afii10025: 0x0417,
  29696. afii10026: 0x0418,
  29697. afii10027: 0x0419,
  29698. afii10028: 0x041A,
  29699. afii10029: 0x041B,
  29700. afii10030: 0x041C,
  29701. afii10031: 0x041D,
  29702. afii10032: 0x041E,
  29703. afii10033: 0x041F,
  29704. afii10034: 0x0420,
  29705. afii10035: 0x0421,
  29706. afii10036: 0x0422,
  29707. afii10037: 0x0423,
  29708. afii10038: 0x0424,
  29709. afii10039: 0x0425,
  29710. afii10040: 0x0426,
  29711. afii10041: 0x0427,
  29712. afii10042: 0x0428,
  29713. afii10043: 0x0429,
  29714. afii10044: 0x042A,
  29715. afii10045: 0x042B,
  29716. afii10046: 0x042C,
  29717. afii10047: 0x042D,
  29718. afii10048: 0x042E,
  29719. afii10049: 0x042F,
  29720. afii10050: 0x0490,
  29721. afii10051: 0x0402,
  29722. afii10052: 0x0403,
  29723. afii10053: 0x0404,
  29724. afii10054: 0x0405,
  29725. afii10055: 0x0406,
  29726. afii10056: 0x0407,
  29727. afii10057: 0x0408,
  29728. afii10058: 0x0409,
  29729. afii10059: 0x040A,
  29730. afii10060: 0x040B,
  29731. afii10061: 0x040C,
  29732. afii10062: 0x040E,
  29733. afii10063: 0xF6C4,
  29734. afii10064: 0xF6C5,
  29735. afii10065: 0x0430,
  29736. afii10066: 0x0431,
  29737. afii10067: 0x0432,
  29738. afii10068: 0x0433,
  29739. afii10069: 0x0434,
  29740. afii10070: 0x0435,
  29741. afii10071: 0x0451,
  29742. afii10072: 0x0436,
  29743. afii10073: 0x0437,
  29744. afii10074: 0x0438,
  29745. afii10075: 0x0439,
  29746. afii10076: 0x043A,
  29747. afii10077: 0x043B,
  29748. afii10078: 0x043C,
  29749. afii10079: 0x043D,
  29750. afii10080: 0x043E,
  29751. afii10081: 0x043F,
  29752. afii10082: 0x0440,
  29753. afii10083: 0x0441,
  29754. afii10084: 0x0442,
  29755. afii10085: 0x0443,
  29756. afii10086: 0x0444,
  29757. afii10087: 0x0445,
  29758. afii10088: 0x0446,
  29759. afii10089: 0x0447,
  29760. afii10090: 0x0448,
  29761. afii10091: 0x0449,
  29762. afii10092: 0x044A,
  29763. afii10093: 0x044B,
  29764. afii10094: 0x044C,
  29765. afii10095: 0x044D,
  29766. afii10096: 0x044E,
  29767. afii10097: 0x044F,
  29768. afii10098: 0x0491,
  29769. afii10099: 0x0452,
  29770. afii10100: 0x0453,
  29771. afii10101: 0x0454,
  29772. afii10102: 0x0455,
  29773. afii10103: 0x0456,
  29774. afii10104: 0x0457,
  29775. afii10105: 0x0458,
  29776. afii10106: 0x0459,
  29777. afii10107: 0x045A,
  29778. afii10108: 0x045B,
  29779. afii10109: 0x045C,
  29780. afii10110: 0x045E,
  29781. afii10145: 0x040F,
  29782. afii10146: 0x0462,
  29783. afii10147: 0x0472,
  29784. afii10148: 0x0474,
  29785. afii10192: 0xF6C6,
  29786. afii10193: 0x045F,
  29787. afii10194: 0x0463,
  29788. afii10195: 0x0473,
  29789. afii10196: 0x0475,
  29790. afii10831: 0xF6C7,
  29791. afii10832: 0xF6C8,
  29792. afii10846: 0x04D9,
  29793. afii299: 0x200E,
  29794. afii300: 0x200F,
  29795. afii301: 0x200D,
  29796. afii57381: 0x066A,
  29797. afii57388: 0x060C,
  29798. afii57392: 0x0660,
  29799. afii57393: 0x0661,
  29800. afii57394: 0x0662,
  29801. afii57395: 0x0663,
  29802. afii57396: 0x0664,
  29803. afii57397: 0x0665,
  29804. afii57398: 0x0666,
  29805. afii57399: 0x0667,
  29806. afii57400: 0x0668,
  29807. afii57401: 0x0669,
  29808. afii57403: 0x061B,
  29809. afii57407: 0x061F,
  29810. afii57409: 0x0621,
  29811. afii57410: 0x0622,
  29812. afii57411: 0x0623,
  29813. afii57412: 0x0624,
  29814. afii57413: 0x0625,
  29815. afii57414: 0x0626,
  29816. afii57415: 0x0627,
  29817. afii57416: 0x0628,
  29818. afii57417: 0x0629,
  29819. afii57418: 0x062A,
  29820. afii57419: 0x062B,
  29821. afii57420: 0x062C,
  29822. afii57421: 0x062D,
  29823. afii57422: 0x062E,
  29824. afii57423: 0x062F,
  29825. afii57424: 0x0630,
  29826. afii57425: 0x0631,
  29827. afii57426: 0x0632,
  29828. afii57427: 0x0633,
  29829. afii57428: 0x0634,
  29830. afii57429: 0x0635,
  29831. afii57430: 0x0636,
  29832. afii57431: 0x0637,
  29833. afii57432: 0x0638,
  29834. afii57433: 0x0639,
  29835. afii57434: 0x063A,
  29836. afii57440: 0x0640,
  29837. afii57441: 0x0641,
  29838. afii57442: 0x0642,
  29839. afii57443: 0x0643,
  29840. afii57444: 0x0644,
  29841. afii57445: 0x0645,
  29842. afii57446: 0x0646,
  29843. afii57448: 0x0648,
  29844. afii57449: 0x0649,
  29845. afii57450: 0x064A,
  29846. afii57451: 0x064B,
  29847. afii57452: 0x064C,
  29848. afii57453: 0x064D,
  29849. afii57454: 0x064E,
  29850. afii57455: 0x064F,
  29851. afii57456: 0x0650,
  29852. afii57457: 0x0651,
  29853. afii57458: 0x0652,
  29854. afii57470: 0x0647,
  29855. afii57505: 0x06A4,
  29856. afii57506: 0x067E,
  29857. afii57507: 0x0686,
  29858. afii57508: 0x0698,
  29859. afii57509: 0x06AF,
  29860. afii57511: 0x0679,
  29861. afii57512: 0x0688,
  29862. afii57513: 0x0691,
  29863. afii57514: 0x06BA,
  29864. afii57519: 0x06D2,
  29865. afii57534: 0x06D5,
  29866. afii57636: 0x20AA,
  29867. afii57645: 0x05BE,
  29868. afii57658: 0x05C3,
  29869. afii57664: 0x05D0,
  29870. afii57665: 0x05D1,
  29871. afii57666: 0x05D2,
  29872. afii57667: 0x05D3,
  29873. afii57668: 0x05D4,
  29874. afii57669: 0x05D5,
  29875. afii57670: 0x05D6,
  29876. afii57671: 0x05D7,
  29877. afii57672: 0x05D8,
  29878. afii57673: 0x05D9,
  29879. afii57674: 0x05DA,
  29880. afii57675: 0x05DB,
  29881. afii57676: 0x05DC,
  29882. afii57677: 0x05DD,
  29883. afii57678: 0x05DE,
  29884. afii57679: 0x05DF,
  29885. afii57680: 0x05E0,
  29886. afii57681: 0x05E1,
  29887. afii57682: 0x05E2,
  29888. afii57683: 0x05E3,
  29889. afii57684: 0x05E4,
  29890. afii57685: 0x05E5,
  29891. afii57686: 0x05E6,
  29892. afii57687: 0x05E7,
  29893. afii57688: 0x05E8,
  29894. afii57689: 0x05E9,
  29895. afii57690: 0x05EA,
  29896. afii57694: 0xFB2A,
  29897. afii57695: 0xFB2B,
  29898. afii57700: 0xFB4B,
  29899. afii57705: 0xFB1F,
  29900. afii57716: 0x05F0,
  29901. afii57717: 0x05F1,
  29902. afii57718: 0x05F2,
  29903. afii57723: 0xFB35,
  29904. afii57793: 0x05B4,
  29905. afii57794: 0x05B5,
  29906. afii57795: 0x05B6,
  29907. afii57796: 0x05BB,
  29908. afii57797: 0x05B8,
  29909. afii57798: 0x05B7,
  29910. afii57799: 0x05B0,
  29911. afii57800: 0x05B2,
  29912. afii57801: 0x05B1,
  29913. afii57802: 0x05B3,
  29914. afii57803: 0x05C2,
  29915. afii57804: 0x05C1,
  29916. afii57806: 0x05B9,
  29917. afii57807: 0x05BC,
  29918. afii57839: 0x05BD,
  29919. afii57841: 0x05BF,
  29920. afii57842: 0x05C0,
  29921. afii57929: 0x02BC,
  29922. afii61248: 0x2105,
  29923. afii61289: 0x2113,
  29924. afii61352: 0x2116,
  29925. afii61573: 0x202C,
  29926. afii61574: 0x202D,
  29927. afii61575: 0x202E,
  29928. afii61664: 0x200C,
  29929. afii63167: 0x066D,
  29930. afii64937: 0x02BD,
  29931. agrave: 0x00E0,
  29932. agujarati: 0x0A85,
  29933. agurmukhi: 0x0A05,
  29934. ahiragana: 0x3042,
  29935. ahookabove: 0x1EA3,
  29936. aibengali: 0x0990,
  29937. aibopomofo: 0x311E,
  29938. aideva: 0x0910,
  29939. aiecyrillic: 0x04D5,
  29940. aigujarati: 0x0A90,
  29941. aigurmukhi: 0x0A10,
  29942. aimatragurmukhi: 0x0A48,
  29943. ainarabic: 0x0639,
  29944. ainfinalarabic: 0xFECA,
  29945. aininitialarabic: 0xFECB,
  29946. ainmedialarabic: 0xFECC,
  29947. ainvertedbreve: 0x0203,
  29948. aivowelsignbengali: 0x09C8,
  29949. aivowelsigndeva: 0x0948,
  29950. aivowelsigngujarati: 0x0AC8,
  29951. akatakana: 0x30A2,
  29952. akatakanahalfwidth: 0xFF71,
  29953. akorean: 0x314F,
  29954. alef: 0x05D0,
  29955. alefarabic: 0x0627,
  29956. alefdageshhebrew: 0xFB30,
  29957. aleffinalarabic: 0xFE8E,
  29958. alefhamzaabovearabic: 0x0623,
  29959. alefhamzaabovefinalarabic: 0xFE84,
  29960. alefhamzabelowarabic: 0x0625,
  29961. alefhamzabelowfinalarabic: 0xFE88,
  29962. alefhebrew: 0x05D0,
  29963. aleflamedhebrew: 0xFB4F,
  29964. alefmaddaabovearabic: 0x0622,
  29965. alefmaddaabovefinalarabic: 0xFE82,
  29966. alefmaksuraarabic: 0x0649,
  29967. alefmaksurafinalarabic: 0xFEF0,
  29968. alefmaksurainitialarabic: 0xFEF3,
  29969. alefmaksuramedialarabic: 0xFEF4,
  29970. alefpatahhebrew: 0xFB2E,
  29971. alefqamatshebrew: 0xFB2F,
  29972. aleph: 0x2135,
  29973. allequal: 0x224C,
  29974. alpha: 0x03B1,
  29975. alphatonos: 0x03AC,
  29976. amacron: 0x0101,
  29977. amonospace: 0xFF41,
  29978. ampersand: 0x0026,
  29979. ampersandmonospace: 0xFF06,
  29980. ampersandsmall: 0xF726,
  29981. amsquare: 0x33C2,
  29982. anbopomofo: 0x3122,
  29983. angbopomofo: 0x3124,
  29984. angbracketleft: 0x3008, // This glyph is missing from Adobe's original list.
  29985. angbracketright: 0x3009, // This glyph is missing from Adobe's original list.
  29986. angkhankhuthai: 0x0E5A,
  29987. angle: 0x2220,
  29988. anglebracketleft: 0x3008,
  29989. anglebracketleftvertical: 0xFE3F,
  29990. anglebracketright: 0x3009,
  29991. anglebracketrightvertical: 0xFE40,
  29992. angleleft: 0x2329,
  29993. angleright: 0x232A,
  29994. angstrom: 0x212B,
  29995. anoteleia: 0x0387,
  29996. anudattadeva: 0x0952,
  29997. anusvarabengali: 0x0982,
  29998. anusvaradeva: 0x0902,
  29999. anusvaragujarati: 0x0A82,
  30000. aogonek: 0x0105,
  30001. apaatosquare: 0x3300,
  30002. aparen: 0x249C,
  30003. apostrophearmenian: 0x055A,
  30004. apostrophemod: 0x02BC,
  30005. apple: 0xF8FF,
  30006. approaches: 0x2250,
  30007. approxequal: 0x2248,
  30008. approxequalorimage: 0x2252,
  30009. approximatelyequal: 0x2245,
  30010. araeaekorean: 0x318E,
  30011. araeakorean: 0x318D,
  30012. arc: 0x2312,
  30013. arighthalfring: 0x1E9A,
  30014. aring: 0x00E5,
  30015. aringacute: 0x01FB,
  30016. aringbelow: 0x1E01,
  30017. arrowboth: 0x2194,
  30018. arrowdashdown: 0x21E3,
  30019. arrowdashleft: 0x21E0,
  30020. arrowdashright: 0x21E2,
  30021. arrowdashup: 0x21E1,
  30022. arrowdblboth: 0x21D4,
  30023. arrowdbldown: 0x21D3,
  30024. arrowdblleft: 0x21D0,
  30025. arrowdblright: 0x21D2,
  30026. arrowdblup: 0x21D1,
  30027. arrowdown: 0x2193,
  30028. arrowdownleft: 0x2199,
  30029. arrowdownright: 0x2198,
  30030. arrowdownwhite: 0x21E9,
  30031. arrowheaddownmod: 0x02C5,
  30032. arrowheadleftmod: 0x02C2,
  30033. arrowheadrightmod: 0x02C3,
  30034. arrowheadupmod: 0x02C4,
  30035. arrowhorizex: 0xF8E7,
  30036. arrowleft: 0x2190,
  30037. arrowleftdbl: 0x21D0,
  30038. arrowleftdblstroke: 0x21CD,
  30039. arrowleftoverright: 0x21C6,
  30040. arrowleftwhite: 0x21E6,
  30041. arrowright: 0x2192,
  30042. arrowrightdblstroke: 0x21CF,
  30043. arrowrightheavy: 0x279E,
  30044. arrowrightoverleft: 0x21C4,
  30045. arrowrightwhite: 0x21E8,
  30046. arrowtableft: 0x21E4,
  30047. arrowtabright: 0x21E5,
  30048. arrowup: 0x2191,
  30049. arrowupdn: 0x2195,
  30050. arrowupdnbse: 0x21A8,
  30051. arrowupdownbase: 0x21A8,
  30052. arrowupleft: 0x2196,
  30053. arrowupleftofdown: 0x21C5,
  30054. arrowupright: 0x2197,
  30055. arrowupwhite: 0x21E7,
  30056. arrowvertex: 0xF8E6,
  30057. asciicircum: 0x005E,
  30058. asciicircummonospace: 0xFF3E,
  30059. asciitilde: 0x007E,
  30060. asciitildemonospace: 0xFF5E,
  30061. ascript: 0x0251,
  30062. ascriptturned: 0x0252,
  30063. asmallhiragana: 0x3041,
  30064. asmallkatakana: 0x30A1,
  30065. asmallkatakanahalfwidth: 0xFF67,
  30066. asterisk: 0x002A,
  30067. asteriskaltonearabic: 0x066D,
  30068. asteriskarabic: 0x066D,
  30069. asteriskmath: 0x2217,
  30070. asteriskmonospace: 0xFF0A,
  30071. asterisksmall: 0xFE61,
  30072. asterism: 0x2042,
  30073. asuperior: 0xF6E9,
  30074. asymptoticallyequal: 0x2243,
  30075. at: 0x0040,
  30076. atilde: 0x00E3,
  30077. atmonospace: 0xFF20,
  30078. atsmall: 0xFE6B,
  30079. aturned: 0x0250,
  30080. aubengali: 0x0994,
  30081. aubopomofo: 0x3120,
  30082. audeva: 0x0914,
  30083. augujarati: 0x0A94,
  30084. augurmukhi: 0x0A14,
  30085. aulengthmarkbengali: 0x09D7,
  30086. aumatragurmukhi: 0x0A4C,
  30087. auvowelsignbengali: 0x09CC,
  30088. auvowelsigndeva: 0x094C,
  30089. auvowelsigngujarati: 0x0ACC,
  30090. avagrahadeva: 0x093D,
  30091. aybarmenian: 0x0561,
  30092. ayin: 0x05E2,
  30093. ayinaltonehebrew: 0xFB20,
  30094. ayinhebrew: 0x05E2,
  30095. b: 0x0062,
  30096. babengali: 0x09AC,
  30097. backslash: 0x005C,
  30098. backslashmonospace: 0xFF3C,
  30099. badeva: 0x092C,
  30100. bagujarati: 0x0AAC,
  30101. bagurmukhi: 0x0A2C,
  30102. bahiragana: 0x3070,
  30103. bahtthai: 0x0E3F,
  30104. bakatakana: 0x30D0,
  30105. bar: 0x007C,
  30106. barmonospace: 0xFF5C,
  30107. bbopomofo: 0x3105,
  30108. bcircle: 0x24D1,
  30109. bdotaccent: 0x1E03,
  30110. bdotbelow: 0x1E05,
  30111. beamedsixteenthnotes: 0x266C,
  30112. because: 0x2235,
  30113. becyrillic: 0x0431,
  30114. beharabic: 0x0628,
  30115. behfinalarabic: 0xFE90,
  30116. behinitialarabic: 0xFE91,
  30117. behiragana: 0x3079,
  30118. behmedialarabic: 0xFE92,
  30119. behmeeminitialarabic: 0xFC9F,
  30120. behmeemisolatedarabic: 0xFC08,
  30121. behnoonfinalarabic: 0xFC6D,
  30122. bekatakana: 0x30D9,
  30123. benarmenian: 0x0562,
  30124. bet: 0x05D1,
  30125. beta: 0x03B2,
  30126. betasymbolgreek: 0x03D0,
  30127. betdagesh: 0xFB31,
  30128. betdageshhebrew: 0xFB31,
  30129. bethebrew: 0x05D1,
  30130. betrafehebrew: 0xFB4C,
  30131. bhabengali: 0x09AD,
  30132. bhadeva: 0x092D,
  30133. bhagujarati: 0x0AAD,
  30134. bhagurmukhi: 0x0A2D,
  30135. bhook: 0x0253,
  30136. bihiragana: 0x3073,
  30137. bikatakana: 0x30D3,
  30138. bilabialclick: 0x0298,
  30139. bindigurmukhi: 0x0A02,
  30140. birusquare: 0x3331,
  30141. blackcircle: 0x25CF,
  30142. blackdiamond: 0x25C6,
  30143. blackdownpointingtriangle: 0x25BC,
  30144. blackleftpointingpointer: 0x25C4,
  30145. blackleftpointingtriangle: 0x25C0,
  30146. blacklenticularbracketleft: 0x3010,
  30147. blacklenticularbracketleftvertical: 0xFE3B,
  30148. blacklenticularbracketright: 0x3011,
  30149. blacklenticularbracketrightvertical: 0xFE3C,
  30150. blacklowerlefttriangle: 0x25E3,
  30151. blacklowerrighttriangle: 0x25E2,
  30152. blackrectangle: 0x25AC,
  30153. blackrightpointingpointer: 0x25BA,
  30154. blackrightpointingtriangle: 0x25B6,
  30155. blacksmallsquare: 0x25AA,
  30156. blacksmilingface: 0x263B,
  30157. blacksquare: 0x25A0,
  30158. blackstar: 0x2605,
  30159. blackupperlefttriangle: 0x25E4,
  30160. blackupperrighttriangle: 0x25E5,
  30161. blackuppointingsmalltriangle: 0x25B4,
  30162. blackuppointingtriangle: 0x25B2,
  30163. blank: 0x2423,
  30164. blinebelow: 0x1E07,
  30165. block: 0x2588,
  30166. bmonospace: 0xFF42,
  30167. bobaimaithai: 0x0E1A,
  30168. bohiragana: 0x307C,
  30169. bokatakana: 0x30DC,
  30170. bparen: 0x249D,
  30171. bqsquare: 0x33C3,
  30172. braceex: 0xF8F4,
  30173. braceleft: 0x007B,
  30174. braceleftbt: 0xF8F3,
  30175. braceleftmid: 0xF8F2,
  30176. braceleftmonospace: 0xFF5B,
  30177. braceleftsmall: 0xFE5B,
  30178. bracelefttp: 0xF8F1,
  30179. braceleftvertical: 0xFE37,
  30180. braceright: 0x007D,
  30181. bracerightbt: 0xF8FE,
  30182. bracerightmid: 0xF8FD,
  30183. bracerightmonospace: 0xFF5D,
  30184. bracerightsmall: 0xFE5C,
  30185. bracerighttp: 0xF8FC,
  30186. bracerightvertical: 0xFE38,
  30187. bracketleft: 0x005B,
  30188. bracketleftbt: 0xF8F0,
  30189. bracketleftex: 0xF8EF,
  30190. bracketleftmonospace: 0xFF3B,
  30191. bracketlefttp: 0xF8EE,
  30192. bracketright: 0x005D,
  30193. bracketrightbt: 0xF8FB,
  30194. bracketrightex: 0xF8FA,
  30195. bracketrightmonospace: 0xFF3D,
  30196. bracketrighttp: 0xF8F9,
  30197. breve: 0x02D8,
  30198. brevebelowcmb: 0x032E,
  30199. brevecmb: 0x0306,
  30200. breveinvertedbelowcmb: 0x032F,
  30201. breveinvertedcmb: 0x0311,
  30202. breveinverteddoublecmb: 0x0361,
  30203. bridgebelowcmb: 0x032A,
  30204. bridgeinvertedbelowcmb: 0x033A,
  30205. brokenbar: 0x00A6,
  30206. bstroke: 0x0180,
  30207. bsuperior: 0xF6EA,
  30208. btopbar: 0x0183,
  30209. buhiragana: 0x3076,
  30210. bukatakana: 0x30D6,
  30211. bullet: 0x2022,
  30212. bulletinverse: 0x25D8,
  30213. bulletoperator: 0x2219,
  30214. bullseye: 0x25CE,
  30215. c: 0x0063,
  30216. caarmenian: 0x056E,
  30217. cabengali: 0x099A,
  30218. cacute: 0x0107,
  30219. cadeva: 0x091A,
  30220. cagujarati: 0x0A9A,
  30221. cagurmukhi: 0x0A1A,
  30222. calsquare: 0x3388,
  30223. candrabindubengali: 0x0981,
  30224. candrabinducmb: 0x0310,
  30225. candrabindudeva: 0x0901,
  30226. candrabindugujarati: 0x0A81,
  30227. capslock: 0x21EA,
  30228. careof: 0x2105,
  30229. caron: 0x02C7,
  30230. caronbelowcmb: 0x032C,
  30231. caroncmb: 0x030C,
  30232. carriagereturn: 0x21B5,
  30233. cbopomofo: 0x3118,
  30234. ccaron: 0x010D,
  30235. ccedilla: 0x00E7,
  30236. ccedillaacute: 0x1E09,
  30237. ccircle: 0x24D2,
  30238. ccircumflex: 0x0109,
  30239. ccurl: 0x0255,
  30240. cdot: 0x010B,
  30241. cdotaccent: 0x010B,
  30242. cdsquare: 0x33C5,
  30243. cedilla: 0x00B8,
  30244. cedillacmb: 0x0327,
  30245. cent: 0x00A2,
  30246. centigrade: 0x2103,
  30247. centinferior: 0xF6DF,
  30248. centmonospace: 0xFFE0,
  30249. centoldstyle: 0xF7A2,
  30250. centsuperior: 0xF6E0,
  30251. chaarmenian: 0x0579,
  30252. chabengali: 0x099B,
  30253. chadeva: 0x091B,
  30254. chagujarati: 0x0A9B,
  30255. chagurmukhi: 0x0A1B,
  30256. chbopomofo: 0x3114,
  30257. cheabkhasiancyrillic: 0x04BD,
  30258. checkmark: 0x2713,
  30259. checyrillic: 0x0447,
  30260. chedescenderabkhasiancyrillic: 0x04BF,
  30261. chedescendercyrillic: 0x04B7,
  30262. chedieresiscyrillic: 0x04F5,
  30263. cheharmenian: 0x0573,
  30264. chekhakassiancyrillic: 0x04CC,
  30265. cheverticalstrokecyrillic: 0x04B9,
  30266. chi: 0x03C7,
  30267. chieuchacirclekorean: 0x3277,
  30268. chieuchaparenkorean: 0x3217,
  30269. chieuchcirclekorean: 0x3269,
  30270. chieuchkorean: 0x314A,
  30271. chieuchparenkorean: 0x3209,
  30272. chochangthai: 0x0E0A,
  30273. chochanthai: 0x0E08,
  30274. chochingthai: 0x0E09,
  30275. chochoethai: 0x0E0C,
  30276. chook: 0x0188,
  30277. cieucacirclekorean: 0x3276,
  30278. cieucaparenkorean: 0x3216,
  30279. cieuccirclekorean: 0x3268,
  30280. cieuckorean: 0x3148,
  30281. cieucparenkorean: 0x3208,
  30282. cieucuparenkorean: 0x321C,
  30283. circle: 0x25CB,
  30284. circlecopyrt: 0x00A9, // This glyph is missing from Adobe's original list.
  30285. circlemultiply: 0x2297,
  30286. circleot: 0x2299,
  30287. circleplus: 0x2295,
  30288. circlepostalmark: 0x3036,
  30289. circlewithlefthalfblack: 0x25D0,
  30290. circlewithrighthalfblack: 0x25D1,
  30291. circumflex: 0x02C6,
  30292. circumflexbelowcmb: 0x032D,
  30293. circumflexcmb: 0x0302,
  30294. clear: 0x2327,
  30295. clickalveolar: 0x01C2,
  30296. clickdental: 0x01C0,
  30297. clicklateral: 0x01C1,
  30298. clickretroflex: 0x01C3,
  30299. club: 0x2663,
  30300. clubsuitblack: 0x2663,
  30301. clubsuitwhite: 0x2667,
  30302. cmcubedsquare: 0x33A4,
  30303. cmonospace: 0xFF43,
  30304. cmsquaredsquare: 0x33A0,
  30305. coarmenian: 0x0581,
  30306. colon: 0x003A,
  30307. colonmonetary: 0x20A1,
  30308. colonmonospace: 0xFF1A,
  30309. colonsign: 0x20A1,
  30310. colonsmall: 0xFE55,
  30311. colontriangularhalfmod: 0x02D1,
  30312. colontriangularmod: 0x02D0,
  30313. comma: 0x002C,
  30314. commaabovecmb: 0x0313,
  30315. commaaboverightcmb: 0x0315,
  30316. commaaccent: 0xF6C3,
  30317. commaarabic: 0x060C,
  30318. commaarmenian: 0x055D,
  30319. commainferior: 0xF6E1,
  30320. commamonospace: 0xFF0C,
  30321. commareversedabovecmb: 0x0314,
  30322. commareversedmod: 0x02BD,
  30323. commasmall: 0xFE50,
  30324. commasuperior: 0xF6E2,
  30325. commaturnedabovecmb: 0x0312,
  30326. commaturnedmod: 0x02BB,
  30327. compass: 0x263C,
  30328. congruent: 0x2245,
  30329. contourintegral: 0x222E,
  30330. control: 0x2303,
  30331. controlACK: 0x0006,
  30332. controlBEL: 0x0007,
  30333. controlBS: 0x0008,
  30334. controlCAN: 0x0018,
  30335. controlCR: 0x000D,
  30336. controlDC1: 0x0011,
  30337. controlDC2: 0x0012,
  30338. controlDC3: 0x0013,
  30339. controlDC4: 0x0014,
  30340. controlDEL: 0x007F,
  30341. controlDLE: 0x0010,
  30342. controlEM: 0x0019,
  30343. controlENQ: 0x0005,
  30344. controlEOT: 0x0004,
  30345. controlESC: 0x001B,
  30346. controlETB: 0x0017,
  30347. controlETX: 0x0003,
  30348. controlFF: 0x000C,
  30349. controlFS: 0x001C,
  30350. controlGS: 0x001D,
  30351. controlHT: 0x0009,
  30352. controlLF: 0x000A,
  30353. controlNAK: 0x0015,
  30354. controlRS: 0x001E,
  30355. controlSI: 0x000F,
  30356. controlSO: 0x000E,
  30357. controlSOT: 0x0002,
  30358. controlSTX: 0x0001,
  30359. controlSUB: 0x001A,
  30360. controlSYN: 0x0016,
  30361. controlUS: 0x001F,
  30362. controlVT: 0x000B,
  30363. copyright: 0x00A9,
  30364. copyrightsans: 0xF8E9,
  30365. copyrightserif: 0xF6D9,
  30366. cornerbracketleft: 0x300C,
  30367. cornerbracketlefthalfwidth: 0xFF62,
  30368. cornerbracketleftvertical: 0xFE41,
  30369. cornerbracketright: 0x300D,
  30370. cornerbracketrighthalfwidth: 0xFF63,
  30371. cornerbracketrightvertical: 0xFE42,
  30372. corporationsquare: 0x337F,
  30373. cosquare: 0x33C7,
  30374. coverkgsquare: 0x33C6,
  30375. cparen: 0x249E,
  30376. cruzeiro: 0x20A2,
  30377. cstretched: 0x0297,
  30378. curlyand: 0x22CF,
  30379. curlyor: 0x22CE,
  30380. currency: 0x00A4,
  30381. cyrBreve: 0xF6D1,
  30382. cyrFlex: 0xF6D2,
  30383. cyrbreve: 0xF6D4,
  30384. cyrflex: 0xF6D5,
  30385. d: 0x0064,
  30386. daarmenian: 0x0564,
  30387. dabengali: 0x09A6,
  30388. dadarabic: 0x0636,
  30389. dadeva: 0x0926,
  30390. dadfinalarabic: 0xFEBE,
  30391. dadinitialarabic: 0xFEBF,
  30392. dadmedialarabic: 0xFEC0,
  30393. dagesh: 0x05BC,
  30394. dageshhebrew: 0x05BC,
  30395. dagger: 0x2020,
  30396. daggerdbl: 0x2021,
  30397. dagujarati: 0x0AA6,
  30398. dagurmukhi: 0x0A26,
  30399. dahiragana: 0x3060,
  30400. dakatakana: 0x30C0,
  30401. dalarabic: 0x062F,
  30402. dalet: 0x05D3,
  30403. daletdagesh: 0xFB33,
  30404. daletdageshhebrew: 0xFB33,
  30405. dalethebrew: 0x05D3,
  30406. dalfinalarabic: 0xFEAA,
  30407. dammaarabic: 0x064F,
  30408. dammalowarabic: 0x064F,
  30409. dammatanaltonearabic: 0x064C,
  30410. dammatanarabic: 0x064C,
  30411. danda: 0x0964,
  30412. dargahebrew: 0x05A7,
  30413. dargalefthebrew: 0x05A7,
  30414. dasiapneumatacyrilliccmb: 0x0485,
  30415. dblGrave: 0xF6D3,
  30416. dblanglebracketleft: 0x300A,
  30417. dblanglebracketleftvertical: 0xFE3D,
  30418. dblanglebracketright: 0x300B,
  30419. dblanglebracketrightvertical: 0xFE3E,
  30420. dblarchinvertedbelowcmb: 0x032B,
  30421. dblarrowleft: 0x21D4,
  30422. dblarrowright: 0x21D2,
  30423. dbldanda: 0x0965,
  30424. dblgrave: 0xF6D6,
  30425. dblgravecmb: 0x030F,
  30426. dblintegral: 0x222C,
  30427. dbllowline: 0x2017,
  30428. dbllowlinecmb: 0x0333,
  30429. dbloverlinecmb: 0x033F,
  30430. dblprimemod: 0x02BA,
  30431. dblverticalbar: 0x2016,
  30432. dblverticallineabovecmb: 0x030E,
  30433. dbopomofo: 0x3109,
  30434. dbsquare: 0x33C8,
  30435. dcaron: 0x010F,
  30436. dcedilla: 0x1E11,
  30437. dcircle: 0x24D3,
  30438. dcircumflexbelow: 0x1E13,
  30439. dcroat: 0x0111,
  30440. ddabengali: 0x09A1,
  30441. ddadeva: 0x0921,
  30442. ddagujarati: 0x0AA1,
  30443. ddagurmukhi: 0x0A21,
  30444. ddalarabic: 0x0688,
  30445. ddalfinalarabic: 0xFB89,
  30446. dddhadeva: 0x095C,
  30447. ddhabengali: 0x09A2,
  30448. ddhadeva: 0x0922,
  30449. ddhagujarati: 0x0AA2,
  30450. ddhagurmukhi: 0x0A22,
  30451. ddotaccent: 0x1E0B,
  30452. ddotbelow: 0x1E0D,
  30453. decimalseparatorarabic: 0x066B,
  30454. decimalseparatorpersian: 0x066B,
  30455. decyrillic: 0x0434,
  30456. degree: 0x00B0,
  30457. dehihebrew: 0x05AD,
  30458. dehiragana: 0x3067,
  30459. deicoptic: 0x03EF,
  30460. dekatakana: 0x30C7,
  30461. deleteleft: 0x232B,
  30462. deleteright: 0x2326,
  30463. delta: 0x03B4,
  30464. deltaturned: 0x018D,
  30465. denominatorminusonenumeratorbengali: 0x09F8,
  30466. dezh: 0x02A4,
  30467. dhabengali: 0x09A7,
  30468. dhadeva: 0x0927,
  30469. dhagujarati: 0x0AA7,
  30470. dhagurmukhi: 0x0A27,
  30471. dhook: 0x0257,
  30472. dialytikatonos: 0x0385,
  30473. dialytikatonoscmb: 0x0344,
  30474. diamond: 0x2666,
  30475. diamondsuitwhite: 0x2662,
  30476. dieresis: 0x00A8,
  30477. dieresisacute: 0xF6D7,
  30478. dieresisbelowcmb: 0x0324,
  30479. dieresiscmb: 0x0308,
  30480. dieresisgrave: 0xF6D8,
  30481. dieresistonos: 0x0385,
  30482. dihiragana: 0x3062,
  30483. dikatakana: 0x30C2,
  30484. dittomark: 0x3003,
  30485. divide: 0x00F7,
  30486. divides: 0x2223,
  30487. divisionslash: 0x2215,
  30488. djecyrillic: 0x0452,
  30489. dkshade: 0x2593,
  30490. dlinebelow: 0x1E0F,
  30491. dlsquare: 0x3397,
  30492. dmacron: 0x0111,
  30493. dmonospace: 0xFF44,
  30494. dnblock: 0x2584,
  30495. dochadathai: 0x0E0E,
  30496. dodekthai: 0x0E14,
  30497. dohiragana: 0x3069,
  30498. dokatakana: 0x30C9,
  30499. dollar: 0x0024,
  30500. dollarinferior: 0xF6E3,
  30501. dollarmonospace: 0xFF04,
  30502. dollaroldstyle: 0xF724,
  30503. dollarsmall: 0xFE69,
  30504. dollarsuperior: 0xF6E4,
  30505. dong: 0x20AB,
  30506. dorusquare: 0x3326,
  30507. dotaccent: 0x02D9,
  30508. dotaccentcmb: 0x0307,
  30509. dotbelowcmb: 0x0323,
  30510. dotbelowcomb: 0x0323,
  30511. dotkatakana: 0x30FB,
  30512. dotlessi: 0x0131,
  30513. dotlessj: 0xF6BE,
  30514. dotlessjstrokehook: 0x0284,
  30515. dotmath: 0x22C5,
  30516. dottedcircle: 0x25CC,
  30517. doubleyodpatah: 0xFB1F,
  30518. doubleyodpatahhebrew: 0xFB1F,
  30519. downtackbelowcmb: 0x031E,
  30520. downtackmod: 0x02D5,
  30521. dparen: 0x249F,
  30522. dsuperior: 0xF6EB,
  30523. dtail: 0x0256,
  30524. dtopbar: 0x018C,
  30525. duhiragana: 0x3065,
  30526. dukatakana: 0x30C5,
  30527. dz: 0x01F3,
  30528. dzaltone: 0x02A3,
  30529. dzcaron: 0x01C6,
  30530. dzcurl: 0x02A5,
  30531. dzeabkhasiancyrillic: 0x04E1,
  30532. dzecyrillic: 0x0455,
  30533. dzhecyrillic: 0x045F,
  30534. e: 0x0065,
  30535. eacute: 0x00E9,
  30536. earth: 0x2641,
  30537. ebengali: 0x098F,
  30538. ebopomofo: 0x311C,
  30539. ebreve: 0x0115,
  30540. ecandradeva: 0x090D,
  30541. ecandragujarati: 0x0A8D,
  30542. ecandravowelsigndeva: 0x0945,
  30543. ecandravowelsigngujarati: 0x0AC5,
  30544. ecaron: 0x011B,
  30545. ecedillabreve: 0x1E1D,
  30546. echarmenian: 0x0565,
  30547. echyiwnarmenian: 0x0587,
  30548. ecircle: 0x24D4,
  30549. ecircumflex: 0x00EA,
  30550. ecircumflexacute: 0x1EBF,
  30551. ecircumflexbelow: 0x1E19,
  30552. ecircumflexdotbelow: 0x1EC7,
  30553. ecircumflexgrave: 0x1EC1,
  30554. ecircumflexhookabove: 0x1EC3,
  30555. ecircumflextilde: 0x1EC5,
  30556. ecyrillic: 0x0454,
  30557. edblgrave: 0x0205,
  30558. edeva: 0x090F,
  30559. edieresis: 0x00EB,
  30560. edot: 0x0117,
  30561. edotaccent: 0x0117,
  30562. edotbelow: 0x1EB9,
  30563. eegurmukhi: 0x0A0F,
  30564. eematragurmukhi: 0x0A47,
  30565. efcyrillic: 0x0444,
  30566. egrave: 0x00E8,
  30567. egujarati: 0x0A8F,
  30568. eharmenian: 0x0567,
  30569. ehbopomofo: 0x311D,
  30570. ehiragana: 0x3048,
  30571. ehookabove: 0x1EBB,
  30572. eibopomofo: 0x311F,
  30573. eight: 0x0038,
  30574. eightarabic: 0x0668,
  30575. eightbengali: 0x09EE,
  30576. eightcircle: 0x2467,
  30577. eightcircleinversesansserif: 0x2791,
  30578. eightdeva: 0x096E,
  30579. eighteencircle: 0x2471,
  30580. eighteenparen: 0x2485,
  30581. eighteenperiod: 0x2499,
  30582. eightgujarati: 0x0AEE,
  30583. eightgurmukhi: 0x0A6E,
  30584. eighthackarabic: 0x0668,
  30585. eighthangzhou: 0x3028,
  30586. eighthnotebeamed: 0x266B,
  30587. eightideographicparen: 0x3227,
  30588. eightinferior: 0x2088,
  30589. eightmonospace: 0xFF18,
  30590. eightoldstyle: 0xF738,
  30591. eightparen: 0x247B,
  30592. eightperiod: 0x248F,
  30593. eightpersian: 0x06F8,
  30594. eightroman: 0x2177,
  30595. eightsuperior: 0x2078,
  30596. eightthai: 0x0E58,
  30597. einvertedbreve: 0x0207,
  30598. eiotifiedcyrillic: 0x0465,
  30599. ekatakana: 0x30A8,
  30600. ekatakanahalfwidth: 0xFF74,
  30601. ekonkargurmukhi: 0x0A74,
  30602. ekorean: 0x3154,
  30603. elcyrillic: 0x043B,
  30604. element: 0x2208,
  30605. elevencircle: 0x246A,
  30606. elevenparen: 0x247E,
  30607. elevenperiod: 0x2492,
  30608. elevenroman: 0x217A,
  30609. ellipsis: 0x2026,
  30610. ellipsisvertical: 0x22EE,
  30611. emacron: 0x0113,
  30612. emacronacute: 0x1E17,
  30613. emacrongrave: 0x1E15,
  30614. emcyrillic: 0x043C,
  30615. emdash: 0x2014,
  30616. emdashvertical: 0xFE31,
  30617. emonospace: 0xFF45,
  30618. emphasismarkarmenian: 0x055B,
  30619. emptyset: 0x2205,
  30620. enbopomofo: 0x3123,
  30621. encyrillic: 0x043D,
  30622. endash: 0x2013,
  30623. endashvertical: 0xFE32,
  30624. endescendercyrillic: 0x04A3,
  30625. eng: 0x014B,
  30626. engbopomofo: 0x3125,
  30627. enghecyrillic: 0x04A5,
  30628. enhookcyrillic: 0x04C8,
  30629. enspace: 0x2002,
  30630. eogonek: 0x0119,
  30631. eokorean: 0x3153,
  30632. eopen: 0x025B,
  30633. eopenclosed: 0x029A,
  30634. eopenreversed: 0x025C,
  30635. eopenreversedclosed: 0x025E,
  30636. eopenreversedhook: 0x025D,
  30637. eparen: 0x24A0,
  30638. epsilon: 0x03B5,
  30639. epsilontonos: 0x03AD,
  30640. equal: 0x003D,
  30641. equalmonospace: 0xFF1D,
  30642. equalsmall: 0xFE66,
  30643. equalsuperior: 0x207C,
  30644. equivalence: 0x2261,
  30645. erbopomofo: 0x3126,
  30646. ercyrillic: 0x0440,
  30647. ereversed: 0x0258,
  30648. ereversedcyrillic: 0x044D,
  30649. escyrillic: 0x0441,
  30650. esdescendercyrillic: 0x04AB,
  30651. esh: 0x0283,
  30652. eshcurl: 0x0286,
  30653. eshortdeva: 0x090E,
  30654. eshortvowelsigndeva: 0x0946,
  30655. eshreversedloop: 0x01AA,
  30656. eshsquatreversed: 0x0285,
  30657. esmallhiragana: 0x3047,
  30658. esmallkatakana: 0x30A7,
  30659. esmallkatakanahalfwidth: 0xFF6A,
  30660. estimated: 0x212E,
  30661. esuperior: 0xF6EC,
  30662. eta: 0x03B7,
  30663. etarmenian: 0x0568,
  30664. etatonos: 0x03AE,
  30665. eth: 0x00F0,
  30666. etilde: 0x1EBD,
  30667. etildebelow: 0x1E1B,
  30668. etnahtafoukhhebrew: 0x0591,
  30669. etnahtafoukhlefthebrew: 0x0591,
  30670. etnahtahebrew: 0x0591,
  30671. etnahtalefthebrew: 0x0591,
  30672. eturned: 0x01DD,
  30673. eukorean: 0x3161,
  30674. euro: 0x20AC,
  30675. evowelsignbengali: 0x09C7,
  30676. evowelsigndeva: 0x0947,
  30677. evowelsigngujarati: 0x0AC7,
  30678. exclam: 0x0021,
  30679. exclamarmenian: 0x055C,
  30680. exclamdbl: 0x203C,
  30681. exclamdown: 0x00A1,
  30682. exclamdownsmall: 0xF7A1,
  30683. exclammonospace: 0xFF01,
  30684. exclamsmall: 0xF721,
  30685. existential: 0x2203,
  30686. ezh: 0x0292,
  30687. ezhcaron: 0x01EF,
  30688. ezhcurl: 0x0293,
  30689. ezhreversed: 0x01B9,
  30690. ezhtail: 0x01BA,
  30691. f: 0x0066,
  30692. fadeva: 0x095E,
  30693. fagurmukhi: 0x0A5E,
  30694. fahrenheit: 0x2109,
  30695. fathaarabic: 0x064E,
  30696. fathalowarabic: 0x064E,
  30697. fathatanarabic: 0x064B,
  30698. fbopomofo: 0x3108,
  30699. fcircle: 0x24D5,
  30700. fdotaccent: 0x1E1F,
  30701. feharabic: 0x0641,
  30702. feharmenian: 0x0586,
  30703. fehfinalarabic: 0xFED2,
  30704. fehinitialarabic: 0xFED3,
  30705. fehmedialarabic: 0xFED4,
  30706. feicoptic: 0x03E5,
  30707. female: 0x2640,
  30708. ff: 0xFB00,
  30709. ffi: 0xFB03,
  30710. ffl: 0xFB04,
  30711. fi: 0xFB01,
  30712. fifteencircle: 0x246E,
  30713. fifteenparen: 0x2482,
  30714. fifteenperiod: 0x2496,
  30715. figuredash: 0x2012,
  30716. filledbox: 0x25A0,
  30717. filledrect: 0x25AC,
  30718. finalkaf: 0x05DA,
  30719. finalkafdagesh: 0xFB3A,
  30720. finalkafdageshhebrew: 0xFB3A,
  30721. finalkafhebrew: 0x05DA,
  30722. finalmem: 0x05DD,
  30723. finalmemhebrew: 0x05DD,
  30724. finalnun: 0x05DF,
  30725. finalnunhebrew: 0x05DF,
  30726. finalpe: 0x05E3,
  30727. finalpehebrew: 0x05E3,
  30728. finaltsadi: 0x05E5,
  30729. finaltsadihebrew: 0x05E5,
  30730. firsttonechinese: 0x02C9,
  30731. fisheye: 0x25C9,
  30732. fitacyrillic: 0x0473,
  30733. five: 0x0035,
  30734. fivearabic: 0x0665,
  30735. fivebengali: 0x09EB,
  30736. fivecircle: 0x2464,
  30737. fivecircleinversesansserif: 0x278E,
  30738. fivedeva: 0x096B,
  30739. fiveeighths: 0x215D,
  30740. fivegujarati: 0x0AEB,
  30741. fivegurmukhi: 0x0A6B,
  30742. fivehackarabic: 0x0665,
  30743. fivehangzhou: 0x3025,
  30744. fiveideographicparen: 0x3224,
  30745. fiveinferior: 0x2085,
  30746. fivemonospace: 0xFF15,
  30747. fiveoldstyle: 0xF735,
  30748. fiveparen: 0x2478,
  30749. fiveperiod: 0x248C,
  30750. fivepersian: 0x06F5,
  30751. fiveroman: 0x2174,
  30752. fivesuperior: 0x2075,
  30753. fivethai: 0x0E55,
  30754. fl: 0xFB02,
  30755. florin: 0x0192,
  30756. fmonospace: 0xFF46,
  30757. fmsquare: 0x3399,
  30758. fofanthai: 0x0E1F,
  30759. fofathai: 0x0E1D,
  30760. fongmanthai: 0x0E4F,
  30761. forall: 0x2200,
  30762. four: 0x0034,
  30763. fourarabic: 0x0664,
  30764. fourbengali: 0x09EA,
  30765. fourcircle: 0x2463,
  30766. fourcircleinversesansserif: 0x278D,
  30767. fourdeva: 0x096A,
  30768. fourgujarati: 0x0AEA,
  30769. fourgurmukhi: 0x0A6A,
  30770. fourhackarabic: 0x0664,
  30771. fourhangzhou: 0x3024,
  30772. fourideographicparen: 0x3223,
  30773. fourinferior: 0x2084,
  30774. fourmonospace: 0xFF14,
  30775. fournumeratorbengali: 0x09F7,
  30776. fouroldstyle: 0xF734,
  30777. fourparen: 0x2477,
  30778. fourperiod: 0x248B,
  30779. fourpersian: 0x06F4,
  30780. fourroman: 0x2173,
  30781. foursuperior: 0x2074,
  30782. fourteencircle: 0x246D,
  30783. fourteenparen: 0x2481,
  30784. fourteenperiod: 0x2495,
  30785. fourthai: 0x0E54,
  30786. fourthtonechinese: 0x02CB,
  30787. fparen: 0x24A1,
  30788. fraction: 0x2044,
  30789. franc: 0x20A3,
  30790. g: 0x0067,
  30791. gabengali: 0x0997,
  30792. gacute: 0x01F5,
  30793. gadeva: 0x0917,
  30794. gafarabic: 0x06AF,
  30795. gaffinalarabic: 0xFB93,
  30796. gafinitialarabic: 0xFB94,
  30797. gafmedialarabic: 0xFB95,
  30798. gagujarati: 0x0A97,
  30799. gagurmukhi: 0x0A17,
  30800. gahiragana: 0x304C,
  30801. gakatakana: 0x30AC,
  30802. gamma: 0x03B3,
  30803. gammalatinsmall: 0x0263,
  30804. gammasuperior: 0x02E0,
  30805. gangiacoptic: 0x03EB,
  30806. gbopomofo: 0x310D,
  30807. gbreve: 0x011F,
  30808. gcaron: 0x01E7,
  30809. gcedilla: 0x0123,
  30810. gcircle: 0x24D6,
  30811. gcircumflex: 0x011D,
  30812. gcommaaccent: 0x0123,
  30813. gdot: 0x0121,
  30814. gdotaccent: 0x0121,
  30815. gecyrillic: 0x0433,
  30816. gehiragana: 0x3052,
  30817. gekatakana: 0x30B2,
  30818. geometricallyequal: 0x2251,
  30819. gereshaccenthebrew: 0x059C,
  30820. gereshhebrew: 0x05F3,
  30821. gereshmuqdamhebrew: 0x059D,
  30822. germandbls: 0x00DF,
  30823. gershayimaccenthebrew: 0x059E,
  30824. gershayimhebrew: 0x05F4,
  30825. getamark: 0x3013,
  30826. ghabengali: 0x0998,
  30827. ghadarmenian: 0x0572,
  30828. ghadeva: 0x0918,
  30829. ghagujarati: 0x0A98,
  30830. ghagurmukhi: 0x0A18,
  30831. ghainarabic: 0x063A,
  30832. ghainfinalarabic: 0xFECE,
  30833. ghaininitialarabic: 0xFECF,
  30834. ghainmedialarabic: 0xFED0,
  30835. ghemiddlehookcyrillic: 0x0495,
  30836. ghestrokecyrillic: 0x0493,
  30837. gheupturncyrillic: 0x0491,
  30838. ghhadeva: 0x095A,
  30839. ghhagurmukhi: 0x0A5A,
  30840. ghook: 0x0260,
  30841. ghzsquare: 0x3393,
  30842. gihiragana: 0x304E,
  30843. gikatakana: 0x30AE,
  30844. gimarmenian: 0x0563,
  30845. gimel: 0x05D2,
  30846. gimeldagesh: 0xFB32,
  30847. gimeldageshhebrew: 0xFB32,
  30848. gimelhebrew: 0x05D2,
  30849. gjecyrillic: 0x0453,
  30850. glottalinvertedstroke: 0x01BE,
  30851. glottalstop: 0x0294,
  30852. glottalstopinverted: 0x0296,
  30853. glottalstopmod: 0x02C0,
  30854. glottalstopreversed: 0x0295,
  30855. glottalstopreversedmod: 0x02C1,
  30856. glottalstopreversedsuperior: 0x02E4,
  30857. glottalstopstroke: 0x02A1,
  30858. glottalstopstrokereversed: 0x02A2,
  30859. gmacron: 0x1E21,
  30860. gmonospace: 0xFF47,
  30861. gohiragana: 0x3054,
  30862. gokatakana: 0x30B4,
  30863. gparen: 0x24A2,
  30864. gpasquare: 0x33AC,
  30865. gradient: 0x2207,
  30866. grave: 0x0060,
  30867. gravebelowcmb: 0x0316,
  30868. gravecmb: 0x0300,
  30869. gravecomb: 0x0300,
  30870. gravedeva: 0x0953,
  30871. gravelowmod: 0x02CE,
  30872. gravemonospace: 0xFF40,
  30873. gravetonecmb: 0x0340,
  30874. greater: 0x003E,
  30875. greaterequal: 0x2265,
  30876. greaterequalorless: 0x22DB,
  30877. greatermonospace: 0xFF1E,
  30878. greaterorequivalent: 0x2273,
  30879. greaterorless: 0x2277,
  30880. greateroverequal: 0x2267,
  30881. greatersmall: 0xFE65,
  30882. gscript: 0x0261,
  30883. gstroke: 0x01E5,
  30884. guhiragana: 0x3050,
  30885. guillemotleft: 0x00AB,
  30886. guillemotright: 0x00BB,
  30887. guilsinglleft: 0x2039,
  30888. guilsinglright: 0x203A,
  30889. gukatakana: 0x30B0,
  30890. guramusquare: 0x3318,
  30891. gysquare: 0x33C9,
  30892. h: 0x0068,
  30893. haabkhasiancyrillic: 0x04A9,
  30894. haaltonearabic: 0x06C1,
  30895. habengali: 0x09B9,
  30896. hadescendercyrillic: 0x04B3,
  30897. hadeva: 0x0939,
  30898. hagujarati: 0x0AB9,
  30899. hagurmukhi: 0x0A39,
  30900. haharabic: 0x062D,
  30901. hahfinalarabic: 0xFEA2,
  30902. hahinitialarabic: 0xFEA3,
  30903. hahiragana: 0x306F,
  30904. hahmedialarabic: 0xFEA4,
  30905. haitusquare: 0x332A,
  30906. hakatakana: 0x30CF,
  30907. hakatakanahalfwidth: 0xFF8A,
  30908. halantgurmukhi: 0x0A4D,
  30909. hamzaarabic: 0x0621,
  30910. hamzalowarabic: 0x0621,
  30911. hangulfiller: 0x3164,
  30912. hardsigncyrillic: 0x044A,
  30913. harpoonleftbarbup: 0x21BC,
  30914. harpoonrightbarbup: 0x21C0,
  30915. hasquare: 0x33CA,
  30916. hatafpatah: 0x05B2,
  30917. hatafpatah16: 0x05B2,
  30918. hatafpatah23: 0x05B2,
  30919. hatafpatah2f: 0x05B2,
  30920. hatafpatahhebrew: 0x05B2,
  30921. hatafpatahnarrowhebrew: 0x05B2,
  30922. hatafpatahquarterhebrew: 0x05B2,
  30923. hatafpatahwidehebrew: 0x05B2,
  30924. hatafqamats: 0x05B3,
  30925. hatafqamats1b: 0x05B3,
  30926. hatafqamats28: 0x05B3,
  30927. hatafqamats34: 0x05B3,
  30928. hatafqamatshebrew: 0x05B3,
  30929. hatafqamatsnarrowhebrew: 0x05B3,
  30930. hatafqamatsquarterhebrew: 0x05B3,
  30931. hatafqamatswidehebrew: 0x05B3,
  30932. hatafsegol: 0x05B1,
  30933. hatafsegol17: 0x05B1,
  30934. hatafsegol24: 0x05B1,
  30935. hatafsegol30: 0x05B1,
  30936. hatafsegolhebrew: 0x05B1,
  30937. hatafsegolnarrowhebrew: 0x05B1,
  30938. hatafsegolquarterhebrew: 0x05B1,
  30939. hatafsegolwidehebrew: 0x05B1,
  30940. hbar: 0x0127,
  30941. hbopomofo: 0x310F,
  30942. hbrevebelow: 0x1E2B,
  30943. hcedilla: 0x1E29,
  30944. hcircle: 0x24D7,
  30945. hcircumflex: 0x0125,
  30946. hdieresis: 0x1E27,
  30947. hdotaccent: 0x1E23,
  30948. hdotbelow: 0x1E25,
  30949. he: 0x05D4,
  30950. heart: 0x2665,
  30951. heartsuitblack: 0x2665,
  30952. heartsuitwhite: 0x2661,
  30953. hedagesh: 0xFB34,
  30954. hedageshhebrew: 0xFB34,
  30955. hehaltonearabic: 0x06C1,
  30956. heharabic: 0x0647,
  30957. hehebrew: 0x05D4,
  30958. hehfinalaltonearabic: 0xFBA7,
  30959. hehfinalalttwoarabic: 0xFEEA,
  30960. hehfinalarabic: 0xFEEA,
  30961. hehhamzaabovefinalarabic: 0xFBA5,
  30962. hehhamzaaboveisolatedarabic: 0xFBA4,
  30963. hehinitialaltonearabic: 0xFBA8,
  30964. hehinitialarabic: 0xFEEB,
  30965. hehiragana: 0x3078,
  30966. hehmedialaltonearabic: 0xFBA9,
  30967. hehmedialarabic: 0xFEEC,
  30968. heiseierasquare: 0x337B,
  30969. hekatakana: 0x30D8,
  30970. hekatakanahalfwidth: 0xFF8D,
  30971. hekutaarusquare: 0x3336,
  30972. henghook: 0x0267,
  30973. herutusquare: 0x3339,
  30974. het: 0x05D7,
  30975. hethebrew: 0x05D7,
  30976. hhook: 0x0266,
  30977. hhooksuperior: 0x02B1,
  30978. hieuhacirclekorean: 0x327B,
  30979. hieuhaparenkorean: 0x321B,
  30980. hieuhcirclekorean: 0x326D,
  30981. hieuhkorean: 0x314E,
  30982. hieuhparenkorean: 0x320D,
  30983. hihiragana: 0x3072,
  30984. hikatakana: 0x30D2,
  30985. hikatakanahalfwidth: 0xFF8B,
  30986. hiriq: 0x05B4,
  30987. hiriq14: 0x05B4,
  30988. hiriq21: 0x05B4,
  30989. hiriq2d: 0x05B4,
  30990. hiriqhebrew: 0x05B4,
  30991. hiriqnarrowhebrew: 0x05B4,
  30992. hiriqquarterhebrew: 0x05B4,
  30993. hiriqwidehebrew: 0x05B4,
  30994. hlinebelow: 0x1E96,
  30995. hmonospace: 0xFF48,
  30996. hoarmenian: 0x0570,
  30997. hohipthai: 0x0E2B,
  30998. hohiragana: 0x307B,
  30999. hokatakana: 0x30DB,
  31000. hokatakanahalfwidth: 0xFF8E,
  31001. holam: 0x05B9,
  31002. holam19: 0x05B9,
  31003. holam26: 0x05B9,
  31004. holam32: 0x05B9,
  31005. holamhebrew: 0x05B9,
  31006. holamnarrowhebrew: 0x05B9,
  31007. holamquarterhebrew: 0x05B9,
  31008. holamwidehebrew: 0x05B9,
  31009. honokhukthai: 0x0E2E,
  31010. hookabovecomb: 0x0309,
  31011. hookcmb: 0x0309,
  31012. hookpalatalizedbelowcmb: 0x0321,
  31013. hookretroflexbelowcmb: 0x0322,
  31014. hoonsquare: 0x3342,
  31015. horicoptic: 0x03E9,
  31016. horizontalbar: 0x2015,
  31017. horncmb: 0x031B,
  31018. hotsprings: 0x2668,
  31019. house: 0x2302,
  31020. hparen: 0x24A3,
  31021. hsuperior: 0x02B0,
  31022. hturned: 0x0265,
  31023. huhiragana: 0x3075,
  31024. huiitosquare: 0x3333,
  31025. hukatakana: 0x30D5,
  31026. hukatakanahalfwidth: 0xFF8C,
  31027. hungarumlaut: 0x02DD,
  31028. hungarumlautcmb: 0x030B,
  31029. hv: 0x0195,
  31030. hyphen: 0x002D,
  31031. hypheninferior: 0xF6E5,
  31032. hyphenmonospace: 0xFF0D,
  31033. hyphensmall: 0xFE63,
  31034. hyphensuperior: 0xF6E6,
  31035. hyphentwo: 0x2010,
  31036. i: 0x0069,
  31037. iacute: 0x00ED,
  31038. iacyrillic: 0x044F,
  31039. ibengali: 0x0987,
  31040. ibopomofo: 0x3127,
  31041. ibreve: 0x012D,
  31042. icaron: 0x01D0,
  31043. icircle: 0x24D8,
  31044. icircumflex: 0x00EE,
  31045. icyrillic: 0x0456,
  31046. idblgrave: 0x0209,
  31047. ideographearthcircle: 0x328F,
  31048. ideographfirecircle: 0x328B,
  31049. ideographicallianceparen: 0x323F,
  31050. ideographiccallparen: 0x323A,
  31051. ideographiccentrecircle: 0x32A5,
  31052. ideographicclose: 0x3006,
  31053. ideographiccomma: 0x3001,
  31054. ideographiccommaleft: 0xFF64,
  31055. ideographiccongratulationparen: 0x3237,
  31056. ideographiccorrectcircle: 0x32A3,
  31057. ideographicearthparen: 0x322F,
  31058. ideographicenterpriseparen: 0x323D,
  31059. ideographicexcellentcircle: 0x329D,
  31060. ideographicfestivalparen: 0x3240,
  31061. ideographicfinancialcircle: 0x3296,
  31062. ideographicfinancialparen: 0x3236,
  31063. ideographicfireparen: 0x322B,
  31064. ideographichaveparen: 0x3232,
  31065. ideographichighcircle: 0x32A4,
  31066. ideographiciterationmark: 0x3005,
  31067. ideographiclaborcircle: 0x3298,
  31068. ideographiclaborparen: 0x3238,
  31069. ideographicleftcircle: 0x32A7,
  31070. ideographiclowcircle: 0x32A6,
  31071. ideographicmedicinecircle: 0x32A9,
  31072. ideographicmetalparen: 0x322E,
  31073. ideographicmoonparen: 0x322A,
  31074. ideographicnameparen: 0x3234,
  31075. ideographicperiod: 0x3002,
  31076. ideographicprintcircle: 0x329E,
  31077. ideographicreachparen: 0x3243,
  31078. ideographicrepresentparen: 0x3239,
  31079. ideographicresourceparen: 0x323E,
  31080. ideographicrightcircle: 0x32A8,
  31081. ideographicsecretcircle: 0x3299,
  31082. ideographicselfparen: 0x3242,
  31083. ideographicsocietyparen: 0x3233,
  31084. ideographicspace: 0x3000,
  31085. ideographicspecialparen: 0x3235,
  31086. ideographicstockparen: 0x3231,
  31087. ideographicstudyparen: 0x323B,
  31088. ideographicsunparen: 0x3230,
  31089. ideographicsuperviseparen: 0x323C,
  31090. ideographicwaterparen: 0x322C,
  31091. ideographicwoodparen: 0x322D,
  31092. ideographiczero: 0x3007,
  31093. ideographmetalcircle: 0x328E,
  31094. ideographmooncircle: 0x328A,
  31095. ideographnamecircle: 0x3294,
  31096. ideographsuncircle: 0x3290,
  31097. ideographwatercircle: 0x328C,
  31098. ideographwoodcircle: 0x328D,
  31099. ideva: 0x0907,
  31100. idieresis: 0x00EF,
  31101. idieresisacute: 0x1E2F,
  31102. idieresiscyrillic: 0x04E5,
  31103. idotbelow: 0x1ECB,
  31104. iebrevecyrillic: 0x04D7,
  31105. iecyrillic: 0x0435,
  31106. ieungacirclekorean: 0x3275,
  31107. ieungaparenkorean: 0x3215,
  31108. ieungcirclekorean: 0x3267,
  31109. ieungkorean: 0x3147,
  31110. ieungparenkorean: 0x3207,
  31111. igrave: 0x00EC,
  31112. igujarati: 0x0A87,
  31113. igurmukhi: 0x0A07,
  31114. ihiragana: 0x3044,
  31115. ihookabove: 0x1EC9,
  31116. iibengali: 0x0988,
  31117. iicyrillic: 0x0438,
  31118. iideva: 0x0908,
  31119. iigujarati: 0x0A88,
  31120. iigurmukhi: 0x0A08,
  31121. iimatragurmukhi: 0x0A40,
  31122. iinvertedbreve: 0x020B,
  31123. iishortcyrillic: 0x0439,
  31124. iivowelsignbengali: 0x09C0,
  31125. iivowelsigndeva: 0x0940,
  31126. iivowelsigngujarati: 0x0AC0,
  31127. ij: 0x0133,
  31128. ikatakana: 0x30A4,
  31129. ikatakanahalfwidth: 0xFF72,
  31130. ikorean: 0x3163,
  31131. ilde: 0x02DC,
  31132. iluyhebrew: 0x05AC,
  31133. imacron: 0x012B,
  31134. imacroncyrillic: 0x04E3,
  31135. imageorapproximatelyequal: 0x2253,
  31136. imatragurmukhi: 0x0A3F,
  31137. imonospace: 0xFF49,
  31138. increment: 0x2206,
  31139. infinity: 0x221E,
  31140. iniarmenian: 0x056B,
  31141. integral: 0x222B,
  31142. integralbottom: 0x2321,
  31143. integralbt: 0x2321,
  31144. integralex: 0xF8F5,
  31145. integraltop: 0x2320,
  31146. integraltp: 0x2320,
  31147. intersection: 0x2229,
  31148. intisquare: 0x3305,
  31149. invbullet: 0x25D8,
  31150. invcircle: 0x25D9,
  31151. invsmileface: 0x263B,
  31152. iocyrillic: 0x0451,
  31153. iogonek: 0x012F,
  31154. iota: 0x03B9,
  31155. iotadieresis: 0x03CA,
  31156. iotadieresistonos: 0x0390,
  31157. iotalatin: 0x0269,
  31158. iotatonos: 0x03AF,
  31159. iparen: 0x24A4,
  31160. irigurmukhi: 0x0A72,
  31161. ismallhiragana: 0x3043,
  31162. ismallkatakana: 0x30A3,
  31163. ismallkatakanahalfwidth: 0xFF68,
  31164. issharbengali: 0x09FA,
  31165. istroke: 0x0268,
  31166. isuperior: 0xF6ED,
  31167. iterationhiragana: 0x309D,
  31168. iterationkatakana: 0x30FD,
  31169. itilde: 0x0129,
  31170. itildebelow: 0x1E2D,
  31171. iubopomofo: 0x3129,
  31172. iucyrillic: 0x044E,
  31173. ivowelsignbengali: 0x09BF,
  31174. ivowelsigndeva: 0x093F,
  31175. ivowelsigngujarati: 0x0ABF,
  31176. izhitsacyrillic: 0x0475,
  31177. izhitsadblgravecyrillic: 0x0477,
  31178. j: 0x006A,
  31179. jaarmenian: 0x0571,
  31180. jabengali: 0x099C,
  31181. jadeva: 0x091C,
  31182. jagujarati: 0x0A9C,
  31183. jagurmukhi: 0x0A1C,
  31184. jbopomofo: 0x3110,
  31185. jcaron: 0x01F0,
  31186. jcircle: 0x24D9,
  31187. jcircumflex: 0x0135,
  31188. jcrossedtail: 0x029D,
  31189. jdotlessstroke: 0x025F,
  31190. jecyrillic: 0x0458,
  31191. jeemarabic: 0x062C,
  31192. jeemfinalarabic: 0xFE9E,
  31193. jeeminitialarabic: 0xFE9F,
  31194. jeemmedialarabic: 0xFEA0,
  31195. jeharabic: 0x0698,
  31196. jehfinalarabic: 0xFB8B,
  31197. jhabengali: 0x099D,
  31198. jhadeva: 0x091D,
  31199. jhagujarati: 0x0A9D,
  31200. jhagurmukhi: 0x0A1D,
  31201. jheharmenian: 0x057B,
  31202. jis: 0x3004,
  31203. jmonospace: 0xFF4A,
  31204. jparen: 0x24A5,
  31205. jsuperior: 0x02B2,
  31206. k: 0x006B,
  31207. kabashkircyrillic: 0x04A1,
  31208. kabengali: 0x0995,
  31209. kacute: 0x1E31,
  31210. kacyrillic: 0x043A,
  31211. kadescendercyrillic: 0x049B,
  31212. kadeva: 0x0915,
  31213. kaf: 0x05DB,
  31214. kafarabic: 0x0643,
  31215. kafdagesh: 0xFB3B,
  31216. kafdageshhebrew: 0xFB3B,
  31217. kaffinalarabic: 0xFEDA,
  31218. kafhebrew: 0x05DB,
  31219. kafinitialarabic: 0xFEDB,
  31220. kafmedialarabic: 0xFEDC,
  31221. kafrafehebrew: 0xFB4D,
  31222. kagujarati: 0x0A95,
  31223. kagurmukhi: 0x0A15,
  31224. kahiragana: 0x304B,
  31225. kahookcyrillic: 0x04C4,
  31226. kakatakana: 0x30AB,
  31227. kakatakanahalfwidth: 0xFF76,
  31228. kappa: 0x03BA,
  31229. kappasymbolgreek: 0x03F0,
  31230. kapyeounmieumkorean: 0x3171,
  31231. kapyeounphieuphkorean: 0x3184,
  31232. kapyeounpieupkorean: 0x3178,
  31233. kapyeounssangpieupkorean: 0x3179,
  31234. karoriisquare: 0x330D,
  31235. kashidaautoarabic: 0x0640,
  31236. kashidaautonosidebearingarabic: 0x0640,
  31237. kasmallkatakana: 0x30F5,
  31238. kasquare: 0x3384,
  31239. kasraarabic: 0x0650,
  31240. kasratanarabic: 0x064D,
  31241. kastrokecyrillic: 0x049F,
  31242. katahiraprolongmarkhalfwidth: 0xFF70,
  31243. kaverticalstrokecyrillic: 0x049D,
  31244. kbopomofo: 0x310E,
  31245. kcalsquare: 0x3389,
  31246. kcaron: 0x01E9,
  31247. kcedilla: 0x0137,
  31248. kcircle: 0x24DA,
  31249. kcommaaccent: 0x0137,
  31250. kdotbelow: 0x1E33,
  31251. keharmenian: 0x0584,
  31252. kehiragana: 0x3051,
  31253. kekatakana: 0x30B1,
  31254. kekatakanahalfwidth: 0xFF79,
  31255. kenarmenian: 0x056F,
  31256. kesmallkatakana: 0x30F6,
  31257. kgreenlandic: 0x0138,
  31258. khabengali: 0x0996,
  31259. khacyrillic: 0x0445,
  31260. khadeva: 0x0916,
  31261. khagujarati: 0x0A96,
  31262. khagurmukhi: 0x0A16,
  31263. khaharabic: 0x062E,
  31264. khahfinalarabic: 0xFEA6,
  31265. khahinitialarabic: 0xFEA7,
  31266. khahmedialarabic: 0xFEA8,
  31267. kheicoptic: 0x03E7,
  31268. khhadeva: 0x0959,
  31269. khhagurmukhi: 0x0A59,
  31270. khieukhacirclekorean: 0x3278,
  31271. khieukhaparenkorean: 0x3218,
  31272. khieukhcirclekorean: 0x326A,
  31273. khieukhkorean: 0x314B,
  31274. khieukhparenkorean: 0x320A,
  31275. khokhaithai: 0x0E02,
  31276. khokhonthai: 0x0E05,
  31277. khokhuatthai: 0x0E03,
  31278. khokhwaithai: 0x0E04,
  31279. khomutthai: 0x0E5B,
  31280. khook: 0x0199,
  31281. khorakhangthai: 0x0E06,
  31282. khzsquare: 0x3391,
  31283. kihiragana: 0x304D,
  31284. kikatakana: 0x30AD,
  31285. kikatakanahalfwidth: 0xFF77,
  31286. kiroguramusquare: 0x3315,
  31287. kiromeetorusquare: 0x3316,
  31288. kirosquare: 0x3314,
  31289. kiyeokacirclekorean: 0x326E,
  31290. kiyeokaparenkorean: 0x320E,
  31291. kiyeokcirclekorean: 0x3260,
  31292. kiyeokkorean: 0x3131,
  31293. kiyeokparenkorean: 0x3200,
  31294. kiyeoksioskorean: 0x3133,
  31295. kjecyrillic: 0x045C,
  31296. klinebelow: 0x1E35,
  31297. klsquare: 0x3398,
  31298. kmcubedsquare: 0x33A6,
  31299. kmonospace: 0xFF4B,
  31300. kmsquaredsquare: 0x33A2,
  31301. kohiragana: 0x3053,
  31302. kohmsquare: 0x33C0,
  31303. kokaithai: 0x0E01,
  31304. kokatakana: 0x30B3,
  31305. kokatakanahalfwidth: 0xFF7A,
  31306. kooposquare: 0x331E,
  31307. koppacyrillic: 0x0481,
  31308. koreanstandardsymbol: 0x327F,
  31309. koroniscmb: 0x0343,
  31310. kparen: 0x24A6,
  31311. kpasquare: 0x33AA,
  31312. ksicyrillic: 0x046F,
  31313. ktsquare: 0x33CF,
  31314. kturned: 0x029E,
  31315. kuhiragana: 0x304F,
  31316. kukatakana: 0x30AF,
  31317. kukatakanahalfwidth: 0xFF78,
  31318. kvsquare: 0x33B8,
  31319. kwsquare: 0x33BE,
  31320. l: 0x006C,
  31321. labengali: 0x09B2,
  31322. lacute: 0x013A,
  31323. ladeva: 0x0932,
  31324. lagujarati: 0x0AB2,
  31325. lagurmukhi: 0x0A32,
  31326. lakkhangyaothai: 0x0E45,
  31327. lamaleffinalarabic: 0xFEFC,
  31328. lamalefhamzaabovefinalarabic: 0xFEF8,
  31329. lamalefhamzaaboveisolatedarabic: 0xFEF7,
  31330. lamalefhamzabelowfinalarabic: 0xFEFA,
  31331. lamalefhamzabelowisolatedarabic: 0xFEF9,
  31332. lamalefisolatedarabic: 0xFEFB,
  31333. lamalefmaddaabovefinalarabic: 0xFEF6,
  31334. lamalefmaddaaboveisolatedarabic: 0xFEF5,
  31335. lamarabic: 0x0644,
  31336. lambda: 0x03BB,
  31337. lambdastroke: 0x019B,
  31338. lamed: 0x05DC,
  31339. lameddagesh: 0xFB3C,
  31340. lameddageshhebrew: 0xFB3C,
  31341. lamedhebrew: 0x05DC,
  31342. lamfinalarabic: 0xFEDE,
  31343. lamhahinitialarabic: 0xFCCA,
  31344. laminitialarabic: 0xFEDF,
  31345. lamjeeminitialarabic: 0xFCC9,
  31346. lamkhahinitialarabic: 0xFCCB,
  31347. lamlamhehisolatedarabic: 0xFDF2,
  31348. lammedialarabic: 0xFEE0,
  31349. lammeemhahinitialarabic: 0xFD88,
  31350. lammeeminitialarabic: 0xFCCC,
  31351. largecircle: 0x25EF,
  31352. lbar: 0x019A,
  31353. lbelt: 0x026C,
  31354. lbopomofo: 0x310C,
  31355. lcaron: 0x013E,
  31356. lcedilla: 0x013C,
  31357. lcircle: 0x24DB,
  31358. lcircumflexbelow: 0x1E3D,
  31359. lcommaaccent: 0x013C,
  31360. ldot: 0x0140,
  31361. ldotaccent: 0x0140,
  31362. ldotbelow: 0x1E37,
  31363. ldotbelowmacron: 0x1E39,
  31364. leftangleabovecmb: 0x031A,
  31365. lefttackbelowcmb: 0x0318,
  31366. less: 0x003C,
  31367. lessequal: 0x2264,
  31368. lessequalorgreater: 0x22DA,
  31369. lessmonospace: 0xFF1C,
  31370. lessorequivalent: 0x2272,
  31371. lessorgreater: 0x2276,
  31372. lessoverequal: 0x2266,
  31373. lesssmall: 0xFE64,
  31374. lezh: 0x026E,
  31375. lfblock: 0x258C,
  31376. lhookretroflex: 0x026D,
  31377. lira: 0x20A4,
  31378. liwnarmenian: 0x056C,
  31379. lj: 0x01C9,
  31380. ljecyrillic: 0x0459,
  31381. ll: 0xF6C0,
  31382. lladeva: 0x0933,
  31383. llagujarati: 0x0AB3,
  31384. llinebelow: 0x1E3B,
  31385. llladeva: 0x0934,
  31386. llvocalicbengali: 0x09E1,
  31387. llvocalicdeva: 0x0961,
  31388. llvocalicvowelsignbengali: 0x09E3,
  31389. llvocalicvowelsigndeva: 0x0963,
  31390. lmiddletilde: 0x026B,
  31391. lmonospace: 0xFF4C,
  31392. lmsquare: 0x33D0,
  31393. lochulathai: 0x0E2C,
  31394. logicaland: 0x2227,
  31395. logicalnot: 0x00AC,
  31396. logicalnotreversed: 0x2310,
  31397. logicalor: 0x2228,
  31398. lolingthai: 0x0E25,
  31399. longs: 0x017F,
  31400. lowlinecenterline: 0xFE4E,
  31401. lowlinecmb: 0x0332,
  31402. lowlinedashed: 0xFE4D,
  31403. lozenge: 0x25CA,
  31404. lparen: 0x24A7,
  31405. lslash: 0x0142,
  31406. lsquare: 0x2113,
  31407. lsuperior: 0xF6EE,
  31408. ltshade: 0x2591,
  31409. luthai: 0x0E26,
  31410. lvocalicbengali: 0x098C,
  31411. lvocalicdeva: 0x090C,
  31412. lvocalicvowelsignbengali: 0x09E2,
  31413. lvocalicvowelsigndeva: 0x0962,
  31414. lxsquare: 0x33D3,
  31415. m: 0x006D,
  31416. mabengali: 0x09AE,
  31417. macron: 0x00AF,
  31418. macronbelowcmb: 0x0331,
  31419. macroncmb: 0x0304,
  31420. macronlowmod: 0x02CD,
  31421. macronmonospace: 0xFFE3,
  31422. macute: 0x1E3F,
  31423. madeva: 0x092E,
  31424. magujarati: 0x0AAE,
  31425. magurmukhi: 0x0A2E,
  31426. mahapakhhebrew: 0x05A4,
  31427. mahapakhlefthebrew: 0x05A4,
  31428. mahiragana: 0x307E,
  31429. maichattawalowleftthai: 0xF895,
  31430. maichattawalowrightthai: 0xF894,
  31431. maichattawathai: 0x0E4B,
  31432. maichattawaupperleftthai: 0xF893,
  31433. maieklowleftthai: 0xF88C,
  31434. maieklowrightthai: 0xF88B,
  31435. maiekthai: 0x0E48,
  31436. maiekupperleftthai: 0xF88A,
  31437. maihanakatleftthai: 0xF884,
  31438. maihanakatthai: 0x0E31,
  31439. maitaikhuleftthai: 0xF889,
  31440. maitaikhuthai: 0x0E47,
  31441. maitholowleftthai: 0xF88F,
  31442. maitholowrightthai: 0xF88E,
  31443. maithothai: 0x0E49,
  31444. maithoupperleftthai: 0xF88D,
  31445. maitrilowleftthai: 0xF892,
  31446. maitrilowrightthai: 0xF891,
  31447. maitrithai: 0x0E4A,
  31448. maitriupperleftthai: 0xF890,
  31449. maiyamokthai: 0x0E46,
  31450. makatakana: 0x30DE,
  31451. makatakanahalfwidth: 0xFF8F,
  31452. male: 0x2642,
  31453. mansyonsquare: 0x3347,
  31454. maqafhebrew: 0x05BE,
  31455. mars: 0x2642,
  31456. masoracirclehebrew: 0x05AF,
  31457. masquare: 0x3383,
  31458. mbopomofo: 0x3107,
  31459. mbsquare: 0x33D4,
  31460. mcircle: 0x24DC,
  31461. mcubedsquare: 0x33A5,
  31462. mdotaccent: 0x1E41,
  31463. mdotbelow: 0x1E43,
  31464. meemarabic: 0x0645,
  31465. meemfinalarabic: 0xFEE2,
  31466. meeminitialarabic: 0xFEE3,
  31467. meemmedialarabic: 0xFEE4,
  31468. meemmeeminitialarabic: 0xFCD1,
  31469. meemmeemisolatedarabic: 0xFC48,
  31470. meetorusquare: 0x334D,
  31471. mehiragana: 0x3081,
  31472. meizierasquare: 0x337E,
  31473. mekatakana: 0x30E1,
  31474. mekatakanahalfwidth: 0xFF92,
  31475. mem: 0x05DE,
  31476. memdagesh: 0xFB3E,
  31477. memdageshhebrew: 0xFB3E,
  31478. memhebrew: 0x05DE,
  31479. menarmenian: 0x0574,
  31480. merkhahebrew: 0x05A5,
  31481. merkhakefulahebrew: 0x05A6,
  31482. merkhakefulalefthebrew: 0x05A6,
  31483. merkhalefthebrew: 0x05A5,
  31484. mhook: 0x0271,
  31485. mhzsquare: 0x3392,
  31486. middledotkatakanahalfwidth: 0xFF65,
  31487. middot: 0x00B7,
  31488. mieumacirclekorean: 0x3272,
  31489. mieumaparenkorean: 0x3212,
  31490. mieumcirclekorean: 0x3264,
  31491. mieumkorean: 0x3141,
  31492. mieumpansioskorean: 0x3170,
  31493. mieumparenkorean: 0x3204,
  31494. mieumpieupkorean: 0x316E,
  31495. mieumsioskorean: 0x316F,
  31496. mihiragana: 0x307F,
  31497. mikatakana: 0x30DF,
  31498. mikatakanahalfwidth: 0xFF90,
  31499. minus: 0x2212,
  31500. minusbelowcmb: 0x0320,
  31501. minuscircle: 0x2296,
  31502. minusmod: 0x02D7,
  31503. minusplus: 0x2213,
  31504. minute: 0x2032,
  31505. miribaarusquare: 0x334A,
  31506. mirisquare: 0x3349,
  31507. mlonglegturned: 0x0270,
  31508. mlsquare: 0x3396,
  31509. mmcubedsquare: 0x33A3,
  31510. mmonospace: 0xFF4D,
  31511. mmsquaredsquare: 0x339F,
  31512. mohiragana: 0x3082,
  31513. mohmsquare: 0x33C1,
  31514. mokatakana: 0x30E2,
  31515. mokatakanahalfwidth: 0xFF93,
  31516. molsquare: 0x33D6,
  31517. momathai: 0x0E21,
  31518. moverssquare: 0x33A7,
  31519. moverssquaredsquare: 0x33A8,
  31520. mparen: 0x24A8,
  31521. mpasquare: 0x33AB,
  31522. mssquare: 0x33B3,
  31523. msuperior: 0xF6EF,
  31524. mturned: 0x026F,
  31525. mu: 0x00B5,
  31526. mu1: 0x00B5,
  31527. muasquare: 0x3382,
  31528. muchgreater: 0x226B,
  31529. muchless: 0x226A,
  31530. mufsquare: 0x338C,
  31531. mugreek: 0x03BC,
  31532. mugsquare: 0x338D,
  31533. muhiragana: 0x3080,
  31534. mukatakana: 0x30E0,
  31535. mukatakanahalfwidth: 0xFF91,
  31536. mulsquare: 0x3395,
  31537. multiply: 0x00D7,
  31538. mumsquare: 0x339B,
  31539. munahhebrew: 0x05A3,
  31540. munahlefthebrew: 0x05A3,
  31541. musicalnote: 0x266A,
  31542. musicalnotedbl: 0x266B,
  31543. musicflatsign: 0x266D,
  31544. musicsharpsign: 0x266F,
  31545. mussquare: 0x33B2,
  31546. muvsquare: 0x33B6,
  31547. muwsquare: 0x33BC,
  31548. mvmegasquare: 0x33B9,
  31549. mvsquare: 0x33B7,
  31550. mwmegasquare: 0x33BF,
  31551. mwsquare: 0x33BD,
  31552. n: 0x006E,
  31553. nabengali: 0x09A8,
  31554. nabla: 0x2207,
  31555. nacute: 0x0144,
  31556. nadeva: 0x0928,
  31557. nagujarati: 0x0AA8,
  31558. nagurmukhi: 0x0A28,
  31559. nahiragana: 0x306A,
  31560. nakatakana: 0x30CA,
  31561. nakatakanahalfwidth: 0xFF85,
  31562. napostrophe: 0x0149,
  31563. nasquare: 0x3381,
  31564. nbopomofo: 0x310B,
  31565. nbspace: 0x00A0,
  31566. ncaron: 0x0148,
  31567. ncedilla: 0x0146,
  31568. ncircle: 0x24DD,
  31569. ncircumflexbelow: 0x1E4B,
  31570. ncommaaccent: 0x0146,
  31571. ndotaccent: 0x1E45,
  31572. ndotbelow: 0x1E47,
  31573. nehiragana: 0x306D,
  31574. nekatakana: 0x30CD,
  31575. nekatakanahalfwidth: 0xFF88,
  31576. newsheqelsign: 0x20AA,
  31577. nfsquare: 0x338B,
  31578. ngabengali: 0x0999,
  31579. ngadeva: 0x0919,
  31580. ngagujarati: 0x0A99,
  31581. ngagurmukhi: 0x0A19,
  31582. ngonguthai: 0x0E07,
  31583. nhiragana: 0x3093,
  31584. nhookleft: 0x0272,
  31585. nhookretroflex: 0x0273,
  31586. nieunacirclekorean: 0x326F,
  31587. nieunaparenkorean: 0x320F,
  31588. nieuncieuckorean: 0x3135,
  31589. nieuncirclekorean: 0x3261,
  31590. nieunhieuhkorean: 0x3136,
  31591. nieunkorean: 0x3134,
  31592. nieunpansioskorean: 0x3168,
  31593. nieunparenkorean: 0x3201,
  31594. nieunsioskorean: 0x3167,
  31595. nieuntikeutkorean: 0x3166,
  31596. nihiragana: 0x306B,
  31597. nikatakana: 0x30CB,
  31598. nikatakanahalfwidth: 0xFF86,
  31599. nikhahitleftthai: 0xF899,
  31600. nikhahitthai: 0x0E4D,
  31601. nine: 0x0039,
  31602. ninearabic: 0x0669,
  31603. ninebengali: 0x09EF,
  31604. ninecircle: 0x2468,
  31605. ninecircleinversesansserif: 0x2792,
  31606. ninedeva: 0x096F,
  31607. ninegujarati: 0x0AEF,
  31608. ninegurmukhi: 0x0A6F,
  31609. ninehackarabic: 0x0669,
  31610. ninehangzhou: 0x3029,
  31611. nineideographicparen: 0x3228,
  31612. nineinferior: 0x2089,
  31613. ninemonospace: 0xFF19,
  31614. nineoldstyle: 0xF739,
  31615. nineparen: 0x247C,
  31616. nineperiod: 0x2490,
  31617. ninepersian: 0x06F9,
  31618. nineroman: 0x2178,
  31619. ninesuperior: 0x2079,
  31620. nineteencircle: 0x2472,
  31621. nineteenparen: 0x2486,
  31622. nineteenperiod: 0x249A,
  31623. ninethai: 0x0E59,
  31624. nj: 0x01CC,
  31625. njecyrillic: 0x045A,
  31626. nkatakana: 0x30F3,
  31627. nkatakanahalfwidth: 0xFF9D,
  31628. nlegrightlong: 0x019E,
  31629. nlinebelow: 0x1E49,
  31630. nmonospace: 0xFF4E,
  31631. nmsquare: 0x339A,
  31632. nnabengali: 0x09A3,
  31633. nnadeva: 0x0923,
  31634. nnagujarati: 0x0AA3,
  31635. nnagurmukhi: 0x0A23,
  31636. nnnadeva: 0x0929,
  31637. nohiragana: 0x306E,
  31638. nokatakana: 0x30CE,
  31639. nokatakanahalfwidth: 0xFF89,
  31640. nonbreakingspace: 0x00A0,
  31641. nonenthai: 0x0E13,
  31642. nonuthai: 0x0E19,
  31643. noonarabic: 0x0646,
  31644. noonfinalarabic: 0xFEE6,
  31645. noonghunnaarabic: 0x06BA,
  31646. noonghunnafinalarabic: 0xFB9F,
  31647. nooninitialarabic: 0xFEE7,
  31648. noonjeeminitialarabic: 0xFCD2,
  31649. noonjeemisolatedarabic: 0xFC4B,
  31650. noonmedialarabic: 0xFEE8,
  31651. noonmeeminitialarabic: 0xFCD5,
  31652. noonmeemisolatedarabic: 0xFC4E,
  31653. noonnoonfinalarabic: 0xFC8D,
  31654. notcontains: 0x220C,
  31655. notelement: 0x2209,
  31656. notelementof: 0x2209,
  31657. notequal: 0x2260,
  31658. notgreater: 0x226F,
  31659. notgreaternorequal: 0x2271,
  31660. notgreaternorless: 0x2279,
  31661. notidentical: 0x2262,
  31662. notless: 0x226E,
  31663. notlessnorequal: 0x2270,
  31664. notparallel: 0x2226,
  31665. notprecedes: 0x2280,
  31666. notsubset: 0x2284,
  31667. notsucceeds: 0x2281,
  31668. notsuperset: 0x2285,
  31669. nowarmenian: 0x0576,
  31670. nparen: 0x24A9,
  31671. nssquare: 0x33B1,
  31672. nsuperior: 0x207F,
  31673. ntilde: 0x00F1,
  31674. nu: 0x03BD,
  31675. nuhiragana: 0x306C,
  31676. nukatakana: 0x30CC,
  31677. nukatakanahalfwidth: 0xFF87,
  31678. nuktabengali: 0x09BC,
  31679. nuktadeva: 0x093C,
  31680. nuktagujarati: 0x0ABC,
  31681. nuktagurmukhi: 0x0A3C,
  31682. numbersign: 0x0023,
  31683. numbersignmonospace: 0xFF03,
  31684. numbersignsmall: 0xFE5F,
  31685. numeralsigngreek: 0x0374,
  31686. numeralsignlowergreek: 0x0375,
  31687. numero: 0x2116,
  31688. nun: 0x05E0,
  31689. nundagesh: 0xFB40,
  31690. nundageshhebrew: 0xFB40,
  31691. nunhebrew: 0x05E0,
  31692. nvsquare: 0x33B5,
  31693. nwsquare: 0x33BB,
  31694. nyabengali: 0x099E,
  31695. nyadeva: 0x091E,
  31696. nyagujarati: 0x0A9E,
  31697. nyagurmukhi: 0x0A1E,
  31698. o: 0x006F,
  31699. oacute: 0x00F3,
  31700. oangthai: 0x0E2D,
  31701. obarred: 0x0275,
  31702. obarredcyrillic: 0x04E9,
  31703. obarreddieresiscyrillic: 0x04EB,
  31704. obengali: 0x0993,
  31705. obopomofo: 0x311B,
  31706. obreve: 0x014F,
  31707. ocandradeva: 0x0911,
  31708. ocandragujarati: 0x0A91,
  31709. ocandravowelsigndeva: 0x0949,
  31710. ocandravowelsigngujarati: 0x0AC9,
  31711. ocaron: 0x01D2,
  31712. ocircle: 0x24DE,
  31713. ocircumflex: 0x00F4,
  31714. ocircumflexacute: 0x1ED1,
  31715. ocircumflexdotbelow: 0x1ED9,
  31716. ocircumflexgrave: 0x1ED3,
  31717. ocircumflexhookabove: 0x1ED5,
  31718. ocircumflextilde: 0x1ED7,
  31719. ocyrillic: 0x043E,
  31720. odblacute: 0x0151,
  31721. odblgrave: 0x020D,
  31722. odeva: 0x0913,
  31723. odieresis: 0x00F6,
  31724. odieresiscyrillic: 0x04E7,
  31725. odotbelow: 0x1ECD,
  31726. oe: 0x0153,
  31727. oekorean: 0x315A,
  31728. ogonek: 0x02DB,
  31729. ogonekcmb: 0x0328,
  31730. ograve: 0x00F2,
  31731. ogujarati: 0x0A93,
  31732. oharmenian: 0x0585,
  31733. ohiragana: 0x304A,
  31734. ohookabove: 0x1ECF,
  31735. ohorn: 0x01A1,
  31736. ohornacute: 0x1EDB,
  31737. ohorndotbelow: 0x1EE3,
  31738. ohorngrave: 0x1EDD,
  31739. ohornhookabove: 0x1EDF,
  31740. ohorntilde: 0x1EE1,
  31741. ohungarumlaut: 0x0151,
  31742. oi: 0x01A3,
  31743. oinvertedbreve: 0x020F,
  31744. okatakana: 0x30AA,
  31745. okatakanahalfwidth: 0xFF75,
  31746. okorean: 0x3157,
  31747. olehebrew: 0x05AB,
  31748. omacron: 0x014D,
  31749. omacronacute: 0x1E53,
  31750. omacrongrave: 0x1E51,
  31751. omdeva: 0x0950,
  31752. omega: 0x03C9,
  31753. omega1: 0x03D6,
  31754. omegacyrillic: 0x0461,
  31755. omegalatinclosed: 0x0277,
  31756. omegaroundcyrillic: 0x047B,
  31757. omegatitlocyrillic: 0x047D,
  31758. omegatonos: 0x03CE,
  31759. omgujarati: 0x0AD0,
  31760. omicron: 0x03BF,
  31761. omicrontonos: 0x03CC,
  31762. omonospace: 0xFF4F,
  31763. one: 0x0031,
  31764. onearabic: 0x0661,
  31765. onebengali: 0x09E7,
  31766. onecircle: 0x2460,
  31767. onecircleinversesansserif: 0x278A,
  31768. onedeva: 0x0967,
  31769. onedotenleader: 0x2024,
  31770. oneeighth: 0x215B,
  31771. onefitted: 0xF6DC,
  31772. onegujarati: 0x0AE7,
  31773. onegurmukhi: 0x0A67,
  31774. onehackarabic: 0x0661,
  31775. onehalf: 0x00BD,
  31776. onehangzhou: 0x3021,
  31777. oneideographicparen: 0x3220,
  31778. oneinferior: 0x2081,
  31779. onemonospace: 0xFF11,
  31780. onenumeratorbengali: 0x09F4,
  31781. oneoldstyle: 0xF731,
  31782. oneparen: 0x2474,
  31783. oneperiod: 0x2488,
  31784. onepersian: 0x06F1,
  31785. onequarter: 0x00BC,
  31786. oneroman: 0x2170,
  31787. onesuperior: 0x00B9,
  31788. onethai: 0x0E51,
  31789. onethird: 0x2153,
  31790. oogonek: 0x01EB,
  31791. oogonekmacron: 0x01ED,
  31792. oogurmukhi: 0x0A13,
  31793. oomatragurmukhi: 0x0A4B,
  31794. oopen: 0x0254,
  31795. oparen: 0x24AA,
  31796. openbullet: 0x25E6,
  31797. option: 0x2325,
  31798. ordfeminine: 0x00AA,
  31799. ordmasculine: 0x00BA,
  31800. orthogonal: 0x221F,
  31801. oshortdeva: 0x0912,
  31802. oshortvowelsigndeva: 0x094A,
  31803. oslash: 0x00F8,
  31804. oslashacute: 0x01FF,
  31805. osmallhiragana: 0x3049,
  31806. osmallkatakana: 0x30A9,
  31807. osmallkatakanahalfwidth: 0xFF6B,
  31808. ostrokeacute: 0x01FF,
  31809. osuperior: 0xF6F0,
  31810. otcyrillic: 0x047F,
  31811. otilde: 0x00F5,
  31812. otildeacute: 0x1E4D,
  31813. otildedieresis: 0x1E4F,
  31814. oubopomofo: 0x3121,
  31815. overline: 0x203E,
  31816. overlinecenterline: 0xFE4A,
  31817. overlinecmb: 0x0305,
  31818. overlinedashed: 0xFE49,
  31819. overlinedblwavy: 0xFE4C,
  31820. overlinewavy: 0xFE4B,
  31821. overscore: 0x00AF,
  31822. ovowelsignbengali: 0x09CB,
  31823. ovowelsigndeva: 0x094B,
  31824. ovowelsigngujarati: 0x0ACB,
  31825. p: 0x0070,
  31826. paampssquare: 0x3380,
  31827. paasentosquare: 0x332B,
  31828. pabengali: 0x09AA,
  31829. pacute: 0x1E55,
  31830. padeva: 0x092A,
  31831. pagedown: 0x21DF,
  31832. pageup: 0x21DE,
  31833. pagujarati: 0x0AAA,
  31834. pagurmukhi: 0x0A2A,
  31835. pahiragana: 0x3071,
  31836. paiyannoithai: 0x0E2F,
  31837. pakatakana: 0x30D1,
  31838. palatalizationcyrilliccmb: 0x0484,
  31839. palochkacyrillic: 0x04C0,
  31840. pansioskorean: 0x317F,
  31841. paragraph: 0x00B6,
  31842. parallel: 0x2225,
  31843. parenleft: 0x0028,
  31844. parenleftaltonearabic: 0xFD3E,
  31845. parenleftbt: 0xF8ED,
  31846. parenleftex: 0xF8EC,
  31847. parenleftinferior: 0x208D,
  31848. parenleftmonospace: 0xFF08,
  31849. parenleftsmall: 0xFE59,
  31850. parenleftsuperior: 0x207D,
  31851. parenlefttp: 0xF8EB,
  31852. parenleftvertical: 0xFE35,
  31853. parenright: 0x0029,
  31854. parenrightaltonearabic: 0xFD3F,
  31855. parenrightbt: 0xF8F8,
  31856. parenrightex: 0xF8F7,
  31857. parenrightinferior: 0x208E,
  31858. parenrightmonospace: 0xFF09,
  31859. parenrightsmall: 0xFE5A,
  31860. parenrightsuperior: 0x207E,
  31861. parenrighttp: 0xF8F6,
  31862. parenrightvertical: 0xFE36,
  31863. partialdiff: 0x2202,
  31864. paseqhebrew: 0x05C0,
  31865. pashtahebrew: 0x0599,
  31866. pasquare: 0x33A9,
  31867. patah: 0x05B7,
  31868. patah11: 0x05B7,
  31869. patah1d: 0x05B7,
  31870. patah2a: 0x05B7,
  31871. patahhebrew: 0x05B7,
  31872. patahnarrowhebrew: 0x05B7,
  31873. patahquarterhebrew: 0x05B7,
  31874. patahwidehebrew: 0x05B7,
  31875. pazerhebrew: 0x05A1,
  31876. pbopomofo: 0x3106,
  31877. pcircle: 0x24DF,
  31878. pdotaccent: 0x1E57,
  31879. pe: 0x05E4,
  31880. pecyrillic: 0x043F,
  31881. pedagesh: 0xFB44,
  31882. pedageshhebrew: 0xFB44,
  31883. peezisquare: 0x333B,
  31884. pefinaldageshhebrew: 0xFB43,
  31885. peharabic: 0x067E,
  31886. peharmenian: 0x057A,
  31887. pehebrew: 0x05E4,
  31888. pehfinalarabic: 0xFB57,
  31889. pehinitialarabic: 0xFB58,
  31890. pehiragana: 0x307A,
  31891. pehmedialarabic: 0xFB59,
  31892. pekatakana: 0x30DA,
  31893. pemiddlehookcyrillic: 0x04A7,
  31894. perafehebrew: 0xFB4E,
  31895. percent: 0x0025,
  31896. percentarabic: 0x066A,
  31897. percentmonospace: 0xFF05,
  31898. percentsmall: 0xFE6A,
  31899. period: 0x002E,
  31900. periodarmenian: 0x0589,
  31901. periodcentered: 0x00B7,
  31902. periodhalfwidth: 0xFF61,
  31903. periodinferior: 0xF6E7,
  31904. periodmonospace: 0xFF0E,
  31905. periodsmall: 0xFE52,
  31906. periodsuperior: 0xF6E8,
  31907. perispomenigreekcmb: 0x0342,
  31908. perpendicular: 0x22A5,
  31909. perthousand: 0x2030,
  31910. peseta: 0x20A7,
  31911. pfsquare: 0x338A,
  31912. phabengali: 0x09AB,
  31913. phadeva: 0x092B,
  31914. phagujarati: 0x0AAB,
  31915. phagurmukhi: 0x0A2B,
  31916. phi: 0x03C6,
  31917. phi1: 0x03D5,
  31918. phieuphacirclekorean: 0x327A,
  31919. phieuphaparenkorean: 0x321A,
  31920. phieuphcirclekorean: 0x326C,
  31921. phieuphkorean: 0x314D,
  31922. phieuphparenkorean: 0x320C,
  31923. philatin: 0x0278,
  31924. phinthuthai: 0x0E3A,
  31925. phisymbolgreek: 0x03D5,
  31926. phook: 0x01A5,
  31927. phophanthai: 0x0E1E,
  31928. phophungthai: 0x0E1C,
  31929. phosamphaothai: 0x0E20,
  31930. pi: 0x03C0,
  31931. pieupacirclekorean: 0x3273,
  31932. pieupaparenkorean: 0x3213,
  31933. pieupcieuckorean: 0x3176,
  31934. pieupcirclekorean: 0x3265,
  31935. pieupkiyeokkorean: 0x3172,
  31936. pieupkorean: 0x3142,
  31937. pieupparenkorean: 0x3205,
  31938. pieupsioskiyeokkorean: 0x3174,
  31939. pieupsioskorean: 0x3144,
  31940. pieupsiostikeutkorean: 0x3175,
  31941. pieupthieuthkorean: 0x3177,
  31942. pieuptikeutkorean: 0x3173,
  31943. pihiragana: 0x3074,
  31944. pikatakana: 0x30D4,
  31945. pisymbolgreek: 0x03D6,
  31946. piwrarmenian: 0x0583,
  31947. plus: 0x002B,
  31948. plusbelowcmb: 0x031F,
  31949. pluscircle: 0x2295,
  31950. plusminus: 0x00B1,
  31951. plusmod: 0x02D6,
  31952. plusmonospace: 0xFF0B,
  31953. plussmall: 0xFE62,
  31954. plussuperior: 0x207A,
  31955. pmonospace: 0xFF50,
  31956. pmsquare: 0x33D8,
  31957. pohiragana: 0x307D,
  31958. pointingindexdownwhite: 0x261F,
  31959. pointingindexleftwhite: 0x261C,
  31960. pointingindexrightwhite: 0x261E,
  31961. pointingindexupwhite: 0x261D,
  31962. pokatakana: 0x30DD,
  31963. poplathai: 0x0E1B,
  31964. postalmark: 0x3012,
  31965. postalmarkface: 0x3020,
  31966. pparen: 0x24AB,
  31967. precedes: 0x227A,
  31968. prescription: 0x211E,
  31969. primemod: 0x02B9,
  31970. primereversed: 0x2035,
  31971. product: 0x220F,
  31972. projective: 0x2305,
  31973. prolongedkana: 0x30FC,
  31974. propellor: 0x2318,
  31975. propersubset: 0x2282,
  31976. propersuperset: 0x2283,
  31977. proportion: 0x2237,
  31978. proportional: 0x221D,
  31979. psi: 0x03C8,
  31980. psicyrillic: 0x0471,
  31981. psilipneumatacyrilliccmb: 0x0486,
  31982. pssquare: 0x33B0,
  31983. puhiragana: 0x3077,
  31984. pukatakana: 0x30D7,
  31985. pvsquare: 0x33B4,
  31986. pwsquare: 0x33BA,
  31987. q: 0x0071,
  31988. qadeva: 0x0958,
  31989. qadmahebrew: 0x05A8,
  31990. qafarabic: 0x0642,
  31991. qaffinalarabic: 0xFED6,
  31992. qafinitialarabic: 0xFED7,
  31993. qafmedialarabic: 0xFED8,
  31994. qamats: 0x05B8,
  31995. qamats10: 0x05B8,
  31996. qamats1a: 0x05B8,
  31997. qamats1c: 0x05B8,
  31998. qamats27: 0x05B8,
  31999. qamats29: 0x05B8,
  32000. qamats33: 0x05B8,
  32001. qamatsde: 0x05B8,
  32002. qamatshebrew: 0x05B8,
  32003. qamatsnarrowhebrew: 0x05B8,
  32004. qamatsqatanhebrew: 0x05B8,
  32005. qamatsqatannarrowhebrew: 0x05B8,
  32006. qamatsqatanquarterhebrew: 0x05B8,
  32007. qamatsqatanwidehebrew: 0x05B8,
  32008. qamatsquarterhebrew: 0x05B8,
  32009. qamatswidehebrew: 0x05B8,
  32010. qarneyparahebrew: 0x059F,
  32011. qbopomofo: 0x3111,
  32012. qcircle: 0x24E0,
  32013. qhook: 0x02A0,
  32014. qmonospace: 0xFF51,
  32015. qof: 0x05E7,
  32016. qofdagesh: 0xFB47,
  32017. qofdageshhebrew: 0xFB47,
  32018. qofhebrew: 0x05E7,
  32019. qparen: 0x24AC,
  32020. quarternote: 0x2669,
  32021. qubuts: 0x05BB,
  32022. qubuts18: 0x05BB,
  32023. qubuts25: 0x05BB,
  32024. qubuts31: 0x05BB,
  32025. qubutshebrew: 0x05BB,
  32026. qubutsnarrowhebrew: 0x05BB,
  32027. qubutsquarterhebrew: 0x05BB,
  32028. qubutswidehebrew: 0x05BB,
  32029. question: 0x003F,
  32030. questionarabic: 0x061F,
  32031. questionarmenian: 0x055E,
  32032. questiondown: 0x00BF,
  32033. questiondownsmall: 0xF7BF,
  32034. questiongreek: 0x037E,
  32035. questionmonospace: 0xFF1F,
  32036. questionsmall: 0xF73F,
  32037. quotedbl: 0x0022,
  32038. quotedblbase: 0x201E,
  32039. quotedblleft: 0x201C,
  32040. quotedblmonospace: 0xFF02,
  32041. quotedblprime: 0x301E,
  32042. quotedblprimereversed: 0x301D,
  32043. quotedblright: 0x201D,
  32044. quoteleft: 0x2018,
  32045. quoteleftreversed: 0x201B,
  32046. quotereversed: 0x201B,
  32047. quoteright: 0x2019,
  32048. quoterightn: 0x0149,
  32049. quotesinglbase: 0x201A,
  32050. quotesingle: 0x0027,
  32051. quotesinglemonospace: 0xFF07,
  32052. r: 0x0072,
  32053. raarmenian: 0x057C,
  32054. rabengali: 0x09B0,
  32055. racute: 0x0155,
  32056. radeva: 0x0930,
  32057. radical: 0x221A,
  32058. radicalex: 0xF8E5,
  32059. radoverssquare: 0x33AE,
  32060. radoverssquaredsquare: 0x33AF,
  32061. radsquare: 0x33AD,
  32062. rafe: 0x05BF,
  32063. rafehebrew: 0x05BF,
  32064. ragujarati: 0x0AB0,
  32065. ragurmukhi: 0x0A30,
  32066. rahiragana: 0x3089,
  32067. rakatakana: 0x30E9,
  32068. rakatakanahalfwidth: 0xFF97,
  32069. ralowerdiagonalbengali: 0x09F1,
  32070. ramiddlediagonalbengali: 0x09F0,
  32071. ramshorn: 0x0264,
  32072. ratio: 0x2236,
  32073. rbopomofo: 0x3116,
  32074. rcaron: 0x0159,
  32075. rcedilla: 0x0157,
  32076. rcircle: 0x24E1,
  32077. rcommaaccent: 0x0157,
  32078. rdblgrave: 0x0211,
  32079. rdotaccent: 0x1E59,
  32080. rdotbelow: 0x1E5B,
  32081. rdotbelowmacron: 0x1E5D,
  32082. referencemark: 0x203B,
  32083. reflexsubset: 0x2286,
  32084. reflexsuperset: 0x2287,
  32085. registered: 0x00AE,
  32086. registersans: 0xF8E8,
  32087. registerserif: 0xF6DA,
  32088. reharabic: 0x0631,
  32089. reharmenian: 0x0580,
  32090. rehfinalarabic: 0xFEAE,
  32091. rehiragana: 0x308C,
  32092. rekatakana: 0x30EC,
  32093. rekatakanahalfwidth: 0xFF9A,
  32094. resh: 0x05E8,
  32095. reshdageshhebrew: 0xFB48,
  32096. reshhebrew: 0x05E8,
  32097. reversedtilde: 0x223D,
  32098. reviahebrew: 0x0597,
  32099. reviamugrashhebrew: 0x0597,
  32100. revlogicalnot: 0x2310,
  32101. rfishhook: 0x027E,
  32102. rfishhookreversed: 0x027F,
  32103. rhabengali: 0x09DD,
  32104. rhadeva: 0x095D,
  32105. rho: 0x03C1,
  32106. rhook: 0x027D,
  32107. rhookturned: 0x027B,
  32108. rhookturnedsuperior: 0x02B5,
  32109. rhosymbolgreek: 0x03F1,
  32110. rhotichookmod: 0x02DE,
  32111. rieulacirclekorean: 0x3271,
  32112. rieulaparenkorean: 0x3211,
  32113. rieulcirclekorean: 0x3263,
  32114. rieulhieuhkorean: 0x3140,
  32115. rieulkiyeokkorean: 0x313A,
  32116. rieulkiyeoksioskorean: 0x3169,
  32117. rieulkorean: 0x3139,
  32118. rieulmieumkorean: 0x313B,
  32119. rieulpansioskorean: 0x316C,
  32120. rieulparenkorean: 0x3203,
  32121. rieulphieuphkorean: 0x313F,
  32122. rieulpieupkorean: 0x313C,
  32123. rieulpieupsioskorean: 0x316B,
  32124. rieulsioskorean: 0x313D,
  32125. rieulthieuthkorean: 0x313E,
  32126. rieultikeutkorean: 0x316A,
  32127. rieulyeorinhieuhkorean: 0x316D,
  32128. rightangle: 0x221F,
  32129. righttackbelowcmb: 0x0319,
  32130. righttriangle: 0x22BF,
  32131. rihiragana: 0x308A,
  32132. rikatakana: 0x30EA,
  32133. rikatakanahalfwidth: 0xFF98,
  32134. ring: 0x02DA,
  32135. ringbelowcmb: 0x0325,
  32136. ringcmb: 0x030A,
  32137. ringhalfleft: 0x02BF,
  32138. ringhalfleftarmenian: 0x0559,
  32139. ringhalfleftbelowcmb: 0x031C,
  32140. ringhalfleftcentered: 0x02D3,
  32141. ringhalfright: 0x02BE,
  32142. ringhalfrightbelowcmb: 0x0339,
  32143. ringhalfrightcentered: 0x02D2,
  32144. rinvertedbreve: 0x0213,
  32145. rittorusquare: 0x3351,
  32146. rlinebelow: 0x1E5F,
  32147. rlongleg: 0x027C,
  32148. rlonglegturned: 0x027A,
  32149. rmonospace: 0xFF52,
  32150. rohiragana: 0x308D,
  32151. rokatakana: 0x30ED,
  32152. rokatakanahalfwidth: 0xFF9B,
  32153. roruathai: 0x0E23,
  32154. rparen: 0x24AD,
  32155. rrabengali: 0x09DC,
  32156. rradeva: 0x0931,
  32157. rragurmukhi: 0x0A5C,
  32158. rreharabic: 0x0691,
  32159. rrehfinalarabic: 0xFB8D,
  32160. rrvocalicbengali: 0x09E0,
  32161. rrvocalicdeva: 0x0960,
  32162. rrvocalicgujarati: 0x0AE0,
  32163. rrvocalicvowelsignbengali: 0x09C4,
  32164. rrvocalicvowelsigndeva: 0x0944,
  32165. rrvocalicvowelsigngujarati: 0x0AC4,
  32166. rsuperior: 0xF6F1,
  32167. rtblock: 0x2590,
  32168. rturned: 0x0279,
  32169. rturnedsuperior: 0x02B4,
  32170. ruhiragana: 0x308B,
  32171. rukatakana: 0x30EB,
  32172. rukatakanahalfwidth: 0xFF99,
  32173. rupeemarkbengali: 0x09F2,
  32174. rupeesignbengali: 0x09F3,
  32175. rupiah: 0xF6DD,
  32176. ruthai: 0x0E24,
  32177. rvocalicbengali: 0x098B,
  32178. rvocalicdeva: 0x090B,
  32179. rvocalicgujarati: 0x0A8B,
  32180. rvocalicvowelsignbengali: 0x09C3,
  32181. rvocalicvowelsigndeva: 0x0943,
  32182. rvocalicvowelsigngujarati: 0x0AC3,
  32183. s: 0x0073,
  32184. sabengali: 0x09B8,
  32185. sacute: 0x015B,
  32186. sacutedotaccent: 0x1E65,
  32187. sadarabic: 0x0635,
  32188. sadeva: 0x0938,
  32189. sadfinalarabic: 0xFEBA,
  32190. sadinitialarabic: 0xFEBB,
  32191. sadmedialarabic: 0xFEBC,
  32192. sagujarati: 0x0AB8,
  32193. sagurmukhi: 0x0A38,
  32194. sahiragana: 0x3055,
  32195. sakatakana: 0x30B5,
  32196. sakatakanahalfwidth: 0xFF7B,
  32197. sallallahoualayhewasallamarabic: 0xFDFA,
  32198. samekh: 0x05E1,
  32199. samekhdagesh: 0xFB41,
  32200. samekhdageshhebrew: 0xFB41,
  32201. samekhhebrew: 0x05E1,
  32202. saraaathai: 0x0E32,
  32203. saraaethai: 0x0E41,
  32204. saraaimaimalaithai: 0x0E44,
  32205. saraaimaimuanthai: 0x0E43,
  32206. saraamthai: 0x0E33,
  32207. saraathai: 0x0E30,
  32208. saraethai: 0x0E40,
  32209. saraiileftthai: 0xF886,
  32210. saraiithai: 0x0E35,
  32211. saraileftthai: 0xF885,
  32212. saraithai: 0x0E34,
  32213. saraothai: 0x0E42,
  32214. saraueeleftthai: 0xF888,
  32215. saraueethai: 0x0E37,
  32216. saraueleftthai: 0xF887,
  32217. sarauethai: 0x0E36,
  32218. sarauthai: 0x0E38,
  32219. sarauuthai: 0x0E39,
  32220. sbopomofo: 0x3119,
  32221. scaron: 0x0161,
  32222. scarondotaccent: 0x1E67,
  32223. scedilla: 0x015F,
  32224. schwa: 0x0259,
  32225. schwacyrillic: 0x04D9,
  32226. schwadieresiscyrillic: 0x04DB,
  32227. schwahook: 0x025A,
  32228. scircle: 0x24E2,
  32229. scircumflex: 0x015D,
  32230. scommaaccent: 0x0219,
  32231. sdotaccent: 0x1E61,
  32232. sdotbelow: 0x1E63,
  32233. sdotbelowdotaccent: 0x1E69,
  32234. seagullbelowcmb: 0x033C,
  32235. second: 0x2033,
  32236. secondtonechinese: 0x02CA,
  32237. section: 0x00A7,
  32238. seenarabic: 0x0633,
  32239. seenfinalarabic: 0xFEB2,
  32240. seeninitialarabic: 0xFEB3,
  32241. seenmedialarabic: 0xFEB4,
  32242. segol: 0x05B6,
  32243. segol13: 0x05B6,
  32244. segol1f: 0x05B6,
  32245. segol2c: 0x05B6,
  32246. segolhebrew: 0x05B6,
  32247. segolnarrowhebrew: 0x05B6,
  32248. segolquarterhebrew: 0x05B6,
  32249. segoltahebrew: 0x0592,
  32250. segolwidehebrew: 0x05B6,
  32251. seharmenian: 0x057D,
  32252. sehiragana: 0x305B,
  32253. sekatakana: 0x30BB,
  32254. sekatakanahalfwidth: 0xFF7E,
  32255. semicolon: 0x003B,
  32256. semicolonarabic: 0x061B,
  32257. semicolonmonospace: 0xFF1B,
  32258. semicolonsmall: 0xFE54,
  32259. semivoicedmarkkana: 0x309C,
  32260. semivoicedmarkkanahalfwidth: 0xFF9F,
  32261. sentisquare: 0x3322,
  32262. sentosquare: 0x3323,
  32263. seven: 0x0037,
  32264. sevenarabic: 0x0667,
  32265. sevenbengali: 0x09ED,
  32266. sevencircle: 0x2466,
  32267. sevencircleinversesansserif: 0x2790,
  32268. sevendeva: 0x096D,
  32269. seveneighths: 0x215E,
  32270. sevengujarati: 0x0AED,
  32271. sevengurmukhi: 0x0A6D,
  32272. sevenhackarabic: 0x0667,
  32273. sevenhangzhou: 0x3027,
  32274. sevenideographicparen: 0x3226,
  32275. seveninferior: 0x2087,
  32276. sevenmonospace: 0xFF17,
  32277. sevenoldstyle: 0xF737,
  32278. sevenparen: 0x247A,
  32279. sevenperiod: 0x248E,
  32280. sevenpersian: 0x06F7,
  32281. sevenroman: 0x2176,
  32282. sevensuperior: 0x2077,
  32283. seventeencircle: 0x2470,
  32284. seventeenparen: 0x2484,
  32285. seventeenperiod: 0x2498,
  32286. seventhai: 0x0E57,
  32287. sfthyphen: 0x00AD,
  32288. shaarmenian: 0x0577,
  32289. shabengali: 0x09B6,
  32290. shacyrillic: 0x0448,
  32291. shaddaarabic: 0x0651,
  32292. shaddadammaarabic: 0xFC61,
  32293. shaddadammatanarabic: 0xFC5E,
  32294. shaddafathaarabic: 0xFC60,
  32295. shaddakasraarabic: 0xFC62,
  32296. shaddakasratanarabic: 0xFC5F,
  32297. shade: 0x2592,
  32298. shadedark: 0x2593,
  32299. shadelight: 0x2591,
  32300. shademedium: 0x2592,
  32301. shadeva: 0x0936,
  32302. shagujarati: 0x0AB6,
  32303. shagurmukhi: 0x0A36,
  32304. shalshelethebrew: 0x0593,
  32305. shbopomofo: 0x3115,
  32306. shchacyrillic: 0x0449,
  32307. sheenarabic: 0x0634,
  32308. sheenfinalarabic: 0xFEB6,
  32309. sheeninitialarabic: 0xFEB7,
  32310. sheenmedialarabic: 0xFEB8,
  32311. sheicoptic: 0x03E3,
  32312. sheqel: 0x20AA,
  32313. sheqelhebrew: 0x20AA,
  32314. sheva: 0x05B0,
  32315. sheva115: 0x05B0,
  32316. sheva15: 0x05B0,
  32317. sheva22: 0x05B0,
  32318. sheva2e: 0x05B0,
  32319. shevahebrew: 0x05B0,
  32320. shevanarrowhebrew: 0x05B0,
  32321. shevaquarterhebrew: 0x05B0,
  32322. shevawidehebrew: 0x05B0,
  32323. shhacyrillic: 0x04BB,
  32324. shimacoptic: 0x03ED,
  32325. shin: 0x05E9,
  32326. shindagesh: 0xFB49,
  32327. shindageshhebrew: 0xFB49,
  32328. shindageshshindot: 0xFB2C,
  32329. shindageshshindothebrew: 0xFB2C,
  32330. shindageshsindot: 0xFB2D,
  32331. shindageshsindothebrew: 0xFB2D,
  32332. shindothebrew: 0x05C1,
  32333. shinhebrew: 0x05E9,
  32334. shinshindot: 0xFB2A,
  32335. shinshindothebrew: 0xFB2A,
  32336. shinsindot: 0xFB2B,
  32337. shinsindothebrew: 0xFB2B,
  32338. shook: 0x0282,
  32339. sigma: 0x03C3,
  32340. sigma1: 0x03C2,
  32341. sigmafinal: 0x03C2,
  32342. sigmalunatesymbolgreek: 0x03F2,
  32343. sihiragana: 0x3057,
  32344. sikatakana: 0x30B7,
  32345. sikatakanahalfwidth: 0xFF7C,
  32346. siluqhebrew: 0x05BD,
  32347. siluqlefthebrew: 0x05BD,
  32348. similar: 0x223C,
  32349. sindothebrew: 0x05C2,
  32350. siosacirclekorean: 0x3274,
  32351. siosaparenkorean: 0x3214,
  32352. sioscieuckorean: 0x317E,
  32353. sioscirclekorean: 0x3266,
  32354. sioskiyeokkorean: 0x317A,
  32355. sioskorean: 0x3145,
  32356. siosnieunkorean: 0x317B,
  32357. siosparenkorean: 0x3206,
  32358. siospieupkorean: 0x317D,
  32359. siostikeutkorean: 0x317C,
  32360. six: 0x0036,
  32361. sixarabic: 0x0666,
  32362. sixbengali: 0x09EC,
  32363. sixcircle: 0x2465,
  32364. sixcircleinversesansserif: 0x278F,
  32365. sixdeva: 0x096C,
  32366. sixgujarati: 0x0AEC,
  32367. sixgurmukhi: 0x0A6C,
  32368. sixhackarabic: 0x0666,
  32369. sixhangzhou: 0x3026,
  32370. sixideographicparen: 0x3225,
  32371. sixinferior: 0x2086,
  32372. sixmonospace: 0xFF16,
  32373. sixoldstyle: 0xF736,
  32374. sixparen: 0x2479,
  32375. sixperiod: 0x248D,
  32376. sixpersian: 0x06F6,
  32377. sixroman: 0x2175,
  32378. sixsuperior: 0x2076,
  32379. sixteencircle: 0x246F,
  32380. sixteencurrencydenominatorbengali: 0x09F9,
  32381. sixteenparen: 0x2483,
  32382. sixteenperiod: 0x2497,
  32383. sixthai: 0x0E56,
  32384. slash: 0x002F,
  32385. slashmonospace: 0xFF0F,
  32386. slong: 0x017F,
  32387. slongdotaccent: 0x1E9B,
  32388. smileface: 0x263A,
  32389. smonospace: 0xFF53,
  32390. sofpasuqhebrew: 0x05C3,
  32391. softhyphen: 0x00AD,
  32392. softsigncyrillic: 0x044C,
  32393. sohiragana: 0x305D,
  32394. sokatakana: 0x30BD,
  32395. sokatakanahalfwidth: 0xFF7F,
  32396. soliduslongoverlaycmb: 0x0338,
  32397. solidusshortoverlaycmb: 0x0337,
  32398. sorusithai: 0x0E29,
  32399. sosalathai: 0x0E28,
  32400. sosothai: 0x0E0B,
  32401. sosuathai: 0x0E2A,
  32402. space: 0x0020,
  32403. spacehackarabic: 0x0020,
  32404. spade: 0x2660,
  32405. spadesuitblack: 0x2660,
  32406. spadesuitwhite: 0x2664,
  32407. sparen: 0x24AE,
  32408. squarebelowcmb: 0x033B,
  32409. squarecc: 0x33C4,
  32410. squarecm: 0x339D,
  32411. squarediagonalcrosshatchfill: 0x25A9,
  32412. squarehorizontalfill: 0x25A4,
  32413. squarekg: 0x338F,
  32414. squarekm: 0x339E,
  32415. squarekmcapital: 0x33CE,
  32416. squareln: 0x33D1,
  32417. squarelog: 0x33D2,
  32418. squaremg: 0x338E,
  32419. squaremil: 0x33D5,
  32420. squaremm: 0x339C,
  32421. squaremsquared: 0x33A1,
  32422. squareorthogonalcrosshatchfill: 0x25A6,
  32423. squareupperlefttolowerrightfill: 0x25A7,
  32424. squareupperrighttolowerleftfill: 0x25A8,
  32425. squareverticalfill: 0x25A5,
  32426. squarewhitewithsmallblack: 0x25A3,
  32427. srsquare: 0x33DB,
  32428. ssabengali: 0x09B7,
  32429. ssadeva: 0x0937,
  32430. ssagujarati: 0x0AB7,
  32431. ssangcieuckorean: 0x3149,
  32432. ssanghieuhkorean: 0x3185,
  32433. ssangieungkorean: 0x3180,
  32434. ssangkiyeokkorean: 0x3132,
  32435. ssangnieunkorean: 0x3165,
  32436. ssangpieupkorean: 0x3143,
  32437. ssangsioskorean: 0x3146,
  32438. ssangtikeutkorean: 0x3138,
  32439. ssuperior: 0xF6F2,
  32440. sterling: 0x00A3,
  32441. sterlingmonospace: 0xFFE1,
  32442. strokelongoverlaycmb: 0x0336,
  32443. strokeshortoverlaycmb: 0x0335,
  32444. subset: 0x2282,
  32445. subsetnotequal: 0x228A,
  32446. subsetorequal: 0x2286,
  32447. succeeds: 0x227B,
  32448. suchthat: 0x220B,
  32449. suhiragana: 0x3059,
  32450. sukatakana: 0x30B9,
  32451. sukatakanahalfwidth: 0xFF7D,
  32452. sukunarabic: 0x0652,
  32453. summation: 0x2211,
  32454. sun: 0x263C,
  32455. superset: 0x2283,
  32456. supersetnotequal: 0x228B,
  32457. supersetorequal: 0x2287,
  32458. svsquare: 0x33DC,
  32459. syouwaerasquare: 0x337C,
  32460. t: 0x0074,
  32461. tabengali: 0x09A4,
  32462. tackdown: 0x22A4,
  32463. tackleft: 0x22A3,
  32464. tadeva: 0x0924,
  32465. tagujarati: 0x0AA4,
  32466. tagurmukhi: 0x0A24,
  32467. taharabic: 0x0637,
  32468. tahfinalarabic: 0xFEC2,
  32469. tahinitialarabic: 0xFEC3,
  32470. tahiragana: 0x305F,
  32471. tahmedialarabic: 0xFEC4,
  32472. taisyouerasquare: 0x337D,
  32473. takatakana: 0x30BF,
  32474. takatakanahalfwidth: 0xFF80,
  32475. tatweelarabic: 0x0640,
  32476. tau: 0x03C4,
  32477. tav: 0x05EA,
  32478. tavdages: 0xFB4A,
  32479. tavdagesh: 0xFB4A,
  32480. tavdageshhebrew: 0xFB4A,
  32481. tavhebrew: 0x05EA,
  32482. tbar: 0x0167,
  32483. tbopomofo: 0x310A,
  32484. tcaron: 0x0165,
  32485. tccurl: 0x02A8,
  32486. tcedilla: 0x0163,
  32487. tcheharabic: 0x0686,
  32488. tchehfinalarabic: 0xFB7B,
  32489. tchehinitialarabic: 0xFB7C,
  32490. tchehmedialarabic: 0xFB7D,
  32491. tcircle: 0x24E3,
  32492. tcircumflexbelow: 0x1E71,
  32493. tcommaaccent: 0x0163,
  32494. tdieresis: 0x1E97,
  32495. tdotaccent: 0x1E6B,
  32496. tdotbelow: 0x1E6D,
  32497. tecyrillic: 0x0442,
  32498. tedescendercyrillic: 0x04AD,
  32499. teharabic: 0x062A,
  32500. tehfinalarabic: 0xFE96,
  32501. tehhahinitialarabic: 0xFCA2,
  32502. tehhahisolatedarabic: 0xFC0C,
  32503. tehinitialarabic: 0xFE97,
  32504. tehiragana: 0x3066,
  32505. tehjeeminitialarabic: 0xFCA1,
  32506. tehjeemisolatedarabic: 0xFC0B,
  32507. tehmarbutaarabic: 0x0629,
  32508. tehmarbutafinalarabic: 0xFE94,
  32509. tehmedialarabic: 0xFE98,
  32510. tehmeeminitialarabic: 0xFCA4,
  32511. tehmeemisolatedarabic: 0xFC0E,
  32512. tehnoonfinalarabic: 0xFC73,
  32513. tekatakana: 0x30C6,
  32514. tekatakanahalfwidth: 0xFF83,
  32515. telephone: 0x2121,
  32516. telephoneblack: 0x260E,
  32517. telishagedolahebrew: 0x05A0,
  32518. telishaqetanahebrew: 0x05A9,
  32519. tencircle: 0x2469,
  32520. tenideographicparen: 0x3229,
  32521. tenparen: 0x247D,
  32522. tenperiod: 0x2491,
  32523. tenroman: 0x2179,
  32524. tesh: 0x02A7,
  32525. tet: 0x05D8,
  32526. tetdagesh: 0xFB38,
  32527. tetdageshhebrew: 0xFB38,
  32528. tethebrew: 0x05D8,
  32529. tetsecyrillic: 0x04B5,
  32530. tevirhebrew: 0x059B,
  32531. tevirlefthebrew: 0x059B,
  32532. thabengali: 0x09A5,
  32533. thadeva: 0x0925,
  32534. thagujarati: 0x0AA5,
  32535. thagurmukhi: 0x0A25,
  32536. thalarabic: 0x0630,
  32537. thalfinalarabic: 0xFEAC,
  32538. thanthakhatlowleftthai: 0xF898,
  32539. thanthakhatlowrightthai: 0xF897,
  32540. thanthakhatthai: 0x0E4C,
  32541. thanthakhatupperleftthai: 0xF896,
  32542. theharabic: 0x062B,
  32543. thehfinalarabic: 0xFE9A,
  32544. thehinitialarabic: 0xFE9B,
  32545. thehmedialarabic: 0xFE9C,
  32546. thereexists: 0x2203,
  32547. therefore: 0x2234,
  32548. theta: 0x03B8,
  32549. theta1: 0x03D1,
  32550. thetasymbolgreek: 0x03D1,
  32551. thieuthacirclekorean: 0x3279,
  32552. thieuthaparenkorean: 0x3219,
  32553. thieuthcirclekorean: 0x326B,
  32554. thieuthkorean: 0x314C,
  32555. thieuthparenkorean: 0x320B,
  32556. thirteencircle: 0x246C,
  32557. thirteenparen: 0x2480,
  32558. thirteenperiod: 0x2494,
  32559. thonangmonthothai: 0x0E11,
  32560. thook: 0x01AD,
  32561. thophuthaothai: 0x0E12,
  32562. thorn: 0x00FE,
  32563. thothahanthai: 0x0E17,
  32564. thothanthai: 0x0E10,
  32565. thothongthai: 0x0E18,
  32566. thothungthai: 0x0E16,
  32567. thousandcyrillic: 0x0482,
  32568. thousandsseparatorarabic: 0x066C,
  32569. thousandsseparatorpersian: 0x066C,
  32570. three: 0x0033,
  32571. threearabic: 0x0663,
  32572. threebengali: 0x09E9,
  32573. threecircle: 0x2462,
  32574. threecircleinversesansserif: 0x278C,
  32575. threedeva: 0x0969,
  32576. threeeighths: 0x215C,
  32577. threegujarati: 0x0AE9,
  32578. threegurmukhi: 0x0A69,
  32579. threehackarabic: 0x0663,
  32580. threehangzhou: 0x3023,
  32581. threeideographicparen: 0x3222,
  32582. threeinferior: 0x2083,
  32583. threemonospace: 0xFF13,
  32584. threenumeratorbengali: 0x09F6,
  32585. threeoldstyle: 0xF733,
  32586. threeparen: 0x2476,
  32587. threeperiod: 0x248A,
  32588. threepersian: 0x06F3,
  32589. threequarters: 0x00BE,
  32590. threequartersemdash: 0xF6DE,
  32591. threeroman: 0x2172,
  32592. threesuperior: 0x00B3,
  32593. threethai: 0x0E53,
  32594. thzsquare: 0x3394,
  32595. tihiragana: 0x3061,
  32596. tikatakana: 0x30C1,
  32597. tikatakanahalfwidth: 0xFF81,
  32598. tikeutacirclekorean: 0x3270,
  32599. tikeutaparenkorean: 0x3210,
  32600. tikeutcirclekorean: 0x3262,
  32601. tikeutkorean: 0x3137,
  32602. tikeutparenkorean: 0x3202,
  32603. tilde: 0x02DC,
  32604. tildebelowcmb: 0x0330,
  32605. tildecmb: 0x0303,
  32606. tildecomb: 0x0303,
  32607. tildedoublecmb: 0x0360,
  32608. tildeoperator: 0x223C,
  32609. tildeoverlaycmb: 0x0334,
  32610. tildeverticalcmb: 0x033E,
  32611. timescircle: 0x2297,
  32612. tipehahebrew: 0x0596,
  32613. tipehalefthebrew: 0x0596,
  32614. tippigurmukhi: 0x0A70,
  32615. titlocyrilliccmb: 0x0483,
  32616. tiwnarmenian: 0x057F,
  32617. tlinebelow: 0x1E6F,
  32618. tmonospace: 0xFF54,
  32619. toarmenian: 0x0569,
  32620. tohiragana: 0x3068,
  32621. tokatakana: 0x30C8,
  32622. tokatakanahalfwidth: 0xFF84,
  32623. tonebarextrahighmod: 0x02E5,
  32624. tonebarextralowmod: 0x02E9,
  32625. tonebarhighmod: 0x02E6,
  32626. tonebarlowmod: 0x02E8,
  32627. tonebarmidmod: 0x02E7,
  32628. tonefive: 0x01BD,
  32629. tonesix: 0x0185,
  32630. tonetwo: 0x01A8,
  32631. tonos: 0x0384,
  32632. tonsquare: 0x3327,
  32633. topatakthai: 0x0E0F,
  32634. tortoiseshellbracketleft: 0x3014,
  32635. tortoiseshellbracketleftsmall: 0xFE5D,
  32636. tortoiseshellbracketleftvertical: 0xFE39,
  32637. tortoiseshellbracketright: 0x3015,
  32638. tortoiseshellbracketrightsmall: 0xFE5E,
  32639. tortoiseshellbracketrightvertical: 0xFE3A,
  32640. totaothai: 0x0E15,
  32641. tpalatalhook: 0x01AB,
  32642. tparen: 0x24AF,
  32643. trademark: 0x2122,
  32644. trademarksans: 0xF8EA,
  32645. trademarkserif: 0xF6DB,
  32646. tretroflexhook: 0x0288,
  32647. triagdn: 0x25BC,
  32648. triaglf: 0x25C4,
  32649. triagrt: 0x25BA,
  32650. triagup: 0x25B2,
  32651. ts: 0x02A6,
  32652. tsadi: 0x05E6,
  32653. tsadidagesh: 0xFB46,
  32654. tsadidageshhebrew: 0xFB46,
  32655. tsadihebrew: 0x05E6,
  32656. tsecyrillic: 0x0446,
  32657. tsere: 0x05B5,
  32658. tsere12: 0x05B5,
  32659. tsere1e: 0x05B5,
  32660. tsere2b: 0x05B5,
  32661. tserehebrew: 0x05B5,
  32662. tserenarrowhebrew: 0x05B5,
  32663. tserequarterhebrew: 0x05B5,
  32664. tserewidehebrew: 0x05B5,
  32665. tshecyrillic: 0x045B,
  32666. tsuperior: 0xF6F3,
  32667. ttabengali: 0x099F,
  32668. ttadeva: 0x091F,
  32669. ttagujarati: 0x0A9F,
  32670. ttagurmukhi: 0x0A1F,
  32671. tteharabic: 0x0679,
  32672. ttehfinalarabic: 0xFB67,
  32673. ttehinitialarabic: 0xFB68,
  32674. ttehmedialarabic: 0xFB69,
  32675. tthabengali: 0x09A0,
  32676. tthadeva: 0x0920,
  32677. tthagujarati: 0x0AA0,
  32678. tthagurmukhi: 0x0A20,
  32679. tturned: 0x0287,
  32680. tuhiragana: 0x3064,
  32681. tukatakana: 0x30C4,
  32682. tukatakanahalfwidth: 0xFF82,
  32683. tusmallhiragana: 0x3063,
  32684. tusmallkatakana: 0x30C3,
  32685. tusmallkatakanahalfwidth: 0xFF6F,
  32686. twelvecircle: 0x246B,
  32687. twelveparen: 0x247F,
  32688. twelveperiod: 0x2493,
  32689. twelveroman: 0x217B,
  32690. twentycircle: 0x2473,
  32691. twentyhangzhou: 0x5344,
  32692. twentyparen: 0x2487,
  32693. twentyperiod: 0x249B,
  32694. two: 0x0032,
  32695. twoarabic: 0x0662,
  32696. twobengali: 0x09E8,
  32697. twocircle: 0x2461,
  32698. twocircleinversesansserif: 0x278B,
  32699. twodeva: 0x0968,
  32700. twodotenleader: 0x2025,
  32701. twodotleader: 0x2025,
  32702. twodotleadervertical: 0xFE30,
  32703. twogujarati: 0x0AE8,
  32704. twogurmukhi: 0x0A68,
  32705. twohackarabic: 0x0662,
  32706. twohangzhou: 0x3022,
  32707. twoideographicparen: 0x3221,
  32708. twoinferior: 0x2082,
  32709. twomonospace: 0xFF12,
  32710. twonumeratorbengali: 0x09F5,
  32711. twooldstyle: 0xF732,
  32712. twoparen: 0x2475,
  32713. twoperiod: 0x2489,
  32714. twopersian: 0x06F2,
  32715. tworoman: 0x2171,
  32716. twostroke: 0x01BB,
  32717. twosuperior: 0x00B2,
  32718. twothai: 0x0E52,
  32719. twothirds: 0x2154,
  32720. u: 0x0075,
  32721. uacute: 0x00FA,
  32722. ubar: 0x0289,
  32723. ubengali: 0x0989,
  32724. ubopomofo: 0x3128,
  32725. ubreve: 0x016D,
  32726. ucaron: 0x01D4,
  32727. ucircle: 0x24E4,
  32728. ucircumflex: 0x00FB,
  32729. ucircumflexbelow: 0x1E77,
  32730. ucyrillic: 0x0443,
  32731. udattadeva: 0x0951,
  32732. udblacute: 0x0171,
  32733. udblgrave: 0x0215,
  32734. udeva: 0x0909,
  32735. udieresis: 0x00FC,
  32736. udieresisacute: 0x01D8,
  32737. udieresisbelow: 0x1E73,
  32738. udieresiscaron: 0x01DA,
  32739. udieresiscyrillic: 0x04F1,
  32740. udieresisgrave: 0x01DC,
  32741. udieresismacron: 0x01D6,
  32742. udotbelow: 0x1EE5,
  32743. ugrave: 0x00F9,
  32744. ugujarati: 0x0A89,
  32745. ugurmukhi: 0x0A09,
  32746. uhiragana: 0x3046,
  32747. uhookabove: 0x1EE7,
  32748. uhorn: 0x01B0,
  32749. uhornacute: 0x1EE9,
  32750. uhorndotbelow: 0x1EF1,
  32751. uhorngrave: 0x1EEB,
  32752. uhornhookabove: 0x1EED,
  32753. uhorntilde: 0x1EEF,
  32754. uhungarumlaut: 0x0171,
  32755. uhungarumlautcyrillic: 0x04F3,
  32756. uinvertedbreve: 0x0217,
  32757. ukatakana: 0x30A6,
  32758. ukatakanahalfwidth: 0xFF73,
  32759. ukcyrillic: 0x0479,
  32760. ukorean: 0x315C,
  32761. umacron: 0x016B,
  32762. umacroncyrillic: 0x04EF,
  32763. umacrondieresis: 0x1E7B,
  32764. umatragurmukhi: 0x0A41,
  32765. umonospace: 0xFF55,
  32766. underscore: 0x005F,
  32767. underscoredbl: 0x2017,
  32768. underscoremonospace: 0xFF3F,
  32769. underscorevertical: 0xFE33,
  32770. underscorewavy: 0xFE4F,
  32771. union: 0x222A,
  32772. universal: 0x2200,
  32773. uogonek: 0x0173,
  32774. uparen: 0x24B0,
  32775. upblock: 0x2580,
  32776. upperdothebrew: 0x05C4,
  32777. upsilon: 0x03C5,
  32778. upsilondieresis: 0x03CB,
  32779. upsilondieresistonos: 0x03B0,
  32780. upsilonlatin: 0x028A,
  32781. upsilontonos: 0x03CD,
  32782. uptackbelowcmb: 0x031D,
  32783. uptackmod: 0x02D4,
  32784. uragurmukhi: 0x0A73,
  32785. uring: 0x016F,
  32786. ushortcyrillic: 0x045E,
  32787. usmallhiragana: 0x3045,
  32788. usmallkatakana: 0x30A5,
  32789. usmallkatakanahalfwidth: 0xFF69,
  32790. ustraightcyrillic: 0x04AF,
  32791. ustraightstrokecyrillic: 0x04B1,
  32792. utilde: 0x0169,
  32793. utildeacute: 0x1E79,
  32794. utildebelow: 0x1E75,
  32795. uubengali: 0x098A,
  32796. uudeva: 0x090A,
  32797. uugujarati: 0x0A8A,
  32798. uugurmukhi: 0x0A0A,
  32799. uumatragurmukhi: 0x0A42,
  32800. uuvowelsignbengali: 0x09C2,
  32801. uuvowelsigndeva: 0x0942,
  32802. uuvowelsigngujarati: 0x0AC2,
  32803. uvowelsignbengali: 0x09C1,
  32804. uvowelsigndeva: 0x0941,
  32805. uvowelsigngujarati: 0x0AC1,
  32806. v: 0x0076,
  32807. vadeva: 0x0935,
  32808. vagujarati: 0x0AB5,
  32809. vagurmukhi: 0x0A35,
  32810. vakatakana: 0x30F7,
  32811. vav: 0x05D5,
  32812. vavdagesh: 0xFB35,
  32813. vavdagesh65: 0xFB35,
  32814. vavdageshhebrew: 0xFB35,
  32815. vavhebrew: 0x05D5,
  32816. vavholam: 0xFB4B,
  32817. vavholamhebrew: 0xFB4B,
  32818. vavvavhebrew: 0x05F0,
  32819. vavyodhebrew: 0x05F1,
  32820. vcircle: 0x24E5,
  32821. vdotbelow: 0x1E7F,
  32822. vecyrillic: 0x0432,
  32823. veharabic: 0x06A4,
  32824. vehfinalarabic: 0xFB6B,
  32825. vehinitialarabic: 0xFB6C,
  32826. vehmedialarabic: 0xFB6D,
  32827. vekatakana: 0x30F9,
  32828. venus: 0x2640,
  32829. verticalbar: 0x007C,
  32830. verticallineabovecmb: 0x030D,
  32831. verticallinebelowcmb: 0x0329,
  32832. verticallinelowmod: 0x02CC,
  32833. verticallinemod: 0x02C8,
  32834. vewarmenian: 0x057E,
  32835. vhook: 0x028B,
  32836. vikatakana: 0x30F8,
  32837. viramabengali: 0x09CD,
  32838. viramadeva: 0x094D,
  32839. viramagujarati: 0x0ACD,
  32840. visargabengali: 0x0983,
  32841. visargadeva: 0x0903,
  32842. visargagujarati: 0x0A83,
  32843. vmonospace: 0xFF56,
  32844. voarmenian: 0x0578,
  32845. voicediterationhiragana: 0x309E,
  32846. voicediterationkatakana: 0x30FE,
  32847. voicedmarkkana: 0x309B,
  32848. voicedmarkkanahalfwidth: 0xFF9E,
  32849. vokatakana: 0x30FA,
  32850. vparen: 0x24B1,
  32851. vtilde: 0x1E7D,
  32852. vturned: 0x028C,
  32853. vuhiragana: 0x3094,
  32854. vukatakana: 0x30F4,
  32855. w: 0x0077,
  32856. wacute: 0x1E83,
  32857. waekorean: 0x3159,
  32858. wahiragana: 0x308F,
  32859. wakatakana: 0x30EF,
  32860. wakatakanahalfwidth: 0xFF9C,
  32861. wakorean: 0x3158,
  32862. wasmallhiragana: 0x308E,
  32863. wasmallkatakana: 0x30EE,
  32864. wattosquare: 0x3357,
  32865. wavedash: 0x301C,
  32866. wavyunderscorevertical: 0xFE34,
  32867. wawarabic: 0x0648,
  32868. wawfinalarabic: 0xFEEE,
  32869. wawhamzaabovearabic: 0x0624,
  32870. wawhamzaabovefinalarabic: 0xFE86,
  32871. wbsquare: 0x33DD,
  32872. wcircle: 0x24E6,
  32873. wcircumflex: 0x0175,
  32874. wdieresis: 0x1E85,
  32875. wdotaccent: 0x1E87,
  32876. wdotbelow: 0x1E89,
  32877. wehiragana: 0x3091,
  32878. weierstrass: 0x2118,
  32879. wekatakana: 0x30F1,
  32880. wekorean: 0x315E,
  32881. weokorean: 0x315D,
  32882. wgrave: 0x1E81,
  32883. whitebullet: 0x25E6,
  32884. whitecircle: 0x25CB,
  32885. whitecircleinverse: 0x25D9,
  32886. whitecornerbracketleft: 0x300E,
  32887. whitecornerbracketleftvertical: 0xFE43,
  32888. whitecornerbracketright: 0x300F,
  32889. whitecornerbracketrightvertical: 0xFE44,
  32890. whitediamond: 0x25C7,
  32891. whitediamondcontainingblacksmalldiamond: 0x25C8,
  32892. whitedownpointingsmalltriangle: 0x25BF,
  32893. whitedownpointingtriangle: 0x25BD,
  32894. whiteleftpointingsmalltriangle: 0x25C3,
  32895. whiteleftpointingtriangle: 0x25C1,
  32896. whitelenticularbracketleft: 0x3016,
  32897. whitelenticularbracketright: 0x3017,
  32898. whiterightpointingsmalltriangle: 0x25B9,
  32899. whiterightpointingtriangle: 0x25B7,
  32900. whitesmallsquare: 0x25AB,
  32901. whitesmilingface: 0x263A,
  32902. whitesquare: 0x25A1,
  32903. whitestar: 0x2606,
  32904. whitetelephone: 0x260F,
  32905. whitetortoiseshellbracketleft: 0x3018,
  32906. whitetortoiseshellbracketright: 0x3019,
  32907. whiteuppointingsmalltriangle: 0x25B5,
  32908. whiteuppointingtriangle: 0x25B3,
  32909. wihiragana: 0x3090,
  32910. wikatakana: 0x30F0,
  32911. wikorean: 0x315F,
  32912. wmonospace: 0xFF57,
  32913. wohiragana: 0x3092,
  32914. wokatakana: 0x30F2,
  32915. wokatakanahalfwidth: 0xFF66,
  32916. won: 0x20A9,
  32917. wonmonospace: 0xFFE6,
  32918. wowaenthai: 0x0E27,
  32919. wparen: 0x24B2,
  32920. wring: 0x1E98,
  32921. wsuperior: 0x02B7,
  32922. wturned: 0x028D,
  32923. wynn: 0x01BF,
  32924. x: 0x0078,
  32925. xabovecmb: 0x033D,
  32926. xbopomofo: 0x3112,
  32927. xcircle: 0x24E7,
  32928. xdieresis: 0x1E8D,
  32929. xdotaccent: 0x1E8B,
  32930. xeharmenian: 0x056D,
  32931. xi: 0x03BE,
  32932. xmonospace: 0xFF58,
  32933. xparen: 0x24B3,
  32934. xsuperior: 0x02E3,
  32935. y: 0x0079,
  32936. yaadosquare: 0x334E,
  32937. yabengali: 0x09AF,
  32938. yacute: 0x00FD,
  32939. yadeva: 0x092F,
  32940. yaekorean: 0x3152,
  32941. yagujarati: 0x0AAF,
  32942. yagurmukhi: 0x0A2F,
  32943. yahiragana: 0x3084,
  32944. yakatakana: 0x30E4,
  32945. yakatakanahalfwidth: 0xFF94,
  32946. yakorean: 0x3151,
  32947. yamakkanthai: 0x0E4E,
  32948. yasmallhiragana: 0x3083,
  32949. yasmallkatakana: 0x30E3,
  32950. yasmallkatakanahalfwidth: 0xFF6C,
  32951. yatcyrillic: 0x0463,
  32952. ycircle: 0x24E8,
  32953. ycircumflex: 0x0177,
  32954. ydieresis: 0x00FF,
  32955. ydotaccent: 0x1E8F,
  32956. ydotbelow: 0x1EF5,
  32957. yeharabic: 0x064A,
  32958. yehbarreearabic: 0x06D2,
  32959. yehbarreefinalarabic: 0xFBAF,
  32960. yehfinalarabic: 0xFEF2,
  32961. yehhamzaabovearabic: 0x0626,
  32962. yehhamzaabovefinalarabic: 0xFE8A,
  32963. yehhamzaaboveinitialarabic: 0xFE8B,
  32964. yehhamzaabovemedialarabic: 0xFE8C,
  32965. yehinitialarabic: 0xFEF3,
  32966. yehmedialarabic: 0xFEF4,
  32967. yehmeeminitialarabic: 0xFCDD,
  32968. yehmeemisolatedarabic: 0xFC58,
  32969. yehnoonfinalarabic: 0xFC94,
  32970. yehthreedotsbelowarabic: 0x06D1,
  32971. yekorean: 0x3156,
  32972. yen: 0x00A5,
  32973. yenmonospace: 0xFFE5,
  32974. yeokorean: 0x3155,
  32975. yeorinhieuhkorean: 0x3186,
  32976. yerahbenyomohebrew: 0x05AA,
  32977. yerahbenyomolefthebrew: 0x05AA,
  32978. yericyrillic: 0x044B,
  32979. yerudieresiscyrillic: 0x04F9,
  32980. yesieungkorean: 0x3181,
  32981. yesieungpansioskorean: 0x3183,
  32982. yesieungsioskorean: 0x3182,
  32983. yetivhebrew: 0x059A,
  32984. ygrave: 0x1EF3,
  32985. yhook: 0x01B4,
  32986. yhookabove: 0x1EF7,
  32987. yiarmenian: 0x0575,
  32988. yicyrillic: 0x0457,
  32989. yikorean: 0x3162,
  32990. yinyang: 0x262F,
  32991. yiwnarmenian: 0x0582,
  32992. ymonospace: 0xFF59,
  32993. yod: 0x05D9,
  32994. yoddagesh: 0xFB39,
  32995. yoddageshhebrew: 0xFB39,
  32996. yodhebrew: 0x05D9,
  32997. yodyodhebrew: 0x05F2,
  32998. yodyodpatahhebrew: 0xFB1F,
  32999. yohiragana: 0x3088,
  33000. yoikorean: 0x3189,
  33001. yokatakana: 0x30E8,
  33002. yokatakanahalfwidth: 0xFF96,
  33003. yokorean: 0x315B,
  33004. yosmallhiragana: 0x3087,
  33005. yosmallkatakana: 0x30E7,
  33006. yosmallkatakanahalfwidth: 0xFF6E,
  33007. yotgreek: 0x03F3,
  33008. yoyaekorean: 0x3188,
  33009. yoyakorean: 0x3187,
  33010. yoyakthai: 0x0E22,
  33011. yoyingthai: 0x0E0D,
  33012. yparen: 0x24B4,
  33013. ypogegrammeni: 0x037A,
  33014. ypogegrammenigreekcmb: 0x0345,
  33015. yr: 0x01A6,
  33016. yring: 0x1E99,
  33017. ysuperior: 0x02B8,
  33018. ytilde: 0x1EF9,
  33019. yturned: 0x028E,
  33020. yuhiragana: 0x3086,
  33021. yuikorean: 0x318C,
  33022. yukatakana: 0x30E6,
  33023. yukatakanahalfwidth: 0xFF95,
  33024. yukorean: 0x3160,
  33025. yusbigcyrillic: 0x046B,
  33026. yusbigiotifiedcyrillic: 0x046D,
  33027. yuslittlecyrillic: 0x0467,
  33028. yuslittleiotifiedcyrillic: 0x0469,
  33029. yusmallhiragana: 0x3085,
  33030. yusmallkatakana: 0x30E5,
  33031. yusmallkatakanahalfwidth: 0xFF6D,
  33032. yuyekorean: 0x318B,
  33033. yuyeokorean: 0x318A,
  33034. yyabengali: 0x09DF,
  33035. yyadeva: 0x095F,
  33036. z: 0x007A,
  33037. zaarmenian: 0x0566,
  33038. zacute: 0x017A,
  33039. zadeva: 0x095B,
  33040. zagurmukhi: 0x0A5B,
  33041. zaharabic: 0x0638,
  33042. zahfinalarabic: 0xFEC6,
  33043. zahinitialarabic: 0xFEC7,
  33044. zahiragana: 0x3056,
  33045. zahmedialarabic: 0xFEC8,
  33046. zainarabic: 0x0632,
  33047. zainfinalarabic: 0xFEB0,
  33048. zakatakana: 0x30B6,
  33049. zaqefgadolhebrew: 0x0595,
  33050. zaqefqatanhebrew: 0x0594,
  33051. zarqahebrew: 0x0598,
  33052. zayin: 0x05D6,
  33053. zayindagesh: 0xFB36,
  33054. zayindageshhebrew: 0xFB36,
  33055. zayinhebrew: 0x05D6,
  33056. zbopomofo: 0x3117,
  33057. zcaron: 0x017E,
  33058. zcircle: 0x24E9,
  33059. zcircumflex: 0x1E91,
  33060. zcurl: 0x0291,
  33061. zdot: 0x017C,
  33062. zdotaccent: 0x017C,
  33063. zdotbelow: 0x1E93,
  33064. zecyrillic: 0x0437,
  33065. zedescendercyrillic: 0x0499,
  33066. zedieresiscyrillic: 0x04DF,
  33067. zehiragana: 0x305C,
  33068. zekatakana: 0x30BC,
  33069. zero: 0x0030,
  33070. zeroarabic: 0x0660,
  33071. zerobengali: 0x09E6,
  33072. zerodeva: 0x0966,
  33073. zerogujarati: 0x0AE6,
  33074. zerogurmukhi: 0x0A66,
  33075. zerohackarabic: 0x0660,
  33076. zeroinferior: 0x2080,
  33077. zeromonospace: 0xFF10,
  33078. zerooldstyle: 0xF730,
  33079. zeropersian: 0x06F0,
  33080. zerosuperior: 0x2070,
  33081. zerothai: 0x0E50,
  33082. zerowidthjoiner: 0xFEFF,
  33083. zerowidthnonjoiner: 0x200C,
  33084. zerowidthspace: 0x200B,
  33085. zeta: 0x03B6,
  33086. zhbopomofo: 0x3113,
  33087. zhearmenian: 0x056A,
  33088. zhebrevecyrillic: 0x04C2,
  33089. zhecyrillic: 0x0436,
  33090. zhedescendercyrillic: 0x0497,
  33091. zhedieresiscyrillic: 0x04DD,
  33092. zihiragana: 0x3058,
  33093. zikatakana: 0x30B8,
  33094. zinorhebrew: 0x05AE,
  33095. zlinebelow: 0x1E95,
  33096. zmonospace: 0xFF5A,
  33097. zohiragana: 0x305E,
  33098. zokatakana: 0x30BE,
  33099. zparen: 0x24B5,
  33100. zretroflexhook: 0x0290,
  33101. zstroke: 0x01B6,
  33102. zuhiragana: 0x305A,
  33103. zukatakana: 0x30BA,
  33104. '.notdef': 0x0000
  33105. };
  33106. var PDFImage = (function PDFImageClosure() {
  33107. /**
  33108. * Decode the image in the main thread if it supported. Resovles the promise
  33109. * when the image data is ready.
  33110. */
  33111. function handleImageData(handler, xref, res, image) {
  33112. if (image instanceof JpegStream && image.isNativelyDecodable(xref, res)) {
  33113. // For natively supported jpegs send them to the main thread for decoding.
  33114. var dict = image.dict;
  33115. var colorSpace = dict.get('ColorSpace', 'CS');
  33116. colorSpace = ColorSpace.parse(colorSpace, xref, res);
  33117. var numComps = colorSpace.numComps;
  33118. var decodePromise = handler.sendWithPromise('JpegDecode',
  33119. [image.getIR(), numComps]);
  33120. return decodePromise.then(function (message) {
  33121. var data = message.data;
  33122. return new Stream(data, 0, data.length, image.dict);
  33123. });
  33124. } else {
  33125. return Promise.resolve(image);
  33126. }
  33127. }
  33128. /**
  33129. * Decode and clamp a value. The formula is different from the spec because we
  33130. * don't decode to float range [0,1], we decode it in the [0,max] range.
  33131. */
  33132. function decodeAndClamp(value, addend, coefficient, max) {
  33133. value = addend + value * coefficient;
  33134. // Clamp the value to the range
  33135. return (value < 0 ? 0 : (value > max ? max : value));
  33136. }
  33137. function PDFImage(xref, res, image, inline, smask, mask, isMask) {
  33138. this.image = image;
  33139. var dict = image.dict;
  33140. if (dict.has('Filter')) {
  33141. var filter = dict.get('Filter').name;
  33142. if (filter === 'JPXDecode') {
  33143. var jpxImage = new JpxImage();
  33144. jpxImage.parseImageProperties(image.stream);
  33145. image.stream.reset();
  33146. image.bitsPerComponent = jpxImage.bitsPerComponent;
  33147. image.numComps = jpxImage.componentsCount;
  33148. } else if (filter === 'JBIG2Decode') {
  33149. image.bitsPerComponent = 1;
  33150. image.numComps = 1;
  33151. }
  33152. }
  33153. // TODO cache rendered images?
  33154. this.width = dict.get('Width', 'W');
  33155. this.height = dict.get('Height', 'H');
  33156. if (this.width < 1 || this.height < 1) {
  33157. error('Invalid image width: ' + this.width + ' or height: ' +
  33158. this.height);
  33159. }
  33160. this.interpolate = dict.get('Interpolate', 'I') || false;
  33161. this.imageMask = dict.get('ImageMask', 'IM') || false;
  33162. this.matte = dict.get('Matte') || false;
  33163. var bitsPerComponent = image.bitsPerComponent;
  33164. if (!bitsPerComponent) {
  33165. bitsPerComponent = dict.get('BitsPerComponent', 'BPC');
  33166. if (!bitsPerComponent) {
  33167. if (this.imageMask) {
  33168. bitsPerComponent = 1;
  33169. } else {
  33170. error('Bits per component missing in image: ' + this.imageMask);
  33171. }
  33172. }
  33173. }
  33174. this.bpc = bitsPerComponent;
  33175. if (!this.imageMask) {
  33176. var colorSpace = dict.get('ColorSpace', 'CS');
  33177. if (!colorSpace) {
  33178. info('JPX images (which do not require color spaces)');
  33179. switch (image.numComps) {
  33180. case 1:
  33181. colorSpace = Name.get('DeviceGray');
  33182. break;
  33183. case 3:
  33184. colorSpace = Name.get('DeviceRGB');
  33185. break;
  33186. case 4:
  33187. colorSpace = Name.get('DeviceCMYK');
  33188. break;
  33189. default:
  33190. error('JPX images with ' + this.numComps +
  33191. ' color components not supported.');
  33192. }
  33193. }
  33194. this.colorSpace = ColorSpace.parse(colorSpace, xref, res);
  33195. this.numComps = this.colorSpace.numComps;
  33196. }
  33197. this.decode = dict.get('Decode', 'D');
  33198. this.needsDecode = false;
  33199. if (this.decode &&
  33200. ((this.colorSpace && !this.colorSpace.isDefaultDecode(this.decode)) ||
  33201. (isMask && !ColorSpace.isDefaultDecode(this.decode, 1)))) {
  33202. this.needsDecode = true;
  33203. // Do some preprocessing to avoid more math.
  33204. var max = (1 << bitsPerComponent) - 1;
  33205. this.decodeCoefficients = [];
  33206. this.decodeAddends = [];
  33207. for (var i = 0, j = 0; i < this.decode.length; i += 2, ++j) {
  33208. var dmin = this.decode[i];
  33209. var dmax = this.decode[i + 1];
  33210. this.decodeCoefficients[j] = dmax - dmin;
  33211. this.decodeAddends[j] = max * dmin;
  33212. }
  33213. }
  33214. if (smask) {
  33215. this.smask = new PDFImage(xref, res, smask, false);
  33216. } else if (mask) {
  33217. if (isStream(mask)) {
  33218. this.mask = new PDFImage(xref, res, mask, false, null, null, true);
  33219. } else {
  33220. // Color key mask (just an array).
  33221. this.mask = mask;
  33222. }
  33223. }
  33224. }
  33225. /**
  33226. * Handles processing of image data and returns the Promise that is resolved
  33227. * with a PDFImage when the image is ready to be used.
  33228. */
  33229. PDFImage.buildImage = function PDFImage_buildImage(handler, xref,
  33230. res, image, inline) {
  33231. var imagePromise = handleImageData(handler, xref, res, image);
  33232. var smaskPromise;
  33233. var maskPromise;
  33234. var smask = image.dict.get('SMask');
  33235. var mask = image.dict.get('Mask');
  33236. if (smask) {
  33237. smaskPromise = handleImageData(handler, xref, res, smask);
  33238. maskPromise = Promise.resolve(null);
  33239. } else {
  33240. smaskPromise = Promise.resolve(null);
  33241. if (mask) {
  33242. if (isStream(mask)) {
  33243. maskPromise = handleImageData(handler, xref, res, mask);
  33244. } else if (isArray(mask)) {
  33245. maskPromise = Promise.resolve(mask);
  33246. } else {
  33247. warn('Unsupported mask format.');
  33248. maskPromise = Promise.resolve(null);
  33249. }
  33250. } else {
  33251. maskPromise = Promise.resolve(null);
  33252. }
  33253. }
  33254. return Promise.all([imagePromise, smaskPromise, maskPromise]).then(
  33255. function(results) {
  33256. var imageData = results[0];
  33257. var smaskData = results[1];
  33258. var maskData = results[2];
  33259. return new PDFImage(xref, res, imageData, inline, smaskData, maskData);
  33260. });
  33261. };
  33262. /**
  33263. * Resize an image using the nearest neighbor algorithm. Currently only
  33264. * supports one and three component images.
  33265. * @param {TypedArray} pixels The original image with one component.
  33266. * @param {Number} bpc Number of bits per component.
  33267. * @param {Number} components Number of color components, 1 or 3 is supported.
  33268. * @param {Number} w1 Original width.
  33269. * @param {Number} h1 Original height.
  33270. * @param {Number} w2 New width.
  33271. * @param {Number} h2 New height.
  33272. * @param {TypedArray} dest (Optional) The destination buffer.
  33273. * @param {Number} alpha01 (Optional) Size reserved for the alpha channel.
  33274. * @return {TypedArray} Resized image data.
  33275. */
  33276. PDFImage.resize = function PDFImage_resize(pixels, bpc, components,
  33277. w1, h1, w2, h2, dest, alpha01) {
  33278. if (components !== 1 && components !== 3) {
  33279. error('Unsupported component count for resizing.');
  33280. }
  33281. var length = w2 * h2 * components;
  33282. var temp = dest ? dest : (bpc <= 8 ? new Uint8Array(length) :
  33283. (bpc <= 16 ? new Uint16Array(length) : new Uint32Array(length)));
  33284. var xRatio = w1 / w2;
  33285. var yRatio = h1 / h2;
  33286. var i, j, py, newIndex = 0, oldIndex;
  33287. var xScaled = new Uint16Array(w2);
  33288. var w1Scanline = w1 * components;
  33289. if (alpha01 !== 1) {
  33290. alpha01 = 0;
  33291. }
  33292. for (j = 0; j < w2; j++) {
  33293. xScaled[j] = Math.floor(j * xRatio) * components;
  33294. }
  33295. if (components === 1) {
  33296. for (i = 0; i < h2; i++) {
  33297. py = Math.floor(i * yRatio) * w1Scanline;
  33298. for (j = 0; j < w2; j++) {
  33299. oldIndex = py + xScaled[j];
  33300. temp[newIndex++] = pixels[oldIndex];
  33301. }
  33302. }
  33303. } else if (components === 3) {
  33304. for (i = 0; i < h2; i++) {
  33305. py = Math.floor(i * yRatio) * w1Scanline;
  33306. for (j = 0; j < w2; j++) {
  33307. oldIndex = py + xScaled[j];
  33308. temp[newIndex++] = pixels[oldIndex++];
  33309. temp[newIndex++] = pixels[oldIndex++];
  33310. temp[newIndex++] = pixels[oldIndex++];
  33311. newIndex += alpha01;
  33312. }
  33313. }
  33314. }
  33315. return temp;
  33316. };
  33317. PDFImage.createMask =
  33318. function PDFImage_createMask(imgArray, width, height, canTransfer,
  33319. inverseDecode) {
  33320. // If imgArray came from a DecodeStream, we're safe to transfer it.
  33321. // Otherwise, copy it.
  33322. var actualLength = imgArray.byteLength;
  33323. var data;
  33324. if (canTransfer) {
  33325. data = imgArray;
  33326. } else {
  33327. data = new Uint8Array(actualLength);
  33328. data.set(imgArray);
  33329. }
  33330. // Invert if necessary. It's safe to modify the array -- whether it's the
  33331. // original or a copy, we're about to transfer it anyway, so nothing else
  33332. // in this thread can be relying on its contents.
  33333. if (inverseDecode) {
  33334. for (var i = 0; i < actualLength; i++) {
  33335. data[i] = ~data[i];
  33336. }
  33337. }
  33338. return {data: data, width: width, height: height};
  33339. };
  33340. PDFImage.prototype = {
  33341. get drawWidth() {
  33342. return Math.max(this.width,
  33343. this.smask && this.smask.width || 0,
  33344. this.mask && this.mask.width || 0);
  33345. },
  33346. get drawHeight() {
  33347. return Math.max(this.height,
  33348. this.smask && this.smask.height || 0,
  33349. this.mask && this.mask.height || 0);
  33350. },
  33351. decodeBuffer: function PDFImage_decodeBuffer(buffer) {
  33352. var bpc = this.bpc;
  33353. var numComps = this.numComps;
  33354. var decodeAddends = this.decodeAddends;
  33355. var decodeCoefficients = this.decodeCoefficients;
  33356. var max = (1 << bpc) - 1;
  33357. var i, ii;
  33358. if (bpc === 1) {
  33359. // If the buffer needed decode that means it just needs to be inverted.
  33360. for (i = 0, ii = buffer.length; i < ii; i++) {
  33361. buffer[i] = +!(buffer[i]);
  33362. }
  33363. return;
  33364. }
  33365. var index = 0;
  33366. for (i = 0, ii = this.width * this.height; i < ii; i++) {
  33367. for (var j = 0; j < numComps; j++) {
  33368. buffer[index] = decodeAndClamp(buffer[index], decodeAddends[j],
  33369. decodeCoefficients[j], max);
  33370. index++;
  33371. }
  33372. }
  33373. },
  33374. getComponents: function PDFImage_getComponents(buffer) {
  33375. var bpc = this.bpc;
  33376. // This image doesn't require any extra work.
  33377. if (bpc === 8) {
  33378. return buffer;
  33379. }
  33380. var width = this.width;
  33381. var height = this.height;
  33382. var numComps = this.numComps;
  33383. var length = width * height * numComps;
  33384. var bufferPos = 0;
  33385. var output = (bpc <= 8 ? new Uint8Array(length) :
  33386. (bpc <= 16 ? new Uint16Array(length) : new Uint32Array(length)));
  33387. var rowComps = width * numComps;
  33388. var max = (1 << bpc) - 1;
  33389. var i = 0, ii, buf;
  33390. if (bpc === 1) {
  33391. // Optimization for reading 1 bpc images.
  33392. var mask, loop1End, loop2End;
  33393. for (var j = 0; j < height; j++) {
  33394. loop1End = i + (rowComps & ~7);
  33395. loop2End = i + rowComps;
  33396. // unroll loop for all full bytes
  33397. while (i < loop1End) {
  33398. buf = buffer[bufferPos++];
  33399. output[i] = (buf >> 7) & 1;
  33400. output[i + 1] = (buf >> 6) & 1;
  33401. output[i + 2] = (buf >> 5) & 1;
  33402. output[i + 3] = (buf >> 4) & 1;
  33403. output[i + 4] = (buf >> 3) & 1;
  33404. output[i + 5] = (buf >> 2) & 1;
  33405. output[i + 6] = (buf >> 1) & 1;
  33406. output[i + 7] = buf & 1;
  33407. i += 8;
  33408. }
  33409. // handle remaing bits
  33410. if (i < loop2End) {
  33411. buf = buffer[bufferPos++];
  33412. mask = 128;
  33413. while (i < loop2End) {
  33414. output[i++] = +!!(buf & mask);
  33415. mask >>= 1;
  33416. }
  33417. }
  33418. }
  33419. } else {
  33420. // The general case that handles all other bpc values.
  33421. var bits = 0;
  33422. buf = 0;
  33423. for (i = 0, ii = length; i < ii; ++i) {
  33424. if (i % rowComps === 0) {
  33425. buf = 0;
  33426. bits = 0;
  33427. }
  33428. while (bits < bpc) {
  33429. buf = (buf << 8) | buffer[bufferPos++];
  33430. bits += 8;
  33431. }
  33432. var remainingBits = bits - bpc;
  33433. var value = buf >> remainingBits;
  33434. output[i] = (value < 0 ? 0 : (value > max ? max : value));
  33435. buf = buf & ((1 << remainingBits) - 1);
  33436. bits = remainingBits;
  33437. }
  33438. }
  33439. return output;
  33440. },
  33441. fillOpacity: function PDFImage_fillOpacity(rgbaBuf, width, height,
  33442. actualHeight, image) {
  33443. var smask = this.smask;
  33444. var mask = this.mask;
  33445. var alphaBuf, sw, sh, i, ii, j;
  33446. if (smask) {
  33447. sw = smask.width;
  33448. sh = smask.height;
  33449. alphaBuf = new Uint8Array(sw * sh);
  33450. smask.fillGrayBuffer(alphaBuf);
  33451. if (sw != width || sh != height) {
  33452. alphaBuf = PDFImage.resize(alphaBuf, smask.bpc, 1, sw, sh, width,
  33453. height);
  33454. }
  33455. } else if (mask) {
  33456. if (mask instanceof PDFImage) {
  33457. sw = mask.width;
  33458. sh = mask.height;
  33459. alphaBuf = new Uint8Array(sw * sh);
  33460. mask.numComps = 1;
  33461. mask.fillGrayBuffer(alphaBuf);
  33462. // Need to invert values in rgbaBuf
  33463. for (i = 0, ii = sw * sh; i < ii; ++i) {
  33464. alphaBuf[i] = 255 - alphaBuf[i];
  33465. }
  33466. if (sw != width || sh != height) {
  33467. alphaBuf = PDFImage.resize(alphaBuf, mask.bpc, 1, sw, sh, width,
  33468. height);
  33469. }
  33470. } else if (isArray(mask)) {
  33471. // Color key mask: if any of the compontents are outside the range
  33472. // then they should be painted.
  33473. alphaBuf = new Uint8Array(width * height);
  33474. var numComps = this.numComps;
  33475. for (i = 0, ii = width * height; i < ii; ++i) {
  33476. var opacity = 0;
  33477. var imageOffset = i * numComps;
  33478. for (j = 0; j < numComps; ++j) {
  33479. var color = image[imageOffset + j];
  33480. var maskOffset = j * 2;
  33481. if (color < mask[maskOffset] || color > mask[maskOffset + 1]) {
  33482. opacity = 255;
  33483. break;
  33484. }
  33485. }
  33486. alphaBuf[i] = opacity;
  33487. }
  33488. } else {
  33489. error('Unknown mask format.');
  33490. }
  33491. }
  33492. if (alphaBuf) {
  33493. for (i = 0, j = 3, ii = width * actualHeight; i < ii; ++i, j += 4) {
  33494. rgbaBuf[j] = alphaBuf[i];
  33495. }
  33496. } else {
  33497. // No mask.
  33498. for (i = 0, j = 3, ii = width * actualHeight; i < ii; ++i, j += 4) {
  33499. rgbaBuf[j] = 255;
  33500. }
  33501. }
  33502. },
  33503. undoPreblend: function PDFImage_undoPreblend(buffer, width, height) {
  33504. var matte = this.smask && this.smask.matte;
  33505. if (!matte) {
  33506. return;
  33507. }
  33508. var matteRgb = this.colorSpace.getRgb(matte, 0);
  33509. var matteR = matteRgb[0];
  33510. var matteG = matteRgb[1];
  33511. var matteB = matteRgb[2];
  33512. var length = width * height * 4;
  33513. var r, g, b;
  33514. for (var i = 0; i < length; i += 4) {
  33515. var alpha = buffer[i + 3];
  33516. if (alpha === 0) {
  33517. // according formula we have to get Infinity in all components
  33518. // making it white (typical paper color) should be okay
  33519. buffer[i] = 255;
  33520. buffer[i + 1] = 255;
  33521. buffer[i + 2] = 255;
  33522. continue;
  33523. }
  33524. var k = 255 / alpha;
  33525. r = (buffer[i] - matteR) * k + matteR;
  33526. g = (buffer[i + 1] - matteG) * k + matteG;
  33527. b = (buffer[i + 2] - matteB) * k + matteB;
  33528. buffer[i] = r <= 0 ? 0 : r >= 255 ? 255 : r | 0;
  33529. buffer[i + 1] = g <= 0 ? 0 : g >= 255 ? 255 : g | 0;
  33530. buffer[i + 2] = b <= 0 ? 0 : b >= 255 ? 255 : b | 0;
  33531. }
  33532. },
  33533. createImageData: function PDFImage_createImageData(forceRGBA) {
  33534. var drawWidth = this.drawWidth;
  33535. var drawHeight = this.drawHeight;
  33536. var imgData = { // other fields are filled in below
  33537. width: drawWidth,
  33538. height: drawHeight
  33539. };
  33540. var numComps = this.numComps;
  33541. var originalWidth = this.width;
  33542. var originalHeight = this.height;
  33543. var bpc = this.bpc;
  33544. // Rows start at byte boundary.
  33545. var rowBytes = (originalWidth * numComps * bpc + 7) >> 3;
  33546. var imgArray;
  33547. if (!forceRGBA) {
  33548. // If it is a 1-bit-per-pixel grayscale (i.e. black-and-white) image
  33549. // without any complications, we pass a same-sized copy to the main
  33550. // thread rather than expanding by 32x to RGBA form. This saves *lots*
  33551. // of memory for many scanned documents. It's also much faster.
  33552. //
  33553. // Similarly, if it is a 24-bit-per pixel RGB image without any
  33554. // complications, we avoid expanding by 1.333x to RGBA form.
  33555. var kind;
  33556. if (this.colorSpace.name === 'DeviceGray' && bpc === 1) {
  33557. kind = ImageKind.GRAYSCALE_1BPP;
  33558. } else if (this.colorSpace.name === 'DeviceRGB' && bpc === 8) {
  33559. kind = ImageKind.RGB_24BPP;
  33560. }
  33561. if (kind && !this.smask && !this.mask && !this.needsDecode &&
  33562. drawWidth === originalWidth && drawHeight === originalHeight) {
  33563. imgData.kind = kind;
  33564. imgArray = this.getImageBytes(originalHeight * rowBytes);
  33565. // If imgArray came from a DecodeStream, we're safe to transfer it
  33566. // (and thus neuter it) because it will constitute the entire
  33567. // DecodeStream's data. But if it came from a Stream, we need to
  33568. // copy it because it'll only be a portion of the Stream's data, and
  33569. // the rest will be read later on.
  33570. if (this.image instanceof DecodeStream) {
  33571. imgData.data = imgArray;
  33572. } else {
  33573. var newArray = new Uint8Array(imgArray.length);
  33574. newArray.set(imgArray);
  33575. imgData.data = newArray;
  33576. }
  33577. return imgData;
  33578. }
  33579. }
  33580. if (this.image instanceof JpegStream) {
  33581. imgData.kind = ImageKind.RGB_24BPP;
  33582. imgData.data = this.getImageBytes(originalHeight * rowBytes,
  33583. drawWidth, drawHeight);
  33584. return imgData;
  33585. }
  33586. imgArray = this.getImageBytes(originalHeight * rowBytes);
  33587. // imgArray can be incomplete (e.g. after CCITT fax encoding).
  33588. var actualHeight = 0 | (imgArray.length / rowBytes *
  33589. drawHeight / originalHeight);
  33590. var comps = this.getComponents(imgArray);
  33591. // If opacity data is present, use RGBA_32BPP form. Otherwise, use the
  33592. // more compact RGB_24BPP form if allowable.
  33593. var alpha01, maybeUndoPreblend;
  33594. if (!forceRGBA && !this.smask && !this.mask) {
  33595. imgData.kind = ImageKind.RGB_24BPP;
  33596. imgData.data = new Uint8Array(drawWidth * drawHeight * 3);
  33597. alpha01 = 0;
  33598. maybeUndoPreblend = false;
  33599. } else {
  33600. imgData.kind = ImageKind.RGBA_32BPP;
  33601. imgData.data = new Uint8Array(drawWidth * drawHeight * 4);
  33602. alpha01 = 1;
  33603. maybeUndoPreblend = true;
  33604. // Color key masking (opacity) must be performed before decoding.
  33605. this.fillOpacity(imgData.data, drawWidth, drawHeight, actualHeight,
  33606. comps);
  33607. }
  33608. if (this.needsDecode) {
  33609. this.decodeBuffer(comps);
  33610. }
  33611. this.colorSpace.fillRgb(imgData.data, originalWidth, originalHeight,
  33612. drawWidth, drawHeight, actualHeight, bpc, comps,
  33613. alpha01);
  33614. if (maybeUndoPreblend) {
  33615. this.undoPreblend(imgData.data, drawWidth, actualHeight);
  33616. }
  33617. return imgData;
  33618. },
  33619. fillGrayBuffer: function PDFImage_fillGrayBuffer(buffer) {
  33620. var numComps = this.numComps;
  33621. if (numComps != 1) {
  33622. error('Reading gray scale from a color image: ' + numComps);
  33623. }
  33624. var width = this.width;
  33625. var height = this.height;
  33626. var bpc = this.bpc;
  33627. // rows start at byte boundary
  33628. var rowBytes = (width * numComps * bpc + 7) >> 3;
  33629. var imgArray = this.getImageBytes(height * rowBytes);
  33630. var comps = this.getComponents(imgArray);
  33631. var i, length;
  33632. if (bpc === 1) {
  33633. // inline decoding (= inversion) for 1 bpc images
  33634. length = width * height;
  33635. if (this.needsDecode) {
  33636. // invert and scale to {0, 255}
  33637. for (i = 0; i < length; ++i) {
  33638. buffer[i] = (comps[i] - 1) & 255;
  33639. }
  33640. } else {
  33641. // scale to {0, 255}
  33642. for (i = 0; i < length; ++i) {
  33643. buffer[i] = (-comps[i]) & 255;
  33644. }
  33645. }
  33646. return;
  33647. }
  33648. if (this.needsDecode) {
  33649. this.decodeBuffer(comps);
  33650. }
  33651. length = width * height;
  33652. // we aren't using a colorspace so we need to scale the value
  33653. var scale = 255 / ((1 << bpc) - 1);
  33654. for (i = 0; i < length; ++i) {
  33655. buffer[i] = (scale * comps[i]) | 0;
  33656. }
  33657. },
  33658. getImageBytes: function PDFImage_getImageBytes(length,
  33659. drawWidth, drawHeight) {
  33660. this.image.reset();
  33661. this.image.drawWidth = drawWidth;
  33662. this.image.drawHeight = drawHeight;
  33663. return this.image.getBytes(length);
  33664. }
  33665. };
  33666. return PDFImage;
  33667. })();
  33668. // The Metrics object contains glyph widths (in glyph space units).
  33669. // As per PDF spec, for most fonts (Type 3 being an exception) a glyph
  33670. // space unit corresponds to 1/1000th of text space unit.
  33671. var Metrics = {
  33672. 'Courier': 600,
  33673. 'Courier-Bold': 600,
  33674. 'Courier-BoldOblique': 600,
  33675. 'Courier-Oblique': 600,
  33676. 'Helvetica' : {
  33677. 'space': 278,
  33678. 'exclam': 278,
  33679. 'quotedbl': 355,
  33680. 'numbersign': 556,
  33681. 'dollar': 556,
  33682. 'percent': 889,
  33683. 'ampersand': 667,
  33684. 'quoteright': 222,
  33685. 'parenleft': 333,
  33686. 'parenright': 333,
  33687. 'asterisk': 389,
  33688. 'plus': 584,
  33689. 'comma': 278,
  33690. 'hyphen': 333,
  33691. 'period': 278,
  33692. 'slash': 278,
  33693. 'zero': 556,
  33694. 'one': 556,
  33695. 'two': 556,
  33696. 'three': 556,
  33697. 'four': 556,
  33698. 'five': 556,
  33699. 'six': 556,
  33700. 'seven': 556,
  33701. 'eight': 556,
  33702. 'nine': 556,
  33703. 'colon': 278,
  33704. 'semicolon': 278,
  33705. 'less': 584,
  33706. 'equal': 584,
  33707. 'greater': 584,
  33708. 'question': 556,
  33709. 'at': 1015,
  33710. 'A': 667,
  33711. 'B': 667,
  33712. 'C': 722,
  33713. 'D': 722,
  33714. 'E': 667,
  33715. 'F': 611,
  33716. 'G': 778,
  33717. 'H': 722,
  33718. 'I': 278,
  33719. 'J': 500,
  33720. 'K': 667,
  33721. 'L': 556,
  33722. 'M': 833,
  33723. 'N': 722,
  33724. 'O': 778,
  33725. 'P': 667,
  33726. 'Q': 778,
  33727. 'R': 722,
  33728. 'S': 667,
  33729. 'T': 611,
  33730. 'U': 722,
  33731. 'V': 667,
  33732. 'W': 944,
  33733. 'X': 667,
  33734. 'Y': 667,
  33735. 'Z': 611,
  33736. 'bracketleft': 278,
  33737. 'backslash': 278,
  33738. 'bracketright': 278,
  33739. 'asciicircum': 469,
  33740. 'underscore': 556,
  33741. 'quoteleft': 222,
  33742. 'a': 556,
  33743. 'b': 556,
  33744. 'c': 500,
  33745. 'd': 556,
  33746. 'e': 556,
  33747. 'f': 278,
  33748. 'g': 556,
  33749. 'h': 556,
  33750. 'i': 222,
  33751. 'j': 222,
  33752. 'k': 500,
  33753. 'l': 222,
  33754. 'm': 833,
  33755. 'n': 556,
  33756. 'o': 556,
  33757. 'p': 556,
  33758. 'q': 556,
  33759. 'r': 333,
  33760. 's': 500,
  33761. 't': 278,
  33762. 'u': 556,
  33763. 'v': 500,
  33764. 'w': 722,
  33765. 'x': 500,
  33766. 'y': 500,
  33767. 'z': 500,
  33768. 'braceleft': 334,
  33769. 'bar': 260,
  33770. 'braceright': 334,
  33771. 'asciitilde': 584,
  33772. 'exclamdown': 333,
  33773. 'cent': 556,
  33774. 'sterling': 556,
  33775. 'fraction': 167,
  33776. 'yen': 556,
  33777. 'florin': 556,
  33778. 'section': 556,
  33779. 'currency': 556,
  33780. 'quotesingle': 191,
  33781. 'quotedblleft': 333,
  33782. 'guillemotleft': 556,
  33783. 'guilsinglleft': 333,
  33784. 'guilsinglright': 333,
  33785. 'fi': 500,
  33786. 'fl': 500,
  33787. 'endash': 556,
  33788. 'dagger': 556,
  33789. 'daggerdbl': 556,
  33790. 'periodcentered': 278,
  33791. 'paragraph': 537,
  33792. 'bullet': 350,
  33793. 'quotesinglbase': 222,
  33794. 'quotedblbase': 333,
  33795. 'quotedblright': 333,
  33796. 'guillemotright': 556,
  33797. 'ellipsis': 1000,
  33798. 'perthousand': 1000,
  33799. 'questiondown': 611,
  33800. 'grave': 333,
  33801. 'acute': 333,
  33802. 'circumflex': 333,
  33803. 'tilde': 333,
  33804. 'macron': 333,
  33805. 'breve': 333,
  33806. 'dotaccent': 333,
  33807. 'dieresis': 333,
  33808. 'ring': 333,
  33809. 'cedilla': 333,
  33810. 'hungarumlaut': 333,
  33811. 'ogonek': 333,
  33812. 'caron': 333,
  33813. 'emdash': 1000,
  33814. 'AE': 1000,
  33815. 'ordfeminine': 370,
  33816. 'Lslash': 556,
  33817. 'Oslash': 778,
  33818. 'OE': 1000,
  33819. 'ordmasculine': 365,
  33820. 'ae': 889,
  33821. 'dotlessi': 278,
  33822. 'lslash': 222,
  33823. 'oslash': 611,
  33824. 'oe': 944,
  33825. 'germandbls': 611,
  33826. 'Idieresis': 278,
  33827. 'eacute': 556,
  33828. 'abreve': 556,
  33829. 'uhungarumlaut': 556,
  33830. 'ecaron': 556,
  33831. 'Ydieresis': 667,
  33832. 'divide': 584,
  33833. 'Yacute': 667,
  33834. 'Acircumflex': 667,
  33835. 'aacute': 556,
  33836. 'Ucircumflex': 722,
  33837. 'yacute': 500,
  33838. 'scommaaccent': 500,
  33839. 'ecircumflex': 556,
  33840. 'Uring': 722,
  33841. 'Udieresis': 722,
  33842. 'aogonek': 556,
  33843. 'Uacute': 722,
  33844. 'uogonek': 556,
  33845. 'Edieresis': 667,
  33846. 'Dcroat': 722,
  33847. 'commaaccent': 250,
  33848. 'copyright': 737,
  33849. 'Emacron': 667,
  33850. 'ccaron': 500,
  33851. 'aring': 556,
  33852. 'Ncommaaccent': 722,
  33853. 'lacute': 222,
  33854. 'agrave': 556,
  33855. 'Tcommaaccent': 611,
  33856. 'Cacute': 722,
  33857. 'atilde': 556,
  33858. 'Edotaccent': 667,
  33859. 'scaron': 500,
  33860. 'scedilla': 500,
  33861. 'iacute': 278,
  33862. 'lozenge': 471,
  33863. 'Rcaron': 722,
  33864. 'Gcommaaccent': 778,
  33865. 'ucircumflex': 556,
  33866. 'acircumflex': 556,
  33867. 'Amacron': 667,
  33868. 'rcaron': 333,
  33869. 'ccedilla': 500,
  33870. 'Zdotaccent': 611,
  33871. 'Thorn': 667,
  33872. 'Omacron': 778,
  33873. 'Racute': 722,
  33874. 'Sacute': 667,
  33875. 'dcaron': 643,
  33876. 'Umacron': 722,
  33877. 'uring': 556,
  33878. 'threesuperior': 333,
  33879. 'Ograve': 778,
  33880. 'Agrave': 667,
  33881. 'Abreve': 667,
  33882. 'multiply': 584,
  33883. 'uacute': 556,
  33884. 'Tcaron': 611,
  33885. 'partialdiff': 476,
  33886. 'ydieresis': 500,
  33887. 'Nacute': 722,
  33888. 'icircumflex': 278,
  33889. 'Ecircumflex': 667,
  33890. 'adieresis': 556,
  33891. 'edieresis': 556,
  33892. 'cacute': 500,
  33893. 'nacute': 556,
  33894. 'umacron': 556,
  33895. 'Ncaron': 722,
  33896. 'Iacute': 278,
  33897. 'plusminus': 584,
  33898. 'brokenbar': 260,
  33899. 'registered': 737,
  33900. 'Gbreve': 778,
  33901. 'Idotaccent': 278,
  33902. 'summation': 600,
  33903. 'Egrave': 667,
  33904. 'racute': 333,
  33905. 'omacron': 556,
  33906. 'Zacute': 611,
  33907. 'Zcaron': 611,
  33908. 'greaterequal': 549,
  33909. 'Eth': 722,
  33910. 'Ccedilla': 722,
  33911. 'lcommaaccent': 222,
  33912. 'tcaron': 317,
  33913. 'eogonek': 556,
  33914. 'Uogonek': 722,
  33915. 'Aacute': 667,
  33916. 'Adieresis': 667,
  33917. 'egrave': 556,
  33918. 'zacute': 500,
  33919. 'iogonek': 222,
  33920. 'Oacute': 778,
  33921. 'oacute': 556,
  33922. 'amacron': 556,
  33923. 'sacute': 500,
  33924. 'idieresis': 278,
  33925. 'Ocircumflex': 778,
  33926. 'Ugrave': 722,
  33927. 'Delta': 612,
  33928. 'thorn': 556,
  33929. 'twosuperior': 333,
  33930. 'Odieresis': 778,
  33931. 'mu': 556,
  33932. 'igrave': 278,
  33933. 'ohungarumlaut': 556,
  33934. 'Eogonek': 667,
  33935. 'dcroat': 556,
  33936. 'threequarters': 834,
  33937. 'Scedilla': 667,
  33938. 'lcaron': 299,
  33939. 'Kcommaaccent': 667,
  33940. 'Lacute': 556,
  33941. 'trademark': 1000,
  33942. 'edotaccent': 556,
  33943. 'Igrave': 278,
  33944. 'Imacron': 278,
  33945. 'Lcaron': 556,
  33946. 'onehalf': 834,
  33947. 'lessequal': 549,
  33948. 'ocircumflex': 556,
  33949. 'ntilde': 556,
  33950. 'Uhungarumlaut': 722,
  33951. 'Eacute': 667,
  33952. 'emacron': 556,
  33953. 'gbreve': 556,
  33954. 'onequarter': 834,
  33955. 'Scaron': 667,
  33956. 'Scommaaccent': 667,
  33957. 'Ohungarumlaut': 778,
  33958. 'degree': 400,
  33959. 'ograve': 556,
  33960. 'Ccaron': 722,
  33961. 'ugrave': 556,
  33962. 'radical': 453,
  33963. 'Dcaron': 722,
  33964. 'rcommaaccent': 333,
  33965. 'Ntilde': 722,
  33966. 'otilde': 556,
  33967. 'Rcommaaccent': 722,
  33968. 'Lcommaaccent': 556,
  33969. 'Atilde': 667,
  33970. 'Aogonek': 667,
  33971. 'Aring': 667,
  33972. 'Otilde': 778,
  33973. 'zdotaccent': 500,
  33974. 'Ecaron': 667,
  33975. 'Iogonek': 278,
  33976. 'kcommaaccent': 500,
  33977. 'minus': 584,
  33978. 'Icircumflex': 278,
  33979. 'ncaron': 556,
  33980. 'tcommaaccent': 278,
  33981. 'logicalnot': 584,
  33982. 'odieresis': 556,
  33983. 'udieresis': 556,
  33984. 'notequal': 549,
  33985. 'gcommaaccent': 556,
  33986. 'eth': 556,
  33987. 'zcaron': 500,
  33988. 'ncommaaccent': 556,
  33989. 'onesuperior': 333,
  33990. 'imacron': 278,
  33991. 'Euro': 556
  33992. },
  33993. 'Helvetica-Bold': {
  33994. 'space': 278,
  33995. 'exclam': 333,
  33996. 'quotedbl': 474,
  33997. 'numbersign': 556,
  33998. 'dollar': 556,
  33999. 'percent': 889,
  34000. 'ampersand': 722,
  34001. 'quoteright': 278,
  34002. 'parenleft': 333,
  34003. 'parenright': 333,
  34004. 'asterisk': 389,
  34005. 'plus': 584,
  34006. 'comma': 278,
  34007. 'hyphen': 333,
  34008. 'period': 278,
  34009. 'slash': 278,
  34010. 'zero': 556,
  34011. 'one': 556,
  34012. 'two': 556,
  34013. 'three': 556,
  34014. 'four': 556,
  34015. 'five': 556,
  34016. 'six': 556,
  34017. 'seven': 556,
  34018. 'eight': 556,
  34019. 'nine': 556,
  34020. 'colon': 333,
  34021. 'semicolon': 333,
  34022. 'less': 584,
  34023. 'equal': 584,
  34024. 'greater': 584,
  34025. 'question': 611,
  34026. 'at': 975,
  34027. 'A': 722,
  34028. 'B': 722,
  34029. 'C': 722,
  34030. 'D': 722,
  34031. 'E': 667,
  34032. 'F': 611,
  34033. 'G': 778,
  34034. 'H': 722,
  34035. 'I': 278,
  34036. 'J': 556,
  34037. 'K': 722,
  34038. 'L': 611,
  34039. 'M': 833,
  34040. 'N': 722,
  34041. 'O': 778,
  34042. 'P': 667,
  34043. 'Q': 778,
  34044. 'R': 722,
  34045. 'S': 667,
  34046. 'T': 611,
  34047. 'U': 722,
  34048. 'V': 667,
  34049. 'W': 944,
  34050. 'X': 667,
  34051. 'Y': 667,
  34052. 'Z': 611,
  34053. 'bracketleft': 333,
  34054. 'backslash': 278,
  34055. 'bracketright': 333,
  34056. 'asciicircum': 584,
  34057. 'underscore': 556,
  34058. 'quoteleft': 278,
  34059. 'a': 556,
  34060. 'b': 611,
  34061. 'c': 556,
  34062. 'd': 611,
  34063. 'e': 556,
  34064. 'f': 333,
  34065. 'g': 611,
  34066. 'h': 611,
  34067. 'i': 278,
  34068. 'j': 278,
  34069. 'k': 556,
  34070. 'l': 278,
  34071. 'm': 889,
  34072. 'n': 611,
  34073. 'o': 611,
  34074. 'p': 611,
  34075. 'q': 611,
  34076. 'r': 389,
  34077. 's': 556,
  34078. 't': 333,
  34079. 'u': 611,
  34080. 'v': 556,
  34081. 'w': 778,
  34082. 'x': 556,
  34083. 'y': 556,
  34084. 'z': 500,
  34085. 'braceleft': 389,
  34086. 'bar': 280,
  34087. 'braceright': 389,
  34088. 'asciitilde': 584,
  34089. 'exclamdown': 333,
  34090. 'cent': 556,
  34091. 'sterling': 556,
  34092. 'fraction': 167,
  34093. 'yen': 556,
  34094. 'florin': 556,
  34095. 'section': 556,
  34096. 'currency': 556,
  34097. 'quotesingle': 238,
  34098. 'quotedblleft': 500,
  34099. 'guillemotleft': 556,
  34100. 'guilsinglleft': 333,
  34101. 'guilsinglright': 333,
  34102. 'fi': 611,
  34103. 'fl': 611,
  34104. 'endash': 556,
  34105. 'dagger': 556,
  34106. 'daggerdbl': 556,
  34107. 'periodcentered': 278,
  34108. 'paragraph': 556,
  34109. 'bullet': 350,
  34110. 'quotesinglbase': 278,
  34111. 'quotedblbase': 500,
  34112. 'quotedblright': 500,
  34113. 'guillemotright': 556,
  34114. 'ellipsis': 1000,
  34115. 'perthousand': 1000,
  34116. 'questiondown': 611,
  34117. 'grave': 333,
  34118. 'acute': 333,
  34119. 'circumflex': 333,
  34120. 'tilde': 333,
  34121. 'macron': 333,
  34122. 'breve': 333,
  34123. 'dotaccent': 333,
  34124. 'dieresis': 333,
  34125. 'ring': 333,
  34126. 'cedilla': 333,
  34127. 'hungarumlaut': 333,
  34128. 'ogonek': 333,
  34129. 'caron': 333,
  34130. 'emdash': 1000,
  34131. 'AE': 1000,
  34132. 'ordfeminine': 370,
  34133. 'Lslash': 611,
  34134. 'Oslash': 778,
  34135. 'OE': 1000,
  34136. 'ordmasculine': 365,
  34137. 'ae': 889,
  34138. 'dotlessi': 278,
  34139. 'lslash': 278,
  34140. 'oslash': 611,
  34141. 'oe': 944,
  34142. 'germandbls': 611,
  34143. 'Idieresis': 278,
  34144. 'eacute': 556,
  34145. 'abreve': 556,
  34146. 'uhungarumlaut': 611,
  34147. 'ecaron': 556,
  34148. 'Ydieresis': 667,
  34149. 'divide': 584,
  34150. 'Yacute': 667,
  34151. 'Acircumflex': 722,
  34152. 'aacute': 556,
  34153. 'Ucircumflex': 722,
  34154. 'yacute': 556,
  34155. 'scommaaccent': 556,
  34156. 'ecircumflex': 556,
  34157. 'Uring': 722,
  34158. 'Udieresis': 722,
  34159. 'aogonek': 556,
  34160. 'Uacute': 722,
  34161. 'uogonek': 611,
  34162. 'Edieresis': 667,
  34163. 'Dcroat': 722,
  34164. 'commaaccent': 250,
  34165. 'copyright': 737,
  34166. 'Emacron': 667,
  34167. 'ccaron': 556,
  34168. 'aring': 556,
  34169. 'Ncommaaccent': 722,
  34170. 'lacute': 278,
  34171. 'agrave': 556,
  34172. 'Tcommaaccent': 611,
  34173. 'Cacute': 722,
  34174. 'atilde': 556,
  34175. 'Edotaccent': 667,
  34176. 'scaron': 556,
  34177. 'scedilla': 556,
  34178. 'iacute': 278,
  34179. 'lozenge': 494,
  34180. 'Rcaron': 722,
  34181. 'Gcommaaccent': 778,
  34182. 'ucircumflex': 611,
  34183. 'acircumflex': 556,
  34184. 'Amacron': 722,
  34185. 'rcaron': 389,
  34186. 'ccedilla': 556,
  34187. 'Zdotaccent': 611,
  34188. 'Thorn': 667,
  34189. 'Omacron': 778,
  34190. 'Racute': 722,
  34191. 'Sacute': 667,
  34192. 'dcaron': 743,
  34193. 'Umacron': 722,
  34194. 'uring': 611,
  34195. 'threesuperior': 333,
  34196. 'Ograve': 778,
  34197. 'Agrave': 722,
  34198. 'Abreve': 722,
  34199. 'multiply': 584,
  34200. 'uacute': 611,
  34201. 'Tcaron': 611,
  34202. 'partialdiff': 494,
  34203. 'ydieresis': 556,
  34204. 'Nacute': 722,
  34205. 'icircumflex': 278,
  34206. 'Ecircumflex': 667,
  34207. 'adieresis': 556,
  34208. 'edieresis': 556,
  34209. 'cacute': 556,
  34210. 'nacute': 611,
  34211. 'umacron': 611,
  34212. 'Ncaron': 722,
  34213. 'Iacute': 278,
  34214. 'plusminus': 584,
  34215. 'brokenbar': 280,
  34216. 'registered': 737,
  34217. 'Gbreve': 778,
  34218. 'Idotaccent': 278,
  34219. 'summation': 600,
  34220. 'Egrave': 667,
  34221. 'racute': 389,
  34222. 'omacron': 611,
  34223. 'Zacute': 611,
  34224. 'Zcaron': 611,
  34225. 'greaterequal': 549,
  34226. 'Eth': 722,
  34227. 'Ccedilla': 722,
  34228. 'lcommaaccent': 278,
  34229. 'tcaron': 389,
  34230. 'eogonek': 556,
  34231. 'Uogonek': 722,
  34232. 'Aacute': 722,
  34233. 'Adieresis': 722,
  34234. 'egrave': 556,
  34235. 'zacute': 500,
  34236. 'iogonek': 278,
  34237. 'Oacute': 778,
  34238. 'oacute': 611,
  34239. 'amacron': 556,
  34240. 'sacute': 556,
  34241. 'idieresis': 278,
  34242. 'Ocircumflex': 778,
  34243. 'Ugrave': 722,
  34244. 'Delta': 612,
  34245. 'thorn': 611,
  34246. 'twosuperior': 333,
  34247. 'Odieresis': 778,
  34248. 'mu': 611,
  34249. 'igrave': 278,
  34250. 'ohungarumlaut': 611,
  34251. 'Eogonek': 667,
  34252. 'dcroat': 611,
  34253. 'threequarters': 834,
  34254. 'Scedilla': 667,
  34255. 'lcaron': 400,
  34256. 'Kcommaaccent': 722,
  34257. 'Lacute': 611,
  34258. 'trademark': 1000,
  34259. 'edotaccent': 556,
  34260. 'Igrave': 278,
  34261. 'Imacron': 278,
  34262. 'Lcaron': 611,
  34263. 'onehalf': 834,
  34264. 'lessequal': 549,
  34265. 'ocircumflex': 611,
  34266. 'ntilde': 611,
  34267. 'Uhungarumlaut': 722,
  34268. 'Eacute': 667,
  34269. 'emacron': 556,
  34270. 'gbreve': 611,
  34271. 'onequarter': 834,
  34272. 'Scaron': 667,
  34273. 'Scommaaccent': 667,
  34274. 'Ohungarumlaut': 778,
  34275. 'degree': 400,
  34276. 'ograve': 611,
  34277. 'Ccaron': 722,
  34278. 'ugrave': 611,
  34279. 'radical': 549,
  34280. 'Dcaron': 722,
  34281. 'rcommaaccent': 389,
  34282. 'Ntilde': 722,
  34283. 'otilde': 611,
  34284. 'Rcommaaccent': 722,
  34285. 'Lcommaaccent': 611,
  34286. 'Atilde': 722,
  34287. 'Aogonek': 722,
  34288. 'Aring': 722,
  34289. 'Otilde': 778,
  34290. 'zdotaccent': 500,
  34291. 'Ecaron': 667,
  34292. 'Iogonek': 278,
  34293. 'kcommaaccent': 556,
  34294. 'minus': 584,
  34295. 'Icircumflex': 278,
  34296. 'ncaron': 611,
  34297. 'tcommaaccent': 333,
  34298. 'logicalnot': 584,
  34299. 'odieresis': 611,
  34300. 'udieresis': 611,
  34301. 'notequal': 549,
  34302. 'gcommaaccent': 611,
  34303. 'eth': 611,
  34304. 'zcaron': 500,
  34305. 'ncommaaccent': 611,
  34306. 'onesuperior': 333,
  34307. 'imacron': 278,
  34308. 'Euro': 556
  34309. },
  34310. 'Helvetica-BoldOblique': {
  34311. 'space': 278,
  34312. 'exclam': 333,
  34313. 'quotedbl': 474,
  34314. 'numbersign': 556,
  34315. 'dollar': 556,
  34316. 'percent': 889,
  34317. 'ampersand': 722,
  34318. 'quoteright': 278,
  34319. 'parenleft': 333,
  34320. 'parenright': 333,
  34321. 'asterisk': 389,
  34322. 'plus': 584,
  34323. 'comma': 278,
  34324. 'hyphen': 333,
  34325. 'period': 278,
  34326. 'slash': 278,
  34327. 'zero': 556,
  34328. 'one': 556,
  34329. 'two': 556,
  34330. 'three': 556,
  34331. 'four': 556,
  34332. 'five': 556,
  34333. 'six': 556,
  34334. 'seven': 556,
  34335. 'eight': 556,
  34336. 'nine': 556,
  34337. 'colon': 333,
  34338. 'semicolon': 333,
  34339. 'less': 584,
  34340. 'equal': 584,
  34341. 'greater': 584,
  34342. 'question': 611,
  34343. 'at': 975,
  34344. 'A': 722,
  34345. 'B': 722,
  34346. 'C': 722,
  34347. 'D': 722,
  34348. 'E': 667,
  34349. 'F': 611,
  34350. 'G': 778,
  34351. 'H': 722,
  34352. 'I': 278,
  34353. 'J': 556,
  34354. 'K': 722,
  34355. 'L': 611,
  34356. 'M': 833,
  34357. 'N': 722,
  34358. 'O': 778,
  34359. 'P': 667,
  34360. 'Q': 778,
  34361. 'R': 722,
  34362. 'S': 667,
  34363. 'T': 611,
  34364. 'U': 722,
  34365. 'V': 667,
  34366. 'W': 944,
  34367. 'X': 667,
  34368. 'Y': 667,
  34369. 'Z': 611,
  34370. 'bracketleft': 333,
  34371. 'backslash': 278,
  34372. 'bracketright': 333,
  34373. 'asciicircum': 584,
  34374. 'underscore': 556,
  34375. 'quoteleft': 278,
  34376. 'a': 556,
  34377. 'b': 611,
  34378. 'c': 556,
  34379. 'd': 611,
  34380. 'e': 556,
  34381. 'f': 333,
  34382. 'g': 611,
  34383. 'h': 611,
  34384. 'i': 278,
  34385. 'j': 278,
  34386. 'k': 556,
  34387. 'l': 278,
  34388. 'm': 889,
  34389. 'n': 611,
  34390. 'o': 611,
  34391. 'p': 611,
  34392. 'q': 611,
  34393. 'r': 389,
  34394. 's': 556,
  34395. 't': 333,
  34396. 'u': 611,
  34397. 'v': 556,
  34398. 'w': 778,
  34399. 'x': 556,
  34400. 'y': 556,
  34401. 'z': 500,
  34402. 'braceleft': 389,
  34403. 'bar': 280,
  34404. 'braceright': 389,
  34405. 'asciitilde': 584,
  34406. 'exclamdown': 333,
  34407. 'cent': 556,
  34408. 'sterling': 556,
  34409. 'fraction': 167,
  34410. 'yen': 556,
  34411. 'florin': 556,
  34412. 'section': 556,
  34413. 'currency': 556,
  34414. 'quotesingle': 238,
  34415. 'quotedblleft': 500,
  34416. 'guillemotleft': 556,
  34417. 'guilsinglleft': 333,
  34418. 'guilsinglright': 333,
  34419. 'fi': 611,
  34420. 'fl': 611,
  34421. 'endash': 556,
  34422. 'dagger': 556,
  34423. 'daggerdbl': 556,
  34424. 'periodcentered': 278,
  34425. 'paragraph': 556,
  34426. 'bullet': 350,
  34427. 'quotesinglbase': 278,
  34428. 'quotedblbase': 500,
  34429. 'quotedblright': 500,
  34430. 'guillemotright': 556,
  34431. 'ellipsis': 1000,
  34432. 'perthousand': 1000,
  34433. 'questiondown': 611,
  34434. 'grave': 333,
  34435. 'acute': 333,
  34436. 'circumflex': 333,
  34437. 'tilde': 333,
  34438. 'macron': 333,
  34439. 'breve': 333,
  34440. 'dotaccent': 333,
  34441. 'dieresis': 333,
  34442. 'ring': 333,
  34443. 'cedilla': 333,
  34444. 'hungarumlaut': 333,
  34445. 'ogonek': 333,
  34446. 'caron': 333,
  34447. 'emdash': 1000,
  34448. 'AE': 1000,
  34449. 'ordfeminine': 370,
  34450. 'Lslash': 611,
  34451. 'Oslash': 778,
  34452. 'OE': 1000,
  34453. 'ordmasculine': 365,
  34454. 'ae': 889,
  34455. 'dotlessi': 278,
  34456. 'lslash': 278,
  34457. 'oslash': 611,
  34458. 'oe': 944,
  34459. 'germandbls': 611,
  34460. 'Idieresis': 278,
  34461. 'eacute': 556,
  34462. 'abreve': 556,
  34463. 'uhungarumlaut': 611,
  34464. 'ecaron': 556,
  34465. 'Ydieresis': 667,
  34466. 'divide': 584,
  34467. 'Yacute': 667,
  34468. 'Acircumflex': 722,
  34469. 'aacute': 556,
  34470. 'Ucircumflex': 722,
  34471. 'yacute': 556,
  34472. 'scommaaccent': 556,
  34473. 'ecircumflex': 556,
  34474. 'Uring': 722,
  34475. 'Udieresis': 722,
  34476. 'aogonek': 556,
  34477. 'Uacute': 722,
  34478. 'uogonek': 611,
  34479. 'Edieresis': 667,
  34480. 'Dcroat': 722,
  34481. 'commaaccent': 250,
  34482. 'copyright': 737,
  34483. 'Emacron': 667,
  34484. 'ccaron': 556,
  34485. 'aring': 556,
  34486. 'Ncommaaccent': 722,
  34487. 'lacute': 278,
  34488. 'agrave': 556,
  34489. 'Tcommaaccent': 611,
  34490. 'Cacute': 722,
  34491. 'atilde': 556,
  34492. 'Edotaccent': 667,
  34493. 'scaron': 556,
  34494. 'scedilla': 556,
  34495. 'iacute': 278,
  34496. 'lozenge': 494,
  34497. 'Rcaron': 722,
  34498. 'Gcommaaccent': 778,
  34499. 'ucircumflex': 611,
  34500. 'acircumflex': 556,
  34501. 'Amacron': 722,
  34502. 'rcaron': 389,
  34503. 'ccedilla': 556,
  34504. 'Zdotaccent': 611,
  34505. 'Thorn': 667,
  34506. 'Omacron': 778,
  34507. 'Racute': 722,
  34508. 'Sacute': 667,
  34509. 'dcaron': 743,
  34510. 'Umacron': 722,
  34511. 'uring': 611,
  34512. 'threesuperior': 333,
  34513. 'Ograve': 778,
  34514. 'Agrave': 722,
  34515. 'Abreve': 722,
  34516. 'multiply': 584,
  34517. 'uacute': 611,
  34518. 'Tcaron': 611,
  34519. 'partialdiff': 494,
  34520. 'ydieresis': 556,
  34521. 'Nacute': 722,
  34522. 'icircumflex': 278,
  34523. 'Ecircumflex': 667,
  34524. 'adieresis': 556,
  34525. 'edieresis': 556,
  34526. 'cacute': 556,
  34527. 'nacute': 611,
  34528. 'umacron': 611,
  34529. 'Ncaron': 722,
  34530. 'Iacute': 278,
  34531. 'plusminus': 584,
  34532. 'brokenbar': 280,
  34533. 'registered': 737,
  34534. 'Gbreve': 778,
  34535. 'Idotaccent': 278,
  34536. 'summation': 600,
  34537. 'Egrave': 667,
  34538. 'racute': 389,
  34539. 'omacron': 611,
  34540. 'Zacute': 611,
  34541. 'Zcaron': 611,
  34542. 'greaterequal': 549,
  34543. 'Eth': 722,
  34544. 'Ccedilla': 722,
  34545. 'lcommaaccent': 278,
  34546. 'tcaron': 389,
  34547. 'eogonek': 556,
  34548. 'Uogonek': 722,
  34549. 'Aacute': 722,
  34550. 'Adieresis': 722,
  34551. 'egrave': 556,
  34552. 'zacute': 500,
  34553. 'iogonek': 278,
  34554. 'Oacute': 778,
  34555. 'oacute': 611,
  34556. 'amacron': 556,
  34557. 'sacute': 556,
  34558. 'idieresis': 278,
  34559. 'Ocircumflex': 778,
  34560. 'Ugrave': 722,
  34561. 'Delta': 612,
  34562. 'thorn': 611,
  34563. 'twosuperior': 333,
  34564. 'Odieresis': 778,
  34565. 'mu': 611,
  34566. 'igrave': 278,
  34567. 'ohungarumlaut': 611,
  34568. 'Eogonek': 667,
  34569. 'dcroat': 611,
  34570. 'threequarters': 834,
  34571. 'Scedilla': 667,
  34572. 'lcaron': 400,
  34573. 'Kcommaaccent': 722,
  34574. 'Lacute': 611,
  34575. 'trademark': 1000,
  34576. 'edotaccent': 556,
  34577. 'Igrave': 278,
  34578. 'Imacron': 278,
  34579. 'Lcaron': 611,
  34580. 'onehalf': 834,
  34581. 'lessequal': 549,
  34582. 'ocircumflex': 611,
  34583. 'ntilde': 611,
  34584. 'Uhungarumlaut': 722,
  34585. 'Eacute': 667,
  34586. 'emacron': 556,
  34587. 'gbreve': 611,
  34588. 'onequarter': 834,
  34589. 'Scaron': 667,
  34590. 'Scommaaccent': 667,
  34591. 'Ohungarumlaut': 778,
  34592. 'degree': 400,
  34593. 'ograve': 611,
  34594. 'Ccaron': 722,
  34595. 'ugrave': 611,
  34596. 'radical': 549,
  34597. 'Dcaron': 722,
  34598. 'rcommaaccent': 389,
  34599. 'Ntilde': 722,
  34600. 'otilde': 611,
  34601. 'Rcommaaccent': 722,
  34602. 'Lcommaaccent': 611,
  34603. 'Atilde': 722,
  34604. 'Aogonek': 722,
  34605. 'Aring': 722,
  34606. 'Otilde': 778,
  34607. 'zdotaccent': 500,
  34608. 'Ecaron': 667,
  34609. 'Iogonek': 278,
  34610. 'kcommaaccent': 556,
  34611. 'minus': 584,
  34612. 'Icircumflex': 278,
  34613. 'ncaron': 611,
  34614. 'tcommaaccent': 333,
  34615. 'logicalnot': 584,
  34616. 'odieresis': 611,
  34617. 'udieresis': 611,
  34618. 'notequal': 549,
  34619. 'gcommaaccent': 611,
  34620. 'eth': 611,
  34621. 'zcaron': 500,
  34622. 'ncommaaccent': 611,
  34623. 'onesuperior': 333,
  34624. 'imacron': 278,
  34625. 'Euro': 556
  34626. },
  34627. 'Helvetica-Oblique' : {
  34628. 'space': 278,
  34629. 'exclam': 278,
  34630. 'quotedbl': 355,
  34631. 'numbersign': 556,
  34632. 'dollar': 556,
  34633. 'percent': 889,
  34634. 'ampersand': 667,
  34635. 'quoteright': 222,
  34636. 'parenleft': 333,
  34637. 'parenright': 333,
  34638. 'asterisk': 389,
  34639. 'plus': 584,
  34640. 'comma': 278,
  34641. 'hyphen': 333,
  34642. 'period': 278,
  34643. 'slash': 278,
  34644. 'zero': 556,
  34645. 'one': 556,
  34646. 'two': 556,
  34647. 'three': 556,
  34648. 'four': 556,
  34649. 'five': 556,
  34650. 'six': 556,
  34651. 'seven': 556,
  34652. 'eight': 556,
  34653. 'nine': 556,
  34654. 'colon': 278,
  34655. 'semicolon': 278,
  34656. 'less': 584,
  34657. 'equal': 584,
  34658. 'greater': 584,
  34659. 'question': 556,
  34660. 'at': 1015,
  34661. 'A': 667,
  34662. 'B': 667,
  34663. 'C': 722,
  34664. 'D': 722,
  34665. 'E': 667,
  34666. 'F': 611,
  34667. 'G': 778,
  34668. 'H': 722,
  34669. 'I': 278,
  34670. 'J': 500,
  34671. 'K': 667,
  34672. 'L': 556,
  34673. 'M': 833,
  34674. 'N': 722,
  34675. 'O': 778,
  34676. 'P': 667,
  34677. 'Q': 778,
  34678. 'R': 722,
  34679. 'S': 667,
  34680. 'T': 611,
  34681. 'U': 722,
  34682. 'V': 667,
  34683. 'W': 944,
  34684. 'X': 667,
  34685. 'Y': 667,
  34686. 'Z': 611,
  34687. 'bracketleft': 278,
  34688. 'backslash': 278,
  34689. 'bracketright': 278,
  34690. 'asciicircum': 469,
  34691. 'underscore': 556,
  34692. 'quoteleft': 222,
  34693. 'a': 556,
  34694. 'b': 556,
  34695. 'c': 500,
  34696. 'd': 556,
  34697. 'e': 556,
  34698. 'f': 278,
  34699. 'g': 556,
  34700. 'h': 556,
  34701. 'i': 222,
  34702. 'j': 222,
  34703. 'k': 500,
  34704. 'l': 222,
  34705. 'm': 833,
  34706. 'n': 556,
  34707. 'o': 556,
  34708. 'p': 556,
  34709. 'q': 556,
  34710. 'r': 333,
  34711. 's': 500,
  34712. 't': 278,
  34713. 'u': 556,
  34714. 'v': 500,
  34715. 'w': 722,
  34716. 'x': 500,
  34717. 'y': 500,
  34718. 'z': 500,
  34719. 'braceleft': 334,
  34720. 'bar': 260,
  34721. 'braceright': 334,
  34722. 'asciitilde': 584,
  34723. 'exclamdown': 333,
  34724. 'cent': 556,
  34725. 'sterling': 556,
  34726. 'fraction': 167,
  34727. 'yen': 556,
  34728. 'florin': 556,
  34729. 'section': 556,
  34730. 'currency': 556,
  34731. 'quotesingle': 191,
  34732. 'quotedblleft': 333,
  34733. 'guillemotleft': 556,
  34734. 'guilsinglleft': 333,
  34735. 'guilsinglright': 333,
  34736. 'fi': 500,
  34737. 'fl': 500,
  34738. 'endash': 556,
  34739. 'dagger': 556,
  34740. 'daggerdbl': 556,
  34741. 'periodcentered': 278,
  34742. 'paragraph': 537,
  34743. 'bullet': 350,
  34744. 'quotesinglbase': 222,
  34745. 'quotedblbase': 333,
  34746. 'quotedblright': 333,
  34747. 'guillemotright': 556,
  34748. 'ellipsis': 1000,
  34749. 'perthousand': 1000,
  34750. 'questiondown': 611,
  34751. 'grave': 333,
  34752. 'acute': 333,
  34753. 'circumflex': 333,
  34754. 'tilde': 333,
  34755. 'macron': 333,
  34756. 'breve': 333,
  34757. 'dotaccent': 333,
  34758. 'dieresis': 333,
  34759. 'ring': 333,
  34760. 'cedilla': 333,
  34761. 'hungarumlaut': 333,
  34762. 'ogonek': 333,
  34763. 'caron': 333,
  34764. 'emdash': 1000,
  34765. 'AE': 1000,
  34766. 'ordfeminine': 370,
  34767. 'Lslash': 556,
  34768. 'Oslash': 778,
  34769. 'OE': 1000,
  34770. 'ordmasculine': 365,
  34771. 'ae': 889,
  34772. 'dotlessi': 278,
  34773. 'lslash': 222,
  34774. 'oslash': 611,
  34775. 'oe': 944,
  34776. 'germandbls': 611,
  34777. 'Idieresis': 278,
  34778. 'eacute': 556,
  34779. 'abreve': 556,
  34780. 'uhungarumlaut': 556,
  34781. 'ecaron': 556,
  34782. 'Ydieresis': 667,
  34783. 'divide': 584,
  34784. 'Yacute': 667,
  34785. 'Acircumflex': 667,
  34786. 'aacute': 556,
  34787. 'Ucircumflex': 722,
  34788. 'yacute': 500,
  34789. 'scommaaccent': 500,
  34790. 'ecircumflex': 556,
  34791. 'Uring': 722,
  34792. 'Udieresis': 722,
  34793. 'aogonek': 556,
  34794. 'Uacute': 722,
  34795. 'uogonek': 556,
  34796. 'Edieresis': 667,
  34797. 'Dcroat': 722,
  34798. 'commaaccent': 250,
  34799. 'copyright': 737,
  34800. 'Emacron': 667,
  34801. 'ccaron': 500,
  34802. 'aring': 556,
  34803. 'Ncommaaccent': 722,
  34804. 'lacute': 222,
  34805. 'agrave': 556,
  34806. 'Tcommaaccent': 611,
  34807. 'Cacute': 722,
  34808. 'atilde': 556,
  34809. 'Edotaccent': 667,
  34810. 'scaron': 500,
  34811. 'scedilla': 500,
  34812. 'iacute': 278,
  34813. 'lozenge': 471,
  34814. 'Rcaron': 722,
  34815. 'Gcommaaccent': 778,
  34816. 'ucircumflex': 556,
  34817. 'acircumflex': 556,
  34818. 'Amacron': 667,
  34819. 'rcaron': 333,
  34820. 'ccedilla': 500,
  34821. 'Zdotaccent': 611,
  34822. 'Thorn': 667,
  34823. 'Omacron': 778,
  34824. 'Racute': 722,
  34825. 'Sacute': 667,
  34826. 'dcaron': 643,
  34827. 'Umacron': 722,
  34828. 'uring': 556,
  34829. 'threesuperior': 333,
  34830. 'Ograve': 778,
  34831. 'Agrave': 667,
  34832. 'Abreve': 667,
  34833. 'multiply': 584,
  34834. 'uacute': 556,
  34835. 'Tcaron': 611,
  34836. 'partialdiff': 476,
  34837. 'ydieresis': 500,
  34838. 'Nacute': 722,
  34839. 'icircumflex': 278,
  34840. 'Ecircumflex': 667,
  34841. 'adieresis': 556,
  34842. 'edieresis': 556,
  34843. 'cacute': 500,
  34844. 'nacute': 556,
  34845. 'umacron': 556,
  34846. 'Ncaron': 722,
  34847. 'Iacute': 278,
  34848. 'plusminus': 584,
  34849. 'brokenbar': 260,
  34850. 'registered': 737,
  34851. 'Gbreve': 778,
  34852. 'Idotaccent': 278,
  34853. 'summation': 600,
  34854. 'Egrave': 667,
  34855. 'racute': 333,
  34856. 'omacron': 556,
  34857. 'Zacute': 611,
  34858. 'Zcaron': 611,
  34859. 'greaterequal': 549,
  34860. 'Eth': 722,
  34861. 'Ccedilla': 722,
  34862. 'lcommaaccent': 222,
  34863. 'tcaron': 317,
  34864. 'eogonek': 556,
  34865. 'Uogonek': 722,
  34866. 'Aacute': 667,
  34867. 'Adieresis': 667,
  34868. 'egrave': 556,
  34869. 'zacute': 500,
  34870. 'iogonek': 222,
  34871. 'Oacute': 778,
  34872. 'oacute': 556,
  34873. 'amacron': 556,
  34874. 'sacute': 500,
  34875. 'idieresis': 278,
  34876. 'Ocircumflex': 778,
  34877. 'Ugrave': 722,
  34878. 'Delta': 612,
  34879. 'thorn': 556,
  34880. 'twosuperior': 333,
  34881. 'Odieresis': 778,
  34882. 'mu': 556,
  34883. 'igrave': 278,
  34884. 'ohungarumlaut': 556,
  34885. 'Eogonek': 667,
  34886. 'dcroat': 556,
  34887. 'threequarters': 834,
  34888. 'Scedilla': 667,
  34889. 'lcaron': 299,
  34890. 'Kcommaaccent': 667,
  34891. 'Lacute': 556,
  34892. 'trademark': 1000,
  34893. 'edotaccent': 556,
  34894. 'Igrave': 278,
  34895. 'Imacron': 278,
  34896. 'Lcaron': 556,
  34897. 'onehalf': 834,
  34898. 'lessequal': 549,
  34899. 'ocircumflex': 556,
  34900. 'ntilde': 556,
  34901. 'Uhungarumlaut': 722,
  34902. 'Eacute': 667,
  34903. 'emacron': 556,
  34904. 'gbreve': 556,
  34905. 'onequarter': 834,
  34906. 'Scaron': 667,
  34907. 'Scommaaccent': 667,
  34908. 'Ohungarumlaut': 778,
  34909. 'degree': 400,
  34910. 'ograve': 556,
  34911. 'Ccaron': 722,
  34912. 'ugrave': 556,
  34913. 'radical': 453,
  34914. 'Dcaron': 722,
  34915. 'rcommaaccent': 333,
  34916. 'Ntilde': 722,
  34917. 'otilde': 556,
  34918. 'Rcommaaccent': 722,
  34919. 'Lcommaaccent': 556,
  34920. 'Atilde': 667,
  34921. 'Aogonek': 667,
  34922. 'Aring': 667,
  34923. 'Otilde': 778,
  34924. 'zdotaccent': 500,
  34925. 'Ecaron': 667,
  34926. 'Iogonek': 278,
  34927. 'kcommaaccent': 500,
  34928. 'minus': 584,
  34929. 'Icircumflex': 278,
  34930. 'ncaron': 556,
  34931. 'tcommaaccent': 278,
  34932. 'logicalnot': 584,
  34933. 'odieresis': 556,
  34934. 'udieresis': 556,
  34935. 'notequal': 549,
  34936. 'gcommaaccent': 556,
  34937. 'eth': 556,
  34938. 'zcaron': 500,
  34939. 'ncommaaccent': 556,
  34940. 'onesuperior': 333,
  34941. 'imacron': 278,
  34942. 'Euro': 556
  34943. },
  34944. 'Symbol': {
  34945. 'space': 250,
  34946. 'exclam': 333,
  34947. 'universal': 713,
  34948. 'numbersign': 500,
  34949. 'existential': 549,
  34950. 'percent': 833,
  34951. 'ampersand': 778,
  34952. 'suchthat': 439,
  34953. 'parenleft': 333,
  34954. 'parenright': 333,
  34955. 'asteriskmath': 500,
  34956. 'plus': 549,
  34957. 'comma': 250,
  34958. 'minus': 549,
  34959. 'period': 250,
  34960. 'slash': 278,
  34961. 'zero': 500,
  34962. 'one': 500,
  34963. 'two': 500,
  34964. 'three': 500,
  34965. 'four': 500,
  34966. 'five': 500,
  34967. 'six': 500,
  34968. 'seven': 500,
  34969. 'eight': 500,
  34970. 'nine': 500,
  34971. 'colon': 278,
  34972. 'semicolon': 278,
  34973. 'less': 549,
  34974. 'equal': 549,
  34975. 'greater': 549,
  34976. 'question': 444,
  34977. 'congruent': 549,
  34978. 'Alpha': 722,
  34979. 'Beta': 667,
  34980. 'Chi': 722,
  34981. 'Delta': 612,
  34982. 'Epsilon': 611,
  34983. 'Phi': 763,
  34984. 'Gamma': 603,
  34985. 'Eta': 722,
  34986. 'Iota': 333,
  34987. 'theta1': 631,
  34988. 'Kappa': 722,
  34989. 'Lambda': 686,
  34990. 'Mu': 889,
  34991. 'Nu': 722,
  34992. 'Omicron': 722,
  34993. 'Pi': 768,
  34994. 'Theta': 741,
  34995. 'Rho': 556,
  34996. 'Sigma': 592,
  34997. 'Tau': 611,
  34998. 'Upsilon': 690,
  34999. 'sigma1': 439,
  35000. 'Omega': 768,
  35001. 'Xi': 645,
  35002. 'Psi': 795,
  35003. 'Zeta': 611,
  35004. 'bracketleft': 333,
  35005. 'therefore': 863,
  35006. 'bracketright': 333,
  35007. 'perpendicular': 658,
  35008. 'underscore': 500,
  35009. 'radicalex': 500,
  35010. 'alpha': 631,
  35011. 'beta': 549,
  35012. 'chi': 549,
  35013. 'delta': 494,
  35014. 'epsilon': 439,
  35015. 'phi': 521,
  35016. 'gamma': 411,
  35017. 'eta': 603,
  35018. 'iota': 329,
  35019. 'phi1': 603,
  35020. 'kappa': 549,
  35021. 'lambda': 549,
  35022. 'mu': 576,
  35023. 'nu': 521,
  35024. 'omicron': 549,
  35025. 'pi': 549,
  35026. 'theta': 521,
  35027. 'rho': 549,
  35028. 'sigma': 603,
  35029. 'tau': 439,
  35030. 'upsilon': 576,
  35031. 'omega1': 713,
  35032. 'omega': 686,
  35033. 'xi': 493,
  35034. 'psi': 686,
  35035. 'zeta': 494,
  35036. 'braceleft': 480,
  35037. 'bar': 200,
  35038. 'braceright': 480,
  35039. 'similar': 549,
  35040. 'Euro': 750,
  35041. 'Upsilon1': 620,
  35042. 'minute': 247,
  35043. 'lessequal': 549,
  35044. 'fraction': 167,
  35045. 'infinity': 713,
  35046. 'florin': 500,
  35047. 'club': 753,
  35048. 'diamond': 753,
  35049. 'heart': 753,
  35050. 'spade': 753,
  35051. 'arrowboth': 1042,
  35052. 'arrowleft': 987,
  35053. 'arrowup': 603,
  35054. 'arrowright': 987,
  35055. 'arrowdown': 603,
  35056. 'degree': 400,
  35057. 'plusminus': 549,
  35058. 'second': 411,
  35059. 'greaterequal': 549,
  35060. 'multiply': 549,
  35061. 'proportional': 713,
  35062. 'partialdiff': 494,
  35063. 'bullet': 460,
  35064. 'divide': 549,
  35065. 'notequal': 549,
  35066. 'equivalence': 549,
  35067. 'approxequal': 549,
  35068. 'ellipsis': 1000,
  35069. 'arrowvertex': 603,
  35070. 'arrowhorizex': 1000,
  35071. 'carriagereturn': 658,
  35072. 'aleph': 823,
  35073. 'Ifraktur': 686,
  35074. 'Rfraktur': 795,
  35075. 'weierstrass': 987,
  35076. 'circlemultiply': 768,
  35077. 'circleplus': 768,
  35078. 'emptyset': 823,
  35079. 'intersection': 768,
  35080. 'union': 768,
  35081. 'propersuperset': 713,
  35082. 'reflexsuperset': 713,
  35083. 'notsubset': 713,
  35084. 'propersubset': 713,
  35085. 'reflexsubset': 713,
  35086. 'element': 713,
  35087. 'notelement': 713,
  35088. 'angle': 768,
  35089. 'gradient': 713,
  35090. 'registerserif': 790,
  35091. 'copyrightserif': 790,
  35092. 'trademarkserif': 890,
  35093. 'product': 823,
  35094. 'radical': 549,
  35095. 'dotmath': 250,
  35096. 'logicalnot': 713,
  35097. 'logicaland': 603,
  35098. 'logicalor': 603,
  35099. 'arrowdblboth': 1042,
  35100. 'arrowdblleft': 987,
  35101. 'arrowdblup': 603,
  35102. 'arrowdblright': 987,
  35103. 'arrowdbldown': 603,
  35104. 'lozenge': 494,
  35105. 'angleleft': 329,
  35106. 'registersans': 790,
  35107. 'copyrightsans': 790,
  35108. 'trademarksans': 786,
  35109. 'summation': 713,
  35110. 'parenlefttp': 384,
  35111. 'parenleftex': 384,
  35112. 'parenleftbt': 384,
  35113. 'bracketlefttp': 384,
  35114. 'bracketleftex': 384,
  35115. 'bracketleftbt': 384,
  35116. 'bracelefttp': 494,
  35117. 'braceleftmid': 494,
  35118. 'braceleftbt': 494,
  35119. 'braceex': 494,
  35120. 'angleright': 329,
  35121. 'integral': 274,
  35122. 'integraltp': 686,
  35123. 'integralex': 686,
  35124. 'integralbt': 686,
  35125. 'parenrighttp': 384,
  35126. 'parenrightex': 384,
  35127. 'parenrightbt': 384,
  35128. 'bracketrighttp': 384,
  35129. 'bracketrightex': 384,
  35130. 'bracketrightbt': 384,
  35131. 'bracerighttp': 494,
  35132. 'bracerightmid': 494,
  35133. 'bracerightbt': 494,
  35134. 'apple': 790
  35135. },
  35136. 'Times-Roman': {
  35137. 'space': 250,
  35138. 'exclam': 333,
  35139. 'quotedbl': 408,
  35140. 'numbersign': 500,
  35141. 'dollar': 500,
  35142. 'percent': 833,
  35143. 'ampersand': 778,
  35144. 'quoteright': 333,
  35145. 'parenleft': 333,
  35146. 'parenright': 333,
  35147. 'asterisk': 500,
  35148. 'plus': 564,
  35149. 'comma': 250,
  35150. 'hyphen': 333,
  35151. 'period': 250,
  35152. 'slash': 278,
  35153. 'zero': 500,
  35154. 'one': 500,
  35155. 'two': 500,
  35156. 'three': 500,
  35157. 'four': 500,
  35158. 'five': 500,
  35159. 'six': 500,
  35160. 'seven': 500,
  35161. 'eight': 500,
  35162. 'nine': 500,
  35163. 'colon': 278,
  35164. 'semicolon': 278,
  35165. 'less': 564,
  35166. 'equal': 564,
  35167. 'greater': 564,
  35168. 'question': 444,
  35169. 'at': 921,
  35170. 'A': 722,
  35171. 'B': 667,
  35172. 'C': 667,
  35173. 'D': 722,
  35174. 'E': 611,
  35175. 'F': 556,
  35176. 'G': 722,
  35177. 'H': 722,
  35178. 'I': 333,
  35179. 'J': 389,
  35180. 'K': 722,
  35181. 'L': 611,
  35182. 'M': 889,
  35183. 'N': 722,
  35184. 'O': 722,
  35185. 'P': 556,
  35186. 'Q': 722,
  35187. 'R': 667,
  35188. 'S': 556,
  35189. 'T': 611,
  35190. 'U': 722,
  35191. 'V': 722,
  35192. 'W': 944,
  35193. 'X': 722,
  35194. 'Y': 722,
  35195. 'Z': 611,
  35196. 'bracketleft': 333,
  35197. 'backslash': 278,
  35198. 'bracketright': 333,
  35199. 'asciicircum': 469,
  35200. 'underscore': 500,
  35201. 'quoteleft': 333,
  35202. 'a': 444,
  35203. 'b': 500,
  35204. 'c': 444,
  35205. 'd': 500,
  35206. 'e': 444,
  35207. 'f': 333,
  35208. 'g': 500,
  35209. 'h': 500,
  35210. 'i': 278,
  35211. 'j': 278,
  35212. 'k': 500,
  35213. 'l': 278,
  35214. 'm': 778,
  35215. 'n': 500,
  35216. 'o': 500,
  35217. 'p': 500,
  35218. 'q': 500,
  35219. 'r': 333,
  35220. 's': 389,
  35221. 't': 278,
  35222. 'u': 500,
  35223. 'v': 500,
  35224. 'w': 722,
  35225. 'x': 500,
  35226. 'y': 500,
  35227. 'z': 444,
  35228. 'braceleft': 480,
  35229. 'bar': 200,
  35230. 'braceright': 480,
  35231. 'asciitilde': 541,
  35232. 'exclamdown': 333,
  35233. 'cent': 500,
  35234. 'sterling': 500,
  35235. 'fraction': 167,
  35236. 'yen': 500,
  35237. 'florin': 500,
  35238. 'section': 500,
  35239. 'currency': 500,
  35240. 'quotesingle': 180,
  35241. 'quotedblleft': 444,
  35242. 'guillemotleft': 500,
  35243. 'guilsinglleft': 333,
  35244. 'guilsinglright': 333,
  35245. 'fi': 556,
  35246. 'fl': 556,
  35247. 'endash': 500,
  35248. 'dagger': 500,
  35249. 'daggerdbl': 500,
  35250. 'periodcentered': 250,
  35251. 'paragraph': 453,
  35252. 'bullet': 350,
  35253. 'quotesinglbase': 333,
  35254. 'quotedblbase': 444,
  35255. 'quotedblright': 444,
  35256. 'guillemotright': 500,
  35257. 'ellipsis': 1000,
  35258. 'perthousand': 1000,
  35259. 'questiondown': 444,
  35260. 'grave': 333,
  35261. 'acute': 333,
  35262. 'circumflex': 333,
  35263. 'tilde': 333,
  35264. 'macron': 333,
  35265. 'breve': 333,
  35266. 'dotaccent': 333,
  35267. 'dieresis': 333,
  35268. 'ring': 333,
  35269. 'cedilla': 333,
  35270. 'hungarumlaut': 333,
  35271. 'ogonek': 333,
  35272. 'caron': 333,
  35273. 'emdash': 1000,
  35274. 'AE': 889,
  35275. 'ordfeminine': 276,
  35276. 'Lslash': 611,
  35277. 'Oslash': 722,
  35278. 'OE': 889,
  35279. 'ordmasculine': 310,
  35280. 'ae': 667,
  35281. 'dotlessi': 278,
  35282. 'lslash': 278,
  35283. 'oslash': 500,
  35284. 'oe': 722,
  35285. 'germandbls': 500,
  35286. 'Idieresis': 333,
  35287. 'eacute': 444,
  35288. 'abreve': 444,
  35289. 'uhungarumlaut': 500,
  35290. 'ecaron': 444,
  35291. 'Ydieresis': 722,
  35292. 'divide': 564,
  35293. 'Yacute': 722,
  35294. 'Acircumflex': 722,
  35295. 'aacute': 444,
  35296. 'Ucircumflex': 722,
  35297. 'yacute': 500,
  35298. 'scommaaccent': 389,
  35299. 'ecircumflex': 444,
  35300. 'Uring': 722,
  35301. 'Udieresis': 722,
  35302. 'aogonek': 444,
  35303. 'Uacute': 722,
  35304. 'uogonek': 500,
  35305. 'Edieresis': 611,
  35306. 'Dcroat': 722,
  35307. 'commaaccent': 250,
  35308. 'copyright': 760,
  35309. 'Emacron': 611,
  35310. 'ccaron': 444,
  35311. 'aring': 444,
  35312. 'Ncommaaccent': 722,
  35313. 'lacute': 278,
  35314. 'agrave': 444,
  35315. 'Tcommaaccent': 611,
  35316. 'Cacute': 667,
  35317. 'atilde': 444,
  35318. 'Edotaccent': 611,
  35319. 'scaron': 389,
  35320. 'scedilla': 389,
  35321. 'iacute': 278,
  35322. 'lozenge': 471,
  35323. 'Rcaron': 667,
  35324. 'Gcommaaccent': 722,
  35325. 'ucircumflex': 500,
  35326. 'acircumflex': 444,
  35327. 'Amacron': 722,
  35328. 'rcaron': 333,
  35329. 'ccedilla': 444,
  35330. 'Zdotaccent': 611,
  35331. 'Thorn': 556,
  35332. 'Omacron': 722,
  35333. 'Racute': 667,
  35334. 'Sacute': 556,
  35335. 'dcaron': 588,
  35336. 'Umacron': 722,
  35337. 'uring': 500,
  35338. 'threesuperior': 300,
  35339. 'Ograve': 722,
  35340. 'Agrave': 722,
  35341. 'Abreve': 722,
  35342. 'multiply': 564,
  35343. 'uacute': 500,
  35344. 'Tcaron': 611,
  35345. 'partialdiff': 476,
  35346. 'ydieresis': 500,
  35347. 'Nacute': 722,
  35348. 'icircumflex': 278,
  35349. 'Ecircumflex': 611,
  35350. 'adieresis': 444,
  35351. 'edieresis': 444,
  35352. 'cacute': 444,
  35353. 'nacute': 500,
  35354. 'umacron': 500,
  35355. 'Ncaron': 722,
  35356. 'Iacute': 333,
  35357. 'plusminus': 564,
  35358. 'brokenbar': 200,
  35359. 'registered': 760,
  35360. 'Gbreve': 722,
  35361. 'Idotaccent': 333,
  35362. 'summation': 600,
  35363. 'Egrave': 611,
  35364. 'racute': 333,
  35365. 'omacron': 500,
  35366. 'Zacute': 611,
  35367. 'Zcaron': 611,
  35368. 'greaterequal': 549,
  35369. 'Eth': 722,
  35370. 'Ccedilla': 667,
  35371. 'lcommaaccent': 278,
  35372. 'tcaron': 326,
  35373. 'eogonek': 444,
  35374. 'Uogonek': 722,
  35375. 'Aacute': 722,
  35376. 'Adieresis': 722,
  35377. 'egrave': 444,
  35378. 'zacute': 444,
  35379. 'iogonek': 278,
  35380. 'Oacute': 722,
  35381. 'oacute': 500,
  35382. 'amacron': 444,
  35383. 'sacute': 389,
  35384. 'idieresis': 278,
  35385. 'Ocircumflex': 722,
  35386. 'Ugrave': 722,
  35387. 'Delta': 612,
  35388. 'thorn': 500,
  35389. 'twosuperior': 300,
  35390. 'Odieresis': 722,
  35391. 'mu': 500,
  35392. 'igrave': 278,
  35393. 'ohungarumlaut': 500,
  35394. 'Eogonek': 611,
  35395. 'dcroat': 500,
  35396. 'threequarters': 750,
  35397. 'Scedilla': 556,
  35398. 'lcaron': 344,
  35399. 'Kcommaaccent': 722,
  35400. 'Lacute': 611,
  35401. 'trademark': 980,
  35402. 'edotaccent': 444,
  35403. 'Igrave': 333,
  35404. 'Imacron': 333,
  35405. 'Lcaron': 611,
  35406. 'onehalf': 750,
  35407. 'lessequal': 549,
  35408. 'ocircumflex': 500,
  35409. 'ntilde': 500,
  35410. 'Uhungarumlaut': 722,
  35411. 'Eacute': 611,
  35412. 'emacron': 444,
  35413. 'gbreve': 500,
  35414. 'onequarter': 750,
  35415. 'Scaron': 556,
  35416. 'Scommaaccent': 556,
  35417. 'Ohungarumlaut': 722,
  35418. 'degree': 400,
  35419. 'ograve': 500,
  35420. 'Ccaron': 667,
  35421. 'ugrave': 500,
  35422. 'radical': 453,
  35423. 'Dcaron': 722,
  35424. 'rcommaaccent': 333,
  35425. 'Ntilde': 722,
  35426. 'otilde': 500,
  35427. 'Rcommaaccent': 667,
  35428. 'Lcommaaccent': 611,
  35429. 'Atilde': 722,
  35430. 'Aogonek': 722,
  35431. 'Aring': 722,
  35432. 'Otilde': 722,
  35433. 'zdotaccent': 444,
  35434. 'Ecaron': 611,
  35435. 'Iogonek': 333,
  35436. 'kcommaaccent': 500,
  35437. 'minus': 564,
  35438. 'Icircumflex': 333,
  35439. 'ncaron': 500,
  35440. 'tcommaaccent': 278,
  35441. 'logicalnot': 564,
  35442. 'odieresis': 500,
  35443. 'udieresis': 500,
  35444. 'notequal': 549,
  35445. 'gcommaaccent': 500,
  35446. 'eth': 500,
  35447. 'zcaron': 444,
  35448. 'ncommaaccent': 500,
  35449. 'onesuperior': 300,
  35450. 'imacron': 278,
  35451. 'Euro': 500
  35452. },
  35453. 'Times-Bold': {
  35454. 'space': 250,
  35455. 'exclam': 333,
  35456. 'quotedbl': 555,
  35457. 'numbersign': 500,
  35458. 'dollar': 500,
  35459. 'percent': 1000,
  35460. 'ampersand': 833,
  35461. 'quoteright': 333,
  35462. 'parenleft': 333,
  35463. 'parenright': 333,
  35464. 'asterisk': 500,
  35465. 'plus': 570,
  35466. 'comma': 250,
  35467. 'hyphen': 333,
  35468. 'period': 250,
  35469. 'slash': 278,
  35470. 'zero': 500,
  35471. 'one': 500,
  35472. 'two': 500,
  35473. 'three': 500,
  35474. 'four': 500,
  35475. 'five': 500,
  35476. 'six': 500,
  35477. 'seven': 500,
  35478. 'eight': 500,
  35479. 'nine': 500,
  35480. 'colon': 333,
  35481. 'semicolon': 333,
  35482. 'less': 570,
  35483. 'equal': 570,
  35484. 'greater': 570,
  35485. 'question': 500,
  35486. 'at': 930,
  35487. 'A': 722,
  35488. 'B': 667,
  35489. 'C': 722,
  35490. 'D': 722,
  35491. 'E': 667,
  35492. 'F': 611,
  35493. 'G': 778,
  35494. 'H': 778,
  35495. 'I': 389,
  35496. 'J': 500,
  35497. 'K': 778,
  35498. 'L': 667,
  35499. 'M': 944,
  35500. 'N': 722,
  35501. 'O': 778,
  35502. 'P': 611,
  35503. 'Q': 778,
  35504. 'R': 722,
  35505. 'S': 556,
  35506. 'T': 667,
  35507. 'U': 722,
  35508. 'V': 722,
  35509. 'W': 1000,
  35510. 'X': 722,
  35511. 'Y': 722,
  35512. 'Z': 667,
  35513. 'bracketleft': 333,
  35514. 'backslash': 278,
  35515. 'bracketright': 333,
  35516. 'asciicircum': 581,
  35517. 'underscore': 500,
  35518. 'quoteleft': 333,
  35519. 'a': 500,
  35520. 'b': 556,
  35521. 'c': 444,
  35522. 'd': 556,
  35523. 'e': 444,
  35524. 'f': 333,
  35525. 'g': 500,
  35526. 'h': 556,
  35527. 'i': 278,
  35528. 'j': 333,
  35529. 'k': 556,
  35530. 'l': 278,
  35531. 'm': 833,
  35532. 'n': 556,
  35533. 'o': 500,
  35534. 'p': 556,
  35535. 'q': 556,
  35536. 'r': 444,
  35537. 's': 389,
  35538. 't': 333,
  35539. 'u': 556,
  35540. 'v': 500,
  35541. 'w': 722,
  35542. 'x': 500,
  35543. 'y': 500,
  35544. 'z': 444,
  35545. 'braceleft': 394,
  35546. 'bar': 220,
  35547. 'braceright': 394,
  35548. 'asciitilde': 520,
  35549. 'exclamdown': 333,
  35550. 'cent': 500,
  35551. 'sterling': 500,
  35552. 'fraction': 167,
  35553. 'yen': 500,
  35554. 'florin': 500,
  35555. 'section': 500,
  35556. 'currency': 500,
  35557. 'quotesingle': 278,
  35558. 'quotedblleft': 500,
  35559. 'guillemotleft': 500,
  35560. 'guilsinglleft': 333,
  35561. 'guilsinglright': 333,
  35562. 'fi': 556,
  35563. 'fl': 556,
  35564. 'endash': 500,
  35565. 'dagger': 500,
  35566. 'daggerdbl': 500,
  35567. 'periodcentered': 250,
  35568. 'paragraph': 540,
  35569. 'bullet': 350,
  35570. 'quotesinglbase': 333,
  35571. 'quotedblbase': 500,
  35572. 'quotedblright': 500,
  35573. 'guillemotright': 500,
  35574. 'ellipsis': 1000,
  35575. 'perthousand': 1000,
  35576. 'questiondown': 500,
  35577. 'grave': 333,
  35578. 'acute': 333,
  35579. 'circumflex': 333,
  35580. 'tilde': 333,
  35581. 'macron': 333,
  35582. 'breve': 333,
  35583. 'dotaccent': 333,
  35584. 'dieresis': 333,
  35585. 'ring': 333,
  35586. 'cedilla': 333,
  35587. 'hungarumlaut': 333,
  35588. 'ogonek': 333,
  35589. 'caron': 333,
  35590. 'emdash': 1000,
  35591. 'AE': 1000,
  35592. 'ordfeminine': 300,
  35593. 'Lslash': 667,
  35594. 'Oslash': 778,
  35595. 'OE': 1000,
  35596. 'ordmasculine': 330,
  35597. 'ae': 722,
  35598. 'dotlessi': 278,
  35599. 'lslash': 278,
  35600. 'oslash': 500,
  35601. 'oe': 722,
  35602. 'germandbls': 556,
  35603. 'Idieresis': 389,
  35604. 'eacute': 444,
  35605. 'abreve': 500,
  35606. 'uhungarumlaut': 556,
  35607. 'ecaron': 444,
  35608. 'Ydieresis': 722,
  35609. 'divide': 570,
  35610. 'Yacute': 722,
  35611. 'Acircumflex': 722,
  35612. 'aacute': 500,
  35613. 'Ucircumflex': 722,
  35614. 'yacute': 500,
  35615. 'scommaaccent': 389,
  35616. 'ecircumflex': 444,
  35617. 'Uring': 722,
  35618. 'Udieresis': 722,
  35619. 'aogonek': 500,
  35620. 'Uacute': 722,
  35621. 'uogonek': 556,
  35622. 'Edieresis': 667,
  35623. 'Dcroat': 722,
  35624. 'commaaccent': 250,
  35625. 'copyright': 747,
  35626. 'Emacron': 667,
  35627. 'ccaron': 444,
  35628. 'aring': 500,
  35629. 'Ncommaaccent': 722,
  35630. 'lacute': 278,
  35631. 'agrave': 500,
  35632. 'Tcommaaccent': 667,
  35633. 'Cacute': 722,
  35634. 'atilde': 500,
  35635. 'Edotaccent': 667,
  35636. 'scaron': 389,
  35637. 'scedilla': 389,
  35638. 'iacute': 278,
  35639. 'lozenge': 494,
  35640. 'Rcaron': 722,
  35641. 'Gcommaaccent': 778,
  35642. 'ucircumflex': 556,
  35643. 'acircumflex': 500,
  35644. 'Amacron': 722,
  35645. 'rcaron': 444,
  35646. 'ccedilla': 444,
  35647. 'Zdotaccent': 667,
  35648. 'Thorn': 611,
  35649. 'Omacron': 778,
  35650. 'Racute': 722,
  35651. 'Sacute': 556,
  35652. 'dcaron': 672,
  35653. 'Umacron': 722,
  35654. 'uring': 556,
  35655. 'threesuperior': 300,
  35656. 'Ograve': 778,
  35657. 'Agrave': 722,
  35658. 'Abreve': 722,
  35659. 'multiply': 570,
  35660. 'uacute': 556,
  35661. 'Tcaron': 667,
  35662. 'partialdiff': 494,
  35663. 'ydieresis': 500,
  35664. 'Nacute': 722,
  35665. 'icircumflex': 278,
  35666. 'Ecircumflex': 667,
  35667. 'adieresis': 500,
  35668. 'edieresis': 444,
  35669. 'cacute': 444,
  35670. 'nacute': 556,
  35671. 'umacron': 556,
  35672. 'Ncaron': 722,
  35673. 'Iacute': 389,
  35674. 'plusminus': 570,
  35675. 'brokenbar': 220,
  35676. 'registered': 747,
  35677. 'Gbreve': 778,
  35678. 'Idotaccent': 389,
  35679. 'summation': 600,
  35680. 'Egrave': 667,
  35681. 'racute': 444,
  35682. 'omacron': 500,
  35683. 'Zacute': 667,
  35684. 'Zcaron': 667,
  35685. 'greaterequal': 549,
  35686. 'Eth': 722,
  35687. 'Ccedilla': 722,
  35688. 'lcommaaccent': 278,
  35689. 'tcaron': 416,
  35690. 'eogonek': 444,
  35691. 'Uogonek': 722,
  35692. 'Aacute': 722,
  35693. 'Adieresis': 722,
  35694. 'egrave': 444,
  35695. 'zacute': 444,
  35696. 'iogonek': 278,
  35697. 'Oacute': 778,
  35698. 'oacute': 500,
  35699. 'amacron': 500,
  35700. 'sacute': 389,
  35701. 'idieresis': 278,
  35702. 'Ocircumflex': 778,
  35703. 'Ugrave': 722,
  35704. 'Delta': 612,
  35705. 'thorn': 556,
  35706. 'twosuperior': 300,
  35707. 'Odieresis': 778,
  35708. 'mu': 556,
  35709. 'igrave': 278,
  35710. 'ohungarumlaut': 500,
  35711. 'Eogonek': 667,
  35712. 'dcroat': 556,
  35713. 'threequarters': 750,
  35714. 'Scedilla': 556,
  35715. 'lcaron': 394,
  35716. 'Kcommaaccent': 778,
  35717. 'Lacute': 667,
  35718. 'trademark': 1000,
  35719. 'edotaccent': 444,
  35720. 'Igrave': 389,
  35721. 'Imacron': 389,
  35722. 'Lcaron': 667,
  35723. 'onehalf': 750,
  35724. 'lessequal': 549,
  35725. 'ocircumflex': 500,
  35726. 'ntilde': 556,
  35727. 'Uhungarumlaut': 722,
  35728. 'Eacute': 667,
  35729. 'emacron': 444,
  35730. 'gbreve': 500,
  35731. 'onequarter': 750,
  35732. 'Scaron': 556,
  35733. 'Scommaaccent': 556,
  35734. 'Ohungarumlaut': 778,
  35735. 'degree': 400,
  35736. 'ograve': 500,
  35737. 'Ccaron': 722,
  35738. 'ugrave': 556,
  35739. 'radical': 549,
  35740. 'Dcaron': 722,
  35741. 'rcommaaccent': 444,
  35742. 'Ntilde': 722,
  35743. 'otilde': 500,
  35744. 'Rcommaaccent': 722,
  35745. 'Lcommaaccent': 667,
  35746. 'Atilde': 722,
  35747. 'Aogonek': 722,
  35748. 'Aring': 722,
  35749. 'Otilde': 778,
  35750. 'zdotaccent': 444,
  35751. 'Ecaron': 667,
  35752. 'Iogonek': 389,
  35753. 'kcommaaccent': 556,
  35754. 'minus': 570,
  35755. 'Icircumflex': 389,
  35756. 'ncaron': 556,
  35757. 'tcommaaccent': 333,
  35758. 'logicalnot': 570,
  35759. 'odieresis': 500,
  35760. 'udieresis': 556,
  35761. 'notequal': 549,
  35762. 'gcommaaccent': 500,
  35763. 'eth': 500,
  35764. 'zcaron': 444,
  35765. 'ncommaaccent': 556,
  35766. 'onesuperior': 300,
  35767. 'imacron': 278,
  35768. 'Euro': 500
  35769. },
  35770. 'Times-BoldItalic': {
  35771. 'space': 250,
  35772. 'exclam': 389,
  35773. 'quotedbl': 555,
  35774. 'numbersign': 500,
  35775. 'dollar': 500,
  35776. 'percent': 833,
  35777. 'ampersand': 778,
  35778. 'quoteright': 333,
  35779. 'parenleft': 333,
  35780. 'parenright': 333,
  35781. 'asterisk': 500,
  35782. 'plus': 570,
  35783. 'comma': 250,
  35784. 'hyphen': 333,
  35785. 'period': 250,
  35786. 'slash': 278,
  35787. 'zero': 500,
  35788. 'one': 500,
  35789. 'two': 500,
  35790. 'three': 500,
  35791. 'four': 500,
  35792. 'five': 500,
  35793. 'six': 500,
  35794. 'seven': 500,
  35795. 'eight': 500,
  35796. 'nine': 500,
  35797. 'colon': 333,
  35798. 'semicolon': 333,
  35799. 'less': 570,
  35800. 'equal': 570,
  35801. 'greater': 570,
  35802. 'question': 500,
  35803. 'at': 832,
  35804. 'A': 667,
  35805. 'B': 667,
  35806. 'C': 667,
  35807. 'D': 722,
  35808. 'E': 667,
  35809. 'F': 667,
  35810. 'G': 722,
  35811. 'H': 778,
  35812. 'I': 389,
  35813. 'J': 500,
  35814. 'K': 667,
  35815. 'L': 611,
  35816. 'M': 889,
  35817. 'N': 722,
  35818. 'O': 722,
  35819. 'P': 611,
  35820. 'Q': 722,
  35821. 'R': 667,
  35822. 'S': 556,
  35823. 'T': 611,
  35824. 'U': 722,
  35825. 'V': 667,
  35826. 'W': 889,
  35827. 'X': 667,
  35828. 'Y': 611,
  35829. 'Z': 611,
  35830. 'bracketleft': 333,
  35831. 'backslash': 278,
  35832. 'bracketright': 333,
  35833. 'asciicircum': 570,
  35834. 'underscore': 500,
  35835. 'quoteleft': 333,
  35836. 'a': 500,
  35837. 'b': 500,
  35838. 'c': 444,
  35839. 'd': 500,
  35840. 'e': 444,
  35841. 'f': 333,
  35842. 'g': 500,
  35843. 'h': 556,
  35844. 'i': 278,
  35845. 'j': 278,
  35846. 'k': 500,
  35847. 'l': 278,
  35848. 'm': 778,
  35849. 'n': 556,
  35850. 'o': 500,
  35851. 'p': 500,
  35852. 'q': 500,
  35853. 'r': 389,
  35854. 's': 389,
  35855. 't': 278,
  35856. 'u': 556,
  35857. 'v': 444,
  35858. 'w': 667,
  35859. 'x': 500,
  35860. 'y': 444,
  35861. 'z': 389,
  35862. 'braceleft': 348,
  35863. 'bar': 220,
  35864. 'braceright': 348,
  35865. 'asciitilde': 570,
  35866. 'exclamdown': 389,
  35867. 'cent': 500,
  35868. 'sterling': 500,
  35869. 'fraction': 167,
  35870. 'yen': 500,
  35871. 'florin': 500,
  35872. 'section': 500,
  35873. 'currency': 500,
  35874. 'quotesingle': 278,
  35875. 'quotedblleft': 500,
  35876. 'guillemotleft': 500,
  35877. 'guilsinglleft': 333,
  35878. 'guilsinglright': 333,
  35879. 'fi': 556,
  35880. 'fl': 556,
  35881. 'endash': 500,
  35882. 'dagger': 500,
  35883. 'daggerdbl': 500,
  35884. 'periodcentered': 250,
  35885. 'paragraph': 500,
  35886. 'bullet': 350,
  35887. 'quotesinglbase': 333,
  35888. 'quotedblbase': 500,
  35889. 'quotedblright': 500,
  35890. 'guillemotright': 500,
  35891. 'ellipsis': 1000,
  35892. 'perthousand': 1000,
  35893. 'questiondown': 500,
  35894. 'grave': 333,
  35895. 'acute': 333,
  35896. 'circumflex': 333,
  35897. 'tilde': 333,
  35898. 'macron': 333,
  35899. 'breve': 333,
  35900. 'dotaccent': 333,
  35901. 'dieresis': 333,
  35902. 'ring': 333,
  35903. 'cedilla': 333,
  35904. 'hungarumlaut': 333,
  35905. 'ogonek': 333,
  35906. 'caron': 333,
  35907. 'emdash': 1000,
  35908. 'AE': 944,
  35909. 'ordfeminine': 266,
  35910. 'Lslash': 611,
  35911. 'Oslash': 722,
  35912. 'OE': 944,
  35913. 'ordmasculine': 300,
  35914. 'ae': 722,
  35915. 'dotlessi': 278,
  35916. 'lslash': 278,
  35917. 'oslash': 500,
  35918. 'oe': 722,
  35919. 'germandbls': 500,
  35920. 'Idieresis': 389,
  35921. 'eacute': 444,
  35922. 'abreve': 500,
  35923. 'uhungarumlaut': 556,
  35924. 'ecaron': 444,
  35925. 'Ydieresis': 611,
  35926. 'divide': 570,
  35927. 'Yacute': 611,
  35928. 'Acircumflex': 667,
  35929. 'aacute': 500,
  35930. 'Ucircumflex': 722,
  35931. 'yacute': 444,
  35932. 'scommaaccent': 389,
  35933. 'ecircumflex': 444,
  35934. 'Uring': 722,
  35935. 'Udieresis': 722,
  35936. 'aogonek': 500,
  35937. 'Uacute': 722,
  35938. 'uogonek': 556,
  35939. 'Edieresis': 667,
  35940. 'Dcroat': 722,
  35941. 'commaaccent': 250,
  35942. 'copyright': 747,
  35943. 'Emacron': 667,
  35944. 'ccaron': 444,
  35945. 'aring': 500,
  35946. 'Ncommaaccent': 722,
  35947. 'lacute': 278,
  35948. 'agrave': 500,
  35949. 'Tcommaaccent': 611,
  35950. 'Cacute': 667,
  35951. 'atilde': 500,
  35952. 'Edotaccent': 667,
  35953. 'scaron': 389,
  35954. 'scedilla': 389,
  35955. 'iacute': 278,
  35956. 'lozenge': 494,
  35957. 'Rcaron': 667,
  35958. 'Gcommaaccent': 722,
  35959. 'ucircumflex': 556,
  35960. 'acircumflex': 500,
  35961. 'Amacron': 667,
  35962. 'rcaron': 389,
  35963. 'ccedilla': 444,
  35964. 'Zdotaccent': 611,
  35965. 'Thorn': 611,
  35966. 'Omacron': 722,
  35967. 'Racute': 667,
  35968. 'Sacute': 556,
  35969. 'dcaron': 608,
  35970. 'Umacron': 722,
  35971. 'uring': 556,
  35972. 'threesuperior': 300,
  35973. 'Ograve': 722,
  35974. 'Agrave': 667,
  35975. 'Abreve': 667,
  35976. 'multiply': 570,
  35977. 'uacute': 556,
  35978. 'Tcaron': 611,
  35979. 'partialdiff': 494,
  35980. 'ydieresis': 444,
  35981. 'Nacute': 722,
  35982. 'icircumflex': 278,
  35983. 'Ecircumflex': 667,
  35984. 'adieresis': 500,
  35985. 'edieresis': 444,
  35986. 'cacute': 444,
  35987. 'nacute': 556,
  35988. 'umacron': 556,
  35989. 'Ncaron': 722,
  35990. 'Iacute': 389,
  35991. 'plusminus': 570,
  35992. 'brokenbar': 220,
  35993. 'registered': 747,
  35994. 'Gbreve': 722,
  35995. 'Idotaccent': 389,
  35996. 'summation': 600,
  35997. 'Egrave': 667,
  35998. 'racute': 389,
  35999. 'omacron': 500,
  36000. 'Zacute': 611,
  36001. 'Zcaron': 611,
  36002. 'greaterequal': 549,
  36003. 'Eth': 722,
  36004. 'Ccedilla': 667,
  36005. 'lcommaaccent': 278,
  36006. 'tcaron': 366,
  36007. 'eogonek': 444,
  36008. 'Uogonek': 722,
  36009. 'Aacute': 667,
  36010. 'Adieresis': 667,
  36011. 'egrave': 444,
  36012. 'zacute': 389,
  36013. 'iogonek': 278,
  36014. 'Oacute': 722,
  36015. 'oacute': 500,
  36016. 'amacron': 500,
  36017. 'sacute': 389,
  36018. 'idieresis': 278,
  36019. 'Ocircumflex': 722,
  36020. 'Ugrave': 722,
  36021. 'Delta': 612,
  36022. 'thorn': 500,
  36023. 'twosuperior': 300,
  36024. 'Odieresis': 722,
  36025. 'mu': 576,
  36026. 'igrave': 278,
  36027. 'ohungarumlaut': 500,
  36028. 'Eogonek': 667,
  36029. 'dcroat': 500,
  36030. 'threequarters': 750,
  36031. 'Scedilla': 556,
  36032. 'lcaron': 382,
  36033. 'Kcommaaccent': 667,
  36034. 'Lacute': 611,
  36035. 'trademark': 1000,
  36036. 'edotaccent': 444,
  36037. 'Igrave': 389,
  36038. 'Imacron': 389,
  36039. 'Lcaron': 611,
  36040. 'onehalf': 750,
  36041. 'lessequal': 549,
  36042. 'ocircumflex': 500,
  36043. 'ntilde': 556,
  36044. 'Uhungarumlaut': 722,
  36045. 'Eacute': 667,
  36046. 'emacron': 444,
  36047. 'gbreve': 500,
  36048. 'onequarter': 750,
  36049. 'Scaron': 556,
  36050. 'Scommaaccent': 556,
  36051. 'Ohungarumlaut': 722,
  36052. 'degree': 400,
  36053. 'ograve': 500,
  36054. 'Ccaron': 667,
  36055. 'ugrave': 556,
  36056. 'radical': 549,
  36057. 'Dcaron': 722,
  36058. 'rcommaaccent': 389,
  36059. 'Ntilde': 722,
  36060. 'otilde': 500,
  36061. 'Rcommaaccent': 667,
  36062. 'Lcommaaccent': 611,
  36063. 'Atilde': 667,
  36064. 'Aogonek': 667,
  36065. 'Aring': 667,
  36066. 'Otilde': 722,
  36067. 'zdotaccent': 389,
  36068. 'Ecaron': 667,
  36069. 'Iogonek': 389,
  36070. 'kcommaaccent': 500,
  36071. 'minus': 606,
  36072. 'Icircumflex': 389,
  36073. 'ncaron': 556,
  36074. 'tcommaaccent': 278,
  36075. 'logicalnot': 606,
  36076. 'odieresis': 500,
  36077. 'udieresis': 556,
  36078. 'notequal': 549,
  36079. 'gcommaaccent': 500,
  36080. 'eth': 500,
  36081. 'zcaron': 389,
  36082. 'ncommaaccent': 556,
  36083. 'onesuperior': 300,
  36084. 'imacron': 278,
  36085. 'Euro': 500
  36086. },
  36087. 'Times-Italic': {
  36088. 'space': 250,
  36089. 'exclam': 333,
  36090. 'quotedbl': 420,
  36091. 'numbersign': 500,
  36092. 'dollar': 500,
  36093. 'percent': 833,
  36094. 'ampersand': 778,
  36095. 'quoteright': 333,
  36096. 'parenleft': 333,
  36097. 'parenright': 333,
  36098. 'asterisk': 500,
  36099. 'plus': 675,
  36100. 'comma': 250,
  36101. 'hyphen': 333,
  36102. 'period': 250,
  36103. 'slash': 278,
  36104. 'zero': 500,
  36105. 'one': 500,
  36106. 'two': 500,
  36107. 'three': 500,
  36108. 'four': 500,
  36109. 'five': 500,
  36110. 'six': 500,
  36111. 'seven': 500,
  36112. 'eight': 500,
  36113. 'nine': 500,
  36114. 'colon': 333,
  36115. 'semicolon': 333,
  36116. 'less': 675,
  36117. 'equal': 675,
  36118. 'greater': 675,
  36119. 'question': 500,
  36120. 'at': 920,
  36121. 'A': 611,
  36122. 'B': 611,
  36123. 'C': 667,
  36124. 'D': 722,
  36125. 'E': 611,
  36126. 'F': 611,
  36127. 'G': 722,
  36128. 'H': 722,
  36129. 'I': 333,
  36130. 'J': 444,
  36131. 'K': 667,
  36132. 'L': 556,
  36133. 'M': 833,
  36134. 'N': 667,
  36135. 'O': 722,
  36136. 'P': 611,
  36137. 'Q': 722,
  36138. 'R': 611,
  36139. 'S': 500,
  36140. 'T': 556,
  36141. 'U': 722,
  36142. 'V': 611,
  36143. 'W': 833,
  36144. 'X': 611,
  36145. 'Y': 556,
  36146. 'Z': 556,
  36147. 'bracketleft': 389,
  36148. 'backslash': 278,
  36149. 'bracketright': 389,
  36150. 'asciicircum': 422,
  36151. 'underscore': 500,
  36152. 'quoteleft': 333,
  36153. 'a': 500,
  36154. 'b': 500,
  36155. 'c': 444,
  36156. 'd': 500,
  36157. 'e': 444,
  36158. 'f': 278,
  36159. 'g': 500,
  36160. 'h': 500,
  36161. 'i': 278,
  36162. 'j': 278,
  36163. 'k': 444,
  36164. 'l': 278,
  36165. 'm': 722,
  36166. 'n': 500,
  36167. 'o': 500,
  36168. 'p': 500,
  36169. 'q': 500,
  36170. 'r': 389,
  36171. 's': 389,
  36172. 't': 278,
  36173. 'u': 500,
  36174. 'v': 444,
  36175. 'w': 667,
  36176. 'x': 444,
  36177. 'y': 444,
  36178. 'z': 389,
  36179. 'braceleft': 400,
  36180. 'bar': 275,
  36181. 'braceright': 400,
  36182. 'asciitilde': 541,
  36183. 'exclamdown': 389,
  36184. 'cent': 500,
  36185. 'sterling': 500,
  36186. 'fraction': 167,
  36187. 'yen': 500,
  36188. 'florin': 500,
  36189. 'section': 500,
  36190. 'currency': 500,
  36191. 'quotesingle': 214,
  36192. 'quotedblleft': 556,
  36193. 'guillemotleft': 500,
  36194. 'guilsinglleft': 333,
  36195. 'guilsinglright': 333,
  36196. 'fi': 500,
  36197. 'fl': 500,
  36198. 'endash': 500,
  36199. 'dagger': 500,
  36200. 'daggerdbl': 500,
  36201. 'periodcentered': 250,
  36202. 'paragraph': 523,
  36203. 'bullet': 350,
  36204. 'quotesinglbase': 333,
  36205. 'quotedblbase': 556,
  36206. 'quotedblright': 556,
  36207. 'guillemotright': 500,
  36208. 'ellipsis': 889,
  36209. 'perthousand': 1000,
  36210. 'questiondown': 500,
  36211. 'grave': 333,
  36212. 'acute': 333,
  36213. 'circumflex': 333,
  36214. 'tilde': 333,
  36215. 'macron': 333,
  36216. 'breve': 333,
  36217. 'dotaccent': 333,
  36218. 'dieresis': 333,
  36219. 'ring': 333,
  36220. 'cedilla': 333,
  36221. 'hungarumlaut': 333,
  36222. 'ogonek': 333,
  36223. 'caron': 333,
  36224. 'emdash': 889,
  36225. 'AE': 889,
  36226. 'ordfeminine': 276,
  36227. 'Lslash': 556,
  36228. 'Oslash': 722,
  36229. 'OE': 944,
  36230. 'ordmasculine': 310,
  36231. 'ae': 667,
  36232. 'dotlessi': 278,
  36233. 'lslash': 278,
  36234. 'oslash': 500,
  36235. 'oe': 667,
  36236. 'germandbls': 500,
  36237. 'Idieresis': 333,
  36238. 'eacute': 444,
  36239. 'abreve': 500,
  36240. 'uhungarumlaut': 500,
  36241. 'ecaron': 444,
  36242. 'Ydieresis': 556,
  36243. 'divide': 675,
  36244. 'Yacute': 556,
  36245. 'Acircumflex': 611,
  36246. 'aacute': 500,
  36247. 'Ucircumflex': 722,
  36248. 'yacute': 444,
  36249. 'scommaaccent': 389,
  36250. 'ecircumflex': 444,
  36251. 'Uring': 722,
  36252. 'Udieresis': 722,
  36253. 'aogonek': 500,
  36254. 'Uacute': 722,
  36255. 'uogonek': 500,
  36256. 'Edieresis': 611,
  36257. 'Dcroat': 722,
  36258. 'commaaccent': 250,
  36259. 'copyright': 760,
  36260. 'Emacron': 611,
  36261. 'ccaron': 444,
  36262. 'aring': 500,
  36263. 'Ncommaaccent': 667,
  36264. 'lacute': 278,
  36265. 'agrave': 500,
  36266. 'Tcommaaccent': 556,
  36267. 'Cacute': 667,
  36268. 'atilde': 500,
  36269. 'Edotaccent': 611,
  36270. 'scaron': 389,
  36271. 'scedilla': 389,
  36272. 'iacute': 278,
  36273. 'lozenge': 471,
  36274. 'Rcaron': 611,
  36275. 'Gcommaaccent': 722,
  36276. 'ucircumflex': 500,
  36277. 'acircumflex': 500,
  36278. 'Amacron': 611,
  36279. 'rcaron': 389,
  36280. 'ccedilla': 444,
  36281. 'Zdotaccent': 556,
  36282. 'Thorn': 611,
  36283. 'Omacron': 722,
  36284. 'Racute': 611,
  36285. 'Sacute': 500,
  36286. 'dcaron': 544,
  36287. 'Umacron': 722,
  36288. 'uring': 500,
  36289. 'threesuperior': 300,
  36290. 'Ograve': 722,
  36291. 'Agrave': 611,
  36292. 'Abreve': 611,
  36293. 'multiply': 675,
  36294. 'uacute': 500,
  36295. 'Tcaron': 556,
  36296. 'partialdiff': 476,
  36297. 'ydieresis': 444,
  36298. 'Nacute': 667,
  36299. 'icircumflex': 278,
  36300. 'Ecircumflex': 611,
  36301. 'adieresis': 500,
  36302. 'edieresis': 444,
  36303. 'cacute': 444,
  36304. 'nacute': 500,
  36305. 'umacron': 500,
  36306. 'Ncaron': 667,
  36307. 'Iacute': 333,
  36308. 'plusminus': 675,
  36309. 'brokenbar': 275,
  36310. 'registered': 760,
  36311. 'Gbreve': 722,
  36312. 'Idotaccent': 333,
  36313. 'summation': 600,
  36314. 'Egrave': 611,
  36315. 'racute': 389,
  36316. 'omacron': 500,
  36317. 'Zacute': 556,
  36318. 'Zcaron': 556,
  36319. 'greaterequal': 549,
  36320. 'Eth': 722,
  36321. 'Ccedilla': 667,
  36322. 'lcommaaccent': 278,
  36323. 'tcaron': 300,
  36324. 'eogonek': 444,
  36325. 'Uogonek': 722,
  36326. 'Aacute': 611,
  36327. 'Adieresis': 611,
  36328. 'egrave': 444,
  36329. 'zacute': 389,
  36330. 'iogonek': 278,
  36331. 'Oacute': 722,
  36332. 'oacute': 500,
  36333. 'amacron': 500,
  36334. 'sacute': 389,
  36335. 'idieresis': 278,
  36336. 'Ocircumflex': 722,
  36337. 'Ugrave': 722,
  36338. 'Delta': 612,
  36339. 'thorn': 500,
  36340. 'twosuperior': 300,
  36341. 'Odieresis': 722,
  36342. 'mu': 500,
  36343. 'igrave': 278,
  36344. 'ohungarumlaut': 500,
  36345. 'Eogonek': 611,
  36346. 'dcroat': 500,
  36347. 'threequarters': 750,
  36348. 'Scedilla': 500,
  36349. 'lcaron': 300,
  36350. 'Kcommaaccent': 667,
  36351. 'Lacute': 556,
  36352. 'trademark': 980,
  36353. 'edotaccent': 444,
  36354. 'Igrave': 333,
  36355. 'Imacron': 333,
  36356. 'Lcaron': 611,
  36357. 'onehalf': 750,
  36358. 'lessequal': 549,
  36359. 'ocircumflex': 500,
  36360. 'ntilde': 500,
  36361. 'Uhungarumlaut': 722,
  36362. 'Eacute': 611,
  36363. 'emacron': 444,
  36364. 'gbreve': 500,
  36365. 'onequarter': 750,
  36366. 'Scaron': 500,
  36367. 'Scommaaccent': 500,
  36368. 'Ohungarumlaut': 722,
  36369. 'degree': 400,
  36370. 'ograve': 500,
  36371. 'Ccaron': 667,
  36372. 'ugrave': 500,
  36373. 'radical': 453,
  36374. 'Dcaron': 722,
  36375. 'rcommaaccent': 389,
  36376. 'Ntilde': 667,
  36377. 'otilde': 500,
  36378. 'Rcommaaccent': 611,
  36379. 'Lcommaaccent': 556,
  36380. 'Atilde': 611,
  36381. 'Aogonek': 611,
  36382. 'Aring': 611,
  36383. 'Otilde': 722,
  36384. 'zdotaccent': 389,
  36385. 'Ecaron': 611,
  36386. 'Iogonek': 333,
  36387. 'kcommaaccent': 444,
  36388. 'minus': 675,
  36389. 'Icircumflex': 333,
  36390. 'ncaron': 500,
  36391. 'tcommaaccent': 278,
  36392. 'logicalnot': 675,
  36393. 'odieresis': 500,
  36394. 'udieresis': 500,
  36395. 'notequal': 549,
  36396. 'gcommaaccent': 500,
  36397. 'eth': 500,
  36398. 'zcaron': 389,
  36399. 'ncommaaccent': 500,
  36400. 'onesuperior': 300,
  36401. 'imacron': 278,
  36402. 'Euro': 500
  36403. },
  36404. 'ZapfDingbats': {
  36405. 'space': 278,
  36406. 'a1': 974,
  36407. 'a2': 961,
  36408. 'a202': 974,
  36409. 'a3': 980,
  36410. 'a4': 719,
  36411. 'a5': 789,
  36412. 'a119': 790,
  36413. 'a118': 791,
  36414. 'a117': 690,
  36415. 'a11': 960,
  36416. 'a12': 939,
  36417. 'a13': 549,
  36418. 'a14': 855,
  36419. 'a15': 911,
  36420. 'a16': 933,
  36421. 'a105': 911,
  36422. 'a17': 945,
  36423. 'a18': 974,
  36424. 'a19': 755,
  36425. 'a20': 846,
  36426. 'a21': 762,
  36427. 'a22': 761,
  36428. 'a23': 571,
  36429. 'a24': 677,
  36430. 'a25': 763,
  36431. 'a26': 760,
  36432. 'a27': 759,
  36433. 'a28': 754,
  36434. 'a6': 494,
  36435. 'a7': 552,
  36436. 'a8': 537,
  36437. 'a9': 577,
  36438. 'a10': 692,
  36439. 'a29': 786,
  36440. 'a30': 788,
  36441. 'a31': 788,
  36442. 'a32': 790,
  36443. 'a33': 793,
  36444. 'a34': 794,
  36445. 'a35': 816,
  36446. 'a36': 823,
  36447. 'a37': 789,
  36448. 'a38': 841,
  36449. 'a39': 823,
  36450. 'a40': 833,
  36451. 'a41': 816,
  36452. 'a42': 831,
  36453. 'a43': 923,
  36454. 'a44': 744,
  36455. 'a45': 723,
  36456. 'a46': 749,
  36457. 'a47': 790,
  36458. 'a48': 792,
  36459. 'a49': 695,
  36460. 'a50': 776,
  36461. 'a51': 768,
  36462. 'a52': 792,
  36463. 'a53': 759,
  36464. 'a54': 707,
  36465. 'a55': 708,
  36466. 'a56': 682,
  36467. 'a57': 701,
  36468. 'a58': 826,
  36469. 'a59': 815,
  36470. 'a60': 789,
  36471. 'a61': 789,
  36472. 'a62': 707,
  36473. 'a63': 687,
  36474. 'a64': 696,
  36475. 'a65': 689,
  36476. 'a66': 786,
  36477. 'a67': 787,
  36478. 'a68': 713,
  36479. 'a69': 791,
  36480. 'a70': 785,
  36481. 'a71': 791,
  36482. 'a72': 873,
  36483. 'a73': 761,
  36484. 'a74': 762,
  36485. 'a203': 762,
  36486. 'a75': 759,
  36487. 'a204': 759,
  36488. 'a76': 892,
  36489. 'a77': 892,
  36490. 'a78': 788,
  36491. 'a79': 784,
  36492. 'a81': 438,
  36493. 'a82': 138,
  36494. 'a83': 277,
  36495. 'a84': 415,
  36496. 'a97': 392,
  36497. 'a98': 392,
  36498. 'a99': 668,
  36499. 'a100': 668,
  36500. 'a89': 390,
  36501. 'a90': 390,
  36502. 'a93': 317,
  36503. 'a94': 317,
  36504. 'a91': 276,
  36505. 'a92': 276,
  36506. 'a205': 509,
  36507. 'a85': 509,
  36508. 'a206': 410,
  36509. 'a86': 410,
  36510. 'a87': 234,
  36511. 'a88': 234,
  36512. 'a95': 334,
  36513. 'a96': 334,
  36514. 'a101': 732,
  36515. 'a102': 544,
  36516. 'a103': 544,
  36517. 'a104': 910,
  36518. 'a106': 667,
  36519. 'a107': 760,
  36520. 'a108': 760,
  36521. 'a112': 776,
  36522. 'a111': 595,
  36523. 'a110': 694,
  36524. 'a109': 626,
  36525. 'a120': 788,
  36526. 'a121': 788,
  36527. 'a122': 788,
  36528. 'a123': 788,
  36529. 'a124': 788,
  36530. 'a125': 788,
  36531. 'a126': 788,
  36532. 'a127': 788,
  36533. 'a128': 788,
  36534. 'a129': 788,
  36535. 'a130': 788,
  36536. 'a131': 788,
  36537. 'a132': 788,
  36538. 'a133': 788,
  36539. 'a134': 788,
  36540. 'a135': 788,
  36541. 'a136': 788,
  36542. 'a137': 788,
  36543. 'a138': 788,
  36544. 'a139': 788,
  36545. 'a140': 788,
  36546. 'a141': 788,
  36547. 'a142': 788,
  36548. 'a143': 788,
  36549. 'a144': 788,
  36550. 'a145': 788,
  36551. 'a146': 788,
  36552. 'a147': 788,
  36553. 'a148': 788,
  36554. 'a149': 788,
  36555. 'a150': 788,
  36556. 'a151': 788,
  36557. 'a152': 788,
  36558. 'a153': 788,
  36559. 'a154': 788,
  36560. 'a155': 788,
  36561. 'a156': 788,
  36562. 'a157': 788,
  36563. 'a158': 788,
  36564. 'a159': 788,
  36565. 'a160': 894,
  36566. 'a161': 838,
  36567. 'a163': 1016,
  36568. 'a164': 458,
  36569. 'a196': 748,
  36570. 'a165': 924,
  36571. 'a192': 748,
  36572. 'a166': 918,
  36573. 'a167': 927,
  36574. 'a168': 928,
  36575. 'a169': 928,
  36576. 'a170': 834,
  36577. 'a171': 873,
  36578. 'a172': 828,
  36579. 'a173': 924,
  36580. 'a162': 924,
  36581. 'a174': 917,
  36582. 'a175': 930,
  36583. 'a176': 931,
  36584. 'a177': 463,
  36585. 'a178': 883,
  36586. 'a179': 836,
  36587. 'a193': 836,
  36588. 'a180': 867,
  36589. 'a199': 867,
  36590. 'a181': 696,
  36591. 'a200': 696,
  36592. 'a182': 874,
  36593. 'a201': 874,
  36594. 'a183': 760,
  36595. 'a184': 946,
  36596. 'a197': 771,
  36597. 'a185': 865,
  36598. 'a194': 771,
  36599. 'a198': 888,
  36600. 'a186': 967,
  36601. 'a195': 888,
  36602. 'a187': 831,
  36603. 'a188': 873,
  36604. 'a189': 927,
  36605. 'a190': 970,
  36606. 'a191': 918
  36607. }
  36608. };
  36609. var EOF = {};
  36610. function isEOF(v) {
  36611. return (v === EOF);
  36612. }
  36613. var Parser = (function ParserClosure() {
  36614. function Parser(lexer, allowStreams, xref) {
  36615. this.lexer = lexer;
  36616. this.allowStreams = allowStreams;
  36617. this.xref = xref;
  36618. this.imageCache = {
  36619. length: 0,
  36620. adler32: 0,
  36621. stream: null
  36622. };
  36623. this.refill();
  36624. }
  36625. Parser.prototype = {
  36626. refill: function Parser_refill() {
  36627. this.buf1 = this.lexer.getObj();
  36628. this.buf2 = this.lexer.getObj();
  36629. },
  36630. shift: function Parser_shift() {
  36631. if (isCmd(this.buf2, 'ID')) {
  36632. this.buf1 = this.buf2;
  36633. this.buf2 = null;
  36634. } else {
  36635. this.buf1 = this.buf2;
  36636. this.buf2 = this.lexer.getObj();
  36637. }
  36638. },
  36639. getObj: function Parser_getObj(cipherTransform) {
  36640. var buf1 = this.buf1;
  36641. this.shift();
  36642. if (buf1 instanceof Cmd) {
  36643. switch (buf1.cmd) {
  36644. case 'BI': // inline image
  36645. return this.makeInlineImage(cipherTransform);
  36646. case '[': // array
  36647. var array = [];
  36648. while (!isCmd(this.buf1, ']') && !isEOF(this.buf1)) {
  36649. array.push(this.getObj(cipherTransform));
  36650. }
  36651. if (isEOF(this.buf1)) {
  36652. error('End of file inside array');
  36653. }
  36654. this.shift();
  36655. return array;
  36656. case '<<': // dictionary or stream
  36657. var dict = new Dict(this.xref);
  36658. while (!isCmd(this.buf1, '>>') && !isEOF(this.buf1)) {
  36659. if (!isName(this.buf1)) {
  36660. info('Malformed dictionary: key must be a name object');
  36661. this.shift();
  36662. continue;
  36663. }
  36664. var key = this.buf1.name;
  36665. this.shift();
  36666. if (isEOF(this.buf1)) {
  36667. break;
  36668. }
  36669. dict.set(key, this.getObj(cipherTransform));
  36670. }
  36671. if (isEOF(this.buf1)) {
  36672. error('End of file inside dictionary');
  36673. }
  36674. // Stream objects are not allowed inside content streams or
  36675. // object streams.
  36676. if (isCmd(this.buf2, 'stream')) {
  36677. return (this.allowStreams ?
  36678. this.makeStream(dict, cipherTransform) : dict);
  36679. }
  36680. this.shift();
  36681. return dict;
  36682. default: // simple object
  36683. return buf1;
  36684. }
  36685. }
  36686. if (isInt(buf1)) { // indirect reference or integer
  36687. var num = buf1;
  36688. if (isInt(this.buf1) && isCmd(this.buf2, 'R')) {
  36689. var ref = new Ref(num, this.buf1);
  36690. this.shift();
  36691. this.shift();
  36692. return ref;
  36693. }
  36694. return num;
  36695. }
  36696. if (isString(buf1)) { // string
  36697. var str = buf1;
  36698. if (cipherTransform) {
  36699. str = cipherTransform.decryptString(str);
  36700. }
  36701. return str;
  36702. }
  36703. // simple object
  36704. return buf1;
  36705. },
  36706. makeInlineImage: function Parser_makeInlineImage(cipherTransform) {
  36707. var lexer = this.lexer;
  36708. var stream = lexer.stream;
  36709. // parse dictionary
  36710. var dict = new Dict(null);
  36711. while (!isCmd(this.buf1, 'ID') && !isEOF(this.buf1)) {
  36712. if (!isName(this.buf1)) {
  36713. error('Dictionary key must be a name object');
  36714. }
  36715. var key = this.buf1.name;
  36716. this.shift();
  36717. if (isEOF(this.buf1)) {
  36718. break;
  36719. }
  36720. dict.set(key, this.getObj(cipherTransform));
  36721. }
  36722. // parse image stream
  36723. var startPos = stream.pos;
  36724. // searching for the /EI\s/
  36725. var state = 0, ch, i, ii;
  36726. while (state != 4 && (ch = stream.getByte()) !== -1) {
  36727. switch (ch | 0) {
  36728. case 0x20:
  36729. case 0x0D:
  36730. case 0x0A:
  36731. // let's check next five bytes to be ASCII... just be sure
  36732. var followingBytes = stream.peekBytes(5);
  36733. for (i = 0, ii = followingBytes.length; i < ii; i++) {
  36734. ch = followingBytes[i];
  36735. if (ch !== 0x0A && ch !== 0x0D && (ch < 0x20 || ch > 0x7F)) {
  36736. // not a LF, CR, SPACE or any visible ASCII character
  36737. state = 0;
  36738. break; // some binary stuff found, resetting the state
  36739. }
  36740. }
  36741. state = (state === 3 ? 4 : 0);
  36742. break;
  36743. case 0x45:
  36744. state = 2;
  36745. break;
  36746. case 0x49:
  36747. state = (state === 2 ? 3 : 0);
  36748. break;
  36749. default:
  36750. state = 0;
  36751. break;
  36752. }
  36753. }
  36754. var length = (stream.pos - 4) - startPos;
  36755. var imageStream = stream.makeSubStream(startPos, length, dict);
  36756. // trying to cache repeat images, first we are trying to "warm up" caching
  36757. // using length, then comparing adler32
  36758. var MAX_LENGTH_TO_CACHE = 1000;
  36759. var cacheImage = false, adler32;
  36760. if (length < MAX_LENGTH_TO_CACHE && this.imageCache.length === length) {
  36761. var imageBytes = imageStream.getBytes();
  36762. imageStream.reset();
  36763. var a = 1;
  36764. var b = 0;
  36765. for (i = 0, ii = imageBytes.length; i < ii; ++i) {
  36766. a = (a + (imageBytes[i] & 0xff)) % 65521;
  36767. b = (b + a) % 65521;
  36768. }
  36769. adler32 = (b << 16) | a;
  36770. if (this.imageCache.stream && this.imageCache.adler32 === adler32) {
  36771. this.buf2 = Cmd.get('EI');
  36772. this.shift();
  36773. this.imageCache.stream.reset();
  36774. return this.imageCache.stream;
  36775. }
  36776. cacheImage = true;
  36777. }
  36778. if (!cacheImage && !this.imageCache.stream) {
  36779. this.imageCache.length = length;
  36780. this.imageCache.stream = null;
  36781. }
  36782. if (cipherTransform) {
  36783. imageStream = cipherTransform.createStream(imageStream, length);
  36784. }
  36785. imageStream = this.filter(imageStream, dict, length);
  36786. imageStream.dict = dict;
  36787. if (cacheImage) {
  36788. imageStream.cacheKey = 'inline_' + length + '_' + adler32;
  36789. this.imageCache.adler32 = adler32;
  36790. this.imageCache.stream = imageStream;
  36791. }
  36792. this.buf2 = Cmd.get('EI');
  36793. this.shift();
  36794. return imageStream;
  36795. },
  36796. fetchIfRef: function Parser_fetchIfRef(obj) {
  36797. // not relying on the xref.fetchIfRef -- xref might not be set
  36798. return (isRef(obj) ? this.xref.fetch(obj) : obj);
  36799. },
  36800. makeStream: function Parser_makeStream(dict, cipherTransform) {
  36801. var lexer = this.lexer;
  36802. var stream = lexer.stream;
  36803. // get stream start position
  36804. lexer.skipToNextLine();
  36805. var pos = stream.pos - 1;
  36806. // get length
  36807. var length = this.fetchIfRef(dict.get('Length'));
  36808. if (!isInt(length)) {
  36809. info('Bad ' + length + ' attribute in stream');
  36810. length = 0;
  36811. }
  36812. // skip over the stream data
  36813. stream.pos = pos + length;
  36814. lexer.nextChar();
  36815. this.shift(); // '>>'
  36816. this.shift(); // 'stream'
  36817. if (!isCmd(this.buf1, 'endstream')) {
  36818. // bad stream length, scanning for endstream
  36819. stream.pos = pos;
  36820. var SCAN_BLOCK_SIZE = 2048;
  36821. var ENDSTREAM_SIGNATURE_LENGTH = 9;
  36822. var ENDSTREAM_SIGNATURE = [0x65, 0x6E, 0x64, 0x73, 0x74, 0x72, 0x65,
  36823. 0x61, 0x6D];
  36824. var skipped = 0, found = false, i, j;
  36825. while (stream.pos < stream.end) {
  36826. var scanBytes = stream.peekBytes(SCAN_BLOCK_SIZE);
  36827. var scanLength = scanBytes.length - ENDSTREAM_SIGNATURE_LENGTH;
  36828. found = false;
  36829. for (i = 0, j = 0; i < scanLength; i++) {
  36830. var b = scanBytes[i];
  36831. if (b !== ENDSTREAM_SIGNATURE[j]) {
  36832. i -= j;
  36833. j = 0;
  36834. } else {
  36835. j++;
  36836. if (j >= ENDSTREAM_SIGNATURE_LENGTH) {
  36837. i++;
  36838. found = true;
  36839. break;
  36840. }
  36841. }
  36842. }
  36843. if (found) {
  36844. skipped += i - ENDSTREAM_SIGNATURE_LENGTH;
  36845. stream.pos += i - ENDSTREAM_SIGNATURE_LENGTH;
  36846. break;
  36847. }
  36848. skipped += scanLength;
  36849. stream.pos += scanLength;
  36850. }
  36851. if (!found) {
  36852. error('Missing endstream');
  36853. }
  36854. length = skipped;
  36855. lexer.nextChar();
  36856. this.shift();
  36857. this.shift();
  36858. }
  36859. this.shift(); // 'endstream'
  36860. stream = stream.makeSubStream(pos, length, dict);
  36861. if (cipherTransform) {
  36862. stream = cipherTransform.createStream(stream, length);
  36863. }
  36864. stream = this.filter(stream, dict, length);
  36865. stream.dict = dict;
  36866. return stream;
  36867. },
  36868. filter: function Parser_filter(stream, dict, length) {
  36869. var filter = this.fetchIfRef(dict.get('Filter', 'F'));
  36870. var params = this.fetchIfRef(dict.get('DecodeParms', 'DP'));
  36871. if (isName(filter)) {
  36872. return this.makeFilter(stream, filter.name, length, params);
  36873. }
  36874. var maybeLength = length;
  36875. if (isArray(filter)) {
  36876. var filterArray = filter;
  36877. var paramsArray = params;
  36878. for (var i = 0, ii = filterArray.length; i < ii; ++i) {
  36879. filter = filterArray[i];
  36880. if (!isName(filter)) {
  36881. error('Bad filter name: ' + filter);
  36882. }
  36883. params = null;
  36884. if (isArray(paramsArray) && (i in paramsArray)) {
  36885. params = paramsArray[i];
  36886. }
  36887. stream = this.makeFilter(stream, filter.name, maybeLength, params);
  36888. // after the first stream the length variable is invalid
  36889. maybeLength = null;
  36890. }
  36891. }
  36892. return stream;
  36893. },
  36894. makeFilter: function Parser_makeFilter(stream, name, maybeLength, params) {
  36895. if (stream.dict.get('Length') === 0) {
  36896. return new NullStream(stream);
  36897. }
  36898. if (name == 'FlateDecode' || name == 'Fl') {
  36899. if (params) {
  36900. return new PredictorStream(new FlateStream(stream, maybeLength),
  36901. maybeLength, params);
  36902. }
  36903. return new FlateStream(stream, maybeLength);
  36904. }
  36905. if (name == 'LZWDecode' || name == 'LZW') {
  36906. var earlyChange = 1;
  36907. if (params) {
  36908. if (params.has('EarlyChange')) {
  36909. earlyChange = params.get('EarlyChange');
  36910. }
  36911. return new PredictorStream(
  36912. new LZWStream(stream, maybeLength, earlyChange),
  36913. maybeLength, params);
  36914. }
  36915. return new LZWStream(stream, maybeLength, earlyChange);
  36916. }
  36917. if (name == 'DCTDecode' || name == 'DCT') {
  36918. return new JpegStream(stream, maybeLength, stream.dict, this.xref);
  36919. }
  36920. if (name == 'JPXDecode' || name == 'JPX') {
  36921. return new JpxStream(stream, maybeLength, stream.dict);
  36922. }
  36923. if (name == 'ASCII85Decode' || name == 'A85') {
  36924. return new Ascii85Stream(stream, maybeLength);
  36925. }
  36926. if (name == 'ASCIIHexDecode' || name == 'AHx') {
  36927. return new AsciiHexStream(stream, maybeLength);
  36928. }
  36929. if (name == 'CCITTFaxDecode' || name == 'CCF') {
  36930. return new CCITTFaxStream(stream, maybeLength, params);
  36931. }
  36932. if (name == 'RunLengthDecode' || name == 'RL') {
  36933. return new RunLengthStream(stream, maybeLength);
  36934. }
  36935. if (name == 'JBIG2Decode') {
  36936. return new Jbig2Stream(stream, maybeLength, stream.dict);
  36937. }
  36938. warn('filter "' + name + '" not supported yet');
  36939. return stream;
  36940. }
  36941. };
  36942. return Parser;
  36943. })();
  36944. var Lexer = (function LexerClosure() {
  36945. function Lexer(stream, knownCommands) {
  36946. this.stream = stream;
  36947. this.nextChar();
  36948. // While lexing, we build up many strings one char at a time. Using += for
  36949. // this can result in lots of garbage strings. It's better to build an
  36950. // array of single-char strings and then join() them together at the end.
  36951. // And reusing a single array (i.e. |this.strBuf|) over and over for this
  36952. // purpose uses less memory than using a new array for each string.
  36953. this.strBuf = [];
  36954. // The PDFs might have "glued" commands with other commands, operands or
  36955. // literals, e.g. "q1". The knownCommands is a dictionary of the valid
  36956. // commands and their prefixes. The prefixes are built the following way:
  36957. // if there a command that is a prefix of the other valid command or
  36958. // literal (e.g. 'f' and 'false') the following prefixes must be included,
  36959. // 'fa', 'fal', 'fals'. The prefixes are not needed, if the command has no
  36960. // other commands or literals as a prefix. The knowCommands is optional.
  36961. this.knownCommands = knownCommands;
  36962. }
  36963. Lexer.isSpace = function Lexer_isSpace(ch) {
  36964. // Space is one of the following characters: SPACE, TAB, CR or LF.
  36965. return (ch === 0x20 || ch === 0x09 || ch === 0x0D || ch === 0x0A);
  36966. };
  36967. // A '1' in this array means the character is white space. A '1' or
  36968. // '2' means the character ends a name or command.
  36969. var specialChars = [
  36970. 1, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 0, 1, 1, 0, 0, // 0x
  36971. 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, // 1x
  36972. 1, 0, 0, 0, 0, 2, 0, 0, 2, 2, 0, 0, 0, 0, 0, 2, // 2x
  36973. 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 2, 0, 2, 0, // 3x
  36974. 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, // 4x
  36975. 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 2, 0, 2, 0, 0, // 5x
  36976. 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, // 6x
  36977. 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 2, 0, 2, 0, 0, // 7x
  36978. 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, // 8x
  36979. 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, // 9x
  36980. 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, // ax
  36981. 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, // bx
  36982. 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, // cx
  36983. 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, // dx
  36984. 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, // ex
  36985. 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 // fx
  36986. ];
  36987. function toHexDigit(ch) {
  36988. if (ch >= 0x30 && ch <= 0x39) { // '0'-'9'
  36989. return ch & 0x0F;
  36990. }
  36991. if ((ch >= 0x41 && ch <= 0x46) || (ch >= 0x61 && ch <= 0x66)) {
  36992. // 'A'-'F', 'a'-'f'
  36993. return (ch & 0x0F) + 9;
  36994. }
  36995. return -1;
  36996. }
  36997. Lexer.prototype = {
  36998. nextChar: function Lexer_nextChar() {
  36999. return (this.currentChar = this.stream.getByte());
  37000. },
  37001. peekChar: function Lexer_peekChar() {
  37002. return this.stream.peekBytes(1)[0];
  37003. },
  37004. getNumber: function Lexer_getNumber() {
  37005. var ch = this.currentChar;
  37006. var eNotation = false;
  37007. var divideBy = 0; // different from 0 if it's a floating point value
  37008. var sign = 1;
  37009. if (ch === 0x2D) { // '-'
  37010. sign = -1;
  37011. ch = this.nextChar();
  37012. } else if (ch === 0x2B) { // '+'
  37013. ch = this.nextChar();
  37014. }
  37015. if (ch === 0x2E) { // '.'
  37016. divideBy = 10;
  37017. ch = this.nextChar();
  37018. }
  37019. if (ch < 0x30 || ch > 0x39) { // '0' - '9'
  37020. error('Invalid number: ' + String.fromCharCode(ch));
  37021. return 0;
  37022. }
  37023. var baseValue = ch - 0x30; // '0'
  37024. var powerValue = 0;
  37025. var powerValueSign = 1;
  37026. while ((ch = this.nextChar()) >= 0) {
  37027. if (0x30 <= ch && ch <= 0x39) { // '0' - '9'
  37028. var currentDigit = ch - 0x30; // '0'
  37029. if (eNotation) { // We are after an 'e' or 'E'
  37030. powerValue = powerValue * 10 + currentDigit;
  37031. } else {
  37032. if (divideBy !== 0) { // We are after a point
  37033. divideBy *= 10;
  37034. }
  37035. baseValue = baseValue * 10 + currentDigit;
  37036. }
  37037. } else if (ch === 0x2E) { // '.'
  37038. if (divideBy === 0) {
  37039. divideBy = 1;
  37040. } else {
  37041. // A number can have only one '.'
  37042. break;
  37043. }
  37044. } else if (ch === 0x2D) { // '-'
  37045. // ignore minus signs in the middle of numbers to match
  37046. // Adobe's behavior
  37047. warn('Badly formated number');
  37048. } else if (ch === 0x45 || ch === 0x65) { // 'E', 'e'
  37049. // 'E' can be either a scientific notation or the beginning of a new
  37050. // operator
  37051. ch = this.peekChar();
  37052. if (ch === 0x2B || ch === 0x2D) { // '+', '-'
  37053. powerValueSign = (ch === 0x2D) ? -1 : 1;
  37054. this.nextChar(); // Consume the sign character
  37055. } else if (ch < 0x30 || ch > 0x39) { // '0' - '9'
  37056. // The 'E' must be the beginning of a new operator
  37057. break;
  37058. }
  37059. eNotation = true;
  37060. } else {
  37061. // the last character doesn't belong to us
  37062. break;
  37063. }
  37064. }
  37065. if (divideBy !== 0) {
  37066. baseValue /= divideBy;
  37067. }
  37068. if (eNotation) {
  37069. baseValue *= Math.pow(10, powerValueSign * powerValue);
  37070. }
  37071. return sign * baseValue;
  37072. },
  37073. getString: function Lexer_getString() {
  37074. var numParen = 1;
  37075. var done = false;
  37076. var strBuf = this.strBuf;
  37077. strBuf.length = 0;
  37078. var ch = this.nextChar();
  37079. while (true) {
  37080. var charBuffered = false;
  37081. switch (ch | 0) {
  37082. case -1:
  37083. warn('Unterminated string');
  37084. done = true;
  37085. break;
  37086. case 0x28: // '('
  37087. ++numParen;
  37088. strBuf.push('(');
  37089. break;
  37090. case 0x29: // ')'
  37091. if (--numParen === 0) {
  37092. this.nextChar(); // consume strings ')'
  37093. done = true;
  37094. } else {
  37095. strBuf.push(')');
  37096. }
  37097. break;
  37098. case 0x5C: // '\\'
  37099. ch = this.nextChar();
  37100. switch (ch) {
  37101. case -1:
  37102. warn('Unterminated string');
  37103. done = true;
  37104. break;
  37105. case 0x6E: // 'n'
  37106. strBuf.push('\n');
  37107. break;
  37108. case 0x72: // 'r'
  37109. strBuf.push('\r');
  37110. break;
  37111. case 0x74: // 't'
  37112. strBuf.push('\t');
  37113. break;
  37114. case 0x62: // 'b'
  37115. strBuf.push('\b');
  37116. break;
  37117. case 0x66: // 'f'
  37118. strBuf.push('\f');
  37119. break;
  37120. case 0x5C: // '\'
  37121. case 0x28: // '('
  37122. case 0x29: // ')'
  37123. strBuf.push(String.fromCharCode(ch));
  37124. break;
  37125. case 0x30: case 0x31: case 0x32: case 0x33: // '0'-'3'
  37126. case 0x34: case 0x35: case 0x36: case 0x37: // '4'-'7'
  37127. var x = ch & 0x0F;
  37128. ch = this.nextChar();
  37129. charBuffered = true;
  37130. if (ch >= 0x30 && ch <= 0x37) { // '0'-'7'
  37131. x = (x << 3) + (ch & 0x0F);
  37132. ch = this.nextChar();
  37133. if (ch >= 0x30 && ch <= 0x37) { // '0'-'7'
  37134. charBuffered = false;
  37135. x = (x << 3) + (ch & 0x0F);
  37136. }
  37137. }
  37138. strBuf.push(String.fromCharCode(x));
  37139. break;
  37140. case 0x0D: // CR
  37141. if (this.peekChar() === 0x0A) { // LF
  37142. this.nextChar();
  37143. }
  37144. break;
  37145. case 0x0A: // LF
  37146. break;
  37147. default:
  37148. strBuf.push(String.fromCharCode(ch));
  37149. break;
  37150. }
  37151. break;
  37152. default:
  37153. strBuf.push(String.fromCharCode(ch));
  37154. break;
  37155. }
  37156. if (done) {
  37157. break;
  37158. }
  37159. if (!charBuffered) {
  37160. ch = this.nextChar();
  37161. }
  37162. }
  37163. return strBuf.join('');
  37164. },
  37165. getName: function Lexer_getName() {
  37166. var ch;
  37167. var strBuf = this.strBuf;
  37168. strBuf.length = 0;
  37169. while ((ch = this.nextChar()) >= 0 && !specialChars[ch]) {
  37170. if (ch === 0x23) { // '#'
  37171. ch = this.nextChar();
  37172. var x = toHexDigit(ch);
  37173. if (x != -1) {
  37174. var x2 = toHexDigit(this.nextChar());
  37175. if (x2 === -1) {
  37176. error('Illegal digit in hex char in name: ' + x2);
  37177. }
  37178. strBuf.push(String.fromCharCode((x << 4) | x2));
  37179. } else {
  37180. strBuf.push('#', String.fromCharCode(ch));
  37181. }
  37182. } else {
  37183. strBuf.push(String.fromCharCode(ch));
  37184. }
  37185. }
  37186. if (strBuf.length > 128) {
  37187. error('Warning: name token is longer than allowed by the spec: ' +
  37188. strBuf.length);
  37189. }
  37190. return Name.get(strBuf.join(''));
  37191. },
  37192. getHexString: function Lexer_getHexString() {
  37193. var strBuf = this.strBuf;
  37194. strBuf.length = 0;
  37195. var ch = this.currentChar;
  37196. var isFirstHex = true;
  37197. var firstDigit;
  37198. var secondDigit;
  37199. while (true) {
  37200. if (ch < 0) {
  37201. warn('Unterminated hex string');
  37202. break;
  37203. } else if (ch === 0x3E) { // '>'
  37204. this.nextChar();
  37205. break;
  37206. } else if (specialChars[ch] === 1) {
  37207. ch = this.nextChar();
  37208. continue;
  37209. } else {
  37210. if (isFirstHex) {
  37211. firstDigit = toHexDigit(ch);
  37212. if (firstDigit === -1) {
  37213. warn('Ignoring invalid character "' + ch + '" in hex string');
  37214. ch = this.nextChar();
  37215. continue;
  37216. }
  37217. } else {
  37218. secondDigit = toHexDigit(ch);
  37219. if (secondDigit === -1) {
  37220. warn('Ignoring invalid character "' + ch + '" in hex string');
  37221. ch = this.nextChar();
  37222. continue;
  37223. }
  37224. strBuf.push(String.fromCharCode((firstDigit << 4) | secondDigit));
  37225. }
  37226. isFirstHex = !isFirstHex;
  37227. ch = this.nextChar();
  37228. }
  37229. }
  37230. return strBuf.join('');
  37231. },
  37232. getObj: function Lexer_getObj() {
  37233. // skip whitespace and comments
  37234. var comment = false;
  37235. var ch = this.currentChar;
  37236. while (true) {
  37237. if (ch < 0) {
  37238. return EOF;
  37239. }
  37240. if (comment) {
  37241. if (ch === 0x0A || ch === 0x0D) { // LF, CR
  37242. comment = false;
  37243. }
  37244. } else if (ch === 0x25) { // '%'
  37245. comment = true;
  37246. } else if (specialChars[ch] !== 1) {
  37247. break;
  37248. }
  37249. ch = this.nextChar();
  37250. }
  37251. // start reading token
  37252. switch (ch | 0) {
  37253. case 0x30: case 0x31: case 0x32: case 0x33: case 0x34: // '0'-'4'
  37254. case 0x35: case 0x36: case 0x37: case 0x38: case 0x39: // '5'-'9'
  37255. case 0x2B: case 0x2D: case 0x2E: // '+', '-', '.'
  37256. return this.getNumber();
  37257. case 0x28: // '('
  37258. return this.getString();
  37259. case 0x2F: // '/'
  37260. return this.getName();
  37261. // array punctuation
  37262. case 0x5B: // '['
  37263. this.nextChar();
  37264. return Cmd.get('[');
  37265. case 0x5D: // ']'
  37266. this.nextChar();
  37267. return Cmd.get(']');
  37268. // hex string or dict punctuation
  37269. case 0x3C: // '<'
  37270. ch = this.nextChar();
  37271. if (ch === 0x3C) {
  37272. // dict punctuation
  37273. this.nextChar();
  37274. return Cmd.get('<<');
  37275. }
  37276. return this.getHexString();
  37277. // dict punctuation
  37278. case 0x3E: // '>'
  37279. ch = this.nextChar();
  37280. if (ch === 0x3E) {
  37281. this.nextChar();
  37282. return Cmd.get('>>');
  37283. }
  37284. return Cmd.get('>');
  37285. case 0x7B: // '{'
  37286. this.nextChar();
  37287. return Cmd.get('{');
  37288. case 0x7D: // '}'
  37289. this.nextChar();
  37290. return Cmd.get('}');
  37291. case 0x29: // ')'
  37292. error('Illegal character: ' + ch);
  37293. break;
  37294. }
  37295. // command
  37296. var str = String.fromCharCode(ch);
  37297. var knownCommands = this.knownCommands;
  37298. var knownCommandFound = knownCommands && (str in knownCommands);
  37299. while ((ch = this.nextChar()) >= 0 && !specialChars[ch]) {
  37300. // stop if known command is found and next character does not make
  37301. // the str a command
  37302. var possibleCommand = str + String.fromCharCode(ch);
  37303. if (knownCommandFound && !(possibleCommand in knownCommands)) {
  37304. break;
  37305. }
  37306. if (str.length === 128) {
  37307. error('Command token too long: ' + str.length);
  37308. }
  37309. str = possibleCommand;
  37310. knownCommandFound = knownCommands && (str in knownCommands);
  37311. }
  37312. if (str === 'true') {
  37313. return true;
  37314. }
  37315. if (str === 'false') {
  37316. return false;
  37317. }
  37318. if (str === 'null') {
  37319. return null;
  37320. }
  37321. return Cmd.get(str);
  37322. },
  37323. skipToNextLine: function Lexer_skipToNextLine() {
  37324. var ch = this.currentChar;
  37325. while (ch >= 0) {
  37326. if (ch === 0x0D) { // CR
  37327. ch = this.nextChar();
  37328. if (ch === 0x0A) { // LF
  37329. this.nextChar();
  37330. }
  37331. break;
  37332. } else if (ch === 0x0A) { // LF
  37333. this.nextChar();
  37334. break;
  37335. }
  37336. ch = this.nextChar();
  37337. }
  37338. }
  37339. };
  37340. return Lexer;
  37341. })();
  37342. var Linearization = (function LinearizationClosure() {
  37343. function Linearization(stream) {
  37344. this.parser = new Parser(new Lexer(stream), false, null);
  37345. var obj1 = this.parser.getObj();
  37346. var obj2 = this.parser.getObj();
  37347. var obj3 = this.parser.getObj();
  37348. this.linDict = this.parser.getObj();
  37349. if (isInt(obj1) && isInt(obj2) && isCmd(obj3, 'obj') &&
  37350. isDict(this.linDict)) {
  37351. var obj = this.linDict.get('Linearized');
  37352. if (!(isNum(obj) && obj > 0)) {
  37353. this.linDict = null;
  37354. }
  37355. }
  37356. }
  37357. Linearization.prototype = {
  37358. getInt: function Linearization_getInt(name) {
  37359. var linDict = this.linDict;
  37360. var obj;
  37361. if (isDict(linDict) && isInt(obj = linDict.get(name)) && obj > 0) {
  37362. return obj;
  37363. }
  37364. error('"' + name + '" field in linearization table is invalid');
  37365. },
  37366. getHint: function Linearization_getHint(index) {
  37367. var linDict = this.linDict;
  37368. var obj1, obj2;
  37369. if (isDict(linDict) && isArray(obj1 = linDict.get('H')) &&
  37370. obj1.length >= 2 && isInt(obj2 = obj1[index]) && obj2 > 0) {
  37371. return obj2;
  37372. }
  37373. error('Hints table in linearization table is invalid: ' + index);
  37374. },
  37375. get length() {
  37376. if (!isDict(this.linDict)) {
  37377. return 0;
  37378. }
  37379. return this.getInt('L');
  37380. },
  37381. get hintsOffset() {
  37382. return this.getHint(0);
  37383. },
  37384. get hintsLength() {
  37385. return this.getHint(1);
  37386. },
  37387. get hintsOffset2() {
  37388. return this.getHint(2);
  37389. },
  37390. get hintsLenth2() {
  37391. return this.getHint(3);
  37392. },
  37393. get objectNumberFirst() {
  37394. return this.getInt('O');
  37395. },
  37396. get endFirst() {
  37397. return this.getInt('E');
  37398. },
  37399. get numPages() {
  37400. return this.getInt('N');
  37401. },
  37402. get mainXRefEntriesOffset() {
  37403. return this.getInt('T');
  37404. },
  37405. get pageFirst() {
  37406. return this.getInt('P');
  37407. }
  37408. };
  37409. return Linearization;
  37410. })();
  37411. var PostScriptParser = (function PostScriptParserClosure() {
  37412. function PostScriptParser(lexer) {
  37413. this.lexer = lexer;
  37414. this.operators = [];
  37415. this.token = null;
  37416. this.prev = null;
  37417. }
  37418. PostScriptParser.prototype = {
  37419. nextToken: function PostScriptParser_nextToken() {
  37420. this.prev = this.token;
  37421. this.token = this.lexer.getToken();
  37422. },
  37423. accept: function PostScriptParser_accept(type) {
  37424. if (this.token.type == type) {
  37425. this.nextToken();
  37426. return true;
  37427. }
  37428. return false;
  37429. },
  37430. expect: function PostScriptParser_expect(type) {
  37431. if (this.accept(type)) {
  37432. return true;
  37433. }
  37434. error('Unexpected symbol: found ' + this.token.type + ' expected ' +
  37435. type + '.');
  37436. },
  37437. parse: function PostScriptParser_parse() {
  37438. this.nextToken();
  37439. this.expect(PostScriptTokenTypes.LBRACE);
  37440. this.parseBlock();
  37441. this.expect(PostScriptTokenTypes.RBRACE);
  37442. return this.operators;
  37443. },
  37444. parseBlock: function PostScriptParser_parseBlock() {
  37445. while (true) {
  37446. if (this.accept(PostScriptTokenTypes.NUMBER)) {
  37447. this.operators.push(this.prev.value);
  37448. } else if (this.accept(PostScriptTokenTypes.OPERATOR)) {
  37449. this.operators.push(this.prev.value);
  37450. } else if (this.accept(PostScriptTokenTypes.LBRACE)) {
  37451. this.parseCondition();
  37452. } else {
  37453. return;
  37454. }
  37455. }
  37456. },
  37457. parseCondition: function PostScriptParser_parseCondition() {
  37458. // Add two place holders that will be updated later
  37459. var conditionLocation = this.operators.length;
  37460. this.operators.push(null, null);
  37461. this.parseBlock();
  37462. this.expect(PostScriptTokenTypes.RBRACE);
  37463. if (this.accept(PostScriptTokenTypes.IF)) {
  37464. // The true block is right after the 'if' so it just falls through on
  37465. // true else it jumps and skips the true block.
  37466. this.operators[conditionLocation] = this.operators.length;
  37467. this.operators[conditionLocation + 1] = 'jz';
  37468. } else if (this.accept(PostScriptTokenTypes.LBRACE)) {
  37469. var jumpLocation = this.operators.length;
  37470. this.operators.push(null, null);
  37471. var endOfTrue = this.operators.length;
  37472. this.parseBlock();
  37473. this.expect(PostScriptTokenTypes.RBRACE);
  37474. this.expect(PostScriptTokenTypes.IFELSE);
  37475. // The jump is added at the end of the true block to skip the false
  37476. // block.
  37477. this.operators[jumpLocation] = this.operators.length;
  37478. this.operators[jumpLocation + 1] = 'j';
  37479. this.operators[conditionLocation] = endOfTrue;
  37480. this.operators[conditionLocation + 1] = 'jz';
  37481. } else {
  37482. error('PS Function: error parsing conditional.');
  37483. }
  37484. }
  37485. };
  37486. return PostScriptParser;
  37487. })();
  37488. var PostScriptTokenTypes = {
  37489. LBRACE: 0,
  37490. RBRACE: 1,
  37491. NUMBER: 2,
  37492. OPERATOR: 3,
  37493. IF: 4,
  37494. IFELSE: 5
  37495. };
  37496. var PostScriptToken = (function PostScriptTokenClosure() {
  37497. function PostScriptToken(type, value) {
  37498. this.type = type;
  37499. this.value = value;
  37500. }
  37501. var opCache = {};
  37502. PostScriptToken.getOperator = function PostScriptToken_getOperator(op) {
  37503. var opValue = opCache[op];
  37504. if (opValue) {
  37505. return opValue;
  37506. }
  37507. return opCache[op] = new PostScriptToken(PostScriptTokenTypes.OPERATOR, op);
  37508. };
  37509. PostScriptToken.LBRACE = new PostScriptToken(PostScriptTokenTypes.LBRACE,
  37510. '{');
  37511. PostScriptToken.RBRACE = new PostScriptToken(PostScriptTokenTypes.RBRACE,
  37512. '}');
  37513. PostScriptToken.IF = new PostScriptToken(PostScriptTokenTypes.IF, 'IF');
  37514. PostScriptToken.IFELSE = new PostScriptToken(PostScriptTokenTypes.IFELSE,
  37515. 'IFELSE');
  37516. return PostScriptToken;
  37517. })();
  37518. var PostScriptLexer = (function PostScriptLexerClosure() {
  37519. function PostScriptLexer(stream) {
  37520. this.stream = stream;
  37521. this.nextChar();
  37522. }
  37523. PostScriptLexer.prototype = {
  37524. nextChar: function PostScriptLexer_nextChar() {
  37525. return (this.currentChar = this.stream.getByte());
  37526. },
  37527. getToken: function PostScriptLexer_getToken() {
  37528. var comment = false;
  37529. var ch = this.currentChar;
  37530. // skip comments
  37531. while (true) {
  37532. if (ch < 0) {
  37533. return EOF;
  37534. }
  37535. if (comment) {
  37536. if (ch === 0x0A || ch === 0x0D) {
  37537. comment = false;
  37538. }
  37539. } else if (ch == 0x25) { // '%'
  37540. comment = true;
  37541. } else if (!Lexer.isSpace(ch)) {
  37542. break;
  37543. }
  37544. ch = this.nextChar();
  37545. }
  37546. switch (ch | 0) {
  37547. case 0x30: case 0x31: case 0x32: case 0x33: case 0x34: // '0'-'4'
  37548. case 0x35: case 0x36: case 0x37: case 0x38: case 0x39: // '5'-'9'
  37549. case 0x2B: case 0x2D: case 0x2E: // '+', '-', '.'
  37550. return new PostScriptToken(PostScriptTokenTypes.NUMBER,
  37551. this.getNumber());
  37552. case 0x7B: // '{'
  37553. this.nextChar();
  37554. return PostScriptToken.LBRACE;
  37555. case 0x7D: // '}'
  37556. this.nextChar();
  37557. return PostScriptToken.RBRACE;
  37558. }
  37559. // operator
  37560. var str = String.fromCharCode(ch);
  37561. while ((ch = this.nextChar()) >= 0 && // and 'A'-'Z', 'a'-'z'
  37562. ((ch >= 0x41 && ch <= 0x5A) || (ch >= 0x61 && ch <= 0x7A))) {
  37563. str += String.fromCharCode(ch);
  37564. }
  37565. switch (str.toLowerCase()) {
  37566. case 'if':
  37567. return PostScriptToken.IF;
  37568. case 'ifelse':
  37569. return PostScriptToken.IFELSE;
  37570. default:
  37571. return PostScriptToken.getOperator(str);
  37572. }
  37573. },
  37574. getNumber: function PostScriptLexer_getNumber() {
  37575. var ch = this.currentChar;
  37576. var str = String.fromCharCode(ch);
  37577. while ((ch = this.nextChar()) >= 0) {
  37578. if ((ch >= 0x30 && ch <= 0x39) || // '0'-'9'
  37579. ch === 0x2D || ch === 0x2E) { // '-', '.'
  37580. str += String.fromCharCode(ch);
  37581. } else {
  37582. break;
  37583. }
  37584. }
  37585. var value = parseFloat(str);
  37586. if (isNaN(value)) {
  37587. error('Invalid floating point number: ' + value);
  37588. }
  37589. return value;
  37590. }
  37591. };
  37592. return PostScriptLexer;
  37593. })();
  37594. var Stream = (function StreamClosure() {
  37595. function Stream(arrayBuffer, start, length, dict) {
  37596. this.bytes = (arrayBuffer instanceof Uint8Array ?
  37597. arrayBuffer : new Uint8Array(arrayBuffer));
  37598. this.start = start || 0;
  37599. this.pos = this.start;
  37600. this.end = (start + length) || this.bytes.length;
  37601. this.dict = dict;
  37602. }
  37603. // required methods for a stream. if a particular stream does not
  37604. // implement these, an error should be thrown
  37605. Stream.prototype = {
  37606. get length() {
  37607. return this.end - this.start;
  37608. },
  37609. get isEmpty() {
  37610. return this.length === 0;
  37611. },
  37612. getByte: function Stream_getByte() {
  37613. if (this.pos >= this.end) {
  37614. return -1;
  37615. }
  37616. return this.bytes[this.pos++];
  37617. },
  37618. getUint16: function Stream_getUint16() {
  37619. var b0 = this.getByte();
  37620. var b1 = this.getByte();
  37621. return (b0 << 8) + b1;
  37622. },
  37623. getInt32: function Stream_getInt32() {
  37624. var b0 = this.getByte();
  37625. var b1 = this.getByte();
  37626. var b2 = this.getByte();
  37627. var b3 = this.getByte();
  37628. return (b0 << 24) + (b1 << 16) + (b2 << 8) + b3;
  37629. },
  37630. // returns subarray of original buffer
  37631. // should only be read
  37632. getBytes: function Stream_getBytes(length) {
  37633. var bytes = this.bytes;
  37634. var pos = this.pos;
  37635. var strEnd = this.end;
  37636. if (!length) {
  37637. return bytes.subarray(pos, strEnd);
  37638. }
  37639. var end = pos + length;
  37640. if (end > strEnd) {
  37641. end = strEnd;
  37642. }
  37643. this.pos = end;
  37644. return bytes.subarray(pos, end);
  37645. },
  37646. peekBytes: function Stream_peekBytes(length) {
  37647. var bytes = this.getBytes(length);
  37648. this.pos -= bytes.length;
  37649. return bytes;
  37650. },
  37651. skip: function Stream_skip(n) {
  37652. if (!n) {
  37653. n = 1;
  37654. }
  37655. this.pos += n;
  37656. },
  37657. reset: function Stream_reset() {
  37658. this.pos = this.start;
  37659. },
  37660. moveStart: function Stream_moveStart() {
  37661. this.start = this.pos;
  37662. },
  37663. makeSubStream: function Stream_makeSubStream(start, length, dict) {
  37664. return new Stream(this.bytes.buffer, start, length, dict);
  37665. },
  37666. isStream: true
  37667. };
  37668. return Stream;
  37669. })();
  37670. var StringStream = (function StringStreamClosure() {
  37671. function StringStream(str) {
  37672. var length = str.length;
  37673. var bytes = new Uint8Array(length);
  37674. for (var n = 0; n < length; ++n) {
  37675. bytes[n] = str.charCodeAt(n);
  37676. }
  37677. Stream.call(this, bytes);
  37678. }
  37679. StringStream.prototype = Stream.prototype;
  37680. return StringStream;
  37681. })();
  37682. // super class for the decoding streams
  37683. var DecodeStream = (function DecodeStreamClosure() {
  37684. function DecodeStream(maybeMinBufferLength) {
  37685. this.pos = 0;
  37686. this.bufferLength = 0;
  37687. this.eof = false;
  37688. this.buffer = null;
  37689. this.minBufferLength = 512;
  37690. if (maybeMinBufferLength) {
  37691. // Compute the first power of two that is as big as maybeMinBufferLength.
  37692. while (this.minBufferLength < maybeMinBufferLength) {
  37693. this.minBufferLength *= 2;
  37694. }
  37695. }
  37696. }
  37697. DecodeStream.prototype = {
  37698. get isEmpty() {
  37699. while (!this.eof && this.bufferLength === 0) {
  37700. this.readBlock();
  37701. }
  37702. return this.bufferLength === 0;
  37703. },
  37704. ensureBuffer: function DecodeStream_ensureBuffer(requested) {
  37705. var buffer = this.buffer;
  37706. var current;
  37707. if (buffer) {
  37708. current = buffer.byteLength;
  37709. if (requested <= current) {
  37710. return buffer;
  37711. }
  37712. } else {
  37713. current = 0;
  37714. }
  37715. var size = this.minBufferLength;
  37716. while (size < requested) {
  37717. size *= 2;
  37718. }
  37719. var buffer2 = new Uint8Array(size);
  37720. if (buffer) {
  37721. buffer2.set(buffer);
  37722. }
  37723. return (this.buffer = buffer2);
  37724. },
  37725. getByte: function DecodeStream_getByte() {
  37726. var pos = this.pos;
  37727. while (this.bufferLength <= pos) {
  37728. if (this.eof) {
  37729. return -1;
  37730. }
  37731. this.readBlock();
  37732. }
  37733. return this.buffer[this.pos++];
  37734. },
  37735. getUint16: function DecodeStream_getUint16() {
  37736. var b0 = this.getByte();
  37737. var b1 = this.getByte();
  37738. return (b0 << 8) + b1;
  37739. },
  37740. getInt32: function DecodeStream_getInt32() {
  37741. var b0 = this.getByte();
  37742. var b1 = this.getByte();
  37743. var b2 = this.getByte();
  37744. var b3 = this.getByte();
  37745. return (b0 << 24) + (b1 << 16) + (b2 << 8) + b3;
  37746. },
  37747. getBytes: function DecodeStream_getBytes(length) {
  37748. var end, pos = this.pos;
  37749. if (length) {
  37750. this.ensureBuffer(pos + length);
  37751. end = pos + length;
  37752. while (!this.eof && this.bufferLength < end) {
  37753. this.readBlock();
  37754. }
  37755. var bufEnd = this.bufferLength;
  37756. if (end > bufEnd) {
  37757. end = bufEnd;
  37758. }
  37759. } else {
  37760. while (!this.eof) {
  37761. this.readBlock();
  37762. }
  37763. end = this.bufferLength;
  37764. // checking if bufferLength is still 0 then
  37765. // the buffer has to be initialized
  37766. if (!end) {
  37767. this.buffer = new Uint8Array(0);
  37768. }
  37769. }
  37770. this.pos = end;
  37771. return this.buffer.subarray(pos, end);
  37772. },
  37773. peekBytes: function DecodeStream_peekBytes(length) {
  37774. var bytes = this.getBytes(length);
  37775. this.pos -= bytes.length;
  37776. return bytes;
  37777. },
  37778. makeSubStream: function DecodeStream_makeSubStream(start, length, dict) {
  37779. var end = start + length;
  37780. while (this.bufferLength <= end && !this.eof) {
  37781. this.readBlock();
  37782. }
  37783. return new Stream(this.buffer, start, length, dict);
  37784. },
  37785. skip: function DecodeStream_skip(n) {
  37786. if (!n) {
  37787. n = 1;
  37788. }
  37789. this.pos += n;
  37790. },
  37791. reset: function DecodeStream_reset() {
  37792. this.pos = 0;
  37793. },
  37794. getBaseStreams: function DecodeStream_getBaseStreams() {
  37795. if (this.str && this.str.getBaseStreams) {
  37796. return this.str.getBaseStreams();
  37797. }
  37798. return [];
  37799. }
  37800. };
  37801. return DecodeStream;
  37802. })();
  37803. var StreamsSequenceStream = (function StreamsSequenceStreamClosure() {
  37804. function StreamsSequenceStream(streams) {
  37805. this.streams = streams;
  37806. DecodeStream.call(this, /* maybeLength = */ null);
  37807. }
  37808. StreamsSequenceStream.prototype = Object.create(DecodeStream.prototype);
  37809. StreamsSequenceStream.prototype.readBlock =
  37810. function streamSequenceStreamReadBlock() {
  37811. var streams = this.streams;
  37812. if (streams.length === 0) {
  37813. this.eof = true;
  37814. return;
  37815. }
  37816. var stream = streams.shift();
  37817. var chunk = stream.getBytes();
  37818. var bufferLength = this.bufferLength;
  37819. var newLength = bufferLength + chunk.length;
  37820. var buffer = this.ensureBuffer(newLength);
  37821. buffer.set(chunk, bufferLength);
  37822. this.bufferLength = newLength;
  37823. };
  37824. StreamsSequenceStream.prototype.getBaseStreams =
  37825. function StreamsSequenceStream_getBaseStreams() {
  37826. var baseStreams = [];
  37827. for (var i = 0, ii = this.streams.length; i < ii; i++) {
  37828. var stream = this.streams[i];
  37829. if (stream.getBaseStreams) {
  37830. Util.concatenateToArray(baseStreams, stream.getBaseStreams());
  37831. }
  37832. }
  37833. return baseStreams;
  37834. };
  37835. return StreamsSequenceStream;
  37836. })();
  37837. var FlateStream = (function FlateStreamClosure() {
  37838. var codeLenCodeMap = new Uint32Array([
  37839. 16, 17, 18, 0, 8, 7, 9, 6, 10, 5, 11, 4, 12, 3, 13, 2, 14, 1, 15
  37840. ]);
  37841. var lengthDecode = new Uint32Array([
  37842. 0x00003, 0x00004, 0x00005, 0x00006, 0x00007, 0x00008, 0x00009, 0x0000a,
  37843. 0x1000b, 0x1000d, 0x1000f, 0x10011, 0x20013, 0x20017, 0x2001b, 0x2001f,
  37844. 0x30023, 0x3002b, 0x30033, 0x3003b, 0x40043, 0x40053, 0x40063, 0x40073,
  37845. 0x50083, 0x500a3, 0x500c3, 0x500e3, 0x00102, 0x00102, 0x00102
  37846. ]);
  37847. var distDecode = new Uint32Array([
  37848. 0x00001, 0x00002, 0x00003, 0x00004, 0x10005, 0x10007, 0x20009, 0x2000d,
  37849. 0x30011, 0x30019, 0x40021, 0x40031, 0x50041, 0x50061, 0x60081, 0x600c1,
  37850. 0x70101, 0x70181, 0x80201, 0x80301, 0x90401, 0x90601, 0xa0801, 0xa0c01,
  37851. 0xb1001, 0xb1801, 0xc2001, 0xc3001, 0xd4001, 0xd6001
  37852. ]);
  37853. var fixedLitCodeTab = [new Uint32Array([
  37854. 0x70100, 0x80050, 0x80010, 0x80118, 0x70110, 0x80070, 0x80030, 0x900c0,
  37855. 0x70108, 0x80060, 0x80020, 0x900a0, 0x80000, 0x80080, 0x80040, 0x900e0,
  37856. 0x70104, 0x80058, 0x80018, 0x90090, 0x70114, 0x80078, 0x80038, 0x900d0,
  37857. 0x7010c, 0x80068, 0x80028, 0x900b0, 0x80008, 0x80088, 0x80048, 0x900f0,
  37858. 0x70102, 0x80054, 0x80014, 0x8011c, 0x70112, 0x80074, 0x80034, 0x900c8,
  37859. 0x7010a, 0x80064, 0x80024, 0x900a8, 0x80004, 0x80084, 0x80044, 0x900e8,
  37860. 0x70106, 0x8005c, 0x8001c, 0x90098, 0x70116, 0x8007c, 0x8003c, 0x900d8,
  37861. 0x7010e, 0x8006c, 0x8002c, 0x900b8, 0x8000c, 0x8008c, 0x8004c, 0x900f8,
  37862. 0x70101, 0x80052, 0x80012, 0x8011a, 0x70111, 0x80072, 0x80032, 0x900c4,
  37863. 0x70109, 0x80062, 0x80022, 0x900a4, 0x80002, 0x80082, 0x80042, 0x900e4,
  37864. 0x70105, 0x8005a, 0x8001a, 0x90094, 0x70115, 0x8007a, 0x8003a, 0x900d4,
  37865. 0x7010d, 0x8006a, 0x8002a, 0x900b4, 0x8000a, 0x8008a, 0x8004a, 0x900f4,
  37866. 0x70103, 0x80056, 0x80016, 0x8011e, 0x70113, 0x80076, 0x80036, 0x900cc,
  37867. 0x7010b, 0x80066, 0x80026, 0x900ac, 0x80006, 0x80086, 0x80046, 0x900ec,
  37868. 0x70107, 0x8005e, 0x8001e, 0x9009c, 0x70117, 0x8007e, 0x8003e, 0x900dc,
  37869. 0x7010f, 0x8006e, 0x8002e, 0x900bc, 0x8000e, 0x8008e, 0x8004e, 0x900fc,
  37870. 0x70100, 0x80051, 0x80011, 0x80119, 0x70110, 0x80071, 0x80031, 0x900c2,
  37871. 0x70108, 0x80061, 0x80021, 0x900a2, 0x80001, 0x80081, 0x80041, 0x900e2,
  37872. 0x70104, 0x80059, 0x80019, 0x90092, 0x70114, 0x80079, 0x80039, 0x900d2,
  37873. 0x7010c, 0x80069, 0x80029, 0x900b2, 0x80009, 0x80089, 0x80049, 0x900f2,
  37874. 0x70102, 0x80055, 0x80015, 0x8011d, 0x70112, 0x80075, 0x80035, 0x900ca,
  37875. 0x7010a, 0x80065, 0x80025, 0x900aa, 0x80005, 0x80085, 0x80045, 0x900ea,
  37876. 0x70106, 0x8005d, 0x8001d, 0x9009a, 0x70116, 0x8007d, 0x8003d, 0x900da,
  37877. 0x7010e, 0x8006d, 0x8002d, 0x900ba, 0x8000d, 0x8008d, 0x8004d, 0x900fa,
  37878. 0x70101, 0x80053, 0x80013, 0x8011b, 0x70111, 0x80073, 0x80033, 0x900c6,
  37879. 0x70109, 0x80063, 0x80023, 0x900a6, 0x80003, 0x80083, 0x80043, 0x900e6,
  37880. 0x70105, 0x8005b, 0x8001b, 0x90096, 0x70115, 0x8007b, 0x8003b, 0x900d6,
  37881. 0x7010d, 0x8006b, 0x8002b, 0x900b6, 0x8000b, 0x8008b, 0x8004b, 0x900f6,
  37882. 0x70103, 0x80057, 0x80017, 0x8011f, 0x70113, 0x80077, 0x80037, 0x900ce,
  37883. 0x7010b, 0x80067, 0x80027, 0x900ae, 0x80007, 0x80087, 0x80047, 0x900ee,
  37884. 0x70107, 0x8005f, 0x8001f, 0x9009e, 0x70117, 0x8007f, 0x8003f, 0x900de,
  37885. 0x7010f, 0x8006f, 0x8002f, 0x900be, 0x8000f, 0x8008f, 0x8004f, 0x900fe,
  37886. 0x70100, 0x80050, 0x80010, 0x80118, 0x70110, 0x80070, 0x80030, 0x900c1,
  37887. 0x70108, 0x80060, 0x80020, 0x900a1, 0x80000, 0x80080, 0x80040, 0x900e1,
  37888. 0x70104, 0x80058, 0x80018, 0x90091, 0x70114, 0x80078, 0x80038, 0x900d1,
  37889. 0x7010c, 0x80068, 0x80028, 0x900b1, 0x80008, 0x80088, 0x80048, 0x900f1,
  37890. 0x70102, 0x80054, 0x80014, 0x8011c, 0x70112, 0x80074, 0x80034, 0x900c9,
  37891. 0x7010a, 0x80064, 0x80024, 0x900a9, 0x80004, 0x80084, 0x80044, 0x900e9,
  37892. 0x70106, 0x8005c, 0x8001c, 0x90099, 0x70116, 0x8007c, 0x8003c, 0x900d9,
  37893. 0x7010e, 0x8006c, 0x8002c, 0x900b9, 0x8000c, 0x8008c, 0x8004c, 0x900f9,
  37894. 0x70101, 0x80052, 0x80012, 0x8011a, 0x70111, 0x80072, 0x80032, 0x900c5,
  37895. 0x70109, 0x80062, 0x80022, 0x900a5, 0x80002, 0x80082, 0x80042, 0x900e5,
  37896. 0x70105, 0x8005a, 0x8001a, 0x90095, 0x70115, 0x8007a, 0x8003a, 0x900d5,
  37897. 0x7010d, 0x8006a, 0x8002a, 0x900b5, 0x8000a, 0x8008a, 0x8004a, 0x900f5,
  37898. 0x70103, 0x80056, 0x80016, 0x8011e, 0x70113, 0x80076, 0x80036, 0x900cd,
  37899. 0x7010b, 0x80066, 0x80026, 0x900ad, 0x80006, 0x80086, 0x80046, 0x900ed,
  37900. 0x70107, 0x8005e, 0x8001e, 0x9009d, 0x70117, 0x8007e, 0x8003e, 0x900dd,
  37901. 0x7010f, 0x8006e, 0x8002e, 0x900bd, 0x8000e, 0x8008e, 0x8004e, 0x900fd,
  37902. 0x70100, 0x80051, 0x80011, 0x80119, 0x70110, 0x80071, 0x80031, 0x900c3,
  37903. 0x70108, 0x80061, 0x80021, 0x900a3, 0x80001, 0x80081, 0x80041, 0x900e3,
  37904. 0x70104, 0x80059, 0x80019, 0x90093, 0x70114, 0x80079, 0x80039, 0x900d3,
  37905. 0x7010c, 0x80069, 0x80029, 0x900b3, 0x80009, 0x80089, 0x80049, 0x900f3,
  37906. 0x70102, 0x80055, 0x80015, 0x8011d, 0x70112, 0x80075, 0x80035, 0x900cb,
  37907. 0x7010a, 0x80065, 0x80025, 0x900ab, 0x80005, 0x80085, 0x80045, 0x900eb,
  37908. 0x70106, 0x8005d, 0x8001d, 0x9009b, 0x70116, 0x8007d, 0x8003d, 0x900db,
  37909. 0x7010e, 0x8006d, 0x8002d, 0x900bb, 0x8000d, 0x8008d, 0x8004d, 0x900fb,
  37910. 0x70101, 0x80053, 0x80013, 0x8011b, 0x70111, 0x80073, 0x80033, 0x900c7,
  37911. 0x70109, 0x80063, 0x80023, 0x900a7, 0x80003, 0x80083, 0x80043, 0x900e7,
  37912. 0x70105, 0x8005b, 0x8001b, 0x90097, 0x70115, 0x8007b, 0x8003b, 0x900d7,
  37913. 0x7010d, 0x8006b, 0x8002b, 0x900b7, 0x8000b, 0x8008b, 0x8004b, 0x900f7,
  37914. 0x70103, 0x80057, 0x80017, 0x8011f, 0x70113, 0x80077, 0x80037, 0x900cf,
  37915. 0x7010b, 0x80067, 0x80027, 0x900af, 0x80007, 0x80087, 0x80047, 0x900ef,
  37916. 0x70107, 0x8005f, 0x8001f, 0x9009f, 0x70117, 0x8007f, 0x8003f, 0x900df,
  37917. 0x7010f, 0x8006f, 0x8002f, 0x900bf, 0x8000f, 0x8008f, 0x8004f, 0x900ff
  37918. ]), 9];
  37919. var fixedDistCodeTab = [new Uint32Array([
  37920. 0x50000, 0x50010, 0x50008, 0x50018, 0x50004, 0x50014, 0x5000c, 0x5001c,
  37921. 0x50002, 0x50012, 0x5000a, 0x5001a, 0x50006, 0x50016, 0x5000e, 0x00000,
  37922. 0x50001, 0x50011, 0x50009, 0x50019, 0x50005, 0x50015, 0x5000d, 0x5001d,
  37923. 0x50003, 0x50013, 0x5000b, 0x5001b, 0x50007, 0x50017, 0x5000f, 0x00000
  37924. ]), 5];
  37925. function FlateStream(str, maybeLength) {
  37926. this.str = str;
  37927. this.dict = str.dict;
  37928. var cmf = str.getByte();
  37929. var flg = str.getByte();
  37930. if (cmf == -1 || flg == -1) {
  37931. error('Invalid header in flate stream: ' + cmf + ', ' + flg);
  37932. }
  37933. if ((cmf & 0x0f) != 0x08) {
  37934. error('Unknown compression method in flate stream: ' + cmf + ', ' + flg);
  37935. }
  37936. if ((((cmf << 8) + flg) % 31) !== 0) {
  37937. error('Bad FCHECK in flate stream: ' + cmf + ', ' + flg);
  37938. }
  37939. if (flg & 0x20) {
  37940. error('FDICT bit set in flate stream: ' + cmf + ', ' + flg);
  37941. }
  37942. this.codeSize = 0;
  37943. this.codeBuf = 0;
  37944. DecodeStream.call(this, maybeLength);
  37945. }
  37946. FlateStream.prototype = Object.create(DecodeStream.prototype);
  37947. FlateStream.prototype.getBits = function FlateStream_getBits(bits) {
  37948. var str = this.str;
  37949. var codeSize = this.codeSize;
  37950. var codeBuf = this.codeBuf;
  37951. var b;
  37952. while (codeSize < bits) {
  37953. if ((b = str.getByte()) === -1) {
  37954. error('Bad encoding in flate stream');
  37955. }
  37956. codeBuf |= b << codeSize;
  37957. codeSize += 8;
  37958. }
  37959. b = codeBuf & ((1 << bits) - 1);
  37960. this.codeBuf = codeBuf >> bits;
  37961. this.codeSize = codeSize -= bits;
  37962. return b;
  37963. };
  37964. FlateStream.prototype.getCode = function FlateStream_getCode(table) {
  37965. var str = this.str;
  37966. var codes = table[0];
  37967. var maxLen = table[1];
  37968. var codeSize = this.codeSize;
  37969. var codeBuf = this.codeBuf;
  37970. while (codeSize < maxLen) {
  37971. var b;
  37972. if ((b = str.getByte()) === -1) {
  37973. error('Bad encoding in flate stream');
  37974. }
  37975. codeBuf |= (b << codeSize);
  37976. codeSize += 8;
  37977. }
  37978. var code = codes[codeBuf & ((1 << maxLen) - 1)];
  37979. var codeLen = code >> 16;
  37980. var codeVal = code & 0xffff;
  37981. if (codeSize === 0 || codeSize < codeLen || codeLen === 0) {
  37982. error('Bad encoding in flate stream');
  37983. }
  37984. this.codeBuf = (codeBuf >> codeLen);
  37985. this.codeSize = (codeSize - codeLen);
  37986. return codeVal;
  37987. };
  37988. FlateStream.prototype.generateHuffmanTable =
  37989. function flateStreamGenerateHuffmanTable(lengths) {
  37990. var n = lengths.length;
  37991. // find max code length
  37992. var maxLen = 0;
  37993. var i;
  37994. for (i = 0; i < n; ++i) {
  37995. if (lengths[i] > maxLen) {
  37996. maxLen = lengths[i];
  37997. }
  37998. }
  37999. // build the table
  38000. var size = 1 << maxLen;
  38001. var codes = new Uint32Array(size);
  38002. for (var len = 1, code = 0, skip = 2;
  38003. len <= maxLen;
  38004. ++len, code <<= 1, skip <<= 1) {
  38005. for (var val = 0; val < n; ++val) {
  38006. if (lengths[val] == len) {
  38007. // bit-reverse the code
  38008. var code2 = 0;
  38009. var t = code;
  38010. for (i = 0; i < len; ++i) {
  38011. code2 = (code2 << 1) | (t & 1);
  38012. t >>= 1;
  38013. }
  38014. // fill the table entries
  38015. for (i = code2; i < size; i += skip) {
  38016. codes[i] = (len << 16) | val;
  38017. }
  38018. ++code;
  38019. }
  38020. }
  38021. }
  38022. return [codes, maxLen];
  38023. };
  38024. FlateStream.prototype.readBlock = function FlateStream_readBlock() {
  38025. var buffer, len;
  38026. var str = this.str;
  38027. // read block header
  38028. var hdr = this.getBits(3);
  38029. if (hdr & 1) {
  38030. this.eof = true;
  38031. }
  38032. hdr >>= 1;
  38033. if (hdr === 0) { // uncompressed block
  38034. var b;
  38035. if ((b = str.getByte()) === -1) {
  38036. error('Bad block header in flate stream');
  38037. }
  38038. var blockLen = b;
  38039. if ((b = str.getByte()) === -1) {
  38040. error('Bad block header in flate stream');
  38041. }
  38042. blockLen |= (b << 8);
  38043. if ((b = str.getByte()) === -1) {
  38044. error('Bad block header in flate stream');
  38045. }
  38046. var check = b;
  38047. if ((b = str.getByte()) === -1) {
  38048. error('Bad block header in flate stream');
  38049. }
  38050. check |= (b << 8);
  38051. if (check != (~blockLen & 0xffff) &&
  38052. (blockLen !== 0 || check !== 0)) {
  38053. // Ignoring error for bad "empty" block (see issue 1277)
  38054. error('Bad uncompressed block length in flate stream');
  38055. }
  38056. this.codeBuf = 0;
  38057. this.codeSize = 0;
  38058. var bufferLength = this.bufferLength;
  38059. buffer = this.ensureBuffer(bufferLength + blockLen);
  38060. var end = bufferLength + blockLen;
  38061. this.bufferLength = end;
  38062. if (blockLen === 0) {
  38063. if (str.peekBytes(1).length === 0) {
  38064. this.eof = true;
  38065. }
  38066. } else {
  38067. for (var n = bufferLength; n < end; ++n) {
  38068. if ((b = str.getByte()) === -1) {
  38069. this.eof = true;
  38070. break;
  38071. }
  38072. buffer[n] = b;
  38073. }
  38074. }
  38075. return;
  38076. }
  38077. var litCodeTable;
  38078. var distCodeTable;
  38079. if (hdr == 1) { // compressed block, fixed codes
  38080. litCodeTable = fixedLitCodeTab;
  38081. distCodeTable = fixedDistCodeTab;
  38082. } else if (hdr == 2) { // compressed block, dynamic codes
  38083. var numLitCodes = this.getBits(5) + 257;
  38084. var numDistCodes = this.getBits(5) + 1;
  38085. var numCodeLenCodes = this.getBits(4) + 4;
  38086. // build the code lengths code table
  38087. var codeLenCodeLengths = new Uint8Array(codeLenCodeMap.length);
  38088. var i;
  38089. for (i = 0; i < numCodeLenCodes; ++i) {
  38090. codeLenCodeLengths[codeLenCodeMap[i]] = this.getBits(3);
  38091. }
  38092. var codeLenCodeTab = this.generateHuffmanTable(codeLenCodeLengths);
  38093. // build the literal and distance code tables
  38094. len = 0;
  38095. i = 0;
  38096. var codes = numLitCodes + numDistCodes;
  38097. var codeLengths = new Uint8Array(codes);
  38098. var bitsLength, bitsOffset, what;
  38099. while (i < codes) {
  38100. var code = this.getCode(codeLenCodeTab);
  38101. if (code == 16) {
  38102. bitsLength = 2; bitsOffset = 3; what = len;
  38103. } else if (code == 17) {
  38104. bitsLength = 3; bitsOffset = 3; what = (len = 0);
  38105. } else if (code == 18) {
  38106. bitsLength = 7; bitsOffset = 11; what = (len = 0);
  38107. } else {
  38108. codeLengths[i++] = len = code;
  38109. continue;
  38110. }
  38111. var repeatLength = this.getBits(bitsLength) + bitsOffset;
  38112. while (repeatLength-- > 0) {
  38113. codeLengths[i++] = what;
  38114. }
  38115. }
  38116. litCodeTable =
  38117. this.generateHuffmanTable(codeLengths.subarray(0, numLitCodes));
  38118. distCodeTable =
  38119. this.generateHuffmanTable(codeLengths.subarray(numLitCodes, codes));
  38120. } else {
  38121. error('Unknown block type in flate stream');
  38122. }
  38123. buffer = this.buffer;
  38124. var limit = buffer ? buffer.length : 0;
  38125. var pos = this.bufferLength;
  38126. while (true) {
  38127. var code1 = this.getCode(litCodeTable);
  38128. if (code1 < 256) {
  38129. if (pos + 1 >= limit) {
  38130. buffer = this.ensureBuffer(pos + 1);
  38131. limit = buffer.length;
  38132. }
  38133. buffer[pos++] = code1;
  38134. continue;
  38135. }
  38136. if (code1 == 256) {
  38137. this.bufferLength = pos;
  38138. return;
  38139. }
  38140. code1 -= 257;
  38141. code1 = lengthDecode[code1];
  38142. var code2 = code1 >> 16;
  38143. if (code2 > 0) {
  38144. code2 = this.getBits(code2);
  38145. }
  38146. len = (code1 & 0xffff) + code2;
  38147. code1 = this.getCode(distCodeTable);
  38148. code1 = distDecode[code1];
  38149. code2 = code1 >> 16;
  38150. if (code2 > 0) {
  38151. code2 = this.getBits(code2);
  38152. }
  38153. var dist = (code1 & 0xffff) + code2;
  38154. if (pos + len >= limit) {
  38155. buffer = this.ensureBuffer(pos + len);
  38156. limit = buffer.length;
  38157. }
  38158. for (var k = 0; k < len; ++k, ++pos) {
  38159. buffer[pos] = buffer[pos - dist];
  38160. }
  38161. }
  38162. };
  38163. return FlateStream;
  38164. })();
  38165. var PredictorStream = (function PredictorStreamClosure() {
  38166. function PredictorStream(str, maybeLength, params) {
  38167. var predictor = this.predictor = params.get('Predictor') || 1;
  38168. if (predictor <= 1) {
  38169. return str; // no prediction
  38170. }
  38171. if (predictor !== 2 && (predictor < 10 || predictor > 15)) {
  38172. error('Unsupported predictor: ' + predictor);
  38173. }
  38174. if (predictor === 2) {
  38175. this.readBlock = this.readBlockTiff;
  38176. } else {
  38177. this.readBlock = this.readBlockPng;
  38178. }
  38179. this.str = str;
  38180. this.dict = str.dict;
  38181. var colors = this.colors = params.get('Colors') || 1;
  38182. var bits = this.bits = params.get('BitsPerComponent') || 8;
  38183. var columns = this.columns = params.get('Columns') || 1;
  38184. this.pixBytes = (colors * bits + 7) >> 3;
  38185. this.rowBytes = (columns * colors * bits + 7) >> 3;
  38186. DecodeStream.call(this, maybeLength);
  38187. return this;
  38188. }
  38189. PredictorStream.prototype = Object.create(DecodeStream.prototype);
  38190. PredictorStream.prototype.readBlockTiff =
  38191. function predictorStreamReadBlockTiff() {
  38192. var rowBytes = this.rowBytes;
  38193. var bufferLength = this.bufferLength;
  38194. var buffer = this.ensureBuffer(bufferLength + rowBytes);
  38195. var bits = this.bits;
  38196. var colors = this.colors;
  38197. var rawBytes = this.str.getBytes(rowBytes);
  38198. this.eof = !rawBytes.length;
  38199. if (this.eof) {
  38200. return;
  38201. }
  38202. var inbuf = 0, outbuf = 0;
  38203. var inbits = 0, outbits = 0;
  38204. var pos = bufferLength;
  38205. var i;
  38206. if (bits === 1) {
  38207. for (i = 0; i < rowBytes; ++i) {
  38208. var c = rawBytes[i];
  38209. inbuf = (inbuf << 8) | c;
  38210. // bitwise addition is exclusive or
  38211. // first shift inbuf and then add
  38212. buffer[pos++] = (c ^ (inbuf >> colors)) & 0xFF;
  38213. // truncate inbuf (assumes colors < 16)
  38214. inbuf &= 0xFFFF;
  38215. }
  38216. } else if (bits === 8) {
  38217. for (i = 0; i < colors; ++i) {
  38218. buffer[pos++] = rawBytes[i];
  38219. }
  38220. for (; i < rowBytes; ++i) {
  38221. buffer[pos] = buffer[pos - colors] + rawBytes[i];
  38222. pos++;
  38223. }
  38224. } else {
  38225. var compArray = new Uint8Array(colors + 1);
  38226. var bitMask = (1 << bits) - 1;
  38227. var j = 0, k = bufferLength;
  38228. var columns = this.columns;
  38229. for (i = 0; i < columns; ++i) {
  38230. for (var kk = 0; kk < colors; ++kk) {
  38231. if (inbits < bits) {
  38232. inbuf = (inbuf << 8) | (rawBytes[j++] & 0xFF);
  38233. inbits += 8;
  38234. }
  38235. compArray[kk] = (compArray[kk] +
  38236. (inbuf >> (inbits - bits))) & bitMask;
  38237. inbits -= bits;
  38238. outbuf = (outbuf << bits) | compArray[kk];
  38239. outbits += bits;
  38240. if (outbits >= 8) {
  38241. buffer[k++] = (outbuf >> (outbits - 8)) & 0xFF;
  38242. outbits -= 8;
  38243. }
  38244. }
  38245. }
  38246. if (outbits > 0) {
  38247. buffer[k++] = (outbuf << (8 - outbits)) +
  38248. (inbuf & ((1 << (8 - outbits)) - 1));
  38249. }
  38250. }
  38251. this.bufferLength += rowBytes;
  38252. };
  38253. PredictorStream.prototype.readBlockPng =
  38254. function predictorStreamReadBlockPng() {
  38255. var rowBytes = this.rowBytes;
  38256. var pixBytes = this.pixBytes;
  38257. var predictor = this.str.getByte();
  38258. var rawBytes = this.str.getBytes(rowBytes);
  38259. this.eof = !rawBytes.length;
  38260. if (this.eof) {
  38261. return;
  38262. }
  38263. var bufferLength = this.bufferLength;
  38264. var buffer = this.ensureBuffer(bufferLength + rowBytes);
  38265. var prevRow = buffer.subarray(bufferLength - rowBytes, bufferLength);
  38266. if (prevRow.length === 0) {
  38267. prevRow = new Uint8Array(rowBytes);
  38268. }
  38269. var i, j = bufferLength, up, c;
  38270. switch (predictor) {
  38271. case 0:
  38272. for (i = 0; i < rowBytes; ++i) {
  38273. buffer[j++] = rawBytes[i];
  38274. }
  38275. break;
  38276. case 1:
  38277. for (i = 0; i < pixBytes; ++i) {
  38278. buffer[j++] = rawBytes[i];
  38279. }
  38280. for (; i < rowBytes; ++i) {
  38281. buffer[j] = (buffer[j - pixBytes] + rawBytes[i]) & 0xFF;
  38282. j++;
  38283. }
  38284. break;
  38285. case 2:
  38286. for (i = 0; i < rowBytes; ++i) {
  38287. buffer[j++] = (prevRow[i] + rawBytes[i]) & 0xFF;
  38288. }
  38289. break;
  38290. case 3:
  38291. for (i = 0; i < pixBytes; ++i) {
  38292. buffer[j++] = (prevRow[i] >> 1) + rawBytes[i];
  38293. }
  38294. for (; i < rowBytes; ++i) {
  38295. buffer[j] = (((prevRow[i] + buffer[j - pixBytes]) >> 1) +
  38296. rawBytes[i]) & 0xFF;
  38297. j++;
  38298. }
  38299. break;
  38300. case 4:
  38301. // we need to save the up left pixels values. the simplest way
  38302. // is to create a new buffer
  38303. for (i = 0; i < pixBytes; ++i) {
  38304. up = prevRow[i];
  38305. c = rawBytes[i];
  38306. buffer[j++] = up + c;
  38307. }
  38308. for (; i < rowBytes; ++i) {
  38309. up = prevRow[i];
  38310. var upLeft = prevRow[i - pixBytes];
  38311. var left = buffer[j - pixBytes];
  38312. var p = left + up - upLeft;
  38313. var pa = p - left;
  38314. if (pa < 0) {
  38315. pa = -pa;
  38316. }
  38317. var pb = p - up;
  38318. if (pb < 0) {
  38319. pb = -pb;
  38320. }
  38321. var pc = p - upLeft;
  38322. if (pc < 0) {
  38323. pc = -pc;
  38324. }
  38325. c = rawBytes[i];
  38326. if (pa <= pb && pa <= pc) {
  38327. buffer[j++] = left + c;
  38328. } else if (pb <= pc) {
  38329. buffer[j++] = up + c;
  38330. } else {
  38331. buffer[j++] = upLeft + c;
  38332. }
  38333. }
  38334. break;
  38335. default:
  38336. error('Unsupported predictor: ' + predictor);
  38337. }
  38338. this.bufferLength += rowBytes;
  38339. };
  38340. return PredictorStream;
  38341. })();
  38342. /**
  38343. * Depending on the type of JPEG a JpegStream is handled in different ways. For
  38344. * JPEG's that are supported natively such as DeviceGray and DeviceRGB the image
  38345. * data is stored and then loaded by the browser. For unsupported JPEG's we use
  38346. * a library to decode these images and the stream behaves like all the other
  38347. * DecodeStreams.
  38348. */
  38349. var JpegStream = (function JpegStreamClosure() {
  38350. function JpegStream(stream, maybeLength, dict, xref) {
  38351. // TODO: per poppler, some images may have 'junk' before that
  38352. // need to be removed
  38353. this.stream = stream;
  38354. this.maybeLength = maybeLength;
  38355. this.dict = dict;
  38356. DecodeStream.call(this, maybeLength);
  38357. }
  38358. JpegStream.prototype = Object.create(DecodeStream.prototype);
  38359. Object.defineProperty(JpegStream.prototype, 'bytes', {
  38360. get: function JpegStream_bytes() {
  38361. // If this.maybeLength is null, we'll get the entire stream.
  38362. return shadow(this, 'bytes', this.stream.getBytes(this.maybeLength));
  38363. },
  38364. configurable: true
  38365. });
  38366. JpegStream.prototype.ensureBuffer = function JpegStream_ensureBuffer(req) {
  38367. if (this.bufferLength) {
  38368. return;
  38369. }
  38370. try {
  38371. var jpegImage = new JpegImage();
  38372. if (this.colorTransform != -1) {
  38373. jpegImage.colorTransform = this.colorTransform;
  38374. }
  38375. jpegImage.parse(this.bytes);
  38376. var data = jpegImage.getData(this.drawWidth, this.drawHeight,
  38377. /* forceRGBoutput = */true);
  38378. this.buffer = data;
  38379. this.bufferLength = data.length;
  38380. this.eof = true;
  38381. } catch (e) {
  38382. error('JPEG error: ' + e);
  38383. }
  38384. };
  38385. JpegStream.prototype.getBytes = function JpegStream_getBytes(length) {
  38386. this.ensureBuffer();
  38387. return this.buffer;
  38388. };
  38389. JpegStream.prototype.getIR = function JpegStream_getIR() {
  38390. return PDFJS.createObjectURL(this.bytes, 'image/jpeg');
  38391. };
  38392. /**
  38393. * Checks if the image can be decoded and displayed by the browser without any
  38394. * further processing such as color space conversions.
  38395. */
  38396. JpegStream.prototype.isNativelySupported =
  38397. function JpegStream_isNativelySupported(xref, res) {
  38398. var cs = ColorSpace.parse(this.dict.get('ColorSpace', 'CS'), xref, res);
  38399. return cs.name === 'DeviceGray' || cs.name === 'DeviceRGB';
  38400. };
  38401. /**
  38402. * Checks if the image can be decoded by the browser.
  38403. */
  38404. JpegStream.prototype.isNativelyDecodable =
  38405. function JpegStream_isNativelyDecodable(xref, res) {
  38406. var cs = ColorSpace.parse(this.dict.get('ColorSpace', 'CS'), xref, res);
  38407. var numComps = cs.numComps;
  38408. return numComps == 1 || numComps == 3;
  38409. };
  38410. return JpegStream;
  38411. })();
  38412. /**
  38413. * For JPEG 2000's we use a library to decode these images and
  38414. * the stream behaves like all the other DecodeStreams.
  38415. */
  38416. var JpxStream = (function JpxStreamClosure() {
  38417. function JpxStream(stream, maybeLength, dict) {
  38418. this.stream = stream;
  38419. this.maybeLength = maybeLength;
  38420. this.dict = dict;
  38421. DecodeStream.call(this, maybeLength);
  38422. }
  38423. JpxStream.prototype = Object.create(DecodeStream.prototype);
  38424. Object.defineProperty(JpxStream.prototype, 'bytes', {
  38425. get: function JpxStream_bytes() {
  38426. // If this.maybeLength is null, we'll get the entire stream.
  38427. return shadow(this, 'bytes', this.stream.getBytes(this.maybeLength));
  38428. },
  38429. configurable: true
  38430. });
  38431. JpxStream.prototype.ensureBuffer = function JpxStream_ensureBuffer(req) {
  38432. if (this.bufferLength) {
  38433. return;
  38434. }
  38435. var jpxImage = new JpxImage();
  38436. jpxImage.parse(this.bytes);
  38437. var width = jpxImage.width;
  38438. var height = jpxImage.height;
  38439. var componentsCount = jpxImage.componentsCount;
  38440. var tileCount = jpxImage.tiles.length;
  38441. if (tileCount === 1) {
  38442. this.buffer = jpxImage.tiles[0].items;
  38443. } else {
  38444. var data = new Uint8Array(width * height * componentsCount);
  38445. for (var k = 0; k < tileCount; k++) {
  38446. var tileComponents = jpxImage.tiles[k];
  38447. var tileWidth = tileComponents.width;
  38448. var tileHeight = tileComponents.height;
  38449. var tileLeft = tileComponents.left;
  38450. var tileTop = tileComponents.top;
  38451. var src = tileComponents.items;
  38452. var srcPosition = 0;
  38453. var dataPosition = (width * tileTop + tileLeft) * componentsCount;
  38454. var imgRowSize = width * componentsCount;
  38455. var tileRowSize = tileWidth * componentsCount;
  38456. for (var j = 0; j < tileHeight; j++) {
  38457. var rowBytes = src.subarray(srcPosition, srcPosition + tileRowSize);
  38458. data.set(rowBytes, dataPosition);
  38459. srcPosition += tileRowSize;
  38460. dataPosition += imgRowSize;
  38461. }
  38462. }
  38463. this.buffer = data;
  38464. }
  38465. this.bufferLength = this.buffer.length;
  38466. this.eof = true;
  38467. };
  38468. return JpxStream;
  38469. })();
  38470. /**
  38471. * For JBIG2's we use a library to decode these images and
  38472. * the stream behaves like all the other DecodeStreams.
  38473. */
  38474. var Jbig2Stream = (function Jbig2StreamClosure() {
  38475. function Jbig2Stream(stream, maybeLength, dict) {
  38476. this.stream = stream;
  38477. this.maybeLength = maybeLength;
  38478. this.dict = dict;
  38479. DecodeStream.call(this, maybeLength);
  38480. }
  38481. Jbig2Stream.prototype = Object.create(DecodeStream.prototype);
  38482. Object.defineProperty(Jbig2Stream.prototype, 'bytes', {
  38483. get: function Jbig2Stream_bytes() {
  38484. // If this.maybeLength is null, we'll get the entire stream.
  38485. return shadow(this, 'bytes', this.stream.getBytes(this.maybeLength));
  38486. },
  38487. configurable: true
  38488. });
  38489. Jbig2Stream.prototype.ensureBuffer = function Jbig2Stream_ensureBuffer(req) {
  38490. if (this.bufferLength) {
  38491. return;
  38492. }
  38493. var jbig2Image = new Jbig2Image();
  38494. var chunks = [], decodeParams = this.dict.get('DecodeParms');
  38495. // According to the PDF specification, DecodeParms can be either
  38496. // a dictionary, or an array whose elements are dictionaries.
  38497. if (isArray(decodeParams)) {
  38498. if (decodeParams.length > 1) {
  38499. warn('JBIG2 - \'DecodeParms\' array with multiple elements ' +
  38500. 'not supported.');
  38501. }
  38502. decodeParams = decodeParams[0];
  38503. }
  38504. if (decodeParams && decodeParams.has('JBIG2Globals')) {
  38505. var globalsStream = decodeParams.get('JBIG2Globals');
  38506. var globals = globalsStream.getBytes();
  38507. chunks.push({data: globals, start: 0, end: globals.length});
  38508. }
  38509. chunks.push({data: this.bytes, start: 0, end: this.bytes.length});
  38510. var data = jbig2Image.parseChunks(chunks);
  38511. var dataLength = data.length;
  38512. // JBIG2 had black as 1 and white as 0, inverting the colors
  38513. for (var i = 0; i < dataLength; i++) {
  38514. data[i] ^= 0xFF;
  38515. }
  38516. this.buffer = data;
  38517. this.bufferLength = dataLength;
  38518. this.eof = true;
  38519. };
  38520. return Jbig2Stream;
  38521. })();
  38522. var DecryptStream = (function DecryptStreamClosure() {
  38523. function DecryptStream(str, maybeLength, decrypt) {
  38524. this.str = str;
  38525. this.dict = str.dict;
  38526. this.decrypt = decrypt;
  38527. this.nextChunk = null;
  38528. this.initialized = false;
  38529. DecodeStream.call(this, maybeLength);
  38530. }
  38531. var chunkSize = 512;
  38532. DecryptStream.prototype = Object.create(DecodeStream.prototype);
  38533. DecryptStream.prototype.readBlock = function DecryptStream_readBlock() {
  38534. var chunk;
  38535. if (this.initialized) {
  38536. chunk = this.nextChunk;
  38537. } else {
  38538. chunk = this.str.getBytes(chunkSize);
  38539. this.initialized = true;
  38540. }
  38541. if (!chunk || chunk.length === 0) {
  38542. this.eof = true;
  38543. return;
  38544. }
  38545. this.nextChunk = this.str.getBytes(chunkSize);
  38546. var hasMoreData = this.nextChunk && this.nextChunk.length > 0;
  38547. var decrypt = this.decrypt;
  38548. chunk = decrypt(chunk, !hasMoreData);
  38549. var bufferLength = this.bufferLength;
  38550. var i, n = chunk.length;
  38551. var buffer = this.ensureBuffer(bufferLength + n);
  38552. for (i = 0; i < n; i++) {
  38553. buffer[bufferLength++] = chunk[i];
  38554. }
  38555. this.bufferLength = bufferLength;
  38556. };
  38557. return DecryptStream;
  38558. })();
  38559. var Ascii85Stream = (function Ascii85StreamClosure() {
  38560. function Ascii85Stream(str, maybeLength) {
  38561. this.str = str;
  38562. this.dict = str.dict;
  38563. this.input = new Uint8Array(5);
  38564. // Most streams increase in size when decoded, but Ascii85 streams
  38565. // typically shrink by ~20%.
  38566. if (maybeLength) {
  38567. maybeLength = 0.8 * maybeLength;
  38568. }
  38569. DecodeStream.call(this, maybeLength);
  38570. }
  38571. Ascii85Stream.prototype = Object.create(DecodeStream.prototype);
  38572. Ascii85Stream.prototype.readBlock = function Ascii85Stream_readBlock() {
  38573. var TILDA_CHAR = 0x7E; // '~'
  38574. var Z_LOWER_CHAR = 0x7A; // 'z'
  38575. var EOF = -1;
  38576. var str = this.str;
  38577. var c = str.getByte();
  38578. while (Lexer.isSpace(c)) {
  38579. c = str.getByte();
  38580. }
  38581. if (c === EOF || c === TILDA_CHAR) {
  38582. this.eof = true;
  38583. return;
  38584. }
  38585. var bufferLength = this.bufferLength, buffer;
  38586. var i;
  38587. // special code for z
  38588. if (c == Z_LOWER_CHAR) {
  38589. buffer = this.ensureBuffer(bufferLength + 4);
  38590. for (i = 0; i < 4; ++i) {
  38591. buffer[bufferLength + i] = 0;
  38592. }
  38593. this.bufferLength += 4;
  38594. } else {
  38595. var input = this.input;
  38596. input[0] = c;
  38597. for (i = 1; i < 5; ++i) {
  38598. c = str.getByte();
  38599. while (Lexer.isSpace(c)) {
  38600. c = str.getByte();
  38601. }
  38602. input[i] = c;
  38603. if (c === EOF || c == TILDA_CHAR) {
  38604. break;
  38605. }
  38606. }
  38607. buffer = this.ensureBuffer(bufferLength + i - 1);
  38608. this.bufferLength += i - 1;
  38609. // partial ending;
  38610. if (i < 5) {
  38611. for (; i < 5; ++i) {
  38612. input[i] = 0x21 + 84;
  38613. }
  38614. this.eof = true;
  38615. }
  38616. var t = 0;
  38617. for (i = 0; i < 5; ++i) {
  38618. t = t * 85 + (input[i] - 0x21);
  38619. }
  38620. for (i = 3; i >= 0; --i) {
  38621. buffer[bufferLength + i] = t & 0xFF;
  38622. t >>= 8;
  38623. }
  38624. }
  38625. };
  38626. return Ascii85Stream;
  38627. })();
  38628. var AsciiHexStream = (function AsciiHexStreamClosure() {
  38629. function AsciiHexStream(str, maybeLength) {
  38630. this.str = str;
  38631. this.dict = str.dict;
  38632. this.firstDigit = -1;
  38633. // Most streams increase in size when decoded, but AsciiHex streams shrink
  38634. // by 50%.
  38635. if (maybeLength) {
  38636. maybeLength = 0.5 * maybeLength;
  38637. }
  38638. DecodeStream.call(this, maybeLength);
  38639. }
  38640. AsciiHexStream.prototype = Object.create(DecodeStream.prototype);
  38641. AsciiHexStream.prototype.readBlock = function AsciiHexStream_readBlock() {
  38642. var UPSTREAM_BLOCK_SIZE = 8000;
  38643. var bytes = this.str.getBytes(UPSTREAM_BLOCK_SIZE);
  38644. if (!bytes.length) {
  38645. this.eof = true;
  38646. return;
  38647. }
  38648. var maxDecodeLength = (bytes.length + 1) >> 1;
  38649. var buffer = this.ensureBuffer(this.bufferLength + maxDecodeLength);
  38650. var bufferLength = this.bufferLength;
  38651. var firstDigit = this.firstDigit;
  38652. for (var i = 0, ii = bytes.length; i < ii; i++) {
  38653. var ch = bytes[i], digit;
  38654. if (ch >= 0x30 && ch <= 0x39) { // '0'-'9'
  38655. digit = ch & 0x0F;
  38656. } else if ((ch >= 0x41 && ch <= 0x46) || (ch >= 0x61 && ch <= 0x66)) {
  38657. // 'A'-'Z', 'a'-'z'
  38658. digit = (ch & 0x0F) + 9;
  38659. } else if (ch === 0x3E) { // '>'
  38660. this.eof = true;
  38661. break;
  38662. } else { // probably whitespace
  38663. continue; // ignoring
  38664. }
  38665. if (firstDigit < 0) {
  38666. firstDigit = digit;
  38667. } else {
  38668. buffer[bufferLength++] = (firstDigit << 4) | digit;
  38669. firstDigit = -1;
  38670. }
  38671. }
  38672. if (firstDigit >= 0 && this.eof) {
  38673. // incomplete byte
  38674. buffer[bufferLength++] = (firstDigit << 4);
  38675. firstDigit = -1;
  38676. }
  38677. this.firstDigit = firstDigit;
  38678. this.bufferLength = bufferLength;
  38679. };
  38680. return AsciiHexStream;
  38681. })();
  38682. var RunLengthStream = (function RunLengthStreamClosure() {
  38683. function RunLengthStream(str, maybeLength) {
  38684. this.str = str;
  38685. this.dict = str.dict;
  38686. DecodeStream.call(this, maybeLength);
  38687. }
  38688. RunLengthStream.prototype = Object.create(DecodeStream.prototype);
  38689. RunLengthStream.prototype.readBlock = function RunLengthStream_readBlock() {
  38690. // The repeatHeader has following format. The first byte defines type of run
  38691. // and amount of bytes to repeat/copy: n = 0 through 127 - copy next n bytes
  38692. // (in addition to the second byte from the header), n = 129 through 255 -
  38693. // duplicate the second byte from the header (257 - n) times, n = 128 - end.
  38694. var repeatHeader = this.str.getBytes(2);
  38695. if (!repeatHeader || repeatHeader.length < 2 || repeatHeader[0] == 128) {
  38696. this.eof = true;
  38697. return;
  38698. }
  38699. var buffer;
  38700. var bufferLength = this.bufferLength;
  38701. var n = repeatHeader[0];
  38702. if (n < 128) {
  38703. // copy n bytes
  38704. buffer = this.ensureBuffer(bufferLength + n + 1);
  38705. buffer[bufferLength++] = repeatHeader[1];
  38706. if (n > 0) {
  38707. var source = this.str.getBytes(n);
  38708. buffer.set(source, bufferLength);
  38709. bufferLength += n;
  38710. }
  38711. } else {
  38712. n = 257 - n;
  38713. var b = repeatHeader[1];
  38714. buffer = this.ensureBuffer(bufferLength + n + 1);
  38715. for (var i = 0; i < n; i++) {
  38716. buffer[bufferLength++] = b;
  38717. }
  38718. }
  38719. this.bufferLength = bufferLength;
  38720. };
  38721. return RunLengthStream;
  38722. })();
  38723. var CCITTFaxStream = (function CCITTFaxStreamClosure() {
  38724. var ccittEOL = -2;
  38725. var twoDimPass = 0;
  38726. var twoDimHoriz = 1;
  38727. var twoDimVert0 = 2;
  38728. var twoDimVertR1 = 3;
  38729. var twoDimVertL1 = 4;
  38730. var twoDimVertR2 = 5;
  38731. var twoDimVertL2 = 6;
  38732. var twoDimVertR3 = 7;
  38733. var twoDimVertL3 = 8;
  38734. var twoDimTable = [
  38735. [-1, -1], [-1, -1], // 000000x
  38736. [7, twoDimVertL3], // 0000010
  38737. [7, twoDimVertR3], // 0000011
  38738. [6, twoDimVertL2], [6, twoDimVertL2], // 000010x
  38739. [6, twoDimVertR2], [6, twoDimVertR2], // 000011x
  38740. [4, twoDimPass], [4, twoDimPass], // 0001xxx
  38741. [4, twoDimPass], [4, twoDimPass],
  38742. [4, twoDimPass], [4, twoDimPass],
  38743. [4, twoDimPass], [4, twoDimPass],
  38744. [3, twoDimHoriz], [3, twoDimHoriz], // 001xxxx
  38745. [3, twoDimHoriz], [3, twoDimHoriz],
  38746. [3, twoDimHoriz], [3, twoDimHoriz],
  38747. [3, twoDimHoriz], [3, twoDimHoriz],
  38748. [3, twoDimHoriz], [3, twoDimHoriz],
  38749. [3, twoDimHoriz], [3, twoDimHoriz],
  38750. [3, twoDimHoriz], [3, twoDimHoriz],
  38751. [3, twoDimHoriz], [3, twoDimHoriz],
  38752. [3, twoDimVertL1], [3, twoDimVertL1], // 010xxxx
  38753. [3, twoDimVertL1], [3, twoDimVertL1],
  38754. [3, twoDimVertL1], [3, twoDimVertL1],
  38755. [3, twoDimVertL1], [3, twoDimVertL1],
  38756. [3, twoDimVertL1], [3, twoDimVertL1],
  38757. [3, twoDimVertL1], [3, twoDimVertL1],
  38758. [3, twoDimVertL1], [3, twoDimVertL1],
  38759. [3, twoDimVertL1], [3, twoDimVertL1],
  38760. [3, twoDimVertR1], [3, twoDimVertR1], // 011xxxx
  38761. [3, twoDimVertR1], [3, twoDimVertR1],
  38762. [3, twoDimVertR1], [3, twoDimVertR1],
  38763. [3, twoDimVertR1], [3, twoDimVertR1],
  38764. [3, twoDimVertR1], [3, twoDimVertR1],
  38765. [3, twoDimVertR1], [3, twoDimVertR1],
  38766. [3, twoDimVertR1], [3, twoDimVertR1],
  38767. [3, twoDimVertR1], [3, twoDimVertR1],
  38768. [1, twoDimVert0], [1, twoDimVert0], // 1xxxxxx
  38769. [1, twoDimVert0], [1, twoDimVert0],
  38770. [1, twoDimVert0], [1, twoDimVert0],
  38771. [1, twoDimVert0], [1, twoDimVert0],
  38772. [1, twoDimVert0], [1, twoDimVert0],
  38773. [1, twoDimVert0], [1, twoDimVert0],
  38774. [1, twoDimVert0], [1, twoDimVert0],
  38775. [1, twoDimVert0], [1, twoDimVert0],
  38776. [1, twoDimVert0], [1, twoDimVert0],
  38777. [1, twoDimVert0], [1, twoDimVert0],
  38778. [1, twoDimVert0], [1, twoDimVert0],
  38779. [1, twoDimVert0], [1, twoDimVert0],
  38780. [1, twoDimVert0], [1, twoDimVert0],
  38781. [1, twoDimVert0], [1, twoDimVert0],
  38782. [1, twoDimVert0], [1, twoDimVert0],
  38783. [1, twoDimVert0], [1, twoDimVert0],
  38784. [1, twoDimVert0], [1, twoDimVert0],
  38785. [1, twoDimVert0], [1, twoDimVert0],
  38786. [1, twoDimVert0], [1, twoDimVert0],
  38787. [1, twoDimVert0], [1, twoDimVert0],
  38788. [1, twoDimVert0], [1, twoDimVert0],
  38789. [1, twoDimVert0], [1, twoDimVert0],
  38790. [1, twoDimVert0], [1, twoDimVert0],
  38791. [1, twoDimVert0], [1, twoDimVert0],
  38792. [1, twoDimVert0], [1, twoDimVert0],
  38793. [1, twoDimVert0], [1, twoDimVert0],
  38794. [1, twoDimVert0], [1, twoDimVert0],
  38795. [1, twoDimVert0], [1, twoDimVert0],
  38796. [1, twoDimVert0], [1, twoDimVert0],
  38797. [1, twoDimVert0], [1, twoDimVert0],
  38798. [1, twoDimVert0], [1, twoDimVert0],
  38799. [1, twoDimVert0], [1, twoDimVert0]
  38800. ];
  38801. var whiteTable1 = [
  38802. [-1, -1], // 00000
  38803. [12, ccittEOL], // 00001
  38804. [-1, -1], [-1, -1], // 0001x
  38805. [-1, -1], [-1, -1], [-1, -1], [-1, -1], // 001xx
  38806. [-1, -1], [-1, -1], [-1, -1], [-1, -1], // 010xx
  38807. [-1, -1], [-1, -1], [-1, -1], [-1, -1], // 011xx
  38808. [11, 1792], [11, 1792], // 1000x
  38809. [12, 1984], // 10010
  38810. [12, 2048], // 10011
  38811. [12, 2112], // 10100
  38812. [12, 2176], // 10101
  38813. [12, 2240], // 10110
  38814. [12, 2304], // 10111
  38815. [11, 1856], [11, 1856], // 1100x
  38816. [11, 1920], [11, 1920], // 1101x
  38817. [12, 2368], // 11100
  38818. [12, 2432], // 11101
  38819. [12, 2496], // 11110
  38820. [12, 2560] // 11111
  38821. ];
  38822. var whiteTable2 = [
  38823. [-1, -1], [-1, -1], [-1, -1], [-1, -1], // 0000000xx
  38824. [8, 29], [8, 29], // 00000010x
  38825. [8, 30], [8, 30], // 00000011x
  38826. [8, 45], [8, 45], // 00000100x
  38827. [8, 46], [8, 46], // 00000101x
  38828. [7, 22], [7, 22], [7, 22], [7, 22], // 0000011xx
  38829. [7, 23], [7, 23], [7, 23], [7, 23], // 0000100xx
  38830. [8, 47], [8, 47], // 00001010x
  38831. [8, 48], [8, 48], // 00001011x
  38832. [6, 13], [6, 13], [6, 13], [6, 13], // 000011xxx
  38833. [6, 13], [6, 13], [6, 13], [6, 13],
  38834. [7, 20], [7, 20], [7, 20], [7, 20], // 0001000xx
  38835. [8, 33], [8, 33], // 00010010x
  38836. [8, 34], [8, 34], // 00010011x
  38837. [8, 35], [8, 35], // 00010100x
  38838. [8, 36], [8, 36], // 00010101x
  38839. [8, 37], [8, 37], // 00010110x
  38840. [8, 38], [8, 38], // 00010111x
  38841. [7, 19], [7, 19], [7, 19], [7, 19], // 0001100xx
  38842. [8, 31], [8, 31], // 00011010x
  38843. [8, 32], [8, 32], // 00011011x
  38844. [6, 1], [6, 1], [6, 1], [6, 1], // 000111xxx
  38845. [6, 1], [6, 1], [6, 1], [6, 1],
  38846. [6, 12], [6, 12], [6, 12], [6, 12], // 001000xxx
  38847. [6, 12], [6, 12], [6, 12], [6, 12],
  38848. [8, 53], [8, 53], // 00100100x
  38849. [8, 54], [8, 54], // 00100101x
  38850. [7, 26], [7, 26], [7, 26], [7, 26], // 0010011xx
  38851. [8, 39], [8, 39], // 00101000x
  38852. [8, 40], [8, 40], // 00101001x
  38853. [8, 41], [8, 41], // 00101010x
  38854. [8, 42], [8, 42], // 00101011x
  38855. [8, 43], [8, 43], // 00101100x
  38856. [8, 44], [8, 44], // 00101101x
  38857. [7, 21], [7, 21], [7, 21], [7, 21], // 0010111xx
  38858. [7, 28], [7, 28], [7, 28], [7, 28], // 0011000xx
  38859. [8, 61], [8, 61], // 00110010x
  38860. [8, 62], [8, 62], // 00110011x
  38861. [8, 63], [8, 63], // 00110100x
  38862. [8, 0], [8, 0], // 00110101x
  38863. [8, 320], [8, 320], // 00110110x
  38864. [8, 384], [8, 384], // 00110111x
  38865. [5, 10], [5, 10], [5, 10], [5, 10], // 00111xxxx
  38866. [5, 10], [5, 10], [5, 10], [5, 10],
  38867. [5, 10], [5, 10], [5, 10], [5, 10],
  38868. [5, 10], [5, 10], [5, 10], [5, 10],
  38869. [5, 11], [5, 11], [5, 11], [5, 11], // 01000xxxx
  38870. [5, 11], [5, 11], [5, 11], [5, 11],
  38871. [5, 11], [5, 11], [5, 11], [5, 11],
  38872. [5, 11], [5, 11], [5, 11], [5, 11],
  38873. [7, 27], [7, 27], [7, 27], [7, 27], // 0100100xx
  38874. [8, 59], [8, 59], // 01001010x
  38875. [8, 60], [8, 60], // 01001011x
  38876. [9, 1472], // 010011000
  38877. [9, 1536], // 010011001
  38878. [9, 1600], // 010011010
  38879. [9, 1728], // 010011011
  38880. [7, 18], [7, 18], [7, 18], [7, 18], // 0100111xx
  38881. [7, 24], [7, 24], [7, 24], [7, 24], // 0101000xx
  38882. [8, 49], [8, 49], // 01010010x
  38883. [8, 50], [8, 50], // 01010011x
  38884. [8, 51], [8, 51], // 01010100x
  38885. [8, 52], [8, 52], // 01010101x
  38886. [7, 25], [7, 25], [7, 25], [7, 25], // 0101011xx
  38887. [8, 55], [8, 55], // 01011000x
  38888. [8, 56], [8, 56], // 01011001x
  38889. [8, 57], [8, 57], // 01011010x
  38890. [8, 58], [8, 58], // 01011011x
  38891. [6, 192], [6, 192], [6, 192], [6, 192], // 010111xxx
  38892. [6, 192], [6, 192], [6, 192], [6, 192],
  38893. [6, 1664], [6, 1664], [6, 1664], [6, 1664], // 011000xxx
  38894. [6, 1664], [6, 1664], [6, 1664], [6, 1664],
  38895. [8, 448], [8, 448], // 01100100x
  38896. [8, 512], [8, 512], // 01100101x
  38897. [9, 704], // 011001100
  38898. [9, 768], // 011001101
  38899. [8, 640], [8, 640], // 01100111x
  38900. [8, 576], [8, 576], // 01101000x
  38901. [9, 832], // 011010010
  38902. [9, 896], // 011010011
  38903. [9, 960], // 011010100
  38904. [9, 1024], // 011010101
  38905. [9, 1088], // 011010110
  38906. [9, 1152], // 011010111
  38907. [9, 1216], // 011011000
  38908. [9, 1280], // 011011001
  38909. [9, 1344], // 011011010
  38910. [9, 1408], // 011011011
  38911. [7, 256], [7, 256], [7, 256], [7, 256], // 0110111xx
  38912. [4, 2], [4, 2], [4, 2], [4, 2], // 0111xxxxx
  38913. [4, 2], [4, 2], [4, 2], [4, 2],
  38914. [4, 2], [4, 2], [4, 2], [4, 2],
  38915. [4, 2], [4, 2], [4, 2], [4, 2],
  38916. [4, 2], [4, 2], [4, 2], [4, 2],
  38917. [4, 2], [4, 2], [4, 2], [4, 2],
  38918. [4, 2], [4, 2], [4, 2], [4, 2],
  38919. [4, 2], [4, 2], [4, 2], [4, 2],
  38920. [4, 3], [4, 3], [4, 3], [4, 3], // 1000xxxxx
  38921. [4, 3], [4, 3], [4, 3], [4, 3],
  38922. [4, 3], [4, 3], [4, 3], [4, 3],
  38923. [4, 3], [4, 3], [4, 3], [4, 3],
  38924. [4, 3], [4, 3], [4, 3], [4, 3],
  38925. [4, 3], [4, 3], [4, 3], [4, 3],
  38926. [4, 3], [4, 3], [4, 3], [4, 3],
  38927. [4, 3], [4, 3], [4, 3], [4, 3],
  38928. [5, 128], [5, 128], [5, 128], [5, 128], // 10010xxxx
  38929. [5, 128], [5, 128], [5, 128], [5, 128],
  38930. [5, 128], [5, 128], [5, 128], [5, 128],
  38931. [5, 128], [5, 128], [5, 128], [5, 128],
  38932. [5, 8], [5, 8], [5, 8], [5, 8], // 10011xxxx
  38933. [5, 8], [5, 8], [5, 8], [5, 8],
  38934. [5, 8], [5, 8], [5, 8], [5, 8],
  38935. [5, 8], [5, 8], [5, 8], [5, 8],
  38936. [5, 9], [5, 9], [5, 9], [5, 9], // 10100xxxx
  38937. [5, 9], [5, 9], [5, 9], [5, 9],
  38938. [5, 9], [5, 9], [5, 9], [5, 9],
  38939. [5, 9], [5, 9], [5, 9], [5, 9],
  38940. [6, 16], [6, 16], [6, 16], [6, 16], // 101010xxx
  38941. [6, 16], [6, 16], [6, 16], [6, 16],
  38942. [6, 17], [6, 17], [6, 17], [6, 17], // 101011xxx
  38943. [6, 17], [6, 17], [6, 17], [6, 17],
  38944. [4, 4], [4, 4], [4, 4], [4, 4], // 1011xxxxx
  38945. [4, 4], [4, 4], [4, 4], [4, 4],
  38946. [4, 4], [4, 4], [4, 4], [4, 4],
  38947. [4, 4], [4, 4], [4, 4], [4, 4],
  38948. [4, 4], [4, 4], [4, 4], [4, 4],
  38949. [4, 4], [4, 4], [4, 4], [4, 4],
  38950. [4, 4], [4, 4], [4, 4], [4, 4],
  38951. [4, 4], [4, 4], [4, 4], [4, 4],
  38952. [4, 5], [4, 5], [4, 5], [4, 5], // 1100xxxxx
  38953. [4, 5], [4, 5], [4, 5], [4, 5],
  38954. [4, 5], [4, 5], [4, 5], [4, 5],
  38955. [4, 5], [4, 5], [4, 5], [4, 5],
  38956. [4, 5], [4, 5], [4, 5], [4, 5],
  38957. [4, 5], [4, 5], [4, 5], [4, 5],
  38958. [4, 5], [4, 5], [4, 5], [4, 5],
  38959. [4, 5], [4, 5], [4, 5], [4, 5],
  38960. [6, 14], [6, 14], [6, 14], [6, 14], // 110100xxx
  38961. [6, 14], [6, 14], [6, 14], [6, 14],
  38962. [6, 15], [6, 15], [6, 15], [6, 15], // 110101xxx
  38963. [6, 15], [6, 15], [6, 15], [6, 15],
  38964. [5, 64], [5, 64], [5, 64], [5, 64], // 11011xxxx
  38965. [5, 64], [5, 64], [5, 64], [5, 64],
  38966. [5, 64], [5, 64], [5, 64], [5, 64],
  38967. [5, 64], [5, 64], [5, 64], [5, 64],
  38968. [4, 6], [4, 6], [4, 6], [4, 6], // 1110xxxxx
  38969. [4, 6], [4, 6], [4, 6], [4, 6],
  38970. [4, 6], [4, 6], [4, 6], [4, 6],
  38971. [4, 6], [4, 6], [4, 6], [4, 6],
  38972. [4, 6], [4, 6], [4, 6], [4, 6],
  38973. [4, 6], [4, 6], [4, 6], [4, 6],
  38974. [4, 6], [4, 6], [4, 6], [4, 6],
  38975. [4, 6], [4, 6], [4, 6], [4, 6],
  38976. [4, 7], [4, 7], [4, 7], [4, 7], // 1111xxxxx
  38977. [4, 7], [4, 7], [4, 7], [4, 7],
  38978. [4, 7], [4, 7], [4, 7], [4, 7],
  38979. [4, 7], [4, 7], [4, 7], [4, 7],
  38980. [4, 7], [4, 7], [4, 7], [4, 7],
  38981. [4, 7], [4, 7], [4, 7], [4, 7],
  38982. [4, 7], [4, 7], [4, 7], [4, 7],
  38983. [4, 7], [4, 7], [4, 7], [4, 7]
  38984. ];
  38985. var blackTable1 = [
  38986. [-1, -1], [-1, -1], // 000000000000x
  38987. [12, ccittEOL], [12, ccittEOL], // 000000000001x
  38988. [-1, -1], [-1, -1], [-1, -1], [-1, -1], // 00000000001xx
  38989. [-1, -1], [-1, -1], [-1, -1], [-1, -1], // 00000000010xx
  38990. [-1, -1], [-1, -1], [-1, -1], [-1, -1], // 00000000011xx
  38991. [-1, -1], [-1, -1], [-1, -1], [-1, -1], // 00000000100xx
  38992. [-1, -1], [-1, -1], [-1, -1], [-1, -1], // 00000000101xx
  38993. [-1, -1], [-1, -1], [-1, -1], [-1, -1], // 00000000110xx
  38994. [-1, -1], [-1, -1], [-1, -1], [-1, -1], // 00000000111xx
  38995. [11, 1792], [11, 1792], [11, 1792], [11, 1792], // 00000001000xx
  38996. [12, 1984], [12, 1984], // 000000010010x
  38997. [12, 2048], [12, 2048], // 000000010011x
  38998. [12, 2112], [12, 2112], // 000000010100x
  38999. [12, 2176], [12, 2176], // 000000010101x
  39000. [12, 2240], [12, 2240], // 000000010110x
  39001. [12, 2304], [12, 2304], // 000000010111x
  39002. [11, 1856], [11, 1856], [11, 1856], [11, 1856], // 00000001100xx
  39003. [11, 1920], [11, 1920], [11, 1920], [11, 1920], // 00000001101xx
  39004. [12, 2368], [12, 2368], // 000000011100x
  39005. [12, 2432], [12, 2432], // 000000011101x
  39006. [12, 2496], [12, 2496], // 000000011110x
  39007. [12, 2560], [12, 2560], // 000000011111x
  39008. [10, 18], [10, 18], [10, 18], [10, 18], // 0000001000xxx
  39009. [10, 18], [10, 18], [10, 18], [10, 18],
  39010. [12, 52], [12, 52], // 000000100100x
  39011. [13, 640], // 0000001001010
  39012. [13, 704], // 0000001001011
  39013. [13, 768], // 0000001001100
  39014. [13, 832], // 0000001001101
  39015. [12, 55], [12, 55], // 000000100111x
  39016. [12, 56], [12, 56], // 000000101000x
  39017. [13, 1280], // 0000001010010
  39018. [13, 1344], // 0000001010011
  39019. [13, 1408], // 0000001010100
  39020. [13, 1472], // 0000001010101
  39021. [12, 59], [12, 59], // 000000101011x
  39022. [12, 60], [12, 60], // 000000101100x
  39023. [13, 1536], // 0000001011010
  39024. [13, 1600], // 0000001011011
  39025. [11, 24], [11, 24], [11, 24], [11, 24], // 00000010111xx
  39026. [11, 25], [11, 25], [11, 25], [11, 25], // 00000011000xx
  39027. [13, 1664], // 0000001100100
  39028. [13, 1728], // 0000001100101
  39029. [12, 320], [12, 320], // 000000110011x
  39030. [12, 384], [12, 384], // 000000110100x
  39031. [12, 448], [12, 448], // 000000110101x
  39032. [13, 512], // 0000001101100
  39033. [13, 576], // 0000001101101
  39034. [12, 53], [12, 53], // 000000110111x
  39035. [12, 54], [12, 54], // 000000111000x
  39036. [13, 896], // 0000001110010
  39037. [13, 960], // 0000001110011
  39038. [13, 1024], // 0000001110100
  39039. [13, 1088], // 0000001110101
  39040. [13, 1152], // 0000001110110
  39041. [13, 1216], // 0000001110111
  39042. [10, 64], [10, 64], [10, 64], [10, 64], // 0000001111xxx
  39043. [10, 64], [10, 64], [10, 64], [10, 64]
  39044. ];
  39045. var blackTable2 = [
  39046. [8, 13], [8, 13], [8, 13], [8, 13], // 00000100xxxx
  39047. [8, 13], [8, 13], [8, 13], [8, 13],
  39048. [8, 13], [8, 13], [8, 13], [8, 13],
  39049. [8, 13], [8, 13], [8, 13], [8, 13],
  39050. [11, 23], [11, 23], // 00000101000x
  39051. [12, 50], // 000001010010
  39052. [12, 51], // 000001010011
  39053. [12, 44], // 000001010100
  39054. [12, 45], // 000001010101
  39055. [12, 46], // 000001010110
  39056. [12, 47], // 000001010111
  39057. [12, 57], // 000001011000
  39058. [12, 58], // 000001011001
  39059. [12, 61], // 000001011010
  39060. [12, 256], // 000001011011
  39061. [10, 16], [10, 16], [10, 16], [10, 16], // 0000010111xx
  39062. [10, 17], [10, 17], [10, 17], [10, 17], // 0000011000xx
  39063. [12, 48], // 000001100100
  39064. [12, 49], // 000001100101
  39065. [12, 62], // 000001100110
  39066. [12, 63], // 000001100111
  39067. [12, 30], // 000001101000
  39068. [12, 31], // 000001101001
  39069. [12, 32], // 000001101010
  39070. [12, 33], // 000001101011
  39071. [12, 40], // 000001101100
  39072. [12, 41], // 000001101101
  39073. [11, 22], [11, 22], // 00000110111x
  39074. [8, 14], [8, 14], [8, 14], [8, 14], // 00000111xxxx
  39075. [8, 14], [8, 14], [8, 14], [8, 14],
  39076. [8, 14], [8, 14], [8, 14], [8, 14],
  39077. [8, 14], [8, 14], [8, 14], [8, 14],
  39078. [7, 10], [7, 10], [7, 10], [7, 10], // 0000100xxxxx
  39079. [7, 10], [7, 10], [7, 10], [7, 10],
  39080. [7, 10], [7, 10], [7, 10], [7, 10],
  39081. [7, 10], [7, 10], [7, 10], [7, 10],
  39082. [7, 10], [7, 10], [7, 10], [7, 10],
  39083. [7, 10], [7, 10], [7, 10], [7, 10],
  39084. [7, 10], [7, 10], [7, 10], [7, 10],
  39085. [7, 10], [7, 10], [7, 10], [7, 10],
  39086. [7, 11], [7, 11], [7, 11], [7, 11], // 0000101xxxxx
  39087. [7, 11], [7, 11], [7, 11], [7, 11],
  39088. [7, 11], [7, 11], [7, 11], [7, 11],
  39089. [7, 11], [7, 11], [7, 11], [7, 11],
  39090. [7, 11], [7, 11], [7, 11], [7, 11],
  39091. [7, 11], [7, 11], [7, 11], [7, 11],
  39092. [7, 11], [7, 11], [7, 11], [7, 11],
  39093. [7, 11], [7, 11], [7, 11], [7, 11],
  39094. [9, 15], [9, 15], [9, 15], [9, 15], // 000011000xxx
  39095. [9, 15], [9, 15], [9, 15], [9, 15],
  39096. [12, 128], // 000011001000
  39097. [12, 192], // 000011001001
  39098. [12, 26], // 000011001010
  39099. [12, 27], // 000011001011
  39100. [12, 28], // 000011001100
  39101. [12, 29], // 000011001101
  39102. [11, 19], [11, 19], // 00001100111x
  39103. [11, 20], [11, 20], // 00001101000x
  39104. [12, 34], // 000011010010
  39105. [12, 35], // 000011010011
  39106. [12, 36], // 000011010100
  39107. [12, 37], // 000011010101
  39108. [12, 38], // 000011010110
  39109. [12, 39], // 000011010111
  39110. [11, 21], [11, 21], // 00001101100x
  39111. [12, 42], // 000011011010
  39112. [12, 43], // 000011011011
  39113. [10, 0], [10, 0], [10, 0], [10, 0], // 0000110111xx
  39114. [7, 12], [7, 12], [7, 12], [7, 12], // 0000111xxxxx
  39115. [7, 12], [7, 12], [7, 12], [7, 12],
  39116. [7, 12], [7, 12], [7, 12], [7, 12],
  39117. [7, 12], [7, 12], [7, 12], [7, 12],
  39118. [7, 12], [7, 12], [7, 12], [7, 12],
  39119. [7, 12], [7, 12], [7, 12], [7, 12],
  39120. [7, 12], [7, 12], [7, 12], [7, 12],
  39121. [7, 12], [7, 12], [7, 12], [7, 12]
  39122. ];
  39123. var blackTable3 = [
  39124. [-1, -1], [-1, -1], [-1, -1], [-1, -1], // 0000xx
  39125. [6, 9], // 000100
  39126. [6, 8], // 000101
  39127. [5, 7], [5, 7], // 00011x
  39128. [4, 6], [4, 6], [4, 6], [4, 6], // 0010xx
  39129. [4, 5], [4, 5], [4, 5], [4, 5], // 0011xx
  39130. [3, 1], [3, 1], [3, 1], [3, 1], // 010xxx
  39131. [3, 1], [3, 1], [3, 1], [3, 1],
  39132. [3, 4], [3, 4], [3, 4], [3, 4], // 011xxx
  39133. [3, 4], [3, 4], [3, 4], [3, 4],
  39134. [2, 3], [2, 3], [2, 3], [2, 3], // 10xxxx
  39135. [2, 3], [2, 3], [2, 3], [2, 3],
  39136. [2, 3], [2, 3], [2, 3], [2, 3],
  39137. [2, 3], [2, 3], [2, 3], [2, 3],
  39138. [2, 2], [2, 2], [2, 2], [2, 2], // 11xxxx
  39139. [2, 2], [2, 2], [2, 2], [2, 2],
  39140. [2, 2], [2, 2], [2, 2], [2, 2],
  39141. [2, 2], [2, 2], [2, 2], [2, 2]
  39142. ];
  39143. function CCITTFaxStream(str, maybeLength, params) {
  39144. this.str = str;
  39145. this.dict = str.dict;
  39146. params = params || Dict.empty;
  39147. this.encoding = params.get('K') || 0;
  39148. this.eoline = params.get('EndOfLine') || false;
  39149. this.byteAlign = params.get('EncodedByteAlign') || false;
  39150. this.columns = params.get('Columns') || 1728;
  39151. this.rows = params.get('Rows') || 0;
  39152. var eoblock = params.get('EndOfBlock');
  39153. if (eoblock === null || eoblock === undefined) {
  39154. eoblock = true;
  39155. }
  39156. this.eoblock = eoblock;
  39157. this.black = params.get('BlackIs1') || false;
  39158. this.codingLine = new Uint32Array(this.columns + 1);
  39159. this.refLine = new Uint32Array(this.columns + 2);
  39160. this.codingLine[0] = this.columns;
  39161. this.codingPos = 0;
  39162. this.row = 0;
  39163. this.nextLine2D = this.encoding < 0;
  39164. this.inputBits = 0;
  39165. this.inputBuf = 0;
  39166. this.outputBits = 0;
  39167. var code1;
  39168. while ((code1 = this.lookBits(12)) === 0) {
  39169. this.eatBits(1);
  39170. }
  39171. if (code1 == 1) {
  39172. this.eatBits(12);
  39173. }
  39174. if (this.encoding > 0) {
  39175. this.nextLine2D = !this.lookBits(1);
  39176. this.eatBits(1);
  39177. }
  39178. DecodeStream.call(this, maybeLength);
  39179. }
  39180. CCITTFaxStream.prototype = Object.create(DecodeStream.prototype);
  39181. CCITTFaxStream.prototype.readBlock = function CCITTFaxStream_readBlock() {
  39182. while (!this.eof) {
  39183. var c = this.lookChar();
  39184. this.ensureBuffer(this.bufferLength + 1);
  39185. this.buffer[this.bufferLength++] = c;
  39186. }
  39187. };
  39188. CCITTFaxStream.prototype.addPixels =
  39189. function ccittFaxStreamAddPixels(a1, blackPixels) {
  39190. var codingLine = this.codingLine;
  39191. var codingPos = this.codingPos;
  39192. if (a1 > codingLine[codingPos]) {
  39193. if (a1 > this.columns) {
  39194. info('row is wrong length');
  39195. this.err = true;
  39196. a1 = this.columns;
  39197. }
  39198. if ((codingPos & 1) ^ blackPixels) {
  39199. ++codingPos;
  39200. }
  39201. codingLine[codingPos] = a1;
  39202. }
  39203. this.codingPos = codingPos;
  39204. };
  39205. CCITTFaxStream.prototype.addPixelsNeg =
  39206. function ccittFaxStreamAddPixelsNeg(a1, blackPixels) {
  39207. var codingLine = this.codingLine;
  39208. var codingPos = this.codingPos;
  39209. if (a1 > codingLine[codingPos]) {
  39210. if (a1 > this.columns) {
  39211. info('row is wrong length');
  39212. this.err = true;
  39213. a1 = this.columns;
  39214. }
  39215. if ((codingPos & 1) ^ blackPixels) {
  39216. ++codingPos;
  39217. }
  39218. codingLine[codingPos] = a1;
  39219. } else if (a1 < codingLine[codingPos]) {
  39220. if (a1 < 0) {
  39221. info('invalid code');
  39222. this.err = true;
  39223. a1 = 0;
  39224. }
  39225. while (codingPos > 0 && a1 < codingLine[codingPos - 1]) {
  39226. --codingPos;
  39227. }
  39228. codingLine[codingPos] = a1;
  39229. }
  39230. this.codingPos = codingPos;
  39231. };
  39232. CCITTFaxStream.prototype.lookChar = function CCITTFaxStream_lookChar() {
  39233. var refLine = this.refLine;
  39234. var codingLine = this.codingLine;
  39235. var columns = this.columns;
  39236. var refPos, blackPixels, bits, i;
  39237. if (this.outputBits === 0) {
  39238. if (this.eof) {
  39239. return null;
  39240. }
  39241. this.err = false;
  39242. var code1, code2, code3;
  39243. if (this.nextLine2D) {
  39244. for (i = 0; codingLine[i] < columns; ++i) {
  39245. refLine[i] = codingLine[i];
  39246. }
  39247. refLine[i++] = columns;
  39248. refLine[i] = columns;
  39249. codingLine[0] = 0;
  39250. this.codingPos = 0;
  39251. refPos = 0;
  39252. blackPixels = 0;
  39253. while (codingLine[this.codingPos] < columns) {
  39254. code1 = this.getTwoDimCode();
  39255. switch (code1) {
  39256. case twoDimPass:
  39257. this.addPixels(refLine[refPos + 1], blackPixels);
  39258. if (refLine[refPos + 1] < columns) {
  39259. refPos += 2;
  39260. }
  39261. break;
  39262. case twoDimHoriz:
  39263. code1 = code2 = 0;
  39264. if (blackPixels) {
  39265. do {
  39266. code1 += (code3 = this.getBlackCode());
  39267. } while (code3 >= 64);
  39268. do {
  39269. code2 += (code3 = this.getWhiteCode());
  39270. } while (code3 >= 64);
  39271. } else {
  39272. do {
  39273. code1 += (code3 = this.getWhiteCode());
  39274. } while (code3 >= 64);
  39275. do {
  39276. code2 += (code3 = this.getBlackCode());
  39277. } while (code3 >= 64);
  39278. }
  39279. this.addPixels(codingLine[this.codingPos] +
  39280. code1, blackPixels);
  39281. if (codingLine[this.codingPos] < columns) {
  39282. this.addPixels(codingLine[this.codingPos] + code2,
  39283. blackPixels ^ 1);
  39284. }
  39285. while (refLine[refPos] <= codingLine[this.codingPos] &&
  39286. refLine[refPos] < columns) {
  39287. refPos += 2;
  39288. }
  39289. break;
  39290. case twoDimVertR3:
  39291. this.addPixels(refLine[refPos] + 3, blackPixels);
  39292. blackPixels ^= 1;
  39293. if (codingLine[this.codingPos] < columns) {
  39294. ++refPos;
  39295. while (refLine[refPos] <= codingLine[this.codingPos] &&
  39296. refLine[refPos] < columns) {
  39297. refPos += 2;
  39298. }
  39299. }
  39300. break;
  39301. case twoDimVertR2:
  39302. this.addPixels(refLine[refPos] + 2, blackPixels);
  39303. blackPixels ^= 1;
  39304. if (codingLine[this.codingPos] < columns) {
  39305. ++refPos;
  39306. while (refLine[refPos] <= codingLine[this.codingPos] &&
  39307. refLine[refPos] < columns) {
  39308. refPos += 2;
  39309. }
  39310. }
  39311. break;
  39312. case twoDimVertR1:
  39313. this.addPixels(refLine[refPos] + 1, blackPixels);
  39314. blackPixels ^= 1;
  39315. if (codingLine[this.codingPos] < columns) {
  39316. ++refPos;
  39317. while (refLine[refPos] <= codingLine[this.codingPos] &&
  39318. refLine[refPos] < columns) {
  39319. refPos += 2;
  39320. }
  39321. }
  39322. break;
  39323. case twoDimVert0:
  39324. this.addPixels(refLine[refPos], blackPixels);
  39325. blackPixels ^= 1;
  39326. if (codingLine[this.codingPos] < columns) {
  39327. ++refPos;
  39328. while (refLine[refPos] <= codingLine[this.codingPos] &&
  39329. refLine[refPos] < columns) {
  39330. refPos += 2;
  39331. }
  39332. }
  39333. break;
  39334. case twoDimVertL3:
  39335. this.addPixelsNeg(refLine[refPos] - 3, blackPixels);
  39336. blackPixels ^= 1;
  39337. if (codingLine[this.codingPos] < columns) {
  39338. if (refPos > 0) {
  39339. --refPos;
  39340. } else {
  39341. ++refPos;
  39342. }
  39343. while (refLine[refPos] <= codingLine[this.codingPos] &&
  39344. refLine[refPos] < columns) {
  39345. refPos += 2;
  39346. }
  39347. }
  39348. break;
  39349. case twoDimVertL2:
  39350. this.addPixelsNeg(refLine[refPos] - 2, blackPixels);
  39351. blackPixels ^= 1;
  39352. if (codingLine[this.codingPos] < columns) {
  39353. if (refPos > 0) {
  39354. --refPos;
  39355. } else {
  39356. ++refPos;
  39357. }
  39358. while (refLine[refPos] <= codingLine[this.codingPos] &&
  39359. refLine[refPos] < columns) {
  39360. refPos += 2;
  39361. }
  39362. }
  39363. break;
  39364. case twoDimVertL1:
  39365. this.addPixelsNeg(refLine[refPos] - 1, blackPixels);
  39366. blackPixels ^= 1;
  39367. if (codingLine[this.codingPos] < columns) {
  39368. if (refPos > 0) {
  39369. --refPos;
  39370. } else {
  39371. ++refPos;
  39372. }
  39373. while (refLine[refPos] <= codingLine[this.codingPos] &&
  39374. refLine[refPos] < columns) {
  39375. refPos += 2;
  39376. }
  39377. }
  39378. break;
  39379. case EOF:
  39380. this.addPixels(columns, 0);
  39381. this.eof = true;
  39382. break;
  39383. default:
  39384. info('bad 2d code');
  39385. this.addPixels(columns, 0);
  39386. this.err = true;
  39387. }
  39388. }
  39389. } else {
  39390. codingLine[0] = 0;
  39391. this.codingPos = 0;
  39392. blackPixels = 0;
  39393. while (codingLine[this.codingPos] < columns) {
  39394. code1 = 0;
  39395. if (blackPixels) {
  39396. do {
  39397. code1 += (code3 = this.getBlackCode());
  39398. } while (code3 >= 64);
  39399. } else {
  39400. do {
  39401. code1 += (code3 = this.getWhiteCode());
  39402. } while (code3 >= 64);
  39403. }
  39404. this.addPixels(codingLine[this.codingPos] + code1, blackPixels);
  39405. blackPixels ^= 1;
  39406. }
  39407. }
  39408. if (this.byteAlign) {
  39409. this.inputBits &= ~7;
  39410. }
  39411. var gotEOL = false;
  39412. if (!this.eoblock && this.row == this.rows - 1) {
  39413. this.eof = true;
  39414. } else {
  39415. code1 = this.lookBits(12);
  39416. while (code1 === 0) {
  39417. this.eatBits(1);
  39418. code1 = this.lookBits(12);
  39419. }
  39420. if (code1 == 1) {
  39421. this.eatBits(12);
  39422. gotEOL = true;
  39423. } else if (code1 == EOF) {
  39424. this.eof = true;
  39425. }
  39426. }
  39427. if (!this.eof && this.encoding > 0) {
  39428. this.nextLine2D = !this.lookBits(1);
  39429. this.eatBits(1);
  39430. }
  39431. if (this.eoblock && gotEOL) {
  39432. code1 = this.lookBits(12);
  39433. if (code1 == 1) {
  39434. this.eatBits(12);
  39435. if (this.encoding > 0) {
  39436. this.lookBits(1);
  39437. this.eatBits(1);
  39438. }
  39439. if (this.encoding >= 0) {
  39440. for (i = 0; i < 4; ++i) {
  39441. code1 = this.lookBits(12);
  39442. if (code1 != 1) {
  39443. info('bad rtc code: ' + code1);
  39444. }
  39445. this.eatBits(12);
  39446. if (this.encoding > 0) {
  39447. this.lookBits(1);
  39448. this.eatBits(1);
  39449. }
  39450. }
  39451. }
  39452. this.eof = true;
  39453. }
  39454. } else if (this.err && this.eoline) {
  39455. while (true) {
  39456. code1 = this.lookBits(13);
  39457. if (code1 == EOF) {
  39458. this.eof = true;
  39459. return null;
  39460. }
  39461. if ((code1 >> 1) == 1) {
  39462. break;
  39463. }
  39464. this.eatBits(1);
  39465. }
  39466. this.eatBits(12);
  39467. if (this.encoding > 0) {
  39468. this.eatBits(1);
  39469. this.nextLine2D = !(code1 & 1);
  39470. }
  39471. }
  39472. if (codingLine[0] > 0) {
  39473. this.outputBits = codingLine[this.codingPos = 0];
  39474. } else {
  39475. this.outputBits = codingLine[this.codingPos = 1];
  39476. }
  39477. this.row++;
  39478. }
  39479. var c;
  39480. if (this.outputBits >= 8) {
  39481. c = (this.codingPos & 1) ? 0 : 0xFF;
  39482. this.outputBits -= 8;
  39483. if (this.outputBits === 0 && codingLine[this.codingPos] < columns) {
  39484. this.codingPos++;
  39485. this.outputBits = (codingLine[this.codingPos] -
  39486. codingLine[this.codingPos - 1]);
  39487. }
  39488. } else {
  39489. bits = 8;
  39490. c = 0;
  39491. do {
  39492. if (this.outputBits > bits) {
  39493. c <<= bits;
  39494. if (!(this.codingPos & 1)) {
  39495. c |= 0xFF >> (8 - bits);
  39496. }
  39497. this.outputBits -= bits;
  39498. bits = 0;
  39499. } else {
  39500. c <<= this.outputBits;
  39501. if (!(this.codingPos & 1)) {
  39502. c |= 0xFF >> (8 - this.outputBits);
  39503. }
  39504. bits -= this.outputBits;
  39505. this.outputBits = 0;
  39506. if (codingLine[this.codingPos] < columns) {
  39507. this.codingPos++;
  39508. this.outputBits = (codingLine[this.codingPos] -
  39509. codingLine[this.codingPos - 1]);
  39510. } else if (bits > 0) {
  39511. c <<= bits;
  39512. bits = 0;
  39513. }
  39514. }
  39515. } while (bits);
  39516. }
  39517. if (this.black) {
  39518. c ^= 0xFF;
  39519. }
  39520. return c;
  39521. };
  39522. // This functions returns the code found from the table.
  39523. // The start and end parameters set the boundaries for searching the table.
  39524. // The limit parameter is optional. Function returns an array with three
  39525. // values. The first array element indicates whether a valid code is being
  39526. // returned. The second array element is the actual code. The third array
  39527. // element indicates whether EOF was reached.
  39528. CCITTFaxStream.prototype.findTableCode =
  39529. function ccittFaxStreamFindTableCode(start, end, table, limit) {
  39530. var limitValue = limit || 0;
  39531. for (var i = start; i <= end; ++i) {
  39532. var code = this.lookBits(i);
  39533. if (code == EOF) {
  39534. return [true, 1, false];
  39535. }
  39536. if (i < end) {
  39537. code <<= end - i;
  39538. }
  39539. if (!limitValue || code >= limitValue) {
  39540. var p = table[code - limitValue];
  39541. if (p[0] == i) {
  39542. this.eatBits(i);
  39543. return [true, p[1], true];
  39544. }
  39545. }
  39546. }
  39547. return [false, 0, false];
  39548. };
  39549. CCITTFaxStream.prototype.getTwoDimCode =
  39550. function ccittFaxStreamGetTwoDimCode() {
  39551. var code = 0;
  39552. var p;
  39553. if (this.eoblock) {
  39554. code = this.lookBits(7);
  39555. p = twoDimTable[code];
  39556. if (p && p[0] > 0) {
  39557. this.eatBits(p[0]);
  39558. return p[1];
  39559. }
  39560. } else {
  39561. var result = this.findTableCode(1, 7, twoDimTable);
  39562. if (result[0] && result[2]) {
  39563. return result[1];
  39564. }
  39565. }
  39566. info('Bad two dim code');
  39567. return EOF;
  39568. };
  39569. CCITTFaxStream.prototype.getWhiteCode =
  39570. function ccittFaxStreamGetWhiteCode() {
  39571. var code = 0;
  39572. var p;
  39573. if (this.eoblock) {
  39574. code = this.lookBits(12);
  39575. if (code == EOF) {
  39576. return 1;
  39577. }
  39578. if ((code >> 5) === 0) {
  39579. p = whiteTable1[code];
  39580. } else {
  39581. p = whiteTable2[code >> 3];
  39582. }
  39583. if (p[0] > 0) {
  39584. this.eatBits(p[0]);
  39585. return p[1];
  39586. }
  39587. } else {
  39588. var result = this.findTableCode(1, 9, whiteTable2);
  39589. if (result[0]) {
  39590. return result[1];
  39591. }
  39592. result = this.findTableCode(11, 12, whiteTable1);
  39593. if (result[0]) {
  39594. return result[1];
  39595. }
  39596. }
  39597. info('bad white code');
  39598. this.eatBits(1);
  39599. return 1;
  39600. };
  39601. CCITTFaxStream.prototype.getBlackCode =
  39602. function ccittFaxStreamGetBlackCode() {
  39603. var code, p;
  39604. if (this.eoblock) {
  39605. code = this.lookBits(13);
  39606. if (code == EOF) {
  39607. return 1;
  39608. }
  39609. if ((code >> 7) === 0) {
  39610. p = blackTable1[code];
  39611. } else if ((code >> 9) === 0 && (code >> 7) !== 0) {
  39612. p = blackTable2[(code >> 1) - 64];
  39613. } else {
  39614. p = blackTable3[code >> 7];
  39615. }
  39616. if (p[0] > 0) {
  39617. this.eatBits(p[0]);
  39618. return p[1];
  39619. }
  39620. } else {
  39621. var result = this.findTableCode(2, 6, blackTable3);
  39622. if (result[0]) {
  39623. return result[1];
  39624. }
  39625. result = this.findTableCode(7, 12, blackTable2, 64);
  39626. if (result[0]) {
  39627. return result[1];
  39628. }
  39629. result = this.findTableCode(10, 13, blackTable1);
  39630. if (result[0]) {
  39631. return result[1];
  39632. }
  39633. }
  39634. info('bad black code');
  39635. this.eatBits(1);
  39636. return 1;
  39637. };
  39638. CCITTFaxStream.prototype.lookBits = function CCITTFaxStream_lookBits(n) {
  39639. var c;
  39640. while (this.inputBits < n) {
  39641. if ((c = this.str.getByte()) === -1) {
  39642. if (this.inputBits === 0) {
  39643. return EOF;
  39644. }
  39645. return ((this.inputBuf << (n - this.inputBits)) &
  39646. (0xFFFF >> (16 - n)));
  39647. }
  39648. this.inputBuf = (this.inputBuf << 8) + c;
  39649. this.inputBits += 8;
  39650. }
  39651. return (this.inputBuf >> (this.inputBits - n)) & (0xFFFF >> (16 - n));
  39652. };
  39653. CCITTFaxStream.prototype.eatBits = function CCITTFaxStream_eatBits(n) {
  39654. if ((this.inputBits -= n) < 0) {
  39655. this.inputBits = 0;
  39656. }
  39657. };
  39658. return CCITTFaxStream;
  39659. })();
  39660. var LZWStream = (function LZWStreamClosure() {
  39661. function LZWStream(str, maybeLength, earlyChange) {
  39662. this.str = str;
  39663. this.dict = str.dict;
  39664. this.cachedData = 0;
  39665. this.bitsCached = 0;
  39666. var maxLzwDictionarySize = 4096;
  39667. var lzwState = {
  39668. earlyChange: earlyChange,
  39669. codeLength: 9,
  39670. nextCode: 258,
  39671. dictionaryValues: new Uint8Array(maxLzwDictionarySize),
  39672. dictionaryLengths: new Uint16Array(maxLzwDictionarySize),
  39673. dictionaryPrevCodes: new Uint16Array(maxLzwDictionarySize),
  39674. currentSequence: new Uint8Array(maxLzwDictionarySize),
  39675. currentSequenceLength: 0
  39676. };
  39677. for (var i = 0; i < 256; ++i) {
  39678. lzwState.dictionaryValues[i] = i;
  39679. lzwState.dictionaryLengths[i] = 1;
  39680. }
  39681. this.lzwState = lzwState;
  39682. DecodeStream.call(this, maybeLength);
  39683. }
  39684. LZWStream.prototype = Object.create(DecodeStream.prototype);
  39685. LZWStream.prototype.readBits = function LZWStream_readBits(n) {
  39686. var bitsCached = this.bitsCached;
  39687. var cachedData = this.cachedData;
  39688. while (bitsCached < n) {
  39689. var c = this.str.getByte();
  39690. if (c === -1) {
  39691. this.eof = true;
  39692. return null;
  39693. }
  39694. cachedData = (cachedData << 8) | c;
  39695. bitsCached += 8;
  39696. }
  39697. this.bitsCached = (bitsCached -= n);
  39698. this.cachedData = cachedData;
  39699. this.lastCode = null;
  39700. return (cachedData >>> bitsCached) & ((1 << n) - 1);
  39701. };
  39702. LZWStream.prototype.readBlock = function LZWStream_readBlock() {
  39703. var blockSize = 512;
  39704. var estimatedDecodedSize = blockSize * 2, decodedSizeDelta = blockSize;
  39705. var i, j, q;
  39706. var lzwState = this.lzwState;
  39707. if (!lzwState) {
  39708. return; // eof was found
  39709. }
  39710. var earlyChange = lzwState.earlyChange;
  39711. var nextCode = lzwState.nextCode;
  39712. var dictionaryValues = lzwState.dictionaryValues;
  39713. var dictionaryLengths = lzwState.dictionaryLengths;
  39714. var dictionaryPrevCodes = lzwState.dictionaryPrevCodes;
  39715. var codeLength = lzwState.codeLength;
  39716. var prevCode = lzwState.prevCode;
  39717. var currentSequence = lzwState.currentSequence;
  39718. var currentSequenceLength = lzwState.currentSequenceLength;
  39719. var decodedLength = 0;
  39720. var currentBufferLength = this.bufferLength;
  39721. var buffer = this.ensureBuffer(this.bufferLength + estimatedDecodedSize);
  39722. for (i = 0; i < blockSize; i++) {
  39723. var code = this.readBits(codeLength);
  39724. var hasPrev = currentSequenceLength > 0;
  39725. if (code < 256) {
  39726. currentSequence[0] = code;
  39727. currentSequenceLength = 1;
  39728. } else if (code >= 258) {
  39729. if (code < nextCode) {
  39730. currentSequenceLength = dictionaryLengths[code];
  39731. for (j = currentSequenceLength - 1, q = code; j >= 0; j--) {
  39732. currentSequence[j] = dictionaryValues[q];
  39733. q = dictionaryPrevCodes[q];
  39734. }
  39735. } else {
  39736. currentSequence[currentSequenceLength++] = currentSequence[0];
  39737. }
  39738. } else if (code == 256) {
  39739. codeLength = 9;
  39740. nextCode = 258;
  39741. currentSequenceLength = 0;
  39742. continue;
  39743. } else {
  39744. this.eof = true;
  39745. delete this.lzwState;
  39746. break;
  39747. }
  39748. if (hasPrev) {
  39749. dictionaryPrevCodes[nextCode] = prevCode;
  39750. dictionaryLengths[nextCode] = dictionaryLengths[prevCode] + 1;
  39751. dictionaryValues[nextCode] = currentSequence[0];
  39752. nextCode++;
  39753. codeLength = (nextCode + earlyChange) & (nextCode + earlyChange - 1) ?
  39754. codeLength : Math.min(Math.log(nextCode + earlyChange) /
  39755. 0.6931471805599453 + 1, 12) | 0;
  39756. }
  39757. prevCode = code;
  39758. decodedLength += currentSequenceLength;
  39759. if (estimatedDecodedSize < decodedLength) {
  39760. do {
  39761. estimatedDecodedSize += decodedSizeDelta;
  39762. } while (estimatedDecodedSize < decodedLength);
  39763. buffer = this.ensureBuffer(this.bufferLength + estimatedDecodedSize);
  39764. }
  39765. for (j = 0; j < currentSequenceLength; j++) {
  39766. buffer[currentBufferLength++] = currentSequence[j];
  39767. }
  39768. }
  39769. lzwState.nextCode = nextCode;
  39770. lzwState.codeLength = codeLength;
  39771. lzwState.prevCode = prevCode;
  39772. lzwState.currentSequenceLength = currentSequenceLength;
  39773. this.bufferLength = currentBufferLength;
  39774. };
  39775. return LZWStream;
  39776. })();
  39777. var NullStream = (function NullStreamClosure() {
  39778. function NullStream() {
  39779. Stream.call(this, new Uint8Array(0));
  39780. }
  39781. NullStream.prototype = Stream.prototype;
  39782. return NullStream;
  39783. })();
  39784. var WorkerMessageHandler = PDFJS.WorkerMessageHandler = {
  39785. setup: function wphSetup(handler) {
  39786. var pdfManager;
  39787. function loadDocument(recoveryMode) {
  39788. var loadDocumentCapability = createPromiseCapability();
  39789. var parseSuccess = function parseSuccess() {
  39790. var numPagesPromise = pdfManager.ensureDoc('numPages');
  39791. var fingerprintPromise = pdfManager.ensureDoc('fingerprint');
  39792. var encryptedPromise = pdfManager.ensureXRef('encrypt');
  39793. Promise.all([numPagesPromise, fingerprintPromise,
  39794. encryptedPromise]).then(function onDocReady(results) {
  39795. var doc = {
  39796. numPages: results[0],
  39797. fingerprint: results[1],
  39798. encrypted: !!results[2],
  39799. };
  39800. loadDocumentCapability.resolve(doc);
  39801. },
  39802. parseFailure);
  39803. };
  39804. var parseFailure = function parseFailure(e) {
  39805. loadDocumentCapability.reject(e);
  39806. };
  39807. pdfManager.ensureDoc('checkHeader', []).then(function() {
  39808. pdfManager.ensureDoc('parseStartXRef', []).then(function() {
  39809. pdfManager.ensureDoc('parse', [recoveryMode]).then(
  39810. parseSuccess, parseFailure);
  39811. }, parseFailure);
  39812. }, parseFailure);
  39813. return loadDocumentCapability.promise;
  39814. }
  39815. function getPdfManager(data) {
  39816. var pdfManagerCapability = createPromiseCapability();
  39817. var source = data.source;
  39818. var disableRange = data.disableRange;
  39819. if (source.data) {
  39820. try {
  39821. pdfManager = new LocalPdfManager(source.data, source.password);
  39822. pdfManagerCapability.resolve();
  39823. } catch (ex) {
  39824. pdfManagerCapability.reject(ex);
  39825. }
  39826. return pdfManagerCapability.promise;
  39827. } else if (source.chunkedViewerLoading) {
  39828. try {
  39829. pdfManager = new NetworkPdfManager(source, handler);
  39830. pdfManagerCapability.resolve();
  39831. } catch (ex) {
  39832. pdfManagerCapability.reject(ex);
  39833. }
  39834. return pdfManagerCapability.promise;
  39835. }
  39836. var networkManager = new NetworkManager(source.url, {
  39837. httpHeaders: source.httpHeaders,
  39838. withCredentials: source.withCredentials
  39839. });
  39840. var fullRequestXhrId = networkManager.requestFull({
  39841. onHeadersReceived: function onHeadersReceived() {
  39842. if (disableRange) {
  39843. return;
  39844. }
  39845. var fullRequestXhr = networkManager.getRequestXhr(fullRequestXhrId);
  39846. if (fullRequestXhr.getResponseHeader('Accept-Ranges') !== 'bytes') {
  39847. return;
  39848. }
  39849. var contentEncoding =
  39850. fullRequestXhr.getResponseHeader('Content-Encoding') || 'identity';
  39851. if (contentEncoding !== 'identity') {
  39852. return;
  39853. }
  39854. var length = fullRequestXhr.getResponseHeader('Content-Length');
  39855. length = parseInt(length, 10);
  39856. if (!isInt(length)) {
  39857. return;
  39858. }
  39859. source.length = length;
  39860. if (length <= 2 * RANGE_CHUNK_SIZE) {
  39861. // The file size is smaller than the size of two chunks, so it does
  39862. // not make any sense to abort the request and retry with a range
  39863. // request.
  39864. return;
  39865. }
  39866. // NOTE: by cancelling the full request, and then issuing range
  39867. // requests, there will be an issue for sites where you can only
  39868. // request the pdf once. However, if this is the case, then the
  39869. // server should not be returning that it can support range requests.
  39870. networkManager.abortRequest(fullRequestXhrId);
  39871. try {
  39872. pdfManager = new NetworkPdfManager(source, handler);
  39873. pdfManagerCapability.resolve(pdfManager);
  39874. } catch (ex) {
  39875. pdfManagerCapability.reject(ex);
  39876. }
  39877. },
  39878. onDone: function onDone(args) {
  39879. // the data is array, instantiating directly from it
  39880. try {
  39881. pdfManager = new LocalPdfManager(args.chunk, source.password);
  39882. pdfManagerCapability.resolve();
  39883. } catch (ex) {
  39884. pdfManagerCapability.reject(ex);
  39885. }
  39886. },
  39887. onError: function onError(status) {
  39888. if (status == 404) {
  39889. var exception = new MissingPDFException('Missing PDF "' +
  39890. source.url + '".');
  39891. handler.send('MissingPDF', { exception: exception });
  39892. } else {
  39893. handler.send('DocError', 'Unexpected server response (' +
  39894. status + ') while retrieving PDF "' +
  39895. source.url + '".');
  39896. }
  39897. },
  39898. onProgress: function onProgress(evt) {
  39899. handler.send('DocProgress', {
  39900. loaded: evt.loaded,
  39901. total: evt.lengthComputable ? evt.total : source.length
  39902. });
  39903. }
  39904. });
  39905. return pdfManagerCapability.promise;
  39906. }
  39907. handler.on('test', function wphSetupTest(data) {
  39908. // check if Uint8Array can be sent to worker
  39909. if (!(data instanceof Uint8Array)) {
  39910. handler.send('test', false);
  39911. return;
  39912. }
  39913. // making sure postMessage transfers are working
  39914. var supportTransfers = data[0] === 255;
  39915. handler.postMessageTransfers = supportTransfers;
  39916. // check if the response property is supported by xhr
  39917. var xhr = new XMLHttpRequest();
  39918. var responseExists = 'response' in xhr;
  39919. // check if the property is actually implemented
  39920. try {
  39921. var dummy = xhr.responseType;
  39922. } catch (e) {
  39923. responseExists = false;
  39924. }
  39925. if (!responseExists) {
  39926. handler.send('test', false);
  39927. return;
  39928. }
  39929. handler.send('test', {
  39930. supportTypedArray: true,
  39931. supportTransfers: supportTransfers
  39932. });
  39933. });
  39934. handler.on('GetDocRequest', function wphSetupDoc(data) {
  39935. var onSuccess = function(doc) {
  39936. handler.send('GetDoc', { pdfInfo: doc });
  39937. };
  39938. var onFailure = function(e) {
  39939. if (e instanceof PasswordException) {
  39940. if (e.code === PasswordResponses.NEED_PASSWORD) {
  39941. handler.send('NeedPassword', {
  39942. exception: e
  39943. });
  39944. } else if (e.code === PasswordResponses.INCORRECT_PASSWORD) {
  39945. handler.send('IncorrectPassword', {
  39946. exception: e
  39947. });
  39948. }
  39949. } else if (e instanceof InvalidPDFException) {
  39950. handler.send('InvalidPDF', {
  39951. exception: e
  39952. });
  39953. } else if (e instanceof MissingPDFException) {
  39954. handler.send('MissingPDF', {
  39955. exception: e
  39956. });
  39957. } else {
  39958. handler.send('UnknownError', {
  39959. exception: new UnknownErrorException(e.message, e.toString())
  39960. });
  39961. }
  39962. };
  39963. PDFJS.maxImageSize = data.maxImageSize === undefined ?
  39964. -1 : data.maxImageSize;
  39965. PDFJS.disableFontFace = data.disableFontFace;
  39966. PDFJS.disableCreateObjectURL = data.disableCreateObjectURL;
  39967. PDFJS.verbosity = data.verbosity;
  39968. PDFJS.cMapUrl = data.cMapUrl === undefined ?
  39969. null : data.cMapUrl;
  39970. PDFJS.cMapPacked = data.cMapPacked === true;
  39971. getPdfManager(data).then(function () {
  39972. pdfManager.onLoadedStream().then(function(stream) {
  39973. handler.send('DataLoaded', { length: stream.bytes.byteLength });
  39974. });
  39975. }).then(function pdfManagerReady() {
  39976. loadDocument(false).then(onSuccess, function loadFailure(ex) {
  39977. // Try again with recoveryMode == true
  39978. if (!(ex instanceof XRefParseException)) {
  39979. if (ex instanceof PasswordException) {
  39980. // after password exception prepare to receive a new password
  39981. // to repeat loading
  39982. pdfManager.passwordChanged().then(pdfManagerReady);
  39983. }
  39984. onFailure(ex);
  39985. return;
  39986. }
  39987. pdfManager.requestLoadedStream();
  39988. pdfManager.onLoadedStream().then(function() {
  39989. loadDocument(true).then(onSuccess, onFailure);
  39990. });
  39991. }, onFailure);
  39992. }, onFailure);
  39993. });
  39994. handler.on('GetPage', function wphSetupGetPage(data) {
  39995. return pdfManager.getPage(data.pageIndex).then(function(page) {
  39996. var rotatePromise = pdfManager.ensure(page, 'rotate');
  39997. var refPromise = pdfManager.ensure(page, 'ref');
  39998. var viewPromise = pdfManager.ensure(page, 'view');
  39999. return Promise.all([rotatePromise, refPromise, viewPromise]).then(
  40000. function(results) {
  40001. return {
  40002. rotate: results[0],
  40003. ref: results[1],
  40004. view: results[2]
  40005. };
  40006. });
  40007. });
  40008. });
  40009. handler.on('GetPageIndex', function wphSetupGetPageIndex(data) {
  40010. var ref = new Ref(data.ref.num, data.ref.gen);
  40011. var catalog = pdfManager.pdfDocument.catalog;
  40012. return catalog.getPageIndex(ref);
  40013. });
  40014. handler.on('GetDestinations',
  40015. function wphSetupGetDestinations(data) {
  40016. return pdfManager.ensureCatalog('destinations');
  40017. }
  40018. );
  40019. handler.on('GetAttachments',
  40020. function wphSetupGetAttachments(data) {
  40021. return pdfManager.ensureCatalog('attachments');
  40022. }
  40023. );
  40024. handler.on('GetJavaScript',
  40025. function wphSetupGetJavaScript(data) {
  40026. return pdfManager.ensureCatalog('javaScript');
  40027. }
  40028. );
  40029. handler.on('GetOutline',
  40030. function wphSetupGetOutline(data) {
  40031. return pdfManager.ensureCatalog('documentOutline');
  40032. }
  40033. );
  40034. handler.on('GetMetadata',
  40035. function wphSetupGetMetadata(data) {
  40036. return Promise.all([pdfManager.ensureDoc('documentInfo'),
  40037. pdfManager.ensureCatalog('metadata')]);
  40038. }
  40039. );
  40040. handler.on('GetData', function wphSetupGetData(data) {
  40041. pdfManager.requestLoadedStream();
  40042. return pdfManager.onLoadedStream().then(function(stream) {
  40043. return stream.bytes;
  40044. });
  40045. });
  40046. handler.on('UpdatePassword', function wphSetupUpdatePassword(data) {
  40047. pdfManager.updatePassword(data);
  40048. });
  40049. handler.on('GetAnnotations', function wphSetupGetAnnotations(data) {
  40050. return pdfManager.getPage(data.pageIndex).then(function(page) {
  40051. return pdfManager.ensure(page, 'getAnnotationsData', []);
  40052. });
  40053. });
  40054. handler.on('RenderPageRequest', function wphSetupRenderPage(data) {
  40055. pdfManager.getPage(data.pageIndex).then(function(page) {
  40056. var pageNum = data.pageIndex + 1;
  40057. var start = Date.now();
  40058. // Pre compile the pdf page and fetch the fonts/images.
  40059. page.getOperatorList(handler, data.intent).then(function(operatorList) {
  40060. info('page=' + pageNum + ' - getOperatorList: time=' +
  40061. (Date.now() - start) + 'ms, len=' + operatorList.fnArray.length);
  40062. }, function(e) {
  40063. var minimumStackMessage =
  40064. 'worker.js: while trying to getPage() and getOperatorList()';
  40065. var wrappedException;
  40066. // Turn the error into an obj that can be serialized
  40067. if (typeof e === 'string') {
  40068. wrappedException = {
  40069. message: e,
  40070. stack: minimumStackMessage
  40071. };
  40072. } else if (typeof e === 'object') {
  40073. wrappedException = {
  40074. message: e.message || e.toString(),
  40075. stack: e.stack || minimumStackMessage
  40076. };
  40077. } else {
  40078. wrappedException = {
  40079. message: 'Unknown exception type: ' + (typeof e),
  40080. stack: minimumStackMessage
  40081. };
  40082. }
  40083. handler.send('PageError', {
  40084. pageNum: pageNum,
  40085. error: wrappedException,
  40086. intent: data.intent
  40087. });
  40088. });
  40089. });
  40090. }, this);
  40091. handler.on('GetTextContent', function wphExtractText(data) {
  40092. return pdfManager.getPage(data.pageIndex).then(function(page) {
  40093. var pageNum = data.pageIndex + 1;
  40094. var start = Date.now();
  40095. return page.extractTextContent().then(function(textContent) {
  40096. info('text indexing: page=' + pageNum + ' - time=' +
  40097. (Date.now() - start) + 'ms');
  40098. return textContent;
  40099. });
  40100. });
  40101. });
  40102. handler.on('Cleanup', function wphCleanup(data) {
  40103. return pdfManager.cleanup();
  40104. });
  40105. handler.on('Terminate', function wphTerminate(data) {
  40106. pdfManager.terminate();
  40107. });
  40108. }
  40109. };
  40110. var consoleTimer = {};
  40111. var workerConsole = {
  40112. log: function log() {
  40113. var args = Array.prototype.slice.call(arguments);
  40114. globalScope.postMessage({
  40115. action: 'console_log',
  40116. data: args
  40117. });
  40118. },
  40119. error: function error() {
  40120. var args = Array.prototype.slice.call(arguments);
  40121. globalScope.postMessage({
  40122. action: 'console_error',
  40123. data: args
  40124. });
  40125. throw 'pdf.js execution error';
  40126. },
  40127. time: function time(name) {
  40128. consoleTimer[name] = Date.now();
  40129. },
  40130. timeEnd: function timeEnd(name) {
  40131. var time = consoleTimer[name];
  40132. if (!time) {
  40133. error('Unknown timer name ' + name);
  40134. }
  40135. this.log('Timer:', name, Date.now() - time);
  40136. }
  40137. };
  40138. // Worker thread?
  40139. if (typeof window === 'undefined') {
  40140. if (!('console' in globalScope)) {
  40141. globalScope.console = workerConsole;
  40142. }
  40143. // Listen for unsupported features so we can pass them on to the main thread.
  40144. PDFJS.UnsupportedManager.listen(function (msg) {
  40145. globalScope.postMessage({
  40146. action: '_unsupported_feature',
  40147. data: msg
  40148. });
  40149. });
  40150. var handler = new MessageHandler('worker_processor', this);
  40151. WorkerMessageHandler.setup(handler);
  40152. }
  40153. /* This class implements the QM Coder decoding as defined in
  40154. * JPEG 2000 Part I Final Committee Draft Version 1.0
  40155. * Annex C.3 Arithmetic decoding procedure
  40156. * available at http://www.jpeg.org/public/fcd15444-1.pdf
  40157. *
  40158. * The arithmetic decoder is used in conjunction with context models to decode
  40159. * JPEG2000 and JBIG2 streams.
  40160. */
  40161. var ArithmeticDecoder = (function ArithmeticDecoderClosure() {
  40162. // Table C-2
  40163. var QeTable = [
  40164. {qe: 0x5601, nmps: 1, nlps: 1, switchFlag: 1},
  40165. {qe: 0x3401, nmps: 2, nlps: 6, switchFlag: 0},
  40166. {qe: 0x1801, nmps: 3, nlps: 9, switchFlag: 0},
  40167. {qe: 0x0AC1, nmps: 4, nlps: 12, switchFlag: 0},
  40168. {qe: 0x0521, nmps: 5, nlps: 29, switchFlag: 0},
  40169. {qe: 0x0221, nmps: 38, nlps: 33, switchFlag: 0},
  40170. {qe: 0x5601, nmps: 7, nlps: 6, switchFlag: 1},
  40171. {qe: 0x5401, nmps: 8, nlps: 14, switchFlag: 0},
  40172. {qe: 0x4801, nmps: 9, nlps: 14, switchFlag: 0},
  40173. {qe: 0x3801, nmps: 10, nlps: 14, switchFlag: 0},
  40174. {qe: 0x3001, nmps: 11, nlps: 17, switchFlag: 0},
  40175. {qe: 0x2401, nmps: 12, nlps: 18, switchFlag: 0},
  40176. {qe: 0x1C01, nmps: 13, nlps: 20, switchFlag: 0},
  40177. {qe: 0x1601, nmps: 29, nlps: 21, switchFlag: 0},
  40178. {qe: 0x5601, nmps: 15, nlps: 14, switchFlag: 1},
  40179. {qe: 0x5401, nmps: 16, nlps: 14, switchFlag: 0},
  40180. {qe: 0x5101, nmps: 17, nlps: 15, switchFlag: 0},
  40181. {qe: 0x4801, nmps: 18, nlps: 16, switchFlag: 0},
  40182. {qe: 0x3801, nmps: 19, nlps: 17, switchFlag: 0},
  40183. {qe: 0x3401, nmps: 20, nlps: 18, switchFlag: 0},
  40184. {qe: 0x3001, nmps: 21, nlps: 19, switchFlag: 0},
  40185. {qe: 0x2801, nmps: 22, nlps: 19, switchFlag: 0},
  40186. {qe: 0x2401, nmps: 23, nlps: 20, switchFlag: 0},
  40187. {qe: 0x2201, nmps: 24, nlps: 21, switchFlag: 0},
  40188. {qe: 0x1C01, nmps: 25, nlps: 22, switchFlag: 0},
  40189. {qe: 0x1801, nmps: 26, nlps: 23, switchFlag: 0},
  40190. {qe: 0x1601, nmps: 27, nlps: 24, switchFlag: 0},
  40191. {qe: 0x1401, nmps: 28, nlps: 25, switchFlag: 0},
  40192. {qe: 0x1201, nmps: 29, nlps: 26, switchFlag: 0},
  40193. {qe: 0x1101, nmps: 30, nlps: 27, switchFlag: 0},
  40194. {qe: 0x0AC1, nmps: 31, nlps: 28, switchFlag: 0},
  40195. {qe: 0x09C1, nmps: 32, nlps: 29, switchFlag: 0},
  40196. {qe: 0x08A1, nmps: 33, nlps: 30, switchFlag: 0},
  40197. {qe: 0x0521, nmps: 34, nlps: 31, switchFlag: 0},
  40198. {qe: 0x0441, nmps: 35, nlps: 32, switchFlag: 0},
  40199. {qe: 0x02A1, nmps: 36, nlps: 33, switchFlag: 0},
  40200. {qe: 0x0221, nmps: 37, nlps: 34, switchFlag: 0},
  40201. {qe: 0x0141, nmps: 38, nlps: 35, switchFlag: 0},
  40202. {qe: 0x0111, nmps: 39, nlps: 36, switchFlag: 0},
  40203. {qe: 0x0085, nmps: 40, nlps: 37, switchFlag: 0},
  40204. {qe: 0x0049, nmps: 41, nlps: 38, switchFlag: 0},
  40205. {qe: 0x0025, nmps: 42, nlps: 39, switchFlag: 0},
  40206. {qe: 0x0015, nmps: 43, nlps: 40, switchFlag: 0},
  40207. {qe: 0x0009, nmps: 44, nlps: 41, switchFlag: 0},
  40208. {qe: 0x0005, nmps: 45, nlps: 42, switchFlag: 0},
  40209. {qe: 0x0001, nmps: 45, nlps: 43, switchFlag: 0},
  40210. {qe: 0x5601, nmps: 46, nlps: 46, switchFlag: 0}
  40211. ];
  40212. // C.3.5 Initialisation of the decoder (INITDEC)
  40213. function ArithmeticDecoder(data, start, end) {
  40214. this.data = data;
  40215. this.bp = start;
  40216. this.dataEnd = end;
  40217. this.chigh = data[start];
  40218. this.clow = 0;
  40219. this.byteIn();
  40220. this.chigh = ((this.chigh << 7) & 0xFFFF) | ((this.clow >> 9) & 0x7F);
  40221. this.clow = (this.clow << 7) & 0xFFFF;
  40222. this.ct -= 7;
  40223. this.a = 0x8000;
  40224. }
  40225. ArithmeticDecoder.prototype = {
  40226. // C.3.4 Compressed data input (BYTEIN)
  40227. byteIn: function ArithmeticDecoder_byteIn() {
  40228. var data = this.data;
  40229. var bp = this.bp;
  40230. if (data[bp] == 0xFF) {
  40231. var b1 = data[bp + 1];
  40232. if (b1 > 0x8F) {
  40233. this.clow += 0xFF00;
  40234. this.ct = 8;
  40235. } else {
  40236. bp++;
  40237. this.clow += (data[bp] << 9);
  40238. this.ct = 7;
  40239. this.bp = bp;
  40240. }
  40241. } else {
  40242. bp++;
  40243. this.clow += bp < this.dataEnd ? (data[bp] << 8) : 0xFF00;
  40244. this.ct = 8;
  40245. this.bp = bp;
  40246. }
  40247. if (this.clow > 0xFFFF) {
  40248. this.chigh += (this.clow >> 16);
  40249. this.clow &= 0xFFFF;
  40250. }
  40251. },
  40252. // C.3.2 Decoding a decision (DECODE)
  40253. readBit: function ArithmeticDecoder_readBit(contexts, pos) {
  40254. // contexts are packed into 1 byte:
  40255. // highest 7 bits carry cx.index, lowest bit carries cx.mps
  40256. var cx_index = contexts[pos] >> 1, cx_mps = contexts[pos] & 1;
  40257. var qeTableIcx = QeTable[cx_index];
  40258. var qeIcx = qeTableIcx.qe;
  40259. var d;
  40260. var a = this.a - qeIcx;
  40261. if (this.chigh < qeIcx) {
  40262. // exchangeLps
  40263. if (a < qeIcx) {
  40264. a = qeIcx;
  40265. d = cx_mps;
  40266. cx_index = qeTableIcx.nmps;
  40267. } else {
  40268. a = qeIcx;
  40269. d = 1 ^ cx_mps;
  40270. if (qeTableIcx.switchFlag === 1) {
  40271. cx_mps = d;
  40272. }
  40273. cx_index = qeTableIcx.nlps;
  40274. }
  40275. } else {
  40276. this.chigh -= qeIcx;
  40277. if ((a & 0x8000) !== 0) {
  40278. this.a = a;
  40279. return cx_mps;
  40280. }
  40281. // exchangeMps
  40282. if (a < qeIcx) {
  40283. d = 1 ^ cx_mps;
  40284. if (qeTableIcx.switchFlag === 1) {
  40285. cx_mps = d;
  40286. }
  40287. cx_index = qeTableIcx.nlps;
  40288. } else {
  40289. d = cx_mps;
  40290. cx_index = qeTableIcx.nmps;
  40291. }
  40292. }
  40293. // C.3.3 renormD;
  40294. do {
  40295. if (this.ct === 0) {
  40296. this.byteIn();
  40297. }
  40298. a <<= 1;
  40299. this.chigh = ((this.chigh << 1) & 0xFFFF) | ((this.clow >> 15) & 1);
  40300. this.clow = (this.clow << 1) & 0xFFFF;
  40301. this.ct--;
  40302. } while ((a & 0x8000) === 0);
  40303. this.a = a;
  40304. contexts[pos] = cx_index << 1 | cx_mps;
  40305. return d;
  40306. }
  40307. };
  40308. return ArithmeticDecoder;
  40309. })();
  40310. var JpegImage = (function jpegImage() {
  40311. var dctZigZag = new Int32Array([
  40312. 0,
  40313. 1, 8,
  40314. 16, 9, 2,
  40315. 3, 10, 17, 24,
  40316. 32, 25, 18, 11, 4,
  40317. 5, 12, 19, 26, 33, 40,
  40318. 48, 41, 34, 27, 20, 13, 6,
  40319. 7, 14, 21, 28, 35, 42, 49, 56,
  40320. 57, 50, 43, 36, 29, 22, 15,
  40321. 23, 30, 37, 44, 51, 58,
  40322. 59, 52, 45, 38, 31,
  40323. 39, 46, 53, 60,
  40324. 61, 54, 47,
  40325. 55, 62,
  40326. 63
  40327. ]);
  40328. var dctCos1 = 4017; // cos(pi/16)
  40329. var dctSin1 = 799; // sin(pi/16)
  40330. var dctCos3 = 3406; // cos(3*pi/16)
  40331. var dctSin3 = 2276; // sin(3*pi/16)
  40332. var dctCos6 = 1567; // cos(6*pi/16)
  40333. var dctSin6 = 3784; // sin(6*pi/16)
  40334. var dctSqrt2 = 5793; // sqrt(2)
  40335. var dctSqrt1d2 = 2896; // sqrt(2) / 2
  40336. function constructor() {
  40337. }
  40338. function buildHuffmanTable(codeLengths, values) {
  40339. var k = 0, code = [], i, j, length = 16;
  40340. while (length > 0 && !codeLengths[length - 1]) {
  40341. length--;
  40342. }
  40343. code.push({children: [], index: 0});
  40344. var p = code[0], q;
  40345. for (i = 0; i < length; i++) {
  40346. for (j = 0; j < codeLengths[i]; j++) {
  40347. p = code.pop();
  40348. p.children[p.index] = values[k];
  40349. while (p.index > 0) {
  40350. p = code.pop();
  40351. }
  40352. p.index++;
  40353. code.push(p);
  40354. while (code.length <= i) {
  40355. code.push(q = {children: [], index: 0});
  40356. p.children[p.index] = q.children;
  40357. p = q;
  40358. }
  40359. k++;
  40360. }
  40361. if (i + 1 < length) {
  40362. // p here points to last code
  40363. code.push(q = {children: [], index: 0});
  40364. p.children[p.index] = q.children;
  40365. p = q;
  40366. }
  40367. }
  40368. return code[0].children;
  40369. }
  40370. function getBlockBufferOffset(component, row, col) {
  40371. return 64 * ((component.blocksPerLine + 1) * row + col);
  40372. }
  40373. function decodeScan(data, offset,
  40374. frame, components, resetInterval,
  40375. spectralStart, spectralEnd,
  40376. successivePrev, successive) {
  40377. var precision = frame.precision;
  40378. var samplesPerLine = frame.samplesPerLine;
  40379. var scanLines = frame.scanLines;
  40380. var mcusPerLine = frame.mcusPerLine;
  40381. var progressive = frame.progressive;
  40382. var maxH = frame.maxH, maxV = frame.maxV;
  40383. var startOffset = offset, bitsData = 0, bitsCount = 0;
  40384. function readBit() {
  40385. if (bitsCount > 0) {
  40386. bitsCount--;
  40387. return (bitsData >> bitsCount) & 1;
  40388. }
  40389. bitsData = data[offset++];
  40390. if (bitsData == 0xFF) {
  40391. var nextByte = data[offset++];
  40392. if (nextByte) {
  40393. throw 'unexpected marker: ' +
  40394. ((bitsData << 8) | nextByte).toString(16);
  40395. }
  40396. // unstuff 0
  40397. }
  40398. bitsCount = 7;
  40399. return bitsData >>> 7;
  40400. }
  40401. function decodeHuffman(tree) {
  40402. var node = tree;
  40403. var bit;
  40404. while ((bit = readBit()) !== null) {
  40405. node = node[bit];
  40406. if (typeof node === 'number') {
  40407. return node;
  40408. }
  40409. if (typeof node !== 'object') {
  40410. throw 'invalid huffman sequence';
  40411. }
  40412. }
  40413. return null;
  40414. }
  40415. function receive(length) {
  40416. var n = 0;
  40417. while (length > 0) {
  40418. var bit = readBit();
  40419. if (bit === null) {
  40420. return;
  40421. }
  40422. n = (n << 1) | bit;
  40423. length--;
  40424. }
  40425. return n;
  40426. }
  40427. function receiveAndExtend(length) {
  40428. var n = receive(length);
  40429. if (n >= 1 << (length - 1)) {
  40430. return n;
  40431. }
  40432. return n + (-1 << length) + 1;
  40433. }
  40434. function decodeBaseline(component, offset) {
  40435. var t = decodeHuffman(component.huffmanTableDC);
  40436. var diff = t === 0 ? 0 : receiveAndExtend(t);
  40437. component.blockData[offset] = (component.pred += diff);
  40438. var k = 1;
  40439. while (k < 64) {
  40440. var rs = decodeHuffman(component.huffmanTableAC);
  40441. var s = rs & 15, r = rs >> 4;
  40442. if (s === 0) {
  40443. if (r < 15) {
  40444. break;
  40445. }
  40446. k += 16;
  40447. continue;
  40448. }
  40449. k += r;
  40450. var z = dctZigZag[k];
  40451. component.blockData[offset + z] = receiveAndExtend(s);
  40452. k++;
  40453. }
  40454. }
  40455. function decodeDCFirst(component, offset) {
  40456. var t = decodeHuffman(component.huffmanTableDC);
  40457. var diff = t === 0 ? 0 : (receiveAndExtend(t) << successive);
  40458. component.blockData[offset] = (component.pred += diff);
  40459. }
  40460. function decodeDCSuccessive(component, offset) {
  40461. component.blockData[offset] |= readBit() << successive;
  40462. }
  40463. var eobrun = 0;
  40464. function decodeACFirst(component, offset) {
  40465. if (eobrun > 0) {
  40466. eobrun--;
  40467. return;
  40468. }
  40469. var k = spectralStart, e = spectralEnd;
  40470. while (k <= e) {
  40471. var rs = decodeHuffman(component.huffmanTableAC);
  40472. var s = rs & 15, r = rs >> 4;
  40473. if (s === 0) {
  40474. if (r < 15) {
  40475. eobrun = receive(r) + (1 << r) - 1;
  40476. break;
  40477. }
  40478. k += 16;
  40479. continue;
  40480. }
  40481. k += r;
  40482. var z = dctZigZag[k];
  40483. component.blockData[offset + z] =
  40484. receiveAndExtend(s) * (1 << successive);
  40485. k++;
  40486. }
  40487. }
  40488. var successiveACState = 0, successiveACNextValue;
  40489. function decodeACSuccessive(component, offset) {
  40490. var k = spectralStart;
  40491. var e = spectralEnd;
  40492. var r = 0;
  40493. var s;
  40494. var rs;
  40495. while (k <= e) {
  40496. var z = dctZigZag[k];
  40497. switch (successiveACState) {
  40498. case 0: // initial state
  40499. rs = decodeHuffman(component.huffmanTableAC);
  40500. s = rs & 15;
  40501. r = rs >> 4;
  40502. if (s === 0) {
  40503. if (r < 15) {
  40504. eobrun = receive(r) + (1 << r);
  40505. successiveACState = 4;
  40506. } else {
  40507. r = 16;
  40508. successiveACState = 1;
  40509. }
  40510. } else {
  40511. if (s !== 1) {
  40512. throw 'invalid ACn encoding';
  40513. }
  40514. successiveACNextValue = receiveAndExtend(s);
  40515. successiveACState = r ? 2 : 3;
  40516. }
  40517. continue;
  40518. case 1: // skipping r zero items
  40519. case 2:
  40520. if (component.blockData[offset + z]) {
  40521. component.blockData[offset + z] += (readBit() << successive);
  40522. } else {
  40523. r--;
  40524. if (r === 0) {
  40525. successiveACState = successiveACState == 2 ? 3 : 0;
  40526. }
  40527. }
  40528. break;
  40529. case 3: // set value for a zero item
  40530. if (component.blockData[offset + z]) {
  40531. component.blockData[offset + z] += (readBit() << successive);
  40532. } else {
  40533. component.blockData[offset + z] =
  40534. successiveACNextValue << successive;
  40535. successiveACState = 0;
  40536. }
  40537. break;
  40538. case 4: // eob
  40539. if (component.blockData[offset + z]) {
  40540. component.blockData[offset + z] += (readBit() << successive);
  40541. }
  40542. break;
  40543. }
  40544. k++;
  40545. }
  40546. if (successiveACState === 4) {
  40547. eobrun--;
  40548. if (eobrun === 0) {
  40549. successiveACState = 0;
  40550. }
  40551. }
  40552. }
  40553. function decodeMcu(component, decode, mcu, row, col) {
  40554. var mcuRow = (mcu / mcusPerLine) | 0;
  40555. var mcuCol = mcu % mcusPerLine;
  40556. var blockRow = mcuRow * component.v + row;
  40557. var blockCol = mcuCol * component.h + col;
  40558. var offset = getBlockBufferOffset(component, blockRow, blockCol);
  40559. decode(component, offset);
  40560. }
  40561. function decodeBlock(component, decode, mcu) {
  40562. var blockRow = (mcu / component.blocksPerLine) | 0;
  40563. var blockCol = mcu % component.blocksPerLine;
  40564. var offset = getBlockBufferOffset(component, blockRow, blockCol);
  40565. decode(component, offset);
  40566. }
  40567. var componentsLength = components.length;
  40568. var component, i, j, k, n;
  40569. var decodeFn;
  40570. if (progressive) {
  40571. if (spectralStart === 0) {
  40572. decodeFn = successivePrev === 0 ? decodeDCFirst : decodeDCSuccessive;
  40573. } else {
  40574. decodeFn = successivePrev === 0 ? decodeACFirst : decodeACSuccessive;
  40575. }
  40576. } else {
  40577. decodeFn = decodeBaseline;
  40578. }
  40579. var mcu = 0, marker;
  40580. var mcuExpected;
  40581. if (componentsLength == 1) {
  40582. mcuExpected = components[0].blocksPerLine * components[0].blocksPerColumn;
  40583. } else {
  40584. mcuExpected = mcusPerLine * frame.mcusPerColumn;
  40585. }
  40586. if (!resetInterval) {
  40587. resetInterval = mcuExpected;
  40588. }
  40589. var h, v;
  40590. while (mcu < mcuExpected) {
  40591. // reset interval stuff
  40592. for (i = 0; i < componentsLength; i++) {
  40593. components[i].pred = 0;
  40594. }
  40595. eobrun = 0;
  40596. if (componentsLength == 1) {
  40597. component = components[0];
  40598. for (n = 0; n < resetInterval; n++) {
  40599. decodeBlock(component, decodeFn, mcu);
  40600. mcu++;
  40601. }
  40602. } else {
  40603. for (n = 0; n < resetInterval; n++) {
  40604. for (i = 0; i < componentsLength; i++) {
  40605. component = components[i];
  40606. h = component.h;
  40607. v = component.v;
  40608. for (j = 0; j < v; j++) {
  40609. for (k = 0; k < h; k++) {
  40610. decodeMcu(component, decodeFn, mcu, j, k);
  40611. }
  40612. }
  40613. }
  40614. mcu++;
  40615. }
  40616. }
  40617. // find marker
  40618. bitsCount = 0;
  40619. marker = (data[offset] << 8) | data[offset + 1];
  40620. if (marker <= 0xFF00) {
  40621. throw 'marker was not found';
  40622. }
  40623. if (marker >= 0xFFD0 && marker <= 0xFFD7) { // RSTx
  40624. offset += 2;
  40625. } else {
  40626. break;
  40627. }
  40628. }
  40629. return offset - startOffset;
  40630. }
  40631. // A port of poppler's IDCT method which in turn is taken from:
  40632. // Christoph Loeffler, Adriaan Ligtenberg, George S. Moschytz,
  40633. // 'Practical Fast 1-D DCT Algorithms with 11 Multiplications',
  40634. // IEEE Intl. Conf. on Acoustics, Speech & Signal Processing, 1989,
  40635. // 988-991.
  40636. function quantizeAndInverse(component, blockBufferOffset, p) {
  40637. var qt = component.quantizationTable;
  40638. var v0, v1, v2, v3, v4, v5, v6, v7, t;
  40639. var i;
  40640. // dequant
  40641. for (i = 0; i < 64; i++) {
  40642. p[i] = component.blockData[blockBufferOffset + i] * qt[i];
  40643. }
  40644. // inverse DCT on rows
  40645. for (i = 0; i < 8; ++i) {
  40646. var row = 8 * i;
  40647. // check for all-zero AC coefficients
  40648. if (p[1 + row] === 0 && p[2 + row] === 0 && p[3 + row] === 0 &&
  40649. p[4 + row] === 0 && p[5 + row] === 0 && p[6 + row] === 0 &&
  40650. p[7 + row] === 0) {
  40651. t = (dctSqrt2 * p[0 + row] + 512) >> 10;
  40652. p[0 + row] = t;
  40653. p[1 + row] = t;
  40654. p[2 + row] = t;
  40655. p[3 + row] = t;
  40656. p[4 + row] = t;
  40657. p[5 + row] = t;
  40658. p[6 + row] = t;
  40659. p[7 + row] = t;
  40660. continue;
  40661. }
  40662. // stage 4
  40663. v0 = (dctSqrt2 * p[0 + row] + 128) >> 8;
  40664. v1 = (dctSqrt2 * p[4 + row] + 128) >> 8;
  40665. v2 = p[2 + row];
  40666. v3 = p[6 + row];
  40667. v4 = (dctSqrt1d2 * (p[1 + row] - p[7 + row]) + 128) >> 8;
  40668. v7 = (dctSqrt1d2 * (p[1 + row] + p[7 + row]) + 128) >> 8;
  40669. v5 = p[3 + row] << 4;
  40670. v6 = p[5 + row] << 4;
  40671. // stage 3
  40672. t = (v0 - v1+ 1) >> 1;
  40673. v0 = (v0 + v1 + 1) >> 1;
  40674. v1 = t;
  40675. t = (v2 * dctSin6 + v3 * dctCos6 + 128) >> 8;
  40676. v2 = (v2 * dctCos6 - v3 * dctSin6 + 128) >> 8;
  40677. v3 = t;
  40678. t = (v4 - v6 + 1) >> 1;
  40679. v4 = (v4 + v6 + 1) >> 1;
  40680. v6 = t;
  40681. t = (v7 + v5 + 1) >> 1;
  40682. v5 = (v7 - v5 + 1) >> 1;
  40683. v7 = t;
  40684. // stage 2
  40685. t = (v0 - v3 + 1) >> 1;
  40686. v0 = (v0 + v3 + 1) >> 1;
  40687. v3 = t;
  40688. t = (v1 - v2 + 1) >> 1;
  40689. v1 = (v1 + v2 + 1) >> 1;
  40690. v2 = t;
  40691. t = (v4 * dctSin3 + v7 * dctCos3 + 2048) >> 12;
  40692. v4 = (v4 * dctCos3 - v7 * dctSin3 + 2048) >> 12;
  40693. v7 = t;
  40694. t = (v5 * dctSin1 + v6 * dctCos1 + 2048) >> 12;
  40695. v5 = (v5 * dctCos1 - v6 * dctSin1 + 2048) >> 12;
  40696. v6 = t;
  40697. // stage 1
  40698. p[0 + row] = v0 + v7;
  40699. p[7 + row] = v0 - v7;
  40700. p[1 + row] = v1 + v6;
  40701. p[6 + row] = v1 - v6;
  40702. p[2 + row] = v2 + v5;
  40703. p[5 + row] = v2 - v5;
  40704. p[3 + row] = v3 + v4;
  40705. p[4 + row] = v3 - v4;
  40706. }
  40707. // inverse DCT on columns
  40708. for (i = 0; i < 8; ++i) {
  40709. var col = i;
  40710. // check for all-zero AC coefficients
  40711. if (p[1*8 + col] === 0 && p[2*8 + col] === 0 && p[3*8 + col] === 0 &&
  40712. p[4*8 + col] === 0 && p[5*8 + col] === 0 && p[6*8 + col] === 0 &&
  40713. p[7*8 + col] === 0) {
  40714. t = (dctSqrt2 * p[i+0] + 8192) >> 14;
  40715. p[0*8 + col] = t;
  40716. p[1*8 + col] = t;
  40717. p[2*8 + col] = t;
  40718. p[3*8 + col] = t;
  40719. p[4*8 + col] = t;
  40720. p[5*8 + col] = t;
  40721. p[6*8 + col] = t;
  40722. p[7*8 + col] = t;
  40723. continue;
  40724. }
  40725. // stage 4
  40726. v0 = (dctSqrt2 * p[0*8 + col] + 2048) >> 12;
  40727. v1 = (dctSqrt2 * p[4*8 + col] + 2048) >> 12;
  40728. v2 = p[2*8 + col];
  40729. v3 = p[6*8 + col];
  40730. v4 = (dctSqrt1d2 * (p[1*8 + col] - p[7*8 + col]) + 2048) >> 12;
  40731. v7 = (dctSqrt1d2 * (p[1*8 + col] + p[7*8 + col]) + 2048) >> 12;
  40732. v5 = p[3*8 + col];
  40733. v6 = p[5*8 + col];
  40734. // stage 3
  40735. t = (v0 - v1 + 1) >> 1;
  40736. v0 = (v0 + v1 + 1) >> 1;
  40737. v1 = t;
  40738. t = (v2 * dctSin6 + v3 * dctCos6 + 2048) >> 12;
  40739. v2 = (v2 * dctCos6 - v3 * dctSin6 + 2048) >> 12;
  40740. v3 = t;
  40741. t = (v4 - v6 + 1) >> 1;
  40742. v4 = (v4 + v6 + 1) >> 1;
  40743. v6 = t;
  40744. t = (v7 + v5 + 1) >> 1;
  40745. v5 = (v7 - v5 + 1) >> 1;
  40746. v7 = t;
  40747. // stage 2
  40748. t = (v0 - v3 + 1) >> 1;
  40749. v0 = (v0 + v3 + 1) >> 1;
  40750. v3 = t;
  40751. t = (v1 - v2 + 1) >> 1;
  40752. v1 = (v1 + v2 + 1) >> 1;
  40753. v2 = t;
  40754. t = (v4 * dctSin3 + v7 * dctCos3 + 2048) >> 12;
  40755. v4 = (v4 * dctCos3 - v7 * dctSin3 + 2048) >> 12;
  40756. v7 = t;
  40757. t = (v5 * dctSin1 + v6 * dctCos1 + 2048) >> 12;
  40758. v5 = (v5 * dctCos1 - v6 * dctSin1 + 2048) >> 12;
  40759. v6 = t;
  40760. // stage 1
  40761. p[0*8 + col] = v0 + v7;
  40762. p[7*8 + col] = v0 - v7;
  40763. p[1*8 + col] = v1 + v6;
  40764. p[6*8 + col] = v1 - v6;
  40765. p[2*8 + col] = v2 + v5;
  40766. p[5*8 + col] = v2 - v5;
  40767. p[3*8 + col] = v3 + v4;
  40768. p[4*8 + col] = v3 - v4;
  40769. }
  40770. // convert to 8-bit integers
  40771. for (i = 0; i < 64; ++i) {
  40772. var index = blockBufferOffset + i;
  40773. var q = p[i];
  40774. q = (q <= -2056) ? 0 : (q >= 2024) ? 255 : (q + 2056) >> 4;
  40775. component.blockData[index] = q;
  40776. }
  40777. }
  40778. function buildComponentData(frame, component) {
  40779. var lines = [];
  40780. var blocksPerLine = component.blocksPerLine;
  40781. var blocksPerColumn = component.blocksPerColumn;
  40782. var samplesPerLine = blocksPerLine << 3;
  40783. var computationBuffer = new Int32Array(64);
  40784. var i, j, ll = 0;
  40785. for (var blockRow = 0; blockRow < blocksPerColumn; blockRow++) {
  40786. for (var blockCol = 0; blockCol < blocksPerLine; blockCol++) {
  40787. var offset = getBlockBufferOffset(component, blockRow, blockCol);
  40788. quantizeAndInverse(component, offset, computationBuffer);
  40789. }
  40790. }
  40791. return component.blockData;
  40792. }
  40793. function clamp0to255(a) {
  40794. return a <= 0 ? 0 : a >= 255 ? 255 : a;
  40795. }
  40796. constructor.prototype = {
  40797. parse: function parse(data) {
  40798. function readUint16() {
  40799. var value = (data[offset] << 8) | data[offset + 1];
  40800. offset += 2;
  40801. return value;
  40802. }
  40803. function readDataBlock() {
  40804. var length = readUint16();
  40805. var array = data.subarray(offset, offset + length - 2);
  40806. offset += array.length;
  40807. return array;
  40808. }
  40809. function prepareComponents(frame) {
  40810. var mcusPerLine = Math.ceil(frame.samplesPerLine / 8 / frame.maxH);
  40811. var mcusPerColumn = Math.ceil(frame.scanLines / 8 / frame.maxV);
  40812. for (var i = 0; i < frame.components.length; i++) {
  40813. component = frame.components[i];
  40814. var blocksPerLine = Math.ceil(Math.ceil(frame.samplesPerLine / 8) *
  40815. component.h / frame.maxH);
  40816. var blocksPerColumn = Math.ceil(Math.ceil(frame.scanLines / 8) *
  40817. component.v / frame.maxV);
  40818. var blocksPerLineForMcu = mcusPerLine * component.h;
  40819. var blocksPerColumnForMcu = mcusPerColumn * component.v;
  40820. var blocksBufferSize = 64 * blocksPerColumnForMcu *
  40821. (blocksPerLineForMcu + 1);
  40822. component.blockData = new Int16Array(blocksBufferSize);
  40823. component.blocksPerLine = blocksPerLine;
  40824. component.blocksPerColumn = blocksPerColumn;
  40825. }
  40826. frame.mcusPerLine = mcusPerLine;
  40827. frame.mcusPerColumn = mcusPerColumn;
  40828. }
  40829. var offset = 0, length = data.length;
  40830. var jfif = null;
  40831. var adobe = null;
  40832. var pixels = null;
  40833. var frame, resetInterval;
  40834. var quantizationTables = [];
  40835. var huffmanTablesAC = [], huffmanTablesDC = [];
  40836. var fileMarker = readUint16();
  40837. if (fileMarker != 0xFFD8) { // SOI (Start of Image)
  40838. throw 'SOI not found';
  40839. }
  40840. fileMarker = readUint16();
  40841. while (fileMarker != 0xFFD9) { // EOI (End of image)
  40842. var i, j, l;
  40843. switch(fileMarker) {
  40844. case 0xFFE0: // APP0 (Application Specific)
  40845. case 0xFFE1: // APP1
  40846. case 0xFFE2: // APP2
  40847. case 0xFFE3: // APP3
  40848. case 0xFFE4: // APP4
  40849. case 0xFFE5: // APP5
  40850. case 0xFFE6: // APP6
  40851. case 0xFFE7: // APP7
  40852. case 0xFFE8: // APP8
  40853. case 0xFFE9: // APP9
  40854. case 0xFFEA: // APP10
  40855. case 0xFFEB: // APP11
  40856. case 0xFFEC: // APP12
  40857. case 0xFFED: // APP13
  40858. case 0xFFEE: // APP14
  40859. case 0xFFEF: // APP15
  40860. case 0xFFFE: // COM (Comment)
  40861. var appData = readDataBlock();
  40862. if (fileMarker === 0xFFE0) {
  40863. if (appData[0] === 0x4A && appData[1] === 0x46 &&
  40864. appData[2] === 0x49 && appData[3] === 0x46 &&
  40865. appData[4] === 0) { // 'JFIF\x00'
  40866. jfif = {
  40867. version: { major: appData[5], minor: appData[6] },
  40868. densityUnits: appData[7],
  40869. xDensity: (appData[8] << 8) | appData[9],
  40870. yDensity: (appData[10] << 8) | appData[11],
  40871. thumbWidth: appData[12],
  40872. thumbHeight: appData[13],
  40873. thumbData: appData.subarray(14, 14 +
  40874. 3 * appData[12] * appData[13])
  40875. };
  40876. }
  40877. }
  40878. // TODO APP1 - Exif
  40879. if (fileMarker === 0xFFEE) {
  40880. if (appData[0] === 0x41 && appData[1] === 0x64 &&
  40881. appData[2] === 0x6F && appData[3] === 0x62 &&
  40882. appData[4] === 0x65 && appData[5] === 0) { // 'Adobe\x00'
  40883. adobe = {
  40884. version: appData[6],
  40885. flags0: (appData[7] << 8) | appData[8],
  40886. flags1: (appData[9] << 8) | appData[10],
  40887. transformCode: appData[11]
  40888. };
  40889. }
  40890. }
  40891. break;
  40892. case 0xFFDB: // DQT (Define Quantization Tables)
  40893. var quantizationTablesLength = readUint16();
  40894. var quantizationTablesEnd = quantizationTablesLength + offset - 2;
  40895. var z;
  40896. while (offset < quantizationTablesEnd) {
  40897. var quantizationTableSpec = data[offset++];
  40898. var tableData = new Int32Array(64);
  40899. if ((quantizationTableSpec >> 4) === 0) { // 8 bit values
  40900. for (j = 0; j < 64; j++) {
  40901. z = dctZigZag[j];
  40902. tableData[z] = data[offset++];
  40903. }
  40904. } else if ((quantizationTableSpec >> 4) === 1) { //16 bit
  40905. for (j = 0; j < 64; j++) {
  40906. z = dctZigZag[j];
  40907. tableData[z] = readUint16();
  40908. }
  40909. } else {
  40910. throw 'DQT: invalid table spec';
  40911. }
  40912. quantizationTables[quantizationTableSpec & 15] = tableData;
  40913. }
  40914. break;
  40915. case 0xFFC0: // SOF0 (Start of Frame, Baseline DCT)
  40916. case 0xFFC1: // SOF1 (Start of Frame, Extended DCT)
  40917. case 0xFFC2: // SOF2 (Start of Frame, Progressive DCT)
  40918. if (frame) {
  40919. throw 'Only single frame JPEGs supported';
  40920. }
  40921. readUint16(); // skip data length
  40922. frame = {};
  40923. frame.extended = (fileMarker === 0xFFC1);
  40924. frame.progressive = (fileMarker === 0xFFC2);
  40925. frame.precision = data[offset++];
  40926. frame.scanLines = readUint16();
  40927. frame.samplesPerLine = readUint16();
  40928. frame.components = [];
  40929. frame.componentIds = {};
  40930. var componentsCount = data[offset++], componentId;
  40931. var maxH = 0, maxV = 0;
  40932. for (i = 0; i < componentsCount; i++) {
  40933. componentId = data[offset];
  40934. var h = data[offset + 1] >> 4;
  40935. var v = data[offset + 1] & 15;
  40936. if (maxH < h) {
  40937. maxH = h;
  40938. }
  40939. if (maxV < v) {
  40940. maxV = v;
  40941. }
  40942. var qId = data[offset + 2];
  40943. l = frame.components.push({
  40944. h: h,
  40945. v: v,
  40946. quantizationTable: quantizationTables[qId]
  40947. });
  40948. frame.componentIds[componentId] = l - 1;
  40949. offset += 3;
  40950. }
  40951. frame.maxH = maxH;
  40952. frame.maxV = maxV;
  40953. prepareComponents(frame);
  40954. break;
  40955. case 0xFFC4: // DHT (Define Huffman Tables)
  40956. var huffmanLength = readUint16();
  40957. for (i = 2; i < huffmanLength;) {
  40958. var huffmanTableSpec = data[offset++];
  40959. var codeLengths = new Uint8Array(16);
  40960. var codeLengthSum = 0;
  40961. for (j = 0; j < 16; j++, offset++) {
  40962. codeLengthSum += (codeLengths[j] = data[offset]);
  40963. }
  40964. var huffmanValues = new Uint8Array(codeLengthSum);
  40965. for (j = 0; j < codeLengthSum; j++, offset++) {
  40966. huffmanValues[j] = data[offset];
  40967. }
  40968. i += 17 + codeLengthSum;
  40969. ((huffmanTableSpec >> 4) === 0 ?
  40970. huffmanTablesDC : huffmanTablesAC)[huffmanTableSpec & 15] =
  40971. buildHuffmanTable(codeLengths, huffmanValues);
  40972. }
  40973. break;
  40974. case 0xFFDD: // DRI (Define Restart Interval)
  40975. readUint16(); // skip data length
  40976. resetInterval = readUint16();
  40977. break;
  40978. case 0xFFDA: // SOS (Start of Scan)
  40979. var scanLength = readUint16();
  40980. var selectorsCount = data[offset++];
  40981. var components = [], component;
  40982. for (i = 0; i < selectorsCount; i++) {
  40983. var componentIndex = frame.componentIds[data[offset++]];
  40984. component = frame.components[componentIndex];
  40985. var tableSpec = data[offset++];
  40986. component.huffmanTableDC = huffmanTablesDC[tableSpec >> 4];
  40987. component.huffmanTableAC = huffmanTablesAC[tableSpec & 15];
  40988. components.push(component);
  40989. }
  40990. var spectralStart = data[offset++];
  40991. var spectralEnd = data[offset++];
  40992. var successiveApproximation = data[offset++];
  40993. var processed = decodeScan(data, offset,
  40994. frame, components, resetInterval,
  40995. spectralStart, spectralEnd,
  40996. successiveApproximation >> 4, successiveApproximation & 15);
  40997. offset += processed;
  40998. break;
  40999. default:
  41000. if (data[offset - 3] == 0xFF &&
  41001. data[offset - 2] >= 0xC0 && data[offset - 2] <= 0xFE) {
  41002. // could be incorrect encoding -- last 0xFF byte of the previous
  41003. // block was eaten by the encoder
  41004. offset -= 3;
  41005. break;
  41006. }
  41007. throw 'unknown JPEG marker ' + fileMarker.toString(16);
  41008. }
  41009. fileMarker = readUint16();
  41010. }
  41011. this.width = frame.samplesPerLine;
  41012. this.height = frame.scanLines;
  41013. this.jfif = jfif;
  41014. this.adobe = adobe;
  41015. this.components = [];
  41016. for (i = 0; i < frame.components.length; i++) {
  41017. component = frame.components[i];
  41018. this.components.push({
  41019. output: buildComponentData(frame, component),
  41020. scaleX: component.h / frame.maxH,
  41021. scaleY: component.v / frame.maxV,
  41022. blocksPerLine: component.blocksPerLine,
  41023. blocksPerColumn: component.blocksPerColumn
  41024. });
  41025. }
  41026. this.numComponents = this.components.length;
  41027. },
  41028. _getLinearizedBlockData: function getLinearizedBlockData(width, height) {
  41029. var scaleX = this.width / width, scaleY = this.height / height;
  41030. var component, componentScaleX, componentScaleY, blocksPerScanline;
  41031. var x, y, i, j;
  41032. var index;
  41033. var offset = 0;
  41034. var output;
  41035. var numComponents = this.components.length;
  41036. var dataLength = width * height * numComponents;
  41037. var data = new Uint8Array(dataLength);
  41038. var xScaleBlockOffset = new Uint32Array(width);
  41039. var mask3LSB = 0xfffffff8; // used to clear the 3 LSBs
  41040. for (i = 0; i < numComponents; i++) {
  41041. component = this.components[i];
  41042. componentScaleX = component.scaleX * scaleX;
  41043. componentScaleY = component.scaleY * scaleY;
  41044. offset = i;
  41045. output = component.output;
  41046. blocksPerScanline = (component.blocksPerLine + 1) << 3;
  41047. // precalculate the xScaleBlockOffset
  41048. for (x = 0; x < width; x++) {
  41049. j = 0 | (x * componentScaleX);
  41050. xScaleBlockOffset[x] = ((j & mask3LSB) << 3) | (j & 7);
  41051. }
  41052. // linearize the blocks of the component
  41053. for (y = 0; y < height; y++) {
  41054. j = 0 | (y * componentScaleY);
  41055. index = blocksPerScanline * (j & mask3LSB) | ((j & 7) << 3);
  41056. for (x = 0; x < width; x++) {
  41057. data[offset] = output[index + xScaleBlockOffset[x]];
  41058. offset += numComponents;
  41059. }
  41060. }
  41061. }
  41062. return data;
  41063. },
  41064. _isColorConversionNeeded: function isColorConversionNeeded() {
  41065. if (this.adobe && this.adobe.transformCode) {
  41066. // The adobe transform marker overrides any previous setting
  41067. return true;
  41068. } else if (this.numComponents == 3) {
  41069. return true;
  41070. } else if (typeof this.colorTransform !== 'undefined') {
  41071. return !!this.colorTransform;
  41072. } else {
  41073. return false;
  41074. }
  41075. },
  41076. _convertYccToRgb: function convertYccToRgb(data) {
  41077. var Y, Cb, Cr;
  41078. for (var i = 0; i < data.length; i += this.numComponents) {
  41079. Y = data[i ];
  41080. Cb = data[i + 1];
  41081. Cr = data[i + 2];
  41082. data[i ] = clamp0to255(Y - 179.456 + 1.402 * Cr);
  41083. data[i + 1] = clamp0to255(Y + 135.459 - 0.344 * Cb - 0.714 * Cr);
  41084. data[i + 2] = clamp0to255(Y - 226.816 + 1.772 * Cb);
  41085. }
  41086. return data;
  41087. },
  41088. _convertYcckToRgb: function convertYcckToRgb(data) {
  41089. var Y, Cb, Cr, k, CbCb, CbCr, CbY, Cbk, CrCr, Crk, CrY, YY, Yk, kk;
  41090. var offset = 0;
  41091. for (var i = 0; i < data.length; i += this.numComponents) {
  41092. Y = data[i];
  41093. Cb = data[i + 1];
  41094. Cr = data[i + 2];
  41095. k = data[i + 3];
  41096. CbCb = Cb * Cb;
  41097. CbCr = Cb * Cr;
  41098. CbY = Cb * Y;
  41099. Cbk = Cb * k;
  41100. CrCr = Cr * Cr;
  41101. Crk = Cr * k;
  41102. CrY = Cr * Y;
  41103. YY = Y * Y;
  41104. Yk = Y * k;
  41105. kk = k * k;
  41106. var r = - 122.67195406894 -
  41107. 6.60635669420364e-5 * CbCb + 0.000437130475926232 * CbCr -
  41108. 5.4080610064599e-5* CbY + 0.00048449797120281* Cbk -
  41109. 0.154362151871126 * Cb - 0.000957964378445773 * CrCr +
  41110. 0.000817076911346625 * CrY - 0.00477271405408747 * Crk +
  41111. 1.53380253221734 * Cr + 0.000961250184130688 * YY -
  41112. 0.00266257332283933 * Yk + 0.48357088451265 * Y -
  41113. 0.000336197177618394 * kk + 0.484791561490776 * k;
  41114. var g = 107.268039397724 +
  41115. 2.19927104525741e-5 * CbCb - 0.000640992018297945 * CbCr +
  41116. 0.000659397001245577* CbY + 0.000426105652938837* Cbk -
  41117. 0.176491792462875 * Cb - 0.000778269941513683 * CrCr +
  41118. 0.00130872261408275 * CrY + 0.000770482631801132 * Crk -
  41119. 0.151051492775562 * Cr + 0.00126935368114843 * YY -
  41120. 0.00265090189010898 * Yk + 0.25802910206845 * Y -
  41121. 0.000318913117588328 * kk - 0.213742400323665 * k;
  41122. var b = - 20.810012546947 -
  41123. 0.000570115196973677 * CbCb - 2.63409051004589e-5 * CbCr +
  41124. 0.0020741088115012* CbY - 0.00288260236853442* Cbk +
  41125. 0.814272968359295 * Cb - 1.53496057440975e-5 * CrCr -
  41126. 0.000132689043961446 * CrY + 0.000560833691242812 * Crk -
  41127. 0.195152027534049 * Cr + 0.00174418132927582 * YY -
  41128. 0.00255243321439347 * Yk + 0.116935020465145 * Y -
  41129. 0.000343531996510555 * kk + 0.24165260232407 * k;
  41130. data[offset++] = clamp0to255(r);
  41131. data[offset++] = clamp0to255(g);
  41132. data[offset++] = clamp0to255(b);
  41133. }
  41134. return data;
  41135. },
  41136. _convertYcckToCmyk: function convertYcckToCmyk(data) {
  41137. var Y, Cb, Cr;
  41138. for (var i = 0; i < data.length; i += this.numComponents) {
  41139. Y = data[i];
  41140. Cb = data[i + 1];
  41141. Cr = data[i + 2];
  41142. data[i ] = clamp0to255(434.456 - Y - 1.402 * Cr);
  41143. data[i + 1] = clamp0to255(119.541 - Y + 0.344 * Cb + 0.714 * Cr);
  41144. data[i + 2] = clamp0to255(481.816 - Y - 1.772 * Cb);
  41145. // K in data[i + 3] is unchanged
  41146. }
  41147. return data;
  41148. },
  41149. _convertCmykToRgb: function convertCmykToRgb(data) {
  41150. var c, m, y, k;
  41151. var offset = 0;
  41152. var length = data.length;
  41153. var min = -255 * 255 * 255;
  41154. var scale = 1 / 255 / 255;
  41155. for (var i = 0; i < length;) {
  41156. c = data[i++];
  41157. m = data[i++];
  41158. y = data[i++];
  41159. k = data[i++];
  41160. var r =
  41161. c * (-4.387332384609988 * c + 54.48615194189176 * m +
  41162. 18.82290502165302 * y + 212.25662451639585 * k -
  41163. 72734.4411664936) +
  41164. m * (1.7149763477362134 * m - 5.6096736904047315 * y -
  41165. 17.873870861415444 * k - 1401.7366389350734) +
  41166. y * (-2.5217340131683033 * y - 21.248923337353073 * k +
  41167. 4465.541406466231) -
  41168. k * (21.86122147463605 * k + 48317.86113160301);
  41169. var g =
  41170. c * (8.841041422036149 * c + 60.118027045597366 * m +
  41171. 6.871425592049007 * y + 31.159100130055922 * k -
  41172. 20220.756542821975) +
  41173. m * (-15.310361306967817 * m + 17.575251261109482 * y +
  41174. 131.35250912493976 * k - 48691.05921601825) +
  41175. y * (4.444339102852739 * y + 9.8632861493405 * k -
  41176. 6341.191035517494) -
  41177. k * (20.737325471181034 * k + 47890.15695978492);
  41178. var b =
  41179. c * (0.8842522430003296 * c + 8.078677503112928 * m +
  41180. 30.89978309703729 * y - 0.23883238689178934 * k -
  41181. 3616.812083916688) +
  41182. m * (10.49593273432072 * m + 63.02378494754052 * y +
  41183. 50.606957656360734 * k - 28620.90484698408) +
  41184. y * (0.03296041114873217 * y + 115.60384449646641 * k -
  41185. 49363.43385999684) -
  41186. k * (22.33816807309886 * k + 45932.16563550634);
  41187. data[offset++] = r >= 0 ? 255 : r <= min ? 0 : 255 + r * scale | 0;
  41188. data[offset++] = g >= 0 ? 255 : g <= min ? 0 : 255 + g * scale | 0;
  41189. data[offset++] = b >= 0 ? 255 : b <= min ? 0 : 255 + b * scale | 0;
  41190. }
  41191. return data;
  41192. },
  41193. getData: function getData(width, height, forceRGBoutput) {
  41194. if (this.numComponents > 4) {
  41195. throw 'Unsupported color mode';
  41196. }
  41197. // type of data: Uint8Array(width * height * numComponents)
  41198. var data = this._getLinearizedBlockData(width, height);
  41199. if (this.numComponents === 3) {
  41200. return this._convertYccToRgb(data);
  41201. } else if (this.numComponents === 4) {
  41202. if (this._isColorConversionNeeded()) {
  41203. if (forceRGBoutput) {
  41204. return this._convertYcckToRgb(data);
  41205. } else {
  41206. return this._convertYcckToCmyk(data);
  41207. }
  41208. } else {
  41209. return this._convertCmykToRgb(data);
  41210. }
  41211. }
  41212. return data;
  41213. }
  41214. };
  41215. return constructor;
  41216. })();
  41217. var JpxImage = (function JpxImageClosure() {
  41218. // Table E.1
  41219. var SubbandsGainLog2 = {
  41220. 'LL': 0,
  41221. 'LH': 1,
  41222. 'HL': 1,
  41223. 'HH': 2
  41224. };
  41225. function JpxImage() {
  41226. this.failOnCorruptedImage = false;
  41227. }
  41228. JpxImage.prototype = {
  41229. load: function JpxImage_load(url) {
  41230. var xhr = new XMLHttpRequest();
  41231. xhr.open('GET', url, true);
  41232. xhr.responseType = 'arraybuffer';
  41233. xhr.onload = (function() {
  41234. // TODO catch parse error
  41235. var data = new Uint8Array(xhr.response || xhr.mozResponseArrayBuffer);
  41236. this.parse(data);
  41237. if (this.onload) {
  41238. this.onload();
  41239. }
  41240. }).bind(this);
  41241. xhr.send(null);
  41242. },
  41243. parse: function JpxImage_parse(data) {
  41244. var head = readUint16(data, 0);
  41245. // No box header, immediate start of codestream (SOC)
  41246. if (head === 0xFF4F) {
  41247. this.parseCodestream(data, 0, data.length);
  41248. return;
  41249. }
  41250. var position = 0, length = data.length;
  41251. while (position < length) {
  41252. var headerSize = 8;
  41253. var lbox = readUint32(data, position);
  41254. var tbox = readUint32(data, position + 4);
  41255. position += headerSize;
  41256. if (lbox === 1) {
  41257. // XLBox: read UInt64 according to spec.
  41258. // JavaScript's int precision of 53 bit should be sufficient here.
  41259. lbox = readUint32(data, position) * 4294967296 +
  41260. readUint32(data, position + 4);
  41261. position += 8;
  41262. headerSize += 8;
  41263. }
  41264. if (lbox === 0) {
  41265. lbox = length - position + headerSize;
  41266. }
  41267. if (lbox < headerSize) {
  41268. error('JPX error: Invalid box field size');
  41269. }
  41270. var dataLength = lbox - headerSize;
  41271. var jumpDataLength = true;
  41272. switch (tbox) {
  41273. case 0x6A501A1A: // 'jP\032\032'
  41274. // TODO
  41275. break;
  41276. case 0x6A703268: // 'jp2h'
  41277. jumpDataLength = false; // parsing child boxes
  41278. break;
  41279. case 0x636F6C72: // 'colr'
  41280. // TODO
  41281. break;
  41282. case 0x6A703263: // 'jp2c'
  41283. this.parseCodestream(data, position, position + dataLength);
  41284. break;
  41285. }
  41286. if (jumpDataLength) {
  41287. position += dataLength;
  41288. }
  41289. }
  41290. },
  41291. parseImageProperties: function JpxImage_parseImageProperties(stream) {
  41292. try {
  41293. var newByte = stream.getByte();
  41294. while (newByte >= 0) {
  41295. var oldByte = newByte;
  41296. newByte = stream.getByte();
  41297. var code = (oldByte << 8) | newByte;
  41298. // Image and tile size (SIZ)
  41299. if (code == 0xFF51) {
  41300. stream.skip(4);
  41301. var Xsiz = stream.getInt32() >>> 0; // Byte 4
  41302. var Ysiz = stream.getInt32() >>> 0; // Byte 8
  41303. var XOsiz = stream.getInt32() >>> 0; // Byte 12
  41304. var YOsiz = stream.getInt32() >>> 0; // Byte 16
  41305. stream.skip(16);
  41306. var Csiz = stream.getUint16(); // Byte 36
  41307. this.width = Xsiz - XOsiz;
  41308. this.height = Ysiz - YOsiz;
  41309. this.componentsCount = Csiz;
  41310. // Results are always returned as Uint8Arrays
  41311. this.bitsPerComponent = 8;
  41312. return;
  41313. }
  41314. }
  41315. throw 'No size marker found in JPX stream';
  41316. } catch (e) {
  41317. if (this.failOnCorruptedImage) {
  41318. error('JPX error: ' + e);
  41319. } else {
  41320. warn('JPX error: ' + e + '. Trying to recover');
  41321. }
  41322. }
  41323. },
  41324. parseCodestream: function JpxImage_parseCodestream(data, start, end) {
  41325. var context = {};
  41326. try {
  41327. var position = start;
  41328. while (position + 1 < end) {
  41329. var code = readUint16(data, position);
  41330. position += 2;
  41331. var length = 0, j, sqcd, spqcds, spqcdSize, scalarExpounded, tile;
  41332. switch (code) {
  41333. case 0xFF4F: // Start of codestream (SOC)
  41334. context.mainHeader = true;
  41335. break;
  41336. case 0xFFD9: // End of codestream (EOC)
  41337. break;
  41338. case 0xFF51: // Image and tile size (SIZ)
  41339. length = readUint16(data, position);
  41340. var siz = {};
  41341. siz.Xsiz = readUint32(data, position + 4);
  41342. siz.Ysiz = readUint32(data, position + 8);
  41343. siz.XOsiz = readUint32(data, position + 12);
  41344. siz.YOsiz = readUint32(data, position + 16);
  41345. siz.XTsiz = readUint32(data, position + 20);
  41346. siz.YTsiz = readUint32(data, position + 24);
  41347. siz.XTOsiz = readUint32(data, position + 28);
  41348. siz.YTOsiz = readUint32(data, position + 32);
  41349. var componentsCount = readUint16(data, position + 36);
  41350. siz.Csiz = componentsCount;
  41351. var components = [];
  41352. j = position + 38;
  41353. for (var i = 0; i < componentsCount; i++) {
  41354. var component = {
  41355. precision: (data[j] & 0x7F) + 1,
  41356. isSigned: !!(data[j] & 0x80),
  41357. XRsiz: data[j + 1],
  41358. YRsiz: data[j + 1]
  41359. };
  41360. calculateComponentDimensions(component, siz);
  41361. components.push(component);
  41362. }
  41363. context.SIZ = siz;
  41364. context.components = components;
  41365. calculateTileGrids(context, components);
  41366. context.QCC = [];
  41367. context.COC = [];
  41368. break;
  41369. case 0xFF5C: // Quantization default (QCD)
  41370. length = readUint16(data, position);
  41371. var qcd = {};
  41372. j = position + 2;
  41373. sqcd = data[j++];
  41374. switch (sqcd & 0x1F) {
  41375. case 0:
  41376. spqcdSize = 8;
  41377. scalarExpounded = true;
  41378. break;
  41379. case 1:
  41380. spqcdSize = 16;
  41381. scalarExpounded = false;
  41382. break;
  41383. case 2:
  41384. spqcdSize = 16;
  41385. scalarExpounded = true;
  41386. break;
  41387. default:
  41388. throw 'Invalid SQcd value ' + sqcd;
  41389. }
  41390. qcd.noQuantization = (spqcdSize == 8);
  41391. qcd.scalarExpounded = scalarExpounded;
  41392. qcd.guardBits = sqcd >> 5;
  41393. spqcds = [];
  41394. while (j < length + position) {
  41395. var spqcd = {};
  41396. if (spqcdSize == 8) {
  41397. spqcd.epsilon = data[j++] >> 3;
  41398. spqcd.mu = 0;
  41399. } else {
  41400. spqcd.epsilon = data[j] >> 3;
  41401. spqcd.mu = ((data[j] & 0x7) << 8) | data[j + 1];
  41402. j += 2;
  41403. }
  41404. spqcds.push(spqcd);
  41405. }
  41406. qcd.SPqcds = spqcds;
  41407. if (context.mainHeader) {
  41408. context.QCD = qcd;
  41409. } else {
  41410. context.currentTile.QCD = qcd;
  41411. context.currentTile.QCC = [];
  41412. }
  41413. break;
  41414. case 0xFF5D: // Quantization component (QCC)
  41415. length = readUint16(data, position);
  41416. var qcc = {};
  41417. j = position + 2;
  41418. var cqcc;
  41419. if (context.SIZ.Csiz < 257) {
  41420. cqcc = data[j++];
  41421. } else {
  41422. cqcc = readUint16(data, j);
  41423. j += 2;
  41424. }
  41425. sqcd = data[j++];
  41426. switch (sqcd & 0x1F) {
  41427. case 0:
  41428. spqcdSize = 8;
  41429. scalarExpounded = true;
  41430. break;
  41431. case 1:
  41432. spqcdSize = 16;
  41433. scalarExpounded = false;
  41434. break;
  41435. case 2:
  41436. spqcdSize = 16;
  41437. scalarExpounded = true;
  41438. break;
  41439. default:
  41440. throw 'Invalid SQcd value ' + sqcd;
  41441. }
  41442. qcc.noQuantization = (spqcdSize == 8);
  41443. qcc.scalarExpounded = scalarExpounded;
  41444. qcc.guardBits = sqcd >> 5;
  41445. spqcds = [];
  41446. while (j < (length + position)) {
  41447. spqcd = {};
  41448. if (spqcdSize == 8) {
  41449. spqcd.epsilon = data[j++] >> 3;
  41450. spqcd.mu = 0;
  41451. } else {
  41452. spqcd.epsilon = data[j] >> 3;
  41453. spqcd.mu = ((data[j] & 0x7) << 8) | data[j + 1];
  41454. j += 2;
  41455. }
  41456. spqcds.push(spqcd);
  41457. }
  41458. qcc.SPqcds = spqcds;
  41459. if (context.mainHeader) {
  41460. context.QCC[cqcc] = qcc;
  41461. } else {
  41462. context.currentTile.QCC[cqcc] = qcc;
  41463. }
  41464. break;
  41465. case 0xFF52: // Coding style default (COD)
  41466. length = readUint16(data, position);
  41467. var cod = {};
  41468. j = position + 2;
  41469. var scod = data[j++];
  41470. cod.entropyCoderWithCustomPrecincts = !!(scod & 1);
  41471. cod.sopMarkerUsed = !!(scod & 2);
  41472. cod.ephMarkerUsed = !!(scod & 4);
  41473. cod.progressionOrder = data[j++];
  41474. cod.layersCount = readUint16(data, j);
  41475. j += 2;
  41476. cod.multipleComponentTransform = data[j++];
  41477. cod.decompositionLevelsCount = data[j++];
  41478. cod.xcb = (data[j++] & 0xF) + 2;
  41479. cod.ycb = (data[j++] & 0xF) + 2;
  41480. var blockStyle = data[j++];
  41481. cod.selectiveArithmeticCodingBypass = !!(blockStyle & 1);
  41482. cod.resetContextProbabilities = !!(blockStyle & 2);
  41483. cod.terminationOnEachCodingPass = !!(blockStyle & 4);
  41484. cod.verticalyStripe = !!(blockStyle & 8);
  41485. cod.predictableTermination = !!(blockStyle & 16);
  41486. cod.segmentationSymbolUsed = !!(blockStyle & 32);
  41487. cod.reversibleTransformation = data[j++];
  41488. if (cod.entropyCoderWithCustomPrecincts) {
  41489. var precinctsSizes = [];
  41490. while (j < length + position) {
  41491. var precinctsSize = data[j++];
  41492. precinctsSizes.push({
  41493. PPx: precinctsSize & 0xF,
  41494. PPy: precinctsSize >> 4
  41495. });
  41496. }
  41497. cod.precinctsSizes = precinctsSizes;
  41498. }
  41499. if (cod.sopMarkerUsed || cod.ephMarkerUsed ||
  41500. cod.selectiveArithmeticCodingBypass ||
  41501. cod.resetContextProbabilities ||
  41502. cod.terminationOnEachCodingPass ||
  41503. cod.verticalyStripe || cod.predictableTermination) {
  41504. throw 'Unsupported COD options: ' +
  41505. globalScope.JSON.stringify(cod);
  41506. }
  41507. if (context.mainHeader) {
  41508. context.COD = cod;
  41509. } else {
  41510. context.currentTile.COD = cod;
  41511. context.currentTile.COC = [];
  41512. }
  41513. break;
  41514. case 0xFF90: // Start of tile-part (SOT)
  41515. length = readUint16(data, position);
  41516. tile = {};
  41517. tile.index = readUint16(data, position + 2);
  41518. tile.length = readUint32(data, position + 4);
  41519. tile.dataEnd = tile.length + position - 2;
  41520. tile.partIndex = data[position + 8];
  41521. tile.partsCount = data[position + 9];
  41522. context.mainHeader = false;
  41523. if (tile.partIndex === 0) {
  41524. // reset component specific settings
  41525. tile.COD = context.COD;
  41526. tile.COC = context.COC.slice(0); // clone of the global COC
  41527. tile.QCD = context.QCD;
  41528. tile.QCC = context.QCC.slice(0); // clone of the global COC
  41529. }
  41530. context.currentTile = tile;
  41531. break;
  41532. case 0xFF93: // Start of data (SOD)
  41533. tile = context.currentTile;
  41534. if (tile.partIndex === 0) {
  41535. initializeTile(context, tile.index);
  41536. buildPackets(context);
  41537. }
  41538. // moving to the end of the data
  41539. length = tile.dataEnd - position;
  41540. parseTilePackets(context, data, position, length);
  41541. break;
  41542. case 0xFF64: // Comment (COM)
  41543. length = readUint16(data, position);
  41544. // skipping content
  41545. break;
  41546. case 0xFF53: // Coding style component (COC)
  41547. throw 'Codestream code 0xFF53 (COC) is not implemented';
  41548. default:
  41549. throw 'Unknown codestream code: ' + code.toString(16);
  41550. }
  41551. position += length;
  41552. }
  41553. } catch (e) {
  41554. if (this.failOnCorruptedImage) {
  41555. error('JPX error: ' + e);
  41556. } else {
  41557. warn('JPX error: ' + e + '. Trying to recover');
  41558. }
  41559. }
  41560. this.tiles = transformComponents(context);
  41561. this.width = context.SIZ.Xsiz - context.SIZ.XOsiz;
  41562. this.height = context.SIZ.Ysiz - context.SIZ.YOsiz;
  41563. this.componentsCount = context.SIZ.Csiz;
  41564. }
  41565. };
  41566. function calculateComponentDimensions(component, siz) {
  41567. // Section B.2 Component mapping
  41568. component.x0 = Math.ceil(siz.XOsiz / component.XRsiz);
  41569. component.x1 = Math.ceil(siz.Xsiz / component.XRsiz);
  41570. component.y0 = Math.ceil(siz.YOsiz / component.YRsiz);
  41571. component.y1 = Math.ceil(siz.Ysiz / component.YRsiz);
  41572. component.width = component.x1 - component.x0;
  41573. component.height = component.y1 - component.y0;
  41574. }
  41575. function calculateTileGrids(context, components) {
  41576. var siz = context.SIZ;
  41577. // Section B.3 Division into tile and tile-components
  41578. var tile, tiles = [];
  41579. var numXtiles = Math.ceil((siz.Xsiz - siz.XTOsiz) / siz.XTsiz);
  41580. var numYtiles = Math.ceil((siz.Ysiz - siz.YTOsiz) / siz.YTsiz);
  41581. for (var q = 0; q < numYtiles; q++) {
  41582. for (var p = 0; p < numXtiles; p++) {
  41583. tile = {};
  41584. tile.tx0 = Math.max(siz.XTOsiz + p * siz.XTsiz, siz.XOsiz);
  41585. tile.ty0 = Math.max(siz.YTOsiz + q * siz.YTsiz, siz.YOsiz);
  41586. tile.tx1 = Math.min(siz.XTOsiz + (p + 1) * siz.XTsiz, siz.Xsiz);
  41587. tile.ty1 = Math.min(siz.YTOsiz + (q + 1) * siz.YTsiz, siz.Ysiz);
  41588. tile.width = tile.tx1 - tile.tx0;
  41589. tile.height = tile.ty1 - tile.ty0;
  41590. tile.components = [];
  41591. tiles.push(tile);
  41592. }
  41593. }
  41594. context.tiles = tiles;
  41595. var componentsCount = siz.Csiz;
  41596. for (var i = 0, ii = componentsCount; i < ii; i++) {
  41597. var component = components[i];
  41598. for (var j = 0, jj = tiles.length; j < jj; j++) {
  41599. var tileComponent = {};
  41600. tile = tiles[j];
  41601. tileComponent.tcx0 = Math.ceil(tile.tx0 / component.XRsiz);
  41602. tileComponent.tcy0 = Math.ceil(tile.ty0 / component.YRsiz);
  41603. tileComponent.tcx1 = Math.ceil(tile.tx1 / component.XRsiz);
  41604. tileComponent.tcy1 = Math.ceil(tile.ty1 / component.YRsiz);
  41605. tileComponent.width = tileComponent.tcx1 - tileComponent.tcx0;
  41606. tileComponent.height = tileComponent.tcy1 - tileComponent.tcy0;
  41607. tile.components[i] = tileComponent;
  41608. }
  41609. }
  41610. }
  41611. function getBlocksDimensions(context, component, r) {
  41612. var codOrCoc = component.codingStyleParameters;
  41613. var result = {};
  41614. if (!codOrCoc.entropyCoderWithCustomPrecincts) {
  41615. result.PPx = 15;
  41616. result.PPy = 15;
  41617. } else {
  41618. result.PPx = codOrCoc.precinctsSizes[r].PPx;
  41619. result.PPy = codOrCoc.precinctsSizes[r].PPy;
  41620. }
  41621. // calculate codeblock size as described in section B.7
  41622. result.xcb_ = (r > 0 ? Math.min(codOrCoc.xcb, result.PPx - 1) :
  41623. Math.min(codOrCoc.xcb, result.PPx));
  41624. result.ycb_ = (r > 0 ? Math.min(codOrCoc.ycb, result.PPy - 1) :
  41625. Math.min(codOrCoc.ycb, result.PPy));
  41626. return result;
  41627. }
  41628. function buildPrecincts(context, resolution, dimensions) {
  41629. // Section B.6 Division resolution to precincts
  41630. var precinctWidth = 1 << dimensions.PPx;
  41631. var precinctHeight = 1 << dimensions.PPy;
  41632. var numprecinctswide = (resolution.trx1 > resolution.trx0 ?
  41633. Math.ceil(resolution.trx1 / precinctWidth) -
  41634. Math.floor(resolution.trx0 / precinctWidth) : 0);
  41635. var numprecinctshigh = (resolution.try1 > resolution.try0 ?
  41636. Math.ceil(resolution.try1 / precinctHeight) -
  41637. Math.floor(resolution.try0 / precinctHeight) : 0);
  41638. var numprecincts = numprecinctswide * numprecinctshigh;
  41639. var precinctXOffset = Math.floor(resolution.trx0 / precinctWidth) *
  41640. precinctWidth;
  41641. var precinctYOffset = Math.floor(resolution.try0 / precinctHeight) *
  41642. precinctHeight;
  41643. resolution.precinctParameters = {
  41644. precinctXOffset: precinctXOffset,
  41645. precinctYOffset: precinctYOffset,
  41646. precinctWidth: precinctWidth,
  41647. precinctHeight: precinctHeight,
  41648. numprecinctswide: numprecinctswide,
  41649. numprecinctshigh: numprecinctshigh,
  41650. numprecincts: numprecincts
  41651. };
  41652. }
  41653. function buildCodeblocks(context, subband, dimensions) {
  41654. // Section B.7 Division sub-band into code-blocks
  41655. var xcb_ = dimensions.xcb_;
  41656. var ycb_ = dimensions.ycb_;
  41657. var codeblockWidth = 1 << xcb_;
  41658. var codeblockHeight = 1 << ycb_;
  41659. var cbx0 = subband.tbx0 >> xcb_;
  41660. var cby0 = subband.tby0 >> ycb_;
  41661. var cbx1 = (subband.tbx1 + codeblockWidth - 1) >> xcb_;
  41662. var cby1 = (subband.tby1 + codeblockHeight - 1) >> ycb_;
  41663. var precinctParameters = subband.resolution.precinctParameters;
  41664. var codeblocks = [];
  41665. var precincts = [];
  41666. var i, j, codeblock, precinctNumber;
  41667. for (j = cby0; j < cby1; j++) {
  41668. for (i = cbx0; i < cbx1; i++) {
  41669. codeblock = {
  41670. cbx: i,
  41671. cby: j,
  41672. tbx0: codeblockWidth * i,
  41673. tby0: codeblockHeight * j,
  41674. tbx1: codeblockWidth * (i + 1),
  41675. tby1: codeblockHeight * (j + 1)
  41676. };
  41677. // calculate precinct number
  41678. var pi = Math.floor((codeblock.tbx0 -
  41679. precinctParameters.precinctXOffset) /
  41680. precinctParameters.precinctWidth);
  41681. var pj = Math.floor((codeblock.tby0 -
  41682. precinctParameters.precinctYOffset) /
  41683. precinctParameters.precinctHeight);
  41684. precinctNumber = pj + pi * precinctParameters.numprecinctswide;
  41685. codeblock.tbx0_ = Math.max(subband.tbx0, codeblock.tbx0);
  41686. codeblock.tby0_ = Math.max(subband.tby0, codeblock.tby0);
  41687. codeblock.tbx1_ = Math.min(subband.tbx1, codeblock.tbx1);
  41688. codeblock.tby1_ = Math.min(subband.tby1, codeblock.tby1);
  41689. codeblock.precinctNumber = precinctNumber;
  41690. codeblock.subbandType = subband.type;
  41691. codeblock.Lblock = 3;
  41692. codeblocks.push(codeblock);
  41693. // building precinct for the sub-band
  41694. var precinct = precincts[precinctNumber];
  41695. if (precinct !== undefined) {
  41696. if (i < precinct.cbxMin) {
  41697. precinct.cbxMin = i;
  41698. } else if (i > precinct.cbxMax) {
  41699. precinct.cbxMax = i;
  41700. }
  41701. if (j < precinct.cbyMin) {
  41702. precinct.cbxMin = j;
  41703. } else if (j > precinct.cbyMax) {
  41704. precinct.cbyMax = j;
  41705. }
  41706. } else {
  41707. precincts[precinctNumber] = precinct = {
  41708. cbxMin: i,
  41709. cbyMin: j,
  41710. cbxMax: i,
  41711. cbyMax: j
  41712. };
  41713. }
  41714. codeblock.precinct = precinct;
  41715. }
  41716. }
  41717. subband.codeblockParameters = {
  41718. codeblockWidth: xcb_,
  41719. codeblockHeight: ycb_,
  41720. numcodeblockwide: cbx1 - cbx0 + 1,
  41721. numcodeblockhigh: cby1 - cby1 + 1
  41722. };
  41723. subband.codeblocks = codeblocks;
  41724. subband.precincts = precincts;
  41725. }
  41726. function createPacket(resolution, precinctNumber, layerNumber) {
  41727. var precinctCodeblocks = [];
  41728. // Section B.10.8 Order of info in packet
  41729. var subbands = resolution.subbands;
  41730. // sub-bands already ordered in 'LL', 'HL', 'LH', and 'HH' sequence
  41731. for (var i = 0, ii = subbands.length; i < ii; i++) {
  41732. var subband = subbands[i];
  41733. var codeblocks = subband.codeblocks;
  41734. for (var j = 0, jj = codeblocks.length; j < jj; j++) {
  41735. var codeblock = codeblocks[j];
  41736. if (codeblock.precinctNumber != precinctNumber) {
  41737. continue;
  41738. }
  41739. precinctCodeblocks.push(codeblock);
  41740. }
  41741. }
  41742. return {
  41743. layerNumber: layerNumber,
  41744. codeblocks: precinctCodeblocks
  41745. };
  41746. }
  41747. function LayerResolutionComponentPositionIterator(context) {
  41748. var siz = context.SIZ;
  41749. var tileIndex = context.currentTile.index;
  41750. var tile = context.tiles[tileIndex];
  41751. var layersCount = tile.codingStyleDefaultParameters.layersCount;
  41752. var componentsCount = siz.Csiz;
  41753. var maxDecompositionLevelsCount = 0;
  41754. for (var q = 0; q < componentsCount; q++) {
  41755. maxDecompositionLevelsCount = Math.max(maxDecompositionLevelsCount,
  41756. tile.components[q].codingStyleParameters.decompositionLevelsCount);
  41757. }
  41758. var l = 0, r = 0, i = 0, k = 0;
  41759. this.nextPacket = function JpxImage_nextPacket() {
  41760. // Section B.12.1.1 Layer-resolution-component-position
  41761. for (; l < layersCount; l++) {
  41762. for (; r <= maxDecompositionLevelsCount; r++) {
  41763. for (; i < componentsCount; i++) {
  41764. var component = tile.components[i];
  41765. if (r > component.codingStyleParameters.decompositionLevelsCount) {
  41766. continue;
  41767. }
  41768. var resolution = component.resolutions[r];
  41769. var numprecincts = resolution.precinctParameters.numprecincts;
  41770. for (; k < numprecincts;) {
  41771. var packet = createPacket(resolution, k, l);
  41772. k++;
  41773. return packet;
  41774. }
  41775. k = 0;
  41776. }
  41777. i = 0;
  41778. }
  41779. r = 0;
  41780. }
  41781. throw 'Out of packets';
  41782. };
  41783. }
  41784. function ResolutionLayerComponentPositionIterator(context) {
  41785. var siz = context.SIZ;
  41786. var tileIndex = context.currentTile.index;
  41787. var tile = context.tiles[tileIndex];
  41788. var layersCount = tile.codingStyleDefaultParameters.layersCount;
  41789. var componentsCount = siz.Csiz;
  41790. var maxDecompositionLevelsCount = 0;
  41791. for (var q = 0; q < componentsCount; q++) {
  41792. maxDecompositionLevelsCount = Math.max(maxDecompositionLevelsCount,
  41793. tile.components[q].codingStyleParameters.decompositionLevelsCount);
  41794. }
  41795. var r = 0, l = 0, i = 0, k = 0;
  41796. this.nextPacket = function JpxImage_nextPacket() {
  41797. // Section B.12.1.2 Resolution-layer-component-position
  41798. for (; r <= maxDecompositionLevelsCount; r++) {
  41799. for (; l < layersCount; l++) {
  41800. for (; i < componentsCount; i++) {
  41801. var component = tile.components[i];
  41802. if (r > component.codingStyleParameters.decompositionLevelsCount) {
  41803. continue;
  41804. }
  41805. var resolution = component.resolutions[r];
  41806. var numprecincts = resolution.precinctParameters.numprecincts;
  41807. for (; k < numprecincts;) {
  41808. var packet = createPacket(resolution, k, l);
  41809. k++;
  41810. return packet;
  41811. }
  41812. k = 0;
  41813. }
  41814. i = 0;
  41815. }
  41816. l = 0;
  41817. }
  41818. throw 'Out of packets';
  41819. };
  41820. }
  41821. function buildPackets(context) {
  41822. var siz = context.SIZ;
  41823. var tileIndex = context.currentTile.index;
  41824. var tile = context.tiles[tileIndex];
  41825. var componentsCount = siz.Csiz;
  41826. // Creating resolutions and sub-bands for each component
  41827. for (var c = 0; c < componentsCount; c++) {
  41828. var component = tile.components[c];
  41829. var decompositionLevelsCount =
  41830. component.codingStyleParameters.decompositionLevelsCount;
  41831. // Section B.5 Resolution levels and sub-bands
  41832. var resolutions = [];
  41833. var subbands = [];
  41834. for (var r = 0; r <= decompositionLevelsCount; r++) {
  41835. var blocksDimensions = getBlocksDimensions(context, component, r);
  41836. var resolution = {};
  41837. var scale = 1 << (decompositionLevelsCount - r);
  41838. resolution.trx0 = Math.ceil(component.tcx0 / scale);
  41839. resolution.try0 = Math.ceil(component.tcy0 / scale);
  41840. resolution.trx1 = Math.ceil(component.tcx1 / scale);
  41841. resolution.try1 = Math.ceil(component.tcy1 / scale);
  41842. buildPrecincts(context, resolution, blocksDimensions);
  41843. resolutions.push(resolution);
  41844. var subband;
  41845. if (r === 0) {
  41846. // one sub-band (LL) with last decomposition
  41847. subband = {};
  41848. subband.type = 'LL';
  41849. subband.tbx0 = Math.ceil(component.tcx0 / scale);
  41850. subband.tby0 = Math.ceil(component.tcy0 / scale);
  41851. subband.tbx1 = Math.ceil(component.tcx1 / scale);
  41852. subband.tby1 = Math.ceil(component.tcy1 / scale);
  41853. subband.resolution = resolution;
  41854. buildCodeblocks(context, subband, blocksDimensions);
  41855. subbands.push(subband);
  41856. resolution.subbands = [subband];
  41857. } else {
  41858. var bscale = 1 << (decompositionLevelsCount - r + 1);
  41859. var resolutionSubbands = [];
  41860. // three sub-bands (HL, LH and HH) with rest of decompositions
  41861. subband = {};
  41862. subband.type = 'HL';
  41863. subband.tbx0 = Math.ceil(component.tcx0 / bscale - 0.5);
  41864. subband.tby0 = Math.ceil(component.tcy0 / bscale);
  41865. subband.tbx1 = Math.ceil(component.tcx1 / bscale - 0.5);
  41866. subband.tby1 = Math.ceil(component.tcy1 / bscale);
  41867. subband.resolution = resolution;
  41868. buildCodeblocks(context, subband, blocksDimensions);
  41869. subbands.push(subband);
  41870. resolutionSubbands.push(subband);
  41871. subband = {};
  41872. subband.type = 'LH';
  41873. subband.tbx0 = Math.ceil(component.tcx0 / bscale);
  41874. subband.tby0 = Math.ceil(component.tcy0 / bscale - 0.5);
  41875. subband.tbx1 = Math.ceil(component.tcx1 / bscale);
  41876. subband.tby1 = Math.ceil(component.tcy1 / bscale - 0.5);
  41877. subband.resolution = resolution;
  41878. buildCodeblocks(context, subband, blocksDimensions);
  41879. subbands.push(subband);
  41880. resolutionSubbands.push(subband);
  41881. subband = {};
  41882. subband.type = 'HH';
  41883. subband.tbx0 = Math.ceil(component.tcx0 / bscale - 0.5);
  41884. subband.tby0 = Math.ceil(component.tcy0 / bscale - 0.5);
  41885. subband.tbx1 = Math.ceil(component.tcx1 / bscale - 0.5);
  41886. subband.tby1 = Math.ceil(component.tcy1 / bscale - 0.5);
  41887. subband.resolution = resolution;
  41888. buildCodeblocks(context, subband, blocksDimensions);
  41889. subbands.push(subband);
  41890. resolutionSubbands.push(subband);
  41891. resolution.subbands = resolutionSubbands;
  41892. }
  41893. }
  41894. component.resolutions = resolutions;
  41895. component.subbands = subbands;
  41896. }
  41897. // Generate the packets sequence
  41898. var progressionOrder = tile.codingStyleDefaultParameters.progressionOrder;
  41899. switch (progressionOrder) {
  41900. case 0:
  41901. tile.packetsIterator =
  41902. new LayerResolutionComponentPositionIterator(context);
  41903. break;
  41904. case 1:
  41905. tile.packetsIterator =
  41906. new ResolutionLayerComponentPositionIterator(context);
  41907. break;
  41908. default:
  41909. throw 'Unsupported progression order ' + progressionOrder;
  41910. }
  41911. }
  41912. function parseTilePackets(context, data, offset, dataLength) {
  41913. var position = 0;
  41914. var buffer, bufferSize = 0, skipNextBit = false;
  41915. function readBits(count) {
  41916. while (bufferSize < count) {
  41917. var b = data[offset + position];
  41918. position++;
  41919. if (skipNextBit) {
  41920. buffer = (buffer << 7) | b;
  41921. bufferSize += 7;
  41922. skipNextBit = false;
  41923. } else {
  41924. buffer = (buffer << 8) | b;
  41925. bufferSize += 8;
  41926. }
  41927. if (b == 0xFF) {
  41928. skipNextBit = true;
  41929. }
  41930. }
  41931. bufferSize -= count;
  41932. return (buffer >>> bufferSize) & ((1 << count) - 1);
  41933. }
  41934. function alignToByte() {
  41935. bufferSize = 0;
  41936. if (skipNextBit) {
  41937. position++;
  41938. skipNextBit = false;
  41939. }
  41940. }
  41941. function readCodingpasses() {
  41942. if (readBits(1) === 0) {
  41943. return 1;
  41944. }
  41945. if (readBits(1) === 0) {
  41946. return 2;
  41947. }
  41948. var value = readBits(2);
  41949. if (value < 3) {
  41950. return value + 3;
  41951. }
  41952. value = readBits(5);
  41953. if (value < 31) {
  41954. return value + 6;
  41955. }
  41956. value = readBits(7);
  41957. return value + 37;
  41958. }
  41959. var tileIndex = context.currentTile.index;
  41960. var tile = context.tiles[tileIndex];
  41961. var packetsIterator = tile.packetsIterator;
  41962. while (position < dataLength) {
  41963. var packet = packetsIterator.nextPacket();
  41964. if (!readBits(1)) {
  41965. alignToByte();
  41966. continue;
  41967. }
  41968. var layerNumber = packet.layerNumber;
  41969. var queue = [], codeblock;
  41970. for (var i = 0, ii = packet.codeblocks.length; i < ii; i++) {
  41971. codeblock = packet.codeblocks[i];
  41972. var precinct = codeblock.precinct;
  41973. var codeblockColumn = codeblock.cbx - precinct.cbxMin;
  41974. var codeblockRow = codeblock.cby - precinct.cbyMin;
  41975. var codeblockIncluded = false;
  41976. var firstTimeInclusion = false;
  41977. var valueReady;
  41978. if ('included' in codeblock) {
  41979. codeblockIncluded = !!readBits(1);
  41980. } else {
  41981. // reading inclusion tree
  41982. precinct = codeblock.precinct;
  41983. var inclusionTree, zeroBitPlanesTree;
  41984. if ('inclusionTree' in precinct) {
  41985. inclusionTree = precinct.inclusionTree;
  41986. } else {
  41987. // building inclusion and zero bit-planes trees
  41988. var width = precinct.cbxMax - precinct.cbxMin + 1;
  41989. var height = precinct.cbyMax - precinct.cbyMin + 1;
  41990. inclusionTree = new InclusionTree(width, height, layerNumber);
  41991. zeroBitPlanesTree = new TagTree(width, height);
  41992. precinct.inclusionTree = inclusionTree;
  41993. precinct.zeroBitPlanesTree = zeroBitPlanesTree;
  41994. }
  41995. if (inclusionTree.reset(codeblockColumn, codeblockRow, layerNumber)) {
  41996. while (true) {
  41997. if (readBits(1)) {
  41998. valueReady = !inclusionTree.nextLevel();
  41999. if (valueReady) {
  42000. codeblock.included = true;
  42001. codeblockIncluded = firstTimeInclusion = true;
  42002. break;
  42003. }
  42004. } else {
  42005. inclusionTree.incrementValue(layerNumber);
  42006. break;
  42007. }
  42008. }
  42009. }
  42010. }
  42011. if (!codeblockIncluded) {
  42012. continue;
  42013. }
  42014. if (firstTimeInclusion) {
  42015. zeroBitPlanesTree = precinct.zeroBitPlanesTree;
  42016. zeroBitPlanesTree.reset(codeblockColumn, codeblockRow);
  42017. while (true) {
  42018. if (readBits(1)) {
  42019. valueReady = !zeroBitPlanesTree.nextLevel();
  42020. if (valueReady) {
  42021. break;
  42022. }
  42023. } else {
  42024. zeroBitPlanesTree.incrementValue();
  42025. }
  42026. }
  42027. codeblock.zeroBitPlanes = zeroBitPlanesTree.value;
  42028. }
  42029. var codingpasses = readCodingpasses();
  42030. while (readBits(1)) {
  42031. codeblock.Lblock++;
  42032. }
  42033. var codingpassesLog2 = log2(codingpasses);
  42034. // rounding down log2
  42035. var bits = ((codingpasses < (1 << codingpassesLog2)) ?
  42036. codingpassesLog2 - 1 : codingpassesLog2) + codeblock.Lblock;
  42037. var codedDataLength = readBits(bits);
  42038. queue.push({
  42039. codeblock: codeblock,
  42040. codingpasses: codingpasses,
  42041. dataLength: codedDataLength
  42042. });
  42043. }
  42044. alignToByte();
  42045. while (queue.length > 0) {
  42046. var packetItem = queue.shift();
  42047. codeblock = packetItem.codeblock;
  42048. if (!('data' in codeblock)) {
  42049. codeblock.data = [];
  42050. }
  42051. codeblock.data.push({
  42052. data: data,
  42053. start: offset + position,
  42054. end: offset + position + packetItem.dataLength,
  42055. codingpasses: packetItem.codingpasses
  42056. });
  42057. position += packetItem.dataLength;
  42058. }
  42059. }
  42060. return position;
  42061. }
  42062. function copyCoefficients(coefficients, levelWidth, levelHeight, subband,
  42063. delta, mb, reversible, segmentationSymbolUsed) {
  42064. var x0 = subband.tbx0;
  42065. var y0 = subband.tby0;
  42066. var width = subband.tbx1 - subband.tbx0;
  42067. var codeblocks = subband.codeblocks;
  42068. var right = subband.type.charAt(0) === 'H' ? 1 : 0;
  42069. var bottom = subband.type.charAt(1) === 'H' ? levelWidth : 0;
  42070. for (var i = 0, ii = codeblocks.length; i < ii; ++i) {
  42071. var codeblock = codeblocks[i];
  42072. var blockWidth = codeblock.tbx1_ - codeblock.tbx0_;
  42073. var blockHeight = codeblock.tby1_ - codeblock.tby0_;
  42074. if (blockWidth === 0 || blockHeight === 0) {
  42075. continue;
  42076. }
  42077. if (!('data' in codeblock)) {
  42078. continue;
  42079. }
  42080. var bitModel, currentCodingpassType;
  42081. bitModel = new BitModel(blockWidth, blockHeight, codeblock.subbandType,
  42082. codeblock.zeroBitPlanes, mb);
  42083. currentCodingpassType = 2; // first bit plane starts from cleanup
  42084. // collect data
  42085. var data = codeblock.data, totalLength = 0, codingpasses = 0;
  42086. var j, jj, dataItem;
  42087. for (j = 0, jj = data.length; j < jj; j++) {
  42088. dataItem = data[j];
  42089. totalLength += dataItem.end - dataItem.start;
  42090. codingpasses += dataItem.codingpasses;
  42091. }
  42092. var encodedData = new Uint8Array(totalLength);
  42093. var position = 0;
  42094. for (j = 0, jj = data.length; j < jj; j++) {
  42095. dataItem = data[j];
  42096. var chunk = dataItem.data.subarray(dataItem.start, dataItem.end);
  42097. encodedData.set(chunk, position);
  42098. position += chunk.length;
  42099. }
  42100. // decoding the item
  42101. var decoder = new ArithmeticDecoder(encodedData, 0, totalLength);
  42102. bitModel.setDecoder(decoder);
  42103. for (j = 0; j < codingpasses; j++) {
  42104. switch (currentCodingpassType) {
  42105. case 0:
  42106. bitModel.runSignificancePropogationPass();
  42107. break;
  42108. case 1:
  42109. bitModel.runMagnitudeRefinementPass();
  42110. break;
  42111. case 2:
  42112. bitModel.runCleanupPass();
  42113. if (segmentationSymbolUsed) {
  42114. bitModel.checkSegmentationSymbol();
  42115. }
  42116. break;
  42117. }
  42118. currentCodingpassType = (currentCodingpassType + 1) % 3;
  42119. }
  42120. var offset = (codeblock.tbx0_ - x0) + (codeblock.tby0_ - y0) * width;
  42121. var sign = bitModel.coefficentsSign;
  42122. var magnitude = bitModel.coefficentsMagnitude;
  42123. var bitsDecoded = bitModel.bitsDecoded;
  42124. var magnitudeCorrection = reversible ? 0 : 0.5;
  42125. var k, n, nb;
  42126. position = 0;
  42127. // Do the interleaving of Section F.3.3 here, so we do not need
  42128. // to copy later. LL level is not interleaved, just copied.
  42129. var interleave = (subband.type !== 'LL');
  42130. for (j = 0; j < blockHeight; j++) {
  42131. var row = (offset / width) | 0; // row in the non-interleaved subband
  42132. var levelOffset = 2 * row * (levelWidth - width) + right + bottom;
  42133. for (k = 0; k < blockWidth; k++) {
  42134. n = magnitude[position];
  42135. if (n !== 0) {
  42136. n = (n + magnitudeCorrection) * delta;
  42137. if (sign[position] !== 0) {
  42138. n = -n;
  42139. }
  42140. nb = bitsDecoded[position];
  42141. var pos = interleave ? (levelOffset + (offset << 1)) : offset;
  42142. if (reversible && (nb >= mb)) {
  42143. coefficients[pos] = n;
  42144. } else {
  42145. coefficients[pos] = n * (1 << (mb - nb));
  42146. }
  42147. }
  42148. offset++;
  42149. position++;
  42150. }
  42151. offset += width - blockWidth;
  42152. }
  42153. }
  42154. }
  42155. function transformTile(context, tile, c) {
  42156. var component = tile.components[c];
  42157. var codingStyleParameters = component.codingStyleParameters;
  42158. var quantizationParameters = component.quantizationParameters;
  42159. var decompositionLevelsCount =
  42160. codingStyleParameters.decompositionLevelsCount;
  42161. var spqcds = quantizationParameters.SPqcds;
  42162. var scalarExpounded = quantizationParameters.scalarExpounded;
  42163. var guardBits = quantizationParameters.guardBits;
  42164. var segmentationSymbolUsed = codingStyleParameters.segmentationSymbolUsed;
  42165. var precision = context.components[c].precision;
  42166. var reversible = codingStyleParameters.reversibleTransformation;
  42167. var transform = (reversible ? new ReversibleTransform() :
  42168. new IrreversibleTransform());
  42169. var subbandCoefficients = [];
  42170. var b = 0;
  42171. for (var i = 0; i <= decompositionLevelsCount; i++) {
  42172. var resolution = component.resolutions[i];
  42173. var width = resolution.trx1 - resolution.trx0;
  42174. var height = resolution.try1 - resolution.try0;
  42175. // Allocate space for the whole sublevel.
  42176. var coefficients = new Float32Array(width * height);
  42177. for (var j = 0, jj = resolution.subbands.length; j < jj; j++) {
  42178. var mu, epsilon;
  42179. if (!scalarExpounded) {
  42180. // formula E-5
  42181. mu = spqcds[0].mu;
  42182. epsilon = spqcds[0].epsilon + (i > 0 ? 1 - i : 0);
  42183. } else {
  42184. mu = spqcds[b].mu;
  42185. epsilon = spqcds[b].epsilon;
  42186. b++;
  42187. }
  42188. var subband = resolution.subbands[j];
  42189. var gainLog2 = SubbandsGainLog2[subband.type];
  42190. // calulate quantization coefficient (Section E.1.1.1)
  42191. var delta = (reversible ? 1 :
  42192. Math.pow(2, precision + gainLog2 - epsilon) * (1 + mu / 2048));
  42193. var mb = (guardBits + epsilon - 1);
  42194. // In the first resolution level, copyCoefficients will fill the
  42195. // whole array with coefficients. In the succeding passes,
  42196. // copyCoefficients will consecutively fill in the values that belong
  42197. // to the interleaved positions of the HL, LH, and HH coefficients.
  42198. // The LL coefficients will then be interleaved in Transform.iterate().
  42199. copyCoefficients(coefficients, width, height, subband, delta, mb,
  42200. reversible, segmentationSymbolUsed);
  42201. }
  42202. subbandCoefficients.push({
  42203. width: width,
  42204. height: height,
  42205. items: coefficients
  42206. });
  42207. }
  42208. var result = transform.calculate(subbandCoefficients,
  42209. component.tcx0, component.tcy0);
  42210. return {
  42211. left: component.tcx0,
  42212. top: component.tcy0,
  42213. width: result.width,
  42214. height: result.height,
  42215. items: result.items
  42216. };
  42217. }
  42218. function transformComponents(context) {
  42219. var siz = context.SIZ;
  42220. var components = context.components;
  42221. var componentsCount = siz.Csiz;
  42222. var resultImages = [];
  42223. for (var i = 0, ii = context.tiles.length; i < ii; i++) {
  42224. var tile = context.tiles[i];
  42225. var transformedTiles = [];
  42226. var c;
  42227. for (c = 0; c < componentsCount; c++) {
  42228. transformedTiles[c] = transformTile(context, tile, c);
  42229. }
  42230. var tile0 = transformedTiles[0];
  42231. var out = new Uint8Array(tile0.items.length * componentsCount);
  42232. var result = {
  42233. left: tile0.left,
  42234. top: tile0.top,
  42235. width: tile0.width,
  42236. height: tile0.height,
  42237. items: out
  42238. };
  42239. // Section G.2.2 Inverse multi component transform
  42240. var shift, offset, max, min, maxK;
  42241. var pos = 0, j, jj, y0, y1, y2, r, g, b, k, val;
  42242. if (tile.codingStyleDefaultParameters.multipleComponentTransform) {
  42243. var fourComponents = componentsCount === 4;
  42244. var y0items = transformedTiles[0].items;
  42245. var y1items = transformedTiles[1].items;
  42246. var y2items = transformedTiles[2].items;
  42247. var y3items = fourComponents ? transformedTiles[3].items : null;
  42248. // HACK: The multiple component transform formulas below assume that
  42249. // all components have the same precision. With this in mind, we
  42250. // compute shift and offset only once.
  42251. shift = components[0].precision - 8;
  42252. offset = (128 << shift) + 0.5;
  42253. max = 255 * (1 << shift);
  42254. maxK = max * 0.5;
  42255. min = -maxK;
  42256. var component0 = tile.components[0];
  42257. var alpha01 = componentsCount - 3;
  42258. jj = y0items.length;
  42259. if (!component0.codingStyleParameters.reversibleTransformation) {
  42260. // inverse irreversible multiple component transform
  42261. for (j = 0; j < jj; j++, pos += alpha01) {
  42262. y0 = y0items[j] + offset;
  42263. y1 = y1items[j];
  42264. y2 = y2items[j];
  42265. r = y0 + 1.402 * y2;
  42266. g = y0 - 0.34413 * y1 - 0.71414 * y2;
  42267. b = y0 + 1.772 * y1;
  42268. out[pos++] = r <= 0 ? 0 : r >= max ? 255 : r >> shift;
  42269. out[pos++] = g <= 0 ? 0 : g >= max ? 255 : g >> shift;
  42270. out[pos++] = b <= 0 ? 0 : b >= max ? 255 : b >> shift;
  42271. }
  42272. } else {
  42273. // inverse reversible multiple component transform
  42274. for (j = 0; j < jj; j++, pos += alpha01) {
  42275. y0 = y0items[j] + offset;
  42276. y1 = y1items[j];
  42277. y2 = y2items[j];
  42278. g = y0 - ((y2 + y1) >> 2);
  42279. r = g + y2;
  42280. b = g + y1;
  42281. out[pos++] = r <= 0 ? 0 : r >= max ? 255 : r >> shift;
  42282. out[pos++] = g <= 0 ? 0 : g >= max ? 255 : g >> shift;
  42283. out[pos++] = b <= 0 ? 0 : b >= max ? 255 : b >> shift;
  42284. }
  42285. }
  42286. if (fourComponents) {
  42287. for (j = 0, pos = 3; j < jj; j++, pos += 4) {
  42288. k = y3items[j];
  42289. out[pos] = k <= min ? 0 : k >= maxK ? 255 : (k + offset) >> shift;
  42290. }
  42291. }
  42292. } else { // no multi-component transform
  42293. for (c = 0; c < componentsCount; c++) {
  42294. var items = transformedTiles[c].items;
  42295. shift = components[c].precision - 8;
  42296. offset = (128 << shift) + 0.5;
  42297. max = (127.5 * (1 << shift));
  42298. min = -max;
  42299. for (pos = c, j = 0, jj = items.length; j < jj; j++) {
  42300. val = items[j];
  42301. out[pos] = val <= min ? 0 :
  42302. val >= max ? 255 : (val + offset) >> shift;
  42303. pos += componentsCount;
  42304. }
  42305. }
  42306. }
  42307. resultImages.push(result);
  42308. }
  42309. return resultImages;
  42310. }
  42311. function initializeTile(context, tileIndex) {
  42312. var siz = context.SIZ;
  42313. var componentsCount = siz.Csiz;
  42314. var tile = context.tiles[tileIndex];
  42315. for (var c = 0; c < componentsCount; c++) {
  42316. var component = tile.components[c];
  42317. var qcdOrQcc = (c in context.currentTile.QCC ?
  42318. context.currentTile.QCC[c] : context.currentTile.QCD);
  42319. component.quantizationParameters = qcdOrQcc;
  42320. var codOrCoc = (c in context.currentTile.COC ?
  42321. context.currentTile.COC[c] : context.currentTile.COD);
  42322. component.codingStyleParameters = codOrCoc;
  42323. }
  42324. tile.codingStyleDefaultParameters = context.currentTile.COD;
  42325. }
  42326. // Section B.10.2 Tag trees
  42327. var TagTree = (function TagTreeClosure() {
  42328. function TagTree(width, height) {
  42329. var levelsLength = log2(Math.max(width, height)) + 1;
  42330. this.levels = [];
  42331. for (var i = 0; i < levelsLength; i++) {
  42332. var level = {
  42333. width: width,
  42334. height: height,
  42335. items: []
  42336. };
  42337. this.levels.push(level);
  42338. width = Math.ceil(width / 2);
  42339. height = Math.ceil(height / 2);
  42340. }
  42341. }
  42342. TagTree.prototype = {
  42343. reset: function TagTree_reset(i, j) {
  42344. var currentLevel = 0, value = 0, level;
  42345. while (currentLevel < this.levels.length) {
  42346. level = this.levels[currentLevel];
  42347. var index = i + j * level.width;
  42348. if (index in level.items) {
  42349. value = level.items[index];
  42350. break;
  42351. }
  42352. level.index = index;
  42353. i >>= 1;
  42354. j >>= 1;
  42355. currentLevel++;
  42356. }
  42357. currentLevel--;
  42358. level = this.levels[currentLevel];
  42359. level.items[level.index] = value;
  42360. this.currentLevel = currentLevel;
  42361. delete this.value;
  42362. },
  42363. incrementValue: function TagTree_incrementValue() {
  42364. var level = this.levels[this.currentLevel];
  42365. level.items[level.index]++;
  42366. },
  42367. nextLevel: function TagTree_nextLevel() {
  42368. var currentLevel = this.currentLevel;
  42369. var level = this.levels[currentLevel];
  42370. var value = level.items[level.index];
  42371. currentLevel--;
  42372. if (currentLevel < 0) {
  42373. this.value = value;
  42374. return false;
  42375. }
  42376. this.currentLevel = currentLevel;
  42377. level = this.levels[currentLevel];
  42378. level.items[level.index] = value;
  42379. return true;
  42380. }
  42381. };
  42382. return TagTree;
  42383. })();
  42384. var InclusionTree = (function InclusionTreeClosure() {
  42385. function InclusionTree(width, height, defaultValue) {
  42386. var levelsLength = log2(Math.max(width, height)) + 1;
  42387. this.levels = [];
  42388. for (var i = 0; i < levelsLength; i++) {
  42389. var items = new Uint8Array(width * height);
  42390. for (var j = 0, jj = items.length; j < jj; j++) {
  42391. items[j] = defaultValue;
  42392. }
  42393. var level = {
  42394. width: width,
  42395. height: height,
  42396. items: items
  42397. };
  42398. this.levels.push(level);
  42399. width = Math.ceil(width / 2);
  42400. height = Math.ceil(height / 2);
  42401. }
  42402. }
  42403. InclusionTree.prototype = {
  42404. reset: function InclusionTree_reset(i, j, stopValue) {
  42405. var currentLevel = 0;
  42406. while (currentLevel < this.levels.length) {
  42407. var level = this.levels[currentLevel];
  42408. var index = i + j * level.width;
  42409. level.index = index;
  42410. var value = level.items[index];
  42411. if (value == 0xFF) {
  42412. break;
  42413. }
  42414. if (value > stopValue) {
  42415. this.currentLevel = currentLevel;
  42416. // already know about this one, propagating the value to top levels
  42417. this.propagateValues();
  42418. return false;
  42419. }
  42420. i >>= 1;
  42421. j >>= 1;
  42422. currentLevel++;
  42423. }
  42424. this.currentLevel = currentLevel - 1;
  42425. return true;
  42426. },
  42427. incrementValue: function InclusionTree_incrementValue(stopValue) {
  42428. var level = this.levels[this.currentLevel];
  42429. level.items[level.index] = stopValue + 1;
  42430. this.propagateValues();
  42431. },
  42432. propagateValues: function InclusionTree_propagateValues() {
  42433. var levelIndex = this.currentLevel;
  42434. var level = this.levels[levelIndex];
  42435. var currentValue = level.items[level.index];
  42436. while (--levelIndex >= 0) {
  42437. level = this.levels[levelIndex];
  42438. level.items[level.index] = currentValue;
  42439. }
  42440. },
  42441. nextLevel: function InclusionTree_nextLevel() {
  42442. var currentLevel = this.currentLevel;
  42443. var level = this.levels[currentLevel];
  42444. var value = level.items[level.index];
  42445. level.items[level.index] = 0xFF;
  42446. currentLevel--;
  42447. if (currentLevel < 0) {
  42448. return false;
  42449. }
  42450. this.currentLevel = currentLevel;
  42451. level = this.levels[currentLevel];
  42452. level.items[level.index] = value;
  42453. return true;
  42454. }
  42455. };
  42456. return InclusionTree;
  42457. })();
  42458. // Section D. Coefficient bit modeling
  42459. var BitModel = (function BitModelClosure() {
  42460. var UNIFORM_CONTEXT = 17;
  42461. var RUNLENGTH_CONTEXT = 18;
  42462. // Table D-1
  42463. // The index is binary presentation: 0dddvvhh, ddd - sum of Di (0..4),
  42464. // vv - sum of Vi (0..2), and hh - sum of Hi (0..2)
  42465. var LLAndLHContextsLabel = new Uint8Array([
  42466. 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,
  42467. 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,
  42468. 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
  42469. ]);
  42470. var HLContextLabel = new Uint8Array([
  42471. 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,
  42472. 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,
  42473. 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
  42474. ]);
  42475. var HHContextLabel = new Uint8Array([
  42476. 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,
  42477. 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,
  42478. 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
  42479. ]);
  42480. function BitModel(width, height, subband, zeroBitPlanes, mb) {
  42481. this.width = width;
  42482. this.height = height;
  42483. this.contextLabelTable = (subband == 'HH' ? HHContextLabel :
  42484. (subband == 'HL' ? HLContextLabel : LLAndLHContextsLabel));
  42485. var coefficientCount = width * height;
  42486. // coefficients outside the encoding region treated as insignificant
  42487. // add border state cells for significanceState
  42488. this.neighborsSignificance = new Uint8Array(coefficientCount);
  42489. this.coefficentsSign = new Uint8Array(coefficientCount);
  42490. this.coefficentsMagnitude = mb > 14 ? new Uint32Array(coefficientCount) :
  42491. mb > 6 ? new Uint16Array(coefficientCount) :
  42492. new Uint8Array(coefficientCount);
  42493. this.processingFlags = new Uint8Array(coefficientCount);
  42494. var bitsDecoded = new Uint8Array(coefficientCount);
  42495. if (zeroBitPlanes !== 0) {
  42496. for (var i = 0; i < coefficientCount; i++) {
  42497. bitsDecoded[i] = zeroBitPlanes;
  42498. }
  42499. }
  42500. this.bitsDecoded = bitsDecoded;
  42501. this.reset();
  42502. }
  42503. BitModel.prototype = {
  42504. setDecoder: function BitModel_setDecoder(decoder) {
  42505. this.decoder = decoder;
  42506. },
  42507. reset: function BitModel_reset() {
  42508. // We have 17 contexts that are accessed via context labels,
  42509. // plus the uniform and runlength context.
  42510. this.contexts = new Int8Array(19);
  42511. // Contexts are packed into 1 byte:
  42512. // highest 7 bits carry the index, lowest bit carries mps
  42513. this.contexts[0] = (4 << 1) | 0;
  42514. this.contexts[UNIFORM_CONTEXT] = (46 << 1) | 0;
  42515. this.contexts[RUNLENGTH_CONTEXT] = (3 << 1) | 0;
  42516. },
  42517. setNeighborsSignificance:
  42518. function BitModel_setNeighborsSignificance(row, column, index) {
  42519. var neighborsSignificance = this.neighborsSignificance;
  42520. var width = this.width, height = this.height;
  42521. var left = (column > 0);
  42522. var right = (column + 1 < width);
  42523. var i;
  42524. if (row > 0) {
  42525. i = index - width;
  42526. if (left) {
  42527. neighborsSignificance[i - 1] += 0x10;
  42528. }
  42529. if (right) {
  42530. neighborsSignificance[i + 1] += 0x10;
  42531. }
  42532. neighborsSignificance[i] += 0x04;
  42533. }
  42534. if (row + 1 < height) {
  42535. i = index + width;
  42536. if (left) {
  42537. neighborsSignificance[i - 1] += 0x10;
  42538. }
  42539. if (right) {
  42540. neighborsSignificance[i + 1] += 0x10;
  42541. }
  42542. neighborsSignificance[i] += 0x04;
  42543. }
  42544. if (left) {
  42545. neighborsSignificance[index - 1] += 0x01;
  42546. }
  42547. if (right) {
  42548. neighborsSignificance[index + 1] += 0x01;
  42549. }
  42550. neighborsSignificance[index] |= 0x80;
  42551. },
  42552. runSignificancePropogationPass:
  42553. function BitModel_runSignificancePropogationPass() {
  42554. var decoder = this.decoder;
  42555. var width = this.width, height = this.height;
  42556. var coefficentsMagnitude = this.coefficentsMagnitude;
  42557. var coefficentsSign = this.coefficentsSign;
  42558. var neighborsSignificance = this.neighborsSignificance;
  42559. var processingFlags = this.processingFlags;
  42560. var contexts = this.contexts;
  42561. var labels = this.contextLabelTable;
  42562. var bitsDecoded = this.bitsDecoded;
  42563. var processedInverseMask = ~1;
  42564. var processedMask = 1;
  42565. var firstMagnitudeBitMask = 2;
  42566. for (var i0 = 0; i0 < height; i0 += 4) {
  42567. for (var j = 0; j < width; j++) {
  42568. var index = i0 * width + j;
  42569. for (var i1 = 0; i1 < 4; i1++, index += width) {
  42570. var i = i0 + i1;
  42571. if (i >= height) {
  42572. break;
  42573. }
  42574. // clear processed flag first
  42575. processingFlags[index] &= processedInverseMask;
  42576. if (coefficentsMagnitude[index] ||
  42577. !neighborsSignificance[index]) {
  42578. continue;
  42579. }
  42580. var contextLabel = labels[neighborsSignificance[index]];
  42581. var decision = decoder.readBit(contexts, contextLabel);
  42582. if (decision) {
  42583. var sign = this.decodeSignBit(i, j, index);
  42584. coefficentsSign[index] = sign;
  42585. coefficentsMagnitude[index] = 1;
  42586. this.setNeighborsSignificance(i, j, index);
  42587. processingFlags[index] |= firstMagnitudeBitMask;
  42588. }
  42589. bitsDecoded[index]++;
  42590. processingFlags[index] |= processedMask;
  42591. }
  42592. }
  42593. }
  42594. },
  42595. decodeSignBit: function BitModel_decodeSignBit(row, column, index) {
  42596. var width = this.width, height = this.height;
  42597. var coefficentsMagnitude = this.coefficentsMagnitude;
  42598. var coefficentsSign = this.coefficentsSign;
  42599. var contribution, sign0, sign1, significance1;
  42600. var contextLabel, decoded;
  42601. // calculate horizontal contribution
  42602. significance1 = (column > 0 && coefficentsMagnitude[index - 1] !== 0);
  42603. if (column + 1 < width && coefficentsMagnitude[index + 1] !== 0) {
  42604. sign1 = coefficentsSign[index + 1];
  42605. if (significance1) {
  42606. sign0 = coefficentsSign[index - 1];
  42607. contribution = 1 - sign1 - sign0;
  42608. } else {
  42609. contribution = 1 - sign1 - sign1;
  42610. }
  42611. } else if (significance1) {
  42612. sign0 = coefficentsSign[index - 1];
  42613. contribution = 1 - sign0 - sign0;
  42614. } else {
  42615. contribution = 0;
  42616. }
  42617. var horizontalContribution = 3 * contribution;
  42618. // calculate vertical contribution and combine with the horizontal
  42619. significance1 = (row > 0 && coefficentsMagnitude[index - width] !== 0);
  42620. if (row + 1 < height && coefficentsMagnitude[index + width] !== 0) {
  42621. sign1 = coefficentsSign[index + width];
  42622. if (significance1) {
  42623. sign0 = coefficentsSign[index - width];
  42624. contribution = 1 - sign1 - sign0 + horizontalContribution;
  42625. } else {
  42626. contribution = 1 - sign1 - sign1 + horizontalContribution;
  42627. }
  42628. } else if (significance1) {
  42629. sign0 = coefficentsSign[index - width];
  42630. contribution = 1 - sign0 - sign0 + horizontalContribution;
  42631. } else {
  42632. contribution = horizontalContribution;
  42633. }
  42634. if (contribution >= 0) {
  42635. contextLabel = 9 + contribution;
  42636. decoded = this.decoder.readBit(this.contexts, contextLabel);
  42637. } else {
  42638. contextLabel = 9 - contribution;
  42639. decoded = this.decoder.readBit(this.contexts, contextLabel) ^ 1;
  42640. }
  42641. return decoded;
  42642. },
  42643. runMagnitudeRefinementPass:
  42644. function BitModel_runMagnitudeRefinementPass() {
  42645. var decoder = this.decoder;
  42646. var width = this.width, height = this.height;
  42647. var coefficentsMagnitude = this.coefficentsMagnitude;
  42648. var neighborsSignificance = this.neighborsSignificance;
  42649. var contexts = this.contexts;
  42650. var bitsDecoded = this.bitsDecoded;
  42651. var processingFlags = this.processingFlags;
  42652. var processedMask = 1;
  42653. var firstMagnitudeBitMask = 2;
  42654. var length = width * height;
  42655. var width4 = width * 4;
  42656. for (var index0 = 0, indexNext; index0 < length; index0 = indexNext) {
  42657. indexNext = Math.min(length, index0 + width4);
  42658. for (var j = 0; j < width; j++) {
  42659. for (var index = index0 + j; index < indexNext; index += width) {
  42660. // significant but not those that have just become
  42661. if (!coefficentsMagnitude[index] ||
  42662. (processingFlags[index] & processedMask) !== 0) {
  42663. continue;
  42664. }
  42665. var contextLabel = 16;
  42666. if ((processingFlags[index] & firstMagnitudeBitMask) !== 0) {
  42667. processingFlags[index] ^= firstMagnitudeBitMask;
  42668. // first refinement
  42669. var significance = neighborsSignificance[index] & 127;
  42670. contextLabel = significance === 0 ? 15 : 14;
  42671. }
  42672. var bit = decoder.readBit(contexts, contextLabel);
  42673. coefficentsMagnitude[index] =
  42674. (coefficentsMagnitude[index] << 1) | bit;
  42675. bitsDecoded[index]++;
  42676. processingFlags[index] |= processedMask;
  42677. }
  42678. }
  42679. }
  42680. },
  42681. runCleanupPass: function BitModel_runCleanupPass() {
  42682. var decoder = this.decoder;
  42683. var width = this.width, height = this.height;
  42684. var neighborsSignificance = this.neighborsSignificance;
  42685. var coefficentsMagnitude = this.coefficentsMagnitude;
  42686. var coefficentsSign = this.coefficentsSign;
  42687. var contexts = this.contexts;
  42688. var labels = this.contextLabelTable;
  42689. var bitsDecoded = this.bitsDecoded;
  42690. var processingFlags = this.processingFlags;
  42691. var processedMask = 1;
  42692. var firstMagnitudeBitMask = 2;
  42693. var oneRowDown = width;
  42694. var twoRowsDown = width * 2;
  42695. var threeRowsDown = width * 3;
  42696. var iNext;
  42697. for (var i0 = 0; i0 < height; i0 = iNext) {
  42698. iNext = Math.min(i0 + 4, height);
  42699. var indexBase = i0 * width;
  42700. var checkAllEmpty = i0 + 3 < height;
  42701. for (var j = 0; j < width; j++) {
  42702. var index0 = indexBase + j;
  42703. // using the property: labels[neighborsSignificance[index]] == 0
  42704. // when neighborsSignificance[index] == 0
  42705. var allEmpty = (checkAllEmpty &&
  42706. processingFlags[index0] === 0 &&
  42707. processingFlags[index0 + oneRowDown] === 0 &&
  42708. processingFlags[index0 + twoRowsDown] === 0 &&
  42709. processingFlags[index0 + threeRowsDown] === 0 &&
  42710. neighborsSignificance[index0] === 0 &&
  42711. neighborsSignificance[index0 + oneRowDown] === 0 &&
  42712. neighborsSignificance[index0 + twoRowsDown] === 0 &&
  42713. neighborsSignificance[index0 + threeRowsDown] === 0);
  42714. var i1 = 0, index = index0;
  42715. var i = i0, sign;
  42716. if (allEmpty) {
  42717. var hasSignificantCoefficent =
  42718. decoder.readBit(contexts, RUNLENGTH_CONTEXT);
  42719. if (!hasSignificantCoefficent) {
  42720. bitsDecoded[index0]++;
  42721. bitsDecoded[index0 + oneRowDown]++;
  42722. bitsDecoded[index0 + twoRowsDown]++;
  42723. bitsDecoded[index0 + threeRowsDown]++;
  42724. continue; // next column
  42725. }
  42726. i1 = (decoder.readBit(contexts, UNIFORM_CONTEXT) << 1) |
  42727. decoder.readBit(contexts, UNIFORM_CONTEXT);
  42728. if (i1 !== 0) {
  42729. i = i0 + i1;
  42730. index += i1 * width;
  42731. }
  42732. sign = this.decodeSignBit(i, j, index);
  42733. coefficentsSign[index] = sign;
  42734. coefficentsMagnitude[index] = 1;
  42735. this.setNeighborsSignificance(i, j, index);
  42736. processingFlags[index] |= firstMagnitudeBitMask;
  42737. index = index0;
  42738. for (var i2 = i0; i2 <= i; i2++, index += width) {
  42739. bitsDecoded[index]++;
  42740. }
  42741. i1++;
  42742. }
  42743. for (i = i0 + i1; i < iNext; i++, index += width) {
  42744. if (coefficentsMagnitude[index] ||
  42745. (processingFlags[index] & processedMask) !== 0) {
  42746. continue;
  42747. }
  42748. var contextLabel = labels[neighborsSignificance[index]];
  42749. var decision = decoder.readBit(contexts, contextLabel);
  42750. if (decision === 1) {
  42751. sign = this.decodeSignBit(i, j, index);
  42752. coefficentsSign[index] = sign;
  42753. coefficentsMagnitude[index] = 1;
  42754. this.setNeighborsSignificance(i, j, index);
  42755. processingFlags[index] |= firstMagnitudeBitMask;
  42756. }
  42757. bitsDecoded[index]++;
  42758. }
  42759. }
  42760. }
  42761. },
  42762. checkSegmentationSymbol: function BitModel_checkSegmentationSymbol() {
  42763. var decoder = this.decoder;
  42764. var contexts = this.contexts;
  42765. var symbol = (decoder.readBit(contexts, UNIFORM_CONTEXT) << 3) |
  42766. (decoder.readBit(contexts, UNIFORM_CONTEXT) << 2) |
  42767. (decoder.readBit(contexts, UNIFORM_CONTEXT) << 1) |
  42768. decoder.readBit(contexts, UNIFORM_CONTEXT);
  42769. if (symbol != 0xA) {
  42770. throw 'Invalid segmentation symbol';
  42771. }
  42772. }
  42773. };
  42774. return BitModel;
  42775. })();
  42776. // Section F, Discrete wavelet transformation
  42777. var Transform = (function TransformClosure() {
  42778. function Transform() {}
  42779. Transform.prototype.calculate =
  42780. function transformCalculate(subbands, u0, v0) {
  42781. var ll = subbands[0];
  42782. for (var i = 1, ii = subbands.length; i < ii; i++) {
  42783. ll = this.iterate(ll, subbands[i], u0, v0);
  42784. }
  42785. return ll;
  42786. };
  42787. Transform.prototype.extend = function extend(buffer, offset, size) {
  42788. // Section F.3.7 extending... using max extension of 4
  42789. var i1 = offset - 1, j1 = offset + 1;
  42790. var i2 = offset + size - 2, j2 = offset + size;
  42791. buffer[i1--] = buffer[j1++];
  42792. buffer[j2++] = buffer[i2--];
  42793. buffer[i1--] = buffer[j1++];
  42794. buffer[j2++] = buffer[i2--];
  42795. buffer[i1--] = buffer[j1++];
  42796. buffer[j2++] = buffer[i2--];
  42797. buffer[i1] = buffer[j1];
  42798. buffer[j2] = buffer[i2];
  42799. };
  42800. Transform.prototype.iterate = function Transform_iterate(ll, hl_lh_hh,
  42801. u0, v0) {
  42802. var llWidth = ll.width, llHeight = ll.height, llItems = ll.items;
  42803. var width = hl_lh_hh.width;
  42804. var height = hl_lh_hh.height;
  42805. var items = hl_lh_hh.items;
  42806. var i, j, k, l, u, v;
  42807. // Interleave LL according to Section F.3.3
  42808. for (k = 0, i = 0; i < llHeight; i++) {
  42809. l = i * 2 * width;
  42810. for (j = 0; j < llWidth; j++, k++, l += 2) {
  42811. items[l] = llItems[k];
  42812. }
  42813. }
  42814. // The LL band is not needed anymore.
  42815. llItems = ll.items = null;
  42816. var bufferPadding = 4;
  42817. var rowBuffer = new Float32Array(width + 2 * bufferPadding);
  42818. // Section F.3.4 HOR_SR
  42819. if (width === 1) {
  42820. // if width = 1, when u0 even keep items as is, when odd divide by 2
  42821. if ((u0 & 1) !== 0) {
  42822. for (v = 0, k = 0; v < height; v++, k += width) {
  42823. items[k] *= 0.5;
  42824. }
  42825. }
  42826. } else {
  42827. for (v = 0, k = 0; v < height; v++, k += width) {
  42828. rowBuffer.set(items.subarray(k, k + width), bufferPadding);
  42829. this.extend(rowBuffer, bufferPadding, width);
  42830. this.filter(rowBuffer, bufferPadding, width);
  42831. items.set(
  42832. rowBuffer.subarray(bufferPadding, bufferPadding + width),
  42833. k);
  42834. }
  42835. }
  42836. // Accesses to the items array can take long, because it may not fit into
  42837. // CPU cache and has to be fetched from main memory. Since subsequent
  42838. // accesses to the items array are not local when reading columns, we
  42839. // have a cache miss every time. To reduce cache misses, get up to
  42840. // 'numBuffers' items at a time and store them into the individual
  42841. // buffers. The colBuffers should be small enough to fit into CPU cache.
  42842. var numBuffers = 16;
  42843. var colBuffers = [];
  42844. for (i = 0; i < numBuffers; i++) {
  42845. colBuffers.push(new Float32Array(height + 2 * bufferPadding));
  42846. }
  42847. var b, currentBuffer = 0;
  42848. ll = bufferPadding + height;
  42849. // Section F.3.5 VER_SR
  42850. if (height === 1) {
  42851. // if height = 1, when v0 even keep items as is, when odd divide by 2
  42852. if ((v0 & 1) !== 0) {
  42853. for (u = 0; u < width; u++) {
  42854. items[u] *= 0.5;
  42855. }
  42856. }
  42857. } else {
  42858. for (u = 0; u < width; u++) {
  42859. // if we ran out of buffers, copy several image columns at once
  42860. if (currentBuffer === 0) {
  42861. numBuffers = Math.min(width - u, numBuffers);
  42862. for (k = u, l = bufferPadding; l < ll; k += width, l++) {
  42863. for (b = 0; b < numBuffers; b++) {
  42864. colBuffers[b][l] = items[k + b];
  42865. }
  42866. }
  42867. currentBuffer = numBuffers;
  42868. }
  42869. currentBuffer--;
  42870. var buffer = colBuffers[currentBuffer];
  42871. this.extend(buffer, bufferPadding, height);
  42872. this.filter(buffer, bufferPadding, height);
  42873. // If this is last buffer in this group of buffers, flush all buffers.
  42874. if (currentBuffer === 0) {
  42875. k = u - numBuffers + 1;
  42876. for (l = bufferPadding; l < ll; k += width, l++) {
  42877. for (b = 0; b < numBuffers; b++) {
  42878. items[k + b] = colBuffers[b][l];
  42879. }
  42880. }
  42881. }
  42882. }
  42883. }
  42884. return {
  42885. width: width,
  42886. height: height,
  42887. items: items
  42888. };
  42889. };
  42890. return Transform;
  42891. })();
  42892. // Section 3.8.2 Irreversible 9-7 filter
  42893. var IrreversibleTransform = (function IrreversibleTransformClosure() {
  42894. function IrreversibleTransform() {
  42895. Transform.call(this);
  42896. }
  42897. IrreversibleTransform.prototype = Object.create(Transform.prototype);
  42898. IrreversibleTransform.prototype.filter =
  42899. function irreversibleTransformFilter(x, offset, length) {
  42900. var len = length >> 1;
  42901. offset = offset | 0;
  42902. var j, n, current, next;
  42903. var alpha = -1.586134342059924;
  42904. var beta = -0.052980118572961;
  42905. var gamma = 0.882911075530934;
  42906. var delta = 0.443506852043971;
  42907. var K = 1.230174104914001;
  42908. var K_ = 1 / K;
  42909. // step 1 is combined with step 3
  42910. // step 2
  42911. j = offset - 3;
  42912. for (n = len + 4; n--; j += 2) {
  42913. x[j] *= K_;
  42914. }
  42915. // step 1 & 3
  42916. j = offset - 2;
  42917. current = delta * x[j -1];
  42918. for (n = len + 3; n--; j += 2) {
  42919. next = delta * x[j + 1];
  42920. x[j] = K * x[j] - current - next;
  42921. if (n--) {
  42922. j += 2;
  42923. current = delta * x[j + 1];
  42924. x[j] = K * x[j] - current - next;
  42925. } else {
  42926. break;
  42927. }
  42928. }
  42929. // step 4
  42930. j = offset - 1;
  42931. current = gamma * x[j - 1];
  42932. for (n = len + 2; n--; j += 2) {
  42933. next = gamma * x[j + 1];
  42934. x[j] -= current + next;
  42935. if (n--) {
  42936. j += 2;
  42937. current = gamma * x[j + 1];
  42938. x[j] -= current + next;
  42939. } else {
  42940. break;
  42941. }
  42942. }
  42943. // step 5
  42944. j = offset;
  42945. current = beta * x[j - 1];
  42946. for (n = len + 1; n--; j += 2) {
  42947. next = beta * x[j + 1];
  42948. x[j] -= current + next;
  42949. if (n--) {
  42950. j += 2;
  42951. current = beta * x[j + 1];
  42952. x[j] -= current + next;
  42953. } else {
  42954. break;
  42955. }
  42956. }
  42957. // step 6
  42958. if (len !== 0) {
  42959. j = offset + 1;
  42960. current = alpha * x[j - 1];
  42961. for (n = len; n--; j += 2) {
  42962. next = alpha * x[j + 1];
  42963. x[j] -= current + next;
  42964. if (n--) {
  42965. j += 2;
  42966. current = alpha * x[j + 1];
  42967. x[j] -= current + next;
  42968. } else {
  42969. break;
  42970. }
  42971. }
  42972. }
  42973. };
  42974. return IrreversibleTransform;
  42975. })();
  42976. // Section 3.8.1 Reversible 5-3 filter
  42977. var ReversibleTransform = (function ReversibleTransformClosure() {
  42978. function ReversibleTransform() {
  42979. Transform.call(this);
  42980. }
  42981. ReversibleTransform.prototype = Object.create(Transform.prototype);
  42982. ReversibleTransform.prototype.filter =
  42983. function reversibleTransformFilter(x, offset, length) {
  42984. var len = length >> 1;
  42985. offset = offset | 0;
  42986. var j, n;
  42987. for (j = offset, n = len + 1; n--; j += 2) {
  42988. x[j] -= (x[j - 1] + x[j + 1] + 2) >> 2;
  42989. }
  42990. for (j = offset + 1, n = len; n--; j += 2) {
  42991. x[j] += (x[j - 1] + x[j + 1]) >> 1;
  42992. }
  42993. };
  42994. return ReversibleTransform;
  42995. })();
  42996. return JpxImage;
  42997. })();
  42998. var Jbig2Image = (function Jbig2ImageClosure() {
  42999. // Utility data structures
  43000. function ContextCache() {}
  43001. ContextCache.prototype = {
  43002. getContexts: function(id) {
  43003. if (id in this) {
  43004. return this[id];
  43005. }
  43006. return (this[id] = new Int8Array(1 << 16));
  43007. }
  43008. };
  43009. function DecodingContext(data, start, end) {
  43010. this.data = data;
  43011. this.start = start;
  43012. this.end = end;
  43013. }
  43014. DecodingContext.prototype = {
  43015. get decoder() {
  43016. var decoder = new ArithmeticDecoder(this.data, this.start, this.end);
  43017. return shadow(this, 'decoder', decoder);
  43018. },
  43019. get contextCache() {
  43020. var cache = new ContextCache();
  43021. return shadow(this, 'contextCache', cache);
  43022. }
  43023. };
  43024. // Annex A. Arithmetic Integer Decoding Procedure
  43025. // A.2 Procedure for decoding values
  43026. function decodeInteger(contextCache, procedure, decoder) {
  43027. var contexts = contextCache.getContexts(procedure);
  43028. var prev = 1;
  43029. function readBits(length) {
  43030. var v = 0;
  43031. for (var i = 0; i < length; i++) {
  43032. var bit = decoder.readBit(contexts, prev);
  43033. prev = (prev < 256 ? (prev << 1) | bit :
  43034. (((prev << 1) | bit) & 511) | 256);
  43035. v = (v << 1) | bit;
  43036. }
  43037. return v >>> 0;
  43038. }
  43039. var sign = readBits(1);
  43040. var value = readBits(1) ?
  43041. (readBits(1) ?
  43042. (readBits(1) ?
  43043. (readBits(1) ?
  43044. (readBits(1) ?
  43045. (readBits(32) + 4436) :
  43046. readBits(12) + 340) :
  43047. readBits(8) + 84) :
  43048. readBits(6) + 20) :
  43049. readBits(4) + 4) :
  43050. readBits(2);
  43051. return (sign === 0 ? value : (value > 0 ? -value : null));
  43052. }
  43053. // A.3 The IAID decoding procedure
  43054. function decodeIAID(contextCache, decoder, codeLength) {
  43055. var contexts = contextCache.getContexts('IAID');
  43056. var prev = 1;
  43057. for (var i = 0; i < codeLength; i++) {
  43058. var bit = decoder.readBit(contexts, prev);
  43059. prev = (prev << 1) | bit;
  43060. }
  43061. if (codeLength < 31) {
  43062. return prev & ((1 << codeLength) - 1);
  43063. }
  43064. return prev & 0x7FFFFFFF;
  43065. }
  43066. // 7.3 Segment types
  43067. var SegmentTypes = [
  43068. 'SymbolDictionary', null, null, null, 'IntermediateTextRegion', null,
  43069. 'ImmediateTextRegion', 'ImmediateLosslessTextRegion', null, null, null,
  43070. null, null, null, null, null, 'patternDictionary', null, null, null,
  43071. 'IntermediateHalftoneRegion', null, 'ImmediateHalftoneRegion',
  43072. 'ImmediateLosslessHalftoneRegion', null, null, null, null, null, null, null,
  43073. null, null, null, null, null, 'IntermediateGenericRegion', null,
  43074. 'ImmediateGenericRegion', 'ImmediateLosslessGenericRegion',
  43075. 'IntermediateGenericRefinementRegion', null,
  43076. 'ImmediateGenericRefinementRegion',
  43077. 'ImmediateLosslessGenericRefinementRegion', null, null, null, null,
  43078. 'PageInformation', 'EndOfPage', 'EndOfStripe', 'EndOfFile', 'Profiles',
  43079. 'Tables', null, null, null, null, null, null, null, null,
  43080. 'Extension'
  43081. ];
  43082. var CodingTemplates = [
  43083. [{x: -1, y: -2}, {x: 0, y: -2}, {x: 1, y: -2}, {x: -2, y: -1},
  43084. {x: -1, y: -1}, {x: 0, y: -1}, {x: 1, y: -1}, {x: 2, y: -1},
  43085. {x: -4, y: 0}, {x: -3, y: 0}, {x: -2, y: 0}, {x: -1, y: 0}],
  43086. [{x: -1, y: -2}, {x: 0, y: -2}, {x: 1, y: -2}, {x: 2, y: -2},
  43087. {x: -2, y: -1}, {x: -1, y: -1}, {x: 0, y: -1}, {x: 1, y: -1},
  43088. {x: 2, y: -1}, {x: -3, y: 0}, {x: -2, y: 0}, {x: -1, y: 0}],
  43089. [{x: -1, y: -2}, {x: 0, y: -2}, {x: 1, y: -2}, {x: -2, y: -1},
  43090. {x: -1, y: -1}, {x: 0, y: -1}, {x: 1, y: -1}, {x: -2, y: 0},
  43091. {x: -1, y: 0}],
  43092. [{x: -3, y: -1}, {x: -2, y: -1}, {x: -1, y: -1}, {x: 0, y: -1},
  43093. {x: 1, y: -1}, {x: -4, y: 0}, {x: -3, y: 0}, {x: -2, y: 0}, {x: -1, y: 0}]
  43094. ];
  43095. var RefinementTemplates = [
  43096. {
  43097. coding: [{x: 0, y: -1}, {x: 1, y: -1}, {x: -1, y: 0}],
  43098. reference: [{x: 0, y: -1}, {x: 1, y: -1}, {x: -1, y: 0}, {x: 0, y: 0},
  43099. {x: 1, y: 0}, {x: -1, y: 1}, {x: 0, y: 1}, {x: 1, y: 1}]
  43100. },
  43101. {
  43102. coding: [{x: -1, y: -1}, {x: 0, y: -1}, {x: 1, y: -1}, {x: -1, y: 0}],
  43103. reference: [{x: 0, y: -1}, {x: -1, y: 0}, {x: 0, y: 0}, {x: 1, y: 0},
  43104. {x: 0, y: 1}, {x: 1, y: 1}]
  43105. }
  43106. ];
  43107. var ReusedContexts = [
  43108. 0x1CD3, // '00111001101' (template) + '0011' (at),
  43109. 0x079A, // '001111001101' + '0',
  43110. 0x00E3, // '001110001' + '1',
  43111. 0x018B // '011000101' + '1'
  43112. ];
  43113. var RefinementReusedContexts = [
  43114. 0x0020, // '000' + '0' (coding) + '00010000' + '0' (reference)
  43115. 0x0008 // '0000' + '001000'
  43116. ];
  43117. // 6.2 Generic Region Decoding Procedure
  43118. function decodeBitmap(mmr, width, height, templateIndex, prediction, skip, at,
  43119. decodingContext) {
  43120. if (mmr) {
  43121. error('JBIG2 error: MMR encoding is not supported');
  43122. }
  43123. var useskip = !!skip;
  43124. var template = CodingTemplates[templateIndex].concat(at);
  43125. // Sorting is non-standard, and it is not required. But sorting increases
  43126. // the number of template bits that can be reused from the previous
  43127. // contextLabel in the main loop.
  43128. template.sort(function (a, b) {
  43129. return (a.y - b.y) || (a.x - b.x);
  43130. });
  43131. var templateLength = template.length;
  43132. var templateX = new Int8Array(templateLength);
  43133. var templateY = new Int8Array(templateLength);
  43134. var changingTemplateEntries = [];
  43135. var reuseMask = 0, minX = 0, maxX = 0, minY = 0;
  43136. var c, k;
  43137. for (k = 0; k < templateLength; k++) {
  43138. templateX[k] = template[k].x;
  43139. templateY[k] = template[k].y;
  43140. minX = Math.min(minX, template[k].x);
  43141. maxX = Math.max(maxX, template[k].x);
  43142. minY = Math.min(minY, template[k].y);
  43143. // Check if the template pixel appears in two consecutive context labels,
  43144. // so it can be reused. Otherwise, we add it to the list of changing
  43145. // template entries.
  43146. if (k < templateLength - 1 &&
  43147. template[k].y === template[k + 1].y &&
  43148. template[k].x === template[k + 1].x - 1) {
  43149. reuseMask |= 1 << (templateLength - 1 - k);
  43150. } else {
  43151. changingTemplateEntries.push(k);
  43152. }
  43153. }
  43154. var changingEntriesLength = changingTemplateEntries.length;
  43155. var changingTemplateX = new Int8Array(changingEntriesLength);
  43156. var changingTemplateY = new Int8Array(changingEntriesLength);
  43157. var changingTemplateBit = new Uint16Array(changingEntriesLength);
  43158. for (c = 0; c < changingEntriesLength; c++) {
  43159. k = changingTemplateEntries[c];
  43160. changingTemplateX[c] = template[k].x;
  43161. changingTemplateY[c] = template[k].y;
  43162. changingTemplateBit[c] = 1 << (templateLength - 1 - k);
  43163. }
  43164. // Get the safe bounding box edges from the width, height, minX, maxX, minY
  43165. var sbb_left = -minX;
  43166. var sbb_top = -minY;
  43167. var sbb_right = width - maxX;
  43168. var pseudoPixelContext = ReusedContexts[templateIndex];
  43169. var row = new Uint8Array(width);
  43170. var bitmap = [];
  43171. var decoder = decodingContext.decoder;
  43172. var contexts = decodingContext.contextCache.getContexts('GB');
  43173. var ltp = 0, j, i0, j0, contextLabel = 0, bit, shift;
  43174. for (var i = 0; i < height; i++) {
  43175. if (prediction) {
  43176. var sltp = decoder.readBit(contexts, pseudoPixelContext);
  43177. ltp ^= sltp;
  43178. if (ltp) {
  43179. bitmap.push(row); // duplicate previous row
  43180. continue;
  43181. }
  43182. }
  43183. row = new Uint8Array(row);
  43184. bitmap.push(row);
  43185. for (j = 0; j < width; j++) {
  43186. if (useskip && skip[i][j]) {
  43187. row[j] = 0;
  43188. continue;
  43189. }
  43190. // Are we in the middle of a scanline, so we can reuse contextLabel
  43191. // bits?
  43192. if (j >= sbb_left && j < sbb_right && i >= sbb_top) {
  43193. // If yes, we can just shift the bits that are reusable and only
  43194. // fetch the remaining ones.
  43195. contextLabel = (contextLabel << 1) & reuseMask;
  43196. for (k = 0; k < changingEntriesLength; k++) {
  43197. i0 = i + changingTemplateY[k];
  43198. j0 = j + changingTemplateX[k];
  43199. bit = bitmap[i0][j0];
  43200. if (bit) {
  43201. bit = changingTemplateBit[k];
  43202. contextLabel |= bit;
  43203. }
  43204. }
  43205. } else {
  43206. // compute the contextLabel from scratch
  43207. contextLabel = 0;
  43208. shift = templateLength - 1;
  43209. for (k = 0; k < templateLength; k++, shift--) {
  43210. j0 = j + templateX[k];
  43211. if (j0 >= 0 && j0 < width) {
  43212. i0 = i + templateY[k];
  43213. if (i0 >= 0) {
  43214. bit = bitmap[i0][j0];
  43215. if (bit) {
  43216. contextLabel |= bit << shift;
  43217. }
  43218. }
  43219. }
  43220. }
  43221. }
  43222. var pixel = decoder.readBit(contexts, contextLabel);
  43223. row[j] = pixel;
  43224. }
  43225. }
  43226. return bitmap;
  43227. }
  43228. // 6.3.2 Generic Refinement Region Decoding Procedure
  43229. function decodeRefinement(width, height, templateIndex, referenceBitmap,
  43230. offsetX, offsetY, prediction, at,
  43231. decodingContext) {
  43232. var codingTemplate = RefinementTemplates[templateIndex].coding;
  43233. if (templateIndex === 0) {
  43234. codingTemplate = codingTemplate.concat([at[0]]);
  43235. }
  43236. var codingTemplateLength = codingTemplate.length;
  43237. var codingTemplateX = new Int32Array(codingTemplateLength);
  43238. var codingTemplateY = new Int32Array(codingTemplateLength);
  43239. var k;
  43240. for (k = 0; k < codingTemplateLength; k++) {
  43241. codingTemplateX[k] = codingTemplate[k].x;
  43242. codingTemplateY[k] = codingTemplate[k].y;
  43243. }
  43244. var referenceTemplate = RefinementTemplates[templateIndex].reference;
  43245. if (templateIndex === 0) {
  43246. referenceTemplate = referenceTemplate.concat([at[1]]);
  43247. }
  43248. var referenceTemplateLength = referenceTemplate.length;
  43249. var referenceTemplateX = new Int32Array(referenceTemplateLength);
  43250. var referenceTemplateY = new Int32Array(referenceTemplateLength);
  43251. for (k = 0; k < referenceTemplateLength; k++) {
  43252. referenceTemplateX[k] = referenceTemplate[k].x;
  43253. referenceTemplateY[k] = referenceTemplate[k].y;
  43254. }
  43255. var referenceWidth = referenceBitmap[0].length;
  43256. var referenceHeight = referenceBitmap.length;
  43257. var pseudoPixelContext = RefinementReusedContexts[templateIndex];
  43258. var bitmap = [];
  43259. var decoder = decodingContext.decoder;
  43260. var contexts = decodingContext.contextCache.getContexts('GR');
  43261. var ltp = 0;
  43262. for (var i = 0; i < height; i++) {
  43263. if (prediction) {
  43264. var sltp = decoder.readBit(contexts, pseudoPixelContext);
  43265. ltp ^= sltp;
  43266. if (ltp) {
  43267. error('JBIG2 error: prediction is not supported');
  43268. }
  43269. }
  43270. var row = new Uint8Array(width);
  43271. bitmap.push(row);
  43272. for (var j = 0; j < width; j++) {
  43273. var i0, j0;
  43274. var contextLabel = 0;
  43275. for (k = 0; k < codingTemplateLength; k++) {
  43276. i0 = i + codingTemplateY[k];
  43277. j0 = j + codingTemplateX[k];
  43278. if (i0 < 0 || j0 < 0 || j0 >= width) {
  43279. contextLabel <<= 1; // out of bound pixel
  43280. } else {
  43281. contextLabel = (contextLabel << 1) | bitmap[i0][j0];
  43282. }
  43283. }
  43284. for (k = 0; k < referenceTemplateLength; k++) {
  43285. i0 = i + referenceTemplateY[k] + offsetY;
  43286. j0 = j + referenceTemplateX[k] + offsetX;
  43287. if (i0 < 0 || i0 >= referenceHeight || j0 < 0 ||
  43288. j0 >= referenceWidth) {
  43289. contextLabel <<= 1; // out of bound pixel
  43290. } else {
  43291. contextLabel = (contextLabel << 1) | referenceBitmap[i0][j0];
  43292. }
  43293. }
  43294. var pixel = decoder.readBit(contexts, contextLabel);
  43295. row[j] = pixel;
  43296. }
  43297. }
  43298. return bitmap;
  43299. }
  43300. // 6.5.5 Decoding the symbol dictionary
  43301. function decodeSymbolDictionary(huffman, refinement, symbols,
  43302. numberOfNewSymbols, numberOfExportedSymbols,
  43303. huffmanTables, templateIndex, at,
  43304. refinementTemplateIndex, refinementAt,
  43305. decodingContext) {
  43306. if (huffman) {
  43307. error('JBIG2 error: huffman is not supported');
  43308. }
  43309. var newSymbols = [];
  43310. var currentHeight = 0;
  43311. var symbolCodeLength = log2(symbols.length + numberOfNewSymbols);
  43312. var decoder = decodingContext.decoder;
  43313. var contextCache = decodingContext.contextCache;
  43314. while (newSymbols.length < numberOfNewSymbols) {
  43315. var deltaHeight = decodeInteger(contextCache, 'IADH', decoder); // 6.5.6
  43316. currentHeight += deltaHeight;
  43317. var currentWidth = 0;
  43318. var totalWidth = 0;
  43319. while (true) {
  43320. var deltaWidth = decodeInteger(contextCache, 'IADW', decoder); // 6.5.7
  43321. if (deltaWidth === null) {
  43322. break; // OOB
  43323. }
  43324. currentWidth += deltaWidth;
  43325. totalWidth += currentWidth;
  43326. var bitmap;
  43327. if (refinement) {
  43328. // 6.5.8.2 Refinement/aggregate-coded symbol bitmap
  43329. var numberOfInstances = decodeInteger(contextCache, 'IAAI', decoder);
  43330. if (numberOfInstances > 1) {
  43331. bitmap = decodeTextRegion(huffman, refinement,
  43332. currentWidth, currentHeight, 0,
  43333. numberOfInstances, 1, //strip size
  43334. symbols.concat(newSymbols),
  43335. symbolCodeLength,
  43336. 0, //transposed
  43337. 0, //ds offset
  43338. 1, //top left 7.4.3.1.1
  43339. 0, //OR operator
  43340. huffmanTables,
  43341. refinementTemplateIndex, refinementAt,
  43342. decodingContext);
  43343. } else {
  43344. var symbolId = decodeIAID(contextCache, decoder, symbolCodeLength);
  43345. var rdx = decodeInteger(contextCache, 'IARDX', decoder); // 6.4.11.3
  43346. var rdy = decodeInteger(contextCache, 'IARDY', decoder); // 6.4.11.4
  43347. var symbol = (symbolId < symbols.length ? symbols[symbolId] :
  43348. newSymbols[symbolId - symbols.length]);
  43349. bitmap = decodeRefinement(currentWidth, currentHeight,
  43350. refinementTemplateIndex, symbol, rdx, rdy, false, refinementAt,
  43351. decodingContext);
  43352. }
  43353. } else {
  43354. // 6.5.8.1 Direct-coded symbol bitmap
  43355. bitmap = decodeBitmap(false, currentWidth, currentHeight,
  43356. templateIndex, false, null, at, decodingContext);
  43357. }
  43358. newSymbols.push(bitmap);
  43359. }
  43360. }
  43361. // 6.5.10 Exported symbols
  43362. var exportedSymbols = [];
  43363. var flags = [], currentFlag = false;
  43364. var totalSymbolsLength = symbols.length + numberOfNewSymbols;
  43365. while (flags.length < totalSymbolsLength) {
  43366. var runLength = decodeInteger(contextCache, 'IAEX', decoder);
  43367. while (runLength--) {
  43368. flags.push(currentFlag);
  43369. }
  43370. currentFlag = !currentFlag;
  43371. }
  43372. for (var i = 0, ii = symbols.length; i < ii; i++) {
  43373. if (flags[i]) {
  43374. exportedSymbols.push(symbols[i]);
  43375. }
  43376. }
  43377. for (var j = 0; j < numberOfNewSymbols; i++, j++) {
  43378. if (flags[i]) {
  43379. exportedSymbols.push(newSymbols[j]);
  43380. }
  43381. }
  43382. return exportedSymbols;
  43383. }
  43384. function decodeTextRegion(huffman, refinement, width, height,
  43385. defaultPixelValue, numberOfSymbolInstances,
  43386. stripSize, inputSymbols, symbolCodeLength,
  43387. transposed, dsOffset, referenceCorner,
  43388. combinationOperator, huffmanTables,
  43389. refinementTemplateIndex, refinementAt,
  43390. decodingContext) {
  43391. if (huffman) {
  43392. error('JBIG2 error: huffman is not supported');
  43393. }
  43394. // Prepare bitmap
  43395. var bitmap = [];
  43396. var i, row;
  43397. for (i = 0; i < height; i++) {
  43398. row = new Uint8Array(width);
  43399. if (defaultPixelValue) {
  43400. for (var j = 0; j < width; j++) {
  43401. row[j] = defaultPixelValue;
  43402. }
  43403. }
  43404. bitmap.push(row);
  43405. }
  43406. var decoder = decodingContext.decoder;
  43407. var contextCache = decodingContext.contextCache;
  43408. var stripT = -decodeInteger(contextCache, 'IADT', decoder); // 6.4.6
  43409. var firstS = 0;
  43410. i = 0;
  43411. while (i < numberOfSymbolInstances) {
  43412. var deltaT = decodeInteger(contextCache, 'IADT', decoder); // 6.4.6
  43413. stripT += deltaT;
  43414. var deltaFirstS = decodeInteger(contextCache, 'IAFS', decoder); // 6.4.7
  43415. firstS += deltaFirstS;
  43416. var currentS = firstS;
  43417. do {
  43418. var currentT = (stripSize == 1 ? 0 :
  43419. decodeInteger(contextCache, 'IAIT', decoder)); // 6.4.9
  43420. var t = stripSize * stripT + currentT;
  43421. var symbolId = decodeIAID(contextCache, decoder, symbolCodeLength);
  43422. var applyRefinement = (refinement &&
  43423. decodeInteger(contextCache, 'IARI', decoder));
  43424. var symbolBitmap = inputSymbols[symbolId];
  43425. var symbolWidth = symbolBitmap[0].length;
  43426. var symbolHeight = symbolBitmap.length;
  43427. if (applyRefinement) {
  43428. var rdw = decodeInteger(contextCache, 'IARDW', decoder); // 6.4.11.1
  43429. var rdh = decodeInteger(contextCache, 'IARDH', decoder); // 6.4.11.2
  43430. var rdx = decodeInteger(contextCache, 'IARDX', decoder); // 6.4.11.3
  43431. var rdy = decodeInteger(contextCache, 'IARDY', decoder); // 6.4.11.4
  43432. symbolWidth += rdw;
  43433. symbolHeight += rdh;
  43434. symbolBitmap = decodeRefinement(symbolWidth, symbolHeight,
  43435. refinementTemplateIndex, symbolBitmap, (rdw >> 1) + rdx,
  43436. (rdh >> 1) + rdy, false, refinementAt,
  43437. decodingContext);
  43438. }
  43439. var offsetT = t - ((referenceCorner & 1) ? 0 : symbolHeight);
  43440. var offsetS = currentS - ((referenceCorner & 2) ? symbolWidth : 0);
  43441. var s2, t2, symbolRow;
  43442. if (transposed) {
  43443. // Place Symbol Bitmap from T1,S1
  43444. for (s2 = 0; s2 < symbolHeight; s2++) {
  43445. row = bitmap[offsetS + s2];
  43446. if (!row) {
  43447. continue;
  43448. }
  43449. symbolRow = symbolBitmap[s2];
  43450. // To ignore Parts of Symbol bitmap which goes
  43451. // outside bitmap region
  43452. var maxWidth = Math.min(width - offsetT, symbolWidth);
  43453. switch (combinationOperator) {
  43454. case 0: // OR
  43455. for (t2 = 0; t2 < maxWidth; t2++) {
  43456. row[offsetT + t2] |= symbolRow[t2];
  43457. }
  43458. break;
  43459. case 2: // XOR
  43460. for (t2 = 0; t2 < maxWidth; t2++) {
  43461. row[offsetT + t2] ^= symbolRow[t2];
  43462. }
  43463. break;
  43464. default:
  43465. error('JBIG2 error: operator ' + combinationOperator +
  43466. ' is not supported');
  43467. }
  43468. }
  43469. currentS += symbolHeight - 1;
  43470. } else {
  43471. for (t2 = 0; t2 < symbolHeight; t2++) {
  43472. row = bitmap[offsetT + t2];
  43473. if (!row) {
  43474. continue;
  43475. }
  43476. symbolRow = symbolBitmap[t2];
  43477. switch (combinationOperator) {
  43478. case 0: // OR
  43479. for (s2 = 0; s2 < symbolWidth; s2++) {
  43480. row[offsetS + s2] |= symbolRow[s2];
  43481. }
  43482. break;
  43483. case 2: // XOR
  43484. for (s2 = 0; s2 < symbolWidth; s2++) {
  43485. row[offsetS + s2] ^= symbolRow[s2];
  43486. }
  43487. break;
  43488. default:
  43489. error('JBIG2 error: operator ' + combinationOperator +
  43490. ' is not supported');
  43491. }
  43492. }
  43493. currentS += symbolWidth - 1;
  43494. }
  43495. i++;
  43496. var deltaS = decodeInteger(contextCache, 'IADS', decoder); // 6.4.8
  43497. if (deltaS === null) {
  43498. break; // OOB
  43499. }
  43500. currentS += deltaS + dsOffset;
  43501. } while (true);
  43502. }
  43503. return bitmap;
  43504. }
  43505. function readSegmentHeader(data, start) {
  43506. var segmentHeader = {};
  43507. segmentHeader.number = readUint32(data, start);
  43508. var flags = data[start + 4];
  43509. var segmentType = flags & 0x3F;
  43510. if (!SegmentTypes[segmentType]) {
  43511. error('JBIG2 error: invalid segment type: ' + segmentType);
  43512. }
  43513. segmentHeader.type = segmentType;
  43514. segmentHeader.typeName = SegmentTypes[segmentType];
  43515. segmentHeader.deferredNonRetain = !!(flags & 0x80);
  43516. var pageAssociationFieldSize = !!(flags & 0x40);
  43517. var referredFlags = data[start + 5];
  43518. var referredToCount = (referredFlags >> 5) & 7;
  43519. var retainBits = [referredFlags & 31];
  43520. var position = start + 6;
  43521. if (referredFlags == 7) {
  43522. referredToCount = readUint32(data, position - 1) & 0x1FFFFFFF;
  43523. position += 3;
  43524. var bytes = (referredToCount + 7) >> 3;
  43525. retainBits[0] = data[position++];
  43526. while (--bytes > 0) {
  43527. retainBits.push(data[position++]);
  43528. }
  43529. } else if (referredFlags == 5 || referredFlags == 6) {
  43530. error('JBIG2 error: invalid referred-to flags');
  43531. }
  43532. segmentHeader.retainBits = retainBits;
  43533. var referredToSegmentNumberSize = (segmentHeader.number <= 256 ? 1 :
  43534. (segmentHeader.number <= 65536 ? 2 : 4));
  43535. var referredTo = [];
  43536. var i, ii;
  43537. for (i = 0; i < referredToCount; i++) {
  43538. var number = (referredToSegmentNumberSize == 1 ? data[position] :
  43539. (referredToSegmentNumberSize == 2 ? readUint16(data, position) :
  43540. readUint32(data, position)));
  43541. referredTo.push(number);
  43542. position += referredToSegmentNumberSize;
  43543. }
  43544. segmentHeader.referredTo = referredTo;
  43545. if (!pageAssociationFieldSize) {
  43546. segmentHeader.pageAssociation = data[position++];
  43547. } else {
  43548. segmentHeader.pageAssociation = readUint32(data, position);
  43549. position += 4;
  43550. }
  43551. segmentHeader.length = readUint32(data, position);
  43552. position += 4;
  43553. if (segmentHeader.length == 0xFFFFFFFF) {
  43554. // 7.2.7 Segment data length, unknown segment length
  43555. if (segmentType === 38) { // ImmediateGenericRegion
  43556. var genericRegionInfo = readRegionSegmentInformation(data, position);
  43557. var genericRegionSegmentFlags = data[position +
  43558. RegionSegmentInformationFieldLength];
  43559. var genericRegionMmr = !!(genericRegionSegmentFlags & 1);
  43560. // searching for the segment end
  43561. var searchPatternLength = 6;
  43562. var searchPattern = new Uint8Array(searchPatternLength);
  43563. if (!genericRegionMmr) {
  43564. searchPattern[0] = 0xFF;
  43565. searchPattern[1] = 0xAC;
  43566. }
  43567. searchPattern[2] = (genericRegionInfo.height >>> 24) & 0xFF;
  43568. searchPattern[3] = (genericRegionInfo.height >> 16) & 0xFF;
  43569. searchPattern[4] = (genericRegionInfo.height >> 8) & 0xFF;
  43570. searchPattern[5] = genericRegionInfo.height & 0xFF;
  43571. for (i = position, ii = data.length; i < ii; i++) {
  43572. var j = 0;
  43573. while (j < searchPatternLength && searchPattern[j] === data[i + j]) {
  43574. j++;
  43575. }
  43576. if (j == searchPatternLength) {
  43577. segmentHeader.length = i + searchPatternLength;
  43578. break;
  43579. }
  43580. }
  43581. if (segmentHeader.length == 0xFFFFFFFF) {
  43582. error('JBIG2 error: segment end was not found');
  43583. }
  43584. } else {
  43585. error('JBIG2 error: invalid unknown segment length');
  43586. }
  43587. }
  43588. segmentHeader.headerEnd = position;
  43589. return segmentHeader;
  43590. }
  43591. function readSegments(header, data, start, end) {
  43592. var segments = [];
  43593. var position = start;
  43594. while (position < end) {
  43595. var segmentHeader = readSegmentHeader(data, position);
  43596. position = segmentHeader.headerEnd;
  43597. var segment = {
  43598. header: segmentHeader,
  43599. data: data
  43600. };
  43601. if (!header.randomAccess) {
  43602. segment.start = position;
  43603. position += segmentHeader.length;
  43604. segment.end = position;
  43605. }
  43606. segments.push(segment);
  43607. if (segmentHeader.type == 51) {
  43608. break; // end of file is found
  43609. }
  43610. }
  43611. if (header.randomAccess) {
  43612. for (var i = 0, ii = segments.length; i < ii; i++) {
  43613. segments[i].start = position;
  43614. position += segments[i].header.length;
  43615. segments[i].end = position;
  43616. }
  43617. }
  43618. return segments;
  43619. }
  43620. // 7.4.1 Region segment information field
  43621. function readRegionSegmentInformation(data, start) {
  43622. return {
  43623. width: readUint32(data, start),
  43624. height: readUint32(data, start + 4),
  43625. x: readUint32(data, start + 8),
  43626. y: readUint32(data, start + 12),
  43627. combinationOperator: data[start + 16] & 7
  43628. };
  43629. }
  43630. var RegionSegmentInformationFieldLength = 17;
  43631. function processSegment(segment, visitor) {
  43632. var header = segment.header;
  43633. var data = segment.data, position = segment.start, end = segment.end;
  43634. var args, at, i, atLength;
  43635. switch (header.type) {
  43636. case 0: // SymbolDictionary
  43637. // 7.4.2 Symbol dictionary segment syntax
  43638. var dictionary = {};
  43639. var dictionaryFlags = readUint16(data, position); // 7.4.2.1.1
  43640. dictionary.huffman = !!(dictionaryFlags & 1);
  43641. dictionary.refinement = !!(dictionaryFlags & 2);
  43642. dictionary.huffmanDHSelector = (dictionaryFlags >> 2) & 3;
  43643. dictionary.huffmanDWSelector = (dictionaryFlags >> 4) & 3;
  43644. dictionary.bitmapSizeSelector = (dictionaryFlags >> 6) & 1;
  43645. dictionary.aggregationInstancesSelector = (dictionaryFlags >> 7) & 1;
  43646. dictionary.bitmapCodingContextUsed = !!(dictionaryFlags & 256);
  43647. dictionary.bitmapCodingContextRetained = !!(dictionaryFlags & 512);
  43648. dictionary.template = (dictionaryFlags >> 10) & 3;
  43649. dictionary.refinementTemplate = (dictionaryFlags >> 12) & 1;
  43650. position += 2;
  43651. if (!dictionary.huffman) {
  43652. atLength = dictionary.template === 0 ? 4 : 1;
  43653. at = [];
  43654. for (i = 0; i < atLength; i++) {
  43655. at.push({
  43656. x: readInt8(data, position),
  43657. y: readInt8(data, position + 1)
  43658. });
  43659. position += 2;
  43660. }
  43661. dictionary.at = at;
  43662. }
  43663. if (dictionary.refinement && !dictionary.refinementTemplate) {
  43664. at = [];
  43665. for (i = 0; i < 2; i++) {
  43666. at.push({
  43667. x: readInt8(data, position),
  43668. y: readInt8(data, position + 1)
  43669. });
  43670. position += 2;
  43671. }
  43672. dictionary.refinementAt = at;
  43673. }
  43674. dictionary.numberOfExportedSymbols = readUint32(data, position);
  43675. position += 4;
  43676. dictionary.numberOfNewSymbols = readUint32(data, position);
  43677. position += 4;
  43678. args = [dictionary, header.number, header.referredTo,
  43679. data, position, end];
  43680. break;
  43681. case 6: // ImmediateTextRegion
  43682. case 7: // ImmediateLosslessTextRegion
  43683. var textRegion = {};
  43684. textRegion.info = readRegionSegmentInformation(data, position);
  43685. position += RegionSegmentInformationFieldLength;
  43686. var textRegionSegmentFlags = readUint16(data, position);
  43687. position += 2;
  43688. textRegion.huffman = !!(textRegionSegmentFlags & 1);
  43689. textRegion.refinement = !!(textRegionSegmentFlags & 2);
  43690. textRegion.stripSize = 1 << ((textRegionSegmentFlags >> 2) & 3);
  43691. textRegion.referenceCorner = (textRegionSegmentFlags >> 4) & 3;
  43692. textRegion.transposed = !!(textRegionSegmentFlags & 64);
  43693. textRegion.combinationOperator = (textRegionSegmentFlags >> 7) & 3;
  43694. textRegion.defaultPixelValue = (textRegionSegmentFlags >> 9) & 1;
  43695. textRegion.dsOffset = (textRegionSegmentFlags << 17) >> 27;
  43696. textRegion.refinementTemplate = (textRegionSegmentFlags >> 15) & 1;
  43697. if (textRegion.huffman) {
  43698. var textRegionHuffmanFlags = readUint16(data, position);
  43699. position += 2;
  43700. textRegion.huffmanFS = (textRegionHuffmanFlags) & 3;
  43701. textRegion.huffmanDS = (textRegionHuffmanFlags >> 2) & 3;
  43702. textRegion.huffmanDT = (textRegionHuffmanFlags >> 4) & 3;
  43703. textRegion.huffmanRefinementDW = (textRegionHuffmanFlags >> 6) & 3;
  43704. textRegion.huffmanRefinementDH = (textRegionHuffmanFlags >> 8) & 3;
  43705. textRegion.huffmanRefinementDX = (textRegionHuffmanFlags >> 10) & 3;
  43706. textRegion.huffmanRefinementDY = (textRegionHuffmanFlags >> 12) & 3;
  43707. textRegion.huffmanRefinementSizeSelector =
  43708. !!(textRegionHuffmanFlags & 14);
  43709. }
  43710. if (textRegion.refinement && !textRegion.refinementTemplate) {
  43711. at = [];
  43712. for (i = 0; i < 2; i++) {
  43713. at.push({
  43714. x: readInt8(data, position),
  43715. y: readInt8(data, position + 1)
  43716. });
  43717. position += 2;
  43718. }
  43719. textRegion.refinementAt = at;
  43720. }
  43721. textRegion.numberOfSymbolInstances = readUint32(data, position);
  43722. position += 4;
  43723. // TODO 7.4.3.1.7 Symbol ID Huffman table decoding
  43724. if (textRegion.huffman) {
  43725. error('JBIG2 error: huffman is not supported');
  43726. }
  43727. args = [textRegion, header.referredTo, data, position, end];
  43728. break;
  43729. case 38: // ImmediateGenericRegion
  43730. case 39: // ImmediateLosslessGenericRegion
  43731. var genericRegion = {};
  43732. genericRegion.info = readRegionSegmentInformation(data, position);
  43733. position += RegionSegmentInformationFieldLength;
  43734. var genericRegionSegmentFlags = data[position++];
  43735. genericRegion.mmr = !!(genericRegionSegmentFlags & 1);
  43736. genericRegion.template = (genericRegionSegmentFlags >> 1) & 3;
  43737. genericRegion.prediction = !!(genericRegionSegmentFlags & 8);
  43738. if (!genericRegion.mmr) {
  43739. atLength = genericRegion.template === 0 ? 4 : 1;
  43740. at = [];
  43741. for (i = 0; i < atLength; i++) {
  43742. at.push({
  43743. x: readInt8(data, position),
  43744. y: readInt8(data, position + 1)
  43745. });
  43746. position += 2;
  43747. }
  43748. genericRegion.at = at;
  43749. }
  43750. args = [genericRegion, data, position, end];
  43751. break;
  43752. case 48: // PageInformation
  43753. var pageInfo = {
  43754. width: readUint32(data, position),
  43755. height: readUint32(data, position + 4),
  43756. resolutionX: readUint32(data, position + 8),
  43757. resolutionY: readUint32(data, position + 12)
  43758. };
  43759. if (pageInfo.height == 0xFFFFFFFF) {
  43760. delete pageInfo.height;
  43761. }
  43762. var pageSegmentFlags = data[position + 16];
  43763. var pageStripingInformatiom = readUint16(data, position + 17);
  43764. pageInfo.lossless = !!(pageSegmentFlags & 1);
  43765. pageInfo.refinement = !!(pageSegmentFlags & 2);
  43766. pageInfo.defaultPixelValue = (pageSegmentFlags >> 2) & 1;
  43767. pageInfo.combinationOperator = (pageSegmentFlags >> 3) & 3;
  43768. pageInfo.requiresBuffer = !!(pageSegmentFlags & 32);
  43769. pageInfo.combinationOperatorOverride = !!(pageSegmentFlags & 64);
  43770. args = [pageInfo];
  43771. break;
  43772. case 49: // EndOfPage
  43773. break;
  43774. case 50: // EndOfStripe
  43775. break;
  43776. case 51: // EndOfFile
  43777. break;
  43778. case 62: // 7.4.15 defines 2 extension types which
  43779. // are comments and can be ignored.
  43780. break;
  43781. default:
  43782. error('JBIG2 error: segment type ' + header.typeName + '(' +
  43783. header.type + ') is not implemented');
  43784. }
  43785. var callbackName = 'on' + header.typeName;
  43786. if (callbackName in visitor) {
  43787. visitor[callbackName].apply(visitor, args);
  43788. }
  43789. }
  43790. function processSegments(segments, visitor) {
  43791. for (var i = 0, ii = segments.length; i < ii; i++) {
  43792. processSegment(segments[i], visitor);
  43793. }
  43794. }
  43795. function parseJbig2(data, start, end) {
  43796. var position = start;
  43797. if (data[position] != 0x97 || data[position + 1] != 0x4A ||
  43798. data[position + 2] != 0x42 || data[position + 3] != 0x32 ||
  43799. data[position + 4] != 0x0D || data[position + 5] != 0x0A ||
  43800. data[position + 6] != 0x1A || data[position + 7] != 0x0A) {
  43801. error('JBIG2 error: invalid header');
  43802. }
  43803. var header = {};
  43804. position += 8;
  43805. var flags = data[position++];
  43806. header.randomAccess = !(flags & 1);
  43807. if (!(flags & 2)) {
  43808. header.numberOfPages = readUint32(data, position);
  43809. position += 4;
  43810. }
  43811. var segments = readSegments(header, data, position, end);
  43812. error('Not implemented');
  43813. // processSegments(segments, new SimpleSegmentVisitor());
  43814. }
  43815. function parseJbig2Chunks(chunks) {
  43816. var visitor = new SimpleSegmentVisitor();
  43817. for (var i = 0, ii = chunks.length; i < ii; i++) {
  43818. var chunk = chunks[i];
  43819. var segments = readSegments({}, chunk.data, chunk.start, chunk.end);
  43820. processSegments(segments, visitor);
  43821. }
  43822. return visitor.buffer;
  43823. }
  43824. function SimpleSegmentVisitor() {}
  43825. SimpleSegmentVisitor.prototype = {
  43826. onPageInformation: function SimpleSegmentVisitor_onPageInformation(info) {
  43827. this.currentPageInfo = info;
  43828. var rowSize = (info.width + 7) >> 3;
  43829. var buffer = new Uint8Array(rowSize * info.height);
  43830. // The contents of ArrayBuffers are initialized to 0.
  43831. // Fill the buffer with 0xFF only if info.defaultPixelValue is set
  43832. if (info.defaultPixelValue) {
  43833. for (var i = 0, ii = buffer.length; i < ii; i++) {
  43834. buffer[i] = 0xFF;
  43835. }
  43836. }
  43837. this.buffer = buffer;
  43838. },
  43839. drawBitmap: function SimpleSegmentVisitor_drawBitmap(regionInfo, bitmap) {
  43840. var pageInfo = this.currentPageInfo;
  43841. var width = regionInfo.width, height = regionInfo.height;
  43842. var rowSize = (pageInfo.width + 7) >> 3;
  43843. var combinationOperator = pageInfo.combinationOperatorOverride ?
  43844. regionInfo.combinationOperator : pageInfo.combinationOperator;
  43845. var buffer = this.buffer;
  43846. var mask0 = 128 >> (regionInfo.x & 7);
  43847. var offset0 = regionInfo.y * rowSize + (regionInfo.x >> 3);
  43848. var i, j, mask, offset;
  43849. switch (combinationOperator) {
  43850. case 0: // OR
  43851. for (i = 0; i < height; i++) {
  43852. mask = mask0;
  43853. offset = offset0;
  43854. for (j = 0; j < width; j++) {
  43855. if (bitmap[i][j]) {
  43856. buffer[offset] |= mask;
  43857. }
  43858. mask >>= 1;
  43859. if (!mask) {
  43860. mask = 128;
  43861. offset++;
  43862. }
  43863. }
  43864. offset0 += rowSize;
  43865. }
  43866. break;
  43867. case 2: // XOR
  43868. for (i = 0; i < height; i++) {
  43869. mask = mask0;
  43870. offset = offset0;
  43871. for (j = 0; j < width; j++) {
  43872. if (bitmap[i][j]) {
  43873. buffer[offset] ^= mask;
  43874. }
  43875. mask >>= 1;
  43876. if (!mask) {
  43877. mask = 128;
  43878. offset++;
  43879. }
  43880. }
  43881. offset0 += rowSize;
  43882. }
  43883. break;
  43884. default:
  43885. error('JBIG2 error: operator ' + combinationOperator +
  43886. ' is not supported');
  43887. }
  43888. },
  43889. onImmediateGenericRegion:
  43890. function SimpleSegmentVisitor_onImmediateGenericRegion(region, data,
  43891. start, end) {
  43892. var regionInfo = region.info;
  43893. var decodingContext = new DecodingContext(data, start, end);
  43894. var bitmap = decodeBitmap(region.mmr, regionInfo.width, regionInfo.height,
  43895. region.template, region.prediction, null,
  43896. region.at, decodingContext);
  43897. this.drawBitmap(regionInfo, bitmap);
  43898. },
  43899. onImmediateLosslessGenericRegion:
  43900. function SimpleSegmentVisitor_onImmediateLosslessGenericRegion() {
  43901. this.onImmediateGenericRegion.apply(this, arguments);
  43902. },
  43903. onSymbolDictionary:
  43904. function SimpleSegmentVisitor_onSymbolDictionary(dictionary,
  43905. currentSegment,
  43906. referredSegments,
  43907. data, start, end) {
  43908. var huffmanTables;
  43909. if (dictionary.huffman) {
  43910. error('JBIG2 error: huffman is not supported');
  43911. }
  43912. // Combines exported symbols from all referred segments
  43913. var symbols = this.symbols;
  43914. if (!symbols) {
  43915. this.symbols = symbols = {};
  43916. }
  43917. var inputSymbols = [];
  43918. for (var i = 0, ii = referredSegments.length; i < ii; i++) {
  43919. inputSymbols = inputSymbols.concat(symbols[referredSegments[i]]);
  43920. }
  43921. var decodingContext = new DecodingContext(data, start, end);
  43922. symbols[currentSegment] = decodeSymbolDictionary(dictionary.huffman,
  43923. dictionary.refinement, inputSymbols, dictionary.numberOfNewSymbols,
  43924. dictionary.numberOfExportedSymbols, huffmanTables,
  43925. dictionary.template, dictionary.at,
  43926. dictionary.refinementTemplate, dictionary.refinementAt,
  43927. decodingContext);
  43928. },
  43929. onImmediateTextRegion:
  43930. function SimpleSegmentVisitor_onImmediateTextRegion(region,
  43931. referredSegments,
  43932. data, start, end) {
  43933. var regionInfo = region.info;
  43934. var huffmanTables;
  43935. // Combines exported symbols from all referred segments
  43936. var symbols = this.symbols;
  43937. var inputSymbols = [];
  43938. for (var i = 0, ii = referredSegments.length; i < ii; i++) {
  43939. inputSymbols = inputSymbols.concat(symbols[referredSegments[i]]);
  43940. }
  43941. var symbolCodeLength = log2(inputSymbols.length);
  43942. var decodingContext = new DecodingContext(data, start, end);
  43943. var bitmap = decodeTextRegion(region.huffman, region.refinement,
  43944. regionInfo.width, regionInfo.height, region.defaultPixelValue,
  43945. region.numberOfSymbolInstances, region.stripSize, inputSymbols,
  43946. symbolCodeLength, region.transposed, region.dsOffset,
  43947. region.referenceCorner, region.combinationOperator, huffmanTables,
  43948. region.refinementTemplate, region.refinementAt, decodingContext);
  43949. this.drawBitmap(regionInfo, bitmap);
  43950. },
  43951. onImmediateLosslessTextRegion:
  43952. function SimpleSegmentVisitor_onImmediateLosslessTextRegion() {
  43953. this.onImmediateTextRegion.apply(this, arguments);
  43954. }
  43955. };
  43956. function Jbig2Image() {}
  43957. Jbig2Image.prototype = {
  43958. parseChunks: function Jbig2Image_parseChunks(chunks) {
  43959. return parseJbig2Chunks(chunks);
  43960. }
  43961. };
  43962. return Jbig2Image;
  43963. })();
  43964. var bidi = PDFJS.bidi = (function bidiClosure() {
  43965. // Character types for symbols from 0000 to 00FF.
  43966. var baseTypes = [
  43967. 'BN', 'BN', 'BN', 'BN', 'BN', 'BN', 'BN', 'BN', 'BN', 'S', 'B', 'S', 'WS',
  43968. 'B', 'BN', 'BN', 'BN', 'BN', 'BN', 'BN', 'BN', 'BN', 'BN', 'BN', 'BN', 'BN',
  43969. 'BN', 'BN', 'B', 'B', 'B', 'S', 'WS', 'ON', 'ON', 'ET', 'ET', 'ET', 'ON',
  43970. 'ON', 'ON', 'ON', 'ON', 'ON', 'CS', 'ON', 'CS', 'ON', 'EN', 'EN', 'EN',
  43971. 'EN', 'EN', 'EN', 'EN', 'EN', 'EN', 'EN', 'ON', 'ON', 'ON', 'ON', 'ON',
  43972. 'ON', 'ON', 'L', 'L', 'L', 'L', 'L', 'L', 'L', 'L', 'L', 'L', 'L', 'L', 'L',
  43973. 'L', 'L', 'L', 'L', 'L', 'L', 'L', 'L', 'L', 'L', 'L', 'L', 'L', 'ON', 'ON',
  43974. 'ON', 'ON', 'ON', 'ON', 'L', 'L', 'L', 'L', 'L', 'L', 'L', 'L', 'L', 'L',
  43975. 'L', 'L', 'L', 'L', 'L', 'L', 'L', 'L', 'L', 'L', 'L', 'L', 'L', 'L', 'L',
  43976. 'L', 'ON', 'ON', 'ON', 'ON', 'BN', 'BN', 'BN', 'BN', 'BN', 'BN', 'B', 'BN',
  43977. 'BN', 'BN', 'BN', 'BN', 'BN', 'BN', 'BN', 'BN', 'BN', 'BN', 'BN', 'BN',
  43978. 'BN', 'BN', 'BN', 'BN', 'BN', 'BN', 'BN', 'BN', 'BN', 'BN', 'BN', 'BN',
  43979. 'BN', 'CS', 'ON', 'ET', 'ET', 'ET', 'ET', 'ON', 'ON', 'ON', 'ON', 'L', 'ON',
  43980. 'ON', 'ON', 'ON', 'ON', 'ET', 'ET', 'EN', 'EN', 'ON', 'L', 'ON', 'ON', 'ON',
  43981. 'EN', 'L', 'ON', 'ON', 'ON', 'ON', 'ON', 'L', 'L', 'L', 'L', 'L', 'L', 'L',
  43982. 'L', 'L', 'L', 'L', 'L', 'L', 'L', 'L', 'L', 'L', 'L', 'L', 'L', 'L', 'L',
  43983. 'L', 'ON', 'L', 'L', 'L', 'L', 'L', 'L', 'L', 'L', 'L', 'L', 'L', 'L', 'L',
  43984. 'L', 'L', 'L', 'L', 'L', 'L', 'L', 'L', 'L', 'L', 'L', 'L', 'L', 'L', 'L',
  43985. 'L', 'L', 'L', 'ON', 'L', 'L', 'L', 'L', 'L', 'L', 'L', 'L'
  43986. ];
  43987. // Character types for symbols from 0600 to 06FF
  43988. var arabicTypes = [
  43989. 'AL', 'AL', 'AL', 'AL', 'AL', 'AL', 'AL', 'AL', 'AL', 'AL', 'AL', 'AL',
  43990. 'CS', 'AL', 'ON', 'ON', 'NSM', 'NSM', 'NSM', 'NSM', 'NSM', 'NSM', 'AL',
  43991. 'AL', 'AL', 'AL', 'AL', 'AL', 'AL', 'AL', 'AL', 'AL', 'AL', 'AL', 'AL',
  43992. 'AL', 'AL', 'AL', 'AL', 'AL', 'AL', 'AL', 'AL', 'AL', 'AL', 'AL', 'AL',
  43993. 'AL', 'AL', 'AL', 'AL', 'AL', 'AL', 'AL', 'AL', 'AL', 'AL', 'AL', 'AL',
  43994. 'AL', 'AL', 'AL', 'AL', 'AL', 'AL', 'AL', 'AL', 'AL', 'AL', 'AL', 'AL',
  43995. 'AL', 'AL', 'AL', 'AL', 'NSM', 'NSM', 'NSM', 'NSM', 'NSM', 'NSM', 'NSM',
  43996. 'NSM', 'NSM', 'NSM', 'NSM', 'NSM', 'NSM', 'NSM', 'AL', 'AL', 'AL', 'AL',
  43997. 'AL', 'AL', 'AL', 'AN', 'AN', 'AN', 'AN', 'AN', 'AN', 'AN', 'AN', 'AN',
  43998. 'AN', 'ET', 'AN', 'AN', 'AL', 'AL', 'AL', 'NSM', 'AL', 'AL', 'AL', 'AL',
  43999. 'AL', 'AL', 'AL', 'AL', 'AL', 'AL', 'AL', 'AL', 'AL', 'AL', 'AL', 'AL',
  44000. 'AL', 'AL', 'AL', 'AL', 'AL', 'AL', 'AL', 'AL', 'AL', 'AL', 'AL', 'AL',
  44001. 'AL', 'AL', 'AL', 'AL', 'AL', 'AL', 'AL', 'AL', 'AL', 'AL', 'AL', 'AL',
  44002. 'AL', 'AL', 'AL', 'AL', 'AL', 'AL', 'AL', 'AL', 'AL', 'AL', 'AL', 'AL',
  44003. 'AL', 'AL', 'AL', 'AL', 'AL', 'AL', 'AL', 'AL', 'AL', 'AL', 'AL', 'AL',
  44004. 'AL', 'AL', 'AL', 'AL', 'AL', 'AL', 'AL', 'AL', 'AL', 'AL', 'AL', 'AL',
  44005. 'AL', 'AL', 'AL', 'AL', 'AL', 'AL', 'AL', 'AL', 'AL', 'AL', 'AL', 'AL',
  44006. 'AL', 'AL', 'AL', 'AL', 'AL', 'AL', 'AL', 'AL', 'AL', 'AL', 'AL', 'AL',
  44007. 'AL', 'NSM', 'NSM', 'NSM', 'NSM', 'NSM', 'NSM', 'NSM', 'NSM', 'NSM', 'NSM',
  44008. 'NSM', 'NSM', 'NSM', 'NSM', 'NSM', 'NSM', 'NSM', 'NSM', 'NSM', 'ON', 'NSM',
  44009. 'NSM', 'NSM', 'NSM', 'AL', 'AL', 'AL', 'AL', 'AL', 'AL', 'AL', 'AL', 'AL',
  44010. 'AL', 'AL', 'AL', 'AL', 'AL', 'AL', 'AL', 'AL', 'AL'
  44011. ];
  44012. function isOdd(i) {
  44013. return (i & 1) !== 0;
  44014. }
  44015. function isEven(i) {
  44016. return (i & 1) === 0;
  44017. }
  44018. function findUnequal(arr, start, value) {
  44019. for (var j = start, jj = arr.length; j < jj; ++j) {
  44020. if (arr[j] != value) {
  44021. return j;
  44022. }
  44023. }
  44024. return j;
  44025. }
  44026. function setValues(arr, start, end, value) {
  44027. for (var j = start; j < end; ++j) {
  44028. arr[j] = value;
  44029. }
  44030. }
  44031. function reverseValues(arr, start, end) {
  44032. for (var i = start, j = end - 1; i < j; ++i, --j) {
  44033. var temp = arr[i];
  44034. arr[i] = arr[j];
  44035. arr[j] = temp;
  44036. }
  44037. }
  44038. function createBidiText(str, isLTR, vertical) {
  44039. return {
  44040. str: str,
  44041. dir: (vertical ? 'ttb' : (isLTR ? 'ltr' : 'rtl'))
  44042. };
  44043. }
  44044. // These are used in bidi(), which is called frequently. We re-use them on
  44045. // each call to avoid unnecessary allocations.
  44046. var chars = [];
  44047. var types = [];
  44048. function bidi(str, startLevel, vertical) {
  44049. var isLTR = true;
  44050. var strLength = str.length;
  44051. if (strLength === 0 || vertical) {
  44052. return createBidiText(str, isLTR, vertical);
  44053. }
  44054. // Get types and fill arrays
  44055. chars.length = 0;
  44056. types.length = 0;
  44057. var numBidi = 0;
  44058. var i, ii;
  44059. for (i = 0; i < strLength; ++i) {
  44060. chars[i] = str.charAt(i);
  44061. var charCode = str.charCodeAt(i);
  44062. var charType = 'L';
  44063. if (charCode <= 0x00ff) {
  44064. charType = baseTypes[charCode];
  44065. } else if (0x0590 <= charCode && charCode <= 0x05f4) {
  44066. charType = 'R';
  44067. } else if (0x0600 <= charCode && charCode <= 0x06ff) {
  44068. charType = arabicTypes[charCode & 0xff];
  44069. } else if (0x0700 <= charCode && charCode <= 0x08AC) {
  44070. charType = 'AL';
  44071. }
  44072. if (charType == 'R' || charType == 'AL' || charType == 'AN') {
  44073. numBidi++;
  44074. }
  44075. types[i] = charType;
  44076. }
  44077. // Detect the bidi method
  44078. // - If there are no rtl characters then no bidi needed
  44079. // - If less than 30% chars are rtl then string is primarily ltr
  44080. // - If more than 30% chars are rtl then string is primarily rtl
  44081. if (numBidi === 0) {
  44082. isLTR = true;
  44083. return createBidiText(str, isLTR);
  44084. }
  44085. if (startLevel == -1) {
  44086. if ((strLength / numBidi) < 0.3) {
  44087. isLTR = true;
  44088. startLevel = 0;
  44089. } else {
  44090. isLTR = false;
  44091. startLevel = 1;
  44092. }
  44093. }
  44094. var levels = [];
  44095. for (i = 0; i < strLength; ++i) {
  44096. levels[i] = startLevel;
  44097. }
  44098. /*
  44099. X1-X10: skip most of this, since we are NOT doing the embeddings.
  44100. */
  44101. var e = (isOdd(startLevel) ? 'R' : 'L');
  44102. var sor = e;
  44103. var eor = sor;
  44104. /*
  44105. W1. Examine each non-spacing mark (NSM) in the level run, and change the
  44106. type of the NSM to the type of the previous character. If the NSM is at the
  44107. start of the level run, it will get the type of sor.
  44108. */
  44109. var lastType = sor;
  44110. for (i = 0; i < strLength; ++i) {
  44111. if (types[i] == 'NSM') {
  44112. types[i] = lastType;
  44113. } else {
  44114. lastType = types[i];
  44115. }
  44116. }
  44117. /*
  44118. W2. Search backwards from each instance of a European number until the
  44119. first strong type (R, L, AL, or sor) is found. If an AL is found, change
  44120. the type of the European number to Arabic number.
  44121. */
  44122. lastType = sor;
  44123. var t;
  44124. for (i = 0; i < strLength; ++i) {
  44125. t = types[i];
  44126. if (t == 'EN') {
  44127. types[i] = (lastType == 'AL') ? 'AN' : 'EN';
  44128. } else if (t == 'R' || t == 'L' || t == 'AL') {
  44129. lastType = t;
  44130. }
  44131. }
  44132. /*
  44133. W3. Change all ALs to R.
  44134. */
  44135. for (i = 0; i < strLength; ++i) {
  44136. t = types[i];
  44137. if (t == 'AL') {
  44138. types[i] = 'R';
  44139. }
  44140. }
  44141. /*
  44142. W4. A single European separator between two European numbers changes to a
  44143. European number. A single common separator between two numbers of the same
  44144. type changes to that type:
  44145. */
  44146. for (i = 1; i < strLength - 1; ++i) {
  44147. if (types[i] == 'ES' && types[i - 1] == 'EN' && types[i + 1] == 'EN') {
  44148. types[i] = 'EN';
  44149. }
  44150. if (types[i] == 'CS' && (types[i - 1] == 'EN' || types[i - 1] == 'AN') &&
  44151. types[i + 1] == types[i - 1]) {
  44152. types[i] = types[i - 1];
  44153. }
  44154. }
  44155. /*
  44156. W5. A sequence of European terminators adjacent to European numbers changes
  44157. to all European numbers:
  44158. */
  44159. for (i = 0; i < strLength; ++i) {
  44160. if (types[i] == 'EN') {
  44161. // do before
  44162. var j;
  44163. for (j = i - 1; j >= 0; --j) {
  44164. if (types[j] != 'ET') {
  44165. break;
  44166. }
  44167. types[j] = 'EN';
  44168. }
  44169. // do after
  44170. for (j = i + 1; j < strLength; --j) {
  44171. if (types[j] != 'ET') {
  44172. break;
  44173. }
  44174. types[j] = 'EN';
  44175. }
  44176. }
  44177. }
  44178. /*
  44179. W6. Otherwise, separators and terminators change to Other Neutral:
  44180. */
  44181. for (i = 0; i < strLength; ++i) {
  44182. t = types[i];
  44183. if (t == 'WS' || t == 'ES' || t == 'ET' || t == 'CS') {
  44184. types[i] = 'ON';
  44185. }
  44186. }
  44187. /*
  44188. W7. Search backwards from each instance of a European number until the
  44189. first strong type (R, L, or sor) is found. If an L is found, then change
  44190. the type of the European number to L.
  44191. */
  44192. lastType = sor;
  44193. for (i = 0; i < strLength; ++i) {
  44194. t = types[i];
  44195. if (t == 'EN') {
  44196. types[i] = ((lastType == 'L') ? 'L' : 'EN');
  44197. } else if (t == 'R' || t == 'L') {
  44198. lastType = t;
  44199. }
  44200. }
  44201. /*
  44202. N1. A sequence of neutrals takes the direction of the surrounding strong
  44203. text if the text on both sides has the same direction. European and Arabic
  44204. numbers are treated as though they were R. Start-of-level-run (sor) and
  44205. end-of-level-run (eor) are used at level run boundaries.
  44206. */
  44207. for (i = 0; i < strLength; ++i) {
  44208. if (types[i] == 'ON') {
  44209. var end = findUnequal(types, i + 1, 'ON');
  44210. var before = sor;
  44211. if (i > 0) {
  44212. before = types[i - 1];
  44213. }
  44214. var after = eor;
  44215. if (end + 1 < strLength) {
  44216. after = types[end + 1];
  44217. }
  44218. if (before != 'L') {
  44219. before = 'R';
  44220. }
  44221. if (after != 'L') {
  44222. after = 'R';
  44223. }
  44224. if (before == after) {
  44225. setValues(types, i, end, before);
  44226. }
  44227. i = end - 1; // reset to end (-1 so next iteration is ok)
  44228. }
  44229. }
  44230. /*
  44231. N2. Any remaining neutrals take the embedding direction.
  44232. */
  44233. for (i = 0; i < strLength; ++i) {
  44234. if (types[i] == 'ON') {
  44235. types[i] = e;
  44236. }
  44237. }
  44238. /*
  44239. I1. For all characters with an even (left-to-right) embedding direction,
  44240. those of type R go up one level and those of type AN or EN go up two
  44241. levels.
  44242. I2. For all characters with an odd (right-to-left) embedding direction,
  44243. those of type L, EN or AN go up one level.
  44244. */
  44245. for (i = 0; i < strLength; ++i) {
  44246. t = types[i];
  44247. if (isEven(levels[i])) {
  44248. if (t == 'R') {
  44249. levels[i] += 1;
  44250. } else if (t == 'AN' || t == 'EN') {
  44251. levels[i] += 2;
  44252. }
  44253. } else { // isOdd
  44254. if (t == 'L' || t == 'AN' || t == 'EN') {
  44255. levels[i] += 1;
  44256. }
  44257. }
  44258. }
  44259. /*
  44260. L1. On each line, reset the embedding level of the following characters to
  44261. the paragraph embedding level:
  44262. segment separators,
  44263. paragraph separators,
  44264. any sequence of whitespace characters preceding a segment separator or
  44265. paragraph separator, and any sequence of white space characters at the end
  44266. of the line.
  44267. */
  44268. // don't bother as text is only single line
  44269. /*
  44270. L2. From the highest level found in the text to the lowest odd level on
  44271. each line, reverse any contiguous sequence of characters that are at that
  44272. level or higher.
  44273. */
  44274. // find highest level & lowest odd level
  44275. var highestLevel = -1;
  44276. var lowestOddLevel = 99;
  44277. var level;
  44278. for (i = 0, ii = levels.length; i < ii; ++i) {
  44279. level = levels[i];
  44280. if (highestLevel < level) {
  44281. highestLevel = level;
  44282. }
  44283. if (lowestOddLevel > level && isOdd(level)) {
  44284. lowestOddLevel = level;
  44285. }
  44286. }
  44287. // now reverse between those limits
  44288. for (level = highestLevel; level >= lowestOddLevel; --level) {
  44289. // find segments to reverse
  44290. var start = -1;
  44291. for (i = 0, ii = levels.length; i < ii; ++i) {
  44292. if (levels[i] < level) {
  44293. if (start >= 0) {
  44294. reverseValues(chars, start, i);
  44295. start = -1;
  44296. }
  44297. } else if (start < 0) {
  44298. start = i;
  44299. }
  44300. }
  44301. if (start >= 0) {
  44302. reverseValues(chars, start, levels.length);
  44303. }
  44304. }
  44305. /*
  44306. L3. Combining marks applied to a right-to-left base character will at this
  44307. point precede their base character. If the rendering engine expects them to
  44308. follow the base characters in the final display process, then the ordering
  44309. of the marks and the base character must be reversed.
  44310. */
  44311. // don't bother for now
  44312. /*
  44313. L4. A character that possesses the mirrored property as specified by
  44314. Section 4.7, Mirrored, must be depicted by a mirrored glyph if the resolved
  44315. directionality of that character is R.
  44316. */
  44317. // don't mirror as characters are already mirrored in the pdf
  44318. // Finally, return string
  44319. var result = '';
  44320. for (i = 0, ii = chars.length; i < ii; ++i) {
  44321. var ch = chars[i];
  44322. if (ch != '<' && ch != '>') {
  44323. result += ch;
  44324. }
  44325. }
  44326. return createBidiText(result, isLTR);
  44327. }
  44328. return bidi;
  44329. })();
  44330. /* -*- Mode: Java; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
  44331. /* vim: set shiftwidth=2 tabstop=2 autoindent cindent expandtab: */
  44332. /* Copyright 2014 Opera Software ASA
  44333. *
  44334. * Licensed under the Apache License, Version 2.0 (the "License");
  44335. * you may not use this file except in compliance with the License.
  44336. * You may obtain a copy of the License at
  44337. *
  44338. * http://www.apache.org/licenses/LICENSE-2.0
  44339. *
  44340. * Unless required by applicable law or agreed to in writing, software
  44341. * distributed under the License is distributed on an "AS IS" BASIS,
  44342. * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
  44343. * See the License for the specific language governing permissions and
  44344. * limitations under the License.
  44345. *
  44346. *
  44347. * Based on https://code.google.com/p/smhasher/wiki/MurmurHash3.
  44348. * Hashes roughly 100 KB per millisecond on i7 3.4 GHz.
  44349. */
  44350. /* globals Uint32ArrayView */
  44351. 'use strict';
  44352. var MurmurHash3_64 = (function MurmurHash3_64Closure (seed) {
  44353. // Workaround for missing math precison in JS.
  44354. var MASK_HIGH = 0xffff0000;
  44355. var MASK_LOW = 0xffff;
  44356. function MurmurHash3_64 (seed) {
  44357. var SEED = 0xc3d2e1f0;
  44358. this.h1 = seed ? seed & 0xffffffff : SEED;
  44359. this.h2 = seed ? seed & 0xffffffff : SEED;
  44360. }
  44361. MurmurHash3_64.prototype = {
  44362. update: function MurmurHash3_64_update(input) {
  44363. var useUint32ArrayView = false;
  44364. var i;
  44365. if (typeof input == 'string') {
  44366. var data = new Uint8Array(input.length * 2);
  44367. var length = 0;
  44368. for (i = 0; i < input.length; i++) {
  44369. var code = input.charCodeAt(i);
  44370. if (code <= 0xff) {
  44371. data[length++] = code;
  44372. }
  44373. else {
  44374. data[length++] = code >>> 8;
  44375. data[length++] = code & 0xff;
  44376. }
  44377. }
  44378. } else if (input instanceof Uint8Array) {
  44379. data = input;
  44380. length = data.length;
  44381. } else if (typeof input === 'object' && ('length' in input)) {
  44382. // processing regular arrays as well, e.g. for IE9
  44383. data = input;
  44384. length = data.length;
  44385. useUint32ArrayView = true;
  44386. } else {
  44387. throw new Error('Wrong data format in MurmurHash3_64_update. ' +
  44388. 'Input must be a string or array.');
  44389. }
  44390. var blockCounts = length >> 2;
  44391. var tailLength = length - blockCounts * 4;
  44392. // we don't care about endianness here
  44393. var dataUint32 = useUint32ArrayView ?
  44394. new Uint32ArrayView(data, blockCounts) :
  44395. new Uint32Array(data.buffer, 0, blockCounts);
  44396. var k1 = 0;
  44397. var k2 = 0;
  44398. var h1 = this.h1;
  44399. var h2 = this.h2;
  44400. var C1 = 0xcc9e2d51;
  44401. var C2 = 0x1b873593;
  44402. var C1_LOW = C1 & MASK_LOW;
  44403. var C2_LOW = C2 & MASK_LOW;
  44404. for (i = 0; i < blockCounts; i++) {
  44405. if (i & 1) {
  44406. k1 = dataUint32[i];
  44407. k1 = (k1 * C1 & MASK_HIGH) | (k1 * C1_LOW & MASK_LOW);
  44408. k1 = k1 << 15 | k1 >>> 17;
  44409. k1 = (k1 * C2 & MASK_HIGH) | (k1 * C2_LOW & MASK_LOW);
  44410. h1 ^= k1;
  44411. h1 = h1 << 13 | h1 >>> 19;
  44412. h1 = h1 * 5 + 0xe6546b64;
  44413. } else {
  44414. k2 = dataUint32[i];
  44415. k2 = (k2 * C1 & MASK_HIGH) | (k2 * C1_LOW & MASK_LOW);
  44416. k2 = k2 << 15 | k2 >>> 17;
  44417. k2 = (k2 * C2 & MASK_HIGH) | (k2 * C2_LOW & MASK_LOW);
  44418. h2 ^= k2;
  44419. h2 = h2 << 13 | h2 >>> 19;
  44420. h2 = h2 * 5 + 0xe6546b64;
  44421. }
  44422. }
  44423. k1 = 0;
  44424. switch (tailLength) {
  44425. case 3:
  44426. k1 ^= data[blockCounts * 4 + 2] << 16;
  44427. /* falls through */
  44428. case 2:
  44429. k1 ^= data[blockCounts * 4 + 1] << 8;
  44430. /* falls through */
  44431. case 1:
  44432. k1 ^= data[blockCounts * 4];
  44433. /* falls through */
  44434. k1 = (k1 * C1 & MASK_HIGH) | (k1 * C1_LOW & MASK_LOW);
  44435. k1 = k1 << 15 | k1 >>> 17;
  44436. k1 = (k1 * C2 & MASK_HIGH) | (k1 * C2_LOW & MASK_LOW);
  44437. if (blockCounts & 1) {
  44438. h1 ^= k1;
  44439. } else {
  44440. h2 ^= k1;
  44441. }
  44442. }
  44443. this.h1 = h1;
  44444. this.h2 = h2;
  44445. return this;
  44446. },
  44447. hexdigest: function MurmurHash3_64_hexdigest () {
  44448. var h1 = this.h1;
  44449. var h2 = this.h2;
  44450. h1 ^= h2 >>> 1;
  44451. h1 = (h1 * 0xed558ccd & MASK_HIGH) | (h1 * 0x8ccd & MASK_LOW);
  44452. h2 = (h2 * 0xff51afd7 & MASK_HIGH) |
  44453. (((h2 << 16 | h1 >>> 16) * 0xafd7ed55 & MASK_HIGH) >>> 16);
  44454. h1 ^= h2 >>> 1;
  44455. h1 = (h1 * 0x1a85ec53 & MASK_HIGH) | (h1 * 0xec53 & MASK_LOW);
  44456. h2 = (h2 * 0xc4ceb9fe & MASK_HIGH) |
  44457. (((h2 << 16 | h1 >>> 16) * 0xb9fe1a85 & MASK_HIGH) >>> 16);
  44458. h1 ^= h2 >>> 1;
  44459. for (var i = 0, arr = [h1, h2], str = ''; i < arr.length; i++) {
  44460. var hex = (arr[i] >>> 0).toString(16);
  44461. while (hex.length < 8) {
  44462. hex = '0' + hex;
  44463. }
  44464. str += hex;
  44465. }
  44466. return str;
  44467. }
  44468. };
  44469. return MurmurHash3_64;
  44470. })();
  44471. }).call((typeof window === 'undefined') ? this : window);
  44472. if (!PDFJS.workerSrc && typeof document !== 'undefined') {
  44473. // workerSrc is not set -- using last script url to define default location
  44474. PDFJS.workerSrc = (function () {
  44475. 'use strict';
  44476. var scriptTagContainer = document.body ||
  44477. document.getElementsByTagName('head')[0];
  44478. var pdfjsSrc = scriptTagContainer.lastChild.src;
  44479. return pdfjsSrc && pdfjsSrc.replace(/\.js$/i, '.worker.js');
  44480. })();
  44481. }