authoring-common.js 654 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697989910010110210310410510610710810911011111211311411511611711811912012112212312412512612712812913013113213313413513613713813914014114214314414514614714814915015115215315415515615715815916016116216316416516616716816917017117217317417517617717817918018118218318418518618718818919019119219319419519619719819920020120220320420520620720820921021121221321421521621721821922022122222322422522622722822923023123223323423523623723823924024124224324424524624724824925025125225325425525625725825926026126226326426526626726826927027127227327427527627727827928028128228328428528628728828929029129229329429529629729829930030130230330430530630730830931031131231331431531631731831932032132232332432532632732832933033133233333433533633733833934034134234334434534634734834935035135235335435535635735835936036136236336436536636736836937037137237337437537637737837938038138238338438538638738838939039139239339439539639739839940040140240340440540640740840941041141241341441541641741841942042142242342442542642742842943043143243343443543643743843944044144244344444544644744844945045145245345445545645745845946046146246346446546646746846947047147247347447547647747847948048148248348448548648748848949049149249349449549649749849950050150250350450550650750850951051151251351451551651751851952052152252352452552652752852953053153253353453553653753853954054154254354454554654754854955055155255355455555655755855956056156256356456556656756856957057157257357457557657757857958058158258358458558658758858959059159259359459559659759859960060160260360460560660760860961061161261361461561661761861962062162262362462562662762862963063163263363463563663763863964064164264364464564664764864965065165265365465565665765865966066166266366466566666766866967067167267367467567667767867968068168268368468568668768868969069169269369469569669769869970070170270370470570670770870971071171271371471571671771871972072172272372472572672772872973073173273373473573673773873974074174274374474574674774874975075175275375475575675775875976076176276376476576676776876977077177277377477577677777877978078178278378478578678778878979079179279379479579679779879980080180280380480580680780880981081181281381481581681781881982082182282382482582682782882983083183283383483583683783883984084184284384484584684784884985085185285385485585685785885986086186286386486586686786886987087187287387487587687787887988088188288388488588688788888989089189289389489589689789889990090190290390490590690790890991091191291391491591691791891992092192292392492592692792892993093193293393493593693793893994094194294394494594694794894995095195295395495595695795895996096196296396496596696796896997097197297397497597697797897998098198298398498598698798898999099199299399499599699799899910001001100210031004100510061007100810091010101110121013101410151016101710181019102010211022102310241025102610271028102910301031103210331034103510361037103810391040104110421043104410451046104710481049105010511052105310541055105610571058105910601061106210631064106510661067106810691070107110721073107410751076107710781079108010811082108310841085108610871088108910901091109210931094109510961097109810991100110111021103110411051106110711081109111011111112111311141115111611171118111911201121112211231124112511261127112811291130113111321133113411351136113711381139114011411142114311441145114611471148114911501151115211531154115511561157115811591160116111621163116411651166116711681169117011711172117311741175117611771178117911801181118211831184118511861187118811891190119111921193119411951196119711981199120012011202120312041205120612071208120912101211121212131214121512161217121812191220122112221223122412251226122712281229123012311232123312341235123612371238123912401241124212431244124512461247124812491250125112521253125412551256125712581259126012611262126312641265126612671268126912701271127212731274127512761277127812791280128112821283128412851286128712881289129012911292129312941295129612971298129913001301130213031304130513061307130813091310131113121313131413151316131713181319132013211322132313241325132613271328132913301331133213331334133513361337133813391340134113421343134413451346134713481349135013511352135313541355135613571358135913601361136213631364136513661367136813691370137113721373137413751376137713781379138013811382138313841385138613871388138913901391139213931394139513961397139813991400140114021403140414051406140714081409141014111412141314141415141614171418141914201421142214231424142514261427142814291430143114321433143414351436143714381439144014411442144314441445144614471448144914501451145214531454145514561457145814591460146114621463146414651466146714681469147014711472147314741475147614771478147914801481148214831484148514861487148814891490149114921493149414951496149714981499150015011502150315041505150615071508150915101511151215131514151515161517151815191520152115221523152415251526152715281529153015311532153315341535153615371538153915401541154215431544154515461547154815491550155115521553155415551556155715581559156015611562156315641565156615671568156915701571157215731574157515761577157815791580158115821583158415851586158715881589159015911592159315941595159615971598159916001601160216031604160516061607160816091610161116121613161416151616161716181619162016211622162316241625162616271628162916301631163216331634163516361637163816391640164116421643164416451646164716481649165016511652165316541655165616571658165916601661166216631664166516661667166816691670167116721673167416751676167716781679168016811682168316841685168616871688168916901691169216931694169516961697169816991700170117021703170417051706170717081709171017111712171317141715171617171718171917201721172217231724172517261727172817291730173117321733173417351736173717381739174017411742174317441745174617471748174917501751175217531754175517561757175817591760176117621763176417651766176717681769177017711772177317741775177617771778177917801781178217831784178517861787178817891790179117921793179417951796179717981799180018011802180318041805180618071808180918101811181218131814181518161817181818191820182118221823182418251826182718281829183018311832183318341835183618371838183918401841184218431844184518461847184818491850185118521853185418551856185718581859186018611862186318641865186618671868186918701871187218731874187518761877187818791880188118821883188418851886188718881889189018911892189318941895189618971898189919001901190219031904190519061907190819091910191119121913191419151916191719181919192019211922192319241925192619271928192919301931193219331934193519361937193819391940194119421943194419451946194719481949195019511952195319541955195619571958195919601961196219631964196519661967196819691970197119721973197419751976197719781979198019811982198319841985198619871988198919901991199219931994199519961997199819992000200120022003200420052006200720082009201020112012201320142015201620172018201920202021202220232024202520262027202820292030203120322033203420352036203720382039204020412042204320442045204620472048204920502051205220532054205520562057205820592060206120622063206420652066206720682069207020712072207320742075207620772078207920802081208220832084208520862087208820892090209120922093209420952096209720982099210021012102210321042105210621072108210921102111211221132114211521162117211821192120212121222123212421252126212721282129213021312132213321342135213621372138213921402141214221432144214521462147214821492150215121522153215421552156215721582159216021612162216321642165216621672168216921702171217221732174217521762177217821792180218121822183218421852186218721882189219021912192219321942195219621972198219922002201220222032204220522062207220822092210221122122213221422152216221722182219222022212222222322242225222622272228222922302231223222332234223522362237223822392240224122422243224422452246224722482249225022512252225322542255225622572258225922602261226222632264226522662267226822692270227122722273227422752276227722782279228022812282228322842285228622872288228922902291229222932294229522962297229822992300230123022303230423052306230723082309231023112312231323142315231623172318231923202321232223232324232523262327232823292330233123322333233423352336233723382339234023412342234323442345234623472348234923502351235223532354235523562357235823592360236123622363236423652366236723682369237023712372237323742375237623772378237923802381238223832384238523862387238823892390239123922393239423952396239723982399240024012402240324042405240624072408240924102411241224132414241524162417241824192420242124222423242424252426242724282429243024312432243324342435243624372438243924402441244224432444244524462447244824492450245124522453245424552456245724582459246024612462246324642465246624672468246924702471247224732474247524762477247824792480248124822483248424852486248724882489249024912492249324942495249624972498249925002501250225032504250525062507250825092510251125122513251425152516251725182519252025212522252325242525252625272528252925302531253225332534253525362537253825392540254125422543254425452546254725482549255025512552255325542555255625572558255925602561256225632564256525662567256825692570257125722573257425752576257725782579258025812582258325842585258625872588258925902591259225932594259525962597259825992600260126022603260426052606260726082609261026112612261326142615261626172618261926202621262226232624262526262627262826292630263126322633263426352636263726382639264026412642264326442645264626472648264926502651265226532654265526562657265826592660266126622663266426652666266726682669267026712672267326742675267626772678267926802681268226832684268526862687268826892690269126922693269426952696269726982699270027012702270327042705270627072708270927102711271227132714271527162717271827192720272127222723272427252726272727282729273027312732273327342735273627372738273927402741274227432744274527462747274827492750275127522753275427552756275727582759276027612762276327642765276627672768276927702771277227732774277527762777277827792780278127822783278427852786278727882789279027912792279327942795279627972798279928002801280228032804280528062807280828092810281128122813281428152816281728182819282028212822282328242825282628272828282928302831283228332834283528362837283828392840284128422843284428452846284728482849285028512852285328542855285628572858285928602861286228632864286528662867286828692870287128722873287428752876287728782879288028812882288328842885288628872888288928902891289228932894289528962897289828992900290129022903290429052906290729082909291029112912291329142915291629172918291929202921292229232924292529262927292829292930293129322933293429352936293729382939294029412942294329442945294629472948294929502951295229532954295529562957295829592960296129622963296429652966296729682969297029712972297329742975297629772978297929802981298229832984298529862987298829892990299129922993299429952996299729982999300030013002300330043005300630073008300930103011301230133014301530163017301830193020302130223023302430253026302730283029303030313032303330343035303630373038303930403041304230433044304530463047304830493050305130523053305430553056305730583059306030613062306330643065306630673068306930703071307230733074307530763077307830793080308130823083308430853086308730883089309030913092309330943095309630973098309931003101310231033104310531063107310831093110311131123113311431153116311731183119312031213122312331243125312631273128312931303131313231333134313531363137313831393140314131423143314431453146314731483149315031513152315331543155315631573158315931603161316231633164316531663167316831693170317131723173317431753176317731783179318031813182318331843185318631873188318931903191319231933194319531963197319831993200320132023203320432053206320732083209321032113212321332143215321632173218321932203221322232233224322532263227322832293230323132323233323432353236323732383239324032413242324332443245324632473248324932503251325232533254325532563257325832593260326132623263326432653266326732683269327032713272327332743275327632773278327932803281328232833284328532863287328832893290329132923293329432953296329732983299330033013302330333043305330633073308330933103311331233133314331533163317331833193320332133223323332433253326332733283329333033313332333333343335333633373338333933403341334233433344334533463347334833493350335133523353335433553356335733583359336033613362336333643365336633673368336933703371337233733374337533763377337833793380338133823383338433853386338733883389339033913392339333943395339633973398339934003401340234033404340534063407340834093410341134123413341434153416341734183419342034213422342334243425342634273428342934303431343234333434343534363437343834393440344134423443344434453446344734483449345034513452345334543455345634573458345934603461346234633464346534663467346834693470347134723473347434753476347734783479348034813482348334843485348634873488348934903491349234933494349534963497349834993500350135023503350435053506350735083509351035113512351335143515351635173518351935203521352235233524352535263527352835293530353135323533353435353536353735383539354035413542354335443545354635473548354935503551355235533554355535563557355835593560356135623563356435653566356735683569357035713572357335743575357635773578357935803581358235833584358535863587358835893590359135923593359435953596359735983599360036013602360336043605360636073608360936103611361236133614361536163617361836193620362136223623362436253626362736283629363036313632363336343635363636373638363936403641364236433644364536463647364836493650365136523653365436553656365736583659366036613662366336643665366636673668366936703671367236733674367536763677367836793680368136823683368436853686368736883689369036913692369336943695369636973698369937003701370237033704370537063707370837093710371137123713371437153716371737183719372037213722372337243725372637273728372937303731373237333734373537363737373837393740374137423743374437453746374737483749375037513752375337543755375637573758375937603761376237633764376537663767376837693770377137723773377437753776377737783779378037813782378337843785378637873788378937903791379237933794379537963797379837993800380138023803380438053806380738083809381038113812381338143815381638173818381938203821382238233824382538263827382838293830383138323833383438353836383738383839384038413842384338443845384638473848384938503851385238533854385538563857385838593860386138623863386438653866386738683869387038713872387338743875387638773878387938803881388238833884388538863887388838893890389138923893389438953896389738983899390039013902390339043905390639073908390939103911391239133914391539163917391839193920392139223923392439253926392739283929393039313932393339343935393639373938393939403941394239433944394539463947394839493950395139523953395439553956395739583959396039613962396339643965396639673968396939703971397239733974397539763977397839793980398139823983398439853986398739883989399039913992399339943995399639973998399940004001400240034004400540064007400840094010401140124013401440154016401740184019402040214022402340244025402640274028402940304031403240334034403540364037403840394040404140424043404440454046404740484049405040514052405340544055405640574058405940604061406240634064406540664067406840694070407140724073407440754076407740784079408040814082408340844085408640874088408940904091409240934094409540964097409840994100410141024103410441054106410741084109411041114112411341144115411641174118411941204121412241234124412541264127412841294130413141324133413441354136413741384139414041414142414341444145414641474148414941504151415241534154415541564157415841594160416141624163416441654166416741684169417041714172417341744175417641774178417941804181418241834184418541864187418841894190419141924193419441954196419741984199420042014202420342044205420642074208420942104211421242134214421542164217421842194220422142224223422442254226422742284229423042314232423342344235423642374238423942404241424242434244424542464247424842494250425142524253425442554256425742584259426042614262426342644265426642674268426942704271427242734274427542764277427842794280428142824283428442854286428742884289429042914292429342944295429642974298429943004301430243034304430543064307430843094310431143124313431443154316431743184319432043214322432343244325432643274328432943304331433243334334433543364337433843394340434143424343434443454346434743484349435043514352435343544355435643574358435943604361436243634364436543664367436843694370437143724373437443754376437743784379438043814382438343844385438643874388438943904391439243934394439543964397439843994400440144024403440444054406440744084409441044114412441344144415441644174418441944204421442244234424442544264427442844294430443144324433443444354436443744384439444044414442444344444445444644474448444944504451445244534454445544564457445844594460446144624463446444654466446744684469447044714472447344744475447644774478447944804481448244834484448544864487448844894490449144924493449444954496449744984499450045014502450345044505450645074508450945104511451245134514451545164517451845194520452145224523452445254526452745284529453045314532453345344535453645374538453945404541454245434544454545464547454845494550455145524553455445554556455745584559456045614562456345644565456645674568456945704571457245734574457545764577457845794580458145824583458445854586458745884589459045914592459345944595459645974598459946004601460246034604460546064607460846094610461146124613461446154616461746184619462046214622462346244625462646274628462946304631463246334634463546364637463846394640464146424643464446454646464746484649465046514652465346544655465646574658465946604661466246634664466546664667466846694670467146724673467446754676467746784679468046814682468346844685468646874688468946904691469246934694469546964697469846994700470147024703470447054706470747084709471047114712471347144715471647174718471947204721472247234724472547264727472847294730473147324733473447354736473747384739474047414742474347444745474647474748474947504751475247534754475547564757475847594760476147624763476447654766476747684769477047714772477347744775477647774778477947804781478247834784478547864787478847894790479147924793479447954796479747984799480048014802480348044805480648074808480948104811481248134814481548164817481848194820482148224823482448254826482748284829483048314832483348344835483648374838483948404841484248434844484548464847484848494850485148524853485448554856485748584859486048614862486348644865486648674868486948704871487248734874487548764877487848794880488148824883488448854886488748884889489048914892489348944895489648974898489949004901490249034904490549064907490849094910491149124913491449154916491749184919492049214922492349244925492649274928492949304931493249334934493549364937493849394940494149424943494449454946494749484949495049514952495349544955495649574958495949604961496249634964496549664967496849694970497149724973497449754976497749784979498049814982498349844985498649874988498949904991499249934994499549964997499849995000500150025003500450055006500750085009501050115012501350145015501650175018501950205021502250235024502550265027502850295030503150325033503450355036503750385039504050415042504350445045504650475048504950505051505250535054505550565057505850595060506150625063506450655066506750685069507050715072507350745075507650775078507950805081508250835084508550865087508850895090509150925093509450955096509750985099510051015102510351045105510651075108510951105111511251135114511551165117511851195120512151225123512451255126512751285129513051315132513351345135513651375138513951405141514251435144514551465147514851495150515151525153515451555156515751585159516051615162516351645165516651675168516951705171517251735174517551765177517851795180518151825183518451855186518751885189519051915192519351945195519651975198519952005201520252035204520552065207520852095210521152125213521452155216521752185219522052215222522352245225522652275228522952305231523252335234523552365237523852395240524152425243524452455246524752485249525052515252525352545255525652575258525952605261526252635264526552665267526852695270527152725273527452755276527752785279528052815282528352845285528652875288528952905291529252935294529552965297529852995300530153025303530453055306530753085309531053115312531353145315531653175318531953205321532253235324532553265327532853295330533153325333533453355336533753385339534053415342534353445345534653475348534953505351535253535354535553565357535853595360536153625363536453655366536753685369537053715372537353745375537653775378537953805381538253835384538553865387538853895390539153925393539453955396539753985399540054015402540354045405540654075408540954105411541254135414541554165417541854195420542154225423542454255426542754285429543054315432543354345435543654375438543954405441544254435444544554465447544854495450545154525453545454555456545754585459546054615462546354645465546654675468546954705471547254735474547554765477547854795480548154825483548454855486548754885489549054915492549354945495549654975498549955005501550255035504550555065507550855095510551155125513551455155516551755185519552055215522552355245525552655275528552955305531553255335534553555365537553855395540554155425543554455455546554755485549555055515552555355545555555655575558555955605561556255635564556555665567556855695570557155725573557455755576557755785579558055815582558355845585558655875588558955905591559255935594559555965597559855995600560156025603560456055606560756085609561056115612561356145615561656175618561956205621562256235624562556265627562856295630563156325633563456355636563756385639564056415642564356445645564656475648564956505651565256535654565556565657565856595660566156625663566456655666566756685669567056715672567356745675567656775678567956805681568256835684568556865687568856895690569156925693569456955696569756985699570057015702570357045705570657075708570957105711571257135714571557165717571857195720572157225723572457255726572757285729573057315732573357345735573657375738573957405741574257435744574557465747574857495750575157525753575457555756575757585759576057615762576357645765576657675768576957705771577257735774577557765777577857795780578157825783578457855786578757885789579057915792579357945795579657975798579958005801580258035804580558065807580858095810581158125813581458155816581758185819582058215822582358245825582658275828582958305831583258335834583558365837583858395840584158425843584458455846584758485849585058515852585358545855585658575858585958605861586258635864586558665867586858695870587158725873587458755876587758785879588058815882588358845885588658875888588958905891589258935894589558965897589858995900590159025903590459055906590759085909591059115912591359145915591659175918591959205921592259235924592559265927592859295930593159325933593459355936593759385939594059415942594359445945594659475948594959505951595259535954595559565957595859595960596159625963596459655966596759685969597059715972597359745975597659775978597959805981598259835984598559865987598859895990599159925993599459955996599759985999600060016002600360046005600660076008600960106011601260136014601560166017601860196020602160226023602460256026602760286029603060316032603360346035603660376038603960406041604260436044604560466047604860496050605160526053605460556056605760586059606060616062606360646065606660676068606960706071607260736074607560766077607860796080608160826083608460856086608760886089609060916092609360946095609660976098609961006101610261036104610561066107610861096110611161126113611461156116611761186119612061216122612361246125612661276128612961306131613261336134613561366137613861396140614161426143614461456146614761486149615061516152615361546155615661576158615961606161616261636164616561666167616861696170617161726173617461756176617761786179618061816182618361846185618661876188618961906191619261936194619561966197619861996200620162026203620462056206620762086209621062116212621362146215621662176218621962206221622262236224622562266227622862296230623162326233623462356236623762386239624062416242624362446245624662476248624962506251625262536254625562566257625862596260626162626263626462656266626762686269627062716272627362746275627662776278627962806281628262836284628562866287628862896290629162926293629462956296629762986299630063016302630363046305630663076308630963106311631263136314631563166317631863196320632163226323632463256326632763286329633063316332633363346335633663376338633963406341634263436344634563466347634863496350635163526353635463556356635763586359636063616362636363646365636663676368636963706371637263736374637563766377637863796380638163826383638463856386638763886389639063916392639363946395639663976398639964006401640264036404640564066407640864096410641164126413641464156416641764186419642064216422642364246425642664276428642964306431643264336434643564366437643864396440644164426443644464456446644764486449645064516452645364546455645664576458645964606461646264636464646564666467646864696470647164726473647464756476647764786479648064816482648364846485648664876488648964906491649264936494649564966497649864996500650165026503650465056506650765086509651065116512651365146515651665176518651965206521652265236524652565266527652865296530653165326533653465356536653765386539654065416542654365446545654665476548654965506551655265536554655565566557655865596560656165626563656465656566656765686569657065716572657365746575657665776578657965806581658265836584658565866587658865896590659165926593659465956596659765986599660066016602660366046605660666076608660966106611661266136614661566166617661866196620662166226623662466256626662766286629663066316632663366346635663666376638663966406641664266436644664566466647664866496650665166526653665466556656665766586659666066616662666366646665666666676668666966706671667266736674667566766677667866796680668166826683668466856686668766886689669066916692669366946695669666976698669967006701670267036704670567066707670867096710671167126713671467156716671767186719672067216722672367246725672667276728672967306731673267336734673567366737673867396740674167426743674467456746674767486749675067516752675367546755675667576758675967606761676267636764676567666767676867696770677167726773677467756776677767786779678067816782678367846785678667876788678967906791679267936794679567966797679867996800680168026803680468056806680768086809681068116812681368146815681668176818681968206821682268236824682568266827682868296830683168326833683468356836683768386839684068416842684368446845684668476848684968506851685268536854685568566857685868596860686168626863686468656866686768686869687068716872687368746875687668776878687968806881688268836884688568866887688868896890689168926893689468956896689768986899690069016902690369046905690669076908690969106911691269136914691569166917691869196920692169226923692469256926692769286929693069316932693369346935693669376938693969406941694269436944694569466947694869496950695169526953695469556956695769586959696069616962696369646965696669676968696969706971697269736974697569766977697869796980698169826983698469856986698769886989699069916992699369946995699669976998699970007001700270037004700570067007700870097010701170127013701470157016701770187019702070217022702370247025702670277028702970307031703270337034703570367037703870397040704170427043704470457046704770487049705070517052705370547055705670577058705970607061706270637064706570667067706870697070707170727073707470757076707770787079708070817082708370847085708670877088708970907091709270937094709570967097709870997100710171027103710471057106710771087109711071117112711371147115711671177118711971207121712271237124712571267127712871297130713171327133713471357136713771387139714071417142714371447145714671477148714971507151715271537154715571567157715871597160716171627163716471657166716771687169717071717172717371747175717671777178717971807181718271837184718571867187718871897190719171927193719471957196719771987199720072017202720372047205720672077208720972107211721272137214721572167217721872197220722172227223722472257226722772287229723072317232723372347235723672377238723972407241724272437244724572467247724872497250725172527253725472557256725772587259726072617262726372647265726672677268726972707271727272737274727572767277727872797280728172827283728472857286728772887289729072917292729372947295729672977298729973007301730273037304730573067307730873097310731173127313731473157316731773187319732073217322732373247325732673277328732973307331733273337334733573367337733873397340734173427343734473457346734773487349735073517352735373547355735673577358735973607361736273637364736573667367736873697370737173727373737473757376737773787379738073817382738373847385738673877388738973907391739273937394739573967397739873997400740174027403740474057406740774087409741074117412741374147415741674177418741974207421742274237424742574267427742874297430743174327433743474357436743774387439744074417442744374447445744674477448744974507451745274537454745574567457745874597460746174627463746474657466746774687469747074717472747374747475747674777478747974807481748274837484748574867487748874897490749174927493749474957496749774987499750075017502750375047505750675077508750975107511751275137514751575167517751875197520752175227523752475257526752775287529753075317532753375347535753675377538753975407541754275437544754575467547754875497550755175527553755475557556755775587559756075617562756375647565756675677568756975707571757275737574757575767577757875797580758175827583758475857586758775887589759075917592759375947595759675977598759976007601760276037604760576067607760876097610761176127613761476157616761776187619762076217622762376247625762676277628762976307631763276337634763576367637763876397640764176427643764476457646764776487649765076517652765376547655765676577658765976607661766276637664766576667667766876697670767176727673767476757676767776787679768076817682768376847685768676877688768976907691769276937694769576967697769876997700770177027703770477057706770777087709771077117712771377147715771677177718771977207721772277237724772577267727772877297730773177327733773477357736773777387739774077417742774377447745774677477748774977507751775277537754775577567757775877597760776177627763776477657766776777687769777077717772777377747775777677777778777977807781778277837784778577867787778877897790779177927793779477957796779777987799780078017802780378047805780678077808780978107811781278137814781578167817781878197820782178227823782478257826782778287829783078317832783378347835783678377838783978407841784278437844784578467847784878497850785178527853785478557856785778587859786078617862786378647865786678677868786978707871787278737874787578767877787878797880788178827883788478857886788778887889789078917892789378947895789678977898789979007901790279037904790579067907790879097910791179127913791479157916791779187919792079217922792379247925792679277928792979307931793279337934793579367937793879397940794179427943794479457946794779487949795079517952795379547955795679577958795979607961796279637964796579667967796879697970797179727973797479757976797779787979798079817982798379847985798679877988798979907991799279937994799579967997799879998000800180028003800480058006800780088009801080118012801380148015801680178018801980208021802280238024802580268027802880298030803180328033803480358036803780388039804080418042804380448045804680478048804980508051805280538054805580568057805880598060806180628063806480658066806780688069807080718072807380748075807680778078807980808081808280838084808580868087808880898090809180928093809480958096809780988099810081018102810381048105810681078108810981108111811281138114811581168117811881198120812181228123812481258126812781288129813081318132813381348135813681378138813981408141814281438144814581468147814881498150815181528153815481558156815781588159816081618162816381648165816681678168816981708171817281738174817581768177817881798180818181828183818481858186818781888189819081918192819381948195819681978198819982008201820282038204820582068207820882098210821182128213821482158216821782188219822082218222822382248225822682278228822982308231823282338234823582368237823882398240824182428243824482458246824782488249825082518252825382548255825682578258825982608261826282638264826582668267826882698270827182728273827482758276827782788279828082818282828382848285828682878288828982908291829282938294829582968297829882998300830183028303830483058306830783088309831083118312831383148315831683178318831983208321832283238324832583268327832883298330833183328333833483358336833783388339834083418342834383448345834683478348834983508351835283538354835583568357835883598360836183628363836483658366836783688369837083718372837383748375837683778378837983808381838283838384838583868387838883898390839183928393839483958396839783988399840084018402840384048405840684078408840984108411841284138414841584168417841884198420842184228423842484258426842784288429843084318432843384348435843684378438843984408441844284438444844584468447844884498450845184528453845484558456845784588459846084618462846384648465846684678468846984708471847284738474847584768477847884798480848184828483848484858486848784888489849084918492849384948495849684978498849985008501850285038504850585068507850885098510851185128513851485158516851785188519852085218522852385248525852685278528852985308531853285338534853585368537853885398540854185428543854485458546854785488549855085518552855385548555855685578558855985608561856285638564856585668567856885698570857185728573857485758576857785788579858085818582858385848585858685878588858985908591859285938594859585968597859885998600860186028603860486058606860786088609861086118612861386148615861686178618861986208621862286238624862586268627862886298630863186328633863486358636863786388639864086418642864386448645864686478648864986508651865286538654865586568657865886598660866186628663866486658666866786688669867086718672867386748675867686778678867986808681868286838684868586868687868886898690869186928693869486958696869786988699870087018702870387048705870687078708870987108711871287138714871587168717871887198720872187228723872487258726872787288729873087318732873387348735873687378738873987408741874287438744874587468747874887498750875187528753875487558756875787588759876087618762876387648765876687678768876987708771877287738774877587768777877887798780878187828783878487858786878787888789879087918792879387948795879687978798879988008801880288038804880588068807880888098810881188128813881488158816881788188819882088218822882388248825882688278828882988308831883288338834883588368837883888398840884188428843884488458846884788488849885088518852885388548855885688578858885988608861886288638864886588668867886888698870887188728873887488758876887788788879888088818882888388848885888688878888888988908891889288938894889588968897889888998900890189028903890489058906890789088909891089118912891389148915891689178918891989208921892289238924892589268927892889298930893189328933893489358936893789388939894089418942894389448945894689478948894989508951895289538954895589568957895889598960896189628963896489658966896789688969897089718972897389748975897689778978897989808981898289838984898589868987898889898990899189928993899489958996899789988999900090019002900390049005900690079008900990109011901290139014901590169017901890199020902190229023902490259026902790289029903090319032903390349035903690379038903990409041904290439044904590469047904890499050905190529053905490559056905790589059906090619062906390649065906690679068906990709071907290739074907590769077907890799080908190829083908490859086908790889089909090919092909390949095909690979098909991009101910291039104910591069107910891099110911191129113911491159116911791189119912091219122912391249125912691279128912991309131913291339134913591369137913891399140914191429143914491459146914791489149915091519152915391549155915691579158915991609161916291639164916591669167916891699170917191729173917491759176917791789179918091819182918391849185918691879188918991909191919291939194919591969197919891999200920192029203920492059206920792089209921092119212921392149215921692179218921992209221922292239224922592269227922892299230923192329233923492359236923792389239924092419242924392449245924692479248924992509251925292539254925592569257925892599260926192629263926492659266926792689269927092719272927392749275927692779278927992809281928292839284928592869287928892899290929192929293929492959296929792989299930093019302930393049305930693079308930993109311931293139314931593169317931893199320932193229323932493259326932793289329933093319332933393349335933693379338933993409341934293439344934593469347934893499350935193529353935493559356935793589359936093619362936393649365936693679368936993709371937293739374937593769377937893799380938193829383938493859386938793889389939093919392939393949395939693979398939994009401940294039404940594069407940894099410941194129413941494159416941794189419942094219422942394249425942694279428942994309431943294339434943594369437943894399440944194429443944494459446944794489449945094519452945394549455945694579458945994609461946294639464946594669467946894699470947194729473947494759476947794789479948094819482948394849485948694879488948994909491949294939494949594969497949894999500950195029503950495059506950795089509951095119512951395149515951695179518951995209521952295239524952595269527952895299530953195329533953495359536953795389539954095419542954395449545954695479548954995509551955295539554955595569557955895599560956195629563956495659566956795689569957095719572957395749575957695779578957995809581958295839584958595869587958895899590959195929593959495959596959795989599960096019602960396049605960696079608960996109611961296139614961596169617961896199620962196229623962496259626962796289629963096319632963396349635963696379638963996409641964296439644964596469647964896499650965196529653965496559656965796589659966096619662966396649665966696679668966996709671967296739674967596769677967896799680968196829683968496859686968796889689969096919692969396949695969696979698969997009701970297039704970597069707970897099710971197129713971497159716971797189719972097219722972397249725972697279728972997309731973297339734973597369737973897399740974197429743974497459746974797489749975097519752975397549755975697579758975997609761976297639764976597669767976897699770977197729773977497759776977797789779978097819782978397849785978697879788978997909791979297939794979597969797979897999800980198029803980498059806980798089809981098119812981398149815981698179818981998209821982298239824982598269827982898299830983198329833983498359836983798389839984098419842984398449845984698479848984998509851985298539854985598569857985898599860986198629863986498659866986798689869987098719872987398749875987698779878987998809881988298839884988598869887988898899890989198929893989498959896989798989899990099019902990399049905990699079908990999109911991299139914991599169917991899199920992199229923992499259926992799289929993099319932993399349935993699379938993999409941994299439944994599469947994899499950995199529953995499559956995799589959996099619962996399649965996699679968996999709971997299739974997599769977997899799980998199829983998499859986998799889989999099919992999399949995999699979998999910000100011000210003100041000510006100071000810009100101001110012100131001410015100161001710018100191002010021100221002310024100251002610027100281002910030100311003210033100341003510036100371003810039100401004110042100431004410045100461004710048100491005010051100521005310054100551005610057100581005910060100611006210063100641006510066100671006810069100701007110072100731007410075100761007710078100791008010081100821008310084100851008610087100881008910090100911009210093100941009510096100971009810099101001010110102101031010410105101061010710108101091011010111101121011310114101151011610117101181011910120101211012210123101241012510126101271012810129101301013110132101331013410135101361013710138101391014010141101421014310144101451014610147101481014910150101511015210153101541015510156101571015810159101601016110162101631016410165101661016710168101691017010171101721017310174101751017610177101781017910180101811018210183101841018510186101871018810189101901019110192101931019410195101961019710198101991020010201102021020310204102051020610207102081020910210102111021210213102141021510216102171021810219102201022110222102231022410225102261022710228102291023010231102321023310234102351023610237102381023910240102411024210243102441024510246102471024810249102501025110252102531025410255102561025710258102591026010261102621026310264102651026610267102681026910270102711027210273102741027510276102771027810279102801028110282102831028410285102861028710288102891029010291102921029310294102951029610297102981029910300103011030210303103041030510306103071030810309103101031110312103131031410315103161031710318103191032010321103221032310324103251032610327103281032910330103311033210333103341033510336103371033810339103401034110342103431034410345103461034710348103491035010351103521035310354103551035610357103581035910360103611036210363103641036510366103671036810369103701037110372103731037410375103761037710378103791038010381103821038310384103851038610387103881038910390103911039210393103941039510396103971039810399104001040110402104031040410405104061040710408104091041010411104121041310414104151041610417104181041910420104211042210423104241042510426104271042810429104301043110432104331043410435104361043710438104391044010441104421044310444104451044610447104481044910450104511045210453104541045510456104571045810459104601046110462104631046410465104661046710468104691047010471104721047310474104751047610477104781047910480104811048210483104841048510486104871048810489104901049110492104931049410495104961049710498104991050010501105021050310504105051050610507105081050910510105111051210513105141051510516105171051810519105201052110522105231052410525105261052710528105291053010531105321053310534105351053610537105381053910540105411054210543105441054510546105471054810549105501055110552105531055410555105561055710558105591056010561105621056310564105651056610567105681056910570105711057210573105741057510576105771057810579105801058110582105831058410585105861058710588105891059010591105921059310594105951059610597105981059910600106011060210603106041060510606106071060810609106101061110612106131061410615106161061710618106191062010621106221062310624106251062610627106281062910630106311063210633106341063510636106371063810639106401064110642106431064410645106461064710648106491065010651106521065310654106551065610657106581065910660106611066210663106641066510666106671066810669106701067110672106731067410675106761067710678106791068010681106821068310684106851068610687106881068910690106911069210693106941069510696106971069810699107001070110702107031070410705107061070710708107091071010711107121071310714107151071610717107181071910720107211072210723107241072510726107271072810729107301073110732107331073410735107361073710738107391074010741107421074310744107451074610747107481074910750107511075210753107541075510756107571075810759107601076110762107631076410765107661076710768107691077010771107721077310774107751077610777107781077910780107811078210783107841078510786107871078810789107901079110792107931079410795107961079710798107991080010801108021080310804108051080610807108081080910810108111081210813108141081510816108171081810819108201082110822108231082410825108261082710828108291083010831108321083310834108351083610837108381083910840108411084210843108441084510846108471084810849108501085110852108531085410855108561085710858108591086010861108621086310864108651086610867108681086910870108711087210873108741087510876108771087810879108801088110882108831088410885108861088710888108891089010891108921089310894108951089610897108981089910900109011090210903109041090510906109071090810909109101091110912109131091410915109161091710918109191092010921109221092310924109251092610927109281092910930109311093210933109341093510936109371093810939109401094110942109431094410945109461094710948109491095010951109521095310954109551095610957109581095910960109611096210963109641096510966109671096810969109701097110972109731097410975109761097710978109791098010981109821098310984109851098610987109881098910990109911099210993109941099510996109971099810999110001100111002110031100411005110061100711008110091101011011110121101311014110151101611017110181101911020110211102211023110241102511026110271102811029110301103111032110331103411035110361103711038110391104011041110421104311044110451104611047110481104911050110511105211053110541105511056110571105811059110601106111062110631106411065110661106711068110691107011071110721107311074110751107611077110781107911080110811108211083110841108511086110871108811089110901109111092110931109411095110961109711098110991110011101111021110311104111051110611107111081110911110111111111211113111141111511116111171111811119111201112111122111231112411125111261112711128111291113011131111321113311134111351113611137111381113911140111411114211143111441114511146111471114811149111501115111152111531115411155111561115711158111591116011161111621116311164111651116611167111681116911170111711117211173111741117511176111771117811179111801118111182111831118411185111861118711188111891119011191111921119311194111951119611197111981119911200112011120211203112041120511206112071120811209112101121111212112131121411215112161121711218112191122011221112221122311224112251122611227112281122911230112311123211233112341123511236112371123811239112401124111242112431124411245112461124711248112491125011251112521125311254112551125611257112581125911260112611126211263112641126511266112671126811269112701127111272112731127411275112761127711278112791128011281112821128311284112851128611287112881128911290112911129211293112941129511296112971129811299113001130111302113031130411305113061130711308113091131011311113121131311314113151131611317113181131911320113211132211323113241132511326113271132811329113301133111332113331133411335113361133711338113391134011341113421134311344113451134611347113481134911350113511135211353113541135511356113571135811359113601136111362113631136411365113661136711368113691137011371113721137311374113751137611377113781137911380113811138211383113841138511386113871138811389113901139111392113931139411395113961139711398113991140011401114021140311404114051140611407114081140911410114111141211413114141141511416114171141811419114201142111422114231142411425114261142711428114291143011431114321143311434114351143611437114381143911440114411144211443114441144511446114471144811449114501145111452114531145411455114561145711458114591146011461114621146311464114651146611467114681146911470114711147211473114741147511476114771147811479114801148111482114831148411485114861148711488114891149011491114921149311494114951149611497114981149911500115011150211503115041150511506115071150811509115101151111512115131151411515115161151711518115191152011521115221152311524115251152611527115281152911530115311153211533115341153511536115371153811539115401154111542115431154411545115461154711548115491155011551115521155311554115551155611557115581155911560115611156211563115641156511566115671156811569115701157111572115731157411575115761157711578115791158011581115821158311584115851158611587115881158911590115911159211593115941159511596115971159811599116001160111602116031160411605116061160711608116091161011611116121161311614116151161611617116181161911620116211162211623116241162511626116271162811629116301163111632116331163411635116361163711638116391164011641116421164311644116451164611647116481164911650116511165211653116541165511656116571165811659116601166111662116631166411665116661166711668116691167011671116721167311674116751167611677116781167911680116811168211683116841168511686116871168811689116901169111692116931169411695116961169711698116991170011701117021170311704117051170611707117081170911710117111171211713117141171511716117171171811719117201172111722117231172411725117261172711728117291173011731117321173311734117351173611737117381173911740117411174211743117441174511746117471174811749117501175111752117531175411755117561175711758117591176011761117621176311764117651176611767117681176911770117711177211773117741177511776117771177811779117801178111782117831178411785117861178711788117891179011791117921179311794117951179611797117981179911800118011180211803118041180511806118071180811809118101181111812118131181411815118161181711818118191182011821118221182311824118251182611827118281182911830118311183211833118341183511836118371183811839118401184111842118431184411845118461184711848118491185011851118521185311854118551185611857118581185911860118611186211863118641186511866118671186811869118701187111872118731187411875118761187711878118791188011881118821188311884118851188611887118881188911890118911189211893118941189511896118971189811899119001190111902119031190411905119061190711908119091191011911119121191311914119151191611917119181191911920119211192211923119241192511926119271192811929119301193111932119331193411935119361193711938119391194011941119421194311944119451194611947119481194911950119511195211953119541195511956119571195811959119601196111962119631196411965119661196711968119691197011971119721197311974119751197611977119781197911980119811198211983119841198511986119871198811989119901199111992119931199411995119961199711998119991200012001120021200312004120051200612007120081200912010120111201212013120141201512016120171201812019120201202112022120231202412025120261202712028
  1. (function webpackUniversalModuleDefinition(root, factory) {
  2. if(typeof exports === 'object' && typeof module === 'object')
  3. module.exports = factory(require("react"), require("ca-ui-toolkit"), require("underscore"), require("react-dom"), require("jquery"), require("polyglot"), require("doT"), require("hammerjs"), require("jquery.hammer"), require("baglass/core-client/js/core-client/ui/properties/PropertyUIControl"));
  4. else if(typeof define === 'function' && define.amd)
  5. define(["react", "ca-ui-toolkit", "underscore", "react-dom", "jquery", "polyglot", "doT", "hammerjs", "jquery.hammer", "baglass/core-client/js/core-client/ui/properties/PropertyUIControl"], factory);
  6. else {
  7. var a = typeof exports === 'object' ? factory(require("react"), require("ca-ui-toolkit"), require("underscore"), require("react-dom"), require("jquery"), require("polyglot"), require("doT"), require("hammerjs"), require("jquery.hammer"), require("baglass/core-client/js/core-client/ui/properties/PropertyUIControl")) : factory(root["react"], root["ca-ui-toolkit"], root["underscore"], root["react-dom"], root["jquery"], root["polyglot"], root["doT"], root["hammerjs"], root["jquery.hammer"], root["baglass/core-client/js/core-client/ui/properties/PropertyUIControl"]);
  8. for(var i in a) (typeof exports === 'object' ? exports : root)[i] = a[i];
  9. }
  10. })(typeof self !== 'undefined' ? self : this, function(__WEBPACK_EXTERNAL_MODULE_0__, __WEBPACK_EXTERNAL_MODULE_3__, __WEBPACK_EXTERNAL_MODULE_5__, __WEBPACK_EXTERNAL_MODULE_6__, __WEBPACK_EXTERNAL_MODULE_9__, __WEBPACK_EXTERNAL_MODULE_16__, __WEBPACK_EXTERNAL_MODULE_43__, __WEBPACK_EXTERNAL_MODULE_48__, __WEBPACK_EXTERNAL_MODULE_49__, __WEBPACK_EXTERNAL_MODULE_50__) {
  11. return /******/ (function(modules) { // webpackBootstrap
  12. /******/ // The module cache
  13. /******/ var installedModules = {};
  14. /******/
  15. /******/ // The require function
  16. /******/ function __webpack_require__(moduleId) {
  17. /******/
  18. /******/ // Check if module is in cache
  19. /******/ if(installedModules[moduleId]) {
  20. /******/ return installedModules[moduleId].exports;
  21. /******/ }
  22. /******/ // Create a new module (and put it into the cache)
  23. /******/ var module = installedModules[moduleId] = {
  24. /******/ i: moduleId,
  25. /******/ l: false,
  26. /******/ exports: {}
  27. /******/ };
  28. /******/
  29. /******/ // Execute the module function
  30. /******/ modules[moduleId].call(module.exports, module, module.exports, __webpack_require__);
  31. /******/
  32. /******/ // Flag the module as loaded
  33. /******/ module.l = true;
  34. /******/
  35. /******/ // Return the exports of the module
  36. /******/ return module.exports;
  37. /******/ }
  38. /******/
  39. /******/
  40. /******/ // expose the modules object (__webpack_modules__)
  41. /******/ __webpack_require__.m = modules;
  42. /******/
  43. /******/ // expose the module cache
  44. /******/ __webpack_require__.c = installedModules;
  45. /******/
  46. /******/ // define getter function for harmony exports
  47. /******/ __webpack_require__.d = function(exports, name, getter) {
  48. /******/ if(!__webpack_require__.o(exports, name)) {
  49. /******/ Object.defineProperty(exports, name, {
  50. /******/ configurable: false,
  51. /******/ enumerable: true,
  52. /******/ get: getter
  53. /******/ });
  54. /******/ }
  55. /******/ };
  56. /******/
  57. /******/ // getDefaultExport function for compatibility with non-harmony modules
  58. /******/ __webpack_require__.n = function(module) {
  59. /******/ var getter = module && module.__esModule ?
  60. /******/ function getDefault() { return module['default']; } :
  61. /******/ function getModuleExports() { return module; };
  62. /******/ __webpack_require__.d(getter, 'a', getter);
  63. /******/ return getter;
  64. /******/ };
  65. /******/
  66. /******/ // Object.prototype.hasOwnProperty.call
  67. /******/ __webpack_require__.o = function(object, property) { return Object.prototype.hasOwnProperty.call(object, property); };
  68. /******/
  69. /******/ // __webpack_public_path__
  70. /******/ __webpack_require__.p = "/dist/bundles";
  71. /******/
  72. /******/ // Load entry module and return exports
  73. /******/ return __webpack_require__(__webpack_require__.s = 27);
  74. /******/ })
  75. /************************************************************************/
  76. /******/ ([
  77. /* 0 */
  78. /***/ (function(module, exports) {
  79. module.exports = __WEBPACK_EXTERNAL_MODULE_0__;
  80. /***/ }),
  81. /* 1 */
  82. /***/ (function(module, exports, __webpack_require__) {
  83. "use strict";
  84. exports.__esModule = true;
  85. var _AuthoringCommonResources = __webpack_require__(15);
  86. var _AuthoringCommonResources2 = _interopRequireDefault(_AuthoringCommonResources);
  87. function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
  88. function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } } /**
  89. * Licensed Materials - Property of IBM
  90. * IBM Cognos Products: BI
  91. * US Government Users Restricted Rights - Use, duplication or disclosure restricted by GSA ADP Schedule Contract with IBM Corp.
  92. */
  93. var Polyglot = __webpack_require__(16);
  94. var StringResources = function () {
  95. function StringResources() {
  96. _classCallCheck(this, StringResources);
  97. /**
  98. * Module which provides simple access to string resources.
  99. */
  100. this.polyglot = new Polyglot({
  101. phrases: _AuthoringCommonResources2.default
  102. });
  103. }
  104. /**
  105. * Get the string resource for the given key and interpolation options
  106. *
  107. * @param key The key of the string to return
  108. * @param interpolationOptions Optional interpolation options (see poly.t documentation for details)
  109. * @returns The string to display
  110. */
  111. StringResources.prototype.get = function get(key, interpolationOptions) {
  112. return this.polyglot.t(key, interpolationOptions);
  113. };
  114. return StringResources;
  115. }();
  116. exports.default = new StringResources();
  117. /***/ }),
  118. /* 2 */
  119. /***/ (function(module, exports, __webpack_require__) {
  120. /* WEBPACK VAR INJECTION */(function(process) {/**
  121. * Copyright (c) 2013-present, Facebook, Inc.
  122. *
  123. * This source code is licensed under the MIT license found in the
  124. * LICENSE file in the root directory of this source tree.
  125. */
  126. if (process.env.NODE_ENV !== 'production') {
  127. var REACT_ELEMENT_TYPE = (typeof Symbol === 'function' &&
  128. Symbol.for &&
  129. Symbol.for('react.element')) ||
  130. 0xeac7;
  131. var isValidElement = function(object) {
  132. return typeof object === 'object' &&
  133. object !== null &&
  134. object.$$typeof === REACT_ELEMENT_TYPE;
  135. };
  136. // By explicitly using `prop-types` you are opting into new development behavior.
  137. // http://fb.me/prop-types-in-prod
  138. var throwOnDirectAccess = true;
  139. module.exports = __webpack_require__(29)(isValidElement, throwOnDirectAccess);
  140. } else {
  141. // By explicitly using `prop-types` you are opting into new production behavior.
  142. // http://fb.me/prop-types-in-prod
  143. module.exports = __webpack_require__(32)();
  144. }
  145. /* WEBPACK VAR INJECTION */}.call(exports, __webpack_require__(8)))
  146. /***/ }),
  147. /* 3 */
  148. /***/ (function(module, exports) {
  149. module.exports = __WEBPACK_EXTERNAL_MODULE_3__;
  150. /***/ }),
  151. /* 4 */
  152. /***/ (function(module, exports, __webpack_require__) {
  153. // style-loader: Adds some css to the DOM by adding a <style> tag
  154. // load the styles
  155. var content = __webpack_require__(35);
  156. if(typeof content === 'string') content = [[module.i, content, '']];
  157. // Prepare cssTransformation
  158. var transform;
  159. var options = {"hmr":true}
  160. options.transform = transform
  161. // add the styles to the DOM
  162. var update = __webpack_require__(37)(content, options);
  163. if(content.locals) module.exports = content.locals;
  164. // Hot Module Replacement
  165. if(false) {
  166. // When the styles change, update the <style> tags
  167. if(!content.locals) {
  168. module.hot.accept("!!../../node_modules/css-loader/index.js??ref--1-1!../../node_modules/postcss-loader/index.js??ref--1-2!../../node_modules/resolve-url-loader/index.js!../../node_modules/sass-loader/lib/loader.js??ref--1-4!./all.scss", function() {
  169. var newContent = require("!!../../node_modules/css-loader/index.js??ref--1-1!../../node_modules/postcss-loader/index.js??ref--1-2!../../node_modules/resolve-url-loader/index.js!../../node_modules/sass-loader/lib/loader.js??ref--1-4!./all.scss");
  170. if(typeof newContent === 'string') newContent = [[module.id, newContent, '']];
  171. update(newContent);
  172. });
  173. }
  174. // When the module is disposed, remove the <style> tags
  175. module.hot.dispose(function() { update(); });
  176. }
  177. /***/ }),
  178. /* 5 */
  179. /***/ (function(module, exports) {
  180. module.exports = __WEBPACK_EXTERNAL_MODULE_5__;
  181. /***/ }),
  182. /* 6 */
  183. /***/ (function(module, exports) {
  184. module.exports = __WEBPACK_EXTERNAL_MODULE_6__;
  185. /***/ }),
  186. /* 7 */
  187. /***/ (function(module, exports) {
  188. !function(t){function n(e){if(o[e])return o[e].exports;var r=o[e]={i:e,l:!1,exports:{}};return t[e].call(r.exports,r,r.exports,n),r.l=!0,r.exports}var e=window.webpackJsonPBaGraphics;window.webpackJsonPBaGraphics=function(o,i,u){for(var c,s,a,f=0,d=[];f<o.length;f++)s=o[f],r[s]&&d.push(r[s][0]),r[s]=0;for(c in i)Object.prototype.hasOwnProperty.call(i,c)&&(t[c]=i[c]);for(e&&e(o,i,u);d.length;)d.shift()();if(u)for(f=0;f<u.length;f++)a=n(n.s=u[f]);return a};var o={},r={2052:0};n.m=t,n.c=o,n.d=function(t,e,o){n.o(t,e)||Object.defineProperty(t,e,{configurable:!1,enumerable:!0,get:o})},n.n=function(t){var e=t&&t.__esModule?function(){return t.default}:function(){return t};return n.d(e,"a",e),e},n.o=function(t,n){return Object.prototype.hasOwnProperty.call(t,n)},n.p="",n.oe=function(t){throw console.error(t),t}}({"698d75b157f24ae829cc":function(t,n){var e;e=function(){return this}();try{e=e||Function("return this")()||(0,eval)("this")}catch(t){"object"==typeof window&&(e=window)}t.exports=e},"9689a9c94ae38b47fa2c":function(t,n,e){(function(n){!function(n,e){t.exports=e()}(0,function(){"use strict";function t(t,n){return n={exports:{}},t(n,n.exports),n.exports}var e=function(t){var n=t.id,e=t.viewBox,o=t.content;this.id=n,this.viewBox=e,this.content=o};e.prototype.stringify=function(){return this.content},e.prototype.toString=function(){return this.stringify()},e.prototype.destroy=function(){var t=this;["id","viewBox","content"].forEach(function(n){return delete t[n]})};var o=function(t){var n=!!document.importNode,e=(new DOMParser).parseFromString(t,"image/svg+xml").documentElement;return n?document.importNode(e,!0):e},r=("undefined"!=typeof window?window:void 0!==n||"undefined"!=typeof self&&self,t(function(t,n){!function(n,e){t.exports=e()}(0,function(){function t(t){return t&&"object"==typeof t&&"[object RegExp]"!==Object.prototype.toString.call(t)&&"[object Date]"!==Object.prototype.toString.call(t)}function n(t){return Array.isArray(t)?[]:{}}function e(e,o){return o&&!0===o.clone&&t(e)?i(n(e),e,o):e}function o(n,o,r){var u=n.slice();return o.forEach(function(o,c){void 0===u[c]?u[c]=e(o,r):t(o)?u[c]=i(n[c],o,r):-1===n.indexOf(o)&&u.push(e(o,r))}),u}function r(n,o,r){var u={};return t(n)&&Object.keys(n).forEach(function(t){u[t]=e(n[t],r)}),Object.keys(o).forEach(function(c){t(o[c])&&n[c]?u[c]=i(n[c],o[c],r):u[c]=e(o[c],r)}),u}function i(t,n,i){var u=Array.isArray(n),c=i||{arrayMerge:o},s=c.arrayMerge||o;return u?Array.isArray(t)?s(t,n,i):e(n,i):r(t,n,i)}return i.all=function(t,n){if(!Array.isArray(t)||t.length<2)throw new Error("first argument should be an array with at least two elements");return t.reduce(function(t,e){return i(t,e,n)})},i})})),i=t(function(t,n){var e={svg:{name:"xmlns",uri:"http://www.w3.org/2000/svg"},xlink:{name:"xmlns:xlink",uri:"http://www.w3.org/1999/xlink"}};n.default=e,t.exports=n.default}),u=function(t){return Object.keys(t).map(function(n){return n+'="'+t[n].toString().replace(/"/g,"&quot;")+'"'}).join(" ")},c=i.svg,s=i.xlink,a={};a[c.name]=c.uri,a[s.name]=s.uri;var f=function(t,n){void 0===t&&(t="");var e=r(a,n||{});return"<svg "+u(e)+">"+t+"</svg>"};return function(t){function n(){t.apply(this,arguments)}t&&(n.__proto__=t),n.prototype=Object.create(t&&t.prototype),n.prototype.constructor=n;var e={isMounted:{}};return e.isMounted.get=function(){return!!this.node},n.createFromExistingNode=function(t){return new n({id:t.getAttribute("id"),viewBox:t.getAttribute("viewBox"),content:t.outerHTML})},n.prototype.destroy=function(){this.isMounted&&this.unmount(),t.prototype.destroy.call(this)},n.prototype.mount=function(t){if(this.isMounted)return this.node;var n="string"==typeof t?document.querySelector(t):t,e=this.render();return this.node=e,n.appendChild(e),e},n.prototype.render=function(){var t=this.stringify();return o(f(t)).childNodes[0]},n.prototype.unmount=function(){this.node.parentNode.removeChild(this.node)},Object.defineProperties(n.prototype,e),n}(e)})}).call(n,e("698d75b157f24ae829cc"))},"9ce58a7deea14f49ef01":function(t,n,e){(function(n){!function(n,e){t.exports=e()}(0,function(){"use strict";function t(t,n){return n={exports:{}},t(n,n.exports),n.exports}function e(t){return t=t||Object.create(null),{on:function(n,e){(t[n]||(t[n]=[])).push(e)},off:function(n,e){t[n]&&t[n].splice(t[n].indexOf(e)>>>0,1)},emit:function(n,e){(t[n]||[]).map(function(t){t(e)}),(t["*"]||[]).map(function(t){t(n,e)})}}}function o(t,n){return _(t).reduce(function(t,e){if(!e.attributes)return t;var o=_(e.attributes),r=n?o.filter(n):o;return t.concat(r)},[])}function r(t){return t.replace(B,function(t){return"%"+t[0].charCodeAt(0).toString(16).toUpperCase()})}function i(t,n,e){return _(t).forEach(function(t){var o=t.getAttribute(k);if(o&&0===o.indexOf(n)){var r=o.replace(n,e);t.setAttributeNS(T,k,r)}}),t}var u=("undefined"!=typeof window?window:void 0!==n||"undefined"!=typeof self&&self,t(function(t,n){!function(n,e){t.exports=e()}(0,function(){function t(t){return t&&"object"==typeof t&&"[object RegExp]"!==Object.prototype.toString.call(t)&&"[object Date]"!==Object.prototype.toString.call(t)}function n(t){return Array.isArray(t)?[]:{}}function e(e,o){return o&&!0===o.clone&&t(e)?i(n(e),e,o):e}function o(n,o,r){var u=n.slice();return o.forEach(function(o,c){void 0===u[c]?u[c]=e(o,r):t(o)?u[c]=i(n[c],o,r):-1===n.indexOf(o)&&u.push(e(o,r))}),u}function r(n,o,r){var u={};return t(n)&&Object.keys(n).forEach(function(t){u[t]=e(n[t],r)}),Object.keys(o).forEach(function(c){t(o[c])&&n[c]?u[c]=i(n[c],o[c],r):u[c]=e(o[c],r)}),u}function i(t,n,i){var u=Array.isArray(n),c=i||{arrayMerge:o},s=c.arrayMerge||o;return u?Array.isArray(t)?s(t,n,i):e(n,i):r(t,n,i)}return i.all=function(t,n){if(!Array.isArray(t)||t.length<2)throw new Error("first argument should be an array with at least two elements");return t.reduce(function(t,e){return i(t,e,n)})},i})})),c=t(function(t,n){var e={svg:{name:"xmlns",uri:"http://www.w3.org/2000/svg"},xlink:{name:"xmlns:xlink",uri:"http://www.w3.org/1999/xlink"}};n.default=e,t.exports=n.default}),s=function(t){return Object.keys(t).map(function(n){return n+'="'+t[n].toString().replace(/"/g,"&quot;")+'"'}).join(" ")},a=c.svg,f=c.xlink,d={};d[a.name]=a.uri,d[f.name]=f.uri;var l,p=function(t,n){void 0===t&&(t="");var e=u(d,n||{});return"<svg "+s(e)+">"+t+"</svg>"},h=c.svg,y=c.xlink,m={attrs:(l={style:["position: absolute","width: 0","height: 0"].join("; ")},l[h.name]=h.uri,l[y.name]=y.uri,l)},v=function(t){this.config=u(m,t||{}),this.symbols=[]};v.prototype.add=function(t){var n=this,e=n.symbols,o=this.find(t.id);return o?(e[e.indexOf(o)]=t,!1):(e.push(t),!0)},v.prototype.remove=function(t){var n=this,e=n.symbols,o=this.find(t);return!!o&&(e.splice(e.indexOf(o),1),o.destroy(),!0)},v.prototype.find=function(t){return this.symbols.filter(function(n){return n.id===t})[0]||null},v.prototype.has=function(t){return null!==this.find(t)},v.prototype.stringify=function(){var t=this.config,n=t.attrs,e=this.symbols.map(function(t){return t.stringify()}).join("");return p(e,n)},v.prototype.toString=function(){return this.stringify()},v.prototype.destroy=function(){this.symbols.forEach(function(t){return t.destroy()})};var g=function(t){var n=t.id,e=t.viewBox,o=t.content;this.id=n,this.viewBox=e,this.content=o};g.prototype.stringify=function(){return this.content},g.prototype.toString=function(){return this.stringify()},g.prototype.destroy=function(){var t=this;["id","viewBox","content"].forEach(function(n){return delete t[n]})};var w,b=function(t){var n=!!document.importNode,e=(new DOMParser).parseFromString(t,"image/svg+xml").documentElement;return n?document.importNode(e,!0):e},x=function(t){function n(){t.apply(this,arguments)}t&&(n.__proto__=t),n.prototype=Object.create(t&&t.prototype),n.prototype.constructor=n;var e={isMounted:{}};return e.isMounted.get=function(){return!!this.node},n.createFromExistingNode=function(t){return new n({id:t.getAttribute("id"),viewBox:t.getAttribute("viewBox"),content:t.outerHTML})},n.prototype.destroy=function(){this.isMounted&&this.unmount(),t.prototype.destroy.call(this)},n.prototype.mount=function(t){if(this.isMounted)return this.node;var n="string"==typeof t?document.querySelector(t):t,e=this.render();return this.node=e,n.appendChild(e),e},n.prototype.render=function(){var t=this.stringify();return b(p(t)).childNodes[0]},n.prototype.unmount=function(){this.node.parentNode.removeChild(this.node)},Object.defineProperties(n.prototype,e),n}(g),E={autoConfigure:!0,mountTo:"body",syncUrlsWithBaseTag:!1,listenLocationChangeEvent:!0,locationChangeEvent:"locationChange",locationChangeAngularEmitter:!1,usagesToUpdate:"use[*|href]",moveGradientsOutsideSymbol:!1},_=function(t){return Array.prototype.slice.call(t,0)},O=navigator.userAgent,S={isChrome:/chrome/i.test(O),isFirefox:/firefox/i.test(O),isIE:/msie/i.test(O)||/trident/i.test(O),isEdge:/edge/i.test(O)},M=function(t,n){var e=document.createEvent("CustomEvent");e.initCustomEvent(t,!1,!1,n),window.dispatchEvent(e)},A=function(t){var n=[];return _(t.querySelectorAll("style")).forEach(function(t){t.textContent+="",n.push(t)}),n},C=function(t){return(t||window.location.href).split("#")[0]},j=function(t){angular.module("ng").run(["$rootScope",function(n){n.$on("$locationChangeSuccess",function(n,e,o){M(t,{oldUrl:o,newUrl:e})})}])},N=function(t,n){return void 0===n&&(n="linearGradient, radialGradient, pattern"),_(t.querySelectorAll("symbol")).forEach(function(t){_(t.querySelectorAll(n)).forEach(function(n){t.parentNode.insertBefore(n,t)})}),t},T=c.xlink.uri,k="xlink:href",B=/[{}|\\\^\[\]`"<>]/g,U=["clipPath","colorProfile","src","cursor","fill","filter","marker","markerStart","markerMid","markerEnd","mask","stroke","style"],L=U.map(function(t){return"["+t+"]"}).join(","),P=function(t,n,e,u){var c=r(e),s=r(u);o(t.querySelectorAll(L),function(t){var n=t.localName,e=t.value;return-1!==U.indexOf(n)&&-1!==e.indexOf("url("+c)}).forEach(function(t){return t.value=t.value.replace(c,s)}),i(n,c,s)},G={MOUNT:"mount",SYMBOL_MOUNT:"symbol_mount"},q=function(t){function n(n){var o=this;void 0===n&&(n={}),t.call(this,u(E,n));var r=e();this._emitter=r,this.node=null;var i=this,c=i.config;if(c.autoConfigure&&this._autoConfigure(n),c.syncUrlsWithBaseTag){var s=document.getElementsByTagName("base")[0].getAttribute("href");r.on(G.MOUNT,function(){return o.updateUrls("#",s)})}var a=this._handleLocationChange.bind(this);this._handleLocationChange=a,c.listenLocationChangeEvent&&window.addEventListener(c.locationChangeEvent,a),c.locationChangeAngularEmitter&&j(c.locationChangeEvent),r.on(G.MOUNT,function(t){c.moveGradientsOutsideSymbol&&N(t)}),r.on(G.SYMBOL_MOUNT,function(t){c.moveGradientsOutsideSymbol&&N(t.parentNode),(S.isIE||S.isEdge)&&A(t)})}t&&(n.__proto__=t),n.prototype=Object.create(t&&t.prototype),n.prototype.constructor=n;var o={isMounted:{}};return o.isMounted.get=function(){return!!this.node},n.prototype._autoConfigure=function(t){var n=this,e=n.config;void 0===t.syncUrlsWithBaseTag&&(e.syncUrlsWithBaseTag=void 0!==document.getElementsByTagName("base")[0]),void 0===t.locationChangeAngularEmitter&&(e.locationChangeAngularEmitter="angular"in window),void 0===t.moveGradientsOutsideSymbol&&(e.moveGradientsOutsideSymbol=S.isFirefox)},n.prototype._handleLocationChange=function(t){var n=t.detail,e=n.oldUrl,o=n.newUrl;this.updateUrls(e,o)},n.prototype.add=function(n){var e=this,o=t.prototype.add.call(this,n);return this.isMounted&&o&&(n.mount(e.node),this._emitter.emit(G.SYMBOL_MOUNT,n.node)),o},n.prototype.attach=function(t){var n=this,e=this;if(e.isMounted)return e.node;var o="string"==typeof t?document.querySelector(t):t;return e.node=o,this.symbols.forEach(function(t){t.mount(e.node),n._emitter.emit(G.SYMBOL_MOUNT,t.node)}),_(o.querySelectorAll("symbol")).forEach(function(t){var n=x.createFromExistingNode(t);n.node=t,e.add(n)}),this._emitter.emit(G.MOUNT,o),o},n.prototype.destroy=function(){var t=this,n=t.config,e=t.symbols,o=t._emitter;e.forEach(function(t){return t.destroy()}),o.off("*"),window.removeEventListener(n.locationChangeEvent,this._handleLocationChange),this.isMounted&&this.unmount()},n.prototype.mount=function(t,n){void 0===t&&(t=this.config.mountTo),void 0===n&&(n=!1);var e=this;if(e.isMounted)return e.node;var o="string"==typeof t?document.querySelector(t):t,r=e.render();return this.node=r,n&&o.childNodes[0]?o.insertBefore(r,o.childNodes[0]):o.appendChild(r),this._emitter.emit(G.MOUNT,r),r},n.prototype.render=function(){return b(this.stringify())},n.prototype.unmount=function(){this.node.parentNode.removeChild(this.node)},n.prototype.updateUrls=function(t,n){if(!this.isMounted)return!1;var e=document.querySelectorAll(this.config.usagesToUpdate);return P(this.node,e,C(t)+"#",C(n)+"#"),!0},Object.defineProperties(n.prototype,o),n}(v),D=t(function(t){/*!
  189. * domready (c) Dustin Diaz 2014 - License MIT
  190. */
  191. !function(n,e){t.exports=function(){var t,n=[],e=document,o=e.documentElement.doScroll,r=(o?/^loaded|^c/:/^loaded|^i|^c/).test(e.readyState);return r||e.addEventListener("DOMContentLoaded",t=function(){for(e.removeEventListener("DOMContentLoaded",t),r=1;t=n.shift();)t()}),function(t){r?setTimeout(t,0):n.push(t)}}()}()}),F=!!window.__SVG_SPRITE__;F?w=window.__SVG_SPRITE__:(w=new q({attrs:{id:"__SVG_SPRITE_NODE__"}}),window.__SVG_SPRITE__=w);var I=function(){var t=document.getElementById("__SVG_SPRITE_NODE__");t?w.attach(t):w.mount(document.body,!0)};return document.body?I():D(I),w})}).call(n,e("698d75b157f24ae829cc"))}});
  192. /***/ }),
  193. /* 8 */
  194. /***/ (function(module, exports) {
  195. // shim for using process in browser
  196. var process = module.exports = {};
  197. // cached from whatever global is present so that test runners that stub it
  198. // don't break things. But we need to wrap it in a try catch in case it is
  199. // wrapped in strict mode code which doesn't define any globals. It's inside a
  200. // function because try/catches deoptimize in certain engines.
  201. var cachedSetTimeout;
  202. var cachedClearTimeout;
  203. function defaultSetTimout() {
  204. throw new Error('setTimeout has not been defined');
  205. }
  206. function defaultClearTimeout () {
  207. throw new Error('clearTimeout has not been defined');
  208. }
  209. (function () {
  210. try {
  211. if (typeof setTimeout === 'function') {
  212. cachedSetTimeout = setTimeout;
  213. } else {
  214. cachedSetTimeout = defaultSetTimout;
  215. }
  216. } catch (e) {
  217. cachedSetTimeout = defaultSetTimout;
  218. }
  219. try {
  220. if (typeof clearTimeout === 'function') {
  221. cachedClearTimeout = clearTimeout;
  222. } else {
  223. cachedClearTimeout = defaultClearTimeout;
  224. }
  225. } catch (e) {
  226. cachedClearTimeout = defaultClearTimeout;
  227. }
  228. } ())
  229. function runTimeout(fun) {
  230. if (cachedSetTimeout === setTimeout) {
  231. //normal enviroments in sane situations
  232. return setTimeout(fun, 0);
  233. }
  234. // if setTimeout wasn't available but was latter defined
  235. if ((cachedSetTimeout === defaultSetTimout || !cachedSetTimeout) && setTimeout) {
  236. cachedSetTimeout = setTimeout;
  237. return setTimeout(fun, 0);
  238. }
  239. try {
  240. // when when somebody has screwed with setTimeout but no I.E. maddness
  241. return cachedSetTimeout(fun, 0);
  242. } catch(e){
  243. try {
  244. // When we are in I.E. but the script has been evaled so I.E. doesn't trust the global object when called normally
  245. return cachedSetTimeout.call(null, fun, 0);
  246. } catch(e){
  247. // same as above but when it's a version of I.E. that must have the global object for 'this', hopfully our context correct otherwise it will throw a global error
  248. return cachedSetTimeout.call(this, fun, 0);
  249. }
  250. }
  251. }
  252. function runClearTimeout(marker) {
  253. if (cachedClearTimeout === clearTimeout) {
  254. //normal enviroments in sane situations
  255. return clearTimeout(marker);
  256. }
  257. // if clearTimeout wasn't available but was latter defined
  258. if ((cachedClearTimeout === defaultClearTimeout || !cachedClearTimeout) && clearTimeout) {
  259. cachedClearTimeout = clearTimeout;
  260. return clearTimeout(marker);
  261. }
  262. try {
  263. // when when somebody has screwed with setTimeout but no I.E. maddness
  264. return cachedClearTimeout(marker);
  265. } catch (e){
  266. try {
  267. // When we are in I.E. but the script has been evaled so I.E. doesn't trust the global object when called normally
  268. return cachedClearTimeout.call(null, marker);
  269. } catch (e){
  270. // same as above but when it's a version of I.E. that must have the global object for 'this', hopfully our context correct otherwise it will throw a global error.
  271. // Some versions of I.E. have different rules for clearTimeout vs setTimeout
  272. return cachedClearTimeout.call(this, marker);
  273. }
  274. }
  275. }
  276. var queue = [];
  277. var draining = false;
  278. var currentQueue;
  279. var queueIndex = -1;
  280. function cleanUpNextTick() {
  281. if (!draining || !currentQueue) {
  282. return;
  283. }
  284. draining = false;
  285. if (currentQueue.length) {
  286. queue = currentQueue.concat(queue);
  287. } else {
  288. queueIndex = -1;
  289. }
  290. if (queue.length) {
  291. drainQueue();
  292. }
  293. }
  294. function drainQueue() {
  295. if (draining) {
  296. return;
  297. }
  298. var timeout = runTimeout(cleanUpNextTick);
  299. draining = true;
  300. var len = queue.length;
  301. while(len) {
  302. currentQueue = queue;
  303. queue = [];
  304. while (++queueIndex < len) {
  305. if (currentQueue) {
  306. currentQueue[queueIndex].run();
  307. }
  308. }
  309. queueIndex = -1;
  310. len = queue.length;
  311. }
  312. currentQueue = null;
  313. draining = false;
  314. runClearTimeout(timeout);
  315. }
  316. process.nextTick = function (fun) {
  317. var args = new Array(arguments.length - 1);
  318. if (arguments.length > 1) {
  319. for (var i = 1; i < arguments.length; i++) {
  320. args[i - 1] = arguments[i];
  321. }
  322. }
  323. queue.push(new Item(fun, args));
  324. if (queue.length === 1 && !draining) {
  325. runTimeout(drainQueue);
  326. }
  327. };
  328. // v8 likes predictible objects
  329. function Item(fun, array) {
  330. this.fun = fun;
  331. this.array = array;
  332. }
  333. Item.prototype.run = function () {
  334. this.fun.apply(null, this.array);
  335. };
  336. process.title = 'browser';
  337. process.browser = true;
  338. process.env = {};
  339. process.argv = [];
  340. process.version = ''; // empty string to avoid regexp issues
  341. process.versions = {};
  342. function noop() {}
  343. process.on = noop;
  344. process.addListener = noop;
  345. process.once = noop;
  346. process.off = noop;
  347. process.removeListener = noop;
  348. process.removeAllListeners = noop;
  349. process.emit = noop;
  350. process.prependListener = noop;
  351. process.prependOnceListener = noop;
  352. process.listeners = function (name) { return [] }
  353. process.binding = function (name) {
  354. throw new Error('process.binding is not supported');
  355. };
  356. process.cwd = function () { return '/' };
  357. process.chdir = function (dir) {
  358. throw new Error('process.chdir is not supported');
  359. };
  360. process.umask = function() { return 0; };
  361. /***/ }),
  362. /* 9 */
  363. /***/ (function(module, exports) {
  364. module.exports = __WEBPACK_EXTERNAL_MODULE_9__;
  365. /***/ }),
  366. /* 10 */
  367. /***/ (function(module, exports, __webpack_require__) {
  368. "use strict";
  369. var __WEBPACK_AMD_DEFINE_ARRAY__, __WEBPACK_AMD_DEFINE_RESULT__;
  370. /**
  371. * Licensed Materials - Property of IBM
  372. * IBM Cognos Products: BI Cloud (C) Copyright IBM Corp. 2013, 2016
  373. * US Government Users Restricted Rights - Use, duplication or disclosure restricted by GSA ADP Schedule Contract with IBM Corp.
  374. */
  375. !(__WEBPACK_AMD_DEFINE_ARRAY__ = [__webpack_require__(5)], __WEBPACK_AMD_DEFINE_RESULT__ = (function (_) {
  376. 'use strict';
  377. /**
  378. * The Class implements the root of class hierarchy implementing the mechanism for
  379. * creating new derived classes and calling inherited methods.
  380. */
  381. // @class
  382. // @abstract
  383. var Class = function Class() {};
  384. function createConstructor() {
  385. return function () {
  386. if (typeof this.init === 'function') {
  387. this.init.apply(this, arguments);
  388. }
  389. };
  390. }
  391. // Create new widget class derived from the Class
  392. // @static
  393. // @param mixins [optional] An array of the mixin classes.
  394. // @param def The definition of the derived class, methods, member variables. The
  395. // special method 'init' is called at construction of the class instance.
  396. //
  397. Class.extend = function (mixins, def) {
  398. if (arguments.length === 1) {
  399. def = mixins;
  400. mixins = null;
  401. }
  402. var baseProto = this.prototype,
  403. parentProto = baseProto,
  404. proto = Object.create(parentProto);
  405. // create the constructor
  406. var ctor = createConstructor();
  407. // add the mixins
  408. if (mixins) {
  409. for (var i = 0, len = mixins.length; i < len; ++i) {
  410. proto = _.extend(proto, mixins[i].prototype);
  411. }
  412. parentProto = proto;
  413. proto = Object.create(proto);
  414. if (typeof def.init !== 'function') {
  415. // generate default init method for multi-class inheritance
  416. def.init = function () {
  417. ctor.inherited('init', this, arguments);
  418. };
  419. }
  420. }
  421. _.extend(proto, def);
  422. ctor.prototype = proto;
  423. // static method to allow for further extension
  424. ctor.extend = this.extend;
  425. // calling the inherited methods
  426. ctor.inherited = function (name, that, args) {
  427. if (name === 'init') {
  428. // the 'init' method has a special case of calling inherited implementation
  429. // it should call all the 'init' methods from the base class and mixins
  430. if (typeof baseProto[name] === 'function') {
  431. baseProto[name].apply(that, args);
  432. }
  433. _.each(mixins, function (m) {
  434. if (typeof m.prototype[name] === 'function') {
  435. m.prototype[name].apply(that, args);
  436. }
  437. });
  438. } else if (typeof parentProto[name] === 'function') {
  439. return parentProto[name].apply(that, args);
  440. }
  441. };
  442. return ctor;
  443. };
  444. return Class;
  445. }).apply(exports, __WEBPACK_AMD_DEFINE_ARRAY__),
  446. __WEBPACK_AMD_DEFINE_RESULT__ !== undefined && (module.exports = __WEBPACK_AMD_DEFINE_RESULT__));
  447. //# sourceMappingURL=Class.js.map
  448. /***/ }),
  449. /* 11 */
  450. /***/ (function(module, exports) {
  451. var g;
  452. // This works in non-strict mode
  453. g = (function() {
  454. return this;
  455. })();
  456. try {
  457. // This works if eval is allowed (see CSP)
  458. g = g || Function("return this")() || (1,eval)("this");
  459. } catch(e) {
  460. // This works if the window reference is available
  461. if(typeof window === "object")
  462. g = window;
  463. }
  464. // g can still be undefined, but nothing to do about it...
  465. // We return undefined, instead of nothing here, so it's
  466. // easier to handle this case. if(!global) { ...}
  467. module.exports = g;
  468. /***/ }),
  469. /* 12 */
  470. /***/ (function(module, exports, __webpack_require__) {
  471. "use strict";
  472. /**
  473. * Copyright (c) 2013-present, Facebook, Inc.
  474. *
  475. * This source code is licensed under the MIT license found in the
  476. * LICENSE file in the root directory of this source tree.
  477. *
  478. *
  479. */
  480. function makeEmptyFunction(arg) {
  481. return function () {
  482. return arg;
  483. };
  484. }
  485. /**
  486. * This function accepts and discards inputs; it has no side effects. This is
  487. * primarily useful idiomatically for overridable function endpoints which
  488. * always need to be callable, since JS lacks a null-call idiom ala Cocoa.
  489. */
  490. var emptyFunction = function emptyFunction() {};
  491. emptyFunction.thatReturns = makeEmptyFunction;
  492. emptyFunction.thatReturnsFalse = makeEmptyFunction(false);
  493. emptyFunction.thatReturnsTrue = makeEmptyFunction(true);
  494. emptyFunction.thatReturnsNull = makeEmptyFunction(null);
  495. emptyFunction.thatReturnsThis = function () {
  496. return this;
  497. };
  498. emptyFunction.thatReturnsArgument = function (arg) {
  499. return arg;
  500. };
  501. module.exports = emptyFunction;
  502. /***/ }),
  503. /* 13 */
  504. /***/ (function(module, exports, __webpack_require__) {
  505. "use strict";
  506. /* WEBPACK VAR INJECTION */(function(process) {/**
  507. * Copyright (c) 2013-present, Facebook, Inc.
  508. *
  509. * This source code is licensed under the MIT license found in the
  510. * LICENSE file in the root directory of this source tree.
  511. *
  512. */
  513. /**
  514. * Use invariant() to assert state which your program assumes to be true.
  515. *
  516. * Provide sprintf-style format (only %s is supported) and arguments
  517. * to provide information about what broke and what you were
  518. * expecting.
  519. *
  520. * The invariant message will be stripped in production, but the invariant
  521. * will remain to ensure logic does not differ in production.
  522. */
  523. var validateFormat = function validateFormat(format) {};
  524. if (process.env.NODE_ENV !== 'production') {
  525. validateFormat = function validateFormat(format) {
  526. if (format === undefined) {
  527. throw new Error('invariant requires an error message argument');
  528. }
  529. };
  530. }
  531. function invariant(condition, format, a, b, c, d, e, f) {
  532. validateFormat(format);
  533. if (!condition) {
  534. var error;
  535. if (format === undefined) {
  536. error = new Error('Minified exception occurred; use the non-minified dev environment ' + 'for the full error message and additional helpful warnings.');
  537. } else {
  538. var args = [a, b, c, d, e, f];
  539. var argIndex = 0;
  540. error = new Error(format.replace(/%s/g, function () {
  541. return args[argIndex++];
  542. }));
  543. error.name = 'Invariant Violation';
  544. }
  545. error.framesToPop = 1; // we don't care about invariant's own frame
  546. throw error;
  547. }
  548. }
  549. module.exports = invariant;
  550. /* WEBPACK VAR INJECTION */}.call(exports, __webpack_require__(8)))
  551. /***/ }),
  552. /* 14 */
  553. /***/ (function(module, exports, __webpack_require__) {
  554. "use strict";
  555. /**
  556. * Copyright (c) 2013-present, Facebook, Inc.
  557. *
  558. * This source code is licensed under the MIT license found in the
  559. * LICENSE file in the root directory of this source tree.
  560. */
  561. var ReactPropTypesSecret = 'SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED';
  562. module.exports = ReactPropTypesSecret;
  563. /***/ }),
  564. /* 15 */
  565. /***/ (function(module, exports) {
  566. var amdi18n={"__root":{"errorCreatingPalette":"An error occurred while saving the palette.","paletteErrorTitle":"Palette Error","changePaletteLabel":"Change color palette","myPaletteLabel":"Custom","systemPaletteLabel":"System","publicPaletteLabel":"Global","localPaletteLabel":"Local","mruPaletteLabel":"Recently used","okDialog":"OK","deleteDialogTitle":"Delete","applyDialog":"Apply","cancelDialog":"Cancel","saveDialog":"Save","deleteMessage":"Are you sure you want to delete the palette \"%{name}\"?","deleteToast":"\"%{name}\" was deleted","favoritesLabel":"Favorites","setAsFavorite":"Set as favorite","createdToastMessage":"\"%{name}\" was successfully created.","createPalette":"Create a custom palette","colorPicker":"Color picker","errorNoName":"Enter a name for your palette","errorInsufficientColors":"Choose at least two colors","paletteAppliedToastMessage":"Palette \"%{name}\", was applied to the report.","createContinuousPalette":"Create continuous color palette","createStandardPalette":"Create categorical color palette","paletteNamePlaceholder":"Type palette name here","paletteName":"Palette name","standardPalette":"Categorical palette","continuousPalette":"Continuous palette","removeSwatch":"Remove swatch","addSwatch":"Add swatch","reversePalette":"Reverse palette","colorGuide":"Color guide","modeAutomatic":"Automatic","modeCustom":"Custom","colorModel":"Color model","modelRGB":"RGB","modelHSB":"HSB","modelCMYK":"CMYK","grid":"Grid","wheel":"Wheel","hexCode":"Hex code","colorRed":"Red","colorGreen":"Green","colorBlue":"Blue","colorHue":"Hue","colorSaturation":"Saturation","colorBrightness":"Brightness","colorCyan":"Cyan","colorMagenta":"Magenta","colorYellow":"Yellow","colorBlack":"Black","codeRed":"R","codeGreen":"G","codeBlue":"B","codeHue":"H","codeSaturation":"S","codeBrightness":"B","codeCyan":"C","codeMagenta":"M","codeYellow":"Y","codeBlack":"K","close":"Close","editSchematic":"Edit package","searchSchematic":"Search","nameLabelSchematic":"Name","captionLabelSchematic":"Caption","keyLabelSchematic":"Key","addSchematic":"Upload File","schematicsInvalidSvg":"Invalid or unsupported SVG","schematicsInvalidSvgData":"Could not obtain file data","schematicsInvalidType":"Unsupported file type: %{type}","schematicsInvalidSize":"File %{file}, size %{size} exceeds limit.","schematicsContextMenuReplace":"Replace","schematicsContextMenuDelete":"Delete","schematicsEmptySearchResults":"Search results are empty","schematicsNoSelection":"No items selected","schematicsMultipleSelection":"%{count} items selected","schematicsSingleDeletionSuccessed":"Your schematic was successfully deleted.","schematicsMultipleDeletionSuccessed":"%{count} schematics were successfully deleted.","schematicsSingleAddSuccessed":"Your schematic was successfully added.","schematicsMultipleAddSuccessed":"%{count} schematics were successfully added.","schematicsAddFailed":"Failed adding your schematic.","schematicsReplaceDlgTitle":"Confirm replacement of existing file","schematicsReplaceDlgContent":"The file '%{sourceName}' already exists. Do you want to replace it with the new file?","schematicsReplaceDlgApplyToAllFiles":"Apply to all files","schematicsPackageTab":"Package","schematicsContentTab":"Content","schematicsDescriptionLabel":"Description","schematicsIconLabel":"Icon","schematicsChooseFile":"Choose a file","schematicsDeleteIcon":"Remove the icon","schematicsIconAdded":"The icon \"%{file}\" has been successfully added.","schematicsIconRemove":"The icon has been successully removed.","schematicsIconDropFiles":"Drop files here","schematicsIconOr":"or","schematicsIconFileTypes":"Only .jpg, .png, and .svg files.","schematicsIconFileSize":"%{size}MB max file size."},"__cy":{"errorCreatingPalette":"An error occurred while saving the palette.~DB1","paletteErrorTitle":"Palette Error~DB2","changePaletteLabel":"Change color palette~DB3","myPaletteLabel":"Custom~DB4","systemPaletteLabel":"System~DB5","publicPaletteLabel":"Global~DB6","localPaletteLabel":"Local~DB7","mruPaletteLabel":"Recently used~DB8","okDialog":"OK~DB9","deleteDialogTitle":"Delete~DB10","applyDialog":"Apply~DB11","cancelDialog":"Cancel~DB12","saveDialog":"Save~DB13","deleteMessage":"Are you sure you want to delete the palette \"[%{name}]\"?~DB14","deleteToast":"\"[%{name}]\" was deleted~DB15","favoritesLabel":"Favorites~DB16","setAsFavorite":"Set as favorite~DB17","createdToastMessage":"\"[%{name}]\" was successfully created.~DB18","createPalette":"Create a custom palette~DB19","colorPicker":"Color picker~DB20","errorNoName":"Enter a name for your palette~DB21","errorInsufficientColors":"Choose at least two colors~DB22","paletteAppliedToastMessage":"Palette \"[%{name}]\", was applied to the report.~DB23","createContinuousPalette":"Create continuous color palette~DB24","createStandardPalette":"Create categorical color palette~DB25","paletteNamePlaceholder":"Type palette name here~DB26","paletteName":"Palette name~DB27","standardPalette":"Categorical palette~DB28","continuousPalette":"Continuous palette~DB29","removeSwatch":"Remove swatch~DB30","addSwatch":"Add swatch~DB31","reversePalette":"Reverse palette~DB32","colorGuide":"Color guide~DB33","modeAutomatic":"Automatic~DB34","modeCustom":"Custom~DB35","colorModel":"Color model~DB36","modelRGB":"RGB~DB37","modelHSB":"HSB~DB38","modelCMYK":"CMYK~DB39","grid":"Grid~DB40","wheel":"Wheel~DB41","hexCode":"Hex code~DB42","colorRed":"Red~DB43","colorGreen":"Green~DB44","colorBlue":"Blue~DB45","colorHue":"Hue~DB46","colorSaturation":"Saturation~DB47","colorBrightness":"Brightness~DB48","colorCyan":"Cyan~DB49","colorMagenta":"Magenta~DB50","colorYellow":"Yellow~DB51","colorBlack":"Black~DB52","codeRed":"R~DB53","codeGreen":"G~DB54","codeBlue":"B~DB55","codeHue":"H~DB56","codeSaturation":"S~DB57","codeBrightness":"B~DB58","codeCyan":"C~DB59","codeMagenta":"M~DB60","codeYellow":"Y~DB61","codeBlack":"K~DB62","close":"Close~DB63","editSchematic":"Edit package~DB64","searchSchematic":"Search~DB65","nameLabelSchematic":"Name~DB66","captionLabelSchematic":"Caption~DB67","keyLabelSchematic":"Key~DB68","addSchematic":"Upload File~DB69","schematicsInvalidSvg":"Invalid or unsupported SVG~DB70","schematicsInvalidSvgData":"Could not obtain file data~DB71","schematicsInvalidType":"Unsupported file type: [%{type}]~DB72","schematicsInvalidSize":"File [%{file}], size [%{size}] exceeds limit.~DB73","schematicsContextMenuReplace":"Replace~DB74","schematicsContextMenuDelete":"Delete~DB75","schematicsEmptySearchResults":"Search results are empty~DB76","schematicsNoSelection":"No items selected~DB77","schematicsMultipleSelection":"[%{count}] items selected~DB78","schematicsSingleDeletionSuccessed":"Your schematic was successfully deleted.~DB79","schematicsMultipleDeletionSuccessed":"[%{count}] schematics were successfully deleted.~DB80","schematicsSingleAddSuccessed":"Your schematic was successfully added.~DB81","schematicsMultipleAddSuccessed":"[%{count}] schematics were successfully added.~DB82","schematicsAddFailed":"Failed adding your schematic.~DB83","schematicsReplaceDlgTitle":"Confirm replacement of existing file~DB84","schematicsReplaceDlgContent":"The file '[%{sourceName}]' already exists. Do you want to replace it with the new file?~DB85","schematicsReplaceDlgApplyToAllFiles":"Apply to all files~DB86","schematicsPackageTab":"Package~DB87","schematicsContentTab":"Content~DB88","schematicsDescriptionLabel":"Description~DB89","schematicsIconLabel":"Icon~DB90","schematicsChooseFile":"Choose a file~DB91","schematicsDeleteIcon":"Remove the icon~DB92","schematicsIconAdded":"The icon \"[%{file}]\" has been successfully added.~DB93","schematicsIconRemove":"The icon has been successully removed.~DB94","schematicsIconDropFiles":"Drop files here~DB95","schematicsIconOr":"or~DB96","schematicsIconFileTypes":"Only .jpg, .png, and .svg files.~DB97","schematicsIconFileSize":"[%{size}]MB max file size.~DB98"},"__gl":{"errorCreatingPalette":"«头'ทั้ดูΣ_An error occurred while saving the palette._Э İı|尾»","paletteErrorTitle":"«头'ทั้ดูΣ_Palette Error_Э İı|尾»","changePaletteLabel":"«头'ทั้ดูΣ_Change color palette_Э İı|尾»","myPaletteLabel":"«头'ทั้ดูΣ_Custom_Э İı|尾»","systemPaletteLabel":"«头'ทั้ดูΣ_System_Э İı|尾»","publicPaletteLabel":"«头'ทั้ดูΣ_Global_Э İı|尾»","localPaletteLabel":"«头'ทั้ดูΣ_Local_Э İı|尾»","mruPaletteLabel":"«头'ทั้ดูΣ_Recently used_Э İı|尾»","okDialog":"«头'ทั้ดูΣ_OK_Э İı|尾»","deleteDialogTitle":"«头'ทั้ดูΣ_Delete_Э İı|尾»","applyDialog":"«头'ทั้ดูΣ_Apply_Э İı|尾»","cancelDialog":"«头'ทั้ดูΣ_Cancel_Э İı|尾»","saveDialog":"«头'ทั้ดูΣ_Save_Э İı|尾»","deleteMessage":"«头'ทั้ดูΣ_Are you sure you want to delete the palette \"[%{name}]\"?_Э İı|尾»","deleteToast":"«头'ทั้ดูΣ_\"[%{name}]\" was deleted_Э İı|尾»","favoritesLabel":"«头'ทั้ดูΣ_Favorites_Э İı|尾»","setAsFavorite":"«头'ทั้ดูΣ_Set as favorite_Э İı|尾»","createdToastMessage":"«头'ทั้ดูΣ_\"[%{name}]\" was successfully created._Э İı|尾»","createPalette":"«头'ทั้ดูΣ_Create a custom palette_Э İı|尾»","colorPicker":"«头'ทั้ดูΣ_Color picker_Э İı|尾»","errorNoName":"«头'ทั้ดูΣ_Enter a name for your palette_Э İı|尾»","errorInsufficientColors":"«头'ทั้ดูΣ_Choose at least two colors_Э İı|尾»","paletteAppliedToastMessage":"«头'ทั้ดูΣ_Palette \"[%{name}]\", was applied to the report._Э İı|尾»","createContinuousPalette":"«头'ทั้ดูΣ_Create continuous color palette_Э İı|尾»","createStandardPalette":"«头'ทั้ดูΣ_Create categorical color palette_Э İı|尾»","paletteNamePlaceholder":"«头'ทั้ดูΣ_Type palette name here_Э İı|尾»","paletteName":"«头'ทั้ดูΣ_Palette name_Э İı|尾»","standardPalette":"«头'ทั้ดูΣ_Categorical palette_Э İı|尾»","continuousPalette":"«头'ทั้ดูΣ_Continuous palette_Э İı|尾»","removeSwatch":"«头'ทั้ดูΣ_Remove swatch_Э İı|尾»","addSwatch":"«头'ทั้ดูΣ_Add swatch_Э İı|尾»","reversePalette":"«头'ทั้ดูΣ_Reverse palette_Э İı|尾»","colorGuide":"«头'ทั้ดูΣ_Color guide_Э İı|尾»","modeAutomatic":"«头'ทั้ดูΣ_Automatic_Э İı|尾»","modeCustom":"«头'ทั้ดูΣ_Custom_Э İı|尾»","colorModel":"«头'ทั้ดูΣ_Color model_Э İı|尾»","modelRGB":"«头'ทั้ดูΣ_RGB_Э İı|尾»","modelHSB":"«头'ทั้ดูΣ_HSB_Э İı|尾»","modelCMYK":"«头'ทั้ดูΣ_CMYK_Э İı|尾»","grid":"«头'ทั้ดูΣ_Grid_Э İı|尾»","wheel":"«头'ทั้ดูΣ_Wheel_Э İı|尾»","hexCode":"«头'ทั้ดูΣ_Hex code_Э İı|尾»","colorRed":"«头'ทั้ดูΣ_Red_Э İı|尾»","colorGreen":"«头'ทั้ดูΣ_Green_Э İı|尾»","colorBlue":"«头'ทั้ดูΣ_Blue_Э İı|尾»","colorHue":"«头'ทั้ดูΣ_Hue_Э İı|尾»","colorSaturation":"«头'ทั้ดูΣ_Saturation_Э İı|尾»","colorBrightness":"«头'ทั้ดูΣ_Brightness_Э İı|尾»","colorCyan":"«头'ทั้ดูΣ_Cyan_Э İı|尾»","colorMagenta":"«头'ทั้ดูΣ_Magenta_Э İı|尾»","colorYellow":"«头'ทั้ดูΣ_Yellow_Э İı|尾»","colorBlack":"«头'ทั้ดูΣ_Black_Э İı|尾»","codeRed":"«头'ทั้ดูΣ_R_Э İı|尾»","codeGreen":"«头'ทั้ดูΣ_G_Э İı|尾»","codeBlue":"«头'ทั้ดูΣ_B_Э İı|尾»","codeHue":"«头'ทั้ดูΣ_H_Э İı|尾»","codeSaturation":"«头'ทั้ดูΣ_S_Э İı|尾»","codeBrightness":"«头'ทั้ดูΣ_B_Э İı|尾»","codeCyan":"«头'ทั้ดูΣ_C_Э İı|尾»","codeMagenta":"«头'ทั้ดูΣ_M_Э İı|尾»","codeYellow":"«头'ทั้ดูΣ_Y_Э İı|尾»","codeBlack":"«头'ทั้ดูΣ_K_Э İı|尾»","close":"«头'ทั้ดูΣ_Close_Э İı|尾»","editSchematic":"«头'ทั้ดูΣ_Edit package_Э İı|尾»","searchSchematic":"«头'ทั้ดูΣ_Search_Э İı|尾»","nameLabelSchematic":"«头'ทั้ดูΣ_Name_Э İı|尾»","captionLabelSchematic":"«头'ทั้ดูΣ_Caption_Э İı|尾»","keyLabelSchematic":"«头'ทั้ดูΣ_Key_Э İı|尾»","addSchematic":"«头'ทั้ดูΣ_Upload File_Э İı|尾»","schematicsInvalidSvg":"«头'ทั้ดูΣ_Invalid or unsupported SVG_Э İı|尾»","schematicsInvalidSvgData":"«头'ทั้ดูΣ_Could not obtain file data_Э İı|尾»","schematicsInvalidType":"«头'ทั้ดูΣ_Unsupported file type: [%{type}]_Э İı|尾»","schematicsInvalidSize":"«头'ทั้ดูΣ_File [%{file}], size [%{size}] exceeds limit._Э İı|尾»","schematicsContextMenuReplace":"«头'ทั้ดูΣ_Replace_Э İı|尾»","schematicsContextMenuDelete":"«头'ทั้ดูΣ_Delete_Э İı|尾»","schematicsEmptySearchResults":"«头'ทั้ดูΣ_Search results are empty_Э İı|尾»","schematicsNoSelection":"«头'ทั้ดูΣ_No items selected_Э İı|尾»","schematicsMultipleSelection":"«头'ทั้ดูΣ_[%{count}] items selected_Э İı|尾»","schematicsSingleDeletionSuccessed":"«头'ทั้ดูΣ_Your schematic was successfully deleted._Э İı|尾»","schematicsMultipleDeletionSuccessed":"«头'ทั้ดูΣ_[%{count}] schematics were successfully deleted._Э İı|尾»","schematicsSingleAddSuccessed":"«头'ทั้ดูΣ_Your schematic was successfully added._Э İı|尾»","schematicsMultipleAddSuccessed":"«头'ทั้ดูΣ_[%{count}] schematics were successfully added._Э İı|尾»","schematicsAddFailed":"«头'ทั้ดูΣ_Failed adding your schematic._Э İı|尾»","schematicsReplaceDlgTitle":"«头'ทั้ดูΣ_Confirm replacement of existing file_Э İı|尾»","schematicsReplaceDlgContent":"«头'ทั้ดูΣ_The file '[%{sourceName}]' already exists. Do you want to replace it with the new file?_Э İı|尾»","schematicsReplaceDlgApplyToAllFiles":"«头'ทั้ดูΣ_Apply to all files_Э İı|尾»","schematicsPackageTab":"«头'ทั้ดูΣ_Package_Э İı|尾»","schematicsContentTab":"«头'ทั้ดูΣ_Content_Э İı|尾»","schematicsDescriptionLabel":"«头'ทั้ดูΣ_Description_Э İı|尾»","schematicsIconLabel":"«头'ทั้ดูΣ_Icon_Э İı|尾»","schematicsChooseFile":"«头'ทั้ดูΣ_Choose a file_Э İı|尾»","schematicsDeleteIcon":"«头'ทั้ดูΣ_Remove the icon_Э İı|尾»","schematicsIconAdded":"«头'ทั้ดูΣ_The icon \"[%{file}]\" has been successfully added._Э İı|尾»","schematicsIconRemove":"«头'ทั้ดูΣ_The icon has been successully removed._Э İı|尾»","schematicsIconDropFiles":"«头'ทั้ดูΣ_Drop files here_Э İı|尾»","schematicsIconOr":"«头'ทั้ดูΣ_or_Э İı|尾»","schematicsIconFileTypes":"«头'ทั้ดูΣ_Only .jpg, .png, and .svg files._Э İı|尾»","schematicsIconFileSize":"«头'ทั้ดูΣ_[%{size}]MB max file size._Э İı|尾»"},"__cs":{"errorCreatingPalette":"Došlo k chybě při ukládání palety.","paletteErrorTitle":"Chyba palety","changePaletteLabel":"Změnit paletu barev","myPaletteLabel":"Vlastní","systemPaletteLabel":"Systém","publicPaletteLabel":"Globální","localPaletteLabel":"Lokální","mruPaletteLabel":"Nedávno použité","okDialog":"OK","deleteDialogTitle":"Odstranit","applyDialog":"Použít","cancelDialog":"Storno","saveDialog":"Uložit","deleteMessage":"Opravdu chcete odstranit paletu \"%{name}\"?","deleteToast":"Odstraněno: \"%{name}\"","favoritesLabel":"Oblíbené položky","setAsFavorite":"Nastavit jako oblíbené","createdToastMessage":"Úspěšně vytvořeno: \"%{name}\"","createPalette":"Vytvořit vlastní paletu","colorPicker":"Výběr barvy","errorNoName":"Zadejte název palety.","errorInsufficientColors":"Vyberte alespoň dvě barvy.","paletteAppliedToastMessage":"Na sestavu byla použit a paleta \"%{name}\".","createContinuousPalette":"Vytvořit spojitou paletu barev","createStandardPalette":"Vytvořit kategorickou paletu barev","paletteNamePlaceholder":"Zde zadejte název palety.","paletteName":"Název palety","standardPalette":"Kategorická paleta","continuousPalette":"Spojitá paleta","removeSwatch":"Odebrat paletu","addSwatch":"Přidat paletu","reversePalette":"Obrátit paletu","colorGuide":"Průvodce barvami","modeAutomatic":"Automaticky","modeCustom":"Vlastní","colorModel":"Barevný model","modelRGB":"RGB","modelHSB":"HSB","modelCMYK":"CMYK","grid":"Mřížka","wheel":"Kolo","hexCode":"Hexadecimální kód","colorRed":"Červená","colorGreen":"Zelená","colorBlue":"Modrá","colorHue":"Odstín","colorSaturation":"Sytost","colorBrightness":"Jas","colorCyan":"Azurová","colorMagenta":"Purpurová","colorYellow":"Žlutá","colorBlack":"Černá","codeRed":"R","codeGreen":"G","codeBlue":"B","codeHue":"H","codeSaturation":"S","codeBrightness":"B","codeCyan":"C","codeMagenta":"M","codeYellow":"Y","codeBlack":"K","close":"Zavřít","editSchematic":"Upravit balík","searchSchematic":"Hledat","nameLabelSchematic":"Název","captionLabelSchematic":"Titulek","keyLabelSchematic":"Klíč","addSchematic":"Odeslat soubor","schematicsInvalidSvg":"Neplatný nebo nepodporovaný formát SVG","schematicsInvalidSvgData":"Nelze získat data souboru","schematicsInvalidType":"Nepodporovaný typ souboru: %{type}","schematicsInvalidSize":"Soubor %{file} s velikostí %{size} překračuje limit.","schematicsContextMenuReplace":"Nahradit","schematicsContextMenuDelete":"Odstranit","schematicsEmptySearchResults":"Výsledky hledání jsou prázdné.","schematicsNoSelection":"Nejsou vybrány žádné prvky.","schematicsMultipleSelection":"Počet vybraných položek: %{count}","schematicsSingleDeletionSuccessed":"Vaše schéma bylo úspěšně odstraněno.","schematicsMultipleDeletionSuccessed":"Počet úspěšně odstraněných schémat: %{count}.","schematicsSingleAddSuccessed":"Vaše schéma bylo úspěšně přidáno.","schematicsMultipleAddSuccessed":"Počet úspěšně přidaných schémat: %{count}.","schematicsAddFailed":"Neúspěšné přidání nového schématu","schematicsReplaceDlgTitle":"Potvrdit nahrazení existujícího souboru","schematicsReplaceDlgContent":"Soubor '%{sourceName}' již existuje. Chcete ho nahradit tímto novým souborem?","schematicsReplaceDlgApplyToAllFiles":"Použít na všechny soubory","schematicsPackageTab":"Balík","schematicsContentTab":"Obsah","schematicsDescriptionLabel":"Popis","schematicsIconLabel":"Ikona","schematicsChooseFile":"Zvolit soubor","schematicsDeleteIcon":"Odebrat ikonu","schematicsIconAdded":"Ikona \"%{file}\" byla úspěšně přidána.","schematicsIconRemove":"Ikona byla úspěšně odebrána.","schematicsIconDropFiles":"Soubory přetáhněte sem","schematicsIconOr":"nebo","schematicsIconFileTypes":"Pouze soubory .jpg, .png a .svg.","schematicsIconFileSize":"Maximální velikost souboru %{size} MB."},"__da":{"errorCreatingPalette":"Der er opstået en fejl i forbindelse med at gemme paletten.","paletteErrorTitle":"Paletfejl","changePaletteLabel":"Skift farvepalet","myPaletteLabel":"Tilpasset","systemPaletteLabel":"System","publicPaletteLabel":"Global","localPaletteLabel":"Lokal","mruPaletteLabel":"Anvendt for nylig","okDialog":"OK","deleteDialogTitle":"Slet","applyDialog":"Anvend","cancelDialog":"Annullér","saveDialog":"Gem","deleteMessage":"Er du sikker på, at du vil slette paletten \"%{name}\"?","deleteToast":"\"%{name}\" blev slettet","favoritesLabel":"Favoritter","setAsFavorite":"Angiv som favorit","createdToastMessage":"\"%{name}\" blev oprettet.","createPalette":"Opret en tilpasset palet","colorPicker":"Farvevælger","errorNoName":"Angiv et navn på din palet","errorInsufficientColors":"Vælg mindst to farver","paletteAppliedToastMessage":"Palet \"%{name}\" er anvendt til rapporten.","createContinuousPalette":"Opret en fortløbende farvepalet","createStandardPalette":"Opret en kategorisk farvepalet","paletteNamePlaceholder":"Angiv paletnavn her","paletteName":"Paletnavn","standardPalette":"Kategorisk palet","continuousPalette":"Fortløbende palet","removeSwatch":"Fjern prøve","addSwatch":"Tilføj prøve","reversePalette":"Omvendt palet","colorGuide":"Farvevejledning","modeAutomatic":"Automatisk","modeCustom":"Tilpasset","colorModel":"Farvemodel","modelRGB":"RGB","modelHSB":"HSB","modelCMYK":"CMYK","grid":"Gitter","wheel":"Hjul","hexCode":"Hex-kode","colorRed":"Rød","colorGreen":"Grøn","colorBlue":"Blå","colorHue":"Hue","colorSaturation":"Mætning","colorBrightness":"Lysstyrke","colorCyan":"Turkis","colorMagenta":"Magenta","colorYellow":"Gul","colorBlack":"Sort","codeRed":"A","codeGreen":"G","codeBlue":"B","codeHue":"H","codeSaturation":"S","codeBrightness":"B","codeCyan":"C","codeMagenta":"M","codeYellow":"Y","codeBlack":"K","close":"Luk","editSchematic":"Redigér pakke","searchSchematic":"Søg","nameLabelSchematic":"Navn","captionLabelSchematic":"Overskrift","keyLabelSchematic":"Nøgle","addSchematic":"Upload fil","schematicsInvalidSvg":"Ugyldig eller ikke-understøttet SVG","schematicsInvalidSvgData":"Kan ikke hente fildata","schematicsInvalidType":"Ikke-understøttet filtype: %{type}","schematicsInvalidSize":"Filen %{file}, størrelse %{size} overskrider grænsen.","schematicsContextMenuReplace":"Erstat","schematicsContextMenuDelete":"Slet","schematicsEmptySearchResults":"Søgeresultater er tom","schematicsNoSelection":"Ingen elementer valgt","schematicsMultipleSelection":"%{count} elementer valgt","schematicsSingleDeletionSuccessed":"Skemaet er slettet.","schematicsMultipleDeletionSuccessed":"%{count} skemaer blev slettet.","schematicsSingleAddSuccessed":"dit skema er tilføjet.","schematicsMultipleAddSuccessed":"%{count} skemaer blev tilføjet.","schematicsAddFailed":"Fejl under tilføjelse af dit skema","schematicsReplaceDlgTitle":"Bekræft erstatning af eksisterende file","schematicsReplaceDlgContent":"Filen '%{sourceName}' findes allerede. Vil du overskrive den med den nye fil?","schematicsReplaceDlgApplyToAllFiles":"Anvend på alle filer","schematicsPackageTab":"Pakke","schematicsContentTab":"Indhold","schematicsDescriptionLabel":"Beskrivelse","schematicsIconLabel":"Ikon","schematicsChooseFile":"Vælg en fil","schematicsDeleteIcon":"Fjern ikonen","schematicsIconAdded":"Ikonen \"%{file}\" er tilføjet.","schematicsIconRemove":"Ikonen er fjernet.","schematicsIconDropFiles":"Placér filer her","schematicsIconOr":"eller","schematicsIconFileTypes":"Kun filer af typen .jpg, .png og .svg.","schematicsIconFileSize":"%{size}MB maks. filstørrelse."},"__de":{"errorCreatingPalette":"Beim Speichern der Palette ist ein Fehler aufgetreten.","paletteErrorTitle":"Palette - Fehler","changePaletteLabel":"Farbpalette ändern","myPaletteLabel":"Benutzerdefiniert","systemPaletteLabel":"System","publicPaletteLabel":"Global","localPaletteLabel":"Lokal","mruPaletteLabel":"Zuletzt verwendet","okDialog":"OK","deleteDialogTitle":"Löschen","applyDialog":"Anwenden","cancelDialog":"Abbrechen","saveDialog":"Speichern","deleteMessage":"Soll die Palette \"%{name}\" tatsächlich gelöscht werden?","deleteToast":"\"%{name}\" wurde gelöscht","favoritesLabel":"Favoriten","setAsFavorite":"Als Favorit festlegen","createdToastMessage":"\"%{name}\" wurde erfolgreich erstellt.","createPalette":"Benutzerdefinierte Palette erstellen","colorPicker":"Farbauswahl","errorNoName":"Namen für die Palette eingeben","errorInsufficientColors":"Mindestens zwei Farben auswählen","paletteAppliedToastMessage":"Die Palette \"%{name}\" wurde auf den Bericht angewendet.","createContinuousPalette":"Palette mit fortlaufenden Farben erstellen","createStandardPalette":"Palette mit kategorialen Farben erstellen","paletteNamePlaceholder":"Palettennamen hier eingeben","paletteName":"Palettenname","standardPalette":"Kategoriale Palette","continuousPalette":"Fortlaufende Palette","removeSwatch":"Muster entfernen","addSwatch":"Muster hinzufügen","reversePalette":"Umgekehrte Palette","colorGuide":"Richtlinien für Farben","modeAutomatic":"Automatisch","modeCustom":"Benutzerdefiniert","colorModel":"Farbmodell","modelRGB":"RGB","modelHSB":"HSB","modelCMYK":"CMYK","grid":"Raster","wheel":"Rad","hexCode":"Hexadezimalcode","colorRed":"Rot","colorGreen":"Grün","colorBlue":"Blau","colorHue":"Farbton","colorSaturation":"Sättigung","colorBrightness":"Helligkeit","colorCyan":"Zyan","colorMagenta":"Magenta","colorYellow":"Gelb","colorBlack":"Schwarz","codeRed":"R","codeGreen":"G","codeBlue":"B","codeHue":"H","codeSaturation":"S","codeBrightness":"B","codeCyan":"C","codeMagenta":"Mio","codeYellow":"Y","codeBlack":"K","close":"Schließen","editSchematic":"Package bearbeiten","searchSchematic":"Suchen","nameLabelSchematic":"Name","captionLabelSchematic":"Titelzeile","keyLabelSchematic":"Schlüssel","addSchematic":"Datei hochladen","schematicsInvalidSvg":"Ungültige oder nicht unterstützte SVG","schematicsInvalidSvgData":"Abrufen der Dateidaten nicht möglich","schematicsInvalidType":"Nicht unterstützter Dateityp: %{type}","schematicsInvalidSize":"Die Größe %{size} der Datei %{file} überschreitet den Grenzwert.","schematicsContextMenuReplace":"Ersetzen","schematicsContextMenuDelete":"Löschen","schematicsEmptySearchResults":"Suchergebnisse sind leer","schematicsNoSelection":"Keine Elemente ausgewählt","schematicsMultipleSelection":"%{count} Elemente ausgewählt","schematicsSingleDeletionSuccessed":"Das Schema wurde erfolgreich gelöscht.","schematicsMultipleDeletionSuccessed":"%{count} Schemas wurden erfolgreich gelöscht.","schematicsSingleAddSuccessed":"Das Schema wurde erfolgreich hinzugefügt.","schematicsMultipleAddSuccessed":"%{count} Schemas wurden erfolgreich hinzugefügt.","schematicsAddFailed":"Hinzufügen des Schemas fehlgeschlagen.","schematicsReplaceDlgTitle":"Ersetzen vorhandener Datei bestätigen","schematicsReplaceDlgContent":"Die Datei '%{sourceName}' ist bereits vorhanden. Soll sie durch die neue Datei ersetzt werden?","schematicsReplaceDlgApplyToAllFiles":"Für alle Dateien anwenden","schematicsPackageTab":"Package","schematicsContentTab":"Inhalt","schematicsDescriptionLabel":"Beschreibung","schematicsIconLabel":"Symbol","schematicsChooseFile":"Datei auswählen","schematicsDeleteIcon":"Symbol entfernen","schematicsIconAdded":"Das Symbol \"%{file}\" wurde erfolgreich hinzugefügt.","schematicsIconRemove":"Das Symbol wurde erfolgreich entfernt.","schematicsIconDropFiles":"Dateien hier ablegen","schematicsIconOr":"oder","schematicsIconFileTypes":"Nur .jpg-, .png- und .svg-Dateien. ","schematicsIconFileSize":"Maximale Dateigröße %{size} MB. "},"__es":{"errorCreatingPalette":"Se ha producido un error al guardar la paleta.","paletteErrorTitle":"Error de paleta","changePaletteLabel":"Cambiar paleta de colores","myPaletteLabel":"Personalizado","systemPaletteLabel":"Sistema","publicPaletteLabel":"Global","localPaletteLabel":"Local","mruPaletteLabel":"Utilizados recientemente","okDialog":"Aceptar","deleteDialogTitle":"Suprimir","applyDialog":"Aplicar","cancelDialog":"Cancelar","saveDialog":"Guardar","deleteMessage":"¿Está seguro de que desea suprimir la paleta \"%{name}\"?","deleteToast":"Se ha suprimido \"%{name}\"","favoritesLabel":"Favoritos","setAsFavorite":"Establecer como favorito","createdToastMessage":"Se ha creado correctamente \"%{name}\".","createPalette":"Crear una paleta personalizada","colorPicker":"Selector de color","errorNoName":"Escriba un nombre para la paleta.","errorInsufficientColors":"Seleccione al menos dos colores","paletteAppliedToastMessage":"Se ha aplicado la paleta \"%{name}\" al informe.","createContinuousPalette":"Crear paleta de colores continua","createStandardPalette":"Crear paleta de colores de categorías","paletteNamePlaceholder":"Escriba aquí un nombre de paleta","paletteName":"Nombre de paleta","standardPalette":"Paleta de categorías","continuousPalette":"Paleta continua","removeSwatch":"Eliminar reloj","addSwatch":"Añadir reloj","reversePalette":"Invertir paleta","colorGuide":"Guía de colores","modeAutomatic":"Automático","modeCustom":"Personalizado","colorModel":"Modelo de color","modelRGB":"RGB","modelHSB":"HSB","modelCMYK":"CMYK","grid":"Cuadrícula","wheel":"Rueda","hexCode":"Código hexadecimal","colorRed":"Rojo","colorGreen":"Verde","colorBlue":"Azul","colorHue":"Tono","colorSaturation":"Saturación","colorBrightness":"Luminosidad","colorCyan":"Cian","colorMagenta":"Magenta","colorYellow":"Amarillo","colorBlack":"Negro","codeRed":"S","codeGreen":"G","codeBlue":"B","codeHue":"H","codeSaturation":"D","codeBrightness":"B","codeCyan":"C","codeMagenta":"M","codeYellow":"Y","codeBlack":"K","close":"Cerrar","editSchematic":"Editar paquete","searchSchematic":"Buscar","nameLabelSchematic":"Nombre","captionLabelSchematic":"Título","keyLabelSchematic":"Clave","addSchematic":"Cargar archivo","schematicsInvalidSvg":"SVG no válido o no soportado","schematicsInvalidSvgData":"No se han podido obtener los datos del archivo:","schematicsInvalidType":"Tipo de archivo no soportado: %{type}","schematicsInvalidSize":"El archivo %{file}, tamaño %{size} supera el límite.","schematicsContextMenuReplace":"Sustituir","schematicsContextMenuDelete":"Suprimir","schematicsEmptySearchResults":"El resultado de la búsqueda está vacío","schematicsNoSelection":"No se ha seleccionado ningún elemento","schematicsMultipleSelection":"%{count} elementos seleccionados","schematicsSingleDeletionSuccessed":"Su esquemático se ha suprimido correctamente.","schematicsMultipleDeletionSuccessed":"Se han suprimido %{count} esquemáticos correctamente.","schematicsSingleAddSuccessed":"Su esquemático se ha añadido correctamente.","schematicsMultipleAddSuccessed":"Se han añadido %{count} esquemáticos correctamente.","schematicsAddFailed":"Error al añadir su esquemático.","schematicsReplaceDlgTitle":"Confirmar sustitución del archivo existente","schematicsReplaceDlgContent":"El archivo '%{sourceName}' ya existe. ¿Desea reemplazarlo por este nuevo archivo?","schematicsReplaceDlgApplyToAllFiles":"Aplicar a todos los filtros","schematicsPackageTab":"Paquete","schematicsContentTab":"Contenido","schematicsDescriptionLabel":"Descripción","schematicsIconLabel":"Icono","schematicsChooseFile":"Seleccionar un archivo","schematicsDeleteIcon":"Suprimir el icono","schematicsIconAdded":"El icono \"%{file}\" se ha añadido correctamente.","schematicsIconRemove":"El icono se ha eliminado correctamente.","schematicsIconDropFiles":"Coloque aquí los archivos","schematicsIconOr":"o bien","schematicsIconFileTypes":"Solo archivos .jpg, .png y .svg.","schematicsIconFileSize":"%{size}MB de tamaño máximo de archivo. "},"__fi":{"errorCreatingPalette":"Virhe tallennettaessa palettia.","paletteErrorTitle":"Palettivirhe","changePaletteLabel":"Vaihda väripaletti","myPaletteLabel":"Mukautettu","systemPaletteLabel":"Järjestelmä","publicPaletteLabel":"Yleiset","localPaletteLabel":"Paikallinen","mruPaletteLabel":"Viimeksi käytetyt","okDialog":"OK","deleteDialogTitle":"Poista","applyDialog":"Käytä","cancelDialog":"Peruuta","saveDialog":"Tallenna","deleteMessage":"Haluatko varmasti poistaa paletin %{name}?","deleteToast":"%{name} on poistettu","favoritesLabel":"Suosikit","setAsFavorite":"Aseta suosikiksi","createdToastMessage":"%{name} on luotu.","createPalette":"Luo mukautettu paletti","colorPicker":"Värinvalitsin","errorNoName":"Anna paletille nimi:","errorInsufficientColors":"Valitse vähintään kaksi väriä","paletteAppliedToastMessage":"Raporttiin on käytetty palettia %{name}.","createContinuousPalette":"Luo yhtenäinen väripaletti","createStandardPalette":"Luo kategorinen väripaletti","paletteNamePlaceholder":"Kirjoita paletin nimi tähän","paletteName":"Paletin nimi","standardPalette":"Kategorinen paletti","continuousPalette":"Yhtenäinen paletti","removeSwatch":"Poista värivalikoima","addSwatch":"Lisää värivalikoima","reversePalette":"Käänteinen paletti","colorGuide":"Väriopas","modeAutomatic":"Automaattinen","modeCustom":"Mukautettu","colorModel":"Värimalli","modelRGB":"RGB","modelHSB":"HSB","modelCMYK":"CMYK","grid":"Ruudukko","wheel":"Pyörä","hexCode":"Heksadesimaalikoodi","colorRed":"Punainen","colorGreen":"Vihreä","colorBlue":"Sininen","colorHue":"Sävy","colorSaturation":"Kylläisyys","colorBrightness":"Kirkkaus","colorCyan":"Syaani","colorMagenta":"Magenta","colorYellow":"Keltainen","colorBlack":"Musta","codeRed":"R","codeGreen":"G","codeBlue":"B","codeHue":"H","codeSaturation":"S","codeBrightness":"B","codeCyan":"C","codeMagenta":"M","codeYellow":"Y","codeBlack":"K","close":"Sulje","editSchematic":"Muokkaa pakettia","searchSchematic":"Hae","nameLabelSchematic":"Nimi","captionLabelSchematic":"Kuvateksti","keyLabelSchematic":"Avain","addSchematic":"Siirrä tiedosto","schematicsInvalidSvg":"SVG on virheellinen tai sitä ei tueta","schematicsInvalidSvgData":"Tiedostotietojen nouto ei onnistunut","schematicsInvalidType":"Tiedoston laji ei ole tuettu: %{type}","schematicsInvalidSize":"Tiedoston %{file} koko %{size} ylittää enimmäiskoon.","schematicsContextMenuReplace":"Korvaa","schematicsContextMenuDelete":"Poista","schematicsEmptySearchResults":"Hakutulos on tyhjä","schematicsNoSelection":"Kohteita ei ole valittu","schematicsMultipleSelection":"%{count} kohdetta on valittu","schematicsSingleDeletionSuccessed":"Skematiikka on poistettu.","schematicsMultipleDeletionSuccessed":"%{count} skematiikkaa on poistettu.","schematicsSingleAddSuccessed":"Skematiikka on lisätty.","schematicsMultipleAddSuccessed":"%{count} skematiikkaa on lisätty.","schematicsAddFailed":"Skematiikan lisäys epäonnistui.","schematicsReplaceDlgTitle":"Vahvista aiemmin luodun tiedoston korvaus","schematicsReplaceDlgContent":"Järjestelmässä on jo tiedosto %{sourceName}. Haluatko korvata sen uudella tiedostolla?","schematicsReplaceDlgApplyToAllFiles":"Käytä kaikissa tiedostoissa","schematicsPackageTab":"Paketti","schematicsContentTab":"Sisältö","schematicsDescriptionLabel":"Kuvaus","schematicsIconLabel":"Kuvake","schematicsChooseFile":"Valitse tiedosto","schematicsDeleteIcon":"Poista kuvake","schematicsIconAdded":"Kuvake %{file} on lisätty.","schematicsIconRemove":"Kuvake on poistettu.","schematicsIconDropFiles":"Pudota tiedostot tähän","schematicsIconOr":"tai","schematicsIconFileTypes":"Vain .jpg-, .png- ja .svg-tiedostoja.","schematicsIconFileSize":"Tiedoston enimmäiskoko %{size} Mt."},"__fr":{"errorCreatingPalette":"Une erreur est survenue lors de la sauvegarde de la palette.","paletteErrorTitle":"Erreur liée à la palette","changePaletteLabel":"Modifier la palette de couleurs","myPaletteLabel":"Personnalisé","systemPaletteLabel":"Système","publicPaletteLabel":"Global","localPaletteLabel":"Local","mruPaletteLabel":"Utilisée récemment","okDialog":"OK","deleteDialogTitle":"Supprimer","applyDialog":"Appliquer","cancelDialog":"Annuler","saveDialog":"Enregistrer","deleteMessage":"Voulez-vous vraiment supprimer la palette \"%{name}\" ?","deleteToast":"\"%{name}\" a été supprimée","favoritesLabel":"Favoris","setAsFavorite":"Définir en tant que favori","createdToastMessage":"\"%{name}\" a été créé(e) avec succès.","createPalette":"Créer une palette personnalisée","colorPicker":"Sélecteur de couleur","errorNoName":"Entrez un nom pour votre palette","errorInsufficientColors":"Choisissez au moins deux couleurs","paletteAppliedToastMessage":"La palette \"%{name}\" a été appliquée au rapport.","createContinuousPalette":"Créer une palette de couleurs continue","createStandardPalette":"Créer une palette de couleurs catégorielle","paletteNamePlaceholder":"Entrez le nom de la palette ici","paletteName":"Nom de la palette","standardPalette":"Palette catégorielle","continuousPalette":"Palette continue","removeSwatch":"Supprimer l'échantillon témoin","addSwatch":"Ajouter un échantillon témoin","reversePalette":"Annuler la palette","colorGuide":"Guide de couleur","modeAutomatic":"Automatique","modeCustom":"Personnalisé","colorModel":"Modèle de couleur","modelRGB":"RVB","modelHSB":"TSI","modelCMYK":"CMJK","grid":"Grille","wheel":"Roue","hexCode":"Code hexadécimal","colorRed":"Rouge","colorGreen":"Vert","colorBlue":"Bleu","colorHue":"Teinte","colorSaturation":"Saturation","colorBrightness":"Intensité","colorCyan":"Cyan","colorMagenta":"Magenta","colorYellow":"Jaune","colorBlack":"Noir","codeRed":"R","codeGreen":"G","codeBlue":"o","codeHue":"H","codeSaturation":"D","codeBrightness":"o","codeCyan":"C","codeMagenta":"Mn","codeYellow":"Y","codeBlack":"K","close":"Fermer","editSchematic":"Editer le pack","searchSchematic":"Rechercher","nameLabelSchematic":"Nom","captionLabelSchematic":"Légende","keyLabelSchematic":"Clé","addSchematic":"Transférer le fichier","schematicsInvalidSvg":"Fichier SVG non valide ou non pris en charge","schematicsInvalidSvgData":"Impossible d'obtenir les données du fichier","schematicsInvalidType":"Type de fichier non pris en charge : %{type}","schematicsInvalidSize":"La taille %{size} du fichier %{file} dépasse la limite admise.","schematicsContextMenuReplace":"Remplacer","schematicsContextMenuDelete":"Supprimer","schematicsEmptySearchResults":"Les résultats de la recherche sont vides","schematicsNoSelection":"Aucun élément sélectionné","schematicsMultipleSelection":"%{count} éléments sélectionnés","schematicsSingleDeletionSuccessed":"Votre schéma a été supprimé.","schematicsMultipleDeletionSuccessed":"%{count} schémas ont été supprimés.","schematicsSingleAddSuccessed":"Votre schéma a été ajouté.","schematicsMultipleAddSuccessed":"%{count} schémas ont été ajoutés.","schematicsAddFailed":"Echec de l'ajout de votre schéma.","schematicsReplaceDlgTitle":"Confirmer le remplacement du fichier existant","schematicsReplaceDlgContent":"Le fichier '%{sourceName}' existe déjà. Voulez-vous le remplacer par le nouveau fichier ?","schematicsReplaceDlgApplyToAllFiles":"Appliquer à tous les fichiers","schematicsPackageTab":"Pack","schematicsContentTab":"Contenu","schematicsDescriptionLabel":"Description","schematicsIconLabel":"Icône","schematicsChooseFile":"Choisir un fichier","schematicsDeleteIcon":"Retirer l'icône","schematicsIconAdded":"L'icône \"%{file}\" a été ajoutée.","schematicsIconRemove":"L'icône a été retirée.","schematicsIconDropFiles":"Déposer les fichiers ici","schematicsIconOr":"ou","schematicsIconFileTypes":"Uniquement les fichiers .jpg, .png et .svg.","schematicsIconFileSize":"Taille maximale du fichier : %{size} Mo."},"__hr":{"errorCreatingPalette":"Pojavila se greška tijekom spremanja ove palete.","paletteErrorTitle":"Greška palete","changePaletteLabel":"Promijeni paletu boja","myPaletteLabel":"Prilagođeno","systemPaletteLabel":"Sistem","publicPaletteLabel":"Globalno","localPaletteLabel":"Lokalno","mruPaletteLabel":"Nedavno korišteno","okDialog":"OK","deleteDialogTitle":"Izbriši","applyDialog":"Primijeni","cancelDialog":"Opoziv","saveDialog":"Spremi","deleteMessage":"Jeste li sigurni da želite izbrisati paletu \"%{name}\"?","deleteToast":"\"%{name}\" je izbrisana","favoritesLabel":"Favoriti","setAsFavorite":"Postavi za favorit","createdToastMessage":"\"%{name}\" je uspješno kreirana.","createPalette":"Kreiraj prilagođenu paletu","colorPicker":"Izbornik boja","errorNoName":"Unesite naziv vaše palete","errorInsufficientColors":"Izaberi barem dvije boje","paletteAppliedToastMessage":"Paleta \"%{name}\" je primijenjena na izvještaj.","createContinuousPalette":"Kreiraj neprekidnu paletu boja","createStandardPalette":"Kreiraj kategorijsku paletu boja","paletteNamePlaceholder":"Ovdje upišite naziv palete","paletteName":"Naziv palete","standardPalette":"Kategorijska paleta","continuousPalette":"Kontinuirana paleta","removeSwatch":"Ukloni uzorak","addSwatch":"Dodaj uzorak","reversePalette":"Obrni paletu","colorGuide":"Vodič za boje","modeAutomatic":"Automatski","modeCustom":"Prilagođeno","colorModel":"Model boje","modelRGB":"RGB","modelHSB":"HSB","modelCMYK":"CMYK","grid":"Mreža","wheel":"Kotač","hexCode":"Heksadecimalan kod","colorRed":"Crvena","colorGreen":"Zelena","colorBlue":"Plava","colorHue":"Nijansa","colorSaturation":"Zasićenost","colorBrightness":"Svjetlost","colorCyan":"Cijan","colorMagenta":"Grimizna","colorYellow":"Žuta","colorBlack":"Crna","codeRed":"Z","codeGreen":"G","codeBlue":"B","codeHue":"H","codeSaturation":"S","codeBrightness":"B","codeCyan":"C","codeMagenta":"M","codeYellow":"Y","codeBlack":"K","close":"Zatvori","editSchematic":"Uredi paket","searchSchematic":"Traži","nameLabelSchematic":"Naziv","captionLabelSchematic":"Zaglavlje","keyLabelSchematic":"Ključ","addSchematic":"Upload datoteka","schematicsInvalidSvg":"Pogrešan ili nepodržani SVG","schematicsInvalidSvgData":"Nisu se mogli dobiti podaci datoteke","schematicsInvalidType":"Nepodržani tip datoteke: %{type}","schematicsInvalidSize":"Datoteka %{file}, veličina %{size} premašuje ograničenje.","schematicsContextMenuReplace":"Zamijeni","schematicsContextMenuDelete":"Izbriši","schematicsEmptySearchResults":"Rezultati pretraživanja su prazni","schematicsNoSelection":"Nema izabranih stavki","schematicsMultipleSelection":"%{count} stavki je izabrano","schematicsSingleDeletionSuccessed":"Vaša shema je uspješno izbrisana.","schematicsMultipleDeletionSuccessed":"%{count} shema je uspješno izbrisano.","schematicsSingleAddSuccessed":"Vaša shema je uspješno dodana.","schematicsMultipleAddSuccessed":"%{count} shema je uspješno dodano.","schematicsAddFailed":"Neuspješno dodavanje sheme.","schematicsReplaceDlgTitle":"Potvrdite zamjenu postojeće datoteke","schematicsReplaceDlgContent":"Datoteka '%{sourceName}' već postoji. Želite li ju zamijeniti s novom datotekom?","schematicsReplaceDlgApplyToAllFiles":"Primijeni na sve datoteke","schematicsPackageTab":"Paket","schematicsContentTab":"Sadržaj","schematicsDescriptionLabel":"Opis","schematicsIconLabel":"Ikona","schematicsChooseFile":"Izaberi datoteku","schematicsDeleteIcon":"Ukloni ikonu","schematicsIconAdded":"Ikona \"%{file}\" je uspješno dodana.","schematicsIconRemove":"Ikona je uspješno uklonjena.","schematicsIconDropFiles":"Ovdje ispusti datoteke","schematicsIconOr":"ili","schematicsIconFileTypes":"Samo .jpg, .png i .svg datoteke","schematicsIconFileSize":"%{size}MB je maksimalna veličina datoteke."},"__hu":{"errorCreatingPalette":"Hiba történt a paletta mentése közben.","paletteErrorTitle":"Paletta hiba","changePaletteLabel":"Színpaletta módosítása","myPaletteLabel":"Egyéni","systemPaletteLabel":"Rendszer","publicPaletteLabel":"Globális","localPaletteLabel":"Helyi","mruPaletteLabel":"Nemrégiben használt","okDialog":"OK","deleteDialogTitle":"Törlés","applyDialog":"Alkalmaz","cancelDialog":"Mégse","saveDialog":"Mentés","deleteMessage":"Valóban törölni kívánja a(z) \"%{name}\" palettát?","deleteToast":"A(z) \"%{name}\" törlésre került","favoritesLabel":"Kedvencek","setAsFavorite":"Beállítás kedvencként","createdToastMessage":"A(z) \"%{name}\" sikeresen létrehozásra került","createPalette":"Egyéni paletta létrehozása","colorPicker":"Színválasztó","errorNoName":"Adja meg a paletta nevét","errorInsufficientColors":"Válasszon legalább két színt","paletteAppliedToastMessage":"A(z) \"%{name}\" paletta került alkalmazásra a jelentéshez.","createContinuousPalette":"Folytonos színpaletta létrehozása","createStandardPalette":"Kategorikus színpaletta létrehozása","paletteNamePlaceholder":"Itt adja meg a paletta nevét","paletteName":"Paletta neve","standardPalette":"Kategorikus paletta","continuousPalette":"Folytonos paletta","removeSwatch":"Minta eltávolítása","addSwatch":"Minta hozzáadása","reversePalette":"Fordított paletta","colorGuide":"Szín útmutató","modeAutomatic":"Automatikus","modeCustom":"Egyéni","colorModel":"Színmodell","modelRGB":"RGB","modelHSB":"HSB","modelCMYK":"CMYK","grid":"Rács","wheel":"Kerék","hexCode":"Hexa kód","colorRed":"Piros","colorGreen":"Zöld","colorBlue":"Kék","colorHue":"Árnyalat","colorSaturation":"Telítettség","colorBrightness":"Fényerő","colorCyan":"Cián","colorMagenta":"Bíbor","colorYellow":"Sárga","colorBlack":"Fekete","codeRed":"K","codeGreen":"m","codeBlue":"F","codeHue":"H","codeSaturation":"S","codeBrightness":"F","codeCyan":"K","codeMagenta":"M","codeYellow":"Y","codeBlack":"K","close":"Bezárás","editSchematic":"Csomagok szerkesztése","searchSchematic":"Keresés","nameLabelSchematic":"Név","captionLabelSchematic":"Felirat","keyLabelSchematic":"Kulcs","addSchematic":"Fájl feltöltése","schematicsInvalidSvg":"Érvénytelen vagy nem támogatott SVG","schematicsInvalidSvgData":"A fájl adatait nem lehet lekérdezni","schematicsInvalidType":"Nem támogatott fájltípus: %{type}","schematicsInvalidSize":"A(z) %{file} fájl %{size} mérete meghaladja a korlátot.","schematicsContextMenuReplace":"Csere","schematicsContextMenuDelete":"Törlés","schematicsEmptySearchResults":"A keresési eredmény üres","schematicsNoSelection":"Nincs kijelölt elem","schematicsMultipleSelection":"%{count} elem kijelölve","schematicsSingleDeletionSuccessed":"Tervrajza sikeresen törlésre került.","schematicsMultipleDeletionSuccessed":"%{count} tervrajz sikeresen törlésre került.","schematicsSingleAddSuccessed":"Tervrajza sikeresen hozzáadásra került.","schematicsMultipleAddSuccessed":"%{count} tervrajz sikeresen hozzáadásra került.","schematicsAddFailed":"A tervrajz hozzáadása nem sikerült.","schematicsReplaceDlgTitle":"A meglévő fájl cseréjének jóváhagyása","schematicsReplaceDlgContent":"A(z) '%{sourceName}' fájl már létezik. Kívánja felülírni az új fájllal?","schematicsReplaceDlgApplyToAllFiles":"Minden fájlra vonatkozik","schematicsPackageTab":"Csomag","schematicsContentTab":"Tartalom","schematicsDescriptionLabel":"Leírás","schematicsIconLabel":"Ikon","schematicsChooseFile":"Válasszon egy fájlt","schematicsDeleteIcon":"Az ikon eltávolítása","schematicsIconAdded":"A(z) \"%{file}\" ikon sikeresen hozzáadásra került.","schematicsIconRemove":"Az ikon sikeresen eltávolításra került.","schematicsIconDropFiles":"Vontassa ide a fájlokat","schematicsIconOr":"vagy","schematicsIconFileTypes":"Csak .jpg, .png és .svg fájlok.","schematicsIconFileSize":"%{size}MB maximális fájlméret."},"__it":{"errorCreatingPalette":"Si è verificato un errore durante il salvataggio della tavolozza.","paletteErrorTitle":"Errore della tavolozza","changePaletteLabel":"Modifica tavolozza colori","myPaletteLabel":"Personalizzato","systemPaletteLabel":"Sistema","publicPaletteLabel":"Globale","localPaletteLabel":"Locale","mruPaletteLabel":"Utilizzato di recente","okDialog":"OK","deleteDialogTitle":"Elimina","applyDialog":"Applica","cancelDialog":"Annulla","saveDialog":"Salva","deleteMessage":"Si è sicuri di voler eliminare la tavolozza \"%{name}\"?","deleteToast":"\"%{name}\" è stato eliminato","favoritesLabel":"Preferiti","setAsFavorite":"Imposta come Preferiti","createdToastMessage":"\"%{name}\" creato correttamente.","createPalette":"Creazione di una tavolozza personalizzata","colorPicker":"Selettore colori","errorNoName":"Immettere un nome per la tavolozza","errorInsufficientColors":"Scegli almeno due colori","paletteAppliedToastMessage":"La tavolozza \"%{name}\", è stata applicata al report.","createContinuousPalette":"Crea una tavolozza di colori continua","createStandardPalette":"Crea una tavolozza di colori categoriale","paletteNamePlaceholder":"Immetti qui il nome tavolozza","paletteName":"Nome tavolozza","standardPalette":"Tavolozza categoriale","continuousPalette":"Tavolozza continua","removeSwatch":"Rimuovi campionario","addSwatch":"Aggiungi campionario","reversePalette":"Inverti tavolozza","colorGuide":"Guida a colori","modeAutomatic":"Automatico","modeCustom":"Personalizzato","colorModel":"Modello di colore","modelRGB":"RGB","modelHSB":"HSB","modelCMYK":"CMYK","grid":"Griglia","wheel":"Cerchio","hexCode":"Codice esadecimale","colorRed":"Rosso","colorGreen":"Verde","colorBlue":"Blu","colorHue":"Tonalità","colorSaturation":"Saturazione","colorBrightness":"Brillantezza","colorCyan":"Ciano","colorMagenta":"Magenta","colorYellow":"Giallo","colorBlack":"Nero","codeRed":"R","codeGreen":"G","codeBlue":"B","codeHue":"H","codeSaturation":"S","codeBrightness":"B","codeCyan":"C","codeMagenta":"M","codeYellow":"Y","codeBlack":"K","close":"Chiudi","editSchematic":"Modifica package","searchSchematic":"Ricerca","nameLabelSchematic":"Nome","captionLabelSchematic":"Didascalia","keyLabelSchematic":"Chiave","addSchematic":"Carica file","schematicsInvalidSvg":"SVG non valido o non supportato","schematicsInvalidSvgData":"Impossibile ottenere i dati del file","schematicsInvalidType":"Tipo file non supportato: %{type}","schematicsInvalidSize":"File %{file}, dimensione %{size} supera il limite.","schematicsContextMenuReplace":"Sostituisci","schematicsContextMenuDelete":"Elimina","schematicsEmptySearchResults":"I risultati della ricerca sono vuoti.","schematicsNoSelection":"Nessun elemento selezionato","schematicsMultipleSelection":"%{count} elementi selezionato","schematicsSingleDeletionSuccessed":"La schematica è stata correttamente eliminata.","schematicsMultipleDeletionSuccessed":"%{count} schematiche sono state correttamente eliminate.","schematicsSingleAddSuccessed":"Le schematiche sono state correttamente aggiunte.","schematicsMultipleAddSuccessed":"%{count} schematiche sono state correttamente aggiunte.","schematicsAddFailed":"Aggiunta schematica non riuscita.","schematicsReplaceDlgTitle":"Conferma sostituzione del file esistente","schematicsReplaceDlgContent":"Il file '%{sourceName}' esiste già. Si desidera sostituirlo con il nuovo file?","schematicsReplaceDlgApplyToAllFiles":"Applica a tutti i file","schematicsPackageTab":"Package","schematicsContentTab":"Contenuto","schematicsDescriptionLabel":"Descrizione","schematicsIconLabel":"Icona","schematicsChooseFile":"Scegli un file","schematicsDeleteIcon":"Rimuovi l'icona","schematicsIconAdded":"L'icona \"%{file}\" è stata correttamente aggiunta.","schematicsIconRemove":"L'icona è stata correttamente rimossa.","schematicsIconDropFiles":"Rilascia i file qui ","schematicsIconOr":"o ","schematicsIconFileTypes":"Solo file .jpg, .png e .svg ","schematicsIconFileSize":"Dimensione file massima %{size} MB "},"__ja":{"errorCreatingPalette":"パレットの保存中にエラーが発生しました。","paletteErrorTitle":"パレット・エラー","changePaletteLabel":"カラー・パレットの変更","myPaletteLabel":"カスタム","systemPaletteLabel":"システム","publicPaletteLabel":"グローバル","localPaletteLabel":"ローカル","mruPaletteLabel":"最近使用された","okDialog":"OK","deleteDialogTitle":"削除","applyDialog":"適用","cancelDialog":"キャンセル","saveDialog":"保存","deleteMessage":"パレット \"%{name}\" を削除しますか?","deleteToast":"\"%{name}\" が削除されました","favoritesLabel":"お気に入り","setAsFavorite":"お気に入りとして設定","createdToastMessage":"\"%{name}\" が正常に作成されました。","createPalette":"カスタム・パレットの作成","colorPicker":"カラー・ピッカー","errorNoName":"パレットの名前を入力してください","errorInsufficientColors":"少なくとも 2 つの色を選択してください","paletteAppliedToastMessage":"パレット \"%{name}\" がレポートに適用されました。","createContinuousPalette":"連続型カラー・パレットの作成","createStandardPalette":"カテゴリー型カラー・パレットの作成","paletteNamePlaceholder":"ここにパレット名を入力","paletteName":"パレット名","standardPalette":"カテゴリー型パレット","continuousPalette":"連続型パレット","removeSwatch":"スウォッチを削除","addSwatch":"スウォッチを追加","reversePalette":"パレットを反転","colorGuide":"カラー・ガイド","modeAutomatic":"自動","modeCustom":"カスタム","colorModel":"カラー型","modelRGB":"RGB","modelHSB":"HSB","modelCMYK":"CMYK","grid":"グリッド","wheel":"ホイール","hexCode":"16 進コード","colorRed":"赤","colorGreen":"緑","colorBlue":"青","colorHue":"色調","colorSaturation":"彩度","colorBrightness":"輝度","colorCyan":"シアン","colorMagenta":"マゼンタ","colorYellow":"黄","colorBlack":"黒","codeRed":"R","codeGreen":"G","codeBlue":"B","codeHue":"H","codeSaturation":"S","codeBrightness":"B","codeCyan":"C","codeMagenta":"M","codeYellow":"Y","codeBlack":"K","close":"閉じる","editSchematic":"パッケージの編集","searchSchematic":"検索","nameLabelSchematic":"名前","captionLabelSchematic":"キャプション","keyLabelSchematic":"キー","addSchematic":"ファイルのアップロード","schematicsInvalidSvg":"正しくない、またはサポートされていない SVG です","schematicsInvalidSvgData":"ファイル・データを取得できませんでした","schematicsInvalidType":"サポートされないファイル・タイプ: %{type}","schematicsInvalidSize":"ファイル %{file}、サイズ %{size} が制限を超えています。","schematicsContextMenuReplace":"置換","schematicsContextMenuDelete":"削除","schematicsEmptySearchResults":"検索結果が空です","schematicsNoSelection":"アイテムが選択されていません","schematicsMultipleSelection":"%{count} 個のアイテムを選択","schematicsSingleDeletionSuccessed":"図式が正常に削除されました。","schematicsMultipleDeletionSuccessed":"%{count} 個の図式が正常に削除されました。","schematicsSingleAddSuccessed":"図式が正常に追加されました。","schematicsMultipleAddSuccessed":"%{count} 個の図式が正常に追加されました。","schematicsAddFailed":"図式を追加できませんでした。","schematicsReplaceDlgTitle":"既存ファイルの置換の確認","schematicsReplaceDlgContent":"ファイル '%{sourceName}' は既に存在しています。 新しいファイルに置き換えますか?","schematicsReplaceDlgApplyToAllFiles":"すべてのファイルに適用","schematicsPackageTab":"パッケージ","schematicsContentTab":"コンテンツ","schematicsDescriptionLabel":"説明","schematicsIconLabel":"アイコン","schematicsChooseFile":"ファイルの選択","schematicsDeleteIcon":"アイコンの削除","schematicsIconAdded":"アイコン \"%{file}\" が正常に追加されました。","schematicsIconRemove":"アイコンが正常に削除されました。","schematicsIconDropFiles":"ここにファイルをドロップ","schematicsIconOr":"または","schematicsIconFileTypes":".jpg、.png、および .svg ファイルのみ。","schematicsIconFileSize":"ファイル・サイズは最大 %{size}MB。"},"__kk":{"errorCreatingPalette":"Бояғышты сақтау кезінде қате пайда болды.","paletteErrorTitle":"Бояғыш қатесі","changePaletteLabel":"Түсті бояғыштарды өзгерту","myPaletteLabel":"Теңшелім","systemPaletteLabel":"Жүйе","publicPaletteLabel":"Глобалдық","localPaletteLabel":"Жергілікті","mruPaletteLabel":"Жақында қолданылған","okDialog":"OK","deleteDialogTitle":"Жою","applyDialog":"Қолдану","cancelDialog":"Болдырмау","saveDialog":"Сақтау","deleteMessage":"\"%{name}\" бояғышын жойғыңыз келетініне сенімдісіз бе?","deleteToast":"\"%{name}\" жойылған","favoritesLabel":"Таңдаулылар","setAsFavorite":"Таңдаулы ретінде орнату","createdToastMessage":"\"%{name}\" сәтті жасалды.","createPalette":"Пайдаланушы бояғышты жасау","colorPicker":"Түс таңдағыш","errorNoName":"Бояғыштың атын енгізіңіз","errorInsufficientColors":"Кемінде екі түсті таңдаңыз","paletteAppliedToastMessage":"Есепке \"%{name}\" бояғышы қолданылды.","createContinuousPalette":"Үздіксіз түс бояғышын жасаңыз","createStandardPalette":"Категориялық түстер бояғышын жасаңыз","paletteNamePlaceholder":"Бояғыштың атауын мына жерде теріңіз","paletteName":"Бояғыш атауы","standardPalette":"Категориялы бояғыш","continuousPalette":"Үздіксіз бояғыш","removeSwatch":"Таңбаны алып тастау","addSwatch":"Таңба қосу","reversePalette":"Кері бояғышы","colorGuide":"Түс бағыттаушы","modeAutomatic":"Автоматты","modeCustom":"Теңшелім","colorModel":"Түс үлгісі","modelRGB":"RGB","modelHSB":"HSB","modelCMYK":"CMYK","grid":"Жоғарғы","wheel":"Шеңбері","hexCode":"Hex код","colorRed":"Қызыл","colorGreen":"Жасыл","colorBlue":"Көк","colorHue":"Реңк","colorSaturation":"Қанықтық","colorBrightness":"Жарықтық","colorCyan":"Көкшіл","colorMagenta":"Күлгін","colorYellow":"Сары","colorBlack":"Қара","codeRed":"R","codeGreen":"Г","codeBlue":"B","codeHue":"С","codeSaturation":"S","codeBrightness":"B","codeCyan":"C","codeMagenta":"М","codeYellow":"Y","codeBlack":"K","close":"Жабу","editSchematic":"Буманы өңдеу","searchSchematic":"Іздеу","nameLabelSchematic":"Аты","captionLabelSchematic":"Тақырып","keyLabelSchematic":"Кілт","addSchematic":"Кері қотарылған файл","schematicsInvalidSvg":"Жарамсыз немесе қолдау көрсетілмейтін SVG","schematicsInvalidSvgData":"Файл деректерін алу мүмкін болмады","schematicsInvalidType":"Қолдау көрсетілмейтін файл түрі: %{type}","schematicsInvalidSize":"%{file} файлы, %{size} мөлшері шектен асады.","schematicsContextMenuReplace":"Ауыстыру","schematicsContextMenuDelete":"Жою","schematicsEmptySearchResults":"Іздеу нәтижелері бос","schematicsNoSelection":"Ешбір элемент таңдалмады","schematicsMultipleSelection":"%{count} элемент таңдалды","schematicsSingleDeletionSuccessed":"Сіздің схемаңыз сәтті жойылды.","schematicsMultipleDeletionSuccessed":"%{count} схемасы сәтті жойылды.","schematicsSingleAddSuccessed":"Сіздің схемаңыз сәтті қосылды.","schematicsMultipleAddSuccessed":"%{count} схемасы сәтті қосылды.","schematicsAddFailed":"Схемаңызды қосу сәтсіз аяқталды.","schematicsReplaceDlgTitle":"Бар файлды ауыстыруды растаңыз","schematicsReplaceDlgContent":"'%{sourceName}' файлы бұрыннан бар. Оны жаңа файлмен алмастырғыңыз келе ме?","schematicsReplaceDlgApplyToAllFiles":"Барлық файлдарға қолданыңыз","schematicsPackageTab":"Бума","schematicsContentTab":"Мазмұн","schematicsDescriptionLabel":"Сипаттама","schematicsIconLabel":"Белгіше","schematicsChooseFile":"Файлды таңдаңыз","schematicsDeleteIcon":"Белгішені жоюңыз","schematicsIconAdded":"\"%{file}\" белгішесі сәтті қосылды.","schematicsIconRemove":"Белгіше сәтті алынып тасталды.","schematicsIconDropFiles":"Файлдарды осында тастау","schematicsIconOr":"or","schematicsIconFileTypes":"Тек .jpg, .png және .svg файлдары.","schematicsIconFileSize":"%{size} МБ максималды файл өлшемі."},"__ko":{"errorCreatingPalette":"색상표를 저장하는 중에 오류가 발생했습니다.","paletteErrorTitle":"색상표 오류","changePaletteLabel":"색상표 변경","myPaletteLabel":"사용자 정의","systemPaletteLabel":"시스템","publicPaletteLabel":"글로벌","localPaletteLabel":"로컬","mruPaletteLabel":"최근 사용됨","okDialog":"확인","deleteDialogTitle":"삭제","applyDialog":"적용","cancelDialog":"취소","saveDialog":"저장","deleteMessage":"\"%{name}\" 색상표를 삭제하시겠습니까?","deleteToast":"\"%{name}\"이(가) 삭제됨","favoritesLabel":"즐겨찾기","setAsFavorite":"즐겨찾기로 설정","createdToastMessage":"\"%{name}\"이(가) 작성되었습니다.","createPalette":"사용자 정의 색상표 작성","colorPicker":"색상 선택도구","errorNoName":"색상표 이름 입력","errorInsufficientColors":"둘 이상의 색상 선택","paletteAppliedToastMessage":"\"%{name}\" 색상표가 보고서에 적용되었습니다.","createContinuousPalette":"연속 색상표 작성","createStandardPalette":"카테고리형 색상표 작성","paletteNamePlaceholder":"여기에 색상표 이름 입력","paletteName":"색상표 이름","standardPalette":"카테고리형 색상표","continuousPalette":"연속 색상표","removeSwatch":"견본 제거","addSwatch":"견본 추가","reversePalette":"색상표 반전","colorGuide":"색상 안내서","modeAutomatic":"자동","modeCustom":"사용자 정의","colorModel":"색상 모델","modelRGB":"RGB","modelHSB":"HSB","modelCMYK":"CMYK","grid":"눈금","wheel":"휠","hexCode":"16진 코드","colorRed":"빨간색","colorGreen":"녹색","colorBlue":"파란색","colorHue":"색상","colorSaturation":"채도","colorBrightness":"밝기","colorCyan":"청록색","colorMagenta":"진홍색","colorYellow":"노란색","colorBlack":"검은색","codeRed":"R","codeGreen":"G","codeBlue":"B","codeHue":"H","codeSaturation":"S","codeBrightness":"B","codeCyan":"C","codeMagenta":"m","codeYellow":"Y","codeBlack":"K","close":"닫기","editSchematic":"패키지 편집","searchSchematic":"검색","nameLabelSchematic":"이름","captionLabelSchematic":"캡션","keyLabelSchematic":"키","addSchematic":"파일 업로드","schematicsInvalidSvg":"올바르지 않거나 지원되지 않는 SVG","schematicsInvalidSvgData":"파일 데이터를 확보할 수 없음","schematicsInvalidType":"지원되지 않는 파일 유형: %{type}","schematicsInvalidSize":"%{file} 파일, %{size} 크기가 한계를 초과했습니다.","schematicsContextMenuReplace":"대체","schematicsContextMenuDelete":"삭제","schematicsEmptySearchResults":"검색 결과가 비어 있음","schematicsNoSelection":"항목을 선택하지 않음","schematicsMultipleSelection":"%{count}개의 항목이 선택됨","schematicsSingleDeletionSuccessed":"도식이 삭제되었습니다.","schematicsMultipleDeletionSuccessed":"%{count} 도식이 삭제되었습니다.","schematicsSingleAddSuccessed":"도식이 추가되었습니다.","schematicsMultipleAddSuccessed":"%{count} 도식이 추가되었습니다.","schematicsAddFailed":"도식 추가에 실패했습니다.","schematicsReplaceDlgTitle":"기존 파일의 대체 확인","schematicsReplaceDlgContent":"'%{sourceName}' 파일이 이미 있습니다. 새 파일로 이를 대체하시겠습니까?","schematicsReplaceDlgApplyToAllFiles":"모든 파일에 적용","schematicsPackageTab":"패키지","schematicsContentTab":"컨텐츠","schematicsDescriptionLabel":"설명","schematicsIconLabel":"아이콘","schematicsChooseFile":"파일 선택","schematicsDeleteIcon":"아이콘 제거","schematicsIconAdded":"\"%{file}\" 아이콘이 추가되었습니다.","schematicsIconRemove":"아이콘이 제거되었습니다.","schematicsIconDropFiles":"파일 여기에 놓기","schematicsIconOr":"또는","schematicsIconFileTypes":".jpg, .png 및 .svg 파일만.","schematicsIconFileSize":"%{size}MB의 최대 파일 크기."},"__no":{"errorCreatingPalette":"Det oppstod en feil under lagring av paletten.","paletteErrorTitle":"Palettfeil","changePaletteLabel":"Endre fargepalett","myPaletteLabel":"Tilpasset","systemPaletteLabel":"System","publicPaletteLabel":"Globale","localPaletteLabel":"Lokal","mruPaletteLabel":"Nylig brukt","okDialog":"OK","deleteDialogTitle":"Slett","applyDialog":"Bruk","cancelDialog":"Avbryt","saveDialog":"Lagre","deleteMessage":"Er du sikker på at du vil slette paletten \"%{name}\"?","deleteToast":"\"%{name}\" ble slettet","favoritesLabel":"Favoritter","setAsFavorite":"Definer som favoritt","createdToastMessage":"\"%{name}\" ble opprettet.","createPalette":"Opprett en tilpasset palett","colorPicker":"Fargevelger","errorNoName":"Oppgi et navn på paletten.","errorInsufficientColors":"Velg minst to farger","paletteAppliedToastMessage":"Palett \"%{name}\" ble brukt på rapporten.","createContinuousPalette":"Opprett kontinuerlig fargepalett","createStandardPalette":"Opprett kategorisk fargepalett","paletteNamePlaceholder":"Skriv palettnavn her","paletteName":"Palettnavn","standardPalette":"Kategorisk palett","continuousPalette":"Kontinuerlig palett","removeSwatch":"Fjern prøve","addSwatch":"Legg til prøve","reversePalette":"Omvendt palett","colorGuide":"Fargeveiledning","modeAutomatic":"Automatisk","modeCustom":"Tilpasset","colorModel":"Fargemodell","modelRGB":"RGB","modelHSB":"HSB","modelCMYK":"CMYK","grid":"Rutenett","wheel":"Hjul","hexCode":"Heksadesimal kode","colorRed":"Rød","colorGreen":"Grønn","colorBlue":"Blå","colorHue":"Nyanse","colorSaturation":"Metning","colorBrightness":"Lysstyrke","colorCyan":"Cyan","colorMagenta":"Magenta","colorYellow":"Gul","colorBlack":"Svart","codeRed":"R","codeGreen":"G","codeBlue":"B","codeHue":"H","codeSaturation":"S","codeBrightness":"B","codeCyan":"C","codeMagenta":"M","codeYellow":"Y","codeBlack":"K","close":"Lukk","editSchematic":"Rediger pakke","searchSchematic":"Søk","nameLabelSchematic":"Navn","captionLabelSchematic":"Tittel","keyLabelSchematic":"Nøkkel","addSchematic":"Last opp fil","schematicsInvalidSvg":"Ugyldig eller ikke støttet SVG","schematicsInvalidSvgData":"Kunne ikke hente fildata","schematicsInvalidType":"Ikke-støttet filtype: %{type}","schematicsInvalidSize":"Fil %{file}, størrelse %{size} overskrider grense.","schematicsContextMenuReplace":"Erstatt","schematicsContextMenuDelete":"Slett","schematicsEmptySearchResults":"Søkeresultatet er tomt","schematicsNoSelection":"Ingen elementer valgt","schematicsMultipleSelection":"%{count} elementer valgt","schematicsSingleDeletionSuccessed":"Skjemaet ble slettet.","schematicsMultipleDeletionSuccessed":"%{count} skjemaer ble slettet.","schematicsSingleAddSuccessed":"Skjemaet ble lagt til.","schematicsMultipleAddSuccessed":"%{count} skjemaer ble lagt til.","schematicsAddFailed":"Kunne ikke legge til skjema.","schematicsReplaceDlgTitle":"Bekreft erstatning av eksisterende fil","schematicsReplaceDlgContent":"Filen '%{sourceName}' finnes allerede. Vil du erstatte den med den nye filen?","schematicsReplaceDlgApplyToAllFiles":"Bruk på alle filer","schematicsPackageTab":"Pakke","schematicsContentTab":"Innhold","schematicsDescriptionLabel":"Beskrivelse","schematicsIconLabel":"Ikon","schematicsChooseFile":"Velg en fil","schematicsDeleteIcon":"Fjern ikonet","schematicsIconAdded":"Ikonet \"%{file}\" ble lagt til.","schematicsIconRemove":"Ikonet ble fjernet.","schematicsIconDropFiles":"Slipp filer her","schematicsIconOr":"eller","schematicsIconFileTypes":"Bare filer av typen .jpg, .png og .svg.","schematicsIconFileSize":"%{size} MB maks filstørrelse."},"__nb":{"errorCreatingPalette":"Det oppstod en feil under lagring av paletten.","paletteErrorTitle":"Palettfeil","changePaletteLabel":"Endre fargepalett","myPaletteLabel":"Tilpasset","systemPaletteLabel":"System","publicPaletteLabel":"Globale","localPaletteLabel":"Lokal","mruPaletteLabel":"Nylig brukt","okDialog":"OK","deleteDialogTitle":"Slett","applyDialog":"Bruk","cancelDialog":"Avbryt","saveDialog":"Lagre","deleteMessage":"Er du sikker på at du vil slette paletten \"%{name}\"?","deleteToast":"\"%{name}\" ble slettet","favoritesLabel":"Favoritter","setAsFavorite":"Definer som favoritt","createdToastMessage":"\"%{name}\" ble opprettet.","createPalette":"Opprett en tilpasset palett","colorPicker":"Fargevelger","errorNoName":"Oppgi et navn på paletten.","errorInsufficientColors":"Velg minst to farger","paletteAppliedToastMessage":"Palett \"%{name}\" ble brukt på rapporten.","createContinuousPalette":"Opprett kontinuerlig fargepalett","createStandardPalette":"Opprett kategorisk fargepalett","paletteNamePlaceholder":"Skriv palettnavn her","paletteName":"Palettnavn","standardPalette":"Kategorisk palett","continuousPalette":"Kontinuerlig palett","removeSwatch":"Fjern prøve","addSwatch":"Legg til prøve","reversePalette":"Omvendt palett","colorGuide":"Fargeveiledning","modeAutomatic":"Automatisk","modeCustom":"Tilpasset","colorModel":"Fargemodell","modelRGB":"RGB","modelHSB":"HSB","modelCMYK":"CMYK","grid":"Rutenett","wheel":"Hjul","hexCode":"Heksadesimal kode","colorRed":"Rød","colorGreen":"Grønn","colorBlue":"Blå","colorHue":"Nyanse","colorSaturation":"Metning","colorBrightness":"Lysstyrke","colorCyan":"Cyan","colorMagenta":"Magenta","colorYellow":"Gul","colorBlack":"Svart","codeRed":"R","codeGreen":"G","codeBlue":"B","codeHue":"H","codeSaturation":"S","codeBrightness":"B","codeCyan":"C","codeMagenta":"M","codeYellow":"Y","codeBlack":"K","close":"Lukk","editSchematic":"Rediger pakke","searchSchematic":"Søk","nameLabelSchematic":"Navn","captionLabelSchematic":"Tittel","keyLabelSchematic":"Nøkkel","addSchematic":"Last opp fil","schematicsInvalidSvg":"Ugyldig eller ikke støttet SVG","schematicsInvalidSvgData":"Kunne ikke hente fildata","schematicsInvalidType":"Ikke-støttet filtype: %{type}","schematicsInvalidSize":"Fil %{file}, størrelse %{size} overskrider grense.","schematicsContextMenuReplace":"Erstatt","schematicsContextMenuDelete":"Slett","schematicsEmptySearchResults":"Søkeresultatet er tomt","schematicsNoSelection":"Ingen elementer valgt","schematicsMultipleSelection":"%{count} elementer valgt","schematicsSingleDeletionSuccessed":"Skjemaet ble slettet.","schematicsMultipleDeletionSuccessed":"%{count} skjemaer ble slettet.","schematicsSingleAddSuccessed":"Skjemaet ble lagt til.","schematicsMultipleAddSuccessed":"%{count} skjemaer ble lagt til.","schematicsAddFailed":"Kunne ikke legge til skjema.","schematicsReplaceDlgTitle":"Bekreft erstatning av eksisterende fil","schematicsReplaceDlgContent":"Filen '%{sourceName}' finnes allerede. Vil du erstatte den med den nye filen?","schematicsReplaceDlgApplyToAllFiles":"Bruk på alle filer","schematicsPackageTab":"Pakke","schematicsContentTab":"Innhold","schematicsDescriptionLabel":"Beskrivelse","schematicsIconLabel":"Ikon","schematicsChooseFile":"Velg en fil","schematicsDeleteIcon":"Fjern ikonet","schematicsIconAdded":"Ikonet \"%{file}\" ble lagt til.","schematicsIconRemove":"Ikonet ble fjernet.","schematicsIconDropFiles":"Slipp filer her","schematicsIconOr":"eller","schematicsIconFileTypes":"Bare filer av typen .jpg, .png og .svg.","schematicsIconFileSize":"%{size} MB maks filstørrelse."},"__nl":{"errorCreatingPalette":"Fout opgetreden bij het opslaan van het palet.","paletteErrorTitle":"Paletfout","changePaletteLabel":"Kleurenpalet wijzigen","myPaletteLabel":"Aangepast","systemPaletteLabel":"Systeem","publicPaletteLabel":"Algemeen","localPaletteLabel":"Lokaal","mruPaletteLabel":"Kortgeleden gebruikt","okDialog":"OK","deleteDialogTitle":"Verwijderen","applyDialog":"Toepassen","cancelDialog":"Annuleren","saveDialog":"Save","deleteMessage":"Weet u zeker dat u het palet \"%{name}\" wilt wissen?","deleteToast":"\"%{name}\" is gewist","favoritesLabel":"Favorieten","setAsFavorite":"Instellen als favoriet","createdToastMessage":"\"%{name}\" is gemaakt.","createPalette":"Aangepast palet maken","colorPicker":"Kleurenselector","errorNoName":"Geef een naam voor uw palet op","errorInsufficientColors":"Kies minimaal twee kleuren","paletteAppliedToastMessage":"Palet \"%{name}\" is toegepast op het rapport.","createContinuousPalette":"Doorlopen kleurenpalet maken","createStandardPalette":"Categorisch kleurenpalet maken","paletteNamePlaceholder":"Typ hier de naam van het palet","paletteName":"Naam van palet","standardPalette":"Categorisch palet","continuousPalette":"Doorlopend palet","removeSwatch":"Staal verwijderen","addSwatch":"Staal toevoegen","reversePalette":"Palet negatief maken","colorGuide":"Kleurengids","modeAutomatic":"Automatisch","modeCustom":"Aangepast","colorModel":"Kleurmodel","modelRGB":"RGB","modelHSB":"HSB","modelCMYK":"CMYK","grid":"Raster","wheel":"Cirkel","hexCode":"Hexcode","colorRed":"Rood","colorGreen":"Groen","colorBlue":"Blauw","colorHue":"Tint","colorSaturation":"Verzadiging","colorBrightness":"Helderheid","colorCyan":"Cyaan","colorMagenta":"Magenta","colorYellow":"Geel","colorBlack":"Zwart","codeRed":"R","codeGreen":"G","codeBlue":"B","codeHue":"T","codeSaturation":"V","codeBrightness":"H","codeCyan":"C","codeMagenta":"M","codeYellow":"J","codeBlack":"Z","close":"Sluiten","editSchematic":"Pakket bewerken","searchSchematic":"Zoeken","nameLabelSchematic":"Name","captionLabelSchematic":"Bijschrift","keyLabelSchematic":"Sleutel","addSchematic":"Bestand uploaden","schematicsInvalidSvg":"Ongeldige of niet-ondersteunde SVG","schematicsInvalidSvgData":"Bestandsgegevens kunnen niet worden opgehaald","schematicsInvalidType":"Niet-ondersteund bestandstype: %{type}","schematicsInvalidSize":"Bestand %{file}, grootte %{size} overschrijdt de limiet.","schematicsContextMenuReplace":"Vervangen","schematicsContextMenuDelete":"Verwijderen","schematicsEmptySearchResults":"Het zoekresultaat is leeg","schematicsNoSelection":"Geen items geselecteerd","schematicsMultipleSelection":"%{count} items geselecteerd","schematicsSingleDeletionSuccessed":"Uw schema is gewist.","schematicsMultipleDeletionSuccessed":"%{count} schema's gewist.","schematicsSingleAddSuccessed":"Uw schema is toegevoegd.","schematicsMultipleAddSuccessed":"%{count} schema's zijn toegevoegd.","schematicsAddFailed":"Toevoegen van uw schema is mislukt.","schematicsReplaceDlgTitle":"Vervanging van bestaand bestand bevestigen","schematicsReplaceDlgContent":"Het bestand '%{sourceName}' bestaat al. Wilt u het vervangen door het nieuwe bestand?","schematicsReplaceDlgApplyToAllFiles":"Toepassen op alle bestanden","schematicsPackageTab":"Pakket","schematicsContentTab":"Inhoud","schematicsDescriptionLabel":"Naam","schematicsIconLabel":"Pictogram","schematicsChooseFile":"Bestand kiezen","schematicsDeleteIcon":"Het pictogram verwijderen","schematicsIconAdded":"Het pictogram \"%{file}\" is toegevoegd.","schematicsIconRemove":"Het pictogram is verwijderd.","schematicsIconDropFiles":"Zet bestanden hier neer","schematicsIconOr":"of","schematicsIconFileTypes":"Alleen .jpg, .png en .svg-bestanden.","schematicsIconFileSize":"%{size} MB max bestandsgrootte."},"__pl":{"errorCreatingPalette":"Wystąpił błąd podczas zapisywania palety.","paletteErrorTitle":"Błąd palety","changePaletteLabel":"Zmień paletę kolorów","myPaletteLabel":"Niestandardowa","systemPaletteLabel":"System","publicPaletteLabel":"Globalne","localPaletteLabel":"Lokalne","mruPaletteLabel":"Ostatnio używane","okDialog":"OK","deleteDialogTitle":"Usuń","applyDialog":"Zastosuj","cancelDialog":"Anuluj","saveDialog":"Zapisz","deleteMessage":"Czy na pewno chcesz usunąć paletę \"%{name}\"?","deleteToast":"Usunięto \"%{name}\"","favoritesLabel":"Ulubione","setAsFavorite":"Ustaw jako ulubione","createdToastMessage":"Pomyślnie utworzono \"%{name}\".","createPalette":"Utwórz paletę niestandardową","colorPicker":"Selektor kolorów","errorNoName":"Wprowadź nazwę palety","errorInsufficientColors":"Wybierz co najmniej dwa kolory","paletteAppliedToastMessage":"Paleta o nazwie \"%{name}\" została zastosowana w raporcie.","createContinuousPalette":"Utwórz ciągłą paletę kolorów","createStandardPalette":"Utwórz kategorialną paletę kolorów","paletteNamePlaceholder":"Tutaj wpisz nazwę palety","paletteName":"Nazwa palety","standardPalette":"Paleta kategorialna","continuousPalette":"Paleta ciągła","removeSwatch":"Usuń próbkę","addSwatch":"Dodaj próbkę","reversePalette":"Odwróć paletę","colorGuide":"Przewodnik po kolorach","modeAutomatic":"Automatycznie","modeCustom":"Niestandardowa","colorModel":"Model kolorów","modelRGB":"RGB","modelHSB":"HSB","modelCMYK":"CMYK","grid":"Siatka","wheel":"Koło","hexCode":"Kod szesnastkowy","colorRed":"Czerwony","colorGreen":"Zielony","colorBlue":"Niebieski","colorHue":"Barwa","colorSaturation":"Nasycenie","colorBrightness":"Jasność","colorCyan":"Niebieskozielony","colorMagenta":"Amarantowy","colorYellow":"Żółty","colorBlack":"Czarny","codeRed":"R","codeGreen":"G","codeBlue":"B","codeHue":"H","codeSaturation":"S","codeBrightness":"B","codeCyan":"C","codeMagenta":"M","codeYellow":"Y","codeBlack":"K","close":"Zamknij","editSchematic":"Edytuj pakiet","searchSchematic":"Szukaj","nameLabelSchematic":"Nazwa","captionLabelSchematic":"Podpis","keyLabelSchematic":"Klucz","addSchematic":"Wyślij plik","schematicsInvalidSvg":"Niepoprawny lub nieobsługiwany plik SVG","schematicsInvalidSvgData":"Nie można uzyskać danych pliku","schematicsInvalidType":"Nieobsługiwany typ pliku: %{type}","schematicsInvalidSize":"Rozmiar %{size} pliku %{file} przekracza limit.","schematicsContextMenuReplace":"Zastąp","schematicsContextMenuDelete":"Usuń","schematicsEmptySearchResults":"Wyniki wyszukiwania są puste","schematicsNoSelection":"Nie wybrano żadnego elementu","schematicsMultipleSelection":"Wybrano elementów: %{count}","schematicsSingleDeletionSuccessed":"Schemat został pomyślnie usunięty.","schematicsMultipleDeletionSuccessed":"Pomyślnie usunięto następującą liczbę schematów: %{count}","schematicsSingleAddSuccessed":"Schemat został pomyślnie dodany.","schematicsMultipleAddSuccessed":"Pomyślnie dodano następującą liczbę schematów: %{count}","schematicsAddFailed":"Nie powiodło się dodanie schematu.","schematicsReplaceDlgTitle":"Potwierdź zastąpienie istniejącego pliku","schematicsReplaceDlgContent":"Plik '%{sourceName}' już istnieje. Czy zastąpić go nowym plikiem?","schematicsReplaceDlgApplyToAllFiles":"Zastosuj do wszystkich plików","schematicsPackageTab":"Pakiet","schematicsContentTab":"Treść","schematicsDescriptionLabel":"Opis","schematicsIconLabel":"Ikona","schematicsChooseFile":"Wybierz plik","schematicsDeleteIcon":"Usuń ikonę","schematicsIconAdded":"Ikona \"%{file}\" została pomyślnie dodana.","schematicsIconRemove":"Ikona została pomyślnie usunięta.","schematicsIconDropFiles":"Upuść pliki tutaj","schematicsIconOr":"lub","schematicsIconFileTypes":"Tylko pliki .jpg, .png i .svg.","schematicsIconFileSize":"Maks. wielkość pliku: %{size}MB."},"__pt":{"errorCreatingPalette":"Ocorreu um erro ao salvar a paleta.","paletteErrorTitle":"Erro da Paleta","changePaletteLabel":"Alterar paleta de cores","myPaletteLabel":"Personalização","systemPaletteLabel":"Sistema","publicPaletteLabel":"Global","localPaletteLabel":"Local","mruPaletteLabel":"Recentemente usado","okDialog":"OK","deleteDialogTitle":"Excluir","applyDialog":"Aplicar","cancelDialog":"Cancelar","saveDialog":"Salvar","deleteMessage":"Tem certeza de que deseja excluir a paleta \"%{name}\"?","deleteToast":"\"%{name}\" foi excluído","favoritesLabel":"Destaques","setAsFavorite":"Configurar como favorito","createdToastMessage":"\"%{name}\" foi criado com êxito.","createPalette":"Criar uma Paleta Customizada","colorPicker":"Selecionador de Cores","errorNoName":"Digite um nome para a paleta","errorInsufficientColors":"Escolha pelo menos duas cores","paletteAppliedToastMessage":"A paleta \"%{name}\" foi aplicada no relatório.","createContinuousPalette":"Criar paleta de cores contínuas","createStandardPalette":"Criar paleta de cores categóricas","paletteNamePlaceholder":"Digite o nome da paleta aqui","paletteName":"Nome da paleta","standardPalette":"Paleta categórica","continuousPalette":"Paleta Contínua","removeSwatch":"Remover swatch","addSwatch":"Incluir swatch","reversePalette":"Reverter Paleta","colorGuide":"Guia de Cores","modeAutomatic":"Automática","modeCustom":"Personalização","colorModel":"Modelo de Cor","modelRGB":"RGB","modelHSB":"HSB","modelCMYK":"CMYK","grid":"Grade","wheel":"Roda","hexCode":"Código Hex","colorRed":"Vermelho","colorGreen":"Verde","colorBlue":"Azul","colorHue":"Hue","colorSaturation":"Saturação","colorBrightness":"Brilho","colorCyan":"Ciano","colorMagenta":"Magenta","colorYellow":"Amarelo","colorBlack":"Preto","codeRed":"L","codeGreen":"G","codeBlue":"B","codeHue":"H","codeSaturation":"S","codeBrightness":"B","codeCyan":"C","codeMagenta":"M","codeYellow":"E","codeBlack":"K","close":"Fechar","editSchematic":"Editar pacote","searchSchematic":"Procurar","nameLabelSchematic":"Nome","captionLabelSchematic":"Texto Explicativo","keyLabelSchematic":"Chave","addSchematic":"Fazer upload do arquivo","schematicsInvalidSvg":"SVG inválido ou não suportado","schematicsInvalidSvgData":"Não foi possível obter os dados do arquivo","schematicsInvalidType":"Tipo de arquivo não suportado: %{type}","schematicsInvalidSize":"O arquivo %{file}, tamanho %{size}, excede o limite.","schematicsContextMenuReplace":"Substituir","schematicsContextMenuDelete":"Excluir","schematicsEmptySearchResults":"Os resultados da procura estão vazios","schematicsNoSelection":"Nenhum Item Selecionado","schematicsMultipleSelection":"%{count} itens selecionados","schematicsSingleDeletionSuccessed":"Seu esquema foi excluído com sucesso.","schematicsMultipleDeletionSuccessed":"%{count} esquemas foram excluídos com sucesso.","schematicsSingleAddSuccessed":"Seu esquema foi incluído com sucesso.","schematicsMultipleAddSuccessed":"%{count} esquemas foram incluídos com sucesso.","schematicsAddFailed":"Falha ao incluir seu esquema.","schematicsReplaceDlgTitle":"Confirmar substituição do arquivo existente","schematicsReplaceDlgContent":"O arquivo '%{sourceName}' já existe. Deseja substituí-lo pelo novo arquivo?","schematicsReplaceDlgApplyToAllFiles":"Aplicar a todos os arquivos","schematicsPackageTab":"Pacote","schematicsContentTab":"Conteúdo","schematicsDescriptionLabel":"Descrição","schematicsIconLabel":"Ícone","schematicsChooseFile":"Escolher um Arquivo","schematicsDeleteIcon":"Remover o ícone","schematicsIconAdded":"O ícone \"%{file}\" foi incluído com sucesso.","schematicsIconRemove":"O ícone foi removido com sucesso.","schematicsIconDropFiles":"Soltar arquivos aqui","schematicsIconOr":"ou","schematicsIconFileTypes":"Somente arquivos .jpg, .png, and .svg.","schematicsIconFileSize":"Tamanho máximo do arquivo: %{size}MB."},"__pt-br":{"errorCreatingPalette":"Ocorreu um erro ao salvar a paleta.","paletteErrorTitle":"Erro da Paleta","changePaletteLabel":"Alterar paleta de cores","myPaletteLabel":"Personalização","systemPaletteLabel":"Sistema","publicPaletteLabel":"Global","localPaletteLabel":"Local","mruPaletteLabel":"Recentemente usado","okDialog":"OK","deleteDialogTitle":"Excluir","applyDialog":"Aplicar","cancelDialog":"Cancelar","saveDialog":"Salvar","deleteMessage":"Tem certeza de que deseja excluir a paleta \"%{name}\"?","deleteToast":"\"%{name}\" foi excluído","favoritesLabel":"Destaques","setAsFavorite":"Configurar como favorito","createdToastMessage":"\"%{name}\" foi criado com êxito.","createPalette":"Criar uma Paleta Customizada","colorPicker":"Selecionador de Cores","errorNoName":"Digite um nome para a paleta","errorInsufficientColors":"Escolha pelo menos duas cores","paletteAppliedToastMessage":"A paleta \"%{name}\" foi aplicada no relatório.","createContinuousPalette":"Criar paleta de cores contínuas","createStandardPalette":"Criar paleta de cores categóricas","paletteNamePlaceholder":"Digite o nome da paleta aqui","paletteName":"Nome da paleta","standardPalette":"Paleta categórica","continuousPalette":"Paleta Contínua","removeSwatch":"Remover swatch","addSwatch":"Incluir swatch","reversePalette":"Reverter Paleta","colorGuide":"Guia de Cores","modeAutomatic":"Automática","modeCustom":"Personalização","colorModel":"Modelo de Cor","modelRGB":"RGB","modelHSB":"HSB","modelCMYK":"CMYK","grid":"Grade","wheel":"Roda","hexCode":"Código Hex","colorRed":"Vermelho","colorGreen":"Verde","colorBlue":"Azul","colorHue":"Hue","colorSaturation":"Saturação","colorBrightness":"Brilho","colorCyan":"Ciano","colorMagenta":"Magenta","colorYellow":"Amarelo","colorBlack":"Preto","codeRed":"L","codeGreen":"G","codeBlue":"B","codeHue":"H","codeSaturation":"S","codeBrightness":"B","codeCyan":"C","codeMagenta":"M","codeYellow":"E","codeBlack":"K","close":"Fechar","editSchematic":"Editar pacote","searchSchematic":"Procurar","nameLabelSchematic":"Nome","captionLabelSchematic":"Texto Explicativo","keyLabelSchematic":"Chave","addSchematic":"Fazer upload do arquivo","schematicsInvalidSvg":"SVG inválido ou não suportado","schematicsInvalidSvgData":"Não foi possível obter os dados do arquivo","schematicsInvalidType":"Tipo de arquivo não suportado: %{type}","schematicsInvalidSize":"O arquivo %{file}, tamanho %{size}, excede o limite.","schematicsContextMenuReplace":"Substituir","schematicsContextMenuDelete":"Excluir","schematicsEmptySearchResults":"Os resultados da procura estão vazios","schematicsNoSelection":"Nenhum Item Selecionado","schematicsMultipleSelection":"%{count} itens selecionados","schematicsSingleDeletionSuccessed":"Seu esquema foi excluído com sucesso.","schematicsMultipleDeletionSuccessed":"%{count} esquemas foram excluídos com sucesso.","schematicsSingleAddSuccessed":"Seu esquema foi incluído com sucesso.","schematicsMultipleAddSuccessed":"%{count} esquemas foram incluídos com sucesso.","schematicsAddFailed":"Falha ao incluir seu esquema.","schematicsReplaceDlgTitle":"Confirmar substituição do arquivo existente","schematicsReplaceDlgContent":"O arquivo '%{sourceName}' já existe. Deseja substituí-lo pelo novo arquivo?","schematicsReplaceDlgApplyToAllFiles":"Aplicar a todos os arquivos","schematicsPackageTab":"Pacote","schematicsContentTab":"Conteúdo","schematicsDescriptionLabel":"Descrição","schematicsIconLabel":"Ícone","schematicsChooseFile":"Escolher um Arquivo","schematicsDeleteIcon":"Remover o ícone","schematicsIconAdded":"O ícone \"%{file}\" foi incluído com sucesso.","schematicsIconRemove":"O ícone foi removido com sucesso.","schematicsIconDropFiles":"Soltar arquivos aqui","schematicsIconOr":"ou","schematicsIconFileTypes":"Somente arquivos .jpg, .png, and .svg.","schematicsIconFileSize":"Tamanho máximo do arquivo: %{size}MB."},"__ro":{"errorCreatingPalette":"A apărut o eroare la salvarea paletei.","paletteErrorTitle":"Eroare paletă","changePaletteLabel":"Modificare paletă de culori","myPaletteLabel":"Personalizat","systemPaletteLabel":"Sistem","publicPaletteLabel":"Globală","localPaletteLabel":"Locală","mruPaletteLabel":"Utilizată recent","okDialog":"OK","deleteDialogTitle":"Ştergere","applyDialog":"Aplicare","cancelDialog":"Renunţare","saveDialog":"Salvare","deleteMessage":"Sunteţi sigur că vreţi să ştergeţi paleta \"%{name}\"?","deleteToast":"\"%{name}\" a fost ştearsă","favoritesLabel":"Favorite","setAsFavorite":"Setare ca favorit","createdToastMessage":"\"%{name}\" a fost creat cu succes.","createPalette":"Creare paletă personalizată","colorPicker":"Selector de culoare","errorNoName":"Introduceţi un nume paleta dumneavoastră","errorInsufficientColors":"Alegeţi cel puţin două culori","paletteAppliedToastMessage":"Paleta \"%{name}\", a fost aplicată la raport.","createContinuousPalette":"Creare paletă de culoare continuă","createStandardPalette":"Creare paletă de culoare categorială","paletteNamePlaceholder":"Tastaţi numele de paletă aici","paletteName":"Nume paletă","standardPalette":"Paletă categorială","continuousPalette":"Paletă continuă","removeSwatch":"Înlăturare mostră","addSwatch":"Adăugare mostră","reversePalette":"Paletă inversă","colorGuide":"Ghid de culoare","modeAutomatic":"Automat","modeCustom":"Personalizată","colorModel":"Model de culoare","modelRGB":"RGB","modelHSB":"HSB","modelCMYK":"CMYK","grid":"Grilă","wheel":"Roată","hexCode":"Cod hex","colorRed":"Roşu","colorGreen":"Verde","colorBlue":"Albastru","colorHue":"Nuanţă","colorSaturation":"Saturaţie","colorBrightness":"Luminozitate","colorCyan":"Cyan","colorMagenta":"Magenta","colorYellow":"Galben","colorBlack":"Negru","codeRed":"R","codeGreen":"G","codeBlue":"B","codeHue":"H","codeSaturation":"S","codeBrightness":"B","codeCyan":"C","codeMagenta":"L","codeYellow":"Y","codeBlack":"K","close":"Închidere","editSchematic":"Editare pachet","searchSchematic":"Căutare","nameLabelSchematic":"Nume","captionLabelSchematic":"Subtitlu","keyLabelSchematic":"Cheie","addSchematic":"Încărcare fişier","schematicsInvalidSvg":"SVG invalid sau nesuportat","schematicsInvalidSvgData":"Nu s-au putut obţine datele fişierului","schematicsInvalidType":"Tip de fişier nesuportat: %{type}","schematicsInvalidSize":"Fişierul %{file}, dimensiunea %{size} depăşeşte limita.","schematicsContextMenuReplace":"Înlocuire","schematicsContextMenuDelete":"Ştergere","schematicsEmptySearchResults":"Rezultatele căutării sunt goale","schematicsNoSelection":"Niciun articol selectat","schematicsMultipleSelection":"%{count} articole selectate","schematicsSingleDeletionSuccessed":"Schematicul a fost şters cu succes.","schematicsMultipleDeletionSuccessed":"%{count} schematice au fost şterse cu succes.","schematicsSingleAddSuccessed":"Schematicul a fost adăugat cu succes.","schematicsMultipleAddSuccessed":"%{count} schematice au fost adăugate cu succes.","schematicsAddFailed":"A eşuat adăugarea schematicului.","schematicsReplaceDlgTitle":"Confirmare înlocuire fişier existent","schematicsReplaceDlgContent":"Fişierul '%{sourceName}' există deja. Doriţi să-l înlocuiţi cu noul fişier?","schematicsReplaceDlgApplyToAllFiles":"Aplicare pentru toate fişierele","schematicsPackageTab":"Pachet","schematicsContentTab":"Conţinut","schematicsDescriptionLabel":"Descriere","schematicsIconLabel":"Pictogramă","schematicsChooseFile":"Alegeţi un fişier","schematicsDeleteIcon":"Înlăturaţi pictograma","schematicsIconAdded":"Pictograma \"%{file}\" a fost adăugată cu succes.","schematicsIconRemove":"Pictograma a fost înlăturată cu succes.","schematicsIconDropFiles":"Plasaţi fişiere aici","schematicsIconOr":"sau","schematicsIconFileTypes":"Doar fişiere .jpg, .png, and .svg.","schematicsIconFileSize":"Dim. max. fişier %{size} MB."},"__ru":{"errorCreatingPalette":"При сохранении палитры произошла ошибка.","paletteErrorTitle":"Ошибка палитры","changePaletteLabel":"Изменить цветовую палитру","myPaletteLabel":"Настроить","systemPaletteLabel":"Система","publicPaletteLabel":"Глобальные","localPaletteLabel":"Локальный","mruPaletteLabel":"Недавно использованные","okDialog":"ОК","deleteDialogTitle":"Удалить","applyDialog":"Применить","cancelDialog":"Отмена","saveDialog":"Сохранить","deleteMessage":"Вы уверены, что хотите удалить палитру \"%{name}\"?","deleteToast":"\"%{name}\" удалено","favoritesLabel":"Избранное","setAsFavorite":"Задать как избранное","createdToastMessage":"\"%{name}\" успешно создано.","createPalette":"Создать пользовательскую палитру","colorPicker":"Выбор цвета","errorNoName":"Введите имя для своей палитры","errorInsufficientColors":"Выберите хотя бы два цвета","paletteAppliedToastMessage":"Палитра \"%{name}\" применена к отчету.","createContinuousPalette":"Создать непрерывную цветовую палитру","createStandardPalette":"Создать категориальную цветовую палитру","paletteNamePlaceholder":"Введите здесь имя палитры","paletteName":"Имя палитры","standardPalette":"Категориальная палитра","continuousPalette":"Непрерывная палитра","removeSwatch":"Удалить палитру","addSwatch":"Добавить палитру","reversePalette":"Обратить палитру","colorGuide":"Руководство по цветам","modeAutomatic":"Автоматически","modeCustom":"Настроить","colorModel":"Цветовая модель","modelRGB":"RGB","modelHSB":"HSB","modelCMYK":"CMYK","grid":"Таблица","wheel":"Часовая стрелка","hexCode":"Шестнадцатеричный код","colorRed":"Красный","colorGreen":"Зеленый","colorBlue":"Синий","colorHue":"Оттенок","colorSaturation":"Насыщенность","colorBrightness":"Яркость","colorCyan":"Cyan","colorMagenta":"Magenta","colorYellow":"Желтый","colorBlack":"Черный","codeRed":"R","codeGreen":"G","codeBlue":"B","codeHue":"H","codeSaturation":"S","codeBrightness":"B","codeCyan":"C","codeMagenta":"M","codeYellow":"Y","codeBlack":"K","close":"Закрыть","editSchematic":"Изменить пакет","searchSchematic":"Поиск","nameLabelSchematic":"Имя","captionLabelSchematic":"Заголовок","keyLabelSchematic":"Ключ","addSchematic":"Выгрузить файл","schematicsInvalidSvg":"Недопустимый или неподдерживаемый SVG","schematicsInvalidSvgData":"Не удалось получить данные файла","schematicsInvalidType":"Неподдерживаемый тип файла: %{type}","schematicsInvalidSize":"Файл %{file}, размер %{size} превышает предел.","schematicsContextMenuReplace":"Заменить","schematicsContextMenuDelete":"Удалить","schematicsEmptySearchResults":"Результаты поиска - пустые","schematicsNoSelection":"Элементы не выбраны","schematicsMultipleSelection":"%{count} элементов выбрано","schematicsSingleDeletionSuccessed":"Ваше схематическое представление успешно удалено.","schematicsMultipleDeletionSuccessed":"%{count} схематических представлений успешно удалены.","schematicsSingleAddSuccessed":"Ваше схематическое представление успешно добавлено.","schematicsMultipleAddSuccessed":"%{count} схематических представлений успешно добавлены.","schematicsAddFailed":"Не удалось добавить ваше схематическое представление.","schematicsReplaceDlgTitle":"Подтвердить замену существующего файла","schematicsReplaceDlgContent":"Файл '%{sourceName}' уже существует. Хотите заменить его новым файлом?","schematicsReplaceDlgApplyToAllFiles":"Применить ко всем файлам","schematicsPackageTab":"Пакет","schematicsContentTab":"Содержимое","schematicsDescriptionLabel":"Описание","schematicsIconLabel":"Значок","schematicsChooseFile":"Выберите файл","schematicsDeleteIcon":"Удалить значок","schematicsIconAdded":"Значок \"%{file}\" успешно добавлен.","schematicsIconRemove":"Значок успешно удален.","schematicsIconDropFiles":"Перетащить сюда файлы","schematicsIconOr":"или","schematicsIconFileTypes":"Только файлы .jpg, .png и .svg.","schematicsIconFileSize":"Максимальный размер файла %{size} МБ."},"__sl":{"errorCreatingPalette":"Med shranjevanjem palete je prišlo do napake.","paletteErrorTitle":"Napaka palete","changePaletteLabel":"Spremeni barvno paleto","myPaletteLabel":"Po meri","systemPaletteLabel":"Sistem","publicPaletteLabel":"Globalno","localPaletteLabel":"Lokalno","mruPaletteLabel":"Nedavno uporabljeno","okDialog":"V redu","deleteDialogTitle":"Izbriši","applyDialog":"Uveljavi","cancelDialog":"Prekliči","saveDialog":"Shrani","deleteMessage":"Ali ste prepričani, da želite izbrisati paleto \"%{name}\"?","deleteToast":"\"%{name}\" je bil izbrisan","favoritesLabel":"Priljubljene","setAsFavorite":"Nastavi kot priljubljeno","createdToastMessage":"\"%{name}\" je bil uspešno ustvarjen.","createPalette":"Ustvari paleto po meri","colorPicker":"Izbirnik barv","errorNoName":"Vnesite ime svoje palete","errorInsufficientColors":"Izberite vsaj dve barvi","paletteAppliedToastMessage":"Paleta \"%{name}\" je bila uveljavljena za poročilo.","createContinuousPalette":"Ustvari neprekinjeno barvno paleto","createStandardPalette":"Ustvari kategorično barvno paleto","paletteNamePlaceholder":"Na to mesto vpišite ime palete","paletteName":"Ime palete","standardPalette":"Kategorična paleta","continuousPalette":"Neprekinjena paleta","removeSwatch":"Odstrani paleto","addSwatch":"Dodaj paleto","reversePalette":"Obrni paleto","colorGuide":"Vodič za barve","modeAutomatic":"Samodejno","modeCustom":"Po meri","colorModel":"Barvni model","modelRGB":"RGB","modelHSB":"HSB","modelCMYK":"CMYK","grid":"Mreža","wheel":"Kolo","hexCode":"Šestnajstiška koda","colorRed":"Rdeča","colorGreen":"Zelena","colorBlue":"Modra","colorHue":"Odtenek","colorSaturation":"Nasičenost","colorBrightness":"Svetlost","colorCyan":"Cian","colorMagenta":"Magenta","colorYellow":"Rumena","colorBlack":"Črna","codeRed":"R","codeGreen":"G","codeBlue":"B","codeHue":"H","codeSaturation":"S","codeBrightness":"B","codeCyan":"C","codeMagenta":"M","codeYellow":"Y","codeBlack":"K","close":"Zapri","editSchematic":"Urejanje paketa","searchSchematic":"Iskanje","nameLabelSchematic":"Ime","captionLabelSchematic":"Napis","keyLabelSchematic":"Ključ","addSchematic":"Naloži datoteko","schematicsInvalidSvg":"Neveljavna ali nepodprta datoteka SVG","schematicsInvalidSvgData":"Podatkov datoteke ni bilo mogoče pridobiti","schematicsInvalidType":"Nepodprta vrsta datoteke: %{type}","schematicsInvalidSize":"Datoteka %{file}, velikost %{size} presega omejitev.","schematicsContextMenuReplace":"Zamenjaj","schematicsContextMenuDelete":"Izbriši","schematicsEmptySearchResults":"Rezultati iskanja so prazni","schematicsNoSelection":"Noben element ni izbran","schematicsMultipleSelection":"%{count} elementov je izbranih","schematicsSingleDeletionSuccessed":"Vaša shema je bila uspešno izbrisana.","schematicsMultipleDeletionSuccessed":"%{count} shem je bilo uspešno izbrisanih.","schematicsSingleAddSuccessed":"Vaša shema je bila uspešno dodana.","schematicsMultipleAddSuccessed":"%{count} shem je bilo uspešno dodanih.","schematicsAddFailed":"Dodajanje sheme ni bilo uspešno.","schematicsReplaceDlgTitle":"Potrdi zamenjavo obstoječe datoteke","schematicsReplaceDlgContent":"Datoteka '%{sourceName}' že obstaja. Ali jo želite zamenjati z novo datoteko?","schematicsReplaceDlgApplyToAllFiles":"Uveljavi za vse datoteke","schematicsPackageTab":"Paket","schematicsContentTab":"Vsebina","schematicsDescriptionLabel":"Opis","schematicsIconLabel":"Ikona","schematicsChooseFile":"Izberi datoteko","schematicsDeleteIcon":"Odstrani ikono","schematicsIconAdded":"Ikona \"%{file}\" je bila uspešno dodana.","schematicsIconRemove":"Ikona je bila uspešno odstranjena.","schematicsIconDropFiles":"Spusti datoteke sem","schematicsIconOr":"ali","schematicsIconFileTypes":"Samo datoteke .jpg, .png in .svg.","schematicsIconFileSize":"Največja velikost datoteke je %{size} MB."},"__sv":{"errorCreatingPalette":"Ett fel uppstod när paletten skulle sparas.","paletteErrorTitle":"Palettfel","changePaletteLabel":"Ändra färgpalett","myPaletteLabel":"Anpassad","systemPaletteLabel":"System","publicPaletteLabel":"Global","localPaletteLabel":"Lokal","mruPaletteLabel":"Senast använda","okDialog":"OK","deleteDialogTitle":"Ta bort","applyDialog":"Tillämpa","cancelDialog":"Avbryt","saveDialog":"Spara","deleteMessage":"Vill du ta bort paletten %{name}?","deleteToast":"%{name} togs bort","favoritesLabel":"Favoriter","setAsFavorite":"Ange som favorit","createdToastMessage":"%{name} har skapats.","createPalette":"Skapa en anpassad palett","colorPicker":"Färgväljare","errorNoName":"Ange ett namn för paletten","errorInsufficientColors":"Välj minst två färger","paletteAppliedToastMessage":"Paletten %{name} tillämpades på rapporten.","createContinuousPalette":"Skapa kontinuerlig färgpalett","createStandardPalette":"Skapa kategorisk färgpalett","paletteNamePlaceholder":"Skriv palettnamn här","paletteName":"Palettnamn","standardPalette":"Kategorisk palett","continuousPalette":"Kontinuerlig palett","removeSwatch":"Ta bort färgrutor","addSwatch":"Lägg till färgrutor","reversePalette":"Omvänd palett","colorGuide":"Färgguide","modeAutomatic":"Automatisk","modeCustom":"Anpassad","colorModel":"Färgmodell","modelRGB":"RGB","modelHSB":"HSB","modelCMYK":"CMYK","grid":"Rutnät","wheel":"Hjul","hexCode":"Hexkod","colorRed":"Röd","colorGreen":"Grön","colorBlue":"Blå","colorHue":"Nyans","colorSaturation":"Mättnad","colorBrightness":"Ljusstyrka","colorCyan":"Cyan","colorMagenta":"Magenta","colorYellow":"Gul","colorBlack":"Svart","codeRed":"R","codeGreen":"G","codeBlue":"B","codeHue":"N","codeSaturation":"M","codeBrightness":"L","codeCyan":"C","codeMagenta":"M","codeYellow":"G","codeBlack":"S","close":"Stäng","editSchematic":"Redigera paket","searchSchematic":"Sök","nameLabelSchematic":"Namn","captionLabelSchematic":"Objekttext","keyLabelSchematic":"Nyckel","addSchematic":"Överför fil","schematicsInvalidSvg":"Ogiltig eller ohanterad SVG","schematicsInvalidSvgData":"Det gick inte att hämta fildata","schematicsInvalidType":"Otillåten filtyp: %{type}","schematicsInvalidSize":"Filen %{file}, storlek %{size} överskrider gränsen.","schematicsContextMenuReplace":"Ersätt","schematicsContextMenuDelete":"Ta bort","schematicsEmptySearchResults":"Sökresultatet är tomt","schematicsNoSelection":"Inga objekt har valts","schematicsMultipleSelection":"%{count} objekt har valts","schematicsSingleDeletionSuccessed":"Din schematik togs bort.","schematicsMultipleDeletionSuccessed":"%{count} schematiker togs bort.","schematicsSingleAddSuccessed":"Din schematik lades till.","schematicsMultipleAddSuccessed":"%{count} schematiker lades till.","schematicsAddFailed":"Det gick inte att lägga till din schematik","schematicsReplaceDlgTitle":"Bekräfta ersättning av befintlig fil","schematicsReplaceDlgContent":"Filen '%{sourceName}' finns redan. Vill du ersätta den med den nya filen?","schematicsReplaceDlgApplyToAllFiles":"Tillämpa på alla filer","schematicsPackageTab":"Paket","schematicsContentTab":"Innehåll","schematicsDescriptionLabel":"Beskrivning","schematicsIconLabel":"Ikon","schematicsChooseFile":"Välj en fil","schematicsDeleteIcon":"Ta bort ikonen","schematicsIconAdded":"Ikonen \"%{file}\" lades till.","schematicsIconRemove":"Ikonen togs bort.","schematicsIconDropFiles":"Dra filer hit","schematicsIconOr":"eller","schematicsIconFileTypes":"Endast .jpg-, .png- och .svg-filer.","schematicsIconFileSize":"%{size} MB max filstorlek."},"__th":{"errorCreatingPalette":"เกิดข้อผิดพลาดขณะบันทึกพาเล็ต","paletteErrorTitle":"ข้อผิดพลาดพาเล็ต","changePaletteLabel":"เปลี่ยนพาเล็ตสี","myPaletteLabel":"กำหนดเอง","systemPaletteLabel":"ระบบ","publicPaletteLabel":"โกลบอล","localPaletteLabel":"โลคัล","mruPaletteLabel":"ใช้ล่าสุด","okDialog":"ตกลง","deleteDialogTitle":"ลบ","applyDialog":"ใช้","cancelDialog":"ยกเลิก","saveDialog":"บันทึก","deleteMessage":"คุณแน่ใจหรือว่าต้องการลบพาเล็ต \"%{name}\"?","deleteToast":"ลบ \"%{name}\" ออกแล้ว","favoritesLabel":"รายการโปรด","setAsFavorite":"ตั้งค่าเป็นรายการโปรด","createdToastMessage":"สร้าง \"%{name}\" เรียบร้อยแล้ว","createPalette":"สร้างพาเล็ตแบบกำหนดเอง","colorPicker":"ตัวเลือกสี","errorNoName":"ป้อนชื่อสำหรับพาเล็ตของคุณ","errorInsufficientColors":"เลือกสีสองสีขึ้นไป","paletteAppliedToastMessage":"พาเล็ต \"%{name}\" ถูกนำไปใช้กับรายงาน","createContinuousPalette":"สร้างพาเล็ตสีที่ต่อเนื่องกัน","createStandardPalette":"สร้างพาเล็ตสีแบบเป็นหมวดหมู่","paletteNamePlaceholder":"พิมพ์ชื่อพาเล็ตที่นี่","paletteName":"ชื่อพาเล็ต","standardPalette":"พาเล็ตแบบเป็นหมวดหมู่","continuousPalette":"พาเล็ตแบบต่อเนื่องกัน","removeSwatch":"ลบ swatch","addSwatch":"เพิ่ม swatch","reversePalette":"กลับพาเล็ต","colorGuide":"ตารางสี","modeAutomatic":"อัตโนมัติ","modeCustom":"กำหนดเอง","colorModel":"โมเดลสี","modelRGB":"RGB","modelHSB":"HSB","modelCMYK":"CMYK","grid":"กริด","wheel":"วงล้อ","hexCode":"รหัสเลขฐานสิบหก","colorRed":"สีแดง","colorGreen":"สีเขียว","colorBlue":"สีน้ำเงิน","colorHue":"สี","colorSaturation":"ความสดของสี","colorBrightness":"ความสว่าง","colorCyan":"สีฟ้า","colorMagenta":"สีม่วงแดง","colorYellow":"สีเหลือง","colorBlack":"สีดำ","codeRed":"R","codeGreen":"G","codeBlue":"B","codeHue":"H","codeSaturation":"S","codeBrightness":"B","codeCyan":"C","codeMagenta":"M","codeYellow":"Y","codeBlack":"K","close":"ปิด","editSchematic":"แก้ไขแพ็กเกจ","searchSchematic":"ค้นหา","nameLabelSchematic":"ชื่อ","captionLabelSchematic":"คำบรรยาย","keyLabelSchematic":"คีย์","addSchematic":"อัพโหลดไฟล์","schematicsInvalidSvg":"SVG ไม่ถูกต้องหรือไม่สนับสนุน","schematicsInvalidSvgData":"ไม่สามารถขอรับข้อมูลไฟล์","schematicsInvalidType":"ชนิดไฟล์ที่ไม่สนับสนุน: %{type}","schematicsInvalidSize":"ไฟล์ %{file} ขนาด %{size} เกินขนาดที่จำกัดไว้","schematicsContextMenuReplace":"แทนที่","schematicsContextMenuDelete":"ลบ","schematicsEmptySearchResults":"ผลลัพธ์การค้นหาว่างเปล่า","schematicsNoSelection":"ไม่มีไอเท็มที่เลือกไว้","schematicsMultipleSelection":"%{count} ไอเท็มที่เลือกไว้","schematicsSingleDeletionSuccessed":"แบบแผนของคุณถูกลบทิ้งเป็นผลสำเร็จแล้ว","schematicsMultipleDeletionSuccessed":"%{count} แบบแผนถูกลบทิ้งเป็นผลสำเร็จแล้ว","schematicsSingleAddSuccessed":"แบบแผนของคุณถูกเพิ่มเป็นผลสำเร็จแล้ว","schematicsMultipleAddSuccessed":"%{count} แบบแผนถูกเพิ่มเป็นผลสำเร็จแล้ว","schematicsAddFailed":"ล้มเหลวในการเพิ่มแบบแผนของคุณ","schematicsReplaceDlgTitle":"ยืนยันการแทนที่ไฟล์ที่มีอยู่","schematicsReplaceDlgContent":"ไฟล์ '%{sourceName}' มีอยู่ก่อนแล้ว คุณต้องการแทนที่ด้วยไฟล์ใหม่หรือไม่?","schematicsReplaceDlgApplyToAllFiles":"ใช้กับไฟล์ทั้งหมด","schematicsPackageTab":"แพ็กเกจ","schematicsContentTab":"เนื้อหา","schematicsDescriptionLabel":"คำอธิบาย","schematicsIconLabel":"ไอคอน","schematicsChooseFile":"เลือกไฟล์","schematicsDeleteIcon":"ลบไอคอนออก","schematicsIconAdded":"ไอคอน \"%{file}\" ถูกเพิ่มเป็นผลสำเร็จแล้ว","schematicsIconRemove":"ไอคอนถูกลบออกเป็นผลสำเร็จแล้ว","schematicsIconDropFiles":"ดร็อปไฟล์ที่นี่","schematicsIconOr":"หรือ","schematicsIconFileTypes":"เฉพาะไฟล์ .jpg, .png, และ .svg","schematicsIconFileSize":"ขนาดไฟล์สูงสุด %{size}MB"},"__tr":{"errorCreatingPalette":"Palet kaydedilirken bir hata oluştu.","paletteErrorTitle":"Palet Hatası","changePaletteLabel":"Renk paletini değiştir","myPaletteLabel":"Özel","systemPaletteLabel":"Sistem","publicPaletteLabel":"Genel","localPaletteLabel":"Yerel","mruPaletteLabel":"Son kullanılan","okDialog":"Tamam","deleteDialogTitle":"Sil","applyDialog":"Uygula","cancelDialog":"İptal","saveDialog":"Kaydet","deleteMessage":"\"%{name}\" paletini silmek istediğinizden emin misiniz?","deleteToast":"\"%{name}\" silindi","favoritesLabel":"Sık Kullanılanlar","setAsFavorite":"Sık kullanılan olarak ayarla","createdToastMessage":"\"%{name}\" başarıyla oluşturuldu.","createPalette":"Özel palet oluştur","colorPicker":"Renk seçici","errorNoName":"Paletiniz için bir ad girin","errorInsufficientColors":"En az iki renk seçin","paletteAppliedToastMessage":"\"%{name}\" paleti, rapora uygulandı.","createContinuousPalette":"Sürekli renk paleti oluştur","createStandardPalette":"Kategorik renk paleti oluştur","paletteNamePlaceholder":"Buraya palet adını yazın","paletteName":"Palet adı","standardPalette":"Kategorik palet","continuousPalette":"Sürekli palet","removeSwatch":"Renk örneğini kaldır","addSwatch":"Renk örneği ekle","reversePalette":"Renk örneğini ters çevir","colorGuide":"Renk kılavuzu","modeAutomatic":"Otomatik","modeCustom":"Özel","colorModel":"Renk modeli","modelRGB":"RGB","modelHSB":"HSB","modelCMYK":"CMYK","grid":"Kılavuz","wheel":"Tekerlek","hexCode":"Onaltılı kod","colorRed":"Kırmızı","colorGreen":"Yeşil","colorBlue":"Mavi","colorHue":"Renk Tonu","colorSaturation":"Doygunluk","colorBrightness":"Parlaklık","colorCyan":"Cam Göbeği","colorMagenta":"Macenta","colorYellow":"Sarı","colorBlack":"Siyah","codeRed":"R","codeGreen":"G","codeBlue":"B","codeHue":"H","codeSaturation":"S","codeBrightness":"B","codeCyan":"C","codeMagenta":"M","codeYellow":"Y","codeBlack":"B","close":"Kapat","editSchematic":"Paketi düzenle","searchSchematic":"Ara","nameLabelSchematic":"Ad","captionLabelSchematic":"Başlık","keyLabelSchematic":"Tuş","addSchematic":"Dosya Karşıya Yükle","schematicsInvalidSvg":"SVG geçersiz veya desteklenmiyor","schematicsInvalidSvgData":"Dosya verileri alınamadı","schematicsInvalidType":"Desteklenmeyen dosya tipi: %{type}","schematicsInvalidSize":"%{file} dosyası, %{size} boyutu sınırı aşıyor.","schematicsContextMenuReplace":"Değiştir","schematicsContextMenuDelete":"Sil","schematicsEmptySearchResults":"Arama sonuçları boş","schematicsNoSelection":"Bir öğe seçilmedi","schematicsMultipleSelection":"%{count} öğe seçildi","schematicsSingleDeletionSuccessed":"Şemanız başarıyla silindi.","schematicsMultipleDeletionSuccessed":"%{count} şema başarıyla silindi.","schematicsSingleAddSuccessed":"Şemanız başarıyla eklendi.","schematicsMultipleAddSuccessed":"%{count} şema başarıyla eklendi.","schematicsAddFailed":"Şemanız eklenemedi.","schematicsReplaceDlgTitle":"Var olan dosyanın değiştirilmesini onayla","schematicsReplaceDlgContent":"'%{sourceName}' dosyası zaten var. Bu dosyayı yeni dosyayla değiştirmek istiyor musunuz?","schematicsReplaceDlgApplyToAllFiles":"Tüm dosyalara uygula","schematicsPackageTab":"Paket","schematicsContentTab":"İçerik","schematicsDescriptionLabel":"Tanım","schematicsIconLabel":"Simge","schematicsChooseFile":"Dosya seç","schematicsDeleteIcon":"Simgeyi kaldır","schematicsIconAdded":"\"%{file}\" simgesi başarıyla eklendi.","schematicsIconRemove":"Simge başarıyla kaldırıldı.","schematicsIconDropFiles":"Dosyaları buraya bırakın","schematicsIconOr":"ya da","schematicsIconFileTypes":"Yalnızca .jpg, .png ve .svg dosyaları.","schematicsIconFileSize":"Maksimum dosya boyutu: %{size}."},"__zh":{"errorCreatingPalette":"保存调色板时发生错误。","paletteErrorTitle":"调色板错误","changePaletteLabel":"更改调色板","myPaletteLabel":"自定义","systemPaletteLabel":"系统","publicPaletteLabel":"全局","localPaletteLabel":"本地","mruPaletteLabel":"最近使用的","okDialog":"确定","deleteDialogTitle":"删除","applyDialog":"应用","cancelDialog":"取消","saveDialog":"保存","deleteMessage":"确定要删除调色板“%{name}”吗?","deleteToast":"“%{name}”已删除","favoritesLabel":"收藏夹","setAsFavorite":"设置为收藏项","createdToastMessage":"“%{name}”已成功创建。","createPalette":"创建自定义调色板","colorPicker":"颜色选取器","errorNoName":"请为调色板输入名称","errorInsufficientColors":"至少选择两种颜色","paletteAppliedToastMessage":"调色板“%{name}”已应用于报表。","createContinuousPalette":"创建连续调色板","createStandardPalette":"创建分类调色板","paletteNamePlaceholder":"在此输入调色板名称","paletteName":"调色板名称","standardPalette":"分类调色板","continuousPalette":"连续调色板","removeSwatch":"移除图样","addSwatch":"添加图样","reversePalette":"反转调色板","colorGuide":"颜色指南","modeAutomatic":"自动","modeCustom":"自定义","colorModel":"颜色模型","modelRGB":"RGB","modelHSB":"HSB","modelCMYK":"CMYK","grid":"网格","wheel":"色轮","hexCode":"十六进制代码","colorRed":"红色","colorGreen":"绿色","colorBlue":"蓝色","colorHue":"色调","colorSaturation":"饱和度","colorBrightness":"亮度","colorCyan":"蓝绿色","colorMagenta":"品红色","colorYellow":"黄色","colorBlack":"黑色","codeRed":"R","codeGreen":"G","codeBlue":"B","codeHue":"H","codeSaturation":"S","codeBrightness":"B","codeCyan":"C","codeMagenta":"M","codeYellow":"Y","codeBlack":"K","close":"关闭","editSchematic":"编辑数据包","searchSchematic":"搜索","nameLabelSchematic":"名称","captionLabelSchematic":"标题","keyLabelSchematic":"密钥","addSchematic":"上载文件","schematicsInvalidSvg":"SVG 无效或不受支持","schematicsInvalidSvgData":"无法获取文件数据","schematicsInvalidType":"不支持的文件类型:%{type}","schematicsInvalidSize":"文件 %{file} 的大小 %{size} 超过限制。","schematicsContextMenuReplace":"替换","schematicsContextMenuDelete":"删除","schematicsEmptySearchResults":"搜索结果为空","schematicsNoSelection":"未选择任何项","schematicsMultipleSelection":"已选择 %{count} 项","schematicsSingleDeletionSuccessed":"示意图已成功删除。","schematicsMultipleDeletionSuccessed":"%{count} 个示意图已成功删除。","schematicsSingleAddSuccessed":"示意图已成功添加。","schematicsMultipleAddSuccessed":"%{count} 个示意图已成功添加。","schematicsAddFailed":"未能添加示意图。","schematicsReplaceDlgTitle":"确认替换现有文件","schematicsReplaceDlgContent":"文件“%{sourceName}”已存在。是否要将其替换为新文件?","schematicsReplaceDlgApplyToAllFiles":"应用于所有文件","schematicsPackageTab":"数据包","schematicsContentTab":"内容","schematicsDescriptionLabel":"说明","schematicsIconLabel":"图标","schematicsChooseFile":"选择文件","schematicsDeleteIcon":"移除图标","schematicsIconAdded":"图标“%{file}”已成功添加。","schematicsIconRemove":"图标已成功移除。","schematicsIconDropFiles":"将文件放在此处","schematicsIconOr":"或","schematicsIconFileTypes":"仅限 .jpg、.png 和 .svg 文件。","schematicsIconFileSize":"%{size}MB 最大文件大小。"},"__zh-cn":{"errorCreatingPalette":"保存调色板时发生错误。","paletteErrorTitle":"调色板错误","changePaletteLabel":"更改调色板","myPaletteLabel":"自定义","systemPaletteLabel":"系统","publicPaletteLabel":"全局","localPaletteLabel":"本地","mruPaletteLabel":"最近使用的","okDialog":"确定","deleteDialogTitle":"删除","applyDialog":"应用","cancelDialog":"取消","saveDialog":"保存","deleteMessage":"确定要删除调色板“%{name}”吗?","deleteToast":"“%{name}”已删除","favoritesLabel":"收藏夹","setAsFavorite":"设置为收藏项","createdToastMessage":"“%{name}”已成功创建。","createPalette":"创建自定义调色板","colorPicker":"颜色选取器","errorNoName":"请为调色板输入名称","errorInsufficientColors":"至少选择两种颜色","paletteAppliedToastMessage":"调色板“%{name}”已应用于报表。","createContinuousPalette":"创建连续调色板","createStandardPalette":"创建分类调色板","paletteNamePlaceholder":"在此输入调色板名称","paletteName":"调色板名称","standardPalette":"分类调色板","continuousPalette":"连续调色板","removeSwatch":"移除图样","addSwatch":"添加图样","reversePalette":"反转调色板","colorGuide":"颜色指南","modeAutomatic":"自动","modeCustom":"自定义","colorModel":"颜色模型","modelRGB":"RGB","modelHSB":"HSB","modelCMYK":"CMYK","grid":"网格","wheel":"色轮","hexCode":"十六进制代码","colorRed":"红色","colorGreen":"绿色","colorBlue":"蓝色","colorHue":"色调","colorSaturation":"饱和度","colorBrightness":"亮度","colorCyan":"蓝绿色","colorMagenta":"品红色","colorYellow":"黄色","colorBlack":"黑色","codeRed":"R","codeGreen":"G","codeBlue":"B","codeHue":"H","codeSaturation":"S","codeBrightness":"B","codeCyan":"C","codeMagenta":"M","codeYellow":"Y","codeBlack":"K","close":"关闭","editSchematic":"编辑数据包","searchSchematic":"搜索","nameLabelSchematic":"名称","captionLabelSchematic":"标题","keyLabelSchematic":"密钥","addSchematic":"上载文件","schematicsInvalidSvg":"SVG 无效或不受支持","schematicsInvalidSvgData":"无法获取文件数据","schematicsInvalidType":"不支持的文件类型:%{type}","schematicsInvalidSize":"文件 %{file} 的大小 %{size} 超过限制。","schematicsContextMenuReplace":"替换","schematicsContextMenuDelete":"删除","schematicsEmptySearchResults":"搜索结果为空","schematicsNoSelection":"未选择任何项","schematicsMultipleSelection":"已选择 %{count} 项","schematicsSingleDeletionSuccessed":"示意图已成功删除。","schematicsMultipleDeletionSuccessed":"%{count} 个示意图已成功删除。","schematicsSingleAddSuccessed":"示意图已成功添加。","schematicsMultipleAddSuccessed":"%{count} 个示意图已成功添加。","schematicsAddFailed":"未能添加示意图。","schematicsReplaceDlgTitle":"确认替换现有文件","schematicsReplaceDlgContent":"文件“%{sourceName}”已存在。是否要将其替换为新文件?","schematicsReplaceDlgApplyToAllFiles":"应用于所有文件","schematicsPackageTab":"数据包","schematicsContentTab":"内容","schematicsDescriptionLabel":"说明","schematicsIconLabel":"图标","schematicsChooseFile":"选择文件","schematicsDeleteIcon":"移除图标","schematicsIconAdded":"图标“%{file}”已成功添加。","schematicsIconRemove":"图标已成功移除。","schematicsIconDropFiles":"将文件放在此处","schematicsIconOr":"或","schematicsIconFileTypes":"仅限 .jpg、.png 和 .svg 文件。","schematicsIconFileSize":"%{size}MB 最大文件大小。"},"__zh-tw":{"errorCreatingPalette":"儲存選用區時發生錯誤。","paletteErrorTitle":"選用區錯誤","changePaletteLabel":"變更調色盤","myPaletteLabel":"自訂","systemPaletteLabel":"系統","publicPaletteLabel":"廣域","localPaletteLabel":"本端","mruPaletteLabel":"最近已使用","okDialog":"確定","deleteDialogTitle":"刪除","applyDialog":"套用","cancelDialog":"取消","saveDialog":"儲存","deleteMessage":"您確定要刪除選用區 \"%{name}\" 嗎?","deleteToast":"\"%{name}\" 已刪除","favoritesLabel":"我的最愛","setAsFavorite":"設為我的最愛","createdToastMessage":"\"%{name}\" 已順利建立。","createPalette":"建立自訂選用區","colorPicker":"顏色選取器","errorNoName":"輸入選用區的名稱","errorInsufficientColors":"至少選擇兩種顏色","paletteAppliedToastMessage":"選用區 \"%{name}\" 已套用至報告。","createContinuousPalette":"建立連續調色盤","createStandardPalette":"建立種類調色盤","paletteNamePlaceholder":"在這裡鍵入選用區名稱","paletteName":"選用區名稱","standardPalette":"種類選用區","continuousPalette":"連續選用區","removeSwatch":"移除色樣","addSwatch":"新增色樣","reversePalette":"反轉選用區","colorGuide":"顏色指南","modeAutomatic":"自動","modeCustom":"自訂","colorModel":"色彩模式","modelRGB":"RGB","modelHSB":"HSB","modelCMYK":"CMYK","grid":"網格","wheel":"輪子","hexCode":"十六進位碼","colorRed":"紅色","colorGreen":"綠色","colorBlue":"藍色","colorHue":"色調","colorSaturation":"飽和度","colorBrightness":"亮度","colorCyan":"青藍色","colorMagenta":"紫紅色","colorYellow":"黃色","colorBlack":"黑色","codeRed":"R","codeGreen":"G","codeBlue":"B","codeHue":"H","codeSaturation":"S","codeBrightness":"B","codeCyan":"C","codeMagenta":"M","codeYellow":"Y","codeBlack":"K","close":"關閉","editSchematic":"編輯套件","searchSchematic":"搜尋","nameLabelSchematic":"名稱","captionLabelSchematic":"標題","keyLabelSchematic":"索引鍵","addSchematic":"上傳檔案","schematicsInvalidSvg":"無效或不受支援的 SVG","schematicsInvalidSvgData":"無法取得檔案資料","schematicsInvalidType":"不受支援的檔案類型:%{type}","schematicsInvalidSize":"檔案 %{file}(大小 %{size})超出限制。","schematicsContextMenuReplace":"取代","schematicsContextMenuDelete":"刪除","schematicsEmptySearchResults":"搜尋結果是空的","schematicsNoSelection":"未選取項目","schematicsMultipleSelection":"%{count} 個項目已選取","schematicsSingleDeletionSuccessed":"您的示意圖已順利刪除。","schematicsMultipleDeletionSuccessed":"%{count} 個示意圖已順利刪除。","schematicsSingleAddSuccessed":"您的示意圖已順利新增。","schematicsMultipleAddSuccessed":"%{count} 個示意圖已順利新增。","schematicsAddFailed":"無法新增您的示意圖。","schematicsReplaceDlgTitle":"確認取代現有檔案","schematicsReplaceDlgContent":"檔案 '%{sourceName}' 已存在。您要使用這個新檔案來進行取代嗎?","schematicsReplaceDlgApplyToAllFiles":"套用至所有檔案","schematicsPackageTab":"套件","schematicsContentTab":"內容","schematicsDescriptionLabel":"說明","schematicsIconLabel":"圖示","schematicsChooseFile":"請選擇檔案","schematicsDeleteIcon":"請移除圖示","schematicsIconAdded":"圖示 \"%{file}\" 已順利新增。","schematicsIconRemove":"圖示已順利移除。","schematicsIconDropFiles":"在這裡捨棄檔案","schematicsIconOr":"或","schematicsIconFileTypes":"僅限 .jpg、.png 和 .svg 檔案","schematicsIconFileSize":"%{size}MB 檔案大小上限。"}};amdi18n.init=function (language){
  567. // get the default language
  568. if(!language){
  569. if(window._i18n && window._i18n.locale){
  570. language = window._i18n.locale;
  571. }else if(document.documentElement.lang){
  572. language = document.documentElement.lang;
  573. }else{
  574. language = 'root';
  575. }
  576. }
  577. var target = this['__' + language] || this.__root;
  578. // copy definition to root level
  579. if (target) {
  580. for (var name in target) {
  581. this[name] = target[name];
  582. }
  583. }
  584. // fallback to root
  585. for(var name in this.__root){
  586. if(typeof this[name] === 'undefined'){
  587. this[name] = this.__root[name];
  588. }
  589. }
  590. };amdi18n.init();module.exports=amdi18n;
  591. /***/ }),
  592. /* 16 */
  593. /***/ (function(module, exports) {
  594. module.exports = __WEBPACK_EXTERNAL_MODULE_16__;
  595. /***/ }),
  596. /* 17 */
  597. /***/ (function(module, exports, __webpack_require__) {
  598. !function(e,o){if(true)module.exports=o(__webpack_require__(7));else if("function"==typeof define&&define.amd)define(["@ba-ui-toolkit/ba-graphics/dist/icons-js/ba-graphics-icons-commons.js"],o);else{var s=o("object"==typeof exports?require("@ba-ui-toolkit/ba-graphics/dist/icons-js/ba-graphics-icons-commons.js"):e["@ba-ui-toolkit/ba-graphics/dist/icons-js/ba-graphics-icons-commons.js"]);for(var t in s)("object"==typeof exports?exports:e)[t]=s[t]}}("undefined"!=typeof self?self:this,function(e){return webpackJsonPBaGraphics([1343],{"3865314c5959606874d4":function(o,s){o.exports=e},"6200a98b23e7835f35ec":function(e,o,s){"use strict";var t=s("9689a9c94ae38b47fa2c"),i=s.n(t),c=s("9ce58a7deea14f49ef01"),a=s.n(c),n=new i.a({id:"delete_16_v7",use:"delete_16_v7-usage",viewBox:"0 0 16 16",content:'<symbol xmlns="http://www.w3.org/2000/svg" viewBox="0 0 16 16" id="delete_16_v7"><path d="M6 6h1v6H6zm3 0h1v6H9z" /><path d="M2 3v1h1v10c0 .6.4 1 1 1h8c.6 0 1-.4 1-1V4h1V3H2zm2 11V4h8v10H4zM6 1h4v1H6z" /><path style="fill:none" d="M0 0h16v16H0z" /></symbol>'});a.a.add(n);o.a=n},"96d9f963cd5bcbe25bc9":function(e,o,s){"use strict";Object.defineProperty(o,"__esModule",{value:!0});var t=s("3865314c5959606874d4"),i=(s.n(t),s("6200a98b23e7835f35ec"));o.default=i.a}},["96d9f963cd5bcbe25bc9"])});
  599. /***/ }),
  600. /* 18 */
  601. /***/ (function(module, exports, __webpack_require__) {
  602. "use strict";
  603. var __WEBPACK_AMD_DEFINE_ARRAY__, __WEBPACK_AMD_DEFINE_RESULT__;
  604. /**
  605. * Licensed Materials - Property of IBM
  606. * IBM Cognos Products: BI Cloud (C) Copyright IBM Corp. 2013, 2016
  607. * US Government Users Restricted Rights - Use, duplication or disclosure restricted by GSA ADP Schedule Contract with IBM Corp.
  608. *
  609. * @module /dashboard/data/Events
  610. * @see Events
  611. */
  612. !(__WEBPACK_AMD_DEFINE_ARRAY__ = [__webpack_require__(10)], __WEBPACK_AMD_DEFINE_RESULT__ = (function (Class) {
  613. 'use strict';
  614. /**
  615. * Events implements the Backbone-style eventing model objects
  616. *
  617. * @class Events
  618. */
  619. var Events = Class.extend({
  620. init: function init() {
  621. this._events = {};
  622. },
  623. /**
  624. * The 'on' method registers the handler and return DOJO-style event registration object with 'remove' method, which unregisters the handler.
  625. *
  626. * This implementation supports composite event names, such as 'eventBaseName:eventSecondaryName', for example: 'change:name'. Triggering 'change:name' event would invoke handlers registered to
  627. * listen 'change' event as well as the handlers registered to listen the 'change:name' event. The special event name 'all' can be used to listen to all event types.
  628. */
  629. on: function on(eventName, handler, context) {
  630. if (typeof handler !== 'function') {
  631. console.log('ERROR in Events.on: Invalid event handler');
  632. }
  633. if (!this._events[eventName]) {
  634. this._events[eventName] = [];
  635. }
  636. this._events[eventName].push({
  637. handler: handler,
  638. context: context
  639. });
  640. var that = this;
  641. return {
  642. remove: function remove() {
  643. that.off(eventName, handler, context);
  644. }
  645. };
  646. },
  647. /**
  648. * Removes the specified handler from the listening to the events on this object. If eventName is not specified then unregister handler and context for all event types. If handler is not specified
  649. * then unregister all event handlers for the specified context and event name. If context is not specified then unregister all event handlers for the specified handler and event name.
  650. *
  651. * Examples: obj.off('change:name', handler, context); // unregister handler in context from listening 'change:name' event obj.off(null, null, context); // unregister all event handlers for the
  652. * specified context obj.off(); // unregister all event handlers
  653. */
  654. off: function off(eventName, handler, context) {
  655. var getEvents = function getEvents(evName, self) {
  656. var events = self._events;
  657. if (!evName) {
  658. return events;
  659. }
  660. var parts = evName.split(':');
  661. events = {};
  662. events[parts[0]] = self._events[parts[0]];
  663. if (parts.length > 1 && parts[1] !== '*') {
  664. events[evName] = self._events[evName];
  665. } else if (parts.length > 1 && parts[1] === '*') {
  666. for (var name in self._events) {
  667. if (name.indexOf(parts[0] + ':') === 0) {
  668. events[name] = self._events[name];
  669. }
  670. }
  671. }
  672. return events;
  673. };
  674. var events = getEvents(eventName, this);
  675. for (var name in events) {
  676. var i = 0,
  677. handlers = events[name];
  678. if (!handlers) {
  679. continue;
  680. }
  681. while (i < handlers.length) {
  682. if ((handlers[i].handler === handler || !handler) && (handlers[i].context === context || !context)) {
  683. handlers.splice(i, 1);
  684. } else {
  685. i++;
  686. }
  687. }
  688. }
  689. },
  690. /**
  691. * Triggers an event
  692. */
  693. trigger: function trigger(eventName, event) {
  694. var parts = eventName.split(':');
  695. var handlers = [].concat(this._events['all'] || []).concat(this._events[parts[0]] || []);
  696. if (parts.length > 1) {
  697. handlers = handlers.concat(this._events[eventName] || []);
  698. }
  699. for (var i = 0; i < handlers.length; i++) {
  700. if (typeof handlers[i].handler === 'function') {
  701. handlers[i].handler.call(handlers[i].context, event, eventName);
  702. }
  703. }
  704. }
  705. });
  706. // alias
  707. Events.prototype.emit = Events.prototype.trigger;
  708. //
  709. return Events;
  710. }).apply(exports, __WEBPACK_AMD_DEFINE_ARRAY__),
  711. __WEBPACK_AMD_DEFINE_RESULT__ !== undefined && (module.exports = __WEBPACK_AMD_DEFINE_RESULT__));
  712. //# sourceMappingURL=Events.js.map
  713. /***/ }),
  714. /* 19 */
  715. /***/ (function(module, exports, __webpack_require__) {
  716. "use strict";
  717. /* WEBPACK VAR INJECTION */(function(process) {/**
  718. * Copyright (c) 2014-present, Facebook, Inc.
  719. *
  720. * This source code is licensed under the MIT license found in the
  721. * LICENSE file in the root directory of this source tree.
  722. *
  723. */
  724. var emptyFunction = __webpack_require__(12);
  725. /**
  726. * Similar to invariant but only logs a warning if the condition is not met.
  727. * This can be used to log issues in development environments in critical
  728. * paths. Removing the logging code for production environments will keep the
  729. * same logic and follow the same code paths.
  730. */
  731. var warning = emptyFunction;
  732. if (process.env.NODE_ENV !== 'production') {
  733. var printWarning = function printWarning(format) {
  734. for (var _len = arguments.length, args = Array(_len > 1 ? _len - 1 : 0), _key = 1; _key < _len; _key++) {
  735. args[_key - 1] = arguments[_key];
  736. }
  737. var argIndex = 0;
  738. var message = 'Warning: ' + format.replace(/%s/g, function () {
  739. return args[argIndex++];
  740. });
  741. if (typeof console !== 'undefined') {
  742. console.error(message);
  743. }
  744. try {
  745. // --- Welcome to debugging React ---
  746. // This error was thrown as a convenience so that you can use this stack
  747. // to find the callsite that caused this warning to fire.
  748. throw new Error(message);
  749. } catch (x) {}
  750. };
  751. warning = function warning(condition, format) {
  752. if (format === undefined) {
  753. throw new Error('`warning(condition, format, ...args)` requires a warning ' + 'message argument');
  754. }
  755. if (format.indexOf('Failed Composite propType: ') === 0) {
  756. return; // Ignore CompositeComponent proptype check.
  757. }
  758. if (!condition) {
  759. for (var _len2 = arguments.length, args = Array(_len2 > 2 ? _len2 - 2 : 0), _key2 = 2; _key2 < _len2; _key2++) {
  760. args[_key2 - 2] = arguments[_key2];
  761. }
  762. printWarning.apply(undefined, [format].concat(args));
  763. }
  764. };
  765. }
  766. module.exports = warning;
  767. /* WEBPACK VAR INJECTION */}.call(exports, __webpack_require__(8)))
  768. /***/ }),
  769. /* 20 */
  770. /***/ (function(module, exports, __webpack_require__) {
  771. "use strict";
  772. exports.__esModule = true;
  773. var _react = __webpack_require__(0);
  774. var _react2 = _interopRequireDefault(_react);
  775. var _reactDom = __webpack_require__(6);
  776. var _reactDom2 = _interopRequireDefault(_reactDom);
  777. var _propTypes = __webpack_require__(2);
  778. var _propTypes2 = _interopRequireDefault(_propTypes);
  779. var _RgbSlider = __webpack_require__(33);
  780. var _RgbSlider2 = _interopRequireDefault(_RgbSlider);
  781. var _ColorConversion = __webpack_require__(21);
  782. var _ColorConversion2 = _interopRequireDefault(_ColorConversion);
  783. var _StringResources = __webpack_require__(1);
  784. var _StringResources2 = _interopRequireDefault(_StringResources);
  785. var _caUiToolkit = __webpack_require__(3);
  786. function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
  787. function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
  788. function _possibleConstructorReturn(self, call) { if (!self) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return call && (typeof call === "object" || typeof call === "function") ? call : self; }
  789. function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function, not " + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; } /**
  790. * Licensed Materials - Property of IBM
  791. * IBM Cognos Products: BI
  792. * (C) Copyright IBM Corp. 2018
  793. * US Government Users Restricted Rights - Use, duplication or disclosure restricted by GSA ADP Schedule Contract with IBM Corp.
  794. */
  795. var ColorWheel = function (_Component) {
  796. _inherits(ColorWheel, _Component);
  797. function ColorWheel(props) {
  798. _classCallCheck(this, ColorWheel);
  799. var _this = _possibleConstructorReturn(this, _Component.call(this, props));
  800. _this.addEventsForAllInputs = function () {
  801. _this.colorWheel.onclick = _this.clickOnPalette.bind(_this);
  802. };
  803. _this.updateCanvas = function () {
  804. _this.canvasContext = _this.colorWheel.getContext('2d');
  805. // Center coordinates of the color wheel
  806. var xCoordinate = _this.colorWheel.width / 2;
  807. var yCoordinate = _this.colorWheel.height / 2;
  808. _this.setState({ wheelOriginX: xCoordinate });
  809. _this.setState({ wheelOriginY: yCoordinate });
  810. //Radius of the color wheel
  811. var iRadius = _this.colorWheel.width / 2;
  812. var bCounterClockwise = false;
  813. //For loop used to draw the color wheel pixel by pixel on the canvas
  814. for (var angle = 0; angle <= 360; angle++) {
  815. var v_iStartAngle = (angle - 2) * Math.PI / 180;
  816. var v_iEndAngle = angle * Math.PI / 180;
  817. _this.canvasContext.beginPath();
  818. _this.canvasContext.moveTo(xCoordinate, yCoordinate);
  819. _this.canvasContext.arc(xCoordinate, yCoordinate, iRadius, v_iStartAngle, v_iEndAngle, bCounterClockwise);
  820. _this.canvasContext.closePath();
  821. var v_iGradient = _this.canvasContext.createRadialGradient(xCoordinate, yCoordinate, 0, xCoordinate, yCoordinate, iRadius);
  822. v_iGradient.addColorStop(0, 'hsl(' + angle + ', 10%, 100%)');
  823. v_iGradient.addColorStop(1, 'hsl(' + angle + ', 100%, 50%)');
  824. _this.canvasContext.fillStyle = v_iGradient;
  825. _this.canvasContext.fill();
  826. }
  827. };
  828. _this.updateColorPicker = function () {
  829. _this.normalPickerRef.style.top = -(_this.colorWheel.height / 2 + _this.normalPickerRef.clientHeight / 2) + 'px';
  830. _this.normalPickerRef.style.left = _this.colorWheel.width / 2 - _this.normalPickerRef.clientWidth / 2 + 'px';
  831. };
  832. _this.initPaletteTouchMove = function (event) {
  833. event.preventDefault();
  834. event.stopPropagation();
  835. _this.setState({ mouseDown: true });
  836. _this.normalPickerRef.ontouchmove = _this.moveOnPalette.bind(_this);
  837. _this.normalPickerRef.ontouchend = _this.endPaletteMove.bind(_this);
  838. _this.colorWheel.ontouchmove = _this.moveOnPalette.bind(_this);
  839. _this.colorWheel.ontouchend = _this.endPaletteMove.bind(_this);
  840. };
  841. _this.initPaletteMove = function (event) {
  842. event.preventDefault();
  843. event.stopPropagation();
  844. _this.setState({ mouseDown: true });
  845. _this.normalPickerRef.onmousemove = _this.moveOnPalette.bind(_this);
  846. _this.normalPickerRef.touchmove = _this.moveOnPalette.bind(_this);
  847. _this.normalPickerRef.onmouseup = _this.endPaletteMove.bind(_this);
  848. _this.colorWheel.onmousemove = _this.moveOnPalette.bind(_this);
  849. _this.colorWheel.touchmove = _this.moveOnPalette.bind(_this);
  850. _this.colorWheel.onmouseup = _this.endPaletteMove.bind(_this);
  851. };
  852. _this.clickOnPalette = function (event) {
  853. event.preventDefault();
  854. event.stopPropagation();
  855. _this.setState({ mouseDown: true });
  856. _this.moveOnPalette(event);
  857. _this.endPaletteMove(event);
  858. };
  859. _this.moveOnPalette = function (event) {
  860. if (!_this.state.mouseDown) {
  861. return;
  862. }
  863. var eventX = null;
  864. var eventY = null;
  865. if (event.type == 'touchmove') {
  866. eventX = event.targetTouches[0].clientX;
  867. eventY = event.targetTouches[0].clientY;
  868. } else {
  869. eventX = event.clientX;
  870. eventY = event.clientY;
  871. }
  872. var elementRelativePosition = _this.getRelativeOffset();
  873. _this.elLeftPnt = eventX - elementRelativePosition.left;
  874. _this.elTopPnt = eventY - elementRelativePosition.top;
  875. var circleBoundary = _this.computePointOnCircle(_this.elLeftPnt, _this.elTopPnt);
  876. switch (_this.pntQuad) {
  877. case 1:
  878. _this.elLeftPnt = _this.elLeftPnt < circleBoundary.left ? circleBoundary.left : _this.elLeftPnt;
  879. _this.elTopPnt = _this.elTopPnt < circleBoundary.top ? circleBoundary.top : _this.elTopPnt;
  880. _this.normalPickerRef.style.left = _this.elLeftPnt - _this.normalPickerRef.clientWidth / 2 + 'px';
  881. _this.normalPickerRef.style.top = _this.elTopPnt - (_this.colorWheel.height + _this.normalPickerRef.clientHeight / 2) + 'px';
  882. break;
  883. case 2:
  884. _this.elLeftPnt = _this.elLeftPnt > circleBoundary.left ? circleBoundary.left : _this.elLeftPnt;
  885. _this.elTopPnt = _this.elTopPnt < circleBoundary.top ? circleBoundary.top : _this.elTopPnt;
  886. _this.normalPickerRef.style.left = _this.elLeftPnt - _this.normalPickerRef.clientWidth / 2 + 'px';
  887. _this.normalPickerRef.style.top = _this.elTopPnt - (_this.colorWheel.height + _this.normalPickerRef.clientHeight / 2) + 'px';
  888. break;
  889. case 3:
  890. _this.elLeftPnt = _this.elLeftPnt > circleBoundary.left ? circleBoundary.left : _this.elLeftPnt;
  891. _this.elTopPnt = _this.elTopPnt > circleBoundary.top ? circleBoundary.top : _this.elTopPnt;
  892. _this.normalPickerRef.style.left = _this.elLeftPnt - _this.normalPickerRef.clientWidth / 2 + 'px';
  893. _this.normalPickerRef.style.top = _this.elTopPnt - (_this.colorWheel.height + _this.normalPickerRef.clientHeight / 2) + 'px';
  894. break;
  895. case 4:
  896. _this.elLeftPnt = _this.elLeftPnt < circleBoundary.left ? circleBoundary.left : _this.elLeftPnt;
  897. _this.elTopPnt = _this.elTopPnt > circleBoundary.top ? circleBoundary.top : _this.elTopPnt;
  898. _this.normalPickerRef.style.left = _this.elLeftPnt - _this.normalPickerRef.clientWidth / 2 + 'px';
  899. _this.normalPickerRef.style.top = _this.elTopPnt - (_this.colorWheel.height + _this.normalPickerRef.clientHeight / 2) + 'px';
  900. break;
  901. }
  902. };
  903. _this.endPaletteMove = function () {
  904. var rgbVal = {};
  905. _this.setState({ mouseDown: false });
  906. var dataArray = _this.canvasContext.getImageData(_this.elLeftPnt, _this.elTopPnt, 1, 1).data;
  907. rgbVal.red = dataArray[0];
  908. rgbVal.green = dataArray[1];
  909. rgbVal.blue = dataArray[2];
  910. var rgbCode = _ColorConversion2.default.convertRgbValToRgbHex(rgbVal);
  911. _this.previewRef.style.backgroundColor = rgbCode;
  912. _this.props.onColorChange(rgbCode, false);
  913. };
  914. _this.validateTextInput = function (value, color) {
  915. if (isNaN(value)) {
  916. return;
  917. }
  918. var rgbColor = _ColorConversion2.default.convertRgbHexToRgbVal(_this.props.color || '#FFFFFF');
  919. var hslColor = _this.state.hslColor;
  920. var rgbHex = null;
  921. if (color == 'Red') {
  922. rgbColor.red = parseInt(value, 10);
  923. } else if (color == 'Green') {
  924. rgbColor.green = parseInt(value, 10);
  925. } else if (color == 'Blue') {
  926. rgbColor.blue = parseInt(value, 10);
  927. } else if (color == 'Hue') {
  928. hslColor.hue = parseInt(value, 10);
  929. } else if (color == 'Saturation') {
  930. hslColor.sat = parseInt(value, 10) / 100;
  931. } else if (color == 'Brightness') {
  932. hslColor.light = parseInt(value, 10) / 100;
  933. }
  934. if (_this.state.selectedColorType == 'RGB') {
  935. rgbHex = _ColorConversion2.default.convertRgbValToRgbHex(rgbColor);
  936. } else {
  937. rgbColor = _ColorConversion2.default.convertHslToRgb(hslColor);
  938. rgbHex = _ColorConversion2.default.convertRgbValToRgbHex(rgbColor);
  939. }
  940. _this.setState({ hslColor: hslColor });
  941. if (rgbHex != _this.props.color) {
  942. _this.previewRef.style.backgroundColor = rgbHex;
  943. _this.props.onColorChange(rgbHex, false);
  944. }
  945. };
  946. _this.validator = function (regex, color) {
  947. var matches = color.match(regex);
  948. return matches && matches.length == 1 && matches[0] === color;
  949. };
  950. _this.validateHexInput = function (value) {
  951. // inject the hex string identifier if not present
  952. if (value.length == 0 || value[0] != '#') {
  953. value = '#' + value;
  954. }
  955. // if any pair is not hex digits, return before updating state to prevent the input
  956. var regex = /[0-9A-Fa-f]{1,2}/;
  957. if (value.length > 1 && !_this.validator(regex, value.substr(1, 2))) {
  958. return;
  959. }
  960. if (value.length > 3 && !_this.validator(regex, value.substr(3, 2))) {
  961. return;
  962. }
  963. if (value.length > 5 && !_this.validator(regex, value.substr(5, 2))) {
  964. return;
  965. }
  966. // only "process" the input if it's a full hex string
  967. if (value.length == 7) {
  968. _this.previewRef.style.backgroundColor = value;
  969. _this.props.onColorChange(value.toUpperCase(), false);
  970. } else {
  971. // this doesn't need to be set if we use the props onColorChange because it comes down
  972. _this.setState({ hexVal: value });
  973. }
  974. };
  975. _this.redSliderRef = null;
  976. _this.greenSliderRef = null;
  977. _this.blueSliderRef = null;
  978. _this.hueSliderRef = null;
  979. _this.saturationSliderRef = null;
  980. _this.brightnessSliderRef = null;
  981. _this.hexRef = null;
  982. _this.previewRef = null;
  983. _this.colorWheel = null;
  984. _this.normalPickerRef = null;
  985. _this.distanceBetweenPnts = null;
  986. _this.canvasContext = null;
  987. _this.elLeftPnt = null;
  988. _this.elTopPnt = null;
  989. _this.autoLeft = null;
  990. _this.autoTop = null;
  991. _this.pntQuad = 0;
  992. _this.state = {
  993. mouseDown: false,
  994. wheelOriginX: 0,
  995. wheelOriginY: 0,
  996. selectedColorType: props.selectedColorType || 'RGB',
  997. hexVal: props.color || '#FFFFFF',
  998. hslColor: _ColorConversion2.default.convertRgbToHsl(props.color || '#FFFFFF')
  999. };
  1000. return _this;
  1001. }
  1002. ColorWheel.prototype.componentDidMount = function componentDidMount() {
  1003. this.addEventsForAllInputs();
  1004. this.updateCanvas();
  1005. this.updateColorPicker();
  1006. this.previewRef.style.backgroundColor = this.props.color;
  1007. };
  1008. ColorWheel.prototype.componentDidUpdate = function componentDidUpdate(prevProps) {
  1009. if (this.props.selectedColorType != prevProps.selectedColorType) {
  1010. this.setState({
  1011. selectedColorType: this.props.selectedColorType
  1012. });
  1013. }
  1014. if (this.props.color != prevProps.color) {
  1015. var newColor = this.props.color || '#FFFFFF';
  1016. this.previewRef.style.backgroundColor = newColor;
  1017. var newState = {
  1018. hexVal: newColor
  1019. };
  1020. // we check if the current HSL would map to a different RGB, and if so we change it
  1021. if (_ColorConversion2.default.convertRgbValToRgbHex(_ColorConversion2.default.convertHslToRgb(this.state.hslColor)) != newColor) {
  1022. newState.hslColor = _ColorConversion2.default.convertRgbToHsl(newColor);
  1023. }
  1024. this.setState(newState);
  1025. }
  1026. };
  1027. ColorWheel.prototype.getRelativeOffset = function getRelativeOffset() {
  1028. var clientRect = this.colorWheel.getBoundingClientRect();
  1029. var scrollLeft = window.pageXOffset || document.documentElement.scrollLeft;
  1030. var scrollTop = window.pageYOffset || document.documentElement.scrollTop;
  1031. var position = { top: clientRect.top + scrollTop, left: clientRect.left + scrollLeft };
  1032. return position;
  1033. };
  1034. ColorWheel.prototype.computePointOnCircle = function computePointOnCircle(originLeft, originTop) {
  1035. var pntRadius = Math.sqrt(Math.pow(Math.abs(this.state.wheelOriginX - originLeft), 2) + Math.pow(Math.abs(this.state.wheelOriginY - originTop), 2));
  1036. var circleRadius = 125;
  1037. var angle = Math.acos(Math.abs(this.state.wheelOriginX - originLeft) / pntRadius);
  1038. var leftNew = 0;
  1039. var topNew = 0;
  1040. if (originLeft > this.state.wheelOriginX && originTop < this.state.wheelOriginY) {
  1041. this.pntQuad = 2;
  1042. angle = 180 * (Math.PI / 180) - angle;
  1043. } else if (originLeft > this.state.wheelOriginX && originTop > this.state.wheelOriginY) {
  1044. this.pntQuad = 3;
  1045. angle = angle + 180 * (Math.PI / 180);
  1046. } else if (originLeft < this.state.wheelOriginX && originTop > this.state.wheelOriginY) {
  1047. this.pntQuad = 4;
  1048. angle = 360 * (Math.PI / 180) - angle;
  1049. } else {
  1050. this.pntQuad = 1;
  1051. }
  1052. leftNew = this.state.wheelOriginX - circleRadius * Math.cos(angle);
  1053. topNew = this.state.wheelOriginY - circleRadius * Math.sin(angle);
  1054. var pointOnCircle = {
  1055. left: leftNew,
  1056. top: topNew
  1057. };
  1058. return pointOnCircle;
  1059. };
  1060. ColorWheel.prototype.getSliders = function getSliders(type) {
  1061. var _this2 = this;
  1062. var rgbVal = _ColorConversion2.default.convertRgbHexToRgbVal(this.props.color || (this.state.hexVal.length == 7 ? this.state.hexVal : '#FFFFFF'));
  1063. switch (type) {
  1064. case 'RGB':
  1065. return _react2.default.createElement(
  1066. 'tbody',
  1067. null,
  1068. _react2.default.createElement(
  1069. 'tr',
  1070. { style: { 'padding-top': '20px', 'height': '50px' } },
  1071. _react2.default.createElement(_RgbSlider2.default, {
  1072. ref: function ref(element) {
  1073. _this2.redSliderRef = element;
  1074. },
  1075. color: 'Red',
  1076. validateInput: this.validateTextInput.bind(this),
  1077. selectedColorType: this.state.selectedColorType,
  1078. value: rgbVal.red
  1079. })
  1080. ),
  1081. _react2.default.createElement(
  1082. 'tr',
  1083. { style: { 'padding-top': '20px', 'height': '50px' } },
  1084. _react2.default.createElement(_RgbSlider2.default, {
  1085. ref: function ref(element) {
  1086. _this2.greenSliderRef = element;
  1087. },
  1088. color: 'Green',
  1089. validateInput: this.validateTextInput.bind(this),
  1090. selectedColorType: this.state.selectedColorType,
  1091. value: rgbVal.green
  1092. })
  1093. ),
  1094. _react2.default.createElement(
  1095. 'tr',
  1096. { style: { 'padding-top': '20px', 'height': '50px' } },
  1097. _react2.default.createElement(_RgbSlider2.default, {
  1098. ref: function ref(element) {
  1099. _this2.blueSliderRef = element;
  1100. },
  1101. color: 'Blue',
  1102. validateInput: this.validateTextInput.bind(this),
  1103. selectedColorType: this.state.selectedColorType,
  1104. value: rgbVal.blue
  1105. })
  1106. )
  1107. );
  1108. case 'HSB':
  1109. return _react2.default.createElement(
  1110. 'tbody',
  1111. null,
  1112. _react2.default.createElement(
  1113. 'tr',
  1114. { style: { 'padding-top': '20px', 'height': '50px' } },
  1115. _react2.default.createElement(_RgbSlider2.default, {
  1116. ref: function ref(element) {
  1117. _this2.hueSliderRef = element;
  1118. },
  1119. color: 'Hue',
  1120. validateInput: this.validateTextInput.bind(this),
  1121. selectedColorType: this.state.selectedColorType,
  1122. value: this.state.hslColor.hue
  1123. })
  1124. ),
  1125. _react2.default.createElement(
  1126. 'tr',
  1127. { style: { 'padding-top': '20px', 'height': '50px' } },
  1128. _react2.default.createElement(_RgbSlider2.default, {
  1129. ref: function ref(element) {
  1130. _this2.saturationSliderRef = element;
  1131. },
  1132. color: 'Saturation',
  1133. validateInput: this.validateTextInput.bind(this),
  1134. selectedColorType: this.state.selectedColorType,
  1135. value: this.state.hslColor.sat >= 0 ? Math.round(this.state.hslColor.sat * 100) : null
  1136. })
  1137. ),
  1138. _react2.default.createElement(
  1139. 'tr',
  1140. { style: { 'padding-top': '20px', 'height': '50px' } },
  1141. _react2.default.createElement(_RgbSlider2.default, {
  1142. ref: function ref(element) {
  1143. _this2.brightnessSliderRef = element;
  1144. },
  1145. color: 'Brightness',
  1146. validateInput: this.validateTextInput.bind(this),
  1147. selectedColorType: this.state.selectedColorType,
  1148. value: this.state.hslColor.light >= 0 ? Math.round(this.state.hslColor.light * 100) : null
  1149. })
  1150. )
  1151. );
  1152. }
  1153. };
  1154. ColorWheel.prototype.render = function render() {
  1155. var _this3 = this;
  1156. var sliders = this.getSliders(this.state.selectedColorType);
  1157. return _react2.default.createElement(
  1158. 'table',
  1159. null,
  1160. _react2.default.createElement(
  1161. 'tbody',
  1162. null,
  1163. _react2.default.createElement(
  1164. 'tr',
  1165. null,
  1166. _react2.default.createElement(
  1167. 'td',
  1168. { style: { width: '50%' } },
  1169. _react2.default.createElement(
  1170. 'div',
  1171. { style: { width: '250px', height: '250px' }, className: 'clsWheelContainer ' },
  1172. _react2.default.createElement('canvas', {
  1173. style: { position: 'relative', float: 'left' },
  1174. width: '250',
  1175. height: '250',
  1176. id: 'colorWheel',
  1177. ref: function ref(element) {
  1178. _this3.colorWheel = element;
  1179. }
  1180. }),
  1181. _react2.default.createElement('div', {
  1182. id: 'colorPicker',
  1183. style: { float: 'left' },
  1184. className: 'clsWheelSelector clsWheelSelectorEmpty clsPickerWrapper',
  1185. ref: function ref(element) {
  1186. _this3.normalPickerRef = element;
  1187. } })
  1188. )
  1189. ),
  1190. _react2.default.createElement(
  1191. 'td',
  1192. { style: { width: '50%', verticalAlign: 'top', paddingLeft: '24px' } },
  1193. _react2.default.createElement(
  1194. 'div',
  1195. { style: { width: '250px' } },
  1196. _react2.default.createElement(
  1197. 'div',
  1198. { id: 'idHexWrapper' },
  1199. _react2.default.createElement(
  1200. 'table',
  1201. { style: { verticalAlign: 'top', width: '100%' } },
  1202. _react2.default.createElement(
  1203. 'tbody',
  1204. null,
  1205. _react2.default.createElement(
  1206. 'tr',
  1207. null,
  1208. _react2.default.createElement(
  1209. 'td',
  1210. null,
  1211. _react2.default.createElement('div', {
  1212. id: 'divPreview',
  1213. className: 'clsPreviewBox',
  1214. ref: function ref(element) {
  1215. _this3.previewRef = element;
  1216. }
  1217. })
  1218. ),
  1219. _react2.default.createElement(
  1220. 'td',
  1221. { style: { width: '100px', padding: '0 16px', textAlign: 'center' } },
  1222. _react2.default.createElement(_caUiToolkit.Label, {
  1223. id: 'idHexCodeLabel',
  1224. type: 'caption',
  1225. label: _StringResources2.default.get('hexCode'),
  1226. htmlFor: 'idTextRgbCode',
  1227. style: { fontSize: '1em' },
  1228. title: _StringResources2.default.get('hexCode'),
  1229. alt: _StringResources2.default.get('hexCode')
  1230. })
  1231. ),
  1232. _react2.default.createElement(
  1233. 'td',
  1234. { style: { float: 'right' } },
  1235. _react2.default.createElement(_caUiToolkit.TextInput, {
  1236. id: 'idTextRgbCode',
  1237. ref: function ref(element) {
  1238. _this3.hexRef = element;
  1239. },
  1240. value: this.state.hexVal,
  1241. onChange: function onChange(value) {
  1242. return _this3.validateHexInput(value);
  1243. },
  1244. style: { width: '90px' },
  1245. type: 'text',
  1246. maxLength: '7',
  1247. tabIndex: 0
  1248. })
  1249. )
  1250. )
  1251. )
  1252. )
  1253. ),
  1254. _react2.default.createElement(
  1255. 'div',
  1256. { id: 'idRGBWrapper' },
  1257. _react2.default.createElement(
  1258. 'table',
  1259. { style: { verticalAlign: 'top' } },
  1260. sliders
  1261. )
  1262. )
  1263. )
  1264. )
  1265. )
  1266. )
  1267. );
  1268. };
  1269. return ColorWheel;
  1270. }(_react.Component);
  1271. ColorWheel.propTypes = {
  1272. onColorChange: _propTypes2.default.func,
  1273. selectedColorType: _propTypes2.default.string,
  1274. color: _propTypes2.default.string
  1275. };
  1276. exports.default = ColorWheel;
  1277. /***/ }),
  1278. /* 21 */
  1279. /***/ (function(module, exports, __webpack_require__) {
  1280. "use strict";
  1281. exports.__esModule = true;
  1282. function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
  1283. /**
  1284. * Licensed Materials - Property of IBM
  1285. * IBM Business Analytics (C) Copyright IBM Corp. 2018
  1286. * US Government Users Restricted Rights - Use, duplication or disclosure restricted by GSA ADP Schedule Contract with IBM Corp.
  1287. */
  1288. var ColorConversion = function () {
  1289. function ColorConversion() {
  1290. _classCallCheck(this, ColorConversion);
  1291. }
  1292. ColorConversion.convertRgbHexToRgbVal = function convertRgbHexToRgbVal(rgbHex) {
  1293. var rgbColor = {};
  1294. if (rgbHex) {
  1295. rgbColor.red = parseInt(rgbHex.substr(1, 2), 16) || 0;
  1296. rgbColor.green = parseInt(rgbHex.substr(3, 2), 16) || 0;
  1297. rgbColor.blue = parseInt(rgbHex.substr(5, 2), 16) || 0;
  1298. }
  1299. return rgbColor;
  1300. };
  1301. ColorConversion.convertRgbValToRgbHex = function convertRgbValToRgbHex(rgbVal) {
  1302. var redCode = parseInt(rgbVal.red).toString(16);
  1303. var greenCode = parseInt(rgbVal.green).toString(16);
  1304. var blueCode = parseInt(rgbVal.blue).toString(16);
  1305. while (redCode.length < 2) {
  1306. redCode = '0' + redCode;
  1307. }
  1308. while (greenCode.length < 2) {
  1309. greenCode = '0' + greenCode;
  1310. }
  1311. while (blueCode.length < 2) {
  1312. blueCode = '0' + blueCode;
  1313. }
  1314. return ('#' + redCode + greenCode + blueCode).toUpperCase();
  1315. };
  1316. ColorConversion.convertRgbToHsl = function convertRgbToHsl(color) {
  1317. if (!color) {
  1318. return {};
  1319. }
  1320. var rgbVal = this.convertRgbHexToRgbVal(color);
  1321. var hslVal = {};
  1322. var redVal = rgbVal.red / 255;
  1323. var greenVal = rgbVal.green / 255;
  1324. var blueVal = rgbVal.blue / 255;
  1325. var maxVal = Math.max(redVal, greenVal, blueVal);
  1326. var minVal = Math.min(redVal, greenVal, blueVal);
  1327. var chroma = maxVal - minVal;
  1328. var lightnessVal = (maxVal + minVal) / 2;
  1329. var hueVal = 0;
  1330. if (chroma == 0) {
  1331. hueVal = 0;
  1332. } else {
  1333. if (maxVal == redVal) {
  1334. hueVal = (greenVal - blueVal) / chroma % 6;
  1335. } else if (maxVal == greenVal) {
  1336. hueVal = (blueVal - redVal) / chroma + 2;
  1337. } else if (maxVal == blueVal) {
  1338. hueVal = (redVal - greenVal) / chroma + 4;
  1339. }
  1340. }
  1341. var satVal = chroma / (1 - Math.abs(2 * lightnessVal - 1));
  1342. if (!satVal) {
  1343. satVal = 0;
  1344. }
  1345. hslVal.hue = Math.round(hueVal * 60);
  1346. if (hslVal.hue < 0) {
  1347. hslVal.hue += 360;
  1348. } else if (hslVal.hue > 360) {
  1349. hslVal.hue -= 360;
  1350. }
  1351. hslVal.sat = Math.round(satVal * 1000) / 1000;
  1352. hslVal.light = Math.round(lightnessVal * 1000) / 1000;
  1353. return hslVal;
  1354. };
  1355. ColorConversion.convertHslToRgb = function convertHslToRgb(hslColor) {
  1356. var chroma = (1 - Math.abs(2 * hslColor.light - 1)) * hslColor.sat;
  1357. var huePrime = hslColor.hue / 60;
  1358. var rgbColor = {};
  1359. var variance = 1 * (hslColor.light - chroma / 2);
  1360. var colorShift = chroma * (1 - Math.abs(huePrime % 2 - 1));
  1361. if (huePrime >= 0 && huePrime <= 1) {
  1362. rgbColor.red = chroma;
  1363. rgbColor.green = colorShift;
  1364. rgbColor.blue = 0;
  1365. } else if (huePrime >= 1 && huePrime <= 2) {
  1366. rgbColor.red = colorShift;
  1367. rgbColor.green = chroma;
  1368. rgbColor.blue = 0;
  1369. } else if (huePrime >= 2 && huePrime <= 3) {
  1370. rgbColor.red = 0;
  1371. rgbColor.green = chroma;
  1372. rgbColor.blue = colorShift;
  1373. } else if (huePrime >= 3 && huePrime <= 4) {
  1374. rgbColor.red = 0;
  1375. rgbColor.green = colorShift;
  1376. rgbColor.blue = chroma;
  1377. } else if (huePrime >= 4 && huePrime <= 5) {
  1378. rgbColor.red = colorShift;
  1379. rgbColor.green = 0;
  1380. rgbColor.blue = chroma;
  1381. } else if (huePrime >= 5 && huePrime <= 6) {
  1382. rgbColor.red = chroma;
  1383. rgbColor.green = 0;
  1384. rgbColor.blue = colorShift;
  1385. } else {
  1386. rgbColor.red = 0;
  1387. rgbColor.green = 0;
  1388. rgbColor.blue = 0;
  1389. }
  1390. rgbColor.red = (rgbColor.red + variance) * 255;
  1391. rgbColor.green = (rgbColor.green + variance) * 255;
  1392. rgbColor.blue = (rgbColor.blue + variance) * 255;
  1393. return rgbColor;
  1394. };
  1395. return ColorConversion;
  1396. }();
  1397. exports.default = ColorConversion;
  1398. /***/ }),
  1399. /* 22 */
  1400. /***/ (function(module, exports, __webpack_require__) {
  1401. "use strict";
  1402. exports.__esModule = true;
  1403. var _react = __webpack_require__(0);
  1404. var _react2 = _interopRequireDefault(_react);
  1405. var _reactDom = __webpack_require__(6);
  1406. var _reactDom2 = _interopRequireDefault(_reactDom);
  1407. var _propTypes = __webpack_require__(2);
  1408. var _propTypes2 = _interopRequireDefault(_propTypes);
  1409. function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
  1410. function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
  1411. function _possibleConstructorReturn(self, call) { if (!self) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return call && (typeof call === "object" || typeof call === "function") ? call : self; }
  1412. function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function, not " + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; } /**
  1413. * Licensed Materials - Property of IBM
  1414. * IBM Cognos Products: BI
  1415. * (C) Copyright IBM Corp. 2018
  1416. * US Government Users Restricted Rights - Use, duplication or disclosure restricted by GSA ADP Schedule Contract with IBM Corp.
  1417. */
  1418. var ColorGrid = function (_Component) {
  1419. _inherits(ColorGrid, _Component);
  1420. function ColorGrid(props) {
  1421. _classCallCheck(this, ColorGrid);
  1422. var _this = _possibleConstructorReturn(this, _Component.call(this, props));
  1423. _this.state = {
  1424. activeSelector: null
  1425. };
  1426. _this.colorNodes = _this.generateColorGrid();
  1427. return _this;
  1428. }
  1429. ColorGrid.prototype.generateColorGrid = function generateColorGrid() {
  1430. var colorBytesRow1 = ['FFFFFF', 'f5cedb', 'fccec7', 'fdcfad', 'fed500', 'ffd191', 'b4e876', '89eda0', '8ee9d4', 'a0e3f0', 'c8daf4', 'dcd4f7', 'e2d2f4'];
  1431. var colorBytesRow2 = ['d8d8d8', 'f7aac3', 'ffaa9d', 'fcaf6d', 'e3bc13', 'ffb000', '95d13c', '57d785', '40d5bb', '71cddd', '95c4f3', 'c7b6f7', 'd2b5f0'];
  1432. var colorBytesRow3 = ['b8c1c1', 'f87eac', 'ff806c', 'fe8500', 'c6a21a', 'e39d14', '81b532', '34bc6e', '00baa1', '00b6cb', '56acf2', 'ae97f4', 'bf93eb'];
  1433. var colorBytesRow4 = ['8c9696', 'ff509e', 'ff5c49', 'db7c00', 'b3901f', 'c4881c', '73a22c', '00aa5e', '00a78f', '12a3b4', '009bef', '9b82f3', 'b07ce8'];
  1434. var colorBytesRow5 = ['6f7878', 'dc267f', 'e62325', 'ad6418', '91721f', '9c6d1e', '5b8121', '00884b', '008673', '188291', '047cc0', '785ef0', '9753e1'];
  1435. var colorBytesRow6 = ['535a5a', 'a91560', 'aa231f', '814b19', '70541b', '74521b', '426200', '116639', '006456', '17616b', '175d8d', '5a3ec8', '7732bb'];
  1436. var colorBytesRow7 = ['000000', '831b4c', '83231e', '653d1b', '5b421a', '5b421c', '374c1a', '12512e', '124f44', '164d56', '1c496d', '473793', '602797'];
  1437. var colorsArray = [];
  1438. colorsArray = colorsArray.concat(colorBytesRow1);
  1439. colorsArray = colorsArray.concat(colorBytesRow2);
  1440. colorsArray = colorsArray.concat(colorBytesRow3);
  1441. colorsArray = colorsArray.concat(colorBytesRow4);
  1442. colorsArray = colorsArray.concat(colorBytesRow5);
  1443. colorsArray = colorsArray.concat(colorBytesRow6);
  1444. colorsArray = colorsArray.concat(colorBytesRow7);
  1445. var colors = [];
  1446. for (var i = 0; i < colorsArray.length; i++) {
  1447. var RgbColor = '#' + colorsArray[i];
  1448. var colorStyle = {
  1449. backgroundColor: RgbColor
  1450. };
  1451. colors.push(this.getColorGrid(colorStyle, i));
  1452. }
  1453. return colors;
  1454. };
  1455. ColorGrid.prototype.shouldComponentUpdate = function shouldComponentUpdate() {
  1456. return false;
  1457. };
  1458. ColorGrid.prototype.setColor = function setColor(e, color, isGreyScale) {
  1459. var newSelector = e.target.firstChild || e.target;
  1460. if (this.state.activeSelector) {
  1461. var oldSelector = this.state.activeSelector;
  1462. if (oldSelector != newSelector) {
  1463. oldSelector.style.display = 'none';
  1464. oldSelector.parentNode.style.borderWidth = '1px';
  1465. oldSelector.parentNode.style.backgroundColor = oldSelector.style.backgroundColor;
  1466. }
  1467. }
  1468. newSelector.style.display = 'block';
  1469. newSelector.parentNode.style.borderWidth = '0px';
  1470. newSelector.parentNode.style.backgroundColor = '#FFFFFF';
  1471. this.setState({ activeSelector: newSelector });
  1472. this.props.onColorChange(color.toUpperCase(), isGreyScale);
  1473. };
  1474. ColorGrid.prototype.getColorGrid = function getColorGrid(colorStyle, i) {
  1475. var _this2 = this;
  1476. var gridSquareClass = i == 0 ? 'clsColorBoxStyle_white' : 'clsColorBoxStyle';
  1477. return _react2.default.createElement(
  1478. 'div',
  1479. { id: 'gridIndex' + i, key: i, style: colorStyle, className: gridSquareClass, onClick: function onClick(element) {
  1480. return _this2.setColor(element, colorStyle.backgroundColor, i % 13 == 0);
  1481. } },
  1482. _react2.default.createElement('div', { id: 'gridSelector' + i, className: 'clsSelector', style: { display: 'none', backgroundColor: colorStyle.backgroundColor } })
  1483. );
  1484. };
  1485. ColorGrid.prototype.render = function render() {
  1486. return _react2.default.createElement(
  1487. 'div',
  1488. { style: { width: '550px' } },
  1489. this.colorNodes
  1490. );
  1491. };
  1492. return ColorGrid;
  1493. }(_react.Component);
  1494. ColorGrid.propTypes = {
  1495. onColorChange: _propTypes2.default.func,
  1496. color: _propTypes2.default.string
  1497. };
  1498. exports.default = ColorGrid;
  1499. /***/ }),
  1500. /* 23 */
  1501. /***/ (function(module, exports, __webpack_require__) {
  1502. "use strict";
  1503. exports.__esModule = true;
  1504. var _react = __webpack_require__(0);
  1505. var _react2 = _interopRequireDefault(_react);
  1506. var _reactDom = __webpack_require__(6);
  1507. var _reactDom2 = _interopRequireDefault(_reactDom);
  1508. var _propTypes = __webpack_require__(2);
  1509. var _propTypes2 = _interopRequireDefault(_propTypes);
  1510. var _ColorWheel = __webpack_require__(20);
  1511. var _ColorWheel2 = _interopRequireDefault(_ColorWheel);
  1512. var _ColorGrid = __webpack_require__(22);
  1513. var _ColorGrid2 = _interopRequireDefault(_ColorGrid);
  1514. var _ColorConversion = __webpack_require__(21);
  1515. var _ColorConversion2 = _interopRequireDefault(_ColorConversion);
  1516. var _PaletteAlgorithms = __webpack_require__(39);
  1517. var _PaletteAlgorithms2 = _interopRequireDefault(_PaletteAlgorithms);
  1518. var _underscore = __webpack_require__(5);
  1519. var _underscore2 = _interopRequireDefault(_underscore);
  1520. var _StringResources = __webpack_require__(1);
  1521. var _StringResources2 = _interopRequireDefault(_StringResources);
  1522. var _caUiToolkit = __webpack_require__(3);
  1523. __webpack_require__(4);
  1524. var _delete_ = __webpack_require__(17);
  1525. var _delete_2 = _interopRequireDefault(_delete_);
  1526. var _addFilled_ = __webpack_require__(24);
  1527. var _addFilled_2 = _interopRequireDefault(_addFilled_);
  1528. var _repeat_ = __webpack_require__(40);
  1529. var _repeat_2 = _interopRequireDefault(_repeat_);
  1530. function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
  1531. function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
  1532. function _possibleConstructorReturn(self, call) { if (!self) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return call && (typeof call === "object" || typeof call === "function") ? call : self; }
  1533. function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function, not " + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; } /**
  1534. * Licensed Materials - Property of IBM
  1535. * IBM Cognos Products: BI
  1536. * (C) Copyright IBM Corp. 2018, 2020
  1537. * US Government Users Restricted Rights - Use, duplication or disclosure restricted by GSA ADP Schedule Contract with IBM Corp.
  1538. */
  1539. // CustomPalette class
  1540. var CustomPalette = function (_Component) {
  1541. _inherits(CustomPalette, _Component);
  1542. // Constructor
  1543. // State consists of property to define whether or not the dialog is open or closed, the selectedTab for the tab panel and the selected item in the select drop down list
  1544. function CustomPalette(props) {
  1545. _classCallCheck(this, CustomPalette);
  1546. var _this = _possibleConstructorReturn(this, _Component.call(this, props));
  1547. _this.componentDidMount = function () {
  1548. //Check to see if a palette definition exists (opening a palette for edit or duplicating)
  1549. //If one exists set state and properties accordingly from the palette definition
  1550. if (_this.props.paletteDef) {
  1551. var paletteColors = void 0,
  1552. paletteType = void 0;
  1553. if (_this.props.paletteDef.fillType === 'continuous') {
  1554. paletteType = 'continuous';
  1555. paletteColors = _underscore2.default.map(_this.props.paletteDef.fills, function (aFill) {
  1556. return aFill.fill;
  1557. });
  1558. } else {
  1559. paletteType = 'standard';
  1560. paletteColors = _underscore2.default.map(_this.props.paletteDef.fills, function (aFill) {
  1561. return aFill.toUpperCase();
  1562. });
  1563. }
  1564. _this.setState({
  1565. paletteColors: paletteColors,
  1566. paletteType: paletteType,
  1567. currentSelectIndex: 0,
  1568. paletteNameValue: _this.props.paletteDef.label,
  1569. swatchCount: paletteColors.length
  1570. });
  1571. }
  1572. };
  1573. _this.addSwatchEntry = function () {
  1574. if (_this.state.paletteType == 'continuous') {
  1575. if (_this.state.swatchCount > 8) {
  1576. return;
  1577. }
  1578. var newPaletteColors = [];
  1579. for (var i = 0; i < _this.state.paletteColors.length; i++) {
  1580. newPaletteColors.push(_this.state.paletteColors[i]);
  1581. }
  1582. newPaletteColors.push('#FFFFFF');
  1583. _this.setState({
  1584. swatchCount: newPaletteColors.length,
  1585. currentSelectIndex: newPaletteColors.length - 1,
  1586. paletteColors: newPaletteColors
  1587. });
  1588. } else {
  1589. var count = _this.state.swatchCount + 1;
  1590. _this.setState({
  1591. swatchCount: count,
  1592. currentSelectIndex: count - 1
  1593. });
  1594. }
  1595. };
  1596. _this.removeSwatchEntry = function () {
  1597. if (_this.state.swatchCount < 3) {
  1598. return;
  1599. }
  1600. var newPaletteColors = [];
  1601. for (var i = 0; i < _this.state.paletteColors.length; i++) {
  1602. if (i != _this.state.currentSelectIndex) {
  1603. newPaletteColors.push(_this.state.paletteColors[i]);
  1604. }
  1605. }
  1606. var newCount = _this.state.swatchCount - 1;
  1607. // if it was the last one, move the index, otherwise leave it alone
  1608. var selectedIndex = _this.state.currentSelectIndex >= newCount ? newCount - 1 : _this.state.currentSelectIndex;
  1609. _this.setState({
  1610. paletteColors: newPaletteColors,
  1611. currentSelectIndex: selectedIndex,
  1612. swatchCount: newCount
  1613. });
  1614. };
  1615. _this.reversePalette = function () {
  1616. var newPaletteColors = [];
  1617. if (_this.state.paletteType == 'standard') {
  1618. // add any padded empty cells to the front
  1619. for (var i = 0; i < _this.state.swatchCount - _this.state.paletteColors.length; i++) {
  1620. newPaletteColors.push(null);
  1621. }
  1622. }
  1623. for (var _i = _this.state.paletteColors.length - 1; _i >= 0; _i--) {
  1624. newPaletteColors.push(_this.state.paletteColors[_i]);
  1625. }
  1626. var newSelectedIndex = _this.state.swatchCount - 1 - _this.state.currentSelectIndex;
  1627. _this.setState({
  1628. paletteColors: newPaletteColors,
  1629. currentSelectIndex: newSelectedIndex
  1630. });
  1631. };
  1632. _this.generateSwatches = function () {
  1633. var swatches = [];
  1634. for (var i = 0; i < _this.state.swatchCount; i++) {
  1635. swatches.push(_this.getSwatch(i));
  1636. }
  1637. return swatches;
  1638. };
  1639. _this.applyPaletteColor = function () {
  1640. var namePresent = !!_this.state.paletteNameValue;
  1641. var sufficientColors = false;
  1642. var paletteFills = null;
  1643. var currFillType = null;
  1644. if (_this.state.paletteType == 'continuous') {
  1645. paletteFills = _this.deriveContinuousFills();
  1646. sufficientColors = paletteFills.length > 1;
  1647. currFillType = 'continuous';
  1648. } else {
  1649. paletteFills = _this.state.paletteColors.filter(_this.removeEmptySwatches);
  1650. currFillType = 'simple';
  1651. sufficientColors = paletteFills.length > 1;
  1652. }
  1653. if (!namePresent || !sufficientColors) {
  1654. _this.setState({
  1655. noName: !namePresent,
  1656. insufficientColors: !sufficientColors
  1657. });
  1658. return;
  1659. }
  1660. var palette = { label: _this.state.paletteNameValue, fillType: currFillType, fills: paletteFills };
  1661. var isPublic = _this.props.type == 'global';
  1662. var paletteServicePromise = _this.props.paletteService ? Promise.resolve(_this.props.paletteService) : _this.props.glassContext.getSvc('.Palette');
  1663. if (_this.props.paletteDef && _this.props.paletteId) {
  1664. var options = { id: _this.props.paletteId, palette: palette };
  1665. paletteServicePromise.then(function (service) {
  1666. service.updatePalette(options).then(function () {
  1667. _this.closeDialog();
  1668. }, function (error) {
  1669. console.log(error);
  1670. });
  1671. });
  1672. } else if (!isPublic) {
  1673. paletteServicePromise.then(function (service) {
  1674. service.createPalette({ palette: palette }).then(function (paletteId) {
  1675. if (_this.props.onPaletteCreated) {
  1676. _this.props.onPaletteCreated(paletteId);
  1677. }
  1678. _this.closeDialog();
  1679. }, function (error) {
  1680. console.log(error);
  1681. });
  1682. });
  1683. } else if (isPublic) {
  1684. paletteServicePromise.then(function (service) {
  1685. service.createPalette({ palette: palette, public: isPublic }).then(function (paletteId) {
  1686. if (_this.props.onPaletteCreated) {
  1687. _this.props.onPaletteCreated(paletteId);
  1688. }
  1689. _this.closeDialog();
  1690. }, function (error) {
  1691. console.log(error);
  1692. });
  1693. });
  1694. }
  1695. };
  1696. _this.openDialog = function () {
  1697. _this.setState({ isDialogOpen: true });
  1698. };
  1699. _this.closeDialog = function () {
  1700. _this.setState({ isDialogOpen: false });
  1701. if (_this.props.removeDialog) {
  1702. _this.props.removeDialog();
  1703. }
  1704. };
  1705. _this.swatchWrapperRef = null;
  1706. _this.continousWrapperRef = null;
  1707. _this.state = {
  1708. isDialogOpen: props.isDialogOpen || false,
  1709. selectedTab: 'idColorGrid',
  1710. selectedColorType: 'RGB',
  1711. paletteNameValue: '',
  1712. radioGroupSelectedOption: 'auto',
  1713. swatchCount: _this.props.paletteType == 'continuous' ? 2 : 10,
  1714. paletteDirection: 'forward',
  1715. paletteType: 'standard',
  1716. currentSelectIndex: 0,
  1717. insufficientColors: false,
  1718. noName: false,
  1719. paletteColors: _this.props.paletteType == 'continuous' ? ['#FFFFFF', '#FFFFFF'] : []
  1720. };
  1721. return _this;
  1722. }
  1723. /**
  1724. * componentDidMount - Lifecycle method. Executes before first render. Executes when the element is inserted into the virtual DOM but before the HTML node itself can be manipulated.
  1725. * Use this point to configure the element as required based on properties passed upon creation
  1726. **/
  1727. /**
  1728. * componentDidUpdate - Lifecycle method. Executes after first render and any time a render is executed. Use this opportunity to manipulate the HTML node as required.
  1729. * @param {Object} prevProps - Object holding the key value pairs of the previous properties used to render this element
  1730. * @param {Object} prevState - Object holding the key value pairs of the previous state used to render this element
  1731. **/
  1732. CustomPalette.prototype.componentDidUpdate = function componentDidUpdate(prevProps, prevState) {
  1733. if (this.props.paletteType && this.state.paletteType != prevProps.paletteType) {
  1734. this.setState({ paletteType: this.props.paletteType });
  1735. }
  1736. if (this.state.paletteType == 'continuous') {
  1737. if (this.swatchWrapperRef) {
  1738. this.swatchWrapperRef.style.display = 'none';
  1739. }
  1740. if (this.continousWrapperRef) {
  1741. this.continousWrapperRef.style.display = 'block';
  1742. }
  1743. if (this.state.paletteType != prevState.paletteType) {
  1744. var colorGuide = this.state.paletteType == 'continuous' ? 'custom' : this.state.radioGroupSelectedOption;
  1745. this.setState({ radioGroupSelectedOption: colorGuide });
  1746. }
  1747. } else if (this.state.paletteType == 'standard') {
  1748. if (this.continousWrapperRef) {
  1749. this.continousWrapperRef.style.display = 'none';
  1750. }
  1751. if (this.swatchWrapperRef) {
  1752. this.swatchWrapperRef.style.display = 'block';
  1753. }
  1754. }
  1755. if (this.state.swatchCount > 12 && this.swatchWrapperRef) {
  1756. this.swatchWrapperRef.style.height = '80px';
  1757. } else if (this.swatchWrapperRef) {
  1758. this.swatchWrapperRef.style.height = '40px';
  1759. }
  1760. };
  1761. /**
  1762. * addSwatchEntry - Add a swatch to the end of the dialog
  1763. **/
  1764. /**
  1765. * removeEntryAtIndex - Remove the color entry in paletteColors at the corresponding index
  1766. **/
  1767. /**
  1768. * reversePalette - Change the order of the colors in the swatches as well as the corresponding palette array.
  1769. * In the case of continuous palettes change the direction of the gradient preview
  1770. **/
  1771. /**
  1772. * getSwatch - Creates a swatch element at the given index and sets the corresponding className, id, style, swatchindex properties
  1773. * Also sets the swatch element onClick and ref attributes
  1774. * @param {Number} i - Index of the current swatch element being created
  1775. **/
  1776. CustomPalette.prototype.getSwatch = function getSwatch(i) {
  1777. var backgroundColor = i < this.state.paletteColors.length ? this.state.paletteColors[i] : '#FFFFFF';
  1778. var hasPalette = i < this.state.paletteColors.length && this.state.paletteColors[i];
  1779. var isSelected = i == this.state.currentSelectIndex;
  1780. var className = isSelected && !hasPalette ? 'clsSwatchStyle_selected' : isSelected && hasPalette ? 'clsSwatchStyle_filled_selected' : hasPalette ? 'clsSwatchStyle_filled' : 'clsSwatchStyle_empty';
  1781. return _react2.default.createElement('div', { className: className, key: 'swatch' + i, id: 'swatch' + i, style: { backgroundColor: backgroundColor }, onClick: this.selectSwatch.bind(this, i) });
  1782. };
  1783. CustomPalette.prototype.selectSwatch = function selectSwatch(swatchIndex) {
  1784. if (swatchIndex != this.state.currentSelectIndex) {
  1785. this.setState({ currentSelectIndex: swatchIndex });
  1786. }
  1787. };
  1788. CustomPalette.prototype.onColorChange = function onColorChange(color, isGreyScale) {
  1789. var newPaletteColors = [];
  1790. var selectedIndex = this.state.currentSelectIndex || 0;
  1791. for (var i = 0; i < this.state.paletteColors.length; i++) {
  1792. newPaletteColors.push(this.state.paletteColors[i]);
  1793. }
  1794. if (this.state.radioGroupSelectedOption == 'custom') {
  1795. newPaletteColors[selectedIndex] = color;
  1796. } else if (this.state.radioGroupSelectedOption == 'auto') {
  1797. var hslColor = _ColorConversion2.default.convertRgbToHsl(color);
  1798. var swatchCount = this.state.swatchCount - this.state.currentSelectIndex;
  1799. var hslColors = isGreyScale ? _PaletteAlgorithms2.default.createPaletteViaLight(swatchCount, hslColor, isGreyScale) : _PaletteAlgorithms2.default.createPaletteViaHue(swatchCount, hslColor, isGreyScale);
  1800. newPaletteColors[selectedIndex] = color;
  1801. // start from 1, leaving the current "seed" color unchanged to avoid roundoff in RGB->HSL->RGB
  1802. for (var _i2 = 1; _i2 < hslColors.length; _i2++) {
  1803. var rgbVal = _ColorConversion2.default.convertHslToRgb(hslColors[_i2]);
  1804. var rgbHex = _ColorConversion2.default.convertRgbValToRgbHex(rgbVal);
  1805. newPaletteColors[selectedIndex + _i2] = rgbHex;
  1806. }
  1807. }
  1808. // we always set insufficient colors to false (even if there is not enough) on a color change to keep the error indicator from being noisy
  1809. this.setState({
  1810. paletteColors: newPaletteColors,
  1811. insufficientColors: false
  1812. });
  1813. };
  1814. CustomPalette.prototype.removeEmptySwatches = function removeEmptySwatches(currentSwatch) {
  1815. return !!currentSwatch;
  1816. };
  1817. CustomPalette.prototype.deriveContinuousFills = function deriveContinuousFills() {
  1818. var fillsCopy = this.state.paletteColors.filter(this.removeEmptySwatches);
  1819. // this only supports 2 colors
  1820. if (fillsCopy.length < 2) {
  1821. return [];
  1822. }
  1823. var contFills = [];
  1824. var step = 1 / (fillsCopy.length - 1);
  1825. for (var i = 0; i < fillsCopy.length; i++) {
  1826. var currFill = {
  1827. fill: fillsCopy[i],
  1828. at: step * i
  1829. };
  1830. contFills.push(currFill);
  1831. }
  1832. return contFills;
  1833. };
  1834. CustomPalette.prototype.changePaletteType = function changePaletteType(val) {
  1835. if (this.state.paletteType == val) {
  1836. return;
  1837. }
  1838. this.setState({
  1839. paletteType: val,
  1840. paletteColors: val == 'standard' ? [] : ['#FFFFFF', '#FFFFFF'],
  1841. currentSelectIndex: 0,
  1842. swatchCount: val == 'standard' ? 10 : 2
  1843. });
  1844. };
  1845. CustomPalette.prototype.getContinuousPreview = function getContinuousPreview() {
  1846. var fillsCopy = this.state.paletteColors.filter(this.removeEmptySwatches);
  1847. var gradientColor = '#FFFFFF';
  1848. if (fillsCopy.length > 1) {
  1849. gradientColor = 'linear-gradient(to right, ' + fillsCopy.join(',') + ')';
  1850. }
  1851. var fillSelectors = [];
  1852. if (this.state.swatchCount > 1) {
  1853. for (var i = 0; i < this.state.swatchCount; i++) {
  1854. var className = i == this.state.currentSelectIndex ? 'clsSelector' : 'clsContinuousIndicator';
  1855. fillSelectors.push(_react2.default.createElement(
  1856. 'div',
  1857. { key: 'selector_' + i, className: 'clsContinuousIndicatorContainer' },
  1858. _react2.default.createElement('div', { className: className, style: { backgroundColor: this.state.paletteColors[i] }, onClick: this.selectSwatch.bind(this, i) })
  1859. ));
  1860. }
  1861. }
  1862. var roundedEdgeClass = '';
  1863. if (this.state.currentSelectIndex == 0) {
  1864. roundedEdgeClass = ' clsContinuousPreviewRoundLeft';
  1865. } else if (this.state.swatchCount == this.state.currentSelectIndex + 1) {
  1866. roundedEdgeClass = ' clsContinuousPreviewRoundRight';
  1867. }
  1868. return _react2.default.createElement(
  1869. 'div',
  1870. { style: { background: gradientColor }, id: 'idContinuousPreview', className: 'clsContinuousPreview' + roundedEdgeClass },
  1871. fillSelectors
  1872. );
  1873. };
  1874. CustomPalette.prototype.getContinuousButtons = function getContinuousButtons() {
  1875. var _this2 = this;
  1876. return _react2.default.createElement(
  1877. 'tbody',
  1878. null,
  1879. _react2.default.createElement(
  1880. 'tr',
  1881. null,
  1882. _react2.default.createElement(
  1883. 'td',
  1884. null,
  1885. _react2.default.createElement(
  1886. 'div',
  1887. { className: this.state.paletteType == 'standard' ? 'clsPaletteIcons_wrapper_selected' : 'clsPaletteIcons_wrapper' },
  1888. _react2.default.createElement('div', {
  1889. className: 'clsPaletteStandard',
  1890. id: 'imgStandardPalette',
  1891. value: 'standard',
  1892. onClick: function onClick() {
  1893. return _this2.changePaletteType('standard');
  1894. },
  1895. title: _StringResources2.default.get('standardPalette')
  1896. })
  1897. )
  1898. ),
  1899. _react2.default.createElement(
  1900. 'td',
  1901. null,
  1902. _react2.default.createElement(
  1903. 'div',
  1904. { className: this.state.paletteType == 'continuous' ? 'clsPaletteIcons_wrapper_selected' : 'clsPaletteIcons_wrapper' },
  1905. _react2.default.createElement('div', {
  1906. className: 'clsPaletteGradient',
  1907. id: 'imgContinuousPalette',
  1908. value: 'continuous',
  1909. onClick: function onClick() {
  1910. return _this2.changePaletteType('continuous');
  1911. },
  1912. title: _StringResources2.default.get('continuousPalette')
  1913. })
  1914. )
  1915. )
  1916. )
  1917. );
  1918. };
  1919. CustomPalette.prototype.navigateSwatch = function navigateSwatch(e) {
  1920. var currentIndex = this.state.currentSelectIndex;
  1921. var key = e.keyCode;
  1922. switch (key) {
  1923. case 37:
  1924. // left arrow
  1925. if (currentIndex > 0) this.setState({ currentSelectIndex: currentIndex - 1 });
  1926. break;
  1927. case 39:
  1928. // right arrow
  1929. if (currentIndex != this.state.swatchCount - 1) this.setState({ currentSelectIndex: currentIndex + 1 });
  1930. break;
  1931. }
  1932. };
  1933. CustomPalette.prototype.navigatePaletteType = function navigatePaletteType(e) {
  1934. var key = e.keyCode;
  1935. switch (key) {
  1936. case 37:
  1937. // left arrow
  1938. if (this.state.paletteType == 'continuous') this.changePaletteType('standard');
  1939. break;
  1940. case 39:
  1941. // right arrow
  1942. if (this.state.paletteType == 'standard') this.changePaletteType('continuous');
  1943. break;
  1944. }
  1945. };
  1946. // Function used to render the CustomPalette element (dialog)
  1947. CustomPalette.prototype.render = function render() {
  1948. var _this3 = this;
  1949. var swatch = this.generateSwatches();
  1950. var options = [];
  1951. if (this.state.paletteType == 'continuous') {
  1952. options = [{ label: _StringResources2.default.get('modeAutomatic'), value: 'auto', disabled: true }, { label: _StringResources2.default.get('modeCustom'), value: 'custom', checked: true }];
  1953. } else {
  1954. options = [{ label: _StringResources2.default.get('modeAutomatic'), value: 'auto' }, { label: _StringResources2.default.get('modeCustom'), value: 'custom', checked: true }];
  1955. }
  1956. var myList = [{ value: 'RGB', label: _StringResources2.default.get('modelRGB') }, { value: 'HSB', label: _StringResources2.default.get('modelHSB') }];
  1957. var continuousStandardBtns = this.props.userClass && this.props.userClass == 'admin' ? this.getContinuousButtons() : null;
  1958. var continuousPreview = null;
  1959. if (this.state.paletteType == 'continuous') {
  1960. continuousPreview = this.getContinuousPreview();
  1961. }
  1962. var dialogTitle = this.state.paletteType == 'continuous' ? _StringResources2.default.get('createContinuousPalette') : _StringResources2.default.get('createStandardPalette');
  1963. var colorWarningText = this.state.insufficientColors ? _StringResources2.default.get('errorInsufficientColors') : '';
  1964. return this.state.isDialogOpen && _react2.default.createElement(
  1965. 'div',
  1966. null,
  1967. _react2.default.createElement(
  1968. _caUiToolkit.Dialog,
  1969. { width: '725px', onClose: this.closeDialog, startingFocusIndex: 0 },
  1970. _react2.default.createElement(
  1971. _caUiToolkit.Dialog.Header,
  1972. null,
  1973. dialogTitle
  1974. ),
  1975. _react2.default.createElement(
  1976. _caUiToolkit.Dialog.Body,
  1977. null,
  1978. _react2.default.createElement(
  1979. 'table',
  1980. { style: { width: '100%', height: '82px' } },
  1981. _react2.default.createElement(
  1982. 'tbody',
  1983. null,
  1984. _react2.default.createElement(
  1985. 'tr',
  1986. null,
  1987. _react2.default.createElement(
  1988. 'td',
  1989. { style: { width: '75%', verticalAlign: 'top' } },
  1990. _react2.default.createElement(_caUiToolkit.Label, { label: _StringResources2.default.get('paletteName'), id: 'idNameLabel', htmlFor: 'idPaletteName', type: 'caption' }),
  1991. _react2.default.createElement(_caUiToolkit.TextInput, {
  1992. placeholder: _StringResources2.default.get('paletteNamePlaceholder'),
  1993. id: 'idPaletteName',
  1994. value: this.state.paletteNameValue,
  1995. onChange: function onChange(value) {
  1996. return _this3.setState({ paletteNameValue: value, noName: !value });
  1997. },
  1998. style: { width: '100%' },
  1999. label: _StringResources2.default.get('paletteName'),
  2000. autoFocus: true,
  2001. validationErrorText: _StringResources2.default.get('errorNoName'),
  2002. hasValidationError: this.state.noName
  2003. })
  2004. ),
  2005. _react2.default.createElement(
  2006. 'td',
  2007. { style: { float: 'right' } },
  2008. _react2.default.createElement(
  2009. 'table',
  2010. { style: { marginTop: '15px' }, tabIndex: continuousStandardBtns ? '0' : '-1', onKeyDown: this.navigatePaletteType.bind(this) },
  2011. continuousStandardBtns
  2012. )
  2013. )
  2014. )
  2015. )
  2016. ),
  2017. _react2.default.createElement(
  2018. 'div',
  2019. { className: 'clsPaletteContainer', style: { margin: '6px 0px 6px' } },
  2020. _react2.default.createElement(
  2021. 'table',
  2022. { style: { width: '100%' } },
  2023. _react2.default.createElement(
  2024. 'tbody',
  2025. null,
  2026. _react2.default.createElement(
  2027. 'tr',
  2028. null,
  2029. _react2.default.createElement(
  2030. 'td',
  2031. { style: { width: '90%' } },
  2032. _react2.default.createElement(
  2033. 'div',
  2034. { style: { height: '40px', width: '95%', overflow: 'auto' }, ref: function ref(element) {
  2035. _this3.swatchWrapperRef = element;
  2036. }, tabIndex: '0', onKeyDown: this.navigateSwatch.bind(this) },
  2037. swatch
  2038. ),
  2039. _react2.default.createElement(
  2040. 'div',
  2041. { style: { height: '40px', width: '95%', overflow: 'auto', display: 'none' }, ref: function ref(element) {
  2042. _this3.continousWrapperRef = element;
  2043. }, tabIndex: '0', onKeyDown: this.navigateSwatch.bind(this) },
  2044. continuousPreview
  2045. )
  2046. ),
  2047. _react2.default.createElement(
  2048. 'td',
  2049. null,
  2050. _react2.default.createElement(
  2051. 'div',
  2052. { id: 'idDelSwatchDiv', style: { float: 'right' } },
  2053. _react2.default.createElement(_caUiToolkit.Button, {
  2054. id: 'idDelSwatch',
  2055. intent: 'primary',
  2056. icon: _delete_2.default.id,
  2057. iconSize: 'small',
  2058. variant: 'icon',
  2059. onClick: this.removeSwatchEntry,
  2060. title: _StringResources2.default.get('removeSwatch'),
  2061. tabIndex: 0
  2062. })
  2063. )
  2064. ),
  2065. _react2.default.createElement(
  2066. 'td',
  2067. null,
  2068. _react2.default.createElement(_caUiToolkit.Separator, {
  2069. orientation: 'vertical',
  2070. style: { height: '20px', color: '#C0BFC0' }
  2071. })
  2072. ),
  2073. _react2.default.createElement(
  2074. 'td',
  2075. null,
  2076. _react2.default.createElement(
  2077. 'div',
  2078. { id: 'idAddSwatchDiv', style: { float: 'left' } },
  2079. _react2.default.createElement(_caUiToolkit.Button, {
  2080. id: 'idAddSwatch',
  2081. intent: 'primary',
  2082. icon: _addFilled_2.default.id,
  2083. iconSize: 'small',
  2084. variant: 'icon',
  2085. onClick: this.addSwatchEntry,
  2086. title: _StringResources2.default.get('addSwatch'),
  2087. tabIndex: 0
  2088. })
  2089. )
  2090. ),
  2091. _react2.default.createElement(
  2092. 'td',
  2093. { style: { paddingRight: '10px' } },
  2094. _react2.default.createElement(
  2095. 'div',
  2096. { id: 'idReverse', style: { float: 'left' } },
  2097. _react2.default.createElement(_caUiToolkit.Button, {
  2098. id: 'idReverse',
  2099. intent: 'primary',
  2100. icon: _repeat_2.default.id,
  2101. iconSize: 'small',
  2102. variant: 'icon',
  2103. onClick: this.reversePalette.bind(this),
  2104. title: _StringResources2.default.get('reversePalette'),
  2105. tabIndex: 0
  2106. })
  2107. )
  2108. )
  2109. )
  2110. )
  2111. ),
  2112. _react2.default.createElement(
  2113. 'span',
  2114. { style: { fontSize: '0.75rem', fontWeight: 'bold', color: '#e62325', wordBreak: 'break-word', wordWrap: 'break-word' } },
  2115. colorWarningText,
  2116. '\xA0'
  2117. )
  2118. ),
  2119. _react2.default.createElement(
  2120. 'div',
  2121. null,
  2122. _react2.default.createElement(
  2123. _caUiToolkit.Tabs,
  2124. { selected: this.state.selectedTab, onChange: function onChange(tabId) {
  2125. return _this3.setState({ selectedTab: tabId });
  2126. } },
  2127. _react2.default.createElement(
  2128. _caUiToolkit.TabPanel,
  2129. { keepTabContent: true, id: 'idColorGrid', label: _StringResources2.default.get('grid') },
  2130. _react2.default.createElement(
  2131. 'div',
  2132. { style: { height: '275px', paddingTop: '24px' } },
  2133. _react2.default.createElement(
  2134. 'table',
  2135. null,
  2136. _react2.default.createElement(
  2137. 'tbody',
  2138. null,
  2139. _react2.default.createElement(
  2140. 'tr',
  2141. null,
  2142. _react2.default.createElement(
  2143. 'td',
  2144. { style: { width: '10%', verticalAlign: 'top' } },
  2145. _react2.default.createElement(_caUiToolkit.Label, { label: _StringResources2.default.get('colorGuide'), id: 'idRadioGridLabel', htmlFor: 'idGridRadioGroup', type: 'caption' }),
  2146. _react2.default.createElement(_caUiToolkit.RadioGroup, {
  2147. id: 'idGridRadioGroup',
  2148. direction: 'vertical',
  2149. options: options,
  2150. onChange: function onChange(val) {
  2151. return _this3.setState({ radioGroupSelectedOption: val });
  2152. },
  2153. checked: this.state.radioGroupSelectedOption,
  2154. tabIndex: 0,
  2155. 'aria-labelledby': 'idRadioGridLabel'
  2156. })
  2157. ),
  2158. _react2.default.createElement(
  2159. 'td',
  2160. { style: { width: '90%', paddingLeft: '24px' } },
  2161. _react2.default.createElement(_ColorGrid2.default, {
  2162. id: 'idColorGridComponent',
  2163. onColorChange: this.onColorChange.bind(this),
  2164. color: this.state.paletteColors[this.state.currentSelectIndex]
  2165. })
  2166. )
  2167. )
  2168. )
  2169. )
  2170. )
  2171. ),
  2172. _react2.default.createElement(
  2173. _caUiToolkit.TabPanel,
  2174. { keepTabContent: true, id: 'idColorWheel', label: _StringResources2.default.get('wheel') },
  2175. _react2.default.createElement(
  2176. 'div',
  2177. { style: { height: '275px', paddingTop: '24px' } },
  2178. _react2.default.createElement(
  2179. 'table',
  2180. null,
  2181. _react2.default.createElement(
  2182. 'tbody',
  2183. null,
  2184. _react2.default.createElement(
  2185. 'tr',
  2186. null,
  2187. _react2.default.createElement(
  2188. 'td',
  2189. { style: { width: '10%', verticalAlign: 'top' } },
  2190. _react2.default.createElement(
  2191. 'table',
  2192. null,
  2193. _react2.default.createElement(
  2194. 'tbody',
  2195. null,
  2196. _react2.default.createElement(
  2197. 'tr',
  2198. null,
  2199. _react2.default.createElement(
  2200. 'td',
  2201. null,
  2202. _react2.default.createElement(_caUiToolkit.Label, { label: _StringResources2.default.get('colorModel'), id: 'idSelectGroupLabel', htmlFor: 'idSelectGroup', type: 'caption' }),
  2203. _react2.default.createElement(_caUiToolkit.Select, {
  2204. id: 'idSelectGroup',
  2205. selected: this.state.selectedColorType,
  2206. fixedWidth: true,
  2207. options: myList,
  2208. onChange: function onChange(value) {
  2209. return _this3.setState({ selectedColorType: value });
  2210. },
  2211. customWidth: '100px',
  2212. variant: 'frame'
  2213. })
  2214. )
  2215. ),
  2216. _react2.default.createElement(
  2217. 'tr',
  2218. null,
  2219. _react2.default.createElement(
  2220. 'td',
  2221. { style: { paddingTop: '10px' } },
  2222. _react2.default.createElement(_caUiToolkit.Label, { label: _StringResources2.default.get('colorGuide'), id: 'idRadioWheelLabel', htmlFor: 'idWheelRadioGroup', type: 'caption' }),
  2223. _react2.default.createElement(_caUiToolkit.RadioGroup, {
  2224. id: 'idWheelRadioGroup',
  2225. direction: 'vertical',
  2226. options: options,
  2227. onChange: function onChange(val) {
  2228. return _this3.setState({ radioGroupSelectedOption: val });
  2229. },
  2230. checked: this.state.radioGroupSelectedOption,
  2231. 'aria-labelledby': 'idRadioWheelLabel'
  2232. })
  2233. )
  2234. )
  2235. )
  2236. )
  2237. ),
  2238. _react2.default.createElement(
  2239. 'td',
  2240. { style: { width: '90%', paddingLeft: '24px' } },
  2241. _react2.default.createElement(_ColorWheel2.default, {
  2242. id: 'idColorWheelComponent',
  2243. onColorChange: this.onColorChange.bind(this),
  2244. selectedColorType: this.state.selectedColorType,
  2245. color: this.state.paletteColors[this.state.currentSelectIndex]
  2246. })
  2247. )
  2248. )
  2249. )
  2250. )
  2251. )
  2252. )
  2253. )
  2254. )
  2255. ),
  2256. _react2.default.createElement(
  2257. _caUiToolkit.Dialog.Footer,
  2258. null,
  2259. _react2.default.createElement(_caUiToolkit.Dialog.Button, { id: 'idSaveBtn', label: _StringResources2.default.get('saveDialog'), onClick: this.applyPaletteColor, tabIndex: 0, intent: 'primary', variant: 'solid' }),
  2260. _react2.default.createElement(_caUiToolkit.Dialog.Button, { id: 'idCancelBtn', label: _StringResources2.default.get('cancelDialog'), onClick: this.closeDialog, tabIndex: 0, intent: 'primary', variant: 'frame' })
  2261. )
  2262. )
  2263. ) || null;
  2264. };
  2265. return CustomPalette;
  2266. }(_react.Component);
  2267. CustomPalette.propTypes = {
  2268. glassContext: _propTypes2.default.object,
  2269. paletteDef: _propTypes2.default.string,
  2270. paletteId: _propTypes2.default.string,
  2271. onPaletteCreated: _propTypes2.default.func,
  2272. removeDialog: _propTypes2.default.func,
  2273. type: _propTypes2.default.string,
  2274. userClass: _propTypes2.default.string,
  2275. paletteType: _propTypes2.default.string,
  2276. isDialogOpen: _propTypes2.default.bool,
  2277. paletteService: _propTypes2.default.object
  2278. };
  2279. CustomPalette.defaultProps = {
  2280. isDialogOpen: false
  2281. };
  2282. exports.default = CustomPalette;
  2283. CustomPalette.defaultProps = {
  2284. name: 'CustomPaletteDialog'
  2285. };
  2286. /***/ }),
  2287. /* 24 */
  2288. /***/ (function(module, exports, __webpack_require__) {
  2289. !function(e,o){if(true)module.exports=o(__webpack_require__(7));else if("function"==typeof define&&define.amd)define(["@ba-ui-toolkit/ba-graphics/dist/icons-js/ba-graphics-icons-commons.js"],o);else{var s=o("object"==typeof exports?require("@ba-ui-toolkit/ba-graphics/dist/icons-js/ba-graphics-icons-commons.js"):e["@ba-ui-toolkit/ba-graphics/dist/icons-js/ba-graphics-icons-commons.js"]);for(var a in s)("object"==typeof exports?exports:e)[a]=s[a]}}("undefined"!=typeof self?self:this,function(e){return webpackJsonPBaGraphics([2039],{"3865314c5959606874d4":function(o,s){o.exports=e},"4a8a183afccdc8d4e8ba":function(e,o,s){"use strict";Object.defineProperty(o,"__esModule",{value:!0});var a=s("3865314c5959606874d4"),i=(s.n(a),s("b837a5971597ddbe8592"));o.default=i.a},b837a5971597ddbe8592:function(e,o,s){"use strict";var a=s("9689a9c94ae38b47fa2c"),i=s.n(a),t=s("9ce58a7deea14f49ef01"),c=s.n(t),d=new i.a({id:"add--filled_16_v7",use:"add--filled_16_v7-usage",viewBox:"0 0 16 16",content:'<symbol xmlns="http://www.w3.org/2000/svg" viewBox="0 0 16 16" id="add--filled_16_v7"><path d="M8 1C4.2 1 1 4.2 1 8s3.2 7 7 7 7-3.2 7-7-3.2-7-7-7zm4 8H9v3H7V9H4V7h3V4h2v3h3v2z" /></symbol>'});c.a.add(d);o.a=d}},["4a8a183afccdc8d4e8ba"])});
  2290. /***/ }),
  2291. /* 25 */
  2292. /***/ (function(module, exports, __webpack_require__) {
  2293. "use strict";
  2294. exports.__esModule = true;
  2295. var _jszip = __webpack_require__(54);
  2296. var _jszip2 = _interopRequireDefault(_jszip);
  2297. var _StringResources = __webpack_require__(1);
  2298. var _StringResources2 = _interopRequireDefault(_StringResources);
  2299. function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
  2300. function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } } // Licensed Materials - Property of IBM
  2301. //
  2302. // IBM Watson Analytics
  2303. //
  2304. // (C) Copyright IBM Corp. 2019
  2305. //
  2306. // US Government Users Restricted Rights - Use, duplication or
  2307. // disclosure restricted by GSA ADP Schedule Contract with IBM Corp.
  2308. var MB = 1000000;
  2309. /**
  2310. * Utility class to load an SVG which can either be a single SVG or a zipped file containing one or more SVG's
  2311. */
  2312. var Loader = function Loader(_reader, _zipMaxSize, _imgMaxSize, _allowedFileExtensions) {
  2313. var _this = this;
  2314. _classCallCheck(this, Loader);
  2315. this.load = function (_files, _callback, _reject) {
  2316. try {
  2317. var results = [];
  2318. // Define the file info if not created
  2319. if (!_this._files) _this._files = {};
  2320. // Load each file returning a promise for each one
  2321. for (var i = 0; i < _files.length; i++) {
  2322. results.push(_this._loadFile(_files[i]));
  2323. }
  2324. // Process all the promises and when all have finished fire the callback
  2325. // function returning the list of svg names that have been loaded
  2326. Promise.all(results).then(function (_dataArray) {
  2327. // The result of the load will always return an array for each file
  2328. // even if one file is selected.
  2329. // Merge all arrays into one
  2330. var mergedArrays = [].concat.apply([], _dataArray);
  2331. return _callback(mergedArrays);
  2332. }.bind(_this), _reject);
  2333. } catch (_error) {
  2334. _reject(_error);
  2335. }
  2336. };
  2337. this.getFileAsBlob = function (_fileName) {
  2338. return new Promise(function (_resolve, _reject) {
  2339. var _fileData = this._getFileInfo(_fileName);
  2340. if (_fileData) {
  2341. if (_fileData.type === 'zip') {
  2342. try {
  2343. var file = {
  2344. name: _fileData.data[_fileName].name,
  2345. size: _fileData.data[_fileName]._data.uncompressedSize
  2346. };
  2347. this._verifyImgFileSize(file);
  2348. _fileData.data[_fileName].async('blob').catch(function (_error) {
  2349. _reject(_error);
  2350. }).then(function (_content) {
  2351. _resolve(_content);
  2352. });
  2353. } catch (_error) {
  2354. _reject(_error);
  2355. }
  2356. } else _resolve(_fileData.data);
  2357. } else _reject({ message: _StringResources2.default.get('schematicsInvalidSvgData') });
  2358. }.bind(_this));
  2359. };
  2360. this._listZip = function (_zip) {
  2361. var files = [];
  2362. Object.keys(_zip).forEach(function (_fileName) {
  2363. files.push(_fileName);
  2364. });
  2365. return files.filter(_this._isSVG);
  2366. };
  2367. this._loadFile = function (_file) {
  2368. var results = [];
  2369. var fileReader = !_this._reader ? new window.FileReader() : _this._reader;
  2370. var fileType = _file.name.toLowerCase().substr(-3);
  2371. if (_this._isSVG(_file.name) || _this._isAllowedFile(_file.name)) {
  2372. var data = _file;
  2373. _this._verifyImgFileSize(_file);
  2374. _this._files[_file.name] = _this._fileData(_file.name, fileType, data, _file.size);
  2375. results.push(_file.name);
  2376. return Promise.resolve(results);
  2377. } else if (!_this._allowedFileExtensions && _this._isZip(_file)) {
  2378. return new Promise(function (_resolve, _reject) {
  2379. fileReader.onload = function (e) {
  2380. // Zipped svgs
  2381. if (this._isZip(_file)) {
  2382. // Load asynchronously
  2383. _jszip2.default.loadAsync(e.target.result).then(function (jsZip) {
  2384. this._files[_file.name] = this._fileData(_file.name, 'zip', jsZip.files, _file.size);
  2385. // Get all SVG files in the zip
  2386. var files = this._listZip(jsZip.files);
  2387. for (var i = 0; i < files.length; i++) {
  2388. results.push(files[i]);
  2389. }
  2390. _resolve(results);
  2391. }.bind(this), function (error) {
  2392. _reject(error);
  2393. });
  2394. } else {
  2395. var data = _file;
  2396. this._files[_file.name] = this._fileData(_file.name, 'svg', data, _file.size);
  2397. results.push(_file.name);
  2398. _resolve(results);
  2399. }
  2400. }.bind(this);
  2401. try {
  2402. this._readFile(_file, fileReader);
  2403. } catch (e) {
  2404. _reject(e);
  2405. }
  2406. }.bind(_this));
  2407. } else {
  2408. throw new Error(_StringResources2.default.get('schematicsInvalidType', { type: _file.name }));
  2409. }
  2410. };
  2411. this._isZip = function (_file) {
  2412. return _file && _file.name && _file.name.toLowerCase().substr(-4) === '.zip' && (_file.type === 'application/x-zip-compressed' || _file.type === 'application/zip' || _file.type === 'application/x-compressed');
  2413. };
  2414. this._isSVG = function (_fileName) {
  2415. return _fileName.toLowerCase().substr(-4) === '.svg';
  2416. };
  2417. this._isAllowedFile = function (_fileName) {
  2418. return _this._allowedFileExtensions && _this._allowedFileExtensions.indexOf(_fileName.toLowerCase().substr(-4)) >= 0;
  2419. };
  2420. this._readFile = function (_file, _fileReader) {
  2421. if (_this._isZip(_file)) {
  2422. _this._verifyZipFileSize(_file);
  2423. _fileReader.readAsArrayBuffer(_file);
  2424. } else if (_this._isSVG(_file)) {
  2425. _this._verifyImgFileSize(_file);
  2426. _fileReader.readAsDataURL(_file);
  2427. } else {
  2428. throw Error(_StringResources2.default.get('schematicsInvalidType', { type: _file.name }));
  2429. }
  2430. };
  2431. this._verifyZipFileSize = function (_file) {
  2432. if (_file.size > _this._zipMaxSize * MB) {
  2433. throw Error(_StringResources2.default.get('schematicsInvalidSize', { file: _file.name, size: _file.size }));
  2434. }
  2435. };
  2436. this._verifyImgFileSize = function (_file) {
  2437. if (_file.size > _this._imgMaxSize * MB) {
  2438. throw Error(_StringResources2.default.get('schematicsInvalidSize', { file: _file.name, size: _file.size }));
  2439. }
  2440. };
  2441. this._fileData = function (_name, _type, _data) {
  2442. return {
  2443. 'name': _name,
  2444. 'type': _type,
  2445. 'data': _data
  2446. };
  2447. };
  2448. this._arrayFind = function (_arr, _obj) {
  2449. for (var idx = 0; idx < _arr.length; ++idx) {
  2450. if (_arr[idx] === _obj) return _obj;
  2451. }
  2452. return null;
  2453. };
  2454. this._getFileInfo = function (_fileName) {
  2455. var keys = Object.keys(_this._files);
  2456. var result;
  2457. // Check first if the file is in the list
  2458. var file = _this._arrayFind(keys, _fileName);
  2459. if (file) {
  2460. result = _this._files[file];
  2461. } else {
  2462. for (var i = 0; i < keys.length; i++) {
  2463. var key = keys[i];
  2464. var fileData = _this._files[key];
  2465. if (fileData.type === 'zip') {
  2466. file = _this._arrayFind(Object.keys(fileData.data), _fileName);
  2467. if (file) {
  2468. result = fileData;
  2469. break;
  2470. }
  2471. }
  2472. }
  2473. }
  2474. return result;
  2475. };
  2476. this._files = null;
  2477. if (_reader) this._reader = _reader;
  2478. if (_zipMaxSize) this._zipMaxSize = _zipMaxSize;
  2479. if (_imgMaxSize) this._imgMaxSize = _imgMaxSize;
  2480. this._allowedFileExtensions = _allowedFileExtensions;
  2481. }
  2482. /**
  2483. * Load one or more files or a single zip file
  2484. * @param {Array} _files Array of file names
  2485. * @param {Function} _callback The function to be called with the SVG file list
  2486. */
  2487. /**
  2488. * Get the svg contents
  2489. * @param {String} _fileName The file name
  2490. * @returns {Promise} Return a promise
  2491. */
  2492. /**
  2493. * List =the SVGs found in a zip file
  2494. * @param {String} _zip The filename
  2495. * @returns {Array} List of file names
  2496. */
  2497. /**
  2498. * Load a file
  2499. * @param {Object} _file The file object
  2500. * @param {FileReader} _fileReader A file reader object
  2501. * @returns {Promise} A promise that loads the file
  2502. */
  2503. /**
  2504. * Determine if the file is a zip file
  2505. * @param {File} _file A file object
  2506. * @returns {Boolean} true is the file is a zip
  2507. */
  2508. /**
  2509. * Read the file contents
  2510. * @param {File} _file A file object
  2511. * @param {FileReader} The file reader
  2512. */
  2513. /**
  2514. * Creates a file data object
  2515. * @param {String} _name
  2516. * @param {String} _type zip|svg
  2517. * @param {Object} _data Depending on the type this will be a map of ZipObjects or for single files, the svg text
  2518. * @returns {Object} The file data object
  2519. */
  2520. // IE do not support array.find()
  2521. /**
  2522. * Get file metadata
  2523. * @param {String} _fileName The file name
  2524. * @returns {Object} Return the file metadata. See _fileData()
  2525. */
  2526. ;
  2527. exports.default = Loader;
  2528. /***/ }),
  2529. /* 26 */
  2530. /***/ (function(module, exports, __webpack_require__) {
  2531. "use strict";
  2532. /**
  2533. * Licensed Materials - Property of IBM
  2534. * IBM Cognos Products: BI
  2535. * (C) Copyright IBM Corp. 2019
  2536. * US Government Users Restricted Rights - Use, duplication or disclosure restricted by GSA ADP Schedule Contract with IBM Corp.
  2537. */
  2538. var ToastEnum = {
  2539. INFO: 'info',
  2540. SUCCESS: 'success',
  2541. WARNING: 'warning',
  2542. ERROR: 'error'
  2543. };
  2544. Object.freeze(ToastEnum);
  2545. module.exports = ToastEnum;
  2546. /***/ }),
  2547. /* 27 */
  2548. /***/ (function(module, exports, __webpack_require__) {
  2549. "use strict";
  2550. exports.__esModule = true;
  2551. exports.DialogWrapper = exports.SchematicEditor = exports.ChangePaletteView = exports.CustomPalette = exports.CustomColorDialog = undefined;
  2552. var _CustomColorDialog = __webpack_require__(28);
  2553. var _CustomColorDialog2 = _interopRequireDefault(_CustomColorDialog);
  2554. var _CustomPalette = __webpack_require__(23);
  2555. var _CustomPalette2 = _interopRequireDefault(_CustomPalette);
  2556. var _ChangePaletteView = __webpack_require__(41);
  2557. var _ChangePaletteView2 = _interopRequireDefault(_ChangePaletteView);
  2558. var _SchematicEditor = __webpack_require__(51);
  2559. var _SchematicEditor2 = _interopRequireDefault(_SchematicEditor);
  2560. var _DialogWrapper = __webpack_require__(71);
  2561. var _DialogWrapper2 = _interopRequireDefault(_DialogWrapper);
  2562. __webpack_require__(4);
  2563. function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
  2564. /*
  2565. *+------------------------------------------------------------------------+
  2566. *| Licensed Materials - Property of IBM
  2567. *| IBM Cognos Products: BI
  2568. *| (C) Copyright IBM Corp. 2018, 2019
  2569. *|
  2570. *| US Government Users Restricted Rights - Use, duplication or disclosure
  2571. *| restricted by GSA ADP Schedule Contract with IBM Corp.
  2572. *+------------------------------------------------------------------------+
  2573. */
  2574. exports.CustomColorDialog = _CustomColorDialog2.default;
  2575. exports.CustomPalette = _CustomPalette2.default;
  2576. exports.ChangePaletteView = _ChangePaletteView2.default;
  2577. exports.SchematicEditor = _SchematicEditor2.default;
  2578. exports.DialogWrapper = _DialogWrapper2.default;
  2579. /***/ }),
  2580. /* 28 */
  2581. /***/ (function(module, exports, __webpack_require__) {
  2582. "use strict";
  2583. exports.__esModule = true;
  2584. var _react = __webpack_require__(0);
  2585. var _react2 = _interopRequireDefault(_react);
  2586. var _reactDom = __webpack_require__(6);
  2587. var _reactDom2 = _interopRequireDefault(_reactDom);
  2588. var _propTypes = __webpack_require__(2);
  2589. var _propTypes2 = _interopRequireDefault(_propTypes);
  2590. var _ColorWheel = __webpack_require__(20);
  2591. var _ColorWheel2 = _interopRequireDefault(_ColorWheel);
  2592. var _ColorGrid = __webpack_require__(22);
  2593. var _ColorGrid2 = _interopRequireDefault(_ColorGrid);
  2594. var _Favorites = __webpack_require__(34);
  2595. var _Favorites2 = _interopRequireDefault(_Favorites);
  2596. var _StringResources = __webpack_require__(1);
  2597. var _StringResources2 = _interopRequireDefault(_StringResources);
  2598. var _caUiToolkit = __webpack_require__(3);
  2599. __webpack_require__(4);
  2600. function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
  2601. function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
  2602. function _possibleConstructorReturn(self, call) { if (!self) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return call && (typeof call === "object" || typeof call === "function") ? call : self; }
  2603. function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function, not " + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; } /**
  2604. * Licensed Materials - Property of IBM
  2605. * IBM Cognos Products: BI
  2606. * (C) Copyright IBM Corp. 2018, 2020
  2607. * US Government Users Restricted Rights - Use, duplication or disclosure restricted by GSA ADP Schedule Contract with IBM Corp.
  2608. */
  2609. var MAX_FAVORITES = 12;
  2610. // CustomPalette class
  2611. var CustomColorDialog = function (_Component) {
  2612. _inherits(CustomColorDialog, _Component);
  2613. // Constructor
  2614. // State consists of property to define whether or not the dialog is open or closed, the selectedTab for the tab panel and the selected item in the select drop down list
  2615. function CustomColorDialog(props) {
  2616. _classCallCheck(this, CustomColorDialog);
  2617. var _this = _possibleConstructorReturn(this, _Component.call(this, props));
  2618. _this.applyPaletteColor = function () {
  2619. var paletteServicePromise = _this.props.paletteService ? Promise.resolve(_this.props.paletteService) : _this.props.glassContext.getSvc('.Palette');
  2620. paletteServicePromise.then(function (service) {
  2621. service.setFavoriteColors(_this.favoritesView.getFavoriteColors()).then(function () {
  2622. _this.props.onChange(_this.state.currentColor);
  2623. _this.closeDialog();
  2624. }, function (error) {
  2625. console.log(error);
  2626. });
  2627. });
  2628. };
  2629. _this.closeDialog = function () {
  2630. _this.setState({ isDialogOpen: false });
  2631. if (_this.props.onCloseDialog) {
  2632. _this.props.onCloseDialog();
  2633. }
  2634. };
  2635. _this.openDialog = function () {
  2636. _this.setState({ isDialogOpen: true });
  2637. };
  2638. _this.favoritesView = null;
  2639. _this.state = {
  2640. currentColor: null,
  2641. isDialogOpen: props.isDialogOpen || false,
  2642. selectedTab: 'idColorGrid',
  2643. selectedColorType: 'RGB'
  2644. };
  2645. return _this;
  2646. }
  2647. CustomColorDialog.prototype.componentDidMount = function componentDidMount() {
  2648. var _this2 = this;
  2649. var paletteServicePromise = this.props.paletteService ? Promise.resolve(this.props.paletteService) : this.props.glassContext.getSvc('.Palette');
  2650. paletteServicePromise.then(function (service) {
  2651. service.getFavoriteColors().then(function (cmFavoriteColors) {
  2652. _this2.favoritesView.setState({
  2653. favoriteColors: cmFavoriteColors
  2654. });
  2655. });
  2656. });
  2657. };
  2658. CustomColorDialog.prototype.updateSelectedColor = function updateSelectedColor(color) {
  2659. this.setState({
  2660. currentColor: color
  2661. });
  2662. };
  2663. CustomColorDialog.prototype.setColor = function setColor(color) {
  2664. this.updateSelectedColor(color);
  2665. if (this.favoritesView.isFavoriteSelected()) {
  2666. this.favoritesView.updateSelectedColor(color);
  2667. this.favoritesView.deselectCurrentFavorite();
  2668. }
  2669. };
  2670. CustomColorDialog.prototype.addFavorite = function addFavorite() {
  2671. if (this.state.currentColor && this.favoritesView.state.favoriteColors.length < MAX_FAVORITES) {
  2672. var colors = this.favoritesView.state.favoriteColors;
  2673. colors.push(this.state.currentColor);
  2674. this.favoritesView.setState({
  2675. favoriteColors: colors
  2676. });
  2677. }
  2678. };
  2679. CustomColorDialog.prototype.render = function render() {
  2680. var _this3 = this;
  2681. var myList = [{ value: 'RGB', label: _StringResources2.default.get('modelRGB') },
  2682. // { value: 'CMYK', label: StringResources.get('modelCMYK') },
  2683. { value: 'HSB', label: _StringResources2.default.get('modelHSB') }];
  2684. return this.state.isDialogOpen && _react2.default.createElement(
  2685. 'div',
  2686. null,
  2687. _react2.default.createElement(
  2688. _caUiToolkit.Dialog,
  2689. { width: '620px', onClose: this.closeDialog, className: 'customColorDialog' },
  2690. _react2.default.createElement(
  2691. _caUiToolkit.Dialog.Header,
  2692. null,
  2693. _StringResources2.default.get('colorPicker')
  2694. ),
  2695. _react2.default.createElement(
  2696. _caUiToolkit.Dialog.Body,
  2697. null,
  2698. _react2.default.createElement(
  2699. 'div',
  2700. null,
  2701. _react2.default.createElement(
  2702. _caUiToolkit.Tabs,
  2703. { selected: this.state.selectedTab, onChange: function onChange(tabId) {
  2704. return _this3.setState({ selectedTab: tabId });
  2705. } },
  2706. _react2.default.createElement(
  2707. _caUiToolkit.TabPanel,
  2708. { keepTabContent: true, id: 'idColorGrid', label: _StringResources2.default.get('grid') },
  2709. _react2.default.createElement(
  2710. 'div',
  2711. { style: { height: '260px', 'paddingTop': '15px' } },
  2712. _react2.default.createElement(
  2713. 'table',
  2714. null,
  2715. _react2.default.createElement(
  2716. 'tbody',
  2717. null,
  2718. _react2.default.createElement(
  2719. 'tr',
  2720. null,
  2721. _react2.default.createElement(
  2722. 'td',
  2723. { align: 'center', style: { width: '50%' } },
  2724. _react2.default.createElement(_ColorGrid2.default, {
  2725. id: 'idColorGridComponent',
  2726. onColorChange: this.setColor.bind(this)
  2727. })
  2728. )
  2729. )
  2730. )
  2731. )
  2732. )
  2733. ),
  2734. _react2.default.createElement(
  2735. _caUiToolkit.TabPanel,
  2736. { keepTabContent: true, id: 'idColorWheel', label: _StringResources2.default.get('wheel') },
  2737. _react2.default.createElement(
  2738. 'div',
  2739. { style: { 'height': '300px', 'paddingTop': '15px' } },
  2740. _react2.default.createElement(
  2741. 'table',
  2742. null,
  2743. _react2.default.createElement(
  2744. 'tbody',
  2745. null,
  2746. _react2.default.createElement(
  2747. 'tr',
  2748. null,
  2749. _react2.default.createElement(
  2750. 'td',
  2751. { align: 'right', style: { width: '90%' } },
  2752. _react2.default.createElement(
  2753. 'div',
  2754. { style: { marginBottom: '8px' } },
  2755. _react2.default.createElement(_caUiToolkit.Select, {
  2756. selected: this.state.selectedColorType,
  2757. customWidth: '250px',
  2758. options: myList,
  2759. onChange: function onChange(value) {
  2760. return _this3.setState({ selectedColorType: value });
  2761. }
  2762. })
  2763. ),
  2764. _react2.default.createElement(_ColorWheel2.default, {
  2765. onColorChange: this.setColor.bind(this),
  2766. color: this.state.currentColor,
  2767. selectedColorType: this.state.selectedColorType
  2768. })
  2769. )
  2770. )
  2771. )
  2772. )
  2773. )
  2774. )
  2775. ),
  2776. _react2.default.createElement(
  2777. _caUiToolkit.FlexLayout,
  2778. { direction: 'column' },
  2779. _react2.default.createElement(
  2780. _caUiToolkit.FlexLayout,
  2781. { justifyContent: 'flex-end' },
  2782. _react2.default.createElement(
  2783. _caUiToolkit.Link,
  2784. { style: { zIndex: 3000, 'margin-right': '40px' }, onClick: this.addFavorite.bind(this) },
  2785. _StringResources2.default.get('setAsFavorite')
  2786. )
  2787. ),
  2788. _react2.default.createElement(_caUiToolkit.Separator, { orientation: 'horizontal', style: { margin: '24px 0px' } }),
  2789. _react2.default.createElement(_Favorites2.default, {
  2790. favoriteColors: [],
  2791. updateColor: this.updateSelectedColor.bind(this),
  2792. ref: function ref(element) {
  2793. _this3.favoritesView = element;
  2794. },
  2795. numberOfFavorites: MAX_FAVORITES })
  2796. )
  2797. )
  2798. ),
  2799. _react2.default.createElement(
  2800. _caUiToolkit.Dialog.Footer,
  2801. null,
  2802. _react2.default.createElement(_caUiToolkit.Dialog.Button, { label: _StringResources2.default.get('applyDialog'), onClick: this.applyPaletteColor, disabled: !this.state.currentColor }),
  2803. _react2.default.createElement(_caUiToolkit.Dialog.Button, { label: _StringResources2.default.get('cancelDialog'), onClick: this.closeDialog })
  2804. )
  2805. )
  2806. ) || null;
  2807. };
  2808. return CustomColorDialog;
  2809. }(_react.Component);
  2810. CustomColorDialog.propTypes = {
  2811. isDialogOpen: _propTypes2.default.bool,
  2812. glassContext: _propTypes2.default.object,
  2813. paletteService: _propTypes2.default.object,
  2814. onChange: _propTypes2.default.func,
  2815. onCloseDialog: _propTypes2.default.func
  2816. };
  2817. CustomColorDialog.defaultProps = {
  2818. isDialogOpen: false
  2819. };
  2820. exports.default = CustomColorDialog;
  2821. CustomColorDialog.defaultProps = {
  2822. name: 'CustomColorDialog'
  2823. };
  2824. /***/ }),
  2825. /* 29 */
  2826. /***/ (function(module, exports, __webpack_require__) {
  2827. "use strict";
  2828. /* WEBPACK VAR INJECTION */(function(process) {/**
  2829. * Copyright (c) 2013-present, Facebook, Inc.
  2830. *
  2831. * This source code is licensed under the MIT license found in the
  2832. * LICENSE file in the root directory of this source tree.
  2833. */
  2834. var emptyFunction = __webpack_require__(12);
  2835. var invariant = __webpack_require__(13);
  2836. var warning = __webpack_require__(19);
  2837. var assign = __webpack_require__(30);
  2838. var ReactPropTypesSecret = __webpack_require__(14);
  2839. var checkPropTypes = __webpack_require__(31);
  2840. module.exports = function(isValidElement, throwOnDirectAccess) {
  2841. /* global Symbol */
  2842. var ITERATOR_SYMBOL = typeof Symbol === 'function' && Symbol.iterator;
  2843. var FAUX_ITERATOR_SYMBOL = '@@iterator'; // Before Symbol spec.
  2844. /**
  2845. * Returns the iterator method function contained on the iterable object.
  2846. *
  2847. * Be sure to invoke the function with the iterable as context:
  2848. *
  2849. * var iteratorFn = getIteratorFn(myIterable);
  2850. * if (iteratorFn) {
  2851. * var iterator = iteratorFn.call(myIterable);
  2852. * ...
  2853. * }
  2854. *
  2855. * @param {?object} maybeIterable
  2856. * @return {?function}
  2857. */
  2858. function getIteratorFn(maybeIterable) {
  2859. var iteratorFn = maybeIterable && (ITERATOR_SYMBOL && maybeIterable[ITERATOR_SYMBOL] || maybeIterable[FAUX_ITERATOR_SYMBOL]);
  2860. if (typeof iteratorFn === 'function') {
  2861. return iteratorFn;
  2862. }
  2863. }
  2864. /**
  2865. * Collection of methods that allow declaration and validation of props that are
  2866. * supplied to React components. Example usage:
  2867. *
  2868. * var Props = require('ReactPropTypes');
  2869. * var MyArticle = React.createClass({
  2870. * propTypes: {
  2871. * // An optional string prop named "description".
  2872. * description: Props.string,
  2873. *
  2874. * // A required enum prop named "category".
  2875. * category: Props.oneOf(['News','Photos']).isRequired,
  2876. *
  2877. * // A prop named "dialog" that requires an instance of Dialog.
  2878. * dialog: Props.instanceOf(Dialog).isRequired
  2879. * },
  2880. * render: function() { ... }
  2881. * });
  2882. *
  2883. * A more formal specification of how these methods are used:
  2884. *
  2885. * type := array|bool|func|object|number|string|oneOf([...])|instanceOf(...)
  2886. * decl := ReactPropTypes.{type}(.isRequired)?
  2887. *
  2888. * Each and every declaration produces a function with the same signature. This
  2889. * allows the creation of custom validation functions. For example:
  2890. *
  2891. * var MyLink = React.createClass({
  2892. * propTypes: {
  2893. * // An optional string or URI prop named "href".
  2894. * href: function(props, propName, componentName) {
  2895. * var propValue = props[propName];
  2896. * if (propValue != null && typeof propValue !== 'string' &&
  2897. * !(propValue instanceof URI)) {
  2898. * return new Error(
  2899. * 'Expected a string or an URI for ' + propName + ' in ' +
  2900. * componentName
  2901. * );
  2902. * }
  2903. * }
  2904. * },
  2905. * render: function() {...}
  2906. * });
  2907. *
  2908. * @internal
  2909. */
  2910. var ANONYMOUS = '<<anonymous>>';
  2911. // Important!
  2912. // Keep this list in sync with production version in `./factoryWithThrowingShims.js`.
  2913. var ReactPropTypes = {
  2914. array: createPrimitiveTypeChecker('array'),
  2915. bool: createPrimitiveTypeChecker('boolean'),
  2916. func: createPrimitiveTypeChecker('function'),
  2917. number: createPrimitiveTypeChecker('number'),
  2918. object: createPrimitiveTypeChecker('object'),
  2919. string: createPrimitiveTypeChecker('string'),
  2920. symbol: createPrimitiveTypeChecker('symbol'),
  2921. any: createAnyTypeChecker(),
  2922. arrayOf: createArrayOfTypeChecker,
  2923. element: createElementTypeChecker(),
  2924. instanceOf: createInstanceTypeChecker,
  2925. node: createNodeChecker(),
  2926. objectOf: createObjectOfTypeChecker,
  2927. oneOf: createEnumTypeChecker,
  2928. oneOfType: createUnionTypeChecker,
  2929. shape: createShapeTypeChecker,
  2930. exact: createStrictShapeTypeChecker,
  2931. };
  2932. /**
  2933. * inlined Object.is polyfill to avoid requiring consumers ship their own
  2934. * https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object/is
  2935. */
  2936. /*eslint-disable no-self-compare*/
  2937. function is(x, y) {
  2938. // SameValue algorithm
  2939. if (x === y) {
  2940. // Steps 1-5, 7-10
  2941. // Steps 6.b-6.e: +0 != -0
  2942. return x !== 0 || 1 / x === 1 / y;
  2943. } else {
  2944. // Step 6.a: NaN == NaN
  2945. return x !== x && y !== y;
  2946. }
  2947. }
  2948. /*eslint-enable no-self-compare*/
  2949. /**
  2950. * We use an Error-like object for backward compatibility as people may call
  2951. * PropTypes directly and inspect their output. However, we don't use real
  2952. * Errors anymore. We don't inspect their stack anyway, and creating them
  2953. * is prohibitively expensive if they are created too often, such as what
  2954. * happens in oneOfType() for any type before the one that matched.
  2955. */
  2956. function PropTypeError(message) {
  2957. this.message = message;
  2958. this.stack = '';
  2959. }
  2960. // Make `instanceof Error` still work for returned errors.
  2961. PropTypeError.prototype = Error.prototype;
  2962. function createChainableTypeChecker(validate) {
  2963. if (process.env.NODE_ENV !== 'production') {
  2964. var manualPropTypeCallCache = {};
  2965. var manualPropTypeWarningCount = 0;
  2966. }
  2967. function checkType(isRequired, props, propName, componentName, location, propFullName, secret) {
  2968. componentName = componentName || ANONYMOUS;
  2969. propFullName = propFullName || propName;
  2970. if (secret !== ReactPropTypesSecret) {
  2971. if (throwOnDirectAccess) {
  2972. // New behavior only for users of `prop-types` package
  2973. invariant(
  2974. false,
  2975. 'Calling PropTypes validators directly is not supported by the `prop-types` package. ' +
  2976. 'Use `PropTypes.checkPropTypes()` to call them. ' +
  2977. 'Read more at http://fb.me/use-check-prop-types'
  2978. );
  2979. } else if (process.env.NODE_ENV !== 'production' && typeof console !== 'undefined') {
  2980. // Old behavior for people using React.PropTypes
  2981. var cacheKey = componentName + ':' + propName;
  2982. if (
  2983. !manualPropTypeCallCache[cacheKey] &&
  2984. // Avoid spamming the console because they are often not actionable except for lib authors
  2985. manualPropTypeWarningCount < 3
  2986. ) {
  2987. warning(
  2988. false,
  2989. 'You are manually calling a React.PropTypes validation ' +
  2990. 'function for the `%s` prop on `%s`. This is deprecated ' +
  2991. 'and will throw in the standalone `prop-types` package. ' +
  2992. 'You may be seeing this warning due to a third-party PropTypes ' +
  2993. 'library. See https://fb.me/react-warning-dont-call-proptypes ' + 'for details.',
  2994. propFullName,
  2995. componentName
  2996. );
  2997. manualPropTypeCallCache[cacheKey] = true;
  2998. manualPropTypeWarningCount++;
  2999. }
  3000. }
  3001. }
  3002. if (props[propName] == null) {
  3003. if (isRequired) {
  3004. if (props[propName] === null) {
  3005. return new PropTypeError('The ' + location + ' `' + propFullName + '` is marked as required ' + ('in `' + componentName + '`, but its value is `null`.'));
  3006. }
  3007. return new PropTypeError('The ' + location + ' `' + propFullName + '` is marked as required in ' + ('`' + componentName + '`, but its value is `undefined`.'));
  3008. }
  3009. return null;
  3010. } else {
  3011. return validate(props, propName, componentName, location, propFullName);
  3012. }
  3013. }
  3014. var chainedCheckType = checkType.bind(null, false);
  3015. chainedCheckType.isRequired = checkType.bind(null, true);
  3016. return chainedCheckType;
  3017. }
  3018. function createPrimitiveTypeChecker(expectedType) {
  3019. function validate(props, propName, componentName, location, propFullName, secret) {
  3020. var propValue = props[propName];
  3021. var propType = getPropType(propValue);
  3022. if (propType !== expectedType) {
  3023. // `propValue` being instance of, say, date/regexp, pass the 'object'
  3024. // check, but we can offer a more precise error message here rather than
  3025. // 'of type `object`'.
  3026. var preciseType = getPreciseType(propValue);
  3027. return new PropTypeError('Invalid ' + location + ' `' + propFullName + '` of type ' + ('`' + preciseType + '` supplied to `' + componentName + '`, expected ') + ('`' + expectedType + '`.'));
  3028. }
  3029. return null;
  3030. }
  3031. return createChainableTypeChecker(validate);
  3032. }
  3033. function createAnyTypeChecker() {
  3034. return createChainableTypeChecker(emptyFunction.thatReturnsNull);
  3035. }
  3036. function createArrayOfTypeChecker(typeChecker) {
  3037. function validate(props, propName, componentName, location, propFullName) {
  3038. if (typeof typeChecker !== 'function') {
  3039. return new PropTypeError('Property `' + propFullName + '` of component `' + componentName + '` has invalid PropType notation inside arrayOf.');
  3040. }
  3041. var propValue = props[propName];
  3042. if (!Array.isArray(propValue)) {
  3043. var propType = getPropType(propValue);
  3044. return new PropTypeError('Invalid ' + location + ' `' + propFullName + '` of type ' + ('`' + propType + '` supplied to `' + componentName + '`, expected an array.'));
  3045. }
  3046. for (var i = 0; i < propValue.length; i++) {
  3047. var error = typeChecker(propValue, i, componentName, location, propFullName + '[' + i + ']', ReactPropTypesSecret);
  3048. if (error instanceof Error) {
  3049. return error;
  3050. }
  3051. }
  3052. return null;
  3053. }
  3054. return createChainableTypeChecker(validate);
  3055. }
  3056. function createElementTypeChecker() {
  3057. function validate(props, propName, componentName, location, propFullName) {
  3058. var propValue = props[propName];
  3059. if (!isValidElement(propValue)) {
  3060. var propType = getPropType(propValue);
  3061. return new PropTypeError('Invalid ' + location + ' `' + propFullName + '` of type ' + ('`' + propType + '` supplied to `' + componentName + '`, expected a single ReactElement.'));
  3062. }
  3063. return null;
  3064. }
  3065. return createChainableTypeChecker(validate);
  3066. }
  3067. function createInstanceTypeChecker(expectedClass) {
  3068. function validate(props, propName, componentName, location, propFullName) {
  3069. if (!(props[propName] instanceof expectedClass)) {
  3070. var expectedClassName = expectedClass.name || ANONYMOUS;
  3071. var actualClassName = getClassName(props[propName]);
  3072. return new PropTypeError('Invalid ' + location + ' `' + propFullName + '` of type ' + ('`' + actualClassName + '` supplied to `' + componentName + '`, expected ') + ('instance of `' + expectedClassName + '`.'));
  3073. }
  3074. return null;
  3075. }
  3076. return createChainableTypeChecker(validate);
  3077. }
  3078. function createEnumTypeChecker(expectedValues) {
  3079. if (!Array.isArray(expectedValues)) {
  3080. process.env.NODE_ENV !== 'production' ? warning(false, 'Invalid argument supplied to oneOf, expected an instance of array.') : void 0;
  3081. return emptyFunction.thatReturnsNull;
  3082. }
  3083. function validate(props, propName, componentName, location, propFullName) {
  3084. var propValue = props[propName];
  3085. for (var i = 0; i < expectedValues.length; i++) {
  3086. if (is(propValue, expectedValues[i])) {
  3087. return null;
  3088. }
  3089. }
  3090. var valuesString = JSON.stringify(expectedValues);
  3091. return new PropTypeError('Invalid ' + location + ' `' + propFullName + '` of value `' + propValue + '` ' + ('supplied to `' + componentName + '`, expected one of ' + valuesString + '.'));
  3092. }
  3093. return createChainableTypeChecker(validate);
  3094. }
  3095. function createObjectOfTypeChecker(typeChecker) {
  3096. function validate(props, propName, componentName, location, propFullName) {
  3097. if (typeof typeChecker !== 'function') {
  3098. return new PropTypeError('Property `' + propFullName + '` of component `' + componentName + '` has invalid PropType notation inside objectOf.');
  3099. }
  3100. var propValue = props[propName];
  3101. var propType = getPropType(propValue);
  3102. if (propType !== 'object') {
  3103. return new PropTypeError('Invalid ' + location + ' `' + propFullName + '` of type ' + ('`' + propType + '` supplied to `' + componentName + '`, expected an object.'));
  3104. }
  3105. for (var key in propValue) {
  3106. if (propValue.hasOwnProperty(key)) {
  3107. var error = typeChecker(propValue, key, componentName, location, propFullName + '.' + key, ReactPropTypesSecret);
  3108. if (error instanceof Error) {
  3109. return error;
  3110. }
  3111. }
  3112. }
  3113. return null;
  3114. }
  3115. return createChainableTypeChecker(validate);
  3116. }
  3117. function createUnionTypeChecker(arrayOfTypeCheckers) {
  3118. if (!Array.isArray(arrayOfTypeCheckers)) {
  3119. process.env.NODE_ENV !== 'production' ? warning(false, 'Invalid argument supplied to oneOfType, expected an instance of array.') : void 0;
  3120. return emptyFunction.thatReturnsNull;
  3121. }
  3122. for (var i = 0; i < arrayOfTypeCheckers.length; i++) {
  3123. var checker = arrayOfTypeCheckers[i];
  3124. if (typeof checker !== 'function') {
  3125. warning(
  3126. false,
  3127. 'Invalid argument supplied to oneOfType. Expected an array of check functions, but ' +
  3128. 'received %s at index %s.',
  3129. getPostfixForTypeWarning(checker),
  3130. i
  3131. );
  3132. return emptyFunction.thatReturnsNull;
  3133. }
  3134. }
  3135. function validate(props, propName, componentName, location, propFullName) {
  3136. for (var i = 0; i < arrayOfTypeCheckers.length; i++) {
  3137. var checker = arrayOfTypeCheckers[i];
  3138. if (checker(props, propName, componentName, location, propFullName, ReactPropTypesSecret) == null) {
  3139. return null;
  3140. }
  3141. }
  3142. return new PropTypeError('Invalid ' + location + ' `' + propFullName + '` supplied to ' + ('`' + componentName + '`.'));
  3143. }
  3144. return createChainableTypeChecker(validate);
  3145. }
  3146. function createNodeChecker() {
  3147. function validate(props, propName, componentName, location, propFullName) {
  3148. if (!isNode(props[propName])) {
  3149. return new PropTypeError('Invalid ' + location + ' `' + propFullName + '` supplied to ' + ('`' + componentName + '`, expected a ReactNode.'));
  3150. }
  3151. return null;
  3152. }
  3153. return createChainableTypeChecker(validate);
  3154. }
  3155. function createShapeTypeChecker(shapeTypes) {
  3156. function validate(props, propName, componentName, location, propFullName) {
  3157. var propValue = props[propName];
  3158. var propType = getPropType(propValue);
  3159. if (propType !== 'object') {
  3160. return new PropTypeError('Invalid ' + location + ' `' + propFullName + '` of type `' + propType + '` ' + ('supplied to `' + componentName + '`, expected `object`.'));
  3161. }
  3162. for (var key in shapeTypes) {
  3163. var checker = shapeTypes[key];
  3164. if (!checker) {
  3165. continue;
  3166. }
  3167. var error = checker(propValue, key, componentName, location, propFullName + '.' + key, ReactPropTypesSecret);
  3168. if (error) {
  3169. return error;
  3170. }
  3171. }
  3172. return null;
  3173. }
  3174. return createChainableTypeChecker(validate);
  3175. }
  3176. function createStrictShapeTypeChecker(shapeTypes) {
  3177. function validate(props, propName, componentName, location, propFullName) {
  3178. var propValue = props[propName];
  3179. var propType = getPropType(propValue);
  3180. if (propType !== 'object') {
  3181. return new PropTypeError('Invalid ' + location + ' `' + propFullName + '` of type `' + propType + '` ' + ('supplied to `' + componentName + '`, expected `object`.'));
  3182. }
  3183. // We need to check all keys in case some are required but missing from
  3184. // props.
  3185. var allKeys = assign({}, props[propName], shapeTypes);
  3186. for (var key in allKeys) {
  3187. var checker = shapeTypes[key];
  3188. if (!checker) {
  3189. return new PropTypeError(
  3190. 'Invalid ' + location + ' `' + propFullName + '` key `' + key + '` supplied to `' + componentName + '`.' +
  3191. '\nBad object: ' + JSON.stringify(props[propName], null, ' ') +
  3192. '\nValid keys: ' + JSON.stringify(Object.keys(shapeTypes), null, ' ')
  3193. );
  3194. }
  3195. var error = checker(propValue, key, componentName, location, propFullName + '.' + key, ReactPropTypesSecret);
  3196. if (error) {
  3197. return error;
  3198. }
  3199. }
  3200. return null;
  3201. }
  3202. return createChainableTypeChecker(validate);
  3203. }
  3204. function isNode(propValue) {
  3205. switch (typeof propValue) {
  3206. case 'number':
  3207. case 'string':
  3208. case 'undefined':
  3209. return true;
  3210. case 'boolean':
  3211. return !propValue;
  3212. case 'object':
  3213. if (Array.isArray(propValue)) {
  3214. return propValue.every(isNode);
  3215. }
  3216. if (propValue === null || isValidElement(propValue)) {
  3217. return true;
  3218. }
  3219. var iteratorFn = getIteratorFn(propValue);
  3220. if (iteratorFn) {
  3221. var iterator = iteratorFn.call(propValue);
  3222. var step;
  3223. if (iteratorFn !== propValue.entries) {
  3224. while (!(step = iterator.next()).done) {
  3225. if (!isNode(step.value)) {
  3226. return false;
  3227. }
  3228. }
  3229. } else {
  3230. // Iterator will provide entry [k,v] tuples rather than values.
  3231. while (!(step = iterator.next()).done) {
  3232. var entry = step.value;
  3233. if (entry) {
  3234. if (!isNode(entry[1])) {
  3235. return false;
  3236. }
  3237. }
  3238. }
  3239. }
  3240. } else {
  3241. return false;
  3242. }
  3243. return true;
  3244. default:
  3245. return false;
  3246. }
  3247. }
  3248. function isSymbol(propType, propValue) {
  3249. // Native Symbol.
  3250. if (propType === 'symbol') {
  3251. return true;
  3252. }
  3253. // 19.4.3.5 Symbol.prototype[@@toStringTag] === 'Symbol'
  3254. if (propValue['@@toStringTag'] === 'Symbol') {
  3255. return true;
  3256. }
  3257. // Fallback for non-spec compliant Symbols which are polyfilled.
  3258. if (typeof Symbol === 'function' && propValue instanceof Symbol) {
  3259. return true;
  3260. }
  3261. return false;
  3262. }
  3263. // Equivalent of `typeof` but with special handling for array and regexp.
  3264. function getPropType(propValue) {
  3265. var propType = typeof propValue;
  3266. if (Array.isArray(propValue)) {
  3267. return 'array';
  3268. }
  3269. if (propValue instanceof RegExp) {
  3270. // Old webkits (at least until Android 4.0) return 'function' rather than
  3271. // 'object' for typeof a RegExp. We'll normalize this here so that /bla/
  3272. // passes PropTypes.object.
  3273. return 'object';
  3274. }
  3275. if (isSymbol(propType, propValue)) {
  3276. return 'symbol';
  3277. }
  3278. return propType;
  3279. }
  3280. // This handles more types than `getPropType`. Only used for error messages.
  3281. // See `createPrimitiveTypeChecker`.
  3282. function getPreciseType(propValue) {
  3283. if (typeof propValue === 'undefined' || propValue === null) {
  3284. return '' + propValue;
  3285. }
  3286. var propType = getPropType(propValue);
  3287. if (propType === 'object') {
  3288. if (propValue instanceof Date) {
  3289. return 'date';
  3290. } else if (propValue instanceof RegExp) {
  3291. return 'regexp';
  3292. }
  3293. }
  3294. return propType;
  3295. }
  3296. // Returns a string that is postfixed to a warning about an invalid type.
  3297. // For example, "undefined" or "of type array"
  3298. function getPostfixForTypeWarning(value) {
  3299. var type = getPreciseType(value);
  3300. switch (type) {
  3301. case 'array':
  3302. case 'object':
  3303. return 'an ' + type;
  3304. case 'boolean':
  3305. case 'date':
  3306. case 'regexp':
  3307. return 'a ' + type;
  3308. default:
  3309. return type;
  3310. }
  3311. }
  3312. // Returns class name of the object, if any.
  3313. function getClassName(propValue) {
  3314. if (!propValue.constructor || !propValue.constructor.name) {
  3315. return ANONYMOUS;
  3316. }
  3317. return propValue.constructor.name;
  3318. }
  3319. ReactPropTypes.checkPropTypes = checkPropTypes;
  3320. ReactPropTypes.PropTypes = ReactPropTypes;
  3321. return ReactPropTypes;
  3322. };
  3323. /* WEBPACK VAR INJECTION */}.call(exports, __webpack_require__(8)))
  3324. /***/ }),
  3325. /* 30 */
  3326. /***/ (function(module, exports, __webpack_require__) {
  3327. "use strict";
  3328. /*
  3329. object-assign
  3330. (c) Sindre Sorhus
  3331. @license MIT
  3332. */
  3333. /* eslint-disable no-unused-vars */
  3334. var getOwnPropertySymbols = Object.getOwnPropertySymbols;
  3335. var hasOwnProperty = Object.prototype.hasOwnProperty;
  3336. var propIsEnumerable = Object.prototype.propertyIsEnumerable;
  3337. function toObject(val) {
  3338. if (val === null || val === undefined) {
  3339. throw new TypeError('Object.assign cannot be called with null or undefined');
  3340. }
  3341. return Object(val);
  3342. }
  3343. function shouldUseNative() {
  3344. try {
  3345. if (!Object.assign) {
  3346. return false;
  3347. }
  3348. // Detect buggy property enumeration order in older V8 versions.
  3349. // https://bugs.chromium.org/p/v8/issues/detail?id=4118
  3350. var test1 = new String('abc'); // eslint-disable-line no-new-wrappers
  3351. test1[5] = 'de';
  3352. if (Object.getOwnPropertyNames(test1)[0] === '5') {
  3353. return false;
  3354. }
  3355. // https://bugs.chromium.org/p/v8/issues/detail?id=3056
  3356. var test2 = {};
  3357. for (var i = 0; i < 10; i++) {
  3358. test2['_' + String.fromCharCode(i)] = i;
  3359. }
  3360. var order2 = Object.getOwnPropertyNames(test2).map(function (n) {
  3361. return test2[n];
  3362. });
  3363. if (order2.join('') !== '0123456789') {
  3364. return false;
  3365. }
  3366. // https://bugs.chromium.org/p/v8/issues/detail?id=3056
  3367. var test3 = {};
  3368. 'abcdefghijklmnopqrst'.split('').forEach(function (letter) {
  3369. test3[letter] = letter;
  3370. });
  3371. if (Object.keys(Object.assign({}, test3)).join('') !==
  3372. 'abcdefghijklmnopqrst') {
  3373. return false;
  3374. }
  3375. return true;
  3376. } catch (err) {
  3377. // We don't expect any of the above to throw, but better to be safe.
  3378. return false;
  3379. }
  3380. }
  3381. module.exports = shouldUseNative() ? Object.assign : function (target, source) {
  3382. var from;
  3383. var to = toObject(target);
  3384. var symbols;
  3385. for (var s = 1; s < arguments.length; s++) {
  3386. from = Object(arguments[s]);
  3387. for (var key in from) {
  3388. if (hasOwnProperty.call(from, key)) {
  3389. to[key] = from[key];
  3390. }
  3391. }
  3392. if (getOwnPropertySymbols) {
  3393. symbols = getOwnPropertySymbols(from);
  3394. for (var i = 0; i < symbols.length; i++) {
  3395. if (propIsEnumerable.call(from, symbols[i])) {
  3396. to[symbols[i]] = from[symbols[i]];
  3397. }
  3398. }
  3399. }
  3400. }
  3401. return to;
  3402. };
  3403. /***/ }),
  3404. /* 31 */
  3405. /***/ (function(module, exports, __webpack_require__) {
  3406. "use strict";
  3407. /* WEBPACK VAR INJECTION */(function(process) {/**
  3408. * Copyright (c) 2013-present, Facebook, Inc.
  3409. *
  3410. * This source code is licensed under the MIT license found in the
  3411. * LICENSE file in the root directory of this source tree.
  3412. */
  3413. if (process.env.NODE_ENV !== 'production') {
  3414. var invariant = __webpack_require__(13);
  3415. var warning = __webpack_require__(19);
  3416. var ReactPropTypesSecret = __webpack_require__(14);
  3417. var loggedTypeFailures = {};
  3418. }
  3419. /**
  3420. * Assert that the values match with the type specs.
  3421. * Error messages are memorized and will only be shown once.
  3422. *
  3423. * @param {object} typeSpecs Map of name to a ReactPropType
  3424. * @param {object} values Runtime values that need to be type-checked
  3425. * @param {string} location e.g. "prop", "context", "child context"
  3426. * @param {string} componentName Name of the component for error messages.
  3427. * @param {?Function} getStack Returns the component stack.
  3428. * @private
  3429. */
  3430. function checkPropTypes(typeSpecs, values, location, componentName, getStack) {
  3431. if (process.env.NODE_ENV !== 'production') {
  3432. for (var typeSpecName in typeSpecs) {
  3433. if (typeSpecs.hasOwnProperty(typeSpecName)) {
  3434. var error;
  3435. // Prop type validation may throw. In case they do, we don't want to
  3436. // fail the render phase where it didn't fail before. So we log it.
  3437. // After these have been cleaned up, we'll let them throw.
  3438. try {
  3439. // This is intentionally an invariant that gets caught. It's the same
  3440. // behavior as without this statement except with a better message.
  3441. invariant(typeof typeSpecs[typeSpecName] === 'function', '%s: %s type `%s` is invalid; it must be a function, usually from ' + 'the `prop-types` package, but received `%s`.', componentName || 'React class', location, typeSpecName, typeof typeSpecs[typeSpecName]);
  3442. error = typeSpecs[typeSpecName](values, typeSpecName, componentName, location, null, ReactPropTypesSecret);
  3443. } catch (ex) {
  3444. error = ex;
  3445. }
  3446. warning(!error || error instanceof Error, '%s: type specification of %s `%s` is invalid; the type checker ' + 'function must return `null` or an `Error` but returned a %s. ' + 'You may have forgotten to pass an argument to the type checker ' + 'creator (arrayOf, instanceOf, objectOf, oneOf, oneOfType, and ' + 'shape all require an argument).', componentName || 'React class', location, typeSpecName, typeof error);
  3447. if (error instanceof Error && !(error.message in loggedTypeFailures)) {
  3448. // Only monitor this failure once because there tends to be a lot of the
  3449. // same error.
  3450. loggedTypeFailures[error.message] = true;
  3451. var stack = getStack ? getStack() : '';
  3452. warning(false, 'Failed %s type: %s%s', location, error.message, stack != null ? stack : '');
  3453. }
  3454. }
  3455. }
  3456. }
  3457. }
  3458. module.exports = checkPropTypes;
  3459. /* WEBPACK VAR INJECTION */}.call(exports, __webpack_require__(8)))
  3460. /***/ }),
  3461. /* 32 */
  3462. /***/ (function(module, exports, __webpack_require__) {
  3463. "use strict";
  3464. /**
  3465. * Copyright (c) 2013-present, Facebook, Inc.
  3466. *
  3467. * This source code is licensed under the MIT license found in the
  3468. * LICENSE file in the root directory of this source tree.
  3469. */
  3470. var emptyFunction = __webpack_require__(12);
  3471. var invariant = __webpack_require__(13);
  3472. var ReactPropTypesSecret = __webpack_require__(14);
  3473. module.exports = function() {
  3474. function shim(props, propName, componentName, location, propFullName, secret) {
  3475. if (secret === ReactPropTypesSecret) {
  3476. // It is still safe when called from React.
  3477. return;
  3478. }
  3479. invariant(
  3480. false,
  3481. 'Calling PropTypes validators directly is not supported by the `prop-types` package. ' +
  3482. 'Use PropTypes.checkPropTypes() to call them. ' +
  3483. 'Read more at http://fb.me/use-check-prop-types'
  3484. );
  3485. };
  3486. shim.isRequired = shim;
  3487. function getShim() {
  3488. return shim;
  3489. };
  3490. // Important!
  3491. // Keep this list in sync with production version in `./factoryWithTypeCheckers.js`.
  3492. var ReactPropTypes = {
  3493. array: shim,
  3494. bool: shim,
  3495. func: shim,
  3496. number: shim,
  3497. object: shim,
  3498. string: shim,
  3499. symbol: shim,
  3500. any: shim,
  3501. arrayOf: getShim,
  3502. element: shim,
  3503. instanceOf: getShim,
  3504. node: shim,
  3505. objectOf: getShim,
  3506. oneOf: getShim,
  3507. oneOfType: getShim,
  3508. shape: getShim,
  3509. exact: getShim
  3510. };
  3511. ReactPropTypes.checkPropTypes = emptyFunction;
  3512. ReactPropTypes.PropTypes = ReactPropTypes;
  3513. return ReactPropTypes;
  3514. };
  3515. /***/ }),
  3516. /* 33 */
  3517. /***/ (function(module, exports, __webpack_require__) {
  3518. "use strict";
  3519. exports.__esModule = true;
  3520. var _react = __webpack_require__(0);
  3521. var _react2 = _interopRequireDefault(_react);
  3522. var _reactDom = __webpack_require__(6);
  3523. var _reactDom2 = _interopRequireDefault(_reactDom);
  3524. var _propTypes = __webpack_require__(2);
  3525. var _propTypes2 = _interopRequireDefault(_propTypes);
  3526. var _StringResources = __webpack_require__(1);
  3527. var _StringResources2 = _interopRequireDefault(_StringResources);
  3528. var _caUiToolkit = __webpack_require__(3);
  3529. function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
  3530. function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
  3531. function _possibleConstructorReturn(self, call) { if (!self) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return call && (typeof call === "object" || typeof call === "function") ? call : self; }
  3532. function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function, not " + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; } /**
  3533. * Licensed Materials - Property of IBM
  3534. * IBM Cognos Products: BI
  3535. * (C) Copyright IBM Corp. 2018
  3536. * US Government Users Restricted Rights - Use, duplication or disclosure restricted by GSA ADP Schedule Contract with IBM Corp.
  3537. */
  3538. var RgbSlider = function (_Component) {
  3539. _inherits(RgbSlider, _Component);
  3540. function RgbSlider(props) {
  3541. _classCallCheck(this, RgbSlider);
  3542. var _this = _possibleConstructorReturn(this, _Component.call(this, props));
  3543. _this._inputValidation = function (value) {
  3544. if (_this.props.selectedColorType == 'RGB' && value > 255) {
  3545. return false;
  3546. }
  3547. if (_this.props.selectedColorType == 'HSB') {
  3548. if (_this.props.color == 'Hue' && value > 360) {
  3549. return false;
  3550. } else if ((_this.props.color == 'Saturation' || _this.props.color == 'Brightness') && value > 100) {
  3551. return false;
  3552. }
  3553. }
  3554. return true;
  3555. };
  3556. _this.sliderText = null;
  3557. return _this;
  3558. }
  3559. RgbSlider.prototype.getInputBoxType = function getInputBoxType() {
  3560. var _this2 = this;
  3561. var sliderId = 'id' + (this.props.color.charAt(0).toUpperCase() + this.props.color.slice(1)) + 'Range';
  3562. var textBoxId = 'idText' + this.props.color;
  3563. var max = this.props.selectedColorType == 'RGB' ? 255 : this.props.color == 'Hue' ? 360 : 100;
  3564. return _react2.default.createElement(
  3565. 'tr',
  3566. { style: { paddingTop: '20px', height: '50px' } },
  3567. _react2.default.createElement(
  3568. 'td',
  3569. { style: { width: '38px' } },
  3570. _react2.default.createElement(_caUiToolkit.Label, {
  3571. id: textBoxId + 'Label',
  3572. type: 'caption',
  3573. hover: true,
  3574. label: _StringResources2.default.get('code'.concat(this.props.color)),
  3575. htmlFor: textBoxId,
  3576. style: { fontSize: '1em', marginTop: '10px' },
  3577. title: _StringResources2.default.get('color'.concat(this.props.color)),
  3578. alt: _StringResources2.default.get('color'.concat(this.props.color))
  3579. })
  3580. ),
  3581. _react2.default.createElement(
  3582. 'td',
  3583. { style: { width: '150px' } },
  3584. _react2.default.createElement(_caUiToolkit.Slider, {
  3585. id: sliderId,
  3586. showBoundaryLabels: true,
  3587. value: this.props.value,
  3588. onChange: function onChange(value) {
  3589. return _this2.props.validateInput(parseInt(value, 10), _this2.props.color);
  3590. },
  3591. min: 0,
  3592. max: max,
  3593. size: 'small'
  3594. })
  3595. ),
  3596. _react2.default.createElement(
  3597. 'td',
  3598. { style: { paddingLeft: '8px' } },
  3599. _react2.default.createElement(_caUiToolkit.NumberInput, {
  3600. id: textBoxId,
  3601. value: this.props.value,
  3602. onChange: function onChange(value) {
  3603. return _this2.props.validateInput(parseInt(value, 10), _this2.props.color);
  3604. },
  3605. style: { width: '70px' },
  3606. min: 0,
  3607. max: max,
  3608. validation: this._inputValidation,
  3609. tabIndex: 0
  3610. })
  3611. )
  3612. );
  3613. };
  3614. RgbSlider.prototype.render = function render() {
  3615. var inputBox = this.getInputBoxType();
  3616. return _react2.default.createElement(
  3617. 'table',
  3618. null,
  3619. _react2.default.createElement(
  3620. 'tbody',
  3621. null,
  3622. inputBox
  3623. )
  3624. );
  3625. };
  3626. return RgbSlider;
  3627. }(_react.Component);
  3628. RgbSlider.propTypes = {
  3629. color: _propTypes2.default.string,
  3630. validateInput: _propTypes2.default.func,
  3631. selectedColorType: _propTypes2.default.string,
  3632. value: _propTypes2.default.int
  3633. };
  3634. exports.default = RgbSlider;
  3635. /***/ }),
  3636. /* 34 */
  3637. /***/ (function(module, exports, __webpack_require__) {
  3638. "use strict";
  3639. exports.__esModule = true;
  3640. var _react = __webpack_require__(0);
  3641. var _react2 = _interopRequireDefault(_react);
  3642. var _reactDom = __webpack_require__(6);
  3643. var _reactDom2 = _interopRequireDefault(_reactDom);
  3644. var _propTypes = __webpack_require__(2);
  3645. var _propTypes2 = _interopRequireDefault(_propTypes);
  3646. var _StringResources = __webpack_require__(1);
  3647. var _StringResources2 = _interopRequireDefault(_StringResources);
  3648. var _caUiToolkit = __webpack_require__(3);
  3649. __webpack_require__(4);
  3650. var _delete_ = __webpack_require__(17);
  3651. var _delete_2 = _interopRequireDefault(_delete_);
  3652. function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
  3653. function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
  3654. function _possibleConstructorReturn(self, call) { if (!self) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return call && (typeof call === "object" || typeof call === "function") ? call : self; }
  3655. function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function, not " + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; } /**
  3656. * Licensed Materials - Property of IBM
  3657. * IBM Cognos Products: BI
  3658. * (C) Copyright IBM Corp. 2018
  3659. * US Government Users Restricted Rights - Use, duplication or disclosure restricted by GSA ADP Schedule Contract with IBM Corp.
  3660. */
  3661. var DEFAULT_FAVORITES = 12;
  3662. var Favorites = function (_Component) {
  3663. _inherits(Favorites, _Component);
  3664. function Favorites(props) {
  3665. _classCallCheck(this, Favorites);
  3666. var _this = _possibleConstructorReturn(this, _Component.call(this, props));
  3667. _this.numberOfFavorites = props.numberOfFavorites ? props.numberOfFavorites : DEFAULT_FAVORITES;
  3668. _this.currentFavorite = null;
  3669. _this.state = {
  3670. favoriteColors: props.favoriteColors
  3671. };
  3672. return _this;
  3673. }
  3674. /**
  3675. * Create a view that will show the user his favorite colors, and allow him to choose and delete
  3676. * @param {array} options.updateColor - {Optional} callback when a favorite color is selected.
  3677. * @param {array} options.favoriteColors - {REQUIRED} Favorite colors previously saved
  3678. * @param {integer} options.numberOfFavorites - {Optional} Max number of favorites possible, by default 12.
  3679. */
  3680. Favorites.prototype.onDeleteFavorite = function onDeleteFavorite() {
  3681. //last one
  3682. var index = this.state.favoriteColors.length - 1;
  3683. if (this.currentFavorite) {
  3684. index = this.currentFavorite.getAttribute('favoriteIndex');
  3685. this.deselectCurrentFavorite();
  3686. }
  3687. var colors = this.state.favoriteColors;
  3688. colors.splice(index, 1);
  3689. this.setState({
  3690. favoriteColors: colors
  3691. });
  3692. };
  3693. Favorites.prototype.handleKeyDown = function handleKeyDown(e, handler) {
  3694. if (e.which === 13 || e.which === 32) {
  3695. handler(e);
  3696. }
  3697. };
  3698. Favorites.prototype.deselectCurrentFavorite = function deselectCurrentFavorite() {
  3699. if (this.isFavoriteSelected()) {
  3700. this.currentFavorite.classList.remove('selected');
  3701. this.currentFavorite = null;
  3702. }
  3703. };
  3704. Favorites.prototype.isFavoriteSelected = function isFavoriteSelected() {
  3705. return !!this.currentFavorite;
  3706. };
  3707. Favorites.prototype.updateSelectedColor = function updateSelectedColor(color) {
  3708. var colors = this.state.favoriteColors;
  3709. colors[this.getSelectedIndex()] = color;
  3710. this.setState({
  3711. favoriteColors: colors
  3712. });
  3713. };
  3714. Favorites.prototype.getSelectedIndex = function getSelectedIndex() {
  3715. if (this.isFavoriteSelected()) {
  3716. return this.currentFavorite.getAttribute('favoriteIndex');
  3717. }
  3718. };
  3719. Favorites.prototype.getSelectedColor = function getSelectedColor() {
  3720. if (this.isFavoriteSelected()) {
  3721. return this.currentFavorite.getAttribute('value');
  3722. }
  3723. };
  3724. Favorites.prototype.selectFavorite = function selectFavorite(element) {
  3725. if (element.target.classList.contains('selected')) {
  3726. this.currentFavorite = null;
  3727. } else {
  3728. this.deselectCurrentFavorite();
  3729. this.currentFavorite = element.target;
  3730. }
  3731. element.target.classList.toggle('selected');
  3732. if (this.props.updateColor) {
  3733. this.props.updateColor(this.getSelectedColor());
  3734. }
  3735. };
  3736. Favorites.prototype.getFavoriteColors = function getFavoriteColors() {
  3737. return this.state.favoriteColors;
  3738. };
  3739. Favorites.prototype.getFavorite = function getFavorite(i, color) {
  3740. var _this2 = this;
  3741. if (color) {
  3742. return _react2.default.createElement('div', { className: 'favoriteBox filled', key: i, tabIndex: '0', favoriteIndex: i, value: color, onKeyDown: function onKeyDown(e) {
  3743. return _this2.handleKeyDown(e, _this2.selectFavorite.bind(_this2));
  3744. }, onClick: function onClick(e) {
  3745. return _this2.selectFavorite(e);
  3746. }, style: { backgroundColor: color } });
  3747. } else {
  3748. return _react2.default.createElement('div', { className: 'favoriteBox', key: i, favoriteIndex: i });
  3749. }
  3750. };
  3751. Favorites.prototype.generateFavorites = function generateFavorites() {
  3752. //TODO Get CM colors
  3753. var favorites = [];
  3754. for (var i = 0; i < this.numberOfFavorites; i++) {
  3755. var color = i < this.state.favoriteColors.length ? this.state.favoriteColors[i] : undefined;
  3756. favorites.push(this.getFavorite(i, color));
  3757. }
  3758. return favorites;
  3759. };
  3760. Favorites.prototype.render = function render() {
  3761. var _this3 = this;
  3762. return _react2.default.createElement(
  3763. _caUiToolkit.FlexLayout,
  3764. { className: 'favoriteColors', direction: 'column' },
  3765. _react2.default.createElement(_caUiToolkit.Label, { className: 'favoritesLabel', label: _StringResources2.default.get('favoritesLabel') }),
  3766. _react2.default.createElement(
  3767. _caUiToolkit.FlexLayout,
  3768. { className: 'favoritesPicker', inline: true, direction: 'row' },
  3769. this.generateFavorites(),
  3770. _react2.default.createElement(_caUiToolkit.SVGIcon, { className: 'deleteFavorite', size: 'small', iconId: _delete_2.default.id, tabIndex: '0', onKeyDown: function onKeyDown(e) {
  3771. return _this3.handleKeyDown(e, _this3.onDeleteFavorite.bind(_this3));
  3772. }, onClick: this.onDeleteFavorite.bind(this) })
  3773. )
  3774. );
  3775. };
  3776. return Favorites;
  3777. }(_react.Component);
  3778. Favorites.propTypes = {
  3779. updateColor: _propTypes2.default.func,
  3780. favoriteColors: _propTypes2.default.array.isRequired,
  3781. numberOfFavorites: _propTypes2.default.number
  3782. };
  3783. exports.default = Favorites;
  3784. /***/ }),
  3785. /* 35 */
  3786. /***/ (function(module, exports, __webpack_require__) {
  3787. exports = module.exports = __webpack_require__(36)(false);
  3788. // imports
  3789. // module
  3790. exports.push([module.i, "/**\n * Licensed Materials - Property of IBM\n * IBM Cognos Products: BI Cloud (C) Copyright IBM Corp. 2018\n * US Government Users Restricted Rights - Use, duplication or disclosure restricted by GSA ADP Schedule Contract with IBM Corp.\n */\n\n/**\n * Licensed Materials - Property of IBM\n * IBM Cognos Products: BI Cloud (C) Copyright IBM Corp. 2018\n * US Government Users Restricted Rights - Use, duplication or disclosure restricted by GSA ADP Schedule Contract with IBM Corp.\n */\n\n#dummyId {\n background-color: white;\n}\n\n/**\n * Licensed Materials - Property of IBM\n * IBM Cognos Products: BI\n * (C) Copyright IBM Corp. 2018\n * US Government Users Restricted Rights - Use, duplication or disclosure restricted by GSA ADP Schedule Contract with IBM Corp.\n */\n\n.clsPaletteContainer td {\n vertical-align: middle;\n}\n\n.clsSwatchStyle,\n.clsSwatchStyle_empty,\n.clsSwatchStyle_filled,\n.clsSwatchStyle_selected,\n.clsSwatchStyle_filled_selected,\n.clsVisualItem_empty {\n height: 32px;\n padding: 0;\n width: 32px;\n margin: 4px 5px;\n float: left;\n}\n\n.clsSwatchStyle_empty {\n border: 1px dashed;\n border-color: #e0e0e0;\n border-color: hsla(var(--ui-03-h, 0), var(--ui-03-s, 0%), var(--ui-03-l, 87.84314%), 1);\n}\n\n.clsSwatchStyle_empty:hover {\n box-shadow: 0 0 0 2px hsla(var(--ui-01-h, 0), var(--ui-01-s, 0%), var(--ui-01-l, 100%), 1), 0 0 0 4px hsla(var(--hover-secondary-h, 0), var(--hover-secondary-s, 0%), var(--hover-secondary-l, 29.80392%), 1);\n}\n\n.clsSwatchStyle_filled {\n border: none;\n}\n\n.clsSwatchStyle_filled:hover {\n box-shadow: 0 0 0 2px hsla(var(--ui-01-h, 0), var(--ui-01-s, 0%), var(--ui-01-l, 100%), 1), 0 0 0 4px hsla(var(--hover-secondary-h, 0), var(--hover-secondary-s, 0%), var(--hover-secondary-l, 29.80392%), 1);\n}\n\n.clsSwatchStyle_selected {\n border: 1px solid;\n border-color: #e0e0e0;\n border-color: hsla(var(--ui-03-h, 0), var(--ui-03-s, 0%), var(--ui-03-l, 87.84314%), 1);\n box-shadow: 0 0 0 2px hsla(var(--ui-01-h, 0), var(--ui-01-s, 0%), var(--ui-01-l, 100%), 1), 0 0 0 4px hsla(var(--interactive-02-h, 0), var(--interactive-02-s, 0%), var(--interactive-02-l, 22.35294%), 1);\n}\n\n.clsSwatchStyle_filled_selected {\n border: none;\n box-shadow: 0 0 0 2px hsla(var(--ui-01-h, 0), var(--ui-01-s, 0%), var(--ui-01-l, 100%), 1), 0 0 0 4px hsla(var(--interactive-02-h, 0), var(--interactive-02-s, 0%), var(--interactive-02-l, 22.35294%), 1);\n}\n\n.clsColorBoxStyle,\n.clsColorBoxStyle_white {\n margin: 1px 4px;\n width: 32px;\n height: 32px;\n float: left;\n}\n\n.clsColorBoxStyle_white {\n border: 1px solid;\n border-color: #e0e0e0;\n border-color: hsla(var(--ui-03-h, 0), var(--ui-03-s, 0%), var(--ui-03-l, 87.84314%), 1);\n}\n\n.clsPaletteIcons_wrapper,\n.clsPaletteIcons_wrapper_selected {\n padding-bottom: 3px;\n margin: 0 8px;\n}\n\n.clsPaletteIcons_wrapper_selected {\n box-shadow: 0 2px hsla(var(--interactive-01-h, 219.16318), var(--interactive-01-s, 99.17012%), var(--interactive-01-l, 52.7451%), 1);\n}\n\n.clsPaletteIcons,\n.clsPaletteStandard,\n.clsPaletteGradient {\n margin-top: 10px;\n box-sizing: border-box;\n width: 22px;\n height: 22px;\n border: 2px solid;\n border-color: #8d8d8d;\n border-color: hsla(var(--ui-04-h, 0), var(--ui-04-s, 0%), var(--ui-04-l, 55.29412%), 1);\n}\n\n.clsPaletteStandard {\n background-color: #e0e0e0;\n background-color: hsla(var(--ui-03-h, 0), var(--ui-03-s, 0%), var(--ui-03-l, 87.84314%), 1);\n}\n\n.clsPaletteGradient {\n background: linear-gradient(to right, rgba(0, 0, 0, 0) 0%, black 100%);\n}\n\n.clsWheelContainer {\n cursor: pointer;\n}\n\n.clsPickerWrapper {\n height: 32px;\n width: 32px;\n top: 0;\n left: 0;\n position: relative;\n display: none;\n}\n\n.clsWheelSelector {\n border: 2px solid;\n border-color: #8d8d8d;\n border-color: hsla(var(--ui-04-h, 0), var(--ui-04-s, 0%), var(--ui-04-l, 55.29412%), 1);\n border-radius: 50%;\n box-shadow: inset 0 0 0 2px hsla(var(--ui-01-h, 0), var(--ui-01-s, 0%), var(--ui-01-l, 100%), 1);\n background-color: transparent;\n display: none;\n}\n\n.clsWheelSelectorEmpty {\n box-shadow: inset 0 0 0 2px hsla(var(--ui-01-h, 0), var(--ui-01-s, 0%), var(--ui-01-l, 100%), 1), inset 0 0 0 3px hsla(var(--hover-secondary-h, 0), var(--hover-secondary-s, 0%), var(--hover-secondary-l, 29.80392%), 1);\n background-color: white;\n background-color: hsla(var(--ui-01-h, 0), var(--ui-01-s, 0%), var(--ui-01-l, 100%), 1);\n display: none;\n}\n\n.clsPreviewBox {\n height: 40px;\n width: 60px;\n position: relative;\n border: 1px solid;\n border-color: #e0e0e0;\n border-color: hsla(var(--ui-03-h, 0), var(--ui-03-s, 0%), var(--ui-03-l, 87.84314%), 1);\n}\n\n.clsSelector {\n border: 2px solid;\n border-color: #393939;\n border-color: hsla(var(--interactive-02-h, 0), var(--interactive-02-s, 0%), var(--interactive-02-l, 22.35294%), 1);\n height: 32px;\n width: 32px;\n border-radius: 50%;\n box-shadow: inset 0 0 0 2px hsla(var(--ui-01-h, 0), var(--ui-01-s, 0%), var(--ui-01-l, 100%), 1);\n transition: 150ms;\n}\n\n.clsContinuousIndicatorContainer {\n width: 32px;\n height: 32px;\n display: -ms-flexbox;\n display: flex;\n -ms-flex-align: center;\n align-items: center;\n -ms-flex-pack: center;\n justify-content: center;\n}\n\n.clsContinuousIndicator {\n border: 2px solid;\n border-color: #8d8d8d;\n border-color: hsla(var(--ui-04-h, 0), var(--ui-04-s, 0%), var(--ui-04-l, 55.29412%), 1);\n border-radius: 50%;\n height: 16px;\n width: 16px;\n box-shadow: inset 0 0 0 1px hsla(var(--ui-01-h, 0), var(--ui-01-s, 0%), var(--ui-01-l, 100%), 1), inset 0 0 0 2px hsla(var(--hover-secondary-h, 0), var(--hover-secondary-s, 0%), var(--hover-secondary-l, 29.80392%), 1);\n}\n\n.clsContinuousIndicator:hover {\n height: 24px;\n width: 24px;\n transition: 150ms;\n}\n\n.clsContinuousPreview {\n width: 97%;\n height: 32px;\n border: 1px solid;\n border-color: #e0e0e0;\n border-color: hsla(var(--ui-03-h, 0), var(--ui-03-s, 0%), var(--ui-03-l, 87.84314%), 1);\n display: -ms-flexbox;\n display: flex;\n -ms-flex-align: center;\n align-items: center;\n -ms-flex-pack: justify;\n justify-content: space-between;\n}\n\n.clsContinuousPreviewRoundLeft {\n border-radius: 16px 0px 0px 16px;\n}\n\n.clsContinuousPreviewRoundRight {\n border-radius: 0px 16px 16px 0px;\n}\n\n/**\n * Licensed Materials - Property of IBM\n * IBM Cognos Products: BI\n * (C) Copyright IBM Corp. 2018\n * US Government Users Restricted Rights - Use, duplication or disclosure restricted by GSA ADP Schedule Contract with IBM Corp.\n */\n\n.favoriteColors .favoritesLabel {\n margin: 0px 0px 8px 8px;\n}\n\n.favoriteColors .deleteFavorite {\n margin-left: 16px;\n -ms-flex-item-align: center;\n -ms-grid-row-align: center;\n align-self: center;\n}\n\n.favoriteColors .favoriteBox {\n border: 2px dashed;\n border-color: #e0e0e0;\n border-color: hsla(var(--ui-03-h, 0), var(--ui-03-s, 0%), var(--ui-03-l, 87.84314%), 1);\n height: 36px;\n padding: 0;\n width: 36px;\n float: left;\n margin-left: 8px;\n}\n\n.favoriteColors .favoriteBox.filled {\n border-style: solid;\n}\n\n.favoriteColors .favoriteBox.selected {\n border-color: #161616;\n border-color: hsla(var(--ui-05-h, 0), var(--ui-05-s, 0%), var(--ui-05-l, 8.62745%), 1);\n}\n\n/**\n * Licensed Materials - Property of IBM\n * IBM Cognos Products: BI\n * (C) Copyright IBM Corp. 2019\n * US Government Users Restricted Rights - Use, duplication or disclosure restricted by GSA ADP Schedule Contract with IBM Corp.\n */\n\n#schematicEditorToastTargetId .ba-common-globaltoast {\n position: absolute;\n width: 56%;\n left: 22%;\n}\n\n.clsSVGEditorTabs .ba-common-tabList__item.is-label {\n min-width: 120px;\n}\n\n.clsSVGSearch .ba-common-baseInput {\n width: 288px;\n}\n\n.clsSVGTileStyle,\n.clsSVGTileStyle_selected {\n position: relative;\n width: 128px;\n height: 128px;\n box-sizing: border-box;\n border: 1px solid;\n border-color: #e0e0e0;\n border-color: hsla(var(--ui-03-h, 0), var(--ui-03-s, 0%), var(--ui-03-l, 87.84314%), 1);\n}\n\n.clsSVGTileStyle:hover,\n.clsSVGTileStyle_selected:hover {\n background-color: #f4f4f4;\n background-color: hsla(var(--ui-02-h, 0), var(--ui-02-s, 0%), var(--ui-02-l, 95.68627%), 1);\n}\n\n.clsSVGTileStyle:focus,\n.clsSVGTileStyle_selected:focus {\n outline: none;\n}\n\n.clsSVGTileStyle_selected {\n border: 2px solid;\n border-color: #e0e0e0;\n border-color: hsla(var(--selected-ui-h, 0), var(--selected-ui-s, 0%), var(--selected-ui-l, 87.84314%), 1);\n}\n\n.clsSVGTilesStyle {\n overflow: auto;\n height: 504px;\n width: 100%;\n border: 1px solid;\n border-color: #e0e0e0;\n border-color: hsla(var(--ui-03-h, 0), var(--ui-03-s, 0%), var(--ui-03-l, 87.84314%), 1);\n text-align: center;\n}\n\n.clsSVGTabsStyle {\n padding-top: 16px;\n height: 594px;\n box-sizing: border-box;\n}\n\n.clsSVGDetailContainer {\n border: 1px solid;\n border-color: #e0e0e0;\n border-color: hsla(var(--ui-03-h, 0), var(--ui-03-s, 0%), var(--ui-03-l, 87.84314%), 1);\n box-sizing: border-box;\n padding: 16px;\n}\n\n.clsSVGPackageEdit .ba-common-baseInput,\n.clsSVGPackageEdit .ba-common-textArea > textarea {\n width: 420px;\n}\n\n.clsSVGDetailEdit,\n.clsSVGDetailEdit .ba-common-baseInput,\n.clsSVGPackageEdit .ba-common-baseInput {\n width: 100%;\n}\n\n.clsSVGDetailEdit input,\n.clsSVGPackageEdit input,\n.clsSVGPackageEdit .ba-common-textArea > textarea {\n box-sizing: border-box;\n}\n\n.clsSVGPackageEdit .ba-common-textArea.is-fullHeight > textarea {\n height: 190px;\n}\n\n.clsSVGDetailStyle {\n height: 216px;\n width: 237px;\n}\n\n.clsSVGTileStyleMenu {\n height: 16px;\n}\n\n.clsSVGTileStyleMenu .svgIcon {\n color: #a8a8a8;\n color: hsla(var(--text-03-h, 0), var(--text-03-s, 0%), var(--text-03-l, 65.88235%), 1);\n}\n\n.clsSVGTileStyleMenu .clsSVGTileStyleMenuAnchor {\n padding-right: 4px;\n}\n\n.clsSVGTileStyleMenu:hover .svgIcon {\n color: #e0e0e0;\n color: hsla(var(--selected-ui-h, 0), var(--selected-ui-s, 0%), var(--selected-ui-l, 87.84314%), 1);\n}\n\n.clsVisualItem_empty {\n border: 1px dashed;\n border-color: #e0e0e0;\n border-color: hsla(var(--ui-03-h, 0), var(--ui-03-s, 0%), var(--ui-03-l, 87.84314%), 1);\n}\n\n.clsVisualItem_empty:hover {\n box-shadow: 0 0 0 2px hsla(var(--ui-01-h, 0), var(--ui-01-s, 0%), var(--ui-01-l, 100%), 1), 0 0 0 4px hsla(var(--hover-secondary-h, 0), var(--hover-secondary-s, 0%), var(--hover-secondary-l, 29.80392%), 1);\n}\n\n.clsSVGIconPanel,\n.clsSVGDetailsPanel,\n.clsSVGDropZone,\n.clsSVGDndOverlay {\n width: 420px;\n height: 278px;\n box-sizing: border-box;\n}\n\n.clsSVGIconPanel {\n background-color: rgba(0, 0, 0, 0.05);\n background-color: rgba(0, 0, 0, 0.05);\n background-color: hsla(var(--background-color-hover-h, 0), var(--background-color-hover-s, 0%), var(--background-color-hover-l, 0%), 0.05);\n}\n\n.clsSVGIconRow {\n border-bottom: 2px solid;\n border-bottom-color: #e0e0e0;\n border-bottom-color: hsla(var(--ui-03-h, 0), var(--ui-03-s, 0%), var(--ui-03-l, 87.84314%), 1);\n margin-left: 16px;\n margin-right: 16px;\n height: 64px;\n}\n\n#svgIconFL {\n width: 36px;\n height: 36px;\n}\n\n#svgIconIMG {\n max-width: 36px;\n max-height: 36px;\n}\n\n#svgIconFI {\n width: 100%;\n}\n\n#idAddSwatch,\n#idRemoveIcon {\n padding-right: 0px;\n}\n\n#idSchematicIconLabel {\n margin-bottom: 0px;\n}\n\n.clsSVGDropZone {\n border: 2px dashed;\n border-color: #e0e0e0;\n border-color: hsla(var(--ui-03-h, 0), var(--ui-03-s, 0%), var(--ui-03-l, 87.84314%), 1);\n}\n\n.clsSVGDropZone.dragging {\n border: 2px dashed;\n border-color: #e0e0e0;\n border-color: hsla(var(--selected-ui-h, 0), var(--selected-ui-s, 0%), var(--selected-ui-l, 87.84314%), 1);\n}\n\n.clsSVGDndOverlay {\n position: absolute;\n z-index: 1;\n display: none;\n opacity: 0.5;\n background-color: rgba(15, 98, 254, 0.5);\n background-color: hsla(var(--interactive-01-h, 219.16318), var(--interactive-01-s, 99.17012%), var(--interactive-01-l, 52.7451%), 0.5);\n}\n\n#schematicEditorFooterId {\n margin-top: 24px;\n}", ""]);
  3791. // exports
  3792. /***/ }),
  3793. /* 36 */
  3794. /***/ (function(module, exports) {
  3795. /*
  3796. MIT License http://www.opensource.org/licenses/mit-license.php
  3797. Author Tobias Koppers @sokra
  3798. */
  3799. // css base code, injected by the css-loader
  3800. module.exports = function(useSourceMap) {
  3801. var list = [];
  3802. // return the list of modules as css string
  3803. list.toString = function toString() {
  3804. return this.map(function (item) {
  3805. var content = cssWithMappingToString(item, useSourceMap);
  3806. if(item[2]) {
  3807. return "@media " + item[2] + "{" + content + "}";
  3808. } else {
  3809. return content;
  3810. }
  3811. }).join("");
  3812. };
  3813. // import a list of modules into the list
  3814. list.i = function(modules, mediaQuery) {
  3815. if(typeof modules === "string")
  3816. modules = [[null, modules, ""]];
  3817. var alreadyImportedModules = {};
  3818. for(var i = 0; i < this.length; i++) {
  3819. var id = this[i][0];
  3820. if(typeof id === "number")
  3821. alreadyImportedModules[id] = true;
  3822. }
  3823. for(i = 0; i < modules.length; i++) {
  3824. var item = modules[i];
  3825. // skip already imported module
  3826. // this implementation is not 100% perfect for weird media query combinations
  3827. // when a module is imported multiple times with different media queries.
  3828. // I hope this will never occur (Hey this way we have smaller bundles)
  3829. if(typeof item[0] !== "number" || !alreadyImportedModules[item[0]]) {
  3830. if(mediaQuery && !item[2]) {
  3831. item[2] = mediaQuery;
  3832. } else if(mediaQuery) {
  3833. item[2] = "(" + item[2] + ") and (" + mediaQuery + ")";
  3834. }
  3835. list.push(item);
  3836. }
  3837. }
  3838. };
  3839. return list;
  3840. };
  3841. function cssWithMappingToString(item, useSourceMap) {
  3842. var content = item[1] || '';
  3843. var cssMapping = item[3];
  3844. if (!cssMapping) {
  3845. return content;
  3846. }
  3847. if (useSourceMap && typeof btoa === 'function') {
  3848. var sourceMapping = toComment(cssMapping);
  3849. var sourceURLs = cssMapping.sources.map(function (source) {
  3850. return '/*# sourceURL=' + cssMapping.sourceRoot + source + ' */'
  3851. });
  3852. return [content].concat(sourceURLs).concat([sourceMapping]).join('\n');
  3853. }
  3854. return [content].join('\n');
  3855. }
  3856. // Adapted from convert-source-map (MIT)
  3857. function toComment(sourceMap) {
  3858. // eslint-disable-next-line no-undef
  3859. var base64 = btoa(unescape(encodeURIComponent(JSON.stringify(sourceMap))));
  3860. var data = 'sourceMappingURL=data:application/json;charset=utf-8;base64,' + base64;
  3861. return '/*# ' + data + ' */';
  3862. }
  3863. /***/ }),
  3864. /* 37 */
  3865. /***/ (function(module, exports, __webpack_require__) {
  3866. /*
  3867. MIT License http://www.opensource.org/licenses/mit-license.php
  3868. Author Tobias Koppers @sokra
  3869. */
  3870. var stylesInDom = {};
  3871. var memoize = function (fn) {
  3872. var memo;
  3873. return function () {
  3874. if (typeof memo === "undefined") memo = fn.apply(this, arguments);
  3875. return memo;
  3876. };
  3877. };
  3878. var isOldIE = memoize(function () {
  3879. // Test for IE <= 9 as proposed by Browserhacks
  3880. // @see http://browserhacks.com/#hack-e71d8692f65334173fee715c222cb805
  3881. // Tests for existence of standard globals is to allow style-loader
  3882. // to operate correctly into non-standard environments
  3883. // @see https://github.com/webpack-contrib/style-loader/issues/177
  3884. return window && document && document.all && !window.atob;
  3885. });
  3886. var getElement = (function (fn) {
  3887. var memo = {};
  3888. return function(selector) {
  3889. if (typeof memo[selector] === "undefined") {
  3890. var styleTarget = fn.call(this, selector);
  3891. // Special case to return head of iframe instead of iframe itself
  3892. if (styleTarget instanceof window.HTMLIFrameElement) {
  3893. try {
  3894. // This will throw an exception if access to iframe is blocked
  3895. // due to cross-origin restrictions
  3896. styleTarget = styleTarget.contentDocument.head;
  3897. } catch(e) {
  3898. styleTarget = null;
  3899. }
  3900. }
  3901. memo[selector] = styleTarget;
  3902. }
  3903. return memo[selector]
  3904. };
  3905. })(function (target) {
  3906. return document.querySelector(target)
  3907. });
  3908. var singleton = null;
  3909. var singletonCounter = 0;
  3910. var stylesInsertedAtTop = [];
  3911. var fixUrls = __webpack_require__(38);
  3912. module.exports = function(list, options) {
  3913. if (typeof DEBUG !== "undefined" && DEBUG) {
  3914. if (typeof document !== "object") throw new Error("The style-loader cannot be used in a non-browser environment");
  3915. }
  3916. options = options || {};
  3917. options.attrs = typeof options.attrs === "object" ? options.attrs : {};
  3918. // Force single-tag solution on IE6-9, which has a hard limit on the # of <style>
  3919. // tags it will allow on a page
  3920. if (!options.singleton && typeof options.singleton !== "boolean") options.singleton = isOldIE();
  3921. // By default, add <style> tags to the <head> element
  3922. if (!options.insertInto) options.insertInto = "head";
  3923. // By default, add <style> tags to the bottom of the target
  3924. if (!options.insertAt) options.insertAt = "bottom";
  3925. var styles = listToStyles(list, options);
  3926. addStylesToDom(styles, options);
  3927. return function update (newList) {
  3928. var mayRemove = [];
  3929. for (var i = 0; i < styles.length; i++) {
  3930. var item = styles[i];
  3931. var domStyle = stylesInDom[item.id];
  3932. domStyle.refs--;
  3933. mayRemove.push(domStyle);
  3934. }
  3935. if(newList) {
  3936. var newStyles = listToStyles(newList, options);
  3937. addStylesToDom(newStyles, options);
  3938. }
  3939. for (var i = 0; i < mayRemove.length; i++) {
  3940. var domStyle = mayRemove[i];
  3941. if(domStyle.refs === 0) {
  3942. for (var j = 0; j < domStyle.parts.length; j++) domStyle.parts[j]();
  3943. delete stylesInDom[domStyle.id];
  3944. }
  3945. }
  3946. };
  3947. };
  3948. function addStylesToDom (styles, options) {
  3949. for (var i = 0; i < styles.length; i++) {
  3950. var item = styles[i];
  3951. var domStyle = stylesInDom[item.id];
  3952. if(domStyle) {
  3953. domStyle.refs++;
  3954. for(var j = 0; j < domStyle.parts.length; j++) {
  3955. domStyle.parts[j](item.parts[j]);
  3956. }
  3957. for(; j < item.parts.length; j++) {
  3958. domStyle.parts.push(addStyle(item.parts[j], options));
  3959. }
  3960. } else {
  3961. var parts = [];
  3962. for(var j = 0; j < item.parts.length; j++) {
  3963. parts.push(addStyle(item.parts[j], options));
  3964. }
  3965. stylesInDom[item.id] = {id: item.id, refs: 1, parts: parts};
  3966. }
  3967. }
  3968. }
  3969. function listToStyles (list, options) {
  3970. var styles = [];
  3971. var newStyles = {};
  3972. for (var i = 0; i < list.length; i++) {
  3973. var item = list[i];
  3974. var id = options.base ? item[0] + options.base : item[0];
  3975. var css = item[1];
  3976. var media = item[2];
  3977. var sourceMap = item[3];
  3978. var part = {css: css, media: media, sourceMap: sourceMap};
  3979. if(!newStyles[id]) styles.push(newStyles[id] = {id: id, parts: [part]});
  3980. else newStyles[id].parts.push(part);
  3981. }
  3982. return styles;
  3983. }
  3984. function insertStyleElement (options, style) {
  3985. var target = getElement(options.insertInto)
  3986. if (!target) {
  3987. throw new Error("Couldn't find a style target. This probably means that the value for the 'insertInto' parameter is invalid.");
  3988. }
  3989. var lastStyleElementInsertedAtTop = stylesInsertedAtTop[stylesInsertedAtTop.length - 1];
  3990. if (options.insertAt === "top") {
  3991. if (!lastStyleElementInsertedAtTop) {
  3992. target.insertBefore(style, target.firstChild);
  3993. } else if (lastStyleElementInsertedAtTop.nextSibling) {
  3994. target.insertBefore(style, lastStyleElementInsertedAtTop.nextSibling);
  3995. } else {
  3996. target.appendChild(style);
  3997. }
  3998. stylesInsertedAtTop.push(style);
  3999. } else if (options.insertAt === "bottom") {
  4000. target.appendChild(style);
  4001. } else if (typeof options.insertAt === "object" && options.insertAt.before) {
  4002. var nextSibling = getElement(options.insertInto + " " + options.insertAt.before);
  4003. target.insertBefore(style, nextSibling);
  4004. } else {
  4005. throw new Error("[Style Loader]\n\n Invalid value for parameter 'insertAt' ('options.insertAt') found.\n Must be 'top', 'bottom', or Object.\n (https://github.com/webpack-contrib/style-loader#insertat)\n");
  4006. }
  4007. }
  4008. function removeStyleElement (style) {
  4009. if (style.parentNode === null) return false;
  4010. style.parentNode.removeChild(style);
  4011. var idx = stylesInsertedAtTop.indexOf(style);
  4012. if(idx >= 0) {
  4013. stylesInsertedAtTop.splice(idx, 1);
  4014. }
  4015. }
  4016. function createStyleElement (options) {
  4017. var style = document.createElement("style");
  4018. options.attrs.type = "text/css";
  4019. addAttrs(style, options.attrs);
  4020. insertStyleElement(options, style);
  4021. return style;
  4022. }
  4023. function createLinkElement (options) {
  4024. var link = document.createElement("link");
  4025. options.attrs.type = "text/css";
  4026. options.attrs.rel = "stylesheet";
  4027. addAttrs(link, options.attrs);
  4028. insertStyleElement(options, link);
  4029. return link;
  4030. }
  4031. function addAttrs (el, attrs) {
  4032. Object.keys(attrs).forEach(function (key) {
  4033. el.setAttribute(key, attrs[key]);
  4034. });
  4035. }
  4036. function addStyle (obj, options) {
  4037. var style, update, remove, result;
  4038. // If a transform function was defined, run it on the css
  4039. if (options.transform && obj.css) {
  4040. result = options.transform(obj.css);
  4041. if (result) {
  4042. // If transform returns a value, use that instead of the original css.
  4043. // This allows running runtime transformations on the css.
  4044. obj.css = result;
  4045. } else {
  4046. // If the transform function returns a falsy value, don't add this css.
  4047. // This allows conditional loading of css
  4048. return function() {
  4049. // noop
  4050. };
  4051. }
  4052. }
  4053. if (options.singleton) {
  4054. var styleIndex = singletonCounter++;
  4055. style = singleton || (singleton = createStyleElement(options));
  4056. update = applyToSingletonTag.bind(null, style, styleIndex, false);
  4057. remove = applyToSingletonTag.bind(null, style, styleIndex, true);
  4058. } else if (
  4059. obj.sourceMap &&
  4060. typeof URL === "function" &&
  4061. typeof URL.createObjectURL === "function" &&
  4062. typeof URL.revokeObjectURL === "function" &&
  4063. typeof Blob === "function" &&
  4064. typeof btoa === "function"
  4065. ) {
  4066. style = createLinkElement(options);
  4067. update = updateLink.bind(null, style, options);
  4068. remove = function () {
  4069. removeStyleElement(style);
  4070. if(style.href) URL.revokeObjectURL(style.href);
  4071. };
  4072. } else {
  4073. style = createStyleElement(options);
  4074. update = applyToTag.bind(null, style);
  4075. remove = function () {
  4076. removeStyleElement(style);
  4077. };
  4078. }
  4079. update(obj);
  4080. return function updateStyle (newObj) {
  4081. if (newObj) {
  4082. if (
  4083. newObj.css === obj.css &&
  4084. newObj.media === obj.media &&
  4085. newObj.sourceMap === obj.sourceMap
  4086. ) {
  4087. return;
  4088. }
  4089. update(obj = newObj);
  4090. } else {
  4091. remove();
  4092. }
  4093. };
  4094. }
  4095. var replaceText = (function () {
  4096. var textStore = [];
  4097. return function (index, replacement) {
  4098. textStore[index] = replacement;
  4099. return textStore.filter(Boolean).join('\n');
  4100. };
  4101. })();
  4102. function applyToSingletonTag (style, index, remove, obj) {
  4103. var css = remove ? "" : obj.css;
  4104. if (style.styleSheet) {
  4105. style.styleSheet.cssText = replaceText(index, css);
  4106. } else {
  4107. var cssNode = document.createTextNode(css);
  4108. var childNodes = style.childNodes;
  4109. if (childNodes[index]) style.removeChild(childNodes[index]);
  4110. if (childNodes.length) {
  4111. style.insertBefore(cssNode, childNodes[index]);
  4112. } else {
  4113. style.appendChild(cssNode);
  4114. }
  4115. }
  4116. }
  4117. function applyToTag (style, obj) {
  4118. var css = obj.css;
  4119. var media = obj.media;
  4120. if(media) {
  4121. style.setAttribute("media", media)
  4122. }
  4123. if(style.styleSheet) {
  4124. style.styleSheet.cssText = css;
  4125. } else {
  4126. while(style.firstChild) {
  4127. style.removeChild(style.firstChild);
  4128. }
  4129. style.appendChild(document.createTextNode(css));
  4130. }
  4131. }
  4132. function updateLink (link, options, obj) {
  4133. var css = obj.css;
  4134. var sourceMap = obj.sourceMap;
  4135. /*
  4136. If convertToAbsoluteUrls isn't defined, but sourcemaps are enabled
  4137. and there is no publicPath defined then lets turn convertToAbsoluteUrls
  4138. on by default. Otherwise default to the convertToAbsoluteUrls option
  4139. directly
  4140. */
  4141. var autoFixUrls = options.convertToAbsoluteUrls === undefined && sourceMap;
  4142. if (options.convertToAbsoluteUrls || autoFixUrls) {
  4143. css = fixUrls(css);
  4144. }
  4145. if (sourceMap) {
  4146. // http://stackoverflow.com/a/26603875
  4147. css += "\n/*# sourceMappingURL=data:application/json;base64," + btoa(unescape(encodeURIComponent(JSON.stringify(sourceMap)))) + " */";
  4148. }
  4149. var blob = new Blob([css], { type: "text/css" });
  4150. var oldSrc = link.href;
  4151. link.href = URL.createObjectURL(blob);
  4152. if(oldSrc) URL.revokeObjectURL(oldSrc);
  4153. }
  4154. /***/ }),
  4155. /* 38 */
  4156. /***/ (function(module, exports) {
  4157. /**
  4158. * When source maps are enabled, `style-loader` uses a link element with a data-uri to
  4159. * embed the css on the page. This breaks all relative urls because now they are relative to a
  4160. * bundle instead of the current page.
  4161. *
  4162. * One solution is to only use full urls, but that may be impossible.
  4163. *
  4164. * Instead, this function "fixes" the relative urls to be absolute according to the current page location.
  4165. *
  4166. * A rudimentary test suite is located at `test/fixUrls.js` and can be run via the `npm test` command.
  4167. *
  4168. */
  4169. module.exports = function (css) {
  4170. // get current location
  4171. var location = typeof window !== "undefined" && window.location;
  4172. if (!location) {
  4173. throw new Error("fixUrls requires window.location");
  4174. }
  4175. // blank or null?
  4176. if (!css || typeof css !== "string") {
  4177. return css;
  4178. }
  4179. var baseUrl = location.protocol + "//" + location.host;
  4180. var currentDir = baseUrl + location.pathname.replace(/\/[^\/]*$/, "/");
  4181. // convert each url(...)
  4182. /*
  4183. This regular expression is just a way to recursively match brackets within
  4184. a string.
  4185. /url\s*\( = Match on the word "url" with any whitespace after it and then a parens
  4186. ( = Start a capturing group
  4187. (?: = Start a non-capturing group
  4188. [^)(] = Match anything that isn't a parentheses
  4189. | = OR
  4190. \( = Match a start parentheses
  4191. (?: = Start another non-capturing groups
  4192. [^)(]+ = Match anything that isn't a parentheses
  4193. | = OR
  4194. \( = Match a start parentheses
  4195. [^)(]* = Match anything that isn't a parentheses
  4196. \) = Match a end parentheses
  4197. ) = End Group
  4198. *\) = Match anything and then a close parens
  4199. ) = Close non-capturing group
  4200. * = Match anything
  4201. ) = Close capturing group
  4202. \) = Match a close parens
  4203. /gi = Get all matches, not the first. Be case insensitive.
  4204. */
  4205. var fixedCss = css.replace(/url\s*\(((?:[^)(]|\((?:[^)(]+|\([^)(]*\))*\))*)\)/gi, function(fullMatch, origUrl) {
  4206. // strip quotes (if they exist)
  4207. var unquotedOrigUrl = origUrl
  4208. .trim()
  4209. .replace(/^"(.*)"$/, function(o, $1){ return $1; })
  4210. .replace(/^'(.*)'$/, function(o, $1){ return $1; });
  4211. // already a full url? no change
  4212. if (/^(#|data:|http:\/\/|https:\/\/|file:\/\/\/)/i.test(unquotedOrigUrl)) {
  4213. return fullMatch;
  4214. }
  4215. // convert the url to a full url
  4216. var newUrl;
  4217. if (unquotedOrigUrl.indexOf("//") === 0) {
  4218. //TODO: should we add protocol?
  4219. newUrl = unquotedOrigUrl;
  4220. } else if (unquotedOrigUrl.indexOf("/") === 0) {
  4221. // path should be relative to the base url
  4222. newUrl = baseUrl + unquotedOrigUrl; // already starts with '/'
  4223. } else {
  4224. // path should be relative to current directory
  4225. newUrl = currentDir + unquotedOrigUrl.replace(/^\.\//, ""); // Strip leading './'
  4226. }
  4227. // send back the fixed url(...)
  4228. return "url(" + JSON.stringify(newUrl) + ")";
  4229. });
  4230. // send back the fixed css
  4231. return fixedCss;
  4232. };
  4233. /***/ }),
  4234. /* 39 */
  4235. /***/ (function(module, exports, __webpack_require__) {
  4236. "use strict";
  4237. exports.__esModule = true;
  4238. function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
  4239. /**
  4240. * Licensed Materials - Property of IBM
  4241. * IBM Business Analytics (C) Copyright IBM Corp. 2018
  4242. * US Government Users Restricted Rights - Use, duplication or disclosure restricted by GSA ADP Schedule Contract with IBM Corp.
  4243. */
  4244. var PaletteAlgorithms = function () {
  4245. function PaletteAlgorithms() {
  4246. _classCallCheck(this, PaletteAlgorithms);
  4247. }
  4248. PaletteAlgorithms.createPaletteViaHue = function createPaletteViaHue(numSwatches, hslColor) {
  4249. var colors = [];
  4250. var incrementAngle = 360 / numSwatches;
  4251. var startAngle = hslColor.hue;
  4252. for (var i = 0; i < numSwatches; i++) {
  4253. var currAngle = startAngle + incrementAngle * i;
  4254. if (currAngle < 0) {
  4255. currAngle = 360 - currAngle;
  4256. } else if (currAngle > 360) {
  4257. currAngle = currAngle - 360;
  4258. }
  4259. colors.push({
  4260. hue: currAngle,
  4261. sat: hslColor.sat,
  4262. light: hslColor.light
  4263. });
  4264. }
  4265. return colors;
  4266. };
  4267. PaletteAlgorithms.createPaletteViaLight = function createPaletteViaLight(numSwatches, hslColor) {
  4268. var colors = [];
  4269. var startLight = hslColor.light;
  4270. // interval is only needed if there is more than 1
  4271. var interval = numSwatches > 1 ? startLight / (numSwatches - 1) : 0;
  4272. for (var i = 0; i < numSwatches; i++) {
  4273. colors.push({
  4274. hue: hslColor.hue,
  4275. sat: hslColor.sat,
  4276. light: startLight - i * interval
  4277. });
  4278. }
  4279. return colors;
  4280. };
  4281. return PaletteAlgorithms;
  4282. }();
  4283. exports.default = PaletteAlgorithms;
  4284. /***/ }),
  4285. /* 40 */
  4286. /***/ (function(module, exports, __webpack_require__) {
  4287. !function(e,o){if(true)module.exports=o(__webpack_require__(7));else if("function"==typeof define&&define.amd)define(["@ba-ui-toolkit/ba-graphics/dist/icons-js/ba-graphics-icons-commons.js"],o);else{var s=o("object"==typeof exports?require("@ba-ui-toolkit/ba-graphics/dist/icons-js/ba-graphics-icons-commons.js"):e["@ba-ui-toolkit/ba-graphics/dist/icons-js/ba-graphics-icons-commons.js"]);for(var a in s)("object"==typeof exports?exports:e)[a]=s[a]}}("undefined"!=typeof self?self:this,function(e){return webpackJsonPBaGraphics([546],{"10eed102fbc488d5f846":function(e,o,s){"use strict";Object.defineProperty(o,"__esModule",{value:!0});var a=s("3865314c5959606874d4"),i=(s.n(a),s("33c7892ad4967aa3ba24"));o.default=i.a},"33c7892ad4967aa3ba24":function(e,o,s){"use strict";var a=s("9689a9c94ae38b47fa2c"),i=s.n(a),t=s("9ce58a7deea14f49ef01"),c=s.n(t),n=new i.a({id:"repeat_32_v7",use:"repeat_32_v7-usage",viewBox:"0 0 32 32",content:'<symbol xmlns="http://www.w3.org/2000/svg" viewBox="0 0 32 32" id="repeat_32_v7"><path d="M26 6H5.83l3.58-3.59L8 1 2 7l6 6 1.41-1.41L5.83 8H26v7h2V8a2 2 0 00-2-2zm-3.41 14.41L26.17 24H6v-7H4v7a2 2 0 002 2h20.17l-3.58 3.59L24 31l6-6-6-6z" /><path style="fill:none" d="M0 0h32v32H0z" /></symbol>'});c.a.add(n);o.a=n},"3865314c5959606874d4":function(o,s){o.exports=e}},["10eed102fbc488d5f846"])});
  4288. /***/ }),
  4289. /* 41 */
  4290. /***/ (function(module, exports, __webpack_require__) {
  4291. "use strict";
  4292. exports.__esModule = true;
  4293. var _CustomPalette = __webpack_require__(23);
  4294. var _CustomPalette2 = _interopRequireDefault(_CustomPalette);
  4295. var _StringResources = __webpack_require__(1);
  4296. var _StringResources2 = _interopRequireDefault(_StringResources);
  4297. var _underscore = __webpack_require__(5);
  4298. var _underscore2 = _interopRequireDefault(_underscore);
  4299. var _react = __webpack_require__(0);
  4300. var _react2 = _interopRequireDefault(_react);
  4301. var _reactDom = __webpack_require__(6);
  4302. var _reactDom2 = _interopRequireDefault(_reactDom);
  4303. var _jquery = __webpack_require__(9);
  4304. var _jquery2 = _interopRequireDefault(_jquery);
  4305. function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
  4306. /*
  4307. *+------------------------------------------------------------------------+
  4308. *| Licensed Materials - Property of IBM
  4309. *| IBM Cognos Products: Content Explorer
  4310. *| (C) Copyright IBM Corp. 2018
  4311. *|
  4312. *| US Government Users Restricted Rights - Use, duplication or disclosure
  4313. *| restricted by GSA ADP Schedule Contract with IBM Corp.
  4314. *+------------------------------------------------------------------------+
  4315. */
  4316. var View = __webpack_require__(42);
  4317. /**
  4318. Class that will take the palettes, generate a property spec spec and renders it
  4319. **/
  4320. var DEFAULT_MENUITEMS = {
  4321. 'my': ['edit', 'duplicate', 'delete'],
  4322. 'local': ['duplicate'],
  4323. 'public': ['duplicate'],
  4324. 'system': ['duplicate']
  4325. };
  4326. var PALETTE_SECTION_ORDER = ['mru', 'local', 'my', 'public', 'system'];
  4327. var ChangePaletteView = View.extend({
  4328. /**
  4329. * Creates a slideout view that renders a list of palettes
  4330. * @param {node} options.el - parent element
  4331. * @param {String} options.name - property name
  4332. * @param {Object} options.isAdminUI - {boolean} boolean to duplicate items in global instead
  4333. * @param {Object} options.glassContext - Glass context
  4334. * @param {Object} options.menuItems - Object that represents the menu items shown for each type of palettes (my, public, system). By default : DEFAULT_MENUITEMS
  4335. * @param {Function} options.getPalettes - function to call to get the list of palettes. Must return a promise that resolved with the palettes
  4336. * @param {String} options.selectedId - Palette that is currently selected
  4337. * @param {Function} [options.onCreatePalette]- callback called after creating a palette
  4338. * @param {Function} options.onCloseCb - callback before closing the view
  4339. * @param {Function} options.onChange - callback when we change palette
  4340. * @param {Boolean} [options.showHeader] - Should the header be show? Default is true
  4341. * @param {String} options.createPaletteType - Type of palette to create when launching the palette dialog
  4342. * @param {String} options.name - property name
  4343. * @param {Boolean} [options.useSections] - Should the palettes be rendered inside of collapsible sections? Default is true.
  4344. * @param {String} [options.component] - Used for MRU logic, currently supports 'dashboard' and 'reporting'
  4345. * @param {Boolean} [options.showRecentlyUsed] - Should the list of recently used palettes be displayed
  4346. */
  4347. init: function init(options) {
  4348. ChangePaletteView.inherited('init', this, arguments);
  4349. this._sectionOpenState = {}; // Use to track which section are open/closed for when we need to refresh the view
  4350. this._initialSelectedId = options.selectedId;
  4351. _underscore2.default.extend(this, options);
  4352. },
  4353. _createBannerSpec: function _createBannerSpec() {
  4354. var _this = this;
  4355. return {
  4356. 'type': 'Banner',
  4357. 'value': _StringResources2.default.get('changePaletteLabel'),
  4358. 'name': 'changePaletteBanner',
  4359. 'id': 'changePaletteBanner',
  4360. 'centerLabel': true,
  4361. 'onClose': function onClose() {
  4362. _this._handleUpdatingMRU();
  4363. if (_this.onCloseCb) {
  4364. _this.onCloseCb();
  4365. } else if (_this.slideout) {
  4366. _this.slideout.hide();
  4367. }
  4368. },
  4369. 'clickables': [{
  4370. 'type': 'icon',
  4371. 'name': 'addNewPalette',
  4372. 'svgIcon': 'common-add-new',
  4373. 'iconTooltip': _StringResources2.default.get('createPalette'),
  4374. 'clickCallback': this._openPaletteCreator.bind(this)
  4375. }],
  4376. 'backButton': true
  4377. };
  4378. },
  4379. _openPaletteCreator: function _openPaletteCreator() {
  4380. var _this2 = this;
  4381. var paletteComponent = _react2.default.createElement(_CustomPalette2.default, {
  4382. key: 'addNewPalette',
  4383. glassContext: this.glassContext,
  4384. onPaletteCreated: this.onPaletteCreated.bind(this),
  4385. paletteType: this.createPaletteType,
  4386. removeDialog: function removeDialog() {
  4387. (0, _jquery2.default)(document.body).find('.paletteDialogContainer').remove();
  4388. },
  4389. ref: function ref(instance) {
  4390. _this2.palleteDialog = instance;
  4391. } });
  4392. var paletteContainer = (0, _jquery2.default)(document.body).find('.paletteDialogContainer');
  4393. if (paletteContainer.length === 0) {
  4394. paletteContainer = (0, _jquery2.default)('<div class="paletteDialogContainer">');
  4395. (0, _jquery2.default)(document.body).append(paletteContainer);
  4396. }
  4397. _reactDom2.default.render(paletteComponent, paletteContainer.get(0));
  4398. this.palleteDialog.openDialog();
  4399. },
  4400. _createSectionSpec: function _createSectionSpec(paletteCategory) {
  4401. var _this3 = this;
  4402. return {
  4403. type: 'CollapsibleSection',
  4404. label: _StringResources2.default.get(paletteCategory + 'PaletteLabel'),
  4405. id: 'sectionLabel' + paletteCategory,
  4406. name: paletteCategory,
  4407. styleAsSimpleRow: true,
  4408. hideSectionTitle: this.hideSectionTitle ? this.hideSectionTitle : false,
  4409. items: [],
  4410. onOpenChange: function onOpenChange(name, isOpen) {
  4411. // Need to keep track which section is opened/closed for when we refresh the view
  4412. _this3._sectionOpenState[name] = isOpen;
  4413. }
  4414. };
  4415. },
  4416. _createPaletteSpec: function _createPaletteSpec(palettes, properties) {
  4417. var _this4 = this;
  4418. PALETTE_SECTION_ORDER.forEach(function (sectionName) {
  4419. if (palettes[sectionName] && palettes[sectionName].length > 0) {
  4420. var collapsibleSpec = null;
  4421. if (_this4.useSections !== false) {
  4422. collapsibleSpec = _this4._createSectionSpec(sectionName);
  4423. properties.push(collapsibleSpec);
  4424. }
  4425. var containerProperty = collapsibleSpec ? collapsibleSpec : properties;
  4426. palettes[sectionName].forEach(function (palette) {
  4427. var isSelected = _this4.selectedId === palette.id;
  4428. var propertySpec = {
  4429. type: 'NewPalette',
  4430. id: palette.id,
  4431. name: _this4.name,
  4432. reverse: _this4.reverse,
  4433. selected: isSelected,
  4434. palette: palette,
  4435. createPaletteType: _this4.createPaletteType,
  4436. isAdminUI: _this4.isAdminUI,
  4437. onChange: _this4.onPaletteChange.bind(_this4),
  4438. readOnly: false
  4439. };
  4440. if (_this4.menuItems && _this4.menuItems[palette.section]) {
  4441. propertySpec.menuItems = _this4.menuItems[palette.section];
  4442. } else {
  4443. propertySpec.menuItems = DEFAULT_MENUITEMS[palette.section];
  4444. }
  4445. if (_this4.useSections !== false) {
  4446. if (isSelected && typeof _this4._sectionOpenState[sectionName] === 'undefined') {
  4447. _this4._sectionOpenState[sectionName] = true;
  4448. }
  4449. if (_this4._sectionOpenState[sectionName]) {
  4450. containerProperty.open = true;
  4451. }
  4452. containerProperty.items.push(propertySpec);
  4453. } else {
  4454. containerProperty.push(propertySpec);
  4455. }
  4456. });
  4457. }
  4458. });
  4459. },
  4460. _getPropertySpec: function _getPropertySpec() {
  4461. var _this5 = this;
  4462. var properties = [];
  4463. if (this.showHeader !== false) {
  4464. properties.push(this._createBannerSpec());
  4465. }
  4466. return this.getPalettes().then(function (palettes) {
  4467. _this5._augmentPalettes(palettes);
  4468. _this5.palettes = palettes;
  4469. _this5._trimCustomPalettes(palettes);
  4470. return _this5._getMRUPalettes().then(function (mruPalettes) {
  4471. palettes.mru = mruPalettes || [];
  4472. _this5._createPaletteSpec(palettes, properties);
  4473. if (properties.length === 0) {
  4474. return null;
  4475. }
  4476. return {
  4477. el: _this5.$el,
  4478. glassContext: _this5.glassContext,
  4479. items: properties,
  4480. ariaLabel: properties[0].value,
  4481. primaryUIControl: true
  4482. };
  4483. });
  4484. });
  4485. },
  4486. /**
  4487. * We need to augement the palette information with which section the palette is being shown in
  4488. * @param {Array} palettes
  4489. */
  4490. _augmentPalettes: function _augmentPalettes(palettes) {
  4491. if (!palettes) {
  4492. return;
  4493. }
  4494. var _loop = function _loop(section) {
  4495. if (palettes[section] && palettes[section].length > 0) {
  4496. palettes[section].forEach(function (palette) {
  4497. palette.section = section;
  4498. });
  4499. }
  4500. };
  4501. for (var section in palettes) {
  4502. _loop(section);
  4503. }
  4504. },
  4505. _getMRUPalettes: function _getMRUPalettes() {
  4506. var _this6 = this;
  4507. var mruPalettes = [];
  4508. if (this.showRecentlyUsed === false || !this._paletteService) {
  4509. return Promise.resolve(mruPalettes);
  4510. }
  4511. return this._paletteService.getRecentlyUsedPaletteInfo(this._getFillType()).then(function (mruInfo) {
  4512. mruInfo.forEach(function (info) {
  4513. // Cap the MRU list of palettes to 3
  4514. if (mruPalettes.length < 3) {
  4515. // Only add palettes to the MRU if there already somewhere else in the view (custom, global, system)
  4516. var palette = _this6._findPaletteFromId(info.id);
  4517. if (palette) {
  4518. mruPalettes.push(palette);
  4519. }
  4520. }
  4521. });
  4522. return mruPalettes;
  4523. });
  4524. },
  4525. /**
  4526. * Gets the fill type of the palettes being displayed. Assumes there's only one fillType at a time, so either all
  4527. * simple or all continuous
  4528. */
  4529. _getFillType: function _getFillType() {
  4530. if (this._fillType) {
  4531. return this._fillType;
  4532. }
  4533. for (var key in this.palettes) {
  4534. if (this.palettes[key] && this.palettes[key].length > 0) {
  4535. var palettes = this.palettes[key];
  4536. for (var i = 0; i < palettes.length; i++) {
  4537. if (palettes[i].content && palettes[i].content.fillType) {
  4538. this._fillType = palettes[i].content.fillType;
  4539. return this._fillType;
  4540. }
  4541. }
  4542. }
  4543. }
  4544. },
  4545. /**
  4546. * Given an ID, search all the sections (custom, local, global, system) for a matching ID
  4547. */
  4548. _findPaletteFromId: function _findPaletteFromId(id) {
  4549. var _this7 = this;
  4550. if (!this.palettes) {
  4551. return null;
  4552. }
  4553. // Make sure we compare the base CM ID without any prefixes
  4554. var safeId = this._getRealPaletteId(id);
  4555. for (var key in this.palettes) {
  4556. if (this.palettes[key]) {
  4557. var match = _underscore2.default.find(this.palettes[key], function (palette) {
  4558. return _this7._getRealPaletteId(palette.id) === safeId;
  4559. });
  4560. if (match) {
  4561. return match;
  4562. }
  4563. }
  4564. }
  4565. return null;
  4566. },
  4567. /**
  4568. * Make sure the same palette doesn't show up in the custom AND global sections
  4569. * @param {Array} palettes
  4570. */
  4571. _trimCustomPalettes: function _trimCustomPalettes() {
  4572. var palettes = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
  4573. var myPalettes = palettes.my;
  4574. var globalPalettes = palettes.public;
  4575. var findMatch = function findMatch(id) {
  4576. return _underscore2.default.find(globalPalettes, function (palette) {
  4577. return palette.id === id;
  4578. });
  4579. };
  4580. if (myPalettes && globalPalettes) {
  4581. for (var i = 0; i < myPalettes.length; i++) {
  4582. var id = myPalettes[i].id;
  4583. if (findMatch(id)) {
  4584. myPalettes.splice(i, 1);
  4585. i--;
  4586. }
  4587. }
  4588. }
  4589. },
  4590. onPaletteCreated: function onPaletteCreated(paletteId) {
  4591. if (this.onCreatePalette) {
  4592. this.selectedId = this.onCreatePalette(paletteId);
  4593. }
  4594. },
  4595. _registerPaletteServiceEvents: function _registerPaletteServiceEvents() {
  4596. if (this._paletteService && !this._regisered) {
  4597. this._regisered = true;
  4598. this._paletteService.on('palette:created', this.render, this);
  4599. this._paletteService.on('palette:updated', this._onPaletteUpdate, this);
  4600. this._paletteService.on('palette:deleted', this._onPaletteDelete, this);
  4601. }
  4602. },
  4603. _unregisterPaletteServiceEvents: function _unregisterPaletteServiceEvents() {
  4604. if (this._paletteService) {
  4605. this._paletteService.off('palette:created', this.render, this);
  4606. this._paletteService.off('palette:updated', this._onPaletteUpdate, this);
  4607. this._paletteService.off('palette:deleted', this._onPaletteDelete, this);
  4608. }
  4609. },
  4610. /**
  4611. * Update the internal selectedId and call the onChange callback
  4612. */
  4613. onPaletteChange: function onPaletteChange(propertyName, paletteItem) {
  4614. this.selectedId = paletteItem.id;
  4615. if (this.onChange) {
  4616. this.onChange(propertyName, paletteItem);
  4617. }
  4618. },
  4619. _handleUpdatingMRU: function _handleUpdatingMRU() {
  4620. // If the user changed the palette, then update the recently used list
  4621. if (this.selectedId !== this._initialSelectedId) {
  4622. var palette = this._findPaletteFromId(this.selectedId);
  4623. // Don't add local palettes to the MRU list
  4624. if (palette && palette.section !== 'local') {
  4625. var propName = this.name || '';
  4626. // Dashboard has a different list of system palettes for heat and conditional. Make sure
  4627. // we keep 3 palettes in the MRU for both sets
  4628. var trimSystemByPropName = propName === 'condColorPalette' || propName.indexOf('contColorPalette') === 0 ? true : false;
  4629. this._paletteService.addRecentlyUsedPalette({
  4630. palette: palette,
  4631. isSystem: palette.section === 'system',
  4632. component: this.component,
  4633. propName: propName,
  4634. trimSystemByPropName: trimSystemByPropName
  4635. });
  4636. }
  4637. }
  4638. },
  4639. /**
  4640. * Palette IDs sometime have a prefix to let us know it's a CM palette. This will
  4641. * remove any prefix
  4642. */
  4643. _getRealPaletteId: function _getRealPaletteId(id) {
  4644. return this._paletteService.getCMSafePaletteId(id);
  4645. },
  4646. _onPaletteUpdate: function _onPaletteUpdate(_ref) {
  4647. var paletteId = _ref.paletteId;
  4648. this._updatePaletteProperties({
  4649. properties: this._propertyUIControl.getProperties(),
  4650. paletteIdToUpdate: paletteId,
  4651. action: 'update'
  4652. });
  4653. },
  4654. /**
  4655. * Method to update properties inline without having to refresh the entire pane. Only works
  4656. * for updates and if deleting a palette that you currently don't have selected.
  4657. */
  4658. _updatePaletteProperties: function _updatePaletteProperties(_ref2) {
  4659. var _this8 = this;
  4660. var properties = _ref2.properties,
  4661. paletteIdToUpdate = _ref2.paletteIdToUpdate,
  4662. action = _ref2.action,
  4663. parentProperty = _ref2.parentProperty;
  4664. var _loop2 = function _loop2(_i) {
  4665. var property = properties[_i];
  4666. if (property.type === 'CollapsibleSection') {
  4667. _this8._updatePaletteProperties({
  4668. properties: property._oPropertyUIControl.getProperties(),
  4669. paletteIdToUpdate: paletteIdToUpdate,
  4670. action: action,
  4671. parentProperty: property
  4672. });
  4673. } else if (property.type === 'NewPalette' && property.palette && _this8._getRealPaletteId(property.palette.id) === paletteIdToUpdate) {
  4674. var propertyNode = property.$el.find('.property_' + property.id);
  4675. if (action === 'update') {
  4676. propertyNode.remove();
  4677. _this8._paletteService.getPalette(paletteIdToUpdate).then(function (palette) {
  4678. property.palette.content = palette.content;
  4679. property.doRender();
  4680. });
  4681. } else if (action === 'delete') {
  4682. properties.splice(_i, 1);
  4683. _i--;
  4684. if (properties.length === 0 && parentProperty) {
  4685. parentProperty.$el.find('.collapsibleSectionToggle' + parentProperty.id).remove();
  4686. parentProperty.$el.find('.property_' + parentProperty.id).remove();
  4687. } else {
  4688. propertyNode.remove();
  4689. }
  4690. }
  4691. }
  4692. i = _i;
  4693. };
  4694. for (var i = 0; i < properties.length; i++) {
  4695. _loop2(i);
  4696. }
  4697. },
  4698. /**
  4699. * When a palette gets deleted we need to correctly default to something else if the one being
  4700. * deleted is the currently selected palette
  4701. */
  4702. _onPaletteDelete: function _onPaletteDelete(_ref3) {
  4703. var paletteId = _ref3.paletteId;
  4704. if (this._getRealPaletteId(paletteId) === this._getRealPaletteId(this.selectedId)) {
  4705. var newSelectedPalette = null;
  4706. var palette = this._findPaletteFromId(paletteId);
  4707. // We should still have the deleted palette since we have re-renderd.
  4708. if (palette) {
  4709. var section = palette.section;
  4710. // Check the section where the palette was deleted from to see if there are more available
  4711. // palettes in the same section. If so, use that as the selected palette
  4712. for (var _i2 = 0; _i2 < this.palettes[section].length; _i2++) {
  4713. if (this._getRealPaletteId(this.palettes[section][_i2].id) !== this._getRealPaletteId(paletteId)) {
  4714. newSelectedPalette = this.palettes[section][_i2];
  4715. this._sectionOpenState[section] = true;
  4716. break;
  4717. }
  4718. }
  4719. }
  4720. // All else fails defaulkt to the first system palette
  4721. if (!newSelectedPalette && this.palettes.system) {
  4722. newSelectedPalette = this.palettes.system[0];
  4723. this._sectionOpenState['system'] = true;
  4724. }
  4725. if (newSelectedPalette) {
  4726. this.onPaletteChange(this.name, {
  4727. id: newSelectedPalette.id,
  4728. reverse: this.reverse
  4729. });
  4730. }
  4731. this.render();
  4732. } else {
  4733. this._updatePaletteProperties({
  4734. properties: this._propertyUIControl.getProperties(),
  4735. paletteIdToUpdate: paletteId,
  4736. action: 'delete'
  4737. });
  4738. }
  4739. },
  4740. /**
  4741. * Shifts the selection highlight on to the new palette
  4742. */
  4743. updateSelection: function updateSelection() {
  4744. if (this.getPaletteId) {
  4745. var paletteId = this.getPaletteId();
  4746. if (paletteId && paletteId !== this.selectedId) {
  4747. this.selectedId = paletteId;
  4748. // Deselect previous palette, then select the current one
  4749. this.$el && this.$el.find('.paletteColors.selected').removeClass('selected').attr('aria-pressed', 'false');
  4750. this.$el && this.$el.find('.property_' + paletteId).addClass('selected').attr('aria-pressed', 'true');
  4751. }
  4752. }
  4753. },
  4754. remove: function remove() {
  4755. this._unregisterPaletteServiceEvents();
  4756. if (this.onRemove) {
  4757. this.onRemove();
  4758. }
  4759. },
  4760. render: function render() {
  4761. var _this9 = this;
  4762. this.$el.parent().addClass('changePalettePane');
  4763. if (this._propertyUIControl) {
  4764. this._propertyUIControl.remove();
  4765. this.$el.empty();
  4766. }
  4767. return this.glassContext.getSvc('.Palette').then(function (paletteService) {
  4768. _this9._paletteService = paletteService;
  4769. return _this9._getPropertySpec().then(function (propertySpec) {
  4770. if (!propertySpec || !propertySpec.items || !propertySpec.items.length) {
  4771. _this9._registerPaletteServiceEvents();
  4772. return;
  4773. }
  4774. return new Promise(function (resolve) {
  4775. new Promise(function(resolve) { resolve(); }).then(function() { var __WEBPACK_AMD_REQUIRE_ARRAY__ = [__webpack_require__(50)]; ((function (PropertyUIControl) {
  4776. _this9._propertyUIControl = new PropertyUIControl(propertySpec);
  4777. return _this9._propertyUIControl.render().then(function () {
  4778. _this9._propertyUIControl.focus();
  4779. _this9._registerPaletteServiceEvents();
  4780. resolve(_this9._propertyUIControl);
  4781. });
  4782. }).apply(null, __WEBPACK_AMD_REQUIRE_ARRAY__));}).catch(__webpack_require__.oe);
  4783. });
  4784. });
  4785. });
  4786. },
  4787. getPropertyUIControl: function getPropertyUIControl() {
  4788. return this._propertyUIControl;
  4789. }
  4790. });
  4791. exports.default = ChangePaletteView;
  4792. /***/ }),
  4793. /* 42 */
  4794. /***/ (function(module, exports, __webpack_require__) {
  4795. "use strict";
  4796. var __WEBPACK_AMD_DEFINE_ARRAY__, __WEBPACK_AMD_DEFINE_RESULT__;
  4797. /**
  4798. * Licensed Materials - Property of IBM
  4799. * IBM Cognos Products: BI Cloud (C) Copyright IBM Corp. 2014, 2016
  4800. * US Government Users Restricted Rights - Use, duplication or disclosure restricted by GSA ADP Schedule Contract with IBM Corp.
  4801. */
  4802. !(__WEBPACK_AMD_DEFINE_ARRAY__ = [__webpack_require__(9), __webpack_require__(5), __webpack_require__(43), __webpack_require__(18), __webpack_require__(44)], __WEBPACK_AMD_DEFINE_RESULT__ = (function ($, _, dot, Events) {
  4803. 'use strict';
  4804. var View = null;
  4805. var eventsRegex = /^(\S+)\s*(.*)$/;
  4806. // View related attributes that are supported
  4807. var viewAttributes = ['el', 'id', 'className', 'tagName', 'events'];
  4808. /**
  4809. * A Backbone style base View Class. UI Views should extend this class.
  4810. *
  4811. */
  4812. View = Events.extend({
  4813. templateString: null,
  4814. id: null,
  4815. init: function init(attributes) {
  4816. View.inherited('init', this, arguments);
  4817. this.viewId = _.uniqueId('view');
  4818. this.dotTemplate = dot.template(this.templateString || '');
  4819. _.extend(this, _.pick(attributes || {}, viewAttributes));
  4820. this._initDomElement();
  4821. this._attachEvents();
  4822. },
  4823. /**
  4824. * The tag name given to the view's DOM element. By default it's a DIV.
  4825. */
  4826. tagName: 'div',
  4827. /**
  4828. * Initialize the DOM element for this view
  4829. */
  4830. _initDomElement: function _initDomElement() {
  4831. if (!this.el) {
  4832. var attrs = {};
  4833. if (this.id) {
  4834. attrs.id = _.result(this, 'id');
  4835. }
  4836. if (this.className) {
  4837. attrs['class'] = _.result(this, 'className');
  4838. }
  4839. this.setElement(document.createElement(this.tagName));
  4840. this.$el.attr(attrs);
  4841. } else {
  4842. this.setElement(_.result(this, 'el'));
  4843. }
  4844. },
  4845. /**
  4846. * Convenience function to use jQuery to find a DOM element within this view. This is
  4847. * faster then doing a global lockup.
  4848. */
  4849. $: function $(selector) {
  4850. return this.$el.find(selector);
  4851. },
  4852. /**
  4853. * Hide the view
  4854. */
  4855. hide: function hide() {
  4856. this.$el.hide();
  4857. },
  4858. /**
  4859. * Show the view if hidden
  4860. */
  4861. show: function show() {
  4862. this.$el.show();
  4863. },
  4864. /**
  4865. * Make sure the target is the intended dom node, using CSS class to validate.
  4866. * If not the right node, check out the parents.
  4867. */
  4868. getTarget: function getTarget(target, sClass) {
  4869. var $t = $(target);
  4870. if (!$t.hasClass(sClass)) {
  4871. var parents = $t.parents('.' + sClass);
  4872. if (parents.length > 0) {
  4873. target = parents[0];
  4874. }
  4875. }
  4876. return target;
  4877. },
  4878. /**
  4879. * Render is the main function of the View. Views should implement (override) the render
  4880. * method to populate this.el with the appropriate HTML. Render should always return this
  4881. * to allow chaining of calls.
  4882. */
  4883. render: function render() {
  4884. return this;
  4885. },
  4886. /**
  4887. * Remove this view:
  4888. * -Remove the element from the DOM
  4889. * -Remove the event listeners
  4890. */
  4891. remove: function remove() {
  4892. if (this.$el) {
  4893. this.$el.remove();
  4894. }
  4895. if (this.off) {
  4896. this.off();
  4897. }
  4898. return this;
  4899. },
  4900. /**
  4901. * Set the view element to a new DOM element
  4902. */
  4903. setElement: function setElement(el) {
  4904. this._detachEvents();
  4905. this.$el = el instanceof $ ? el : $(el);
  4906. this.el = this.$el[0];
  4907. this._attachEvents();
  4908. return this;
  4909. },
  4910. /**
  4911. * Attaches the events in this.events to this.el for this view
  4912. */
  4913. _attachEvents: function _attachEvents() {
  4914. var events = this.events;
  4915. this._detachEvents();
  4916. for (var key in events) {
  4917. var callback = events[key];
  4918. if (!_.isFunction(callback)) {
  4919. callback = this[events[key]];
  4920. }
  4921. if (!callback) {
  4922. continue;
  4923. }
  4924. var match = key.match(eventsRegex);
  4925. var eventName = match[1];
  4926. var selector = match[2];
  4927. // add the event to the element, with a namespace 'privateViewEvents'
  4928. this.$el.on(eventName + '.privateViewEvents' + this.viewId, selector, callback.bind(this));
  4929. }
  4930. return this;
  4931. },
  4932. /**
  4933. * Detaches all the events from the element
  4934. */
  4935. _detachEvents: function _detachEvents() {
  4936. if (this.$el) {
  4937. this.$el.off('.privateViewEvents' + this.viewId);
  4938. }
  4939. return this;
  4940. }
  4941. });
  4942. return View;
  4943. }).apply(exports, __WEBPACK_AMD_DEFINE_ARRAY__),
  4944. __WEBPACK_AMD_DEFINE_RESULT__ !== undefined && (module.exports = __WEBPACK_AMD_DEFINE_RESULT__));
  4945. //# sourceMappingURL=View.js.map
  4946. /***/ }),
  4947. /* 43 */
  4948. /***/ (function(module, exports) {
  4949. module.exports = __WEBPACK_EXTERNAL_MODULE_43__;
  4950. /***/ }),
  4951. /* 44 */
  4952. /***/ (function(module, exports, __webpack_require__) {
  4953. "use strict";
  4954. var __WEBPACK_AMD_DEFINE_ARRAY__, __WEBPACK_AMD_DEFINE_RESULT__;
  4955. /**
  4956. * Licensed Materials - Property of IBM
  4957. * IBM Cognos Products: BI
  4958. * (C) Copyright IBM Corp. 2014, 2016
  4959. * US Government Users Restricted Rights - Use, duplication or disclosure restricted by GSA ADP Schedule
  4960. * Contract with IBM Corp.
  4961. */
  4962. !(__WEBPACK_AMD_DEFINE_ARRAY__ = [__webpack_require__(9), __webpack_require__(45), __webpack_require__(46), __webpack_require__(5), __webpack_require__(48), __webpack_require__(49)], __WEBPACK_AMD_DEFINE_RESULT__ = (function ($, BidiUtil, DnDManager, _, hammer) {
  4963. // Setup jquery to create a hammer instance when we use hammer events.
  4964. var hammerGestures = [];
  4965. for (var name in hammer.gestures) {
  4966. if (hammer.gestures.hasOwnProperty(name)) {
  4967. hammerGestures.push(hammer.gestures[name].name);
  4968. }
  4969. }
  4970. var hammerDefaultOptions = {
  4971. 'prevent_mouseevents': true,
  4972. 'stop_browser_behavior': false
  4973. };
  4974. $.each(hammerGestures, function (index, name) {
  4975. $.event.special[name] = {
  4976. setup: function setup() {
  4977. var $el = $(this);
  4978. var inst = $el.data('hammer');
  4979. if (!inst) {
  4980. // create hammer instance with default values
  4981. $el.hammer(hammerDefaultOptions);
  4982. }
  4983. }
  4984. };
  4985. });
  4986. /**
  4987. * A jQuery function that can be used to attach the onClick event handler. This function will also attach the touch events required for touch devices to avoid the delay caused by simulated mouse
  4988. * events
  4989. */
  4990. $.fn.onClick = function (handler) {
  4991. this.on('click', function (e) {
  4992. handler(e);
  4993. }).on('tap', function (e) {
  4994. handler(e);
  4995. // prevent the simulated clicks on touch devices
  4996. e.gesture.preventDefault();
  4997. });
  4998. return this;
  4999. };
  5000. // Get the box style to be applied to the inline editor
  5001. var getInlineEditBoxStyles = function getInlineEditBoxStyles($text, options) {
  5002. var cssProps = ['padding-top', 'padding-right', 'padding-bottom', 'padding-left', 'margin-top', 'margin-right', 'margin-bottom', 'margin-left', 'border-bottom-color', 'border-bottom-style', 'border-bottom-width', 'border-top-color', 'border-top-style', 'border-top-width', 'border-right-color', 'border-right-style', 'border-right-width', 'border-left-color', 'border-left-style', 'border-left-width', 'position', 'top', 'right', 'left', 'bottom', 'height', 'width', 'min-height', 'min-width', 'max-height', 'max-width'];
  5003. var cssValues = $text.css(cssProps);
  5004. // We don't want to set a zero height and width
  5005. if (cssValues.height === '0px') {
  5006. delete cssValues.height;
  5007. }
  5008. if (cssValues.width === '0px') {
  5009. delete cssValues.width;
  5010. }
  5011. // Set the maximum width to strech with the parent
  5012. if (options && options.maxSizeNode) {
  5013. var $node = $(options.maxSizeNode);
  5014. var width = options.maxSizeNode.style.width;
  5015. if (width) {
  5016. cssValues['max-width'] = '100%';
  5017. delete cssValues.width;
  5018. } else {
  5019. cssValues['max-width'] = $node.width() + 'px';
  5020. }
  5021. }
  5022. return cssValues;
  5023. };
  5024. // Get the css styles to be applied to the inline editor input element
  5025. var getInlineEditStyles = function getInlineEditStyles($text) {
  5026. var textCss = {
  5027. width: '0px',
  5028. 'min-width': $text.css('fontSize')
  5029. };
  5030. // Get the text alignment and apply it to the text input
  5031. var textAlignment = $text.css('text-align');
  5032. if (textAlignment === 'center') {
  5033. textCss['margin'] = '0px auto';
  5034. } else if (textAlignment === 'right') {
  5035. textCss['margin'] = '0px 0px 0px auto';
  5036. }
  5037. return textCss;
  5038. };
  5039. // Get the text css style to be applied to the inline editor
  5040. var getInlineEditTextStyles = function getInlineEditTextStyles($text) {
  5041. return $text.css(['fontSize', 'fontFamily', 'fontWeight', 'letterSpacing', 'color']);
  5042. };
  5043. var _addInlineEditHandlers = function _addInlineEditHandlers($text, fCallback, options) {
  5044. var $inlineEdit = $text._$inlineEdit;
  5045. $text._updateWidth = function () {
  5046. if ($inlineEdit) {
  5047. var value = $inlineEdit.val() || '';
  5048. if (value !== $inlineEdit._hidden.text()) {
  5049. $inlineEdit._hidden.text(value);
  5050. $inlineEdit.width($inlineEdit._hidden.width() + 2);
  5051. }
  5052. }
  5053. };
  5054. $text._inlineEditChangedFn = function () {
  5055. var sText = $inlineEdit.val().trim();
  5056. if (sText.length === 0 && options.noEmptyText) {
  5057. sText = $text._previousInlineText;
  5058. }
  5059. $inlineEdit.removeClass('inlineText').off('keypress').off('keydown').off('blur');
  5060. var invokeCallback = false;
  5061. if ($text._previousInlineText !== sText) {
  5062. invokeCallback = true;
  5063. }
  5064. $text._previousInlineText = null;
  5065. $inlineEdit._hidden.remove();
  5066. $inlineEdit._hidden = null;
  5067. $inlineEdit.off();
  5068. $inlineEdit.hide();
  5069. $inlineEdit.parent().remove();
  5070. $inlineEdit = null;
  5071. $text._$inlineEdit = null;
  5072. $text.text(sText);
  5073. $text.removeClass('inEditMode');
  5074. $text.show().focus();
  5075. if (invokeCallback) {
  5076. fCallback(sText);
  5077. }
  5078. var onEditEnd = options && options.onEditEnd;
  5079. if (onEditEnd) {
  5080. onEditEnd();
  5081. }
  5082. }.bind($text);
  5083. var sText = $text.text();
  5084. $text._previousInlineText = sText; // keep a back up of the current string
  5085. if (!$inlineEdit) {
  5086. $text.addClass('inEditMode');
  5087. // Create a container node that will inherit the text container properties
  5088. // like margin, padding, border and position
  5089. var $inlineEditContainer = $('<div>', {
  5090. 'class': 'inlineEditContainer'
  5091. });
  5092. $inlineEditContainer.css(getInlineEditBoxStyles($text, options));
  5093. $text.after($inlineEditContainer);
  5094. $inlineEdit = $('<input>', {
  5095. 'class': 'inlineText'
  5096. });
  5097. $inlineEdit.css('max-width', '100%');
  5098. $inlineEdit.css(getInlineEditStyles($text));
  5099. var cssValues = getInlineEditTextStyles($text);
  5100. $inlineEdit.css(cssValues);
  5101. $inlineEditContainer.append($inlineEdit);
  5102. $text._$inlineEdit = $inlineEdit;
  5103. $inlineEdit.val(sText);
  5104. $inlineEdit._hidden = $('<div style="white-space:pre; top:-999px; left:-999px; position:absolute;"/>');
  5105. $inlineEdit._hidden.css(cssValues);
  5106. $text.hide();
  5107. $text.after($inlineEdit._hidden);
  5108. $inlineEdit.on('keyup keydown input propertychange change', function () {
  5109. $text._updateWidth();
  5110. });
  5111. if (options && options.style) {
  5112. $inlineEdit.css(options.style);
  5113. }
  5114. $text._updateWidth();
  5115. $inlineEdit.on('blur', $text._inlineEditChangedFn).on('keypress', function (e) {
  5116. if (e.keyCode === 13) {
  5117. $text._inlineEditChangedFn();
  5118. }
  5119. }).on('keyup', function (e) {
  5120. //stop propagation for delete key
  5121. if (e.keyCode === 46 || e.keyCode === 8) {
  5122. e.stopPropagation();
  5123. }
  5124. }).on('keydown', function (e) {
  5125. // stop the arrow keys from bubbling when in edit mode. Fix for when editing the name of a tab.
  5126. if (e.keyCode === 37 || e.keyCode === 39) {
  5127. e.stopPropagation();
  5128. }
  5129. }).on('mousedown mouseup dblclick', function (e) {
  5130. // cancel the mouse down, up and double click to allow the user to interact with the text
  5131. e.stopPropagation();
  5132. });
  5133. BidiUtil.initElementForBidi($inlineEdit[0]);
  5134. $inlineEdit.show();
  5135. } else {
  5136. $inlineEdit.val(sText);
  5137. }
  5138. $inlineEdit.focus();
  5139. $inlineEdit[0].setSelectionRange(0, 9999); //needed for selecting on ios
  5140. return false;
  5141. };
  5142. /**
  5143. * Turns an div element into an inline edit control
  5144. */
  5145. $.fn.inlineEditor = function (action, options) {
  5146. if (action === 'remove') {
  5147. if (this._$inlineEdit) {
  5148. this._inlineEditChangedFn();
  5149. }
  5150. this.off('dblclick', this._inlineEditFn);
  5151. this.off('hold', this._inlineEditFn);
  5152. delete this._inlineEditFn;
  5153. delete this._previousInlineText;
  5154. delete this._inlineEditChangedFn;
  5155. delete this._updateWidth;
  5156. } else if (action === 'blur') {
  5157. if (this._$inlineEdit) {
  5158. this._inlineEditChangedFn();
  5159. }
  5160. } else if (action === 'isEditing') {
  5161. return this._$inlineEdit ? true : false;
  5162. } else if (action === 'edit') {
  5163. if (this._inlineEditFn) {
  5164. this._inlineEditFn();
  5165. }
  5166. } else {
  5167. var onEditStart = options && options.onEditStart;
  5168. this._inlineEditFn = function (e) {
  5169. DnDManager.resetDragging();
  5170. if (onEditStart) {
  5171. onEditStart();
  5172. }
  5173. _addInlineEditHandlers(this, action, options);
  5174. if (e) {
  5175. e.stopPropagation();
  5176. }
  5177. }.bind(this);
  5178. this.hammer({
  5179. stop_browser_behavior: false,
  5180. prevent_mouseevents: true
  5181. });
  5182. this.on('dblclick', this._inlineEditFn);
  5183. this.on('hold', this._inlineEditFn);
  5184. this.on('keypress', function (e) {
  5185. var keyCode = e.keyCode || e.charCode;
  5186. if (keyCode === 13 || keyCode === 32) {
  5187. this._inlineEditFn(e);
  5188. }
  5189. }.bind(this));
  5190. }
  5191. };
  5192. }).apply(exports, __WEBPACK_AMD_DEFINE_ARRAY__),
  5193. __WEBPACK_AMD_DEFINE_RESULT__ !== undefined && (module.exports = __WEBPACK_AMD_DEFINE_RESULT__));
  5194. //# sourceMappingURL=EventHelper.js.map
  5195. /***/ }),
  5196. /* 45 */
  5197. /***/ (function(module, exports, __webpack_require__) {
  5198. "use strict";
  5199. var __WEBPACK_AMD_DEFINE_ARRAY__, __WEBPACK_AMD_DEFINE_RESULT__;
  5200. /**
  5201. * Licensed Materials - Property of IBM
  5202. * IBM Cognos Products: BI Cloud (C) Copyright IBM Corp. 2012, 2019
  5203. * US Government Users Restricted Rights - Use, duplication or disclosure restricted by GSA ADP Schedule Contract with IBM Corp.
  5204. *
  5205. * borrowed from cclcore.
  5206. * Common bidi javascript library - BidiUtils.
  5207. * Singleton containing useable bidi methods.
  5208. */
  5209. /**
  5210. * This module contains a subset of BidiUtils from cclcore with some
  5211. * modifications to meet gemini's requirements for BiDi text. Elements passed
  5212. * in to the methods of this module is expected to contain only a single text
  5213. * node such as <div contenteditable> or <input> elements
  5214. */
  5215. !(__WEBPACK_AMD_DEFINE_ARRAY__ = [], __WEBPACK_AMD_DEFINE_RESULT__ = (function () {
  5216. 'use strict';
  5217. var AUTO = 'auto',
  5218. arabicLocales = {
  5219. 'General Info': {
  5220. 'Generated from': 'CLDR Version: 30.0.3',
  5221. 'Generated by': 'BDL CLDR Reader Tool',
  5222. 'Date': '16-03-17 12:40:12'
  5223. },
  5224. 'Arabic Default Numbering Systems': {
  5225. 'ar': 'arab',
  5226. 'ar_AE': 'arab',
  5227. 'ar_BH': 'arab',
  5228. 'ar_DJ': 'arab',
  5229. 'ar_DZ': 'latn',
  5230. 'ar_EG': 'arab',
  5231. 'ar_EH': 'latn',
  5232. 'ar_ER': 'arab',
  5233. 'ar_IL': 'arab',
  5234. 'ar_IQ': 'arab',
  5235. 'ar_JO': 'arab',
  5236. 'ar_KM': 'arab',
  5237. 'ar_KW': 'arab',
  5238. 'ar_LB': 'arab',
  5239. 'ar_LY': 'latn',
  5240. 'ar_MA': 'latn',
  5241. 'ar_MR': 'arab',
  5242. 'ar_OM': 'arab',
  5243. 'ar_PS': 'arab',
  5244. 'ar_QA': 'arab',
  5245. 'ar_SA': 'arab',
  5246. 'ar_SD': 'arab',
  5247. 'ar_SO': 'arab',
  5248. 'ar_SS': 'arab',
  5249. 'ar_SY': 'arab',
  5250. 'ar_TD': 'arab',
  5251. 'ar_TN': 'latn',
  5252. 'ar_YE': 'arab'
  5253. }
  5254. },
  5255. cldrData = arabicLocales['Arabic Default Numbering Systems'];
  5256. var BidiUtil = function BidiUtil() {
  5257. this._isIE = this._detectIE(navigator.userAgent);
  5258. this.userPreferredTextDir = this._getUserPreferredTextDir() || AUTO;
  5259. this.LRE = '\u202A';
  5260. this.RLE = '\u202B';
  5261. this.PDF = '\u202C';
  5262. this.LRM = '\u200E';
  5263. };
  5264. BidiUtil.prototype._detectIE = function (useragent) {
  5265. return (/\b(MSIE|Trident|Edge)\b/.test(useragent)
  5266. );
  5267. };
  5268. // Private Methods
  5269. // Should not need to call these methods outside this module. Although real
  5270. // encapsulation is possible, defining as part of BidiUtil's prototype allows
  5271. // unit testing and faster scope chain access from public methods
  5272. /**
  5273. * Gets the user's preferred text direction from <html> attribute passed in
  5274. * from server-side and stores it as member of this singleton as userPreferredTextDir
  5275. * @return {string} User's preferred text direction (i.e. ltr, rtl, auto)
  5276. */
  5277. BidiUtil.prototype._getUserPreferredTextDir = function () {
  5278. if (!this.userPreferredTextDir) {
  5279. this.userPreferredTextDir = document.documentElement.getAttribute('data-pref-text-dir');
  5280. }
  5281. return this.userPreferredTextDir;
  5282. };
  5283. /**
  5284. * Normalizes the process of retrieving the value from <input> or <div contenteditable>
  5285. * HTML elements
  5286. * @param {Element|HTMLInputElement} element - DOM element receiving text input
  5287. * @return {string} String value of the DOM element
  5288. */
  5289. BidiUtil.prototype._getNodeValue = function (element) {
  5290. return element.value || element.tagName === 'INPUT' ? element.value : element.textContent;
  5291. };
  5292. /**
  5293. * Normalizes the process of setting the value to <input> or <div contenteditable>
  5294. * HTML elements
  5295. * @param {Element|HTMLInputElement} element - DOM element receiving text input
  5296. * @param {string} value - String value to be set to element
  5297. */
  5298. BidiUtil.prototype._setNodeValue = function (element, value) {
  5299. if (element.value || element.tagName === 'INPUT') {
  5300. element.value = value;
  5301. } else {
  5302. // setting the textContent removes any text of its child nodes
  5303. element.textContent = value;
  5304. }
  5305. };
  5306. /**
  5307. * Checks if the character passed in is an Arabic character.
  5308. * @param {string} charCode - Character code
  5309. * @return {boolean} True, if character is an Arabic character
  5310. */
  5311. BidiUtil.prototype._isArabicChar = function (charCode) {
  5312. if (charCode >= 0x0600 && charCode <= 0x0669 || charCode >= 0x06fa && charCode <= 0x07ff || charCode >= 0xfb50 && charCode <= 0xfdff || charCode >= 0xfe70 && charCode <= 0xfefc) {
  5313. return true;
  5314. }
  5315. return false;
  5316. };
  5317. /**
  5318. * Checks if the character passed in is a Hebrew character.
  5319. * @param {string} charCode - Character code
  5320. * @return {boolean} True, if character is a Hebrew character
  5321. */
  5322. BidiUtil.prototype._isHebrewChar = function (charCode) {
  5323. if (charCode >= 0x05d0 && charCode <= 0x05ff) {
  5324. return true;
  5325. }
  5326. return false;
  5327. };
  5328. /**
  5329. * Checks if the character passed in is a BiDi character.
  5330. * @param {number} charCode - Chracter code
  5331. * @return {boolean} True, if the character is a BiDi (Arabic or Hebrew) character
  5332. */
  5333. BidiUtil.prototype._isBidiChar = function (charCode) {
  5334. return this._isArabicChar(charCode) || this._isHebrewChar(charCode);
  5335. };
  5336. /**
  5337. * Checks if the character passed in is a Latin character (Only treats
  5338. * capital and lower case alphabets as latin characters)
  5339. * @param {number} charCode - Character code
  5340. * @return {boolean} True, if the character is a Latin character
  5341. */
  5342. BidiUtil.prototype._isLatinChar = function (charCode) {
  5343. if (charCode > 64 && charCode < 91 || charCode > 96 && charCode < 123) {
  5344. return true;
  5345. }
  5346. return false;
  5347. };
  5348. /**
  5349. * Event handler for 'input' event (events causing the value of the target
  5350. * element to change)
  5351. * Resolves the base text direction and sets the dir attribute
  5352. * @param {Event} event - DOM Event object
  5353. */
  5354. BidiUtil.prototype._handleInputEvent = function (event) {
  5355. // NOTE: 'this' has been binded to be BidiUtil in _addBidiEventListeners function
  5356. this._resolveDirAttr(event.target);
  5357. };
  5358. /**
  5359. * Adds event listeners for events changing the value of the element being passed in
  5360. * @param {Element|HTMLInputElement} element - DOM element receiving text input
  5361. */
  5362. BidiUtil.prototype._addBidiEventListeners = function (element) {
  5363. if (!element._hasBidiEventListeners) {
  5364. element._hasBidiEventListeners = true;
  5365. var eventTypes = ['keyup', 'cut', 'paste'];
  5366. for (var i = 0; i < eventTypes.length; ++i) {
  5367. element.addEventListener(eventTypes[i], this._handleInputEvent.bind(this), false);
  5368. }
  5369. }
  5370. };
  5371. /**
  5372. * Sets dir attribute of the DOM element passed in as parameter according to
  5373. * the direction of the first strong character in the text content of the element
  5374. * @param {Element|HTMLInputElement} element - DOM element receiving text input
  5375. */
  5376. BidiUtil.prototype._resolveDirAttr = function (element) {
  5377. if (this._isIE && (this.userPreferredTextDir === AUTO || !this.userPreferredTextDir)) {
  5378. // IE doesn't support dir="auto" HTML attribute
  5379. var text = this._getNodeValue(element);
  5380. element.dir = this.resolveBaseTextDir(text);
  5381. } else {
  5382. // Chrome, Safari, and Firefox supports dir="auto" HTML attribute
  5383. // IE will only receive "ltr" or "rtl" in this block
  5384. element.dir = this.userPreferredTextDir || AUTO;
  5385. }
  5386. };
  5387. /**
  5388. * This function determines the positions where we should insert the LRM marker for correct display
  5389. * of Structured Text Value
  5390. * @param str
  5391. * @param isLocation
  5392. * @returns array
  5393. */
  5394. BidiUtil.prototype._parseSTT = function (str, isLocation) {
  5395. var delimiter = isLocation ? '>' : ':/@=[]\'<>';
  5396. var segmentsPointers = [];
  5397. var sp_len = 0,
  5398. i;
  5399. for (i = 0; i < str.length; i++) {
  5400. if (delimiter.indexOf(str.charAt(i)) >= 0) {
  5401. segmentsPointers[sp_len] = i;
  5402. sp_len++;
  5403. }
  5404. }
  5405. return segmentsPointers;
  5406. };
  5407. // Public Methods
  5408. /**
  5409. * Simply resolves the dir attribute of the HTML element and adds BiDi specific
  5410. * event handlers if necessary
  5411. * @param {Element|HTMLInputElement} element - DOM element receiving text input
  5412. */
  5413. BidiUtil.prototype.initElementForBidi = function (element) {
  5414. if (element) {
  5415. this._resolveDirAttr(element); // resolve dir attribute of the element
  5416. if (this._isIE) {
  5417. this._addBidiEventListeners(element);
  5418. }
  5419. }
  5420. };
  5421. /**
  5422. * Enforces text direction by adding UCC (Unicode Control Characters)
  5423. * @param {String} text - The text for which we should enforce text direction.
  5424. * @returns string
  5425. */
  5426. BidiUtil.prototype.enforceTextDirection = function (text) {
  5427. if (text) {
  5428. var finalDir = this.resolveBaseTextDir(text);
  5429. var finalValue = text;
  5430. if (finalDir === 'ltr') {
  5431. finalValue = this.LRE + finalValue + this.PDF;
  5432. } else if (finalDir === 'rtl') {
  5433. finalValue = this.RLE + finalValue + this.PDF;
  5434. }
  5435. return finalValue;
  5436. }
  5437. return text;
  5438. };
  5439. /**
  5440. * Traverses the string passed in as parameter from the beginning and
  5441. * determines the direction of the text based on the first strong character
  5442. * @param {string} text - A bi-directional text
  5443. * @param {bool} isTextArea - Does the text belong to a textarea
  5444. * @return {string} Direction of the text
  5445. */
  5446. BidiUtil.prototype.resolveBaseTextDir = function (text, isTextArea) {
  5447. var textDir = this.userPreferredTextDir;
  5448. if (!textDir) {
  5449. textDir = AUTO;
  5450. }
  5451. if (textDir === AUTO && (!isTextArea || this._isIE)) {
  5452. for (var i = 0; text && i < text.length; i++) {
  5453. var character = text.charCodeAt(i);
  5454. if (this._isBidiChar(character)) {
  5455. textDir = 'rtl';
  5456. break;
  5457. } else if (this._isLatinChar(character)) {
  5458. textDir = 'ltr';
  5459. break;
  5460. }
  5461. }
  5462. if (this._isIE && textDir === AUTO) {
  5463. textDir = '';
  5464. }
  5465. }
  5466. return textDir;
  5467. };
  5468. /**
  5469. * Enforces text direction for Structured Text value by adding UCC (Unicode Control Characters)
  5470. * We should add an LRM before each segment and also we should enforce text direction of each segment
  5471. * @param {String} text - The text for which we should enforce text direction.
  5472. * @returns string
  5473. */
  5474. BidiUtil.prototype.enforceTextDirectionForSTT = function (text) {
  5475. if (text) {
  5476. text = this.removeMarkers(text);
  5477. var isLocation = (text.match(/ > /g) || []).length > 0;
  5478. var segmentsPointers = this._parseSTT(text, isLocation);
  5479. var result = '';
  5480. var n;
  5481. var marker = this.LRM;
  5482. var offset = isLocation ? 1 : 0;
  5483. if (segmentsPointers.length === 0) {
  5484. result = this.enforceTextDirection(text);
  5485. } else {
  5486. result = this.enforceTextDirection(text.substring(0, segmentsPointers[0] - offset));
  5487. }
  5488. for (var i = 0; i < segmentsPointers.length; i++) {
  5489. n = segmentsPointers[i];
  5490. if (n) {
  5491. var endIndex = i < segmentsPointers.length - 1 ? segmentsPointers[i + 1] - offset : text.length;
  5492. var segment = text.substring(n + 1 + offset, endIndex);
  5493. result = result + marker + text.substring(n - offset, n + offset + 1) + this.enforceTextDirection(segment);
  5494. }
  5495. }
  5496. return result;
  5497. }
  5498. return text;
  5499. };
  5500. /**
  5501. * Enforces text direction for Structured Text value by adding UCC (Unicode Control Characters)
  5502. * We should add an LRM before each segment and also we should enforce text direction of each segment
  5503. * @param {String} text - The text for which we should enforce text direction.
  5504. * @returns string
  5505. */
  5506. BidiUtil.prototype.enforceTextDirectionForLocation = function (text) {
  5507. return this.enforceTextDirectionForSTT(text);
  5508. };
  5509. /**
  5510. * Removes all the markers from the text
  5511. * @param {String} text - The text
  5512. * @returns string
  5513. */
  5514. BidiUtil.prototype.removeMarkers = function (text) {
  5515. return text.replace(/[\u202A\u202B\u202C\u200E]/g, '');
  5516. };
  5517. BidiUtil.prototype._isArabicLocale = function (locale) {
  5518. return locale.match(/^ar[-_].*$/i);
  5519. };
  5520. BidiUtil.prototype._useLatinNums = function (locale) {
  5521. if (!this._isArabicLocale(locale)) {
  5522. return true;
  5523. }
  5524. return cldrData[locale] && cldrData[locale] === 'latn';
  5525. };
  5526. /**
  5527. * Enforces numeric shaping for the given string
  5528. * @param {Object} text to be wrapped. Can be number or string object.
  5529. * @param {bool} isContextual. Should enforce contextual numeric shaping.
  5530. * @returns {string}
  5531. */
  5532. BidiUtil.prototype.enforceNumericShaping = function (text, isContextual) {
  5533. if (this.bidiSupport && this.userPreferredContentLocale.startsWith('ar') && (typeof text === 'number' || typeof text === 'string')) {
  5534. var segmentDir = this.userPreferredTextDir;
  5535. if (this.userPreferredTextDir === AUTO) {
  5536. segmentDir = this.resolveBaseTextDir(text);
  5537. }
  5538. var locale = typeof navigator === 'undefined' ? '' : navigator.language || navigator.userLanguage || '';
  5539. locale = locale.replace('-', '_');
  5540. var finalText = text;
  5541. if (typeof text === 'number') {
  5542. finalText = text.toString();
  5543. }
  5544. var pattern = /([0-9])|([\u0660-\u0669])|([\u0590-\u05FF\u0608\u060B\u060D\u061B-\u064A\u066D-\u066F\u0671-\u06D5\u06E5-\u06E6\u06EE-\u06EF\u06FA-\u06FF\u0750-\u077F\u08A0-\u08E3\u200F\u202B\u202E\u2067\uFB50-\uFD3D\uFD40-\uFDCF\uFDF0-\uFDFC\uFDFE-\uFDFF\uFE70-\uFEFE]+)|([^0-9\u0590-\u05FF\u0660-\u0669\u0608\u060B\u060D\u061B-\u064A\u066D-\u066F\u0671-\u06D5\u06E5-\u06E6\u06EE-\u06EF\u06FA-\u06FF\u0750-\u077F\u08A0-\u08E3\u200F\u202B\u202E\u2067\uFB50-\uFD3D\uFD40-\uFDCF\uFDF0-\uFDFC\uFDFE-\uFDFF\uFE70-\uFEFE\u0600-\u0607\u0609-\u060A\u060C\u060E-\u061A\u064B-\u066C\u0670\u06D6-\u06E4\u06E7-\u06ED\u06F0-\u06F9\u08E4-\u08FF\uFD3E-\uFD3F\uFDD0-\uFDEF\uFDFD\uFEFF\u0000-\u0040\u005B-\u0060\u007B-\u007F\u0080-\u00A9\u00AB-\u00B4\u00B6-\u00B9\u00BB-\u00BF\u00D7\u00F7\u02B9-\u02BA\u02C2-\u02CF\u02D2-\u02DF\u02E5-\u02ED\u02EF-\u02FF\u2070\u2074-\u207E\u2080-\u208E\u2100-\u2101\u2103-\u2106\u2108-\u2109\u2114\u2116-\u2118\u211E-\u2123\u2125\u2127\u2129\u212E\u213A-\u213B\u2140-\u2144\u214A-\u214D\u2150-\u215F\u2189\uA720-\uA721\uA788\uFF01-\uFF20\uFF3B-\uFF40\uFF5B-\uFF65\uFFE0-\uFFE6\uFFE8-\uFFEE]+)/g; // eslint-disable-line no-control-regex
  5545. var self = this;
  5546. return finalText.replace(pattern, function (curChs, latNum, araNum, rtlChs, ltrChs) {
  5547. if (araNum) {
  5548. if (isContextual && segmentDir === 'ltr' || !isContextual && self._useLatinNums(locale)) {
  5549. return araNum.charCodeAt(0) - 1632;
  5550. } else {
  5551. return araNum;
  5552. }
  5553. } else if (latNum) {
  5554. if (isContextual && segmentDir === 'rtl' || !isContextual && !self._useLatinNums(locale)) {
  5555. return String.fromCharCode(parseInt(latNum) + 1632);
  5556. } else {
  5557. return latNum;
  5558. }
  5559. } else if (rtlChs) {
  5560. segmentDir = 'rtl';
  5561. } else if (ltrChs) {
  5562. segmentDir = 'ltr';
  5563. }
  5564. return curChs;
  5565. });
  5566. }
  5567. return text;
  5568. };
  5569. /**
  5570. * Sets the text dir user preference
  5571. * @param {String} textDir - The text direction user preference.
  5572. * @param {String} bidiSupport - Is Bidi support enabled ?
  5573. */
  5574. BidiUtil.prototype.setUserPreferredTextDir = function (textDir, bidiSupport) {
  5575. this.userPreferredTextDir = '';
  5576. this.bidiSupport = false;
  5577. if (bidiSupport === 'true') {
  5578. this.userPreferredTextDir = textDir.toLowerCase();
  5579. this.bidiSupport = true;
  5580. }
  5581. };
  5582. /**
  5583. * Sets the content locale user preference
  5584. * @param {String} contentLocale - The content locale user preference.
  5585. */
  5586. BidiUtil.prototype.setUserPreferredContentLocale = function (contentLocale) {
  5587. this.userPreferredContentLocale = contentLocale;
  5588. };
  5589. return new BidiUtil();
  5590. }).apply(exports, __WEBPACK_AMD_DEFINE_ARRAY__),
  5591. __WEBPACK_AMD_DEFINE_RESULT__ !== undefined && (module.exports = __WEBPACK_AMD_DEFINE_RESULT__));
  5592. //# sourceMappingURL=BidiUtil.js.map
  5593. //# sourceMappingURL=BidiUtil.js.map
  5594. /***/ }),
  5595. /* 46 */
  5596. /***/ (function(module, exports, __webpack_require__) {
  5597. "use strict";
  5598. var __WEBPACK_AMD_DEFINE_ARRAY__, __WEBPACK_AMD_DEFINE_RESULT__;
  5599. /**
  5600. * Licensed Materials - Property of IBM
  5601. * IBM Cognos Products: BI
  5602. * (C) Copyright IBM Corp. 2014, 2016
  5603. * US Government Users Restricted Rights - Use, duplication or disclosure restricted by GSA ADP Schedule Contract with IBM Corp.
  5604. *
  5605. * Drag-and-Drop Manager
  5606. */
  5607. !(__WEBPACK_AMD_DEFINE_ARRAY__ = [__webpack_require__(9), __webpack_require__(5), __webpack_require__(10), __webpack_require__(47)], __WEBPACK_AMD_DEFINE_RESULT__ = (function ($, _, Class, utils) {
  5608. 'use strict';
  5609. var DnDManager = null;
  5610. DnDManager = Class.extend({
  5611. dropTargets: null,
  5612. currentDropTarget: null,
  5613. init: function init() {
  5614. this.dropTargets = [];
  5615. this.currentDropTarget = {};
  5616. // Add the dialog blocker as a default drop zone to swallow and ignore any drop that happens on the backdrop
  5617. this.addDropTarget($('body')[0], '.dialogBlocker', {
  5618. accepts: function accepts() {
  5619. return true;
  5620. }
  5621. });
  5622. },
  5623. // Utility method that subscribes to the specified jQuery event
  5624. // and returns removable object, that can be inserted into the 'owned' collections
  5625. // of subscriptions
  5626. //
  5627. on: function on($el, types, selector, data, fn) {
  5628. $el.on(types, selector, data, fn);
  5629. return {
  5630. remove: function remove() {
  5631. $el.off(types, selector, fn);
  5632. }
  5633. };
  5634. },
  5635. /**
  5636. * Register a drop Zone with the drag and drop manage
  5637. *
  5638. *
  5639. * @param el - The drop zone element.
  5640. * @param selector - Selector to identify the drop zone sub regions. If not specified, there will only be one region which is the drop zone element.
  5641. * @param callbacks
  5642. * callbacks.accepts(dragObject) - Called to check if the dropzone accepts the payload.
  5643. * callbacks.onDragStart() - Called when a drag starts
  5644. * callbacks.onDragEnd() - Called when a drag ends
  5645. * callbacks.onDragEnter(dragObject, dropNode) - Called when we enter a drop zone
  5646. * callbacks.onDragMove(dragObject, dropNode) - Called when we move inside a drop zone
  5647. * callbacks.onDragLeave(dragObject, dropNode) - Called when we leave a drop zone
  5648. * callbacks.onDrop(dragObject, dropNode) - Called when a drop occurs.
  5649. * @returns {___anonymous1282_1365}
  5650. */
  5651. addDropTarget: function addDropTarget(el, selector, callbacks) {
  5652. if (typeof selector !== 'string') {
  5653. callbacks = selector;
  5654. selector = null;
  5655. }
  5656. this.removeDropTarget(el);
  5657. this.dropTargets.push({
  5658. el: el,
  5659. selector: selector,
  5660. callbacks: callbacks
  5661. });
  5662. return {
  5663. remove: function () {
  5664. this.removeDropTarget(el);
  5665. }.bind(this)
  5666. };
  5667. },
  5668. /**
  5669. * Remove a registered drop target
  5670. * @param el
  5671. */
  5672. removeDropTarget: function removeDropTarget(el) {
  5673. var target = _.find(this.dropTargets, function (t) {
  5674. return t.el === el;
  5675. });
  5676. if (target) {
  5677. this.dropTargets.splice(_.indexOf(this.dropTargets, target), 1);
  5678. }
  5679. },
  5680. _isScrollDropSupported: function _isScrollDropSupported() {
  5681. return this.currentDropTarget.target && this.currentDropTarget.target.callbacks.isScrollDropSupported ? true : false;
  5682. },
  5683. /**
  5684. *
  5685. * Check if the intention is scrolling and return the proper scrolling enabled drop zone.
  5686. * If we are dragging outside of the view port, the intention is to auto scroll. In this case we do the following:
  5687. * - if we have a drop zone, find the closest scrollable drop zone in the ancestors.
  5688. * - if there is no drop zone, select the last scrollable drop zone that was used.
  5689. *
  5690. * If we are dragging within the view and we have no drop zone, find the closest scrolling drop zone using the last drop target that was used.
  5691. * @param target
  5692. * @param isScrollDropSupported
  5693. * @param pos - current mouse position
  5694. *
  5695. * @returns the target or empty object.
  5696. */
  5697. _validateDropTarget: function _validateDropTarget(target, isScrollDropSupported, pos) {
  5698. var foundTarget = target;
  5699. if (isScrollDropSupported) {
  5700. if (pos.x + 1 >= $(window).innerWidth() || pos.y + 1 >= $(window).height() || pos.x <= 1 || pos.y <= 1) {
  5701. // dragging outside of the viewport.. most likely the intent is to auto scroll a drop zone
  5702. if (foundTarget) {
  5703. foundTarget = this._getClosestTargetWithScrollSupport(foundTarget.node);
  5704. } else {
  5705. foundTarget = this.lastActiveScrollableTarget;
  5706. }
  5707. }
  5708. if (!foundTarget && this.currentDropTarget) {
  5709. foundTarget = this._getClosestTargetWithScrollSupport(this.currentDropTarget.node);
  5710. }
  5711. }
  5712. return foundTarget || {};
  5713. },
  5714. /**
  5715. * Scan the list containing the ancestors + self and return the first drop zone that suppports scrolling.
  5716. *
  5717. * @param dropTargetNode - the node of the drop target where to start the search
  5718. *
  5719. */
  5720. _getClosestTargetWithScrollSupport: function _getClosestTargetWithScrollSupport(dropTargetNode) {
  5721. var parentsAndSelf = $(dropTargetNode).parents();
  5722. parentsAndSelf.splice(0, 0, dropTargetNode);
  5723. var target = null;
  5724. for (var i = 0; i < parentsAndSelf.length; i++) {
  5725. target = this._getDropTargetWithScrollSupport(parentsAndSelf[i]);
  5726. if (target) {
  5727. this.lastActiveScrollableTarget = target;
  5728. break;
  5729. }
  5730. }
  5731. return target;
  5732. },
  5733. /**
  5734. * Find the drop zone that support scrolling where the node match the given node parameter
  5735. *
  5736. * @param targetNode - node to match with the drop zone node.
  5737. *
  5738. */
  5739. _getDropTargetWithScrollSupport: function _getDropTargetWithScrollSupport(targetNode) {
  5740. var foundTarget = null;
  5741. var dropTarget = _.find(this.dropTargets, function (target) {
  5742. var $elements = $(target.el);
  5743. if (target.selector) {
  5744. $elements = $elements.find(target.selector);
  5745. }
  5746. return _.find($elements, function (node) {
  5747. return node === targetNode && target.callbacks.isScrollDropSupported && (!target.callbacks.accepts || target.callbacks.accepts(this.dragObject));
  5748. }.bind(this));
  5749. }.bind(this));
  5750. if (dropTarget) {
  5751. foundTarget = {
  5752. target: dropTarget,
  5753. node: targetNode
  5754. };
  5755. }
  5756. return foundTarget;
  5757. },
  5758. /**
  5759. * Helper method that gets the current drop target from a position
  5760. * @param pos
  5761. * @param options -- options passed by the called when the startDrag method is called
  5762. * @returns {Object} - drop target
  5763. */
  5764. getDropTargetFromPos: function getDropTargetFromPos(pos, options) {
  5765. var isScrollDropSupported = options && !options.disableScrollableDropZoneSupport;
  5766. var foundTarget = null;
  5767. var foundTargetArea = 0;
  5768. var foundTargetPriority = 0;
  5769. var nonActiveDropZones = [];
  5770. _.each(this.dropTargets, function (target) {
  5771. var $elements = $(target.el);
  5772. if (target.selector) {
  5773. $elements = $elements.find(target.selector);
  5774. }
  5775. _.each($elements, function (node) {
  5776. var info = this.getTargetMatchInformation(pos, node, target, foundTarget, foundTargetArea, foundTargetPriority);
  5777. if (info.isMatch) {
  5778. if (!target.callbacks.accepts || target.callbacks.accepts(this.dragObject)) {
  5779. foundTarget = {
  5780. target: target,
  5781. node: node
  5782. };
  5783. foundTargetArea = info.area;
  5784. foundTargetPriority = info.priority;
  5785. } else if (target.callbacks.receiveEventsWhenNotAccepting) {
  5786. nonActiveDropZones.push({
  5787. target: target,
  5788. node: node
  5789. });
  5790. }
  5791. }
  5792. }.bind(this));
  5793. }.bind(this));
  5794. foundTarget = this._validateDropTarget(foundTarget, isScrollDropSupported, pos);
  5795. if (foundTarget) {
  5796. foundTarget.nonActiveDropZones = nonActiveDropZones;
  5797. }
  5798. return foundTarget || {};
  5799. },
  5800. /**
  5801. * Return true if val is between lowerBound and (lowerBound + rangeSize).
  5802. */
  5803. _isInRange: function _isInRange(val, lowerBound, rangeSize) {
  5804. return val >= lowerBound && val < lowerBound + rangeSize;
  5805. },
  5806. /**
  5807. * return the priority set for target or 0.
  5808. */
  5809. _getPriority: function _getPriority(target) {
  5810. var priority = target.callbacks.priority;
  5811. if (typeof priority === 'function') {
  5812. priority = priority();
  5813. }
  5814. return priority || 0;
  5815. },
  5816. /**
  5817. * Helper function used by getDropTargetFromPos to decide if a drop target is found or not using the current mouse position
  5818. */
  5819. getTargetMatchInformation: function getTargetMatchInformation(pos, node, target, foundTarget, foundTargetArea, foundTargetPriority) {
  5820. var matchInformation = {};
  5821. var $el = $(node);
  5822. var bounds = node.getBoundingClientRect();
  5823. var isVisible = $el.is(':visible');
  5824. if (isVisible) {
  5825. var xInRange = this._isInRange(pos.x, bounds.left, bounds.width);
  5826. var yInRange = this._isInRange(pos.y, bounds.top, bounds.height);
  5827. if (xInRange && yInRange) {
  5828. matchInformation = {
  5829. area: bounds.width * bounds.height,
  5830. priority: this._getPriority(target)
  5831. };
  5832. matchInformation.isMatch = !foundTarget || matchInformation.priority > foundTargetPriority || foundTargetArea > matchInformation.area && matchInformation.priority >= foundTargetPriority;
  5833. }
  5834. }
  5835. return matchInformation;
  5836. },
  5837. /**
  5838. * Helper method that gets the current drop target from a node
  5839. * @param pos
  5840. * @returns {Object} - drop target
  5841. */
  5842. getDropTargetFromNode: function getDropTargetFromNode(node) {
  5843. var target = null;
  5844. for (var i = 0; i < this.dropTargets.length; i++) {
  5845. if (node === this.dropTargets[i].el) {
  5846. target = this.dropTargets[i];
  5847. break;
  5848. }
  5849. }
  5850. return target;
  5851. },
  5852. dragObject: null,
  5853. /**
  5854. * Called to start dragging
  5855. * @param options
  5856. * options.event ev - the event used to start the drag. e.g. mousedown, touchstart
  5857. * options.type - The type of the data being dropped.
  5858. * options.data - The data being dropped.
  5859. * options.avatar - the avatar node associated with the drag and drop operation
  5860. * options.avatarXOffset - the number of pixel added to the avatar left position
  5861. * options.avatarYOffset - the number of pixel added to the avatar top position
  5862. * options.restrictToXAxis - restrict moving on the x axis
  5863. * options.restrictToYAxis - restrict moving on the y axis
  5864. *
  5865. * options.callerCallbacks
  5866. * callerCallback.onDragStart(event, {dragObject}) - Called when the drag is started.
  5867. * callerCallback.onMove(event, {dragObject, dropNode}) - Called on every move event.
  5868. * callerCallback.onDragDone(event, {dragObject, dropNode, isDropped}) - Called when the drag is complete, whether we droppped or not.
  5869. *
  5870. * options.moveXThreshold - the number of pixel to move on the X axis before we allow the drag to start. A good example to use this is
  5871. * when want to enable a drag horizontally and still allow vertical scrolling/panning. In this case, we would set the moveXThreshold to something like 30.
  5872. * This will allow vertical scroll as long as we don't drag horizontally more that 30 pixels.
  5873. *
  5874. * options.moveYThreshold - the number of pixel to move on the Y axis before we allow the drag to start.
  5875. *
  5876. * @param moveThreshold - distance in pixel that will activate the move and the avatar
  5877. */
  5878. startDrag: function startDrag(options) {
  5879. if (this.dragObject) {
  5880. // cannot start another drag operation until the previous one is finished
  5881. return;
  5882. }
  5883. $('body').addClass('preventSelection');
  5884. this.isDragStartCalled = false;
  5885. this.targetMap = {};
  5886. var isTouch = utils.isTouchEvent(options.event);
  5887. this.dragObject = {
  5888. type: options.type,
  5889. data: options.data,
  5890. avatar: options.avatar,
  5891. isTouch: isTouch || options.event.gesture !== undefined
  5892. };
  5893. var eventPos = utils.getEventPos(options.event);
  5894. this.dragObject.startPosition = {
  5895. x: eventPos.pageX,
  5896. y: eventPos.pageY
  5897. };
  5898. this.setAvatar(options.avatar, options);
  5899. this.callerCallbacks = options.callerCallbacks ? options.callerCallbacks : {};
  5900. var $target = $(window);
  5901. if (isTouch) {
  5902. $target = $(utils.getEventTarget(options.event));
  5903. }
  5904. this.attachedMoveHandler = this.on($target, 'mousemove touchmove', this.moveHandler.bind(this, options));
  5905. this.attachedUpHandler = this.on($target, 'mouseup touchend touchcancel', this.upHandler.bind(this));
  5906. if (options.event.type === 'mousedown') {
  5907. this.attachedScrollHandler = this.on($(options.event.target), 'scroll', this.scrollHandler.bind(this));
  5908. }
  5909. if (options.currentDropZoneNode) {
  5910. var target = this.getDropTargetFromNode(options.currentDropZoneNode);
  5911. if (target) {
  5912. this.currentDropTarget = {
  5913. target: target,
  5914. node: options.currentDropZoneNode
  5915. };
  5916. }
  5917. }
  5918. },
  5919. scrollHandler: function scrollHandler() /* event */{
  5920. // we are scrolling, do not track movement
  5921. // cancel drag
  5922. // IE does not fire mouseUp on scrollbar so drag move continues after releasing the mouse when it should not
  5923. this.resetDragging();
  5924. },
  5925. _setAvatarPosition: function _setAvatarPosition(options) {
  5926. if (this.avatar && this.dragObject.position) {
  5927. if (!this.avatar.parentNode) {
  5928. $('body').append(this.avatar);
  5929. }
  5930. var xOffset = options && options.avatarXOffset ? options.avatarXOffset : 1;
  5931. var yOffset = options && options.avatarYOffset ? options.avatarYOffset : 1;
  5932. $(this.avatar).css({
  5933. left: this.dragObject.position.x + xOffset + 'px',
  5934. top: this.dragObject.position.y + yOffset + 'px'
  5935. });
  5936. }
  5937. },
  5938. setAvatar: function setAvatar(avatar, options) {
  5939. this.avatar = avatar;
  5940. this._setAvatarPosition(options);
  5941. },
  5942. /**
  5943. * Move event main handler
  5944. * @param options - drag options
  5945. * @param ev
  5946. */
  5947. moveHandler: function moveHandler(options, ev) {
  5948. //Always prevent the default behavior on drag move to prevent chrome auto scrolling
  5949. ev.preventDefault();
  5950. var eventPos = utils.getEventPos(ev);
  5951. var dx = eventPos.pageX;
  5952. var dy = eventPos.pageY;
  5953. this.dragObject.position = {
  5954. x: dx,
  5955. y: dy
  5956. };
  5957. if (options.restrictToXAxis) {
  5958. this.dragObject.position.y = this.dragObject.startPosition.y;
  5959. }
  5960. if (options.restrictToYAxis) {
  5961. this.dragObject.position.x = this.dragObject.startPosition.x;
  5962. }
  5963. if (!this.isDragStartCalled && this._isThresholdNotMet(options)) {
  5964. return;
  5965. }
  5966. this._setAvatarPosition(options);
  5967. var dropTarget = this.getDropTargetFromPos(this.dragObject.position, options);
  5968. this._callStartDrag(ev);
  5969. this._callMove(dropTarget, ev);
  5970. this._processCallbacks(dropTarget);
  5971. // Don't stop the propagation. This will interfere with hammer gestures like tap and hold.
  5972. // If there is an active tap/hold handlers, hammer needs to know when there is a move.
  5973. },
  5974. _processCallbacks: function _processCallbacks(dropTarget) {
  5975. var currentNonActiveDropZones = this.currentDropTarget.nonActiveDropZones;
  5976. // Process the callback for the active drop zone that accepted the drop
  5977. if (dropTarget.target !== this.currentDropTarget.target || dropTarget.node !== this.currentDropTarget.node) {
  5978. this._dropTargetCallback(this.currentDropTarget, 'onDragLeave');
  5979. this.currentDropTarget = dropTarget;
  5980. this._dropTargetCallback(this.currentDropTarget, 'onDragEnter');
  5981. } else {
  5982. this._dropTargetCallback(this.currentDropTarget, 'onDragMove');
  5983. }
  5984. // Process callback for drop zone that didn't accept but chose to receive the event anyway
  5985. this._processCallbacksForNonActiveDropzones(dropTarget.nonActiveDropZones, currentNonActiveDropZones);
  5986. },
  5987. _processCallbacksForNonActiveDropzones: function _processCallbacksForNonActiveDropzones(newDropZones, oldDropZones) {
  5988. _.each(newDropZones, function (dropZone) {
  5989. if (this._isDropZoneInArray(dropZone, oldDropZones)) {
  5990. this._dropTargetCallback(dropZone, 'onDragMove');
  5991. } else {
  5992. this._dropTargetCallback(dropZone, 'onDragEnter');
  5993. }
  5994. }.bind(this));
  5995. if (oldDropZones) {
  5996. _.each(oldDropZones, function (dropZone) {
  5997. if (!this._isDropZoneInArray(dropZone, newDropZones)) {
  5998. this._dropTargetCallback(dropZone, 'onDragLeave');
  5999. }
  6000. }.bind(this));
  6001. }
  6002. this.currentDropTarget.nonActiveDropZones = newDropZones;
  6003. },
  6004. _dropTargetCallback: function _dropTargetCallback(dropTarget, callbackName) {
  6005. if (dropTarget.target && dropTarget.target.callbacks[callbackName]) {
  6006. dropTarget.target.callbacks[callbackName](this.dragObject, dropTarget.node);
  6007. return true;
  6008. }
  6009. return false;
  6010. },
  6011. _isDropZoneInArray: function _isDropZoneInArray(dropZone, dropZoneArray) {
  6012. var found = false;
  6013. if (dropZoneArray) {
  6014. for (var i = 0; i < dropZoneArray.length; i++) {
  6015. if (dropZone.target === dropZoneArray[i].target) {
  6016. found = true;
  6017. break;
  6018. }
  6019. }
  6020. }
  6021. return found;
  6022. },
  6023. _isThresholdNotMet: function _isThresholdNotMet(options) {
  6024. var hasThreshold = options.moveXThreshold || options.moveYThreshold;
  6025. var isXThresholdNotMet = !options.moveXThreshold || options.moveXThreshold > Math.abs(this.dragObject.position.x - this.dragObject.startPosition.x);
  6026. var isYThresholdNotMet = !options.moveYThreshold || options.moveYThreshold > Math.abs(this.dragObject.position.y - this.dragObject.startPosition.y);
  6027. return hasThreshold && isXThresholdNotMet && isYThresholdNotMet;
  6028. },
  6029. _callMove: function _callMove(dropTarget, ev) {
  6030. if (this.callerCallbacks.onMove) {
  6031. this.callerCallbacks.onMove(ev, {
  6032. dragObject: this.dragObject,
  6033. dropTargetNode: dropTarget.node
  6034. });
  6035. }
  6036. },
  6037. _callStartDrag: function _callStartDrag(ev) {
  6038. if (this.callerCallbacks.onDragStart && !this.isDragStartCalled) {
  6039. this.callerCallbacks.onDragStart(ev, { dragObject: this.dragObject });
  6040. _.each(this.dropTargets, function (target) {
  6041. if (target.callbacks.onDragStart) {
  6042. target.callbacks.onDragStart(this.dragObject);
  6043. }
  6044. }.bind(this));
  6045. }
  6046. $('body').addClass('dragging');
  6047. this.isDragStartCalled = true;
  6048. },
  6049. /**
  6050. * mouseup/touchend main handler
  6051. *
  6052. * @param ev
  6053. */
  6054. upHandler: function upHandler(ev) {
  6055. if (this.isDragStartCalled) {
  6056. var isDropped = false;
  6057. $('body').removeClass('dragging');
  6058. var dropTarget = this.currentDropTarget;
  6059. if (this._dropTargetCallback(dropTarget, 'onDrop')) {
  6060. isDropped = true;
  6061. }
  6062. if (this.callerCallbacks.onDragDone) {
  6063. this.callerCallbacks.onDragDone(ev, {
  6064. dragObject: this.dragObject,
  6065. dropTargetNode: isDropped ? dropTarget.node : null,
  6066. isDropped: isDropped
  6067. });
  6068. }
  6069. if (dropTarget.nonActiveDropZones) {
  6070. _.each(dropTarget.nonActiveDropZones, function (dropZone) {
  6071. this._dropTargetCallback(dropZone, 'onDrop');
  6072. }.bind(this));
  6073. }
  6074. _.each(this.dropTargets, function (target) {
  6075. if (target.callbacks.onDragEnd) {
  6076. target.callbacks.onDragEnd(this.dragObject);
  6077. }
  6078. }.bind(this));
  6079. }
  6080. this.resetDragging();
  6081. // Don't stop the propagation. This will interfere with hammer gestures like tap and hold.
  6082. // If there is an active tap/hold handlers, hammer needs to know when the touch ends.
  6083. },
  6084. resetDragging: function resetDragging() {
  6085. // Release the capture that we set in the mouse down.
  6086. // This is used to allow IE to keep firing the mouse event when the mouse leaves the window or iframe
  6087. if (document.releaseCapture) {
  6088. document.releaseCapture();
  6089. }
  6090. if (this.attachedMoveHandler) {
  6091. this.attachedMoveHandler.remove();
  6092. }
  6093. if (this.attachedUpHandler) {
  6094. this.attachedUpHandler.remove();
  6095. }
  6096. if (this.attachedScrollHandler) {
  6097. this.attachedScrollHandler.remove();
  6098. }
  6099. $('body').removeClass('preventSelection');
  6100. this.currentDropTarget = {};
  6101. this.dragObject = null;
  6102. this.isDragStartCalled = false;
  6103. this.targetMap = null;
  6104. this.lastActiveScrollableTarget = null;
  6105. $(this.avatar).remove();
  6106. }
  6107. });
  6108. return new DnDManager();
  6109. }).apply(exports, __WEBPACK_AMD_DEFINE_ARRAY__),
  6110. __WEBPACK_AMD_DEFINE_RESULT__ !== undefined && (module.exports = __WEBPACK_AMD_DEFINE_RESULT__));
  6111. //# sourceMappingURL=DnDManager.js.map
  6112. /***/ }),
  6113. /* 47 */
  6114. /***/ (function(module, exports, __webpack_require__) {
  6115. "use strict";
  6116. var __WEBPACK_AMD_DEFINE_ARRAY__, __WEBPACK_AMD_DEFINE_RESULT__;
  6117. /**
  6118. * Licensed Materials - Property of IBM
  6119. * IBM Cognos Products: BI
  6120. * (C) Copyright IBM Corp. 2014, 2017
  6121. * US Government Users Restricted Rights - Use, duplication or disclosure restricted by GSA ADP Schedule
  6122. * Contract with IBM Corp.
  6123. */
  6124. !(__WEBPACK_AMD_DEFINE_ARRAY__ = [], __WEBPACK_AMD_DEFINE_RESULT__ = (function () {
  6125. 'use strict';
  6126. return {
  6127. getAncestorOfClass: function getAncestorOfClass(node, className) {
  6128. var doc = document;
  6129. while (node && node !== doc) {
  6130. if (node.className.split(' ').indexOf(className) >= 0) {
  6131. return node;
  6132. }
  6133. node = node.parentNode;
  6134. }
  6135. return null;
  6136. },
  6137. isTouchEvent: function isTouchEvent(ev) {
  6138. return ev.type.indexOf('touch') === 0;
  6139. },
  6140. isPointerTouch: function isPointerTouch(ev) {
  6141. return ev.gesture && ev.gesture.pointerType === 'touch';
  6142. },
  6143. isMultiTouchEvent: function isMultiTouchEvent(ev) {
  6144. var oev = ev.originalEvent || ev;
  6145. if (oev && oev.touches && oev.touches.length > 1) {
  6146. return true;
  6147. }
  6148. return false;
  6149. },
  6150. isGesture: function isGesture(ev) {
  6151. if (ev.gesture && ev.gesture.touches && ev.gesture.touches.length > 0) {
  6152. return true;
  6153. }
  6154. return false;
  6155. },
  6156. getEventPos: function getEventPos(ev) {
  6157. var pageValuesValid = function pageValuesValid(event) {
  6158. return event && (event.pageX || event.pageX === 0) && (event.pageY || event.pageY === 0);
  6159. };
  6160. var pos;
  6161. if (this.isGesture(ev)) {
  6162. var touches = ev.gesture.touches[0];
  6163. if (pageValuesValid(touches)) {
  6164. pos = {
  6165. pageX: touches.pageX,
  6166. pageY: touches.pageY
  6167. };
  6168. }
  6169. }
  6170. if (!pos && this.isTouchEvent(ev)) {
  6171. var oev = ev.originalEvent || ev;
  6172. if (oev && oev.touches.length > 0 && pageValuesValid(oev.touches[0])) {
  6173. pos = { pageX: oev.touches[0].pageX, pageY: oev.touches[0].pageY };
  6174. }
  6175. }
  6176. if (!pos && pageValuesValid(ev)) {
  6177. pos = { pageX: ev.pageX, pageY: ev.pageY };
  6178. }
  6179. if (!pos && pageValuesValid(ev.originalEvent)) {
  6180. pos = { pageX: ev.originalEvent.pageX, pageY: ev.originalEvent.pageY };
  6181. }
  6182. if (!pos) {
  6183. // could not find any valid numbers so return zero. Returning undefined values breaks some other code.
  6184. pos = { pageX: 0, pageY: 0 };
  6185. }
  6186. return pos;
  6187. },
  6188. getEventTarget: function getEventTarget(ev) {
  6189. if (this.isTouchEvent(ev)) {
  6190. var oev = ev.originalEvent || ev;
  6191. if (oev && oev.touches.length > 0) {
  6192. return oev.touches[0].target;
  6193. }
  6194. }
  6195. return ev.target;
  6196. },
  6197. withinElementBoundaries: function withinElementBoundaries(event, node) {
  6198. var pos = this.getEventPos(event);
  6199. var boundingRect = node.getBoundingClientRect();
  6200. var inXRange = pos.pageX >= boundingRect.left && pos.pageX <= boundingRect.right;
  6201. var inYRange = pos.pageY >= boundingRect.top && pos.pageY <= boundingRect.bottom;
  6202. return inXRange && inYRange;
  6203. }
  6204. };
  6205. }).apply(exports, __WEBPACK_AMD_DEFINE_ARRAY__),
  6206. __WEBPACK_AMD_DEFINE_RESULT__ !== undefined && (module.exports = __WEBPACK_AMD_DEFINE_RESULT__));
  6207. //# sourceMappingURL=dom-utils.js.map
  6208. /***/ }),
  6209. /* 48 */
  6210. /***/ (function(module, exports) {
  6211. module.exports = __WEBPACK_EXTERNAL_MODULE_48__;
  6212. /***/ }),
  6213. /* 49 */
  6214. /***/ (function(module, exports) {
  6215. module.exports = __WEBPACK_EXTERNAL_MODULE_49__;
  6216. /***/ }),
  6217. /* 50 */
  6218. /***/ (function(module, exports) {
  6219. module.exports = __WEBPACK_EXTERNAL_MODULE_50__;
  6220. /***/ }),
  6221. /* 51 */
  6222. /***/ (function(module, exports, __webpack_require__) {
  6223. "use strict";
  6224. exports.__esModule = true;
  6225. var _react = __webpack_require__(0);
  6226. var _react2 = _interopRequireDefault(_react);
  6227. var _propTypes = __webpack_require__(2);
  6228. var _propTypes2 = _interopRequireDefault(_propTypes);
  6229. var _StringResources = __webpack_require__(1);
  6230. var _StringResources2 = _interopRequireDefault(_StringResources);
  6231. var _ContentPanel = __webpack_require__(52);
  6232. var _ContentPanel2 = _interopRequireDefault(_ContentPanel);
  6233. var _PackagePanel = __webpack_require__(68);
  6234. var _PackagePanel2 = _interopRequireDefault(_PackagePanel);
  6235. var _ToastEnum = __webpack_require__(26);
  6236. var _ToastEnum2 = _interopRequireDefault(_ToastEnum);
  6237. var _caUiToolkit = __webpack_require__(3);
  6238. __webpack_require__(4);
  6239. function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
  6240. function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
  6241. function _possibleConstructorReturn(self, call) { if (!self) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return call && (typeof call === "object" || typeof call === "function") ? call : self; }
  6242. function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function, not " + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; } /**
  6243. * Licensed Materials - Property of IBM
  6244. * IBM Cognos Products: BI
  6245. * (C) Copyright IBM Corp. 2019
  6246. * US Government Users Restricted Rights - Use, duplication or disclosure restricted by GSA ADP Schedule Contract with IBM Corp.
  6247. */
  6248. // Schematic Editor class
  6249. var SchematicEditor = function (_Component) {
  6250. _inherits(SchematicEditor, _Component);
  6251. // Constructor
  6252. // State consists of property to define whether or not the dialog is open or closed,
  6253. // the selectedTab for the tab panel and the selected item in the select drop down list
  6254. function SchematicEditor(props) {
  6255. _classCallCheck(this, SchematicEditor);
  6256. var _this = _possibleConstructorReturn(this, _Component.call(this, props));
  6257. _this.componentDidMount = function () {};
  6258. _this.openDialog = function () {
  6259. _this.setState({ isDialogOpen: true });
  6260. };
  6261. _this.applyDialog = function () {
  6262. // normally just call the OK callback - but wrap in a function for any housekeeping
  6263. _this.props.okCallbackFn(_this.state.definition);
  6264. _this.closeDialog();
  6265. };
  6266. _this.closeDialog = function () {
  6267. var onCloseDialog = _this.props.onCloseDialog;
  6268. _this.setState({ isDialogOpen: false }, function () {
  6269. if (onCloseDialog) {
  6270. onCloseDialog();
  6271. }
  6272. });
  6273. };
  6274. _this._cloneJsonObject = function (_object) {
  6275. return JSON.parse(JSON.stringify(_object));
  6276. };
  6277. _this._renderGlobalToast = function () {
  6278. var toastMsg = _this.state.toastMsg;
  6279. return toastMsg && toastMsg.type && toastMsg.info && _react2.default.createElement(_caUiToolkit.GlobalToast, {
  6280. statusType: toastMsg.type,
  6281. timedDismiss: true,
  6282. contentString: toastMsg.info,
  6283. targetId: 'schematicEditorToastTargetId',
  6284. onClose: function onClose() {
  6285. _this.setState({ toastMsg: null });
  6286. } });
  6287. };
  6288. _this._updatePackageInfo = function (_result) {
  6289. var newDefinition = _this._cloneJsonObject(_this.state.definition);
  6290. newDefinition.meta[_result.name] = _result.value;
  6291. _this.setState({
  6292. definition: newDefinition
  6293. });
  6294. };
  6295. _this._handleContentChange = function (_result) {
  6296. _this.setState(_result);
  6297. };
  6298. _this._iconLoadFailed = function (_error) {
  6299. _this.setState({
  6300. toastMsg: {
  6301. type: _ToastEnum2.default.ERROR,
  6302. info: _error.message
  6303. }
  6304. });
  6305. };
  6306. _this._handleIconLoad = function (_fileName, _blobUrl) {
  6307. var newDefinition = _this._cloneJsonObject(_this.state.definition);
  6308. newDefinition.meta.icon = _fileName;
  6309. newDefinition.iconUrl = _blobUrl;
  6310. var msg = _fileName ? _StringResources2.default.get('schematicsIconAdded', { file: _fileName }) : _StringResources2.default.get('schematicsIconRemove');
  6311. _this.setState({
  6312. toastMsg: {
  6313. type: _ToastEnum2.default.SUCCESS,
  6314. info: msg
  6315. },
  6316. definition: newDefinition
  6317. });
  6318. };
  6319. _this.addSvgFilesButtonRef = null;
  6320. // need to clone the definition from input props
  6321. var stateDefinition = _this._cloneJsonObject(_this.props.definition);
  6322. _this.state = {
  6323. isDialogOpen: false,
  6324. definition: stateDefinition,
  6325. selectedIndices: [],
  6326. search: '',
  6327. searchMatches: null,
  6328. toastMsg: null,
  6329. svgFiles: null,
  6330. selectedTab: 'schematicEditorContentTab',
  6331. tabs: null
  6332. };
  6333. return _this;
  6334. }
  6335. /**
  6336. * componentDidMount - Lifecycle method. Executes before first render. Executes when the element is inserted into the virtual DOM but before the HTML node itself can be manipulated.
  6337. * Use this point to configure the element as required based on properties passed upon creation
  6338. **/
  6339. // Update the state when the package details(name or description) have changed
  6340. // Function used to render the CustomPalette element (dialog)
  6341. SchematicEditor.prototype.render = function render() {
  6342. var _this2 = this;
  6343. var dialogTitle = _StringResources2.default.get('editSchematic');
  6344. var contentTabTitle = _StringResources2.default.get('schematicsContentTab');
  6345. var packageTabTitle = _StringResources2.default.get('schematicsPackageTab');
  6346. var _props = this.props,
  6347. zipMaxSize = _props.zipMaxSize,
  6348. imgMaxSize = _props.imgMaxSize;
  6349. var _state = this.state,
  6350. isDialogOpen = _state.isDialogOpen,
  6351. selectedTab = _state.selectedTab,
  6352. tabs = _state.tabs,
  6353. definition = _state.definition,
  6354. svgFiles = _state.svgFiles,
  6355. selectedIndices = _state.selectedIndices,
  6356. search = _state.search,
  6357. searchMatches = _state.searchMatches;
  6358. return isDialogOpen && _react2.default.createElement(
  6359. 'div',
  6360. null,
  6361. this._renderGlobalToast(),
  6362. _react2.default.createElement(
  6363. _caUiToolkit.Dialog,
  6364. { width: '920px', onClose: this.closeDialog, startingFocusIndex: 0 },
  6365. _react2.default.createElement(
  6366. _caUiToolkit.Dialog.Header,
  6367. { id: 'schematicEditorToastTargetId' },
  6368. dialogTitle
  6369. ),
  6370. _react2.default.createElement(
  6371. _caUiToolkit.Dialog.Body,
  6372. null,
  6373. _react2.default.createElement(
  6374. _caUiToolkit.Tabs,
  6375. {
  6376. draggable: false,
  6377. selected: selectedTab,
  6378. onChange: function onChange(tabId) {
  6379. return _this2.setState({ selectedTab: tabId });
  6380. },
  6381. stateTabs: tabs,
  6382. className: 'clsSVGEditorTabs'
  6383. },
  6384. _react2.default.createElement(
  6385. _caUiToolkit.TabPanel,
  6386. { id: 'schematicEditorPackageTab', label: packageTabTitle },
  6387. _react2.default.createElement(_PackagePanel2.default, {
  6388. packageName: definition.meta.name,
  6389. packageDescription: definition.meta.description,
  6390. iconName: definition.meta.icon,
  6391. iconURL: definition.iconUrl,
  6392. zipMaxSize: zipMaxSize,
  6393. imgMaxSize: imgMaxSize,
  6394. onChange: this._updatePackageInfo,
  6395. onIconChanged: this._handleIconLoad,
  6396. onIconError: this._iconLoadFailed
  6397. })
  6398. ),
  6399. _react2.default.createElement(
  6400. _caUiToolkit.TabPanel,
  6401. { id: 'schematicEditorContentTab', label: contentTabTitle },
  6402. _react2.default.createElement(_ContentPanel2.default, {
  6403. definition: definition,
  6404. svgFiles: svgFiles,
  6405. selectedIndices: selectedIndices,
  6406. search: search,
  6407. searchMatches: searchMatches,
  6408. zipMaxSize: zipMaxSize,
  6409. imgMaxSize: imgMaxSize,
  6410. onChange: this._handleContentChange
  6411. })
  6412. )
  6413. )
  6414. ),
  6415. _react2.default.createElement(
  6416. _caUiToolkit.Dialog.Footer,
  6417. { id: 'schematicEditorFooterId' },
  6418. _react2.default.createElement(_caUiToolkit.Dialog.Button, { id: 'idOkBtn', autofocus: true, label: _StringResources2.default.get('okDialog'), onClick: this.applyDialog, tabIndex: 0, intent: 'primary', variant: 'solid' }),
  6419. _react2.default.createElement(_caUiToolkit.Dialog.Button, { id: 'idCancelBtn', label: _StringResources2.default.get('cancelDialog'), onClick: this.closeDialog, tabIndex: 0, intent: 'primary', variant: 'frame' })
  6420. )
  6421. )
  6422. );
  6423. };
  6424. return SchematicEditor;
  6425. }(_react.Component);
  6426. SchematicEditor.propTypes = {
  6427. definition: _propTypes2.default.object.isRequired,
  6428. okCallbackFn: _propTypes2.default.func.isRequired,
  6429. onCloseDialog: _propTypes2.default.func,
  6430. zipMaxSize: _propTypes2.default.number,
  6431. imgMaxSize: _propTypes2.default.number };
  6432. exports.default = SchematicEditor;
  6433. SchematicEditor.defaultProps = {
  6434. zipMaxSize: 500,
  6435. imgMaxSize: 500
  6436. };
  6437. /***/ }),
  6438. /* 52 */
  6439. /***/ (function(module, exports, __webpack_require__) {
  6440. "use strict";
  6441. exports.__esModule = true;
  6442. var _react = __webpack_require__(0);
  6443. var _react2 = _interopRequireDefault(_react);
  6444. var _propTypes = __webpack_require__(2);
  6445. var _propTypes2 = _interopRequireDefault(_propTypes);
  6446. var _StringResources = __webpack_require__(1);
  6447. var _StringResources2 = _interopRequireDefault(_StringResources);
  6448. var _AddSVGFilesButton = __webpack_require__(53);
  6449. var _AddSVGFilesButton2 = _interopRequireDefault(_AddSVGFilesButton);
  6450. var _ConfirmReplaceDialog = __webpack_require__(61);
  6451. var _ConfirmReplaceDialog2 = _interopRequireDefault(_ConfirmReplaceDialog);
  6452. var _ItemDetail = __webpack_require__(62);
  6453. var _ItemDetail2 = _interopRequireDefault(_ItemDetail);
  6454. var _ToastEnum = __webpack_require__(26);
  6455. var _ToastEnum2 = _interopRequireDefault(_ToastEnum);
  6456. var _VisualItems = __webpack_require__(63);
  6457. var _VisualItems2 = _interopRequireDefault(_VisualItems);
  6458. var _caUiToolkit = __webpack_require__(3);
  6459. __webpack_require__(4);
  6460. var _delete_ = __webpack_require__(17);
  6461. var _delete_2 = _interopRequireDefault(_delete_);
  6462. function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
  6463. function _objectWithoutProperties(obj, keys) { var target = {}; for (var i in obj) { if (keys.indexOf(i) >= 0) continue; if (!Object.prototype.hasOwnProperty.call(obj, i)) continue; target[i] = obj[i]; } return target; }
  6464. function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
  6465. function _possibleConstructorReturn(self, call) { if (!self) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return call && (typeof call === "object" || typeof call === "function") ? call : self; }
  6466. function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function, not " + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; } /**
  6467. * Licensed Materials - Property of IBM
  6468. * IBM Cognos Products: BI
  6469. * (C) Copyright IBM Corp. 2019
  6470. * US Government Users Restricted Rights - Use, duplication or disclosure restricted by GSA ADP Schedule Contract with IBM Corp.
  6471. */
  6472. var ContentPanel = function (_Component) {
  6473. _inherits(ContentPanel, _Component);
  6474. function ContentPanel(props) {
  6475. _classCallCheck(this, ContentPanel);
  6476. var _this = _possibleConstructorReturn(this, _Component.call(this, props));
  6477. _this._cloneJsonObject = function (_object) {
  6478. return JSON.parse(JSON.stringify(_object));
  6479. };
  6480. _this._findSearchMatches = function (value) {
  6481. var _this$props = _this.props,
  6482. definition = _this$props.definition,
  6483. onChange = _this$props.onChange;
  6484. var matchIndices = null;
  6485. // if the value is empty - there's nothing being searched
  6486. if (value) {
  6487. matchIndices = [];
  6488. definition.meta.content.forEach(function (item, j) {
  6489. if (item.caption.toLowerCase().indexOf(value.toLowerCase()) !== -1) matchIndices.push(j);
  6490. });
  6491. }
  6492. onChange({
  6493. search: value,
  6494. searchMatches: matchIndices
  6495. });
  6496. };
  6497. _this._updateItem = function (property, value, index) {
  6498. var _this$props2 = _this.props,
  6499. definition = _this$props2.definition,
  6500. onChange = _this$props2.onChange;
  6501. var newDefinition = _this._cloneJsonObject(definition);
  6502. newDefinition.meta.content = newDefinition.meta.content.map(function (item, j) {
  6503. if (j === index) {
  6504. item[property] = value;
  6505. }
  6506. return item;
  6507. });
  6508. onChange({
  6509. definition: newDefinition
  6510. });
  6511. };
  6512. _this._updateSVGFiles = function (sourceNames, blobUrls, action, applyToAll, replaceIdx) {
  6513. var _this$props3 = _this.props,
  6514. definition = _this$props3.definition,
  6515. onChange = _this$props3.onChange;
  6516. var newDefinition = _this._cloneJsonObject(definition);
  6517. var count = 0;
  6518. while (sourceNames.length > 0) {
  6519. var sourceName = sourceNames[0];
  6520. var blobUrl = blobUrls[0];
  6521. var existIdx = -1;
  6522. for (var idx = 0; idx < newDefinition.meta.content.length; ++idx) {
  6523. if (newDefinition.meta.content[idx].source === sourceName) {
  6524. existIdx = idx;
  6525. break;
  6526. }
  6527. }
  6528. if (replaceIdx >= 0 && replaceIdx < newDefinition.meta.content.length) {
  6529. newDefinition.files[replaceIdx] = blobUrl;
  6530. count = 1;
  6531. } else if (existIdx >= 0) {
  6532. if (action === 'confirm') break;
  6533. if (action === 'replace') {
  6534. newDefinition.files[existIdx] = blobUrl;
  6535. count++;
  6536. }
  6537. } else {
  6538. newDefinition.meta.content.push({
  6539. 'key': sourceName,
  6540. 'caption': sourceName,
  6541. 'source': sourceName
  6542. });
  6543. newDefinition.files.push(blobUrl);
  6544. count++;
  6545. }
  6546. sourceNames.shift();
  6547. blobUrls.shift();
  6548. if (!applyToAll) action = 'confirm';
  6549. }
  6550. var toastMsg = count ? { type: _ToastEnum2.default.SUCCESS } : null;
  6551. if (count === 1) toastMsg.info = _StringResources2.default.get('schematicsSingleAddSuccessed');else if (count > 1) toastMsg.info = _StringResources2.default.get('schematicsMultipleAddSuccessed', { 'count': count });
  6552. onChange({
  6553. definition: newDefinition,
  6554. svgFiles: sourceNames.length > 0 ? { 'sourceNames': sourceNames, 'blobUrls': blobUrls } : null,
  6555. search: '',
  6556. searchMatches: null,
  6557. toastMsg: toastMsg
  6558. });
  6559. };
  6560. _this._newSvgFiles = function (sourceNames, blobUrls, replaceIdx) {
  6561. _this._updateSVGFiles(sourceNames, blobUrls, 'confirm', false, replaceIdx);
  6562. };
  6563. _this._toastSchematicsAddFailed = function (_error) {
  6564. _this.props.onChange({
  6565. toastMsg: {
  6566. type: _ToastEnum2.default.ERROR,
  6567. info: _error && _error.message || _StringResources2.default.get('schematicsAddFailed')
  6568. }
  6569. });
  6570. };
  6571. _this._toggleSelection = function (idx, multiSelect) {
  6572. var _this$props4 = _this.props,
  6573. selectedIndices = _this$props4.selectedIndices,
  6574. onChange = _this$props4.onChange;
  6575. var newSelectedIndices = _this._cloneJsonObject(selectedIndices);
  6576. var index = newSelectedIndices.indexOf(idx);
  6577. if (index !== -1 && multiSelect) {
  6578. newSelectedIndices.splice(index, 1);
  6579. } else {
  6580. if (multiSelect) newSelectedIndices.push(idx);else newSelectedIndices = [idx];
  6581. }
  6582. onChange({
  6583. selectedIndices: newSelectedIndices
  6584. });
  6585. };
  6586. _this._handleVisualItemContextMenu = function (name, value, index) {
  6587. if (value === 'delete') {
  6588. _this._handleDeletions([index]);
  6589. } else if (value === 'replace' && _this.addSvgFilesButtonRef) {
  6590. _this.addSvgFilesButtonRef.openFileSelector(false, index);
  6591. }
  6592. };
  6593. _this._handleDeletions = function (itemIdxArray) {
  6594. var _this$props5 = _this.props,
  6595. definition = _this$props5.definition,
  6596. searchMatches = _this$props5.searchMatches,
  6597. selectedIndices = _this$props5.selectedIndices,
  6598. onChange = _this$props5.onChange;
  6599. if (itemIdxArray.length > 0) {
  6600. var deletedCount = 0;
  6601. var newDefinition = {
  6602. meta: function (_ref) {
  6603. var clone = _objectWithoutProperties(_ref, []);
  6604. return clone;
  6605. }(definition.meta),
  6606. files: []
  6607. };
  6608. // Add the icon if defined
  6609. if (definition.iconUrl) {
  6610. newDefinition.iconUrl = definition.iconUrl;
  6611. }
  6612. newDefinition.meta.content = [];
  6613. var newSelectedIndices = [];
  6614. var newSearchMatches = searchMatches ? [] : null;
  6615. for (var idx = 0; idx < definition.files.length; ++idx) {
  6616. if (!(itemIdxArray.indexOf(idx) !== -1)) {
  6617. newDefinition.meta.content.push(definition.meta.content[idx]);
  6618. newDefinition.files.push(definition.files[idx]);
  6619. var newIdx = newDefinition.files.length - 1;
  6620. if (selectedIndices.indexOf(idx) !== -1) {
  6621. newSelectedIndices.push(newIdx);
  6622. }
  6623. if (searchMatches && searchMatches.indexOf(idx) !== -1) {
  6624. newSearchMatches.push(newIdx);
  6625. }
  6626. } else {
  6627. deletedCount += 1;
  6628. }
  6629. }
  6630. if (deletedCount > 0) {
  6631. var toastInfo = deletedCount === 1 ? _StringResources2.default.get('schematicsSingleDeletionSuccessed') : _StringResources2.default.get('schematicsMultipleDeletionSuccessed', { count: deletedCount });
  6632. onChange({
  6633. selectedIndices: newSelectedIndices,
  6634. searchMatches: newSearchMatches,
  6635. definition: newDefinition,
  6636. toastMsg: {
  6637. type: _ToastEnum2.default.SUCCESS,
  6638. info: toastInfo
  6639. }
  6640. });
  6641. }
  6642. }
  6643. };
  6644. _this._replaceAddSVGFiles = function (applyToAll) {
  6645. var newSvgFiles = _this._cloneJsonObject(_this.props.svgFiles);
  6646. _this._updateSVGFiles(newSvgFiles.sourceNames, newSvgFiles.blobUrls, 'replace', applyToAll);
  6647. };
  6648. _this._cancelAddSVGFiles = function (applyToAll) {
  6649. var newSvgFiles = _this._cloneJsonObject(_this.props.svgFiles);
  6650. _this._updateSVGFiles(newSvgFiles.sourceNames, newSvgFiles.blobUrls, 'cancel', applyToAll);
  6651. };
  6652. return _this;
  6653. }
  6654. // update the state when a property value is changed
  6655. // add button parameters: action, applyToAll
  6656. // contextMenu replace parameters: replaceIdx
  6657. //
  6658. // Main render function
  6659. //
  6660. ContentPanel.prototype.render = function render() {
  6661. var _this2 = this;
  6662. var _props = this.props,
  6663. selectedIndices = _props.selectedIndices,
  6664. searchMatches = _props.searchMatches,
  6665. definition = _props.definition,
  6666. onChange = _props.onChange,
  6667. search = _props.search,
  6668. zipMaxSize = _props.zipMaxSize,
  6669. imgMaxSize = _props.imgMaxSize,
  6670. svgFiles = _props.svgFiles;
  6671. var searchTitle = _StringResources2.default.get('searchSchematic');
  6672. // calculate the values which drive the detail panel. Have to take into account the searchMatches - which
  6673. // reduces the set of items to see
  6674. var filteredItems = !searchMatches ? selectedIndices : selectedIndices.filter(function (value) {
  6675. return searchMatches.indexOf(value) !== -1;
  6676. });
  6677. var selectedCount = filteredItems.length;
  6678. var selectedItem = selectedCount === 1 ? definition.meta.content[filteredItems[0]] : {};
  6679. var selectedFileRef = selectedCount === 1 ? definition.files[filteredItems[0]] : '';
  6680. var selectedIndex = selectedCount === 1 ? filteredItems[0] : -1;
  6681. return _react2.default.createElement(
  6682. 'div',
  6683. null,
  6684. _react2.default.createElement(_caUiToolkit.VSpacer, { size: 4 }),
  6685. _react2.default.createElement(
  6686. _caUiToolkit.FlexLayout,
  6687. {
  6688. direction: 'row',
  6689. justifyContent: 'space-between',
  6690. alignItems: 'center',
  6691. style: { width: '100%', height: '82px' }
  6692. },
  6693. _react2.default.createElement(
  6694. _caUiToolkit.FlexItem,
  6695. { grow: true },
  6696. _react2.default.createElement(_caUiToolkit.SearchInput, {
  6697. tabIndex: 0,
  6698. placeholder: searchTitle,
  6699. className: 'clsSVGSearch',
  6700. value: search,
  6701. disabled: definition.meta.content.length === 0,
  6702. onChange: this._findSearchMatches,
  6703. onClear: function onClear() {
  6704. return onChange({ search: '', searchMatches: null });
  6705. }
  6706. })
  6707. ),
  6708. selectedCount > 1 && _react2.default.createElement(
  6709. _caUiToolkit.FlexItem,
  6710. null,
  6711. _react2.default.createElement(_caUiToolkit.Button, {
  6712. id: 'idTrash',
  6713. intent: 'primary',
  6714. icon: _delete_2.default.id,
  6715. iconSize: 'small',
  6716. variant: 'icon',
  6717. onClick: function onClick() {
  6718. return _this2._handleDeletions(filteredItems);
  6719. },
  6720. title: _StringResources2.default.get('schematicsContextMenuDelete'),
  6721. tabIndex: 0
  6722. })
  6723. ),
  6724. _react2.default.createElement(
  6725. _caUiToolkit.FlexItem,
  6726. null,
  6727. _react2.default.createElement(_AddSVGFilesButton2.default, {
  6728. ref: function ref(_ref2) {
  6729. _this2.addSvgFilesButtonRef = _ref2;
  6730. },
  6731. successCallback: this._newSvgFiles,
  6732. failCallback: this._toastSchematicsAddFailed,
  6733. zipMaxSize: zipMaxSize,
  6734. imgMaxSize: imgMaxSize
  6735. })
  6736. )
  6737. ),
  6738. _react2.default.createElement(_caUiToolkit.VSpacer, { size: 2 }),
  6739. _react2.default.createElement(
  6740. _caUiToolkit.FlexLayout,
  6741. {
  6742. direction: 'row',
  6743. justifyContent: 'space-between',
  6744. alignItems: 'stretch',
  6745. style: { width: '100%' }
  6746. },
  6747. _react2.default.createElement(
  6748. _caUiToolkit.FlexItem,
  6749. {
  6750. style: { width: '593px' }
  6751. },
  6752. _react2.default.createElement(_VisualItems2.default, {
  6753. items: definition.meta.content,
  6754. files: definition.files,
  6755. selections: selectedIndices,
  6756. searchMatches: searchMatches,
  6757. selectVisualItemCallback: this._toggleSelection,
  6758. deSelectAllCallback: function deSelectAllCallback() {
  6759. onChange({
  6760. selectedIndices: []
  6761. });
  6762. },
  6763. handleVisualItemContextMenuCallback: this._handleVisualItemContextMenu
  6764. })
  6765. ),
  6766. _react2.default.createElement(
  6767. _caUiToolkit.FlexItem,
  6768. null,
  6769. _react2.default.createElement(_caUiToolkit.HSpacer, { size: 1 })
  6770. ),
  6771. _react2.default.createElement(
  6772. _caUiToolkit.FlexItem,
  6773. {
  6774. style: { width: '271px' }
  6775. },
  6776. _react2.default.createElement(_ItemDetail2.default, {
  6777. item: selectedItem,
  6778. fileRef: selectedFileRef,
  6779. index: selectedIndex,
  6780. selectionCount: selectedCount,
  6781. updateItemCallback: this._updateItem
  6782. })
  6783. )
  6784. ),
  6785. !!svgFiles && _react2.default.createElement(_ConfirmReplaceDialog2.default, {
  6786. sourceName: svgFiles ? svgFiles.sourceNames[0] : '',
  6787. isApplyToAll: false,
  6788. okCallback: this._replaceAddSVGFiles,
  6789. cancelCallback: this._cancelAddSVGFiles
  6790. })
  6791. );
  6792. };
  6793. return ContentPanel;
  6794. }(_react.Component);
  6795. ContentPanel.propTypes = {
  6796. definition: _propTypes2.default.object.isRequired,
  6797. svgFiles: _propTypes2.default.object,
  6798. selectedIndices: _propTypes2.default.array.isRequired,
  6799. search: _propTypes2.default.string.isRequired,
  6800. searchMatches: _propTypes2.default.array,
  6801. zipMaxSize: _propTypes2.default.number,
  6802. imgMaxSize: _propTypes2.default.number,
  6803. onChange: _propTypes2.default.func.isRequired
  6804. };
  6805. exports.default = ContentPanel;
  6806. /***/ }),
  6807. /* 53 */
  6808. /***/ (function(module, exports, __webpack_require__) {
  6809. "use strict";
  6810. exports.__esModule = true;
  6811. var _react = __webpack_require__(0);
  6812. var _react2 = _interopRequireDefault(_react);
  6813. var _propTypes = __webpack_require__(2);
  6814. var _propTypes2 = _interopRequireDefault(_propTypes);
  6815. var _StringResources = __webpack_require__(1);
  6816. var _StringResources2 = _interopRequireDefault(_StringResources);
  6817. var _caUiToolkit = __webpack_require__(3);
  6818. var _addFilled_ = __webpack_require__(24);
  6819. var _addFilled_2 = _interopRequireDefault(_addFilled_);
  6820. __webpack_require__(4);
  6821. var _Loader = __webpack_require__(25);
  6822. var _Loader2 = _interopRequireDefault(_Loader);
  6823. function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
  6824. function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
  6825. function _possibleConstructorReturn(self, call) { if (!self) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return call && (typeof call === "object" || typeof call === "function") ? call : self; }
  6826. function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function, not " + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; } /**
  6827. * Licensed Materials - Property of IBM
  6828. * IBM Cognos Products: BI
  6829. * (C) Copyright IBM Corp. 2019
  6830. * US Government Users Restricted Rights - Use, duplication or disclosure restricted by GSA ADP Schedule Contract with IBM Corp.
  6831. */
  6832. var AddSVGFilesButton = function (_Component) {
  6833. _inherits(AddSVGFilesButton, _Component);
  6834. function AddSVGFilesButton(props) {
  6835. _classCallCheck(this, AddSVGFilesButton);
  6836. var _this = _possibleConstructorReturn(this, _Component.call(this, props));
  6837. _this._findSourceName = function (name) {
  6838. return name.split('/').pop();
  6839. };
  6840. _this._onFileChange = function (e) {
  6841. var loader = new _Loader2.default(null, _this.props.zipMaxSize, _this.props.imgMaxSize);
  6842. loader.load(e.target.files, function (_fileList) {
  6843. if (_fileList.length > 0) {
  6844. var sourceNames = [];
  6845. var blobUrls = [];
  6846. var loadBlobPromises = [];
  6847. _fileList.forEach(function (item) {
  6848. sourceNames.push(_this._findSourceName(item));
  6849. blobUrls.push('');
  6850. loadBlobPromises.push(loader.getFileAsBlob(item));
  6851. });
  6852. var urlCreator = window.URL || window.webkitURL;
  6853. Promise.all(loadBlobPromises).then(function (loadedBlobUrls) {
  6854. loadedBlobUrls.forEach(function (item, i) {
  6855. // item is returned as blob - but it won't have a type
  6856. // so we need to slice it to set the type
  6857. var sliceBlob = item.slice(0, item.size, 'image/svg+xml');
  6858. // want to keep the source URL - we need to release it later
  6859. blobUrls[i] = urlCreator.createObjectURL(sliceBlob);
  6860. });
  6861. _this.props.successCallback(sourceNames, blobUrls, _this.replaceIdx);
  6862. }).catch(_this.props.failCallback);
  6863. }
  6864. }, _this.props.failCallback);
  6865. };
  6866. _this.fileInputRef = null;
  6867. _this.replaceIdx = null;
  6868. return _this;
  6869. }
  6870. AddSVGFilesButton.prototype.openFileSelector = function openFileSelector(isMultiple, replaceIdx) {
  6871. this.replaceIdx = replaceIdx;
  6872. if (this.fileInputRef) {
  6873. this.fileInputRef.multiple = isMultiple;
  6874. this.fileInputRef.click();
  6875. }
  6876. };
  6877. // some utility methods - need to find the name of the image - without path
  6878. AddSVGFilesButton.prototype.render = function render() {
  6879. var _this2 = this;
  6880. return _react2.default.createElement(
  6881. 'div',
  6882. null,
  6883. _react2.default.createElement('input', {
  6884. id: 'myInput',
  6885. accept: '.svg',
  6886. multiple: true,
  6887. value: '',
  6888. type: 'file',
  6889. style: { display: 'none' },
  6890. ref: function ref(_ref) {
  6891. _this2.fileInputRef = _ref;
  6892. },
  6893. onChange: this._onFileChange
  6894. }),
  6895. _react2.default.createElement(_caUiToolkit.Button, {
  6896. id: 'idAddSwatch',
  6897. intent: 'primary',
  6898. icon: _addFilled_2.default.id,
  6899. iconSize: 'small',
  6900. variant: 'icon',
  6901. onClick: function onClick() {
  6902. return _this2.openFileSelector(true);
  6903. },
  6904. title: _StringResources2.default.get('addSchematic'),
  6905. tabIndex: 0
  6906. })
  6907. );
  6908. };
  6909. return AddSVGFilesButton;
  6910. }(_react.Component);
  6911. AddSVGFilesButton.propTypes = {
  6912. successCallback: _propTypes2.default.func.isRequired,
  6913. failCallback: _propTypes2.default.func.isRequired,
  6914. zipMaxSize: _propTypes2.default.number.isRequired,
  6915. imgMaxSize: _propTypes2.default.number.isRequired
  6916. };
  6917. exports.default = AddSVGFilesButton;
  6918. /***/ }),
  6919. /* 54 */
  6920. /***/ (function(module, exports, __webpack_require__) {
  6921. /* WEBPACK VAR INJECTION */(function(Buffer, global, setImmediate) {var require;var require;/*!
  6922. JSZip v3.5.0 - A JavaScript class for generating and reading zip files
  6923. <http://stuartk.com/jszip>
  6924. (c) 2009-2016 Stuart Knightley <stuart [at] stuartk.com>
  6925. Dual licenced under the MIT license or GPLv3. See https://raw.github.com/Stuk/jszip/master/LICENSE.markdown.
  6926. JSZip uses the library pako released under the MIT license :
  6927. https://github.com/nodeca/pako/blob/master/LICENSE
  6928. */
  6929. !function(t){if(true)module.exports=t();else if("function"==typeof define&&define.amd)define([],t);else{("undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:this).JSZip=t()}}(function(){return function s(a,o,h){function u(r,t){if(!o[r]){if(!a[r]){var e="function"==typeof require&&require;if(!t&&e)return require(r,!0);if(l)return l(r,!0);var i=new Error("Cannot find module '"+r+"'");throw i.code="MODULE_NOT_FOUND",i}var n=o[r]={exports:{}};a[r][0].call(n.exports,function(t){var e=a[r][1][t];return u(e||t)},n,n.exports,s,a,o,h)}return o[r].exports}for(var l="function"==typeof require&&require,t=0;t<h.length;t++)u(h[t]);return u}({1:[function(t,e,r){"use strict";var c=t("./utils"),d=t("./support"),p="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=";r.encode=function(t){for(var e,r,i,n,s,a,o,h=[],u=0,l=t.length,f=l,d="string"!==c.getTypeOf(t);u<t.length;)f=l-u,i=d?(e=t[u++],r=u<l?t[u++]:0,u<l?t[u++]:0):(e=t.charCodeAt(u++),r=u<l?t.charCodeAt(u++):0,u<l?t.charCodeAt(u++):0),n=e>>2,s=(3&e)<<4|r>>4,a=1<f?(15&r)<<2|i>>6:64,o=2<f?63&i:64,h.push(p.charAt(n)+p.charAt(s)+p.charAt(a)+p.charAt(o));return h.join("")},r.decode=function(t){var e,r,i,n,s,a,o=0,h=0,u="data:";if(t.substr(0,u.length)===u)throw new Error("Invalid base64 input, it looks like a data url.");var l,f=3*(t=t.replace(/[^A-Za-z0-9\+\/\=]/g,"")).length/4;if(t.charAt(t.length-1)===p.charAt(64)&&f--,t.charAt(t.length-2)===p.charAt(64)&&f--,f%1!=0)throw new Error("Invalid base64 input, bad content length.");for(l=d.uint8array?new Uint8Array(0|f):new Array(0|f);o<t.length;)e=p.indexOf(t.charAt(o++))<<2|(n=p.indexOf(t.charAt(o++)))>>4,r=(15&n)<<4|(s=p.indexOf(t.charAt(o++)))>>2,i=(3&s)<<6|(a=p.indexOf(t.charAt(o++))),l[h++]=e,64!==s&&(l[h++]=r),64!==a&&(l[h++]=i);return l}},{"./support":30,"./utils":32}],2:[function(t,e,r){"use strict";var i=t("./external"),n=t("./stream/DataWorker"),s=t("./stream/DataLengthProbe"),a=t("./stream/Crc32Probe");s=t("./stream/DataLengthProbe");function o(t,e,r,i,n){this.compressedSize=t,this.uncompressedSize=e,this.crc32=r,this.compression=i,this.compressedContent=n}o.prototype={getContentWorker:function(){var t=new n(i.Promise.resolve(this.compressedContent)).pipe(this.compression.uncompressWorker()).pipe(new s("data_length")),e=this;return t.on("end",function(){if(this.streamInfo.data_length!==e.uncompressedSize)throw new Error("Bug : uncompressed data size mismatch")}),t},getCompressedWorker:function(){return new n(i.Promise.resolve(this.compressedContent)).withStreamInfo("compressedSize",this.compressedSize).withStreamInfo("uncompressedSize",this.uncompressedSize).withStreamInfo("crc32",this.crc32).withStreamInfo("compression",this.compression)}},o.createWorkerFrom=function(t,e,r){return t.pipe(new a).pipe(new s("uncompressedSize")).pipe(e.compressWorker(r)).pipe(new s("compressedSize")).withStreamInfo("compression",e)},e.exports=o},{"./external":6,"./stream/Crc32Probe":25,"./stream/DataLengthProbe":26,"./stream/DataWorker":27}],3:[function(t,e,r){"use strict";var i=t("./stream/GenericWorker");r.STORE={magic:"\0\0",compressWorker:function(t){return new i("STORE compression")},uncompressWorker:function(){return new i("STORE decompression")}},r.DEFLATE=t("./flate")},{"./flate":7,"./stream/GenericWorker":28}],4:[function(t,e,r){"use strict";var i=t("./utils");var o=function(){for(var t,e=[],r=0;r<256;r++){t=r;for(var i=0;i<8;i++)t=1&t?3988292384^t>>>1:t>>>1;e[r]=t}return e}();e.exports=function(t,e){return void 0!==t&&t.length?"string"!==i.getTypeOf(t)?function(t,e,r,i){var n=o,s=i+r;t^=-1;for(var a=i;a<s;a++)t=t>>>8^n[255&(t^e[a])];return-1^t}(0|e,t,t.length,0):function(t,e,r,i){var n=o,s=i+r;t^=-1;for(var a=i;a<s;a++)t=t>>>8^n[255&(t^e.charCodeAt(a))];return-1^t}(0|e,t,t.length,0):0}},{"./utils":32}],5:[function(t,e,r){"use strict";r.base64=!1,r.binary=!1,r.dir=!1,r.createFolders=!0,r.date=null,r.compression=null,r.compressionOptions=null,r.comment=null,r.unixPermissions=null,r.dosPermissions=null},{}],6:[function(t,e,r){"use strict";var i=null;i="undefined"!=typeof Promise?Promise:t("lie"),e.exports={Promise:i}},{lie:37}],7:[function(t,e,r){"use strict";var i="undefined"!=typeof Uint8Array&&"undefined"!=typeof Uint16Array&&"undefined"!=typeof Uint32Array,n=t("pako"),s=t("./utils"),a=t("./stream/GenericWorker"),o=i?"uint8array":"array";function h(t,e){a.call(this,"FlateWorker/"+t),this._pako=null,this._pakoAction=t,this._pakoOptions=e,this.meta={}}r.magic="\b\0",s.inherits(h,a),h.prototype.processChunk=function(t){this.meta=t.meta,null===this._pako&&this._createPako(),this._pako.push(s.transformTo(o,t.data),!1)},h.prototype.flush=function(){a.prototype.flush.call(this),null===this._pako&&this._createPako(),this._pako.push([],!0)},h.prototype.cleanUp=function(){a.prototype.cleanUp.call(this),this._pako=null},h.prototype._createPako=function(){this._pako=new n[this._pakoAction]({raw:!0,level:this._pakoOptions.level||-1});var e=this;this._pako.onData=function(t){e.push({data:t,meta:e.meta})}},r.compressWorker=function(t){return new h("Deflate",t)},r.uncompressWorker=function(){return new h("Inflate",{})}},{"./stream/GenericWorker":28,"./utils":32,pako:38}],8:[function(t,e,r){"use strict";function A(t,e){var r,i="";for(r=0;r<e;r++)i+=String.fromCharCode(255&t),t>>>=8;return i}function i(t,e,r,i,n,s){var a,o,h=t.file,u=t.compression,l=s!==O.utf8encode,f=I.transformTo("string",s(h.name)),d=I.transformTo("string",O.utf8encode(h.name)),c=h.comment,p=I.transformTo("string",s(c)),m=I.transformTo("string",O.utf8encode(c)),_=d.length!==h.name.length,g=m.length!==c.length,b="",v="",y="",w=h.dir,k=h.date,x={crc32:0,compressedSize:0,uncompressedSize:0};e&&!r||(x.crc32=t.crc32,x.compressedSize=t.compressedSize,x.uncompressedSize=t.uncompressedSize);var S=0;e&&(S|=8),l||!_&&!g||(S|=2048);var z=0,C=0;w&&(z|=16),"UNIX"===n?(C=798,z|=function(t,e){var r=t;return t||(r=e?16893:33204),(65535&r)<<16}(h.unixPermissions,w)):(C=20,z|=function(t){return 63&(t||0)}(h.dosPermissions)),a=k.getUTCHours(),a<<=6,a|=k.getUTCMinutes(),a<<=5,a|=k.getUTCSeconds()/2,o=k.getUTCFullYear()-1980,o<<=4,o|=k.getUTCMonth()+1,o<<=5,o|=k.getUTCDate(),_&&(v=A(1,1)+A(B(f),4)+d,b+="up"+A(v.length,2)+v),g&&(y=A(1,1)+A(B(p),4)+m,b+="uc"+A(y.length,2)+y);var E="";return E+="\n\0",E+=A(S,2),E+=u.magic,E+=A(a,2),E+=A(o,2),E+=A(x.crc32,4),E+=A(x.compressedSize,4),E+=A(x.uncompressedSize,4),E+=A(f.length,2),E+=A(b.length,2),{fileRecord:R.LOCAL_FILE_HEADER+E+f+b,dirRecord:R.CENTRAL_FILE_HEADER+A(C,2)+E+A(p.length,2)+"\0\0\0\0"+A(z,4)+A(i,4)+f+b+p}}var I=t("../utils"),n=t("../stream/GenericWorker"),O=t("../utf8"),B=t("../crc32"),R=t("../signature");function s(t,e,r,i){n.call(this,"ZipFileWorker"),this.bytesWritten=0,this.zipComment=e,this.zipPlatform=r,this.encodeFileName=i,this.streamFiles=t,this.accumulate=!1,this.contentBuffer=[],this.dirRecords=[],this.currentSourceOffset=0,this.entriesCount=0,this.currentFile=null,this._sources=[]}I.inherits(s,n),s.prototype.push=function(t){var e=t.meta.percent||0,r=this.entriesCount,i=this._sources.length;this.accumulate?this.contentBuffer.push(t):(this.bytesWritten+=t.data.length,n.prototype.push.call(this,{data:t.data,meta:{currentFile:this.currentFile,percent:r?(e+100*(r-i-1))/r:100}}))},s.prototype.openedSource=function(t){this.currentSourceOffset=this.bytesWritten,this.currentFile=t.file.name;var e=this.streamFiles&&!t.file.dir;if(e){var r=i(t,e,!1,this.currentSourceOffset,this.zipPlatform,this.encodeFileName);this.push({data:r.fileRecord,meta:{percent:0}})}else this.accumulate=!0},s.prototype.closedSource=function(t){this.accumulate=!1;var e=this.streamFiles&&!t.file.dir,r=i(t,e,!0,this.currentSourceOffset,this.zipPlatform,this.encodeFileName);if(this.dirRecords.push(r.dirRecord),e)this.push({data:function(t){return R.DATA_DESCRIPTOR+A(t.crc32,4)+A(t.compressedSize,4)+A(t.uncompressedSize,4)}(t),meta:{percent:100}});else for(this.push({data:r.fileRecord,meta:{percent:0}});this.contentBuffer.length;)this.push(this.contentBuffer.shift());this.currentFile=null},s.prototype.flush=function(){for(var t=this.bytesWritten,e=0;e<this.dirRecords.length;e++)this.push({data:this.dirRecords[e],meta:{percent:100}});var r=this.bytesWritten-t,i=function(t,e,r,i,n){var s=I.transformTo("string",n(i));return R.CENTRAL_DIRECTORY_END+"\0\0\0\0"+A(t,2)+A(t,2)+A(e,4)+A(r,4)+A(s.length,2)+s}(this.dirRecords.length,r,t,this.zipComment,this.encodeFileName);this.push({data:i,meta:{percent:100}})},s.prototype.prepareNextSource=function(){this.previous=this._sources.shift(),this.openedSource(this.previous.streamInfo),this.isPaused?this.previous.pause():this.previous.resume()},s.prototype.registerPrevious=function(t){this._sources.push(t);var e=this;return t.on("data",function(t){e.processChunk(t)}),t.on("end",function(){e.closedSource(e.previous.streamInfo),e._sources.length?e.prepareNextSource():e.end()}),t.on("error",function(t){e.error(t)}),this},s.prototype.resume=function(){return!!n.prototype.resume.call(this)&&(!this.previous&&this._sources.length?(this.prepareNextSource(),!0):this.previous||this._sources.length||this.generatedError?void 0:(this.end(),!0))},s.prototype.error=function(t){var e=this._sources;if(!n.prototype.error.call(this,t))return!1;for(var r=0;r<e.length;r++)try{e[r].error(t)}catch(t){}return!0},s.prototype.lock=function(){n.prototype.lock.call(this);for(var t=this._sources,e=0;e<t.length;e++)t[e].lock()},e.exports=s},{"../crc32":4,"../signature":23,"../stream/GenericWorker":28,"../utf8":31,"../utils":32}],9:[function(t,e,r){"use strict";var u=t("../compressions"),i=t("./ZipFileWorker");r.generateWorker=function(t,a,e){var o=new i(a.streamFiles,e,a.platform,a.encodeFileName),h=0;try{t.forEach(function(t,e){h++;var r=function(t,e){var r=t||e,i=u[r];if(!i)throw new Error(r+" is not a valid compression method !");return i}(e.options.compression,a.compression),i=e.options.compressionOptions||a.compressionOptions||{},n=e.dir,s=e.date;e._compressWorker(r,i).withStreamInfo("file",{name:t,dir:n,date:s,comment:e.comment||"",unixPermissions:e.unixPermissions,dosPermissions:e.dosPermissions}).pipe(o)}),o.entriesCount=h}catch(t){o.error(t)}return o}},{"../compressions":3,"./ZipFileWorker":8}],10:[function(t,e,r){"use strict";function i(){if(!(this instanceof i))return new i;if(arguments.length)throw new Error("The constructor with parameters has been removed in JSZip 3.0, please check the upgrade guide.");this.files={},this.comment=null,this.root="",this.clone=function(){var t=new i;for(var e in this)"function"!=typeof this[e]&&(t[e]=this[e]);return t}}(i.prototype=t("./object")).loadAsync=t("./load"),i.support=t("./support"),i.defaults=t("./defaults"),i.version="3.5.0",i.loadAsync=function(t,e){return(new i).loadAsync(t,e)},i.external=t("./external"),e.exports=i},{"./defaults":5,"./external":6,"./load":11,"./object":15,"./support":30}],11:[function(t,e,r){"use strict";var i=t("./utils"),n=t("./external"),o=t("./utf8"),h=(i=t("./utils"),t("./zipEntries")),s=t("./stream/Crc32Probe"),u=t("./nodejsUtils");function l(i){return new n.Promise(function(t,e){var r=i.decompressed.getContentWorker().pipe(new s);r.on("error",function(t){e(t)}).on("end",function(){r.streamInfo.crc32!==i.decompressed.crc32?e(new Error("Corrupted zip : CRC32 mismatch")):t()}).resume()})}e.exports=function(t,s){var a=this;return s=i.extend(s||{},{base64:!1,checkCRC32:!1,optimizedBinaryString:!1,createFolders:!1,decodeFileName:o.utf8decode}),u.isNode&&u.isStream(t)?n.Promise.reject(new Error("JSZip can't accept a stream when loading a zip file.")):i.prepareContent("the loaded zip file",t,!0,s.optimizedBinaryString,s.base64).then(function(t){var e=new h(s);return e.load(t),e}).then(function(t){var e=[n.Promise.resolve(t)],r=t.files;if(s.checkCRC32)for(var i=0;i<r.length;i++)e.push(l(r[i]));return n.Promise.all(e)}).then(function(t){for(var e=t.shift(),r=e.files,i=0;i<r.length;i++){var n=r[i];a.file(n.fileNameStr,n.decompressed,{binary:!0,optimizedBinaryString:!0,date:n.date,dir:n.dir,comment:n.fileCommentStr.length?n.fileCommentStr:null,unixPermissions:n.unixPermissions,dosPermissions:n.dosPermissions,createFolders:s.createFolders})}return e.zipComment.length&&(a.comment=e.zipComment),a})}},{"./external":6,"./nodejsUtils":14,"./stream/Crc32Probe":25,"./utf8":31,"./utils":32,"./zipEntries":33}],12:[function(t,e,r){"use strict";var i=t("../utils"),n=t("../stream/GenericWorker");function s(t,e){n.call(this,"Nodejs stream input adapter for "+t),this._upstreamEnded=!1,this._bindStream(e)}i.inherits(s,n),s.prototype._bindStream=function(t){var e=this;(this._stream=t).pause(),t.on("data",function(t){e.push({data:t,meta:{percent:0}})}).on("error",function(t){e.isPaused?this.generatedError=t:e.error(t)}).on("end",function(){e.isPaused?e._upstreamEnded=!0:e.end()})},s.prototype.pause=function(){return!!n.prototype.pause.call(this)&&(this._stream.pause(),!0)},s.prototype.resume=function(){return!!n.prototype.resume.call(this)&&(this._upstreamEnded?this.end():this._stream.resume(),!0)},e.exports=s},{"../stream/GenericWorker":28,"../utils":32}],13:[function(t,e,r){"use strict";var n=t("readable-stream").Readable;function i(t,e,r){n.call(this,e),this._helper=t;var i=this;t.on("data",function(t,e){i.push(t)||i._helper.pause(),r&&r(e)}).on("error",function(t){i.emit("error",t)}).on("end",function(){i.push(null)})}t("../utils").inherits(i,n),i.prototype._read=function(){this._helper.resume()},e.exports=i},{"../utils":32,"readable-stream":16}],14:[function(t,e,r){"use strict";e.exports={isNode:"undefined"!=typeof Buffer,newBufferFrom:function(t,e){if(Buffer.from&&Buffer.from!==Uint8Array.from)return Buffer.from(t,e);if("number"==typeof t)throw new Error('The "data" argument must not be a number');return new Buffer(t,e)},allocBuffer:function(t){if(Buffer.alloc)return Buffer.alloc(t);var e=new Buffer(t);return e.fill(0),e},isBuffer:function(t){return Buffer.isBuffer(t)},isStream:function(t){return t&&"function"==typeof t.on&&"function"==typeof t.pause&&"function"==typeof t.resume}}},{}],15:[function(t,e,r){"use strict";function s(t,e,r){var i,n=u.getTypeOf(e),s=u.extend(r||{},f);s.date=s.date||new Date,null!==s.compression&&(s.compression=s.compression.toUpperCase()),"string"==typeof s.unixPermissions&&(s.unixPermissions=parseInt(s.unixPermissions,8)),s.unixPermissions&&16384&s.unixPermissions&&(s.dir=!0),s.dosPermissions&&16&s.dosPermissions&&(s.dir=!0),s.dir&&(t=g(t)),s.createFolders&&(i=_(t))&&b.call(this,i,!0);var a="string"===n&&!1===s.binary&&!1===s.base64;r&&void 0!==r.binary||(s.binary=!a),(e instanceof d&&0===e.uncompressedSize||s.dir||!e||0===e.length)&&(s.base64=!1,s.binary=!0,e="",s.compression="STORE",n="string");var o=null;o=e instanceof d||e instanceof l?e:p.isNode&&p.isStream(e)?new m(t,e):u.prepareContent(t,e,s.binary,s.optimizedBinaryString,s.base64);var h=new c(t,o,s);this.files[t]=h}var n=t("./utf8"),u=t("./utils"),l=t("./stream/GenericWorker"),a=t("./stream/StreamHelper"),f=t("./defaults"),d=t("./compressedObject"),c=t("./zipObject"),o=t("./generate"),p=t("./nodejsUtils"),m=t("./nodejs/NodejsStreamInputAdapter"),_=function(t){"/"===t.slice(-1)&&(t=t.substring(0,t.length-1));var e=t.lastIndexOf("/");return 0<e?t.substring(0,e):""},g=function(t){return"/"!==t.slice(-1)&&(t+="/"),t},b=function(t,e){return e=void 0!==e?e:f.createFolders,t=g(t),this.files[t]||s.call(this,t,null,{dir:!0,createFolders:e}),this.files[t]};function h(t){return"[object RegExp]"===Object.prototype.toString.call(t)}var i={load:function(){throw new Error("This method has been removed in JSZip 3.0, please check the upgrade guide.")},forEach:function(t){var e,r,i;for(e in this.files)this.files.hasOwnProperty(e)&&(i=this.files[e],(r=e.slice(this.root.length,e.length))&&e.slice(0,this.root.length)===this.root&&t(r,i))},filter:function(r){var i=[];return this.forEach(function(t,e){r(t,e)&&i.push(e)}),i},file:function(t,e,r){if(1!==arguments.length)return t=this.root+t,s.call(this,t,e,r),this;if(h(t)){var i=t;return this.filter(function(t,e){return!e.dir&&i.test(t)})}var n=this.files[this.root+t];return n&&!n.dir?n:null},folder:function(r){if(!r)return this;if(h(r))return this.filter(function(t,e){return e.dir&&r.test(t)});var t=this.root+r,e=b.call(this,t),i=this.clone();return i.root=e.name,i},remove:function(r){r=this.root+r;var t=this.files[r];if(t||("/"!==r.slice(-1)&&(r+="/"),t=this.files[r]),t&&!t.dir)delete this.files[r];else for(var e=this.filter(function(t,e){return e.name.slice(0,r.length)===r}),i=0;i<e.length;i++)delete this.files[e[i].name];return this},generate:function(t){throw new Error("This method has been removed in JSZip 3.0, please check the upgrade guide.")},generateInternalStream:function(t){var e,r={};try{if((r=u.extend(t||{},{streamFiles:!1,compression:"STORE",compressionOptions:null,type:"",platform:"DOS",comment:null,mimeType:"application/zip",encodeFileName:n.utf8encode})).type=r.type.toLowerCase(),r.compression=r.compression.toUpperCase(),"binarystring"===r.type&&(r.type="string"),!r.type)throw new Error("No output type specified.");u.checkSupport(r.type),"darwin"!==r.platform&&"freebsd"!==r.platform&&"linux"!==r.platform&&"sunos"!==r.platform||(r.platform="UNIX"),"win32"===r.platform&&(r.platform="DOS");var i=r.comment||this.comment||"";e=o.generateWorker(this,r,i)}catch(t){(e=new l("error")).error(t)}return new a(e,r.type||"string",r.mimeType)},generateAsync:function(t,e){return this.generateInternalStream(t).accumulate(e)},generateNodeStream:function(t,e){return(t=t||{}).type||(t.type="nodebuffer"),this.generateInternalStream(t).toNodejsStream(e)}};e.exports=i},{"./compressedObject":2,"./defaults":5,"./generate":9,"./nodejs/NodejsStreamInputAdapter":12,"./nodejsUtils":14,"./stream/GenericWorker":28,"./stream/StreamHelper":29,"./utf8":31,"./utils":32,"./zipObject":35}],16:[function(t,e,r){e.exports=t("stream")},{stream:void 0}],17:[function(t,e,r){"use strict";var i=t("./DataReader");function n(t){i.call(this,t);for(var e=0;e<this.data.length;e++)t[e]=255&t[e]}t("../utils").inherits(n,i),n.prototype.byteAt=function(t){return this.data[this.zero+t]},n.prototype.lastIndexOfSignature=function(t){for(var e=t.charCodeAt(0),r=t.charCodeAt(1),i=t.charCodeAt(2),n=t.charCodeAt(3),s=this.length-4;0<=s;--s)if(this.data[s]===e&&this.data[s+1]===r&&this.data[s+2]===i&&this.data[s+3]===n)return s-this.zero;return-1},n.prototype.readAndCheckSignature=function(t){var e=t.charCodeAt(0),r=t.charCodeAt(1),i=t.charCodeAt(2),n=t.charCodeAt(3),s=this.readData(4);return e===s[0]&&r===s[1]&&i===s[2]&&n===s[3]},n.prototype.readData=function(t){if(this.checkOffset(t),0===t)return[];var e=this.data.slice(this.zero+this.index,this.zero+this.index+t);return this.index+=t,e},e.exports=n},{"../utils":32,"./DataReader":18}],18:[function(t,e,r){"use strict";var i=t("../utils");function n(t){this.data=t,this.length=t.length,this.index=0,this.zero=0}n.prototype={checkOffset:function(t){this.checkIndex(this.index+t)},checkIndex:function(t){if(this.length<this.zero+t||t<0)throw new Error("End of data reached (data length = "+this.length+", asked index = "+t+"). Corrupted zip ?")},setIndex:function(t){this.checkIndex(t),this.index=t},skip:function(t){this.setIndex(this.index+t)},byteAt:function(t){},readInt:function(t){var e,r=0;for(this.checkOffset(t),e=this.index+t-1;e>=this.index;e--)r=(r<<8)+this.byteAt(e);return this.index+=t,r},readString:function(t){return i.transformTo("string",this.readData(t))},readData:function(t){},lastIndexOfSignature:function(t){},readAndCheckSignature:function(t){},readDate:function(){var t=this.readInt(4);return new Date(Date.UTC(1980+(t>>25&127),(t>>21&15)-1,t>>16&31,t>>11&31,t>>5&63,(31&t)<<1))}},e.exports=n},{"../utils":32}],19:[function(t,e,r){"use strict";var i=t("./Uint8ArrayReader");function n(t){i.call(this,t)}t("../utils").inherits(n,i),n.prototype.readData=function(t){this.checkOffset(t);var e=this.data.slice(this.zero+this.index,this.zero+this.index+t);return this.index+=t,e},e.exports=n},{"../utils":32,"./Uint8ArrayReader":21}],20:[function(t,e,r){"use strict";var i=t("./DataReader");function n(t){i.call(this,t)}t("../utils").inherits(n,i),n.prototype.byteAt=function(t){return this.data.charCodeAt(this.zero+t)},n.prototype.lastIndexOfSignature=function(t){return this.data.lastIndexOf(t)-this.zero},n.prototype.readAndCheckSignature=function(t){return t===this.readData(4)},n.prototype.readData=function(t){this.checkOffset(t);var e=this.data.slice(this.zero+this.index,this.zero+this.index+t);return this.index+=t,e},e.exports=n},{"../utils":32,"./DataReader":18}],21:[function(t,e,r){"use strict";var i=t("./ArrayReader");function n(t){i.call(this,t)}t("../utils").inherits(n,i),n.prototype.readData=function(t){if(this.checkOffset(t),0===t)return new Uint8Array(0);var e=this.data.subarray(this.zero+this.index,this.zero+this.index+t);return this.index+=t,e},e.exports=n},{"../utils":32,"./ArrayReader":17}],22:[function(t,e,r){"use strict";var i=t("../utils"),n=t("../support"),s=t("./ArrayReader"),a=t("./StringReader"),o=t("./NodeBufferReader"),h=t("./Uint8ArrayReader");e.exports=function(t){var e=i.getTypeOf(t);return i.checkSupport(e),"string"!==e||n.uint8array?"nodebuffer"===e?new o(t):n.uint8array?new h(i.transformTo("uint8array",t)):new s(i.transformTo("array",t)):new a(t)}},{"../support":30,"../utils":32,"./ArrayReader":17,"./NodeBufferReader":19,"./StringReader":20,"./Uint8ArrayReader":21}],23:[function(t,e,r){"use strict";r.LOCAL_FILE_HEADER="PK",r.CENTRAL_FILE_HEADER="PK",r.CENTRAL_DIRECTORY_END="PK",r.ZIP64_CENTRAL_DIRECTORY_LOCATOR="PK",r.ZIP64_CENTRAL_DIRECTORY_END="PK",r.DATA_DESCRIPTOR="PK\b"},{}],24:[function(t,e,r){"use strict";var i=t("./GenericWorker"),n=t("../utils");function s(t){i.call(this,"ConvertWorker to "+t),this.destType=t}n.inherits(s,i),s.prototype.processChunk=function(t){this.push({data:n.transformTo(this.destType,t.data),meta:t.meta})},e.exports=s},{"../utils":32,"./GenericWorker":28}],25:[function(t,e,r){"use strict";var i=t("./GenericWorker"),n=t("../crc32");function s(){i.call(this,"Crc32Probe"),this.withStreamInfo("crc32",0)}t("../utils").inherits(s,i),s.prototype.processChunk=function(t){this.streamInfo.crc32=n(t.data,this.streamInfo.crc32||0),this.push(t)},e.exports=s},{"../crc32":4,"../utils":32,"./GenericWorker":28}],26:[function(t,e,r){"use strict";var i=t("../utils"),n=t("./GenericWorker");function s(t){n.call(this,"DataLengthProbe for "+t),this.propName=t,this.withStreamInfo(t,0)}i.inherits(s,n),s.prototype.processChunk=function(t){if(t){var e=this.streamInfo[this.propName]||0;this.streamInfo[this.propName]=e+t.data.length}n.prototype.processChunk.call(this,t)},e.exports=s},{"../utils":32,"./GenericWorker":28}],27:[function(t,e,r){"use strict";var i=t("../utils"),n=t("./GenericWorker");function s(t){n.call(this,"DataWorker");var e=this;this.dataIsReady=!1,this.index=0,this.max=0,this.data=null,this.type="",this._tickScheduled=!1,t.then(function(t){e.dataIsReady=!0,e.data=t,e.max=t&&t.length||0,e.type=i.getTypeOf(t),e.isPaused||e._tickAndRepeat()},function(t){e.error(t)})}i.inherits(s,n),s.prototype.cleanUp=function(){n.prototype.cleanUp.call(this),this.data=null},s.prototype.resume=function(){return!!n.prototype.resume.call(this)&&(!this._tickScheduled&&this.dataIsReady&&(this._tickScheduled=!0,i.delay(this._tickAndRepeat,[],this)),!0)},s.prototype._tickAndRepeat=function(){this._tickScheduled=!1,this.isPaused||this.isFinished||(this._tick(),this.isFinished||(i.delay(this._tickAndRepeat,[],this),this._tickScheduled=!0))},s.prototype._tick=function(){if(this.isPaused||this.isFinished)return!1;var t=null,e=Math.min(this.max,this.index+16384);if(this.index>=this.max)return this.end();switch(this.type){case"string":t=this.data.substring(this.index,e);break;case"uint8array":t=this.data.subarray(this.index,e);break;case"array":case"nodebuffer":t=this.data.slice(this.index,e)}return this.index=e,this.push({data:t,meta:{percent:this.max?this.index/this.max*100:0}})},e.exports=s},{"../utils":32,"./GenericWorker":28}],28:[function(t,e,r){"use strict";function i(t){this.name=t||"default",this.streamInfo={},this.generatedError=null,this.extraStreamInfo={},this.isPaused=!0,this.isFinished=!1,this.isLocked=!1,this._listeners={data:[],end:[],error:[]},this.previous=null}i.prototype={push:function(t){this.emit("data",t)},end:function(){if(this.isFinished)return!1;this.flush();try{this.emit("end"),this.cleanUp(),this.isFinished=!0}catch(t){this.emit("error",t)}return!0},error:function(t){return!this.isFinished&&(this.isPaused?this.generatedError=t:(this.isFinished=!0,this.emit("error",t),this.previous&&this.previous.error(t),this.cleanUp()),!0)},on:function(t,e){return this._listeners[t].push(e),this},cleanUp:function(){this.streamInfo=this.generatedError=this.extraStreamInfo=null,this._listeners=[]},emit:function(t,e){if(this._listeners[t])for(var r=0;r<this._listeners[t].length;r++)this._listeners[t][r].call(this,e)},pipe:function(t){return t.registerPrevious(this)},registerPrevious:function(t){if(this.isLocked)throw new Error("The stream '"+this+"' has already been used.");this.streamInfo=t.streamInfo,this.mergeStreamInfo(),this.previous=t;var e=this;return t.on("data",function(t){e.processChunk(t)}),t.on("end",function(){e.end()}),t.on("error",function(t){e.error(t)}),this},pause:function(){return!this.isPaused&&!this.isFinished&&(this.isPaused=!0,this.previous&&this.previous.pause(),!0)},resume:function(){if(!this.isPaused||this.isFinished)return!1;var t=this.isPaused=!1;return this.generatedError&&(this.error(this.generatedError),t=!0),this.previous&&this.previous.resume(),!t},flush:function(){},processChunk:function(t){this.push(t)},withStreamInfo:function(t,e){return this.extraStreamInfo[t]=e,this.mergeStreamInfo(),this},mergeStreamInfo:function(){for(var t in this.extraStreamInfo)this.extraStreamInfo.hasOwnProperty(t)&&(this.streamInfo[t]=this.extraStreamInfo[t])},lock:function(){if(this.isLocked)throw new Error("The stream '"+this+"' has already been used.");this.isLocked=!0,this.previous&&this.previous.lock()},toString:function(){var t="Worker "+this.name;return this.previous?this.previous+" -> "+t:t}},e.exports=i},{}],29:[function(t,e,r){"use strict";var h=t("../utils"),n=t("./ConvertWorker"),s=t("./GenericWorker"),u=t("../base64"),i=t("../support"),a=t("../external"),o=null;if(i.nodestream)try{o=t("../nodejs/NodejsStreamOutputAdapter")}catch(t){}function l(t,o){return new a.Promise(function(e,r){var i=[],n=t._internalType,s=t._outputType,a=t._mimeType;t.on("data",function(t,e){i.push(t),o&&o(e)}).on("error",function(t){i=[],r(t)}).on("end",function(){try{var t=function(t,e,r){switch(t){case"blob":return h.newBlob(h.transformTo("arraybuffer",e),r);case"base64":return u.encode(e);default:return h.transformTo(t,e)}}(s,function(t,e){var r,i=0,n=null,s=0;for(r=0;r<e.length;r++)s+=e[r].length;switch(t){case"string":return e.join("");case"array":return Array.prototype.concat.apply([],e);case"uint8array":for(n=new Uint8Array(s),r=0;r<e.length;r++)n.set(e[r],i),i+=e[r].length;return n;case"nodebuffer":return Buffer.concat(e);default:throw new Error("concat : unsupported type '"+t+"'")}}(n,i),a);e(t)}catch(t){r(t)}i=[]}).resume()})}function f(t,e,r){var i=e;switch(e){case"blob":case"arraybuffer":i="uint8array";break;case"base64":i="string"}try{this._internalType=i,this._outputType=e,this._mimeType=r,h.checkSupport(i),this._worker=t.pipe(new n(i)),t.lock()}catch(t){this._worker=new s("error"),this._worker.error(t)}}f.prototype={accumulate:function(t){return l(this,t)},on:function(t,e){var r=this;return"data"===t?this._worker.on(t,function(t){e.call(r,t.data,t.meta)}):this._worker.on(t,function(){h.delay(e,arguments,r)}),this},resume:function(){return h.delay(this._worker.resume,[],this._worker),this},pause:function(){return this._worker.pause(),this},toNodejsStream:function(t){if(h.checkSupport("nodestream"),"nodebuffer"!==this._outputType)throw new Error(this._outputType+" is not supported by this method");return new o(this,{objectMode:"nodebuffer"!==this._outputType},t)}},e.exports=f},{"../base64":1,"../external":6,"../nodejs/NodejsStreamOutputAdapter":13,"../support":30,"../utils":32,"./ConvertWorker":24,"./GenericWorker":28}],30:[function(t,e,r){"use strict";if(r.base64=!0,r.array=!0,r.string=!0,r.arraybuffer="undefined"!=typeof ArrayBuffer&&"undefined"!=typeof Uint8Array,r.nodebuffer="undefined"!=typeof Buffer,r.uint8array="undefined"!=typeof Uint8Array,"undefined"==typeof ArrayBuffer)r.blob=!1;else{var i=new ArrayBuffer(0);try{r.blob=0===new Blob([i],{type:"application/zip"}).size}catch(t){try{var n=new(self.BlobBuilder||self.WebKitBlobBuilder||self.MozBlobBuilder||self.MSBlobBuilder);n.append(i),r.blob=0===n.getBlob("application/zip").size}catch(t){r.blob=!1}}}try{r.nodestream=!!t("readable-stream").Readable}catch(t){r.nodestream=!1}},{"readable-stream":16}],31:[function(t,e,s){"use strict";for(var o=t("./utils"),h=t("./support"),r=t("./nodejsUtils"),i=t("./stream/GenericWorker"),u=new Array(256),n=0;n<256;n++)u[n]=252<=n?6:248<=n?5:240<=n?4:224<=n?3:192<=n?2:1;u[254]=u[254]=1;function a(){i.call(this,"utf-8 decode"),this.leftOver=null}function l(){i.call(this,"utf-8 encode")}s.utf8encode=function(t){return h.nodebuffer?r.newBufferFrom(t,"utf-8"):function(t){var e,r,i,n,s,a=t.length,o=0;for(n=0;n<a;n++)55296==(64512&(r=t.charCodeAt(n)))&&n+1<a&&56320==(64512&(i=t.charCodeAt(n+1)))&&(r=65536+(r-55296<<10)+(i-56320),n++),o+=r<128?1:r<2048?2:r<65536?3:4;for(e=h.uint8array?new Uint8Array(o):new Array(o),n=s=0;s<o;n++)55296==(64512&(r=t.charCodeAt(n)))&&n+1<a&&56320==(64512&(i=t.charCodeAt(n+1)))&&(r=65536+(r-55296<<10)+(i-56320),n++),r<128?e[s++]=r:(r<2048?e[s++]=192|r>>>6:(r<65536?e[s++]=224|r>>>12:(e[s++]=240|r>>>18,e[s++]=128|r>>>12&63),e[s++]=128|r>>>6&63),e[s++]=128|63&r);return e}(t)},s.utf8decode=function(t){return h.nodebuffer?o.transformTo("nodebuffer",t).toString("utf-8"):function(t){var e,r,i,n,s=t.length,a=new Array(2*s);for(e=r=0;e<s;)if((i=t[e++])<128)a[r++]=i;else if(4<(n=u[i]))a[r++]=65533,e+=n-1;else{for(i&=2===n?31:3===n?15:7;1<n&&e<s;)i=i<<6|63&t[e++],n--;1<n?a[r++]=65533:i<65536?a[r++]=i:(i-=65536,a[r++]=55296|i>>10&1023,a[r++]=56320|1023&i)}return a.length!==r&&(a.subarray?a=a.subarray(0,r):a.length=r),o.applyFromCharCode(a)}(t=o.transformTo(h.uint8array?"uint8array":"array",t))},o.inherits(a,i),a.prototype.processChunk=function(t){var e=o.transformTo(h.uint8array?"uint8array":"array",t.data);if(this.leftOver&&this.leftOver.length){if(h.uint8array){var r=e;(e=new Uint8Array(r.length+this.leftOver.length)).set(this.leftOver,0),e.set(r,this.leftOver.length)}else e=this.leftOver.concat(e);this.leftOver=null}var i=function(t,e){var r;for((e=e||t.length)>t.length&&(e=t.length),r=e-1;0<=r&&128==(192&t[r]);)r--;return r<0?e:0===r?e:r+u[t[r]]>e?r:e}(e),n=e;i!==e.length&&(h.uint8array?(n=e.subarray(0,i),this.leftOver=e.subarray(i,e.length)):(n=e.slice(0,i),this.leftOver=e.slice(i,e.length))),this.push({data:s.utf8decode(n),meta:t.meta})},a.prototype.flush=function(){this.leftOver&&this.leftOver.length&&(this.push({data:s.utf8decode(this.leftOver),meta:{}}),this.leftOver=null)},s.Utf8DecodeWorker=a,o.inherits(l,i),l.prototype.processChunk=function(t){this.push({data:s.utf8encode(t.data),meta:t.meta})},s.Utf8EncodeWorker=l},{"./nodejsUtils":14,"./stream/GenericWorker":28,"./support":30,"./utils":32}],32:[function(t,e,a){"use strict";var o=t("./support"),h=t("./base64"),r=t("./nodejsUtils"),i=t("set-immediate-shim"),u=t("./external");function n(t){return t}function l(t,e){for(var r=0;r<t.length;++r)e[r]=255&t.charCodeAt(r);return e}a.newBlob=function(e,r){a.checkSupport("blob");try{return new Blob([e],{type:r})}catch(t){try{var i=new(self.BlobBuilder||self.WebKitBlobBuilder||self.MozBlobBuilder||self.MSBlobBuilder);return i.append(e),i.getBlob(r)}catch(t){throw new Error("Bug : can't construct the Blob.")}}};var s={stringifyByChunk:function(t,e,r){var i=[],n=0,s=t.length;if(s<=r)return String.fromCharCode.apply(null,t);for(;n<s;)"array"===e||"nodebuffer"===e?i.push(String.fromCharCode.apply(null,t.slice(n,Math.min(n+r,s)))):i.push(String.fromCharCode.apply(null,t.subarray(n,Math.min(n+r,s)))),n+=r;return i.join("")},stringifyByChar:function(t){for(var e="",r=0;r<t.length;r++)e+=String.fromCharCode(t[r]);return e},applyCanBeUsed:{uint8array:function(){try{return o.uint8array&&1===String.fromCharCode.apply(null,new Uint8Array(1)).length}catch(t){return!1}}(),nodebuffer:function(){try{return o.nodebuffer&&1===String.fromCharCode.apply(null,r.allocBuffer(1)).length}catch(t){return!1}}()}};function f(t){var e=65536,r=a.getTypeOf(t),i=!0;if("uint8array"===r?i=s.applyCanBeUsed.uint8array:"nodebuffer"===r&&(i=s.applyCanBeUsed.nodebuffer),i)for(;1<e;)try{return s.stringifyByChunk(t,r,e)}catch(t){e=Math.floor(e/2)}return s.stringifyByChar(t)}function d(t,e){for(var r=0;r<t.length;r++)e[r]=t[r];return e}a.applyFromCharCode=f;var c={};c.string={string:n,array:function(t){return l(t,new Array(t.length))},arraybuffer:function(t){return c.string.uint8array(t).buffer},uint8array:function(t){return l(t,new Uint8Array(t.length))},nodebuffer:function(t){return l(t,r.allocBuffer(t.length))}},c.array={string:f,array:n,arraybuffer:function(t){return new Uint8Array(t).buffer},uint8array:function(t){return new Uint8Array(t)},nodebuffer:function(t){return r.newBufferFrom(t)}},c.arraybuffer={string:function(t){return f(new Uint8Array(t))},array:function(t){return d(new Uint8Array(t),new Array(t.byteLength))},arraybuffer:n,uint8array:function(t){return new Uint8Array(t)},nodebuffer:function(t){return r.newBufferFrom(new Uint8Array(t))}},c.uint8array={string:f,array:function(t){return d(t,new Array(t.length))},arraybuffer:function(t){return t.buffer},uint8array:n,nodebuffer:function(t){return r.newBufferFrom(t)}},c.nodebuffer={string:f,array:function(t){return d(t,new Array(t.length))},arraybuffer:function(t){return c.nodebuffer.uint8array(t).buffer},uint8array:function(t){return d(t,new Uint8Array(t.length))},nodebuffer:n},a.transformTo=function(t,e){if(e=e||"",!t)return e;a.checkSupport(t);var r=a.getTypeOf(e);return c[r][t](e)},a.getTypeOf=function(t){return"string"==typeof t?"string":"[object Array]"===Object.prototype.toString.call(t)?"array":o.nodebuffer&&r.isBuffer(t)?"nodebuffer":o.uint8array&&t instanceof Uint8Array?"uint8array":o.arraybuffer&&t instanceof ArrayBuffer?"arraybuffer":void 0},a.checkSupport=function(t){if(!o[t.toLowerCase()])throw new Error(t+" is not supported by this platform")},a.MAX_VALUE_16BITS=65535,a.MAX_VALUE_32BITS=-1,a.pretty=function(t){var e,r,i="";for(r=0;r<(t||"").length;r++)i+="\\x"+((e=t.charCodeAt(r))<16?"0":"")+e.toString(16).toUpperCase();return i},a.delay=function(t,e,r){i(function(){t.apply(r||null,e||[])})},a.inherits=function(t,e){function r(){}r.prototype=e.prototype,t.prototype=new r},a.extend=function(){var t,e,r={};for(t=0;t<arguments.length;t++)for(e in arguments[t])arguments[t].hasOwnProperty(e)&&void 0===r[e]&&(r[e]=arguments[t][e]);return r},a.prepareContent=function(r,t,i,n,s){return u.Promise.resolve(t).then(function(i){return o.blob&&(i instanceof Blob||-1!==["[object File]","[object Blob]"].indexOf(Object.prototype.toString.call(i)))&&"undefined"!=typeof FileReader?new u.Promise(function(e,r){var t=new FileReader;t.onload=function(t){e(t.target.result)},t.onerror=function(t){r(t.target.error)},t.readAsArrayBuffer(i)}):i}).then(function(t){var e=a.getTypeOf(t);return e?("arraybuffer"===e?t=a.transformTo("uint8array",t):"string"===e&&(s?t=h.decode(t):i&&!0!==n&&(t=function(t){return l(t,o.uint8array?new Uint8Array(t.length):new Array(t.length))}(t))),t):u.Promise.reject(new Error("Can't read the data of '"+r+"'. Is it in a supported JavaScript type (String, Blob, ArrayBuffer, etc) ?"))})}},{"./base64":1,"./external":6,"./nodejsUtils":14,"./support":30,"set-immediate-shim":54}],33:[function(t,e,r){"use strict";var i=t("./reader/readerFor"),n=t("./utils"),s=t("./signature"),a=t("./zipEntry"),o=(t("./utf8"),t("./support"));function h(t){this.files=[],this.loadOptions=t}h.prototype={checkSignature:function(t){if(!this.reader.readAndCheckSignature(t)){this.reader.index-=4;var e=this.reader.readString(4);throw new Error("Corrupted zip or bug: unexpected signature ("+n.pretty(e)+", expected "+n.pretty(t)+")")}},isSignature:function(t,e){var r=this.reader.index;this.reader.setIndex(t);var i=this.reader.readString(4)===e;return this.reader.setIndex(r),i},readBlockEndOfCentral:function(){this.diskNumber=this.reader.readInt(2),this.diskWithCentralDirStart=this.reader.readInt(2),this.centralDirRecordsOnThisDisk=this.reader.readInt(2),this.centralDirRecords=this.reader.readInt(2),this.centralDirSize=this.reader.readInt(4),this.centralDirOffset=this.reader.readInt(4),this.zipCommentLength=this.reader.readInt(2);var t=this.reader.readData(this.zipCommentLength),e=o.uint8array?"uint8array":"array",r=n.transformTo(e,t);this.zipComment=this.loadOptions.decodeFileName(r)},readBlockZip64EndOfCentral:function(){this.zip64EndOfCentralSize=this.reader.readInt(8),this.reader.skip(4),this.diskNumber=this.reader.readInt(4),this.diskWithCentralDirStart=this.reader.readInt(4),this.centralDirRecordsOnThisDisk=this.reader.readInt(8),this.centralDirRecords=this.reader.readInt(8),this.centralDirSize=this.reader.readInt(8),this.centralDirOffset=this.reader.readInt(8),this.zip64ExtensibleData={};for(var t,e,r,i=this.zip64EndOfCentralSize-44;0<i;)t=this.reader.readInt(2),e=this.reader.readInt(4),r=this.reader.readData(e),this.zip64ExtensibleData[t]={id:t,length:e,value:r}},readBlockZip64EndOfCentralLocator:function(){if(this.diskWithZip64CentralDirStart=this.reader.readInt(4),this.relativeOffsetEndOfZip64CentralDir=this.reader.readInt(8),this.disksCount=this.reader.readInt(4),1<this.disksCount)throw new Error("Multi-volumes zip are not supported")},readLocalFiles:function(){var t,e;for(t=0;t<this.files.length;t++)e=this.files[t],this.reader.setIndex(e.localHeaderOffset),this.checkSignature(s.LOCAL_FILE_HEADER),e.readLocalPart(this.reader),e.handleUTF8(),e.processAttributes()},readCentralDir:function(){var t;for(this.reader.setIndex(this.centralDirOffset);this.reader.readAndCheckSignature(s.CENTRAL_FILE_HEADER);)(t=new a({zip64:this.zip64},this.loadOptions)).readCentralPart(this.reader),this.files.push(t);if(this.centralDirRecords!==this.files.length&&0!==this.centralDirRecords&&0===this.files.length)throw new Error("Corrupted zip or bug: expected "+this.centralDirRecords+" records in central dir, got "+this.files.length)},readEndOfCentral:function(){var t=this.reader.lastIndexOfSignature(s.CENTRAL_DIRECTORY_END);if(t<0)throw!this.isSignature(0,s.LOCAL_FILE_HEADER)?new Error("Can't find end of central directory : is this a zip file ? If it is, see https://stuk.github.io/jszip/documentation/howto/read_zip.html"):new Error("Corrupted zip: can't find end of central directory");this.reader.setIndex(t);var e=t;if(this.checkSignature(s.CENTRAL_DIRECTORY_END),this.readBlockEndOfCentral(),this.diskNumber===n.MAX_VALUE_16BITS||this.diskWithCentralDirStart===n.MAX_VALUE_16BITS||this.centralDirRecordsOnThisDisk===n.MAX_VALUE_16BITS||this.centralDirRecords===n.MAX_VALUE_16BITS||this.centralDirSize===n.MAX_VALUE_32BITS||this.centralDirOffset===n.MAX_VALUE_32BITS){if(this.zip64=!0,(t=this.reader.lastIndexOfSignature(s.ZIP64_CENTRAL_DIRECTORY_LOCATOR))<0)throw new Error("Corrupted zip: can't find the ZIP64 end of central directory locator");if(this.reader.setIndex(t),this.checkSignature(s.ZIP64_CENTRAL_DIRECTORY_LOCATOR),this.readBlockZip64EndOfCentralLocator(),!this.isSignature(this.relativeOffsetEndOfZip64CentralDir,s.ZIP64_CENTRAL_DIRECTORY_END)&&(this.relativeOffsetEndOfZip64CentralDir=this.reader.lastIndexOfSignature(s.ZIP64_CENTRAL_DIRECTORY_END),this.relativeOffsetEndOfZip64CentralDir<0))throw new Error("Corrupted zip: can't find the ZIP64 end of central directory");this.reader.setIndex(this.relativeOffsetEndOfZip64CentralDir),this.checkSignature(s.ZIP64_CENTRAL_DIRECTORY_END),this.readBlockZip64EndOfCentral()}var r=this.centralDirOffset+this.centralDirSize;this.zip64&&(r+=20,r+=12+this.zip64EndOfCentralSize);var i=e-r;if(0<i)this.isSignature(e,s.CENTRAL_FILE_HEADER)||(this.reader.zero=i);else if(i<0)throw new Error("Corrupted zip: missing "+Math.abs(i)+" bytes.")},prepareReader:function(t){this.reader=i(t)},load:function(t){this.prepareReader(t),this.readEndOfCentral(),this.readCentralDir(),this.readLocalFiles()}},e.exports=h},{"./reader/readerFor":22,"./signature":23,"./support":30,"./utf8":31,"./utils":32,"./zipEntry":34}],34:[function(t,e,r){"use strict";var i=t("./reader/readerFor"),s=t("./utils"),n=t("./compressedObject"),a=t("./crc32"),o=t("./utf8"),h=t("./compressions"),u=t("./support");function l(t,e){this.options=t,this.loadOptions=e}l.prototype={isEncrypted:function(){return 1==(1&this.bitFlag)},useUTF8:function(){return 2048==(2048&this.bitFlag)},readLocalPart:function(t){var e,r;if(t.skip(22),this.fileNameLength=t.readInt(2),r=t.readInt(2),this.fileName=t.readData(this.fileNameLength),t.skip(r),-1===this.compressedSize||-1===this.uncompressedSize)throw new Error("Bug or corrupted zip : didn't get enough information from the central directory (compressedSize === -1 || uncompressedSize === -1)");if(null===(e=function(t){for(var e in h)if(h.hasOwnProperty(e)&&h[e].magic===t)return h[e];return null}(this.compressionMethod)))throw new Error("Corrupted zip : compression "+s.pretty(this.compressionMethod)+" unknown (inner file : "+s.transformTo("string",this.fileName)+")");this.decompressed=new n(this.compressedSize,this.uncompressedSize,this.crc32,e,t.readData(this.compressedSize))},readCentralPart:function(t){this.versionMadeBy=t.readInt(2),t.skip(2),this.bitFlag=t.readInt(2),this.compressionMethod=t.readString(2),this.date=t.readDate(),this.crc32=t.readInt(4),this.compressedSize=t.readInt(4),this.uncompressedSize=t.readInt(4);var e=t.readInt(2);if(this.extraFieldsLength=t.readInt(2),this.fileCommentLength=t.readInt(2),this.diskNumberStart=t.readInt(2),this.internalFileAttributes=t.readInt(2),this.externalFileAttributes=t.readInt(4),this.localHeaderOffset=t.readInt(4),this.isEncrypted())throw new Error("Encrypted zip are not supported");t.skip(e),this.readExtraFields(t),this.parseZIP64ExtraField(t),this.fileComment=t.readData(this.fileCommentLength)},processAttributes:function(){this.unixPermissions=null,this.dosPermissions=null;var t=this.versionMadeBy>>8;this.dir=!!(16&this.externalFileAttributes),0==t&&(this.dosPermissions=63&this.externalFileAttributes),3==t&&(this.unixPermissions=this.externalFileAttributes>>16&65535),this.dir||"/"!==this.fileNameStr.slice(-1)||(this.dir=!0)},parseZIP64ExtraField:function(t){if(this.extraFields[1]){var e=i(this.extraFields[1].value);this.uncompressedSize===s.MAX_VALUE_32BITS&&(this.uncompressedSize=e.readInt(8)),this.compressedSize===s.MAX_VALUE_32BITS&&(this.compressedSize=e.readInt(8)),this.localHeaderOffset===s.MAX_VALUE_32BITS&&(this.localHeaderOffset=e.readInt(8)),this.diskNumberStart===s.MAX_VALUE_32BITS&&(this.diskNumberStart=e.readInt(4))}},readExtraFields:function(t){var e,r,i,n=t.index+this.extraFieldsLength;for(this.extraFields||(this.extraFields={});t.index+4<n;)e=t.readInt(2),r=t.readInt(2),i=t.readData(r),this.extraFields[e]={id:e,length:r,value:i};t.setIndex(n)},handleUTF8:function(){var t=u.uint8array?"uint8array":"array";if(this.useUTF8())this.fileNameStr=o.utf8decode(this.fileName),this.fileCommentStr=o.utf8decode(this.fileComment);else{var e=this.findExtraFieldUnicodePath();if(null!==e)this.fileNameStr=e;else{var r=s.transformTo(t,this.fileName);this.fileNameStr=this.loadOptions.decodeFileName(r)}var i=this.findExtraFieldUnicodeComment();if(null!==i)this.fileCommentStr=i;else{var n=s.transformTo(t,this.fileComment);this.fileCommentStr=this.loadOptions.decodeFileName(n)}}},findExtraFieldUnicodePath:function(){var t=this.extraFields[28789];if(t){var e=i(t.value);return 1!==e.readInt(1)?null:a(this.fileName)!==e.readInt(4)?null:o.utf8decode(e.readData(t.length-5))}return null},findExtraFieldUnicodeComment:function(){var t=this.extraFields[25461];if(t){var e=i(t.value);return 1!==e.readInt(1)?null:a(this.fileComment)!==e.readInt(4)?null:o.utf8decode(e.readData(t.length-5))}return null}},e.exports=l},{"./compressedObject":2,"./compressions":3,"./crc32":4,"./reader/readerFor":22,"./support":30,"./utf8":31,"./utils":32}],35:[function(t,e,r){"use strict";function i(t,e,r){this.name=t,this.dir=r.dir,this.date=r.date,this.comment=r.comment,this.unixPermissions=r.unixPermissions,this.dosPermissions=r.dosPermissions,this._data=e,this._dataBinary=r.binary,this.options={compression:r.compression,compressionOptions:r.compressionOptions}}var s=t("./stream/StreamHelper"),n=t("./stream/DataWorker"),a=t("./utf8"),o=t("./compressedObject"),h=t("./stream/GenericWorker");i.prototype={internalStream:function(t){var e=null,r="string";try{if(!t)throw new Error("No output type specified.");var i="string"===(r=t.toLowerCase())||"text"===r;"binarystring"!==r&&"text"!==r||(r="string"),e=this._decompressWorker();var n=!this._dataBinary;n&&!i&&(e=e.pipe(new a.Utf8EncodeWorker)),!n&&i&&(e=e.pipe(new a.Utf8DecodeWorker))}catch(t){(e=new h("error")).error(t)}return new s(e,r,"")},async:function(t,e){return this.internalStream(t).accumulate(e)},nodeStream:function(t,e){return this.internalStream(t||"nodebuffer").toNodejsStream(e)},_compressWorker:function(t,e){if(this._data instanceof o&&this._data.compression.magic===t.magic)return this._data.getCompressedWorker();var r=this._decompressWorker();return this._dataBinary||(r=r.pipe(new a.Utf8EncodeWorker)),o.createWorkerFrom(r,t,e)},_decompressWorker:function(){return this._data instanceof o?this._data.getContentWorker():this._data instanceof h?this._data:new n(this._data)}};for(var u=["asText","asBinary","asNodeBuffer","asUint8Array","asArrayBuffer"],l=function(){throw new Error("This method has been removed in JSZip 3.0, please check the upgrade guide.")},f=0;f<u.length;f++)i.prototype[u[f]]=l;e.exports=i},{"./compressedObject":2,"./stream/DataWorker":27,"./stream/GenericWorker":28,"./stream/StreamHelper":29,"./utf8":31}],36:[function(t,l,e){(function(e){"use strict";var r,i,t=e.MutationObserver||e.WebKitMutationObserver;if(t){var n=0,s=new t(u),a=e.document.createTextNode("");s.observe(a,{characterData:!0}),r=function(){a.data=n=++n%2}}else if(e.setImmediate||void 0===e.MessageChannel)r="document"in e&&"onreadystatechange"in e.document.createElement("script")?function(){var t=e.document.createElement("script");t.onreadystatechange=function(){u(),t.onreadystatechange=null,t.parentNode.removeChild(t),t=null},e.document.documentElement.appendChild(t)}:function(){setTimeout(u,0)};else{var o=new e.MessageChannel;o.port1.onmessage=u,r=function(){o.port2.postMessage(0)}}var h=[];function u(){var t,e;i=!0;for(var r=h.length;r;){for(e=h,h=[],t=-1;++t<r;)e[t]();r=h.length}i=!1}l.exports=function(t){1!==h.push(t)||i||r()}}).call(this,"undefined"!=typeof global?global:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{})},{}],37:[function(t,e,r){"use strict";var n=t("immediate");function u(){}var l={},s=["REJECTED"],a=["FULFILLED"],i=["PENDING"];function o(t){if("function"!=typeof t)throw new TypeError("resolver must be a function");this.state=i,this.queue=[],this.outcome=void 0,t!==u&&c(this,t)}function h(t,e,r){this.promise=t,"function"==typeof e&&(this.onFulfilled=e,this.callFulfilled=this.otherCallFulfilled),"function"==typeof r&&(this.onRejected=r,this.callRejected=this.otherCallRejected)}function f(e,r,i){n(function(){var t;try{t=r(i)}catch(t){return l.reject(e,t)}t===e?l.reject(e,new TypeError("Cannot resolve promise with itself")):l.resolve(e,t)})}function d(t){var e=t&&t.then;if(t&&("object"==typeof t||"function"==typeof t)&&"function"==typeof e)return function(){e.apply(t,arguments)}}function c(e,t){var r=!1;function i(t){r||(r=!0,l.reject(e,t))}function n(t){r||(r=!0,l.resolve(e,t))}var s=p(function(){t(n,i)});"error"===s.status&&i(s.value)}function p(t,e){var r={};try{r.value=t(e),r.status="success"}catch(t){r.status="error",r.value=t}return r}(e.exports=o).prototype.finally=function(e){if("function"!=typeof e)return this;var r=this.constructor;return this.then(function(t){return r.resolve(e()).then(function(){return t})},function(t){return r.resolve(e()).then(function(){throw t})})},o.prototype.catch=function(t){return this.then(null,t)},o.prototype.then=function(t,e){if("function"!=typeof t&&this.state===a||"function"!=typeof e&&this.state===s)return this;var r=new this.constructor(u);this.state!==i?f(r,this.state===a?t:e,this.outcome):this.queue.push(new h(r,t,e));return r},h.prototype.callFulfilled=function(t){l.resolve(this.promise,t)},h.prototype.otherCallFulfilled=function(t){f(this.promise,this.onFulfilled,t)},h.prototype.callRejected=function(t){l.reject(this.promise,t)},h.prototype.otherCallRejected=function(t){f(this.promise,this.onRejected,t)},l.resolve=function(t,e){var r=p(d,e);if("error"===r.status)return l.reject(t,r.value);var i=r.value;if(i)c(t,i);else{t.state=a,t.outcome=e;for(var n=-1,s=t.queue.length;++n<s;)t.queue[n].callFulfilled(e)}return t},l.reject=function(t,e){t.state=s,t.outcome=e;for(var r=-1,i=t.queue.length;++r<i;)t.queue[r].callRejected(e);return t},o.resolve=function(t){if(t instanceof this)return t;return l.resolve(new this(u),t)},o.reject=function(t){var e=new this(u);return l.reject(e,t)},o.all=function(t){var r=this;if("[object Array]"!==Object.prototype.toString.call(t))return this.reject(new TypeError("must be an array"));var i=t.length,n=!1;if(!i)return this.resolve([]);var s=new Array(i),a=0,e=-1,o=new this(u);for(;++e<i;)h(t[e],e);return o;function h(t,e){r.resolve(t).then(function(t){s[e]=t,++a!==i||n||(n=!0,l.resolve(o,s))},function(t){n||(n=!0,l.reject(o,t))})}},o.race=function(t){var e=this;if("[object Array]"!==Object.prototype.toString.call(t))return this.reject(new TypeError("must be an array"));var r=t.length,i=!1;if(!r)return this.resolve([]);var n=-1,s=new this(u);for(;++n<r;)a=t[n],e.resolve(a).then(function(t){i||(i=!0,l.resolve(s,t))},function(t){i||(i=!0,l.reject(s,t))});var a;return s}},{immediate:36}],38:[function(t,e,r){"use strict";var i={};(0,t("./lib/utils/common").assign)(i,t("./lib/deflate"),t("./lib/inflate"),t("./lib/zlib/constants")),e.exports=i},{"./lib/deflate":39,"./lib/inflate":40,"./lib/utils/common":41,"./lib/zlib/constants":44}],39:[function(t,e,r){"use strict";var a=t("./zlib/deflate"),o=t("./utils/common"),h=t("./utils/strings"),n=t("./zlib/messages"),s=t("./zlib/zstream"),u=Object.prototype.toString,l=0,f=-1,d=0,c=8;function p(t){if(!(this instanceof p))return new p(t);this.options=o.assign({level:f,method:c,chunkSize:16384,windowBits:15,memLevel:8,strategy:d,to:""},t||{});var e=this.options;e.raw&&0<e.windowBits?e.windowBits=-e.windowBits:e.gzip&&0<e.windowBits&&e.windowBits<16&&(e.windowBits+=16),this.err=0,this.msg="",this.ended=!1,this.chunks=[],this.strm=new s,this.strm.avail_out=0;var r=a.deflateInit2(this.strm,e.level,e.method,e.windowBits,e.memLevel,e.strategy);if(r!==l)throw new Error(n[r]);if(e.header&&a.deflateSetHeader(this.strm,e.header),e.dictionary){var i;if(i="string"==typeof e.dictionary?h.string2buf(e.dictionary):"[object ArrayBuffer]"===u.call(e.dictionary)?new Uint8Array(e.dictionary):e.dictionary,(r=a.deflateSetDictionary(this.strm,i))!==l)throw new Error(n[r]);this._dict_set=!0}}function i(t,e){var r=new p(e);if(r.push(t,!0),r.err)throw r.msg||n[r.err];return r.result}p.prototype.push=function(t,e){var r,i,n=this.strm,s=this.options.chunkSize;if(this.ended)return!1;i=e===~~e?e:!0===e?4:0,"string"==typeof t?n.input=h.string2buf(t):"[object ArrayBuffer]"===u.call(t)?n.input=new Uint8Array(t):n.input=t,n.next_in=0,n.avail_in=n.input.length;do{if(0===n.avail_out&&(n.output=new o.Buf8(s),n.next_out=0,n.avail_out=s),1!==(r=a.deflate(n,i))&&r!==l)return this.onEnd(r),!(this.ended=!0);0!==n.avail_out&&(0!==n.avail_in||4!==i&&2!==i)||("string"===this.options.to?this.onData(h.buf2binstring(o.shrinkBuf(n.output,n.next_out))):this.onData(o.shrinkBuf(n.output,n.next_out)))}while((0<n.avail_in||0===n.avail_out)&&1!==r);return 4===i?(r=a.deflateEnd(this.strm),this.onEnd(r),this.ended=!0,r===l):2!==i||(this.onEnd(l),!(n.avail_out=0))},p.prototype.onData=function(t){this.chunks.push(t)},p.prototype.onEnd=function(t){t===l&&("string"===this.options.to?this.result=this.chunks.join(""):this.result=o.flattenChunks(this.chunks)),this.chunks=[],this.err=t,this.msg=this.strm.msg},r.Deflate=p,r.deflate=i,r.deflateRaw=function(t,e){return(e=e||{}).raw=!0,i(t,e)},r.gzip=function(t,e){return(e=e||{}).gzip=!0,i(t,e)}},{"./utils/common":41,"./utils/strings":42,"./zlib/deflate":46,"./zlib/messages":51,"./zlib/zstream":53}],40:[function(t,e,r){"use strict";var d=t("./zlib/inflate"),c=t("./utils/common"),p=t("./utils/strings"),m=t("./zlib/constants"),i=t("./zlib/messages"),n=t("./zlib/zstream"),s=t("./zlib/gzheader"),_=Object.prototype.toString;function a(t){if(!(this instanceof a))return new a(t);this.options=c.assign({chunkSize:16384,windowBits:0,to:""},t||{});var e=this.options;e.raw&&0<=e.windowBits&&e.windowBits<16&&(e.windowBits=-e.windowBits,0===e.windowBits&&(e.windowBits=-15)),!(0<=e.windowBits&&e.windowBits<16)||t&&t.windowBits||(e.windowBits+=32),15<e.windowBits&&e.windowBits<48&&0==(15&e.windowBits)&&(e.windowBits|=15),this.err=0,this.msg="",this.ended=!1,this.chunks=[],this.strm=new n,this.strm.avail_out=0;var r=d.inflateInit2(this.strm,e.windowBits);if(r!==m.Z_OK)throw new Error(i[r]);this.header=new s,d.inflateGetHeader(this.strm,this.header)}function o(t,e){var r=new a(e);if(r.push(t,!0),r.err)throw r.msg||i[r.err];return r.result}a.prototype.push=function(t,e){var r,i,n,s,a,o,h=this.strm,u=this.options.chunkSize,l=this.options.dictionary,f=!1;if(this.ended)return!1;i=e===~~e?e:!0===e?m.Z_FINISH:m.Z_NO_FLUSH,"string"==typeof t?h.input=p.binstring2buf(t):"[object ArrayBuffer]"===_.call(t)?h.input=new Uint8Array(t):h.input=t,h.next_in=0,h.avail_in=h.input.length;do{if(0===h.avail_out&&(h.output=new c.Buf8(u),h.next_out=0,h.avail_out=u),(r=d.inflate(h,m.Z_NO_FLUSH))===m.Z_NEED_DICT&&l&&(o="string"==typeof l?p.string2buf(l):"[object ArrayBuffer]"===_.call(l)?new Uint8Array(l):l,r=d.inflateSetDictionary(this.strm,o)),r===m.Z_BUF_ERROR&&!0===f&&(r=m.Z_OK,f=!1),r!==m.Z_STREAM_END&&r!==m.Z_OK)return this.onEnd(r),!(this.ended=!0);h.next_out&&(0!==h.avail_out&&r!==m.Z_STREAM_END&&(0!==h.avail_in||i!==m.Z_FINISH&&i!==m.Z_SYNC_FLUSH)||("string"===this.options.to?(n=p.utf8border(h.output,h.next_out),s=h.next_out-n,a=p.buf2string(h.output,n),h.next_out=s,h.avail_out=u-s,s&&c.arraySet(h.output,h.output,n,s,0),this.onData(a)):this.onData(c.shrinkBuf(h.output,h.next_out)))),0===h.avail_in&&0===h.avail_out&&(f=!0)}while((0<h.avail_in||0===h.avail_out)&&r!==m.Z_STREAM_END);return r===m.Z_STREAM_END&&(i=m.Z_FINISH),i===m.Z_FINISH?(r=d.inflateEnd(this.strm),this.onEnd(r),this.ended=!0,r===m.Z_OK):i!==m.Z_SYNC_FLUSH||(this.onEnd(m.Z_OK),!(h.avail_out=0))},a.prototype.onData=function(t){this.chunks.push(t)},a.prototype.onEnd=function(t){t===m.Z_OK&&("string"===this.options.to?this.result=this.chunks.join(""):this.result=c.flattenChunks(this.chunks)),this.chunks=[],this.err=t,this.msg=this.strm.msg},r.Inflate=a,r.inflate=o,r.inflateRaw=function(t,e){return(e=e||{}).raw=!0,o(t,e)},r.ungzip=o},{"./utils/common":41,"./utils/strings":42,"./zlib/constants":44,"./zlib/gzheader":47,"./zlib/inflate":49,"./zlib/messages":51,"./zlib/zstream":53}],41:[function(t,e,r){"use strict";var i="undefined"!=typeof Uint8Array&&"undefined"!=typeof Uint16Array&&"undefined"!=typeof Int32Array;r.assign=function(t){for(var e=Array.prototype.slice.call(arguments,1);e.length;){var r=e.shift();if(r){if("object"!=typeof r)throw new TypeError(r+"must be non-object");for(var i in r)r.hasOwnProperty(i)&&(t[i]=r[i])}}return t},r.shrinkBuf=function(t,e){return t.length===e?t:t.subarray?t.subarray(0,e):(t.length=e,t)};var n={arraySet:function(t,e,r,i,n){if(e.subarray&&t.subarray)t.set(e.subarray(r,r+i),n);else for(var s=0;s<i;s++)t[n+s]=e[r+s]},flattenChunks:function(t){var e,r,i,n,s,a;for(e=i=0,r=t.length;e<r;e++)i+=t[e].length;for(a=new Uint8Array(i),e=n=0,r=t.length;e<r;e++)s=t[e],a.set(s,n),n+=s.length;return a}},s={arraySet:function(t,e,r,i,n){for(var s=0;s<i;s++)t[n+s]=e[r+s]},flattenChunks:function(t){return[].concat.apply([],t)}};r.setTyped=function(t){t?(r.Buf8=Uint8Array,r.Buf16=Uint16Array,r.Buf32=Int32Array,r.assign(r,n)):(r.Buf8=Array,r.Buf16=Array,r.Buf32=Array,r.assign(r,s))},r.setTyped(i)},{}],42:[function(t,e,r){"use strict";var h=t("./common"),n=!0,s=!0;try{String.fromCharCode.apply(null,[0])}catch(t){n=!1}try{String.fromCharCode.apply(null,new Uint8Array(1))}catch(t){s=!1}for(var u=new h.Buf8(256),i=0;i<256;i++)u[i]=252<=i?6:248<=i?5:240<=i?4:224<=i?3:192<=i?2:1;function l(t,e){if(e<65537&&(t.subarray&&s||!t.subarray&&n))return String.fromCharCode.apply(null,h.shrinkBuf(t,e));for(var r="",i=0;i<e;i++)r+=String.fromCharCode(t[i]);return r}u[254]=u[254]=1,r.string2buf=function(t){var e,r,i,n,s,a=t.length,o=0;for(n=0;n<a;n++)55296==(64512&(r=t.charCodeAt(n)))&&n+1<a&&56320==(64512&(i=t.charCodeAt(n+1)))&&(r=65536+(r-55296<<10)+(i-56320),n++),o+=r<128?1:r<2048?2:r<65536?3:4;for(e=new h.Buf8(o),n=s=0;s<o;n++)55296==(64512&(r=t.charCodeAt(n)))&&n+1<a&&56320==(64512&(i=t.charCodeAt(n+1)))&&(r=65536+(r-55296<<10)+(i-56320),n++),r<128?e[s++]=r:(r<2048?e[s++]=192|r>>>6:(r<65536?e[s++]=224|r>>>12:(e[s++]=240|r>>>18,e[s++]=128|r>>>12&63),e[s++]=128|r>>>6&63),e[s++]=128|63&r);return e},r.buf2binstring=function(t){return l(t,t.length)},r.binstring2buf=function(t){for(var e=new h.Buf8(t.length),r=0,i=e.length;r<i;r++)e[r]=t.charCodeAt(r);return e},r.buf2string=function(t,e){var r,i,n,s,a=e||t.length,o=new Array(2*a);for(r=i=0;r<a;)if((n=t[r++])<128)o[i++]=n;else if(4<(s=u[n]))o[i++]=65533,r+=s-1;else{for(n&=2===s?31:3===s?15:7;1<s&&r<a;)n=n<<6|63&t[r++],s--;1<s?o[i++]=65533:n<65536?o[i++]=n:(n-=65536,o[i++]=55296|n>>10&1023,o[i++]=56320|1023&n)}return l(o,i)},r.utf8border=function(t,e){var r;for((e=e||t.length)>t.length&&(e=t.length),r=e-1;0<=r&&128==(192&t[r]);)r--;return r<0?e:0===r?e:r+u[t[r]]>e?r:e}},{"./common":41}],43:[function(t,e,r){"use strict";e.exports=function(t,e,r,i){for(var n=65535&t|0,s=t>>>16&65535|0,a=0;0!==r;){for(r-=a=2e3<r?2e3:r;s=s+(n=n+e[i++]|0)|0,--a;);n%=65521,s%=65521}return n|s<<16|0}},{}],44:[function(t,e,r){"use strict";e.exports={Z_NO_FLUSH:0,Z_PARTIAL_FLUSH:1,Z_SYNC_FLUSH:2,Z_FULL_FLUSH:3,Z_FINISH:4,Z_BLOCK:5,Z_TREES:6,Z_OK:0,Z_STREAM_END:1,Z_NEED_DICT:2,Z_ERRNO:-1,Z_STREAM_ERROR:-2,Z_DATA_ERROR:-3,Z_BUF_ERROR:-5,Z_NO_COMPRESSION:0,Z_BEST_SPEED:1,Z_BEST_COMPRESSION:9,Z_DEFAULT_COMPRESSION:-1,Z_FILTERED:1,Z_HUFFMAN_ONLY:2,Z_RLE:3,Z_FIXED:4,Z_DEFAULT_STRATEGY:0,Z_BINARY:0,Z_TEXT:1,Z_UNKNOWN:2,Z_DEFLATED:8}},{}],45:[function(t,e,r){"use strict";var o=function(){for(var t,e=[],r=0;r<256;r++){t=r;for(var i=0;i<8;i++)t=1&t?3988292384^t>>>1:t>>>1;e[r]=t}return e}();e.exports=function(t,e,r,i){var n=o,s=i+r;t^=-1;for(var a=i;a<s;a++)t=t>>>8^n[255&(t^e[a])];return-1^t}},{}],46:[function(t,e,r){"use strict";var h,d=t("../utils/common"),u=t("./trees"),c=t("./adler32"),p=t("./crc32"),i=t("./messages"),l=0,f=4,m=0,_=-2,g=-1,b=4,n=2,v=8,y=9,s=286,a=30,o=19,w=2*s+1,k=15,x=3,S=258,z=S+x+1,C=42,E=113,A=1,I=2,O=3,B=4;function R(t,e){return t.msg=i[e],e}function T(t){return(t<<1)-(4<t?9:0)}function D(t){for(var e=t.length;0<=--e;)t[e]=0}function F(t){var e=t.state,r=e.pending;r>t.avail_out&&(r=t.avail_out),0!==r&&(d.arraySet(t.output,e.pending_buf,e.pending_out,r,t.next_out),t.next_out+=r,e.pending_out+=r,t.total_out+=r,t.avail_out-=r,e.pending-=r,0===e.pending&&(e.pending_out=0))}function N(t,e){u._tr_flush_block(t,0<=t.block_start?t.block_start:-1,t.strstart-t.block_start,e),t.block_start=t.strstart,F(t.strm)}function U(t,e){t.pending_buf[t.pending++]=e}function P(t,e){t.pending_buf[t.pending++]=e>>>8&255,t.pending_buf[t.pending++]=255&e}function L(t,e){var r,i,n=t.max_chain_length,s=t.strstart,a=t.prev_length,o=t.nice_match,h=t.strstart>t.w_size-z?t.strstart-(t.w_size-z):0,u=t.window,l=t.w_mask,f=t.prev,d=t.strstart+S,c=u[s+a-1],p=u[s+a];t.prev_length>=t.good_match&&(n>>=2),o>t.lookahead&&(o=t.lookahead);do{if(u[(r=e)+a]===p&&u[r+a-1]===c&&u[r]===u[s]&&u[++r]===u[s+1]){s+=2,r++;do{}while(u[++s]===u[++r]&&u[++s]===u[++r]&&u[++s]===u[++r]&&u[++s]===u[++r]&&u[++s]===u[++r]&&u[++s]===u[++r]&&u[++s]===u[++r]&&u[++s]===u[++r]&&s<d);if(i=S-(d-s),s=d-S,a<i){if(t.match_start=e,o<=(a=i))break;c=u[s+a-1],p=u[s+a]}}}while((e=f[e&l])>h&&0!=--n);return a<=t.lookahead?a:t.lookahead}function j(t){var e,r,i,n,s,a,o,h,u,l,f=t.w_size;do{if(n=t.window_size-t.lookahead-t.strstart,t.strstart>=f+(f-z)){for(d.arraySet(t.window,t.window,f,f,0),t.match_start-=f,t.strstart-=f,t.block_start-=f,e=r=t.hash_size;i=t.head[--e],t.head[e]=f<=i?i-f:0,--r;);for(e=r=f;i=t.prev[--e],t.prev[e]=f<=i?i-f:0,--r;);n+=f}if(0===t.strm.avail_in)break;if(a=t.strm,o=t.window,h=t.strstart+t.lookahead,u=n,l=void 0,l=a.avail_in,u<l&&(l=u),r=0===l?0:(a.avail_in-=l,d.arraySet(o,a.input,a.next_in,l,h),1===a.state.wrap?a.adler=c(a.adler,o,l,h):2===a.state.wrap&&(a.adler=p(a.adler,o,l,h)),a.next_in+=l,a.total_in+=l,l),t.lookahead+=r,t.lookahead+t.insert>=x)for(s=t.strstart-t.insert,t.ins_h=t.window[s],t.ins_h=(t.ins_h<<t.hash_shift^t.window[s+1])&t.hash_mask;t.insert&&(t.ins_h=(t.ins_h<<t.hash_shift^t.window[s+x-1])&t.hash_mask,t.prev[s&t.w_mask]=t.head[t.ins_h],t.head[t.ins_h]=s,s++,t.insert--,!(t.lookahead+t.insert<x)););}while(t.lookahead<z&&0!==t.strm.avail_in)}function Z(t,e){for(var r,i;;){if(t.lookahead<z){if(j(t),t.lookahead<z&&e===l)return A;if(0===t.lookahead)break}if(r=0,t.lookahead>=x&&(t.ins_h=(t.ins_h<<t.hash_shift^t.window[t.strstart+x-1])&t.hash_mask,r=t.prev[t.strstart&t.w_mask]=t.head[t.ins_h],t.head[t.ins_h]=t.strstart),0!==r&&t.strstart-r<=t.w_size-z&&(t.match_length=L(t,r)),t.match_length>=x)if(i=u._tr_tally(t,t.strstart-t.match_start,t.match_length-x),t.lookahead-=t.match_length,t.match_length<=t.max_lazy_match&&t.lookahead>=x){for(t.match_length--;t.strstart++,t.ins_h=(t.ins_h<<t.hash_shift^t.window[t.strstart+x-1])&t.hash_mask,r=t.prev[t.strstart&t.w_mask]=t.head[t.ins_h],t.head[t.ins_h]=t.strstart,0!=--t.match_length;);t.strstart++}else t.strstart+=t.match_length,t.match_length=0,t.ins_h=t.window[t.strstart],t.ins_h=(t.ins_h<<t.hash_shift^t.window[t.strstart+1])&t.hash_mask;else i=u._tr_tally(t,0,t.window[t.strstart]),t.lookahead--,t.strstart++;if(i&&(N(t,!1),0===t.strm.avail_out))return A}return t.insert=t.strstart<x-1?t.strstart:x-1,e===f?(N(t,!0),0===t.strm.avail_out?O:B):t.last_lit&&(N(t,!1),0===t.strm.avail_out)?A:I}function W(t,e){for(var r,i,n;;){if(t.lookahead<z){if(j(t),t.lookahead<z&&e===l)return A;if(0===t.lookahead)break}if(r=0,t.lookahead>=x&&(t.ins_h=(t.ins_h<<t.hash_shift^t.window[t.strstart+x-1])&t.hash_mask,r=t.prev[t.strstart&t.w_mask]=t.head[t.ins_h],t.head[t.ins_h]=t.strstart),t.prev_length=t.match_length,t.prev_match=t.match_start,t.match_length=x-1,0!==r&&t.prev_length<t.max_lazy_match&&t.strstart-r<=t.w_size-z&&(t.match_length=L(t,r),t.match_length<=5&&(1===t.strategy||t.match_length===x&&4096<t.strstart-t.match_start)&&(t.match_length=x-1)),t.prev_length>=x&&t.match_length<=t.prev_length){for(n=t.strstart+t.lookahead-x,i=u._tr_tally(t,t.strstart-1-t.prev_match,t.prev_length-x),t.lookahead-=t.prev_length-1,t.prev_length-=2;++t.strstart<=n&&(t.ins_h=(t.ins_h<<t.hash_shift^t.window[t.strstart+x-1])&t.hash_mask,r=t.prev[t.strstart&t.w_mask]=t.head[t.ins_h],t.head[t.ins_h]=t.strstart),0!=--t.prev_length;);if(t.match_available=0,t.match_length=x-1,t.strstart++,i&&(N(t,!1),0===t.strm.avail_out))return A}else if(t.match_available){if((i=u._tr_tally(t,0,t.window[t.strstart-1]))&&N(t,!1),t.strstart++,t.lookahead--,0===t.strm.avail_out)return A}else t.match_available=1,t.strstart++,t.lookahead--}return t.match_available&&(i=u._tr_tally(t,0,t.window[t.strstart-1]),t.match_available=0),t.insert=t.strstart<x-1?t.strstart:x-1,e===f?(N(t,!0),0===t.strm.avail_out?O:B):t.last_lit&&(N(t,!1),0===t.strm.avail_out)?A:I}function M(t,e,r,i,n){this.good_length=t,this.max_lazy=e,this.nice_length=r,this.max_chain=i,this.func=n}function H(){this.strm=null,this.status=0,this.pending_buf=null,this.pending_buf_size=0,this.pending_out=0,this.pending=0,this.wrap=0,this.gzhead=null,this.gzindex=0,this.method=v,this.last_flush=-1,this.w_size=0,this.w_bits=0,this.w_mask=0,this.window=null,this.window_size=0,this.prev=null,this.head=null,this.ins_h=0,this.hash_size=0,this.hash_bits=0,this.hash_mask=0,this.hash_shift=0,this.block_start=0,this.match_length=0,this.prev_match=0,this.match_available=0,this.strstart=0,this.match_start=0,this.lookahead=0,this.prev_length=0,this.max_chain_length=0,this.max_lazy_match=0,this.level=0,this.strategy=0,this.good_match=0,this.nice_match=0,this.dyn_ltree=new d.Buf16(2*w),this.dyn_dtree=new d.Buf16(2*(2*a+1)),this.bl_tree=new d.Buf16(2*(2*o+1)),D(this.dyn_ltree),D(this.dyn_dtree),D(this.bl_tree),this.l_desc=null,this.d_desc=null,this.bl_desc=null,this.bl_count=new d.Buf16(k+1),this.heap=new d.Buf16(2*s+1),D(this.heap),this.heap_len=0,this.heap_max=0,this.depth=new d.Buf16(2*s+1),D(this.depth),this.l_buf=0,this.lit_bufsize=0,this.last_lit=0,this.d_buf=0,this.opt_len=0,this.static_len=0,this.matches=0,this.insert=0,this.bi_buf=0,this.bi_valid=0}function G(t){var e;return t&&t.state?(t.total_in=t.total_out=0,t.data_type=n,(e=t.state).pending=0,e.pending_out=0,e.wrap<0&&(e.wrap=-e.wrap),e.status=e.wrap?C:E,t.adler=2===e.wrap?0:1,e.last_flush=l,u._tr_init(e),m):R(t,_)}function K(t){var e=G(t);return e===m&&function(t){t.window_size=2*t.w_size,D(t.head),t.max_lazy_match=h[t.level].max_lazy,t.good_match=h[t.level].good_length,t.nice_match=h[t.level].nice_length,t.max_chain_length=h[t.level].max_chain,t.strstart=0,t.block_start=0,t.lookahead=0,t.insert=0,t.match_length=t.prev_length=x-1,t.match_available=0,t.ins_h=0}(t.state),e}function Y(t,e,r,i,n,s){if(!t)return _;var a=1;if(e===g&&(e=6),i<0?(a=0,i=-i):15<i&&(a=2,i-=16),n<1||y<n||r!==v||i<8||15<i||e<0||9<e||s<0||b<s)return R(t,_);8===i&&(i=9);var o=new H;return(t.state=o).strm=t,o.wrap=a,o.gzhead=null,o.w_bits=i,o.w_size=1<<o.w_bits,o.w_mask=o.w_size-1,o.hash_bits=n+7,o.hash_size=1<<o.hash_bits,o.hash_mask=o.hash_size-1,o.hash_shift=~~((o.hash_bits+x-1)/x),o.window=new d.Buf8(2*o.w_size),o.head=new d.Buf16(o.hash_size),o.prev=new d.Buf16(o.w_size),o.lit_bufsize=1<<n+6,o.pending_buf_size=4*o.lit_bufsize,o.pending_buf=new d.Buf8(o.pending_buf_size),o.d_buf=1*o.lit_bufsize,o.l_buf=3*o.lit_bufsize,o.level=e,o.strategy=s,o.method=r,K(t)}h=[new M(0,0,0,0,function(t,e){var r=65535;for(r>t.pending_buf_size-5&&(r=t.pending_buf_size-5);;){if(t.lookahead<=1){if(j(t),0===t.lookahead&&e===l)return A;if(0===t.lookahead)break}t.strstart+=t.lookahead,t.lookahead=0;var i=t.block_start+r;if((0===t.strstart||t.strstart>=i)&&(t.lookahead=t.strstart-i,t.strstart=i,N(t,!1),0===t.strm.avail_out))return A;if(t.strstart-t.block_start>=t.w_size-z&&(N(t,!1),0===t.strm.avail_out))return A}return t.insert=0,e===f?(N(t,!0),0===t.strm.avail_out?O:B):(t.strstart>t.block_start&&(N(t,!1),t.strm.avail_out),A)}),new M(4,4,8,4,Z),new M(4,5,16,8,Z),new M(4,6,32,32,Z),new M(4,4,16,16,W),new M(8,16,32,32,W),new M(8,16,128,128,W),new M(8,32,128,256,W),new M(32,128,258,1024,W),new M(32,258,258,4096,W)],r.deflateInit=function(t,e){return Y(t,e,v,15,8,0)},r.deflateInit2=Y,r.deflateReset=K,r.deflateResetKeep=G,r.deflateSetHeader=function(t,e){return t&&t.state?2!==t.state.wrap?_:(t.state.gzhead=e,m):_},r.deflate=function(t,e){var r,i,n,s;if(!t||!t.state||5<e||e<0)return t?R(t,_):_;if(i=t.state,!t.output||!t.input&&0!==t.avail_in||666===i.status&&e!==f)return R(t,0===t.avail_out?-5:_);if(i.strm=t,r=i.last_flush,i.last_flush=e,i.status===C)if(2===i.wrap)t.adler=0,U(i,31),U(i,139),U(i,8),i.gzhead?(U(i,(i.gzhead.text?1:0)+(i.gzhead.hcrc?2:0)+(i.gzhead.extra?4:0)+(i.gzhead.name?8:0)+(i.gzhead.comment?16:0)),U(i,255&i.gzhead.time),U(i,i.gzhead.time>>8&255),U(i,i.gzhead.time>>16&255),U(i,i.gzhead.time>>24&255),U(i,9===i.level?2:2<=i.strategy||i.level<2?4:0),U(i,255&i.gzhead.os),i.gzhead.extra&&i.gzhead.extra.length&&(U(i,255&i.gzhead.extra.length),U(i,i.gzhead.extra.length>>8&255)),i.gzhead.hcrc&&(t.adler=p(t.adler,i.pending_buf,i.pending,0)),i.gzindex=0,i.status=69):(U(i,0),U(i,0),U(i,0),U(i,0),U(i,0),U(i,9===i.level?2:2<=i.strategy||i.level<2?4:0),U(i,3),i.status=E);else{var a=v+(i.w_bits-8<<4)<<8;a|=(2<=i.strategy||i.level<2?0:i.level<6?1:6===i.level?2:3)<<6,0!==i.strstart&&(a|=32),a+=31-a%31,i.status=E,P(i,a),0!==i.strstart&&(P(i,t.adler>>>16),P(i,65535&t.adler)),t.adler=1}if(69===i.status)if(i.gzhead.extra){for(n=i.pending;i.gzindex<(65535&i.gzhead.extra.length)&&(i.pending!==i.pending_buf_size||(i.gzhead.hcrc&&i.pending>n&&(t.adler=p(t.adler,i.pending_buf,i.pending-n,n)),F(t),n=i.pending,i.pending!==i.pending_buf_size));)U(i,255&i.gzhead.extra[i.gzindex]),i.gzindex++;i.gzhead.hcrc&&i.pending>n&&(t.adler=p(t.adler,i.pending_buf,i.pending-n,n)),i.gzindex===i.gzhead.extra.length&&(i.gzindex=0,i.status=73)}else i.status=73;if(73===i.status)if(i.gzhead.name){n=i.pending;do{if(i.pending===i.pending_buf_size&&(i.gzhead.hcrc&&i.pending>n&&(t.adler=p(t.adler,i.pending_buf,i.pending-n,n)),F(t),n=i.pending,i.pending===i.pending_buf_size)){s=1;break}s=i.gzindex<i.gzhead.name.length?255&i.gzhead.name.charCodeAt(i.gzindex++):0,U(i,s)}while(0!==s);i.gzhead.hcrc&&i.pending>n&&(t.adler=p(t.adler,i.pending_buf,i.pending-n,n)),0===s&&(i.gzindex=0,i.status=91)}else i.status=91;if(91===i.status)if(i.gzhead.comment){n=i.pending;do{if(i.pending===i.pending_buf_size&&(i.gzhead.hcrc&&i.pending>n&&(t.adler=p(t.adler,i.pending_buf,i.pending-n,n)),F(t),n=i.pending,i.pending===i.pending_buf_size)){s=1;break}s=i.gzindex<i.gzhead.comment.length?255&i.gzhead.comment.charCodeAt(i.gzindex++):0,U(i,s)}while(0!==s);i.gzhead.hcrc&&i.pending>n&&(t.adler=p(t.adler,i.pending_buf,i.pending-n,n)),0===s&&(i.status=103)}else i.status=103;if(103===i.status&&(i.gzhead.hcrc?(i.pending+2>i.pending_buf_size&&F(t),i.pending+2<=i.pending_buf_size&&(U(i,255&t.adler),U(i,t.adler>>8&255),t.adler=0,i.status=E)):i.status=E),0!==i.pending){if(F(t),0===t.avail_out)return i.last_flush=-1,m}else if(0===t.avail_in&&T(e)<=T(r)&&e!==f)return R(t,-5);if(666===i.status&&0!==t.avail_in)return R(t,-5);if(0!==t.avail_in||0!==i.lookahead||e!==l&&666!==i.status){var o=2===i.strategy?function(t,e){for(var r;;){if(0===t.lookahead&&(j(t),0===t.lookahead)){if(e===l)return A;break}if(t.match_length=0,r=u._tr_tally(t,0,t.window[t.strstart]),t.lookahead--,t.strstart++,r&&(N(t,!1),0===t.strm.avail_out))return A}return t.insert=0,e===f?(N(t,!0),0===t.strm.avail_out?O:B):t.last_lit&&(N(t,!1),0===t.strm.avail_out)?A:I}(i,e):3===i.strategy?function(t,e){for(var r,i,n,s,a=t.window;;){if(t.lookahead<=S){if(j(t),t.lookahead<=S&&e===l)return A;if(0===t.lookahead)break}if(t.match_length=0,t.lookahead>=x&&0<t.strstart&&(i=a[n=t.strstart-1])===a[++n]&&i===a[++n]&&i===a[++n]){s=t.strstart+S;do{}while(i===a[++n]&&i===a[++n]&&i===a[++n]&&i===a[++n]&&i===a[++n]&&i===a[++n]&&i===a[++n]&&i===a[++n]&&n<s);t.match_length=S-(s-n),t.match_length>t.lookahead&&(t.match_length=t.lookahead)}if(t.match_length>=x?(r=u._tr_tally(t,1,t.match_length-x),t.lookahead-=t.match_length,t.strstart+=t.match_length,t.match_length=0):(r=u._tr_tally(t,0,t.window[t.strstart]),t.lookahead--,t.strstart++),r&&(N(t,!1),0===t.strm.avail_out))return A}return t.insert=0,e===f?(N(t,!0),0===t.strm.avail_out?O:B):t.last_lit&&(N(t,!1),0===t.strm.avail_out)?A:I}(i,e):h[i.level].func(i,e);if(o!==O&&o!==B||(i.status=666),o===A||o===O)return 0===t.avail_out&&(i.last_flush=-1),m;if(o===I&&(1===e?u._tr_align(i):5!==e&&(u._tr_stored_block(i,0,0,!1),3===e&&(D(i.head),0===i.lookahead&&(i.strstart=0,i.block_start=0,i.insert=0))),F(t),0===t.avail_out))return i.last_flush=-1,m}return e!==f?m:i.wrap<=0?1:(2===i.wrap?(U(i,255&t.adler),U(i,t.adler>>8&255),U(i,t.adler>>16&255),U(i,t.adler>>24&255),U(i,255&t.total_in),U(i,t.total_in>>8&255),U(i,t.total_in>>16&255),U(i,t.total_in>>24&255)):(P(i,t.adler>>>16),P(i,65535&t.adler)),F(t),0<i.wrap&&(i.wrap=-i.wrap),0!==i.pending?m:1)},r.deflateEnd=function(t){var e;return t&&t.state?(e=t.state.status)!==C&&69!==e&&73!==e&&91!==e&&103!==e&&e!==E&&666!==e?R(t,_):(t.state=null,e===E?R(t,-3):m):_},r.deflateSetDictionary=function(t,e){var r,i,n,s,a,o,h,u,l=e.length;if(!t||!t.state)return _;if(2===(s=(r=t.state).wrap)||1===s&&r.status!==C||r.lookahead)return _;for(1===s&&(t.adler=c(t.adler,e,l,0)),r.wrap=0,l>=r.w_size&&(0===s&&(D(r.head),r.strstart=0,r.block_start=0,r.insert=0),u=new d.Buf8(r.w_size),d.arraySet(u,e,l-r.w_size,r.w_size,0),e=u,l=r.w_size),a=t.avail_in,o=t.next_in,h=t.input,t.avail_in=l,t.next_in=0,t.input=e,j(r);r.lookahead>=x;){for(i=r.strstart,n=r.lookahead-(x-1);r.ins_h=(r.ins_h<<r.hash_shift^r.window[i+x-1])&r.hash_mask,r.prev[i&r.w_mask]=r.head[r.ins_h],r.head[r.ins_h]=i,i++,--n;);r.strstart=i,r.lookahead=x-1,j(r)}return r.strstart+=r.lookahead,r.block_start=r.strstart,r.insert=r.lookahead,r.lookahead=0,r.match_length=r.prev_length=x-1,r.match_available=0,t.next_in=o,t.input=h,t.avail_in=a,r.wrap=s,m},r.deflateInfo="pako deflate (from Nodeca project)"},{"../utils/common":41,"./adler32":43,"./crc32":45,"./messages":51,"./trees":52}],47:[function(t,e,r){"use strict";e.exports=function(){this.text=0,this.time=0,this.xflags=0,this.os=0,this.extra=null,this.extra_len=0,this.name="",this.comment="",this.hcrc=0,this.done=!1}},{}],48:[function(t,e,r){"use strict";e.exports=function(t,e){var r,i,n,s,a,o,h,u,l,f,d,c,p,m,_,g,b,v,y,w,k,x,S,z,C;r=t.state,i=t.next_in,z=t.input,n=i+(t.avail_in-5),s=t.next_out,C=t.output,a=s-(e-t.avail_out),o=s+(t.avail_out-257),h=r.dmax,u=r.wsize,l=r.whave,f=r.wnext,d=r.window,c=r.hold,p=r.bits,m=r.lencode,_=r.distcode,g=(1<<r.lenbits)-1,b=(1<<r.distbits)-1;t:do{p<15&&(c+=z[i++]<<p,p+=8,c+=z[i++]<<p,p+=8),v=m[c&g];e:for(;;){if(c>>>=y=v>>>24,p-=y,0===(y=v>>>16&255))C[s++]=65535&v;else{if(!(16&y)){if(0==(64&y)){v=m[(65535&v)+(c&(1<<y)-1)];continue e}if(32&y){r.mode=12;break t}t.msg="invalid literal/length code",r.mode=30;break t}w=65535&v,(y&=15)&&(p<y&&(c+=z[i++]<<p,p+=8),w+=c&(1<<y)-1,c>>>=y,p-=y),p<15&&(c+=z[i++]<<p,p+=8,c+=z[i++]<<p,p+=8),v=_[c&b];r:for(;;){if(c>>>=y=v>>>24,p-=y,!(16&(y=v>>>16&255))){if(0==(64&y)){v=_[(65535&v)+(c&(1<<y)-1)];continue r}t.msg="invalid distance code",r.mode=30;break t}if(k=65535&v,p<(y&=15)&&(c+=z[i++]<<p,(p+=8)<y&&(c+=z[i++]<<p,p+=8)),h<(k+=c&(1<<y)-1)){t.msg="invalid distance too far back",r.mode=30;break t}if(c>>>=y,p-=y,(y=s-a)<k){if(l<(y=k-y)&&r.sane){t.msg="invalid distance too far back",r.mode=30;break t}if(S=d,(x=0)===f){if(x+=u-y,y<w){for(w-=y;C[s++]=d[x++],--y;);x=s-k,S=C}}else if(f<y){if(x+=u+f-y,(y-=f)<w){for(w-=y;C[s++]=d[x++],--y;);if(x=0,f<w){for(w-=y=f;C[s++]=d[x++],--y;);x=s-k,S=C}}}else if(x+=f-y,y<w){for(w-=y;C[s++]=d[x++],--y;);x=s-k,S=C}for(;2<w;)C[s++]=S[x++],C[s++]=S[x++],C[s++]=S[x++],w-=3;w&&(C[s++]=S[x++],1<w&&(C[s++]=S[x++]))}else{for(x=s-k;C[s++]=C[x++],C[s++]=C[x++],C[s++]=C[x++],2<(w-=3););w&&(C[s++]=C[x++],1<w&&(C[s++]=C[x++]))}break}}break}}while(i<n&&s<o);i-=w=p>>3,c&=(1<<(p-=w<<3))-1,t.next_in=i,t.next_out=s,t.avail_in=i<n?n-i+5:5-(i-n),t.avail_out=s<o?o-s+257:257-(s-o),r.hold=c,r.bits=p}},{}],49:[function(t,e,r){"use strict";var I=t("../utils/common"),O=t("./adler32"),B=t("./crc32"),R=t("./inffast"),T=t("./inftrees"),D=1,F=2,N=0,U=-2,P=1,i=852,n=592;function L(t){return(t>>>24&255)+(t>>>8&65280)+((65280&t)<<8)+((255&t)<<24)}function s(){this.mode=0,this.last=!1,this.wrap=0,this.havedict=!1,this.flags=0,this.dmax=0,this.check=0,this.total=0,this.head=null,this.wbits=0,this.wsize=0,this.whave=0,this.wnext=0,this.window=null,this.hold=0,this.bits=0,this.length=0,this.offset=0,this.extra=0,this.lencode=null,this.distcode=null,this.lenbits=0,this.distbits=0,this.ncode=0,this.nlen=0,this.ndist=0,this.have=0,this.next=null,this.lens=new I.Buf16(320),this.work=new I.Buf16(288),this.lendyn=null,this.distdyn=null,this.sane=0,this.back=0,this.was=0}function a(t){var e;return t&&t.state?(e=t.state,t.total_in=t.total_out=e.total=0,t.msg="",e.wrap&&(t.adler=1&e.wrap),e.mode=P,e.last=0,e.havedict=0,e.dmax=32768,e.head=null,e.hold=0,e.bits=0,e.lencode=e.lendyn=new I.Buf32(i),e.distcode=e.distdyn=new I.Buf32(n),e.sane=1,e.back=-1,N):U}function o(t){var e;return t&&t.state?((e=t.state).wsize=0,e.whave=0,e.wnext=0,a(t)):U}function h(t,e){var r,i;return t&&t.state?(i=t.state,e<0?(r=0,e=-e):(r=1+(e>>4),e<48&&(e&=15)),e&&(e<8||15<e)?U:(null!==i.window&&i.wbits!==e&&(i.window=null),i.wrap=r,i.wbits=e,o(t))):U}function u(t,e){var r,i;return t?(i=new s,(t.state=i).window=null,(r=h(t,e))!==N&&(t.state=null),r):U}var l,f,d=!0;function j(t){if(d){var e;for(l=new I.Buf32(512),f=new I.Buf32(32),e=0;e<144;)t.lens[e++]=8;for(;e<256;)t.lens[e++]=9;for(;e<280;)t.lens[e++]=7;for(;e<288;)t.lens[e++]=8;for(T(D,t.lens,0,288,l,0,t.work,{bits:9}),e=0;e<32;)t.lens[e++]=5;T(F,t.lens,0,32,f,0,t.work,{bits:5}),d=!1}t.lencode=l,t.lenbits=9,t.distcode=f,t.distbits=5}function Z(t,e,r,i){var n,s=t.state;return null===s.window&&(s.wsize=1<<s.wbits,s.wnext=0,s.whave=0,s.window=new I.Buf8(s.wsize)),i>=s.wsize?(I.arraySet(s.window,e,r-s.wsize,s.wsize,0),s.wnext=0,s.whave=s.wsize):(i<(n=s.wsize-s.wnext)&&(n=i),I.arraySet(s.window,e,r-i,n,s.wnext),(i-=n)?(I.arraySet(s.window,e,r-i,i,0),s.wnext=i,s.whave=s.wsize):(s.wnext+=n,s.wnext===s.wsize&&(s.wnext=0),s.whave<s.wsize&&(s.whave+=n))),0}r.inflateReset=o,r.inflateReset2=h,r.inflateResetKeep=a,r.inflateInit=function(t){return u(t,15)},r.inflateInit2=u,r.inflate=function(t,e){var r,i,n,s,a,o,h,u,l,f,d,c,p,m,_,g,b,v,y,w,k,x,S,z,C=0,E=new I.Buf8(4),A=[16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15];if(!t||!t.state||!t.output||!t.input&&0!==t.avail_in)return U;12===(r=t.state).mode&&(r.mode=13),a=t.next_out,n=t.output,h=t.avail_out,s=t.next_in,i=t.input,o=t.avail_in,u=r.hold,l=r.bits,f=o,d=h,x=N;t:for(;;)switch(r.mode){case P:if(0===r.wrap){r.mode=13;break}for(;l<16;){if(0===o)break t;o--,u+=i[s++]<<l,l+=8}if(2&r.wrap&&35615===u){E[r.check=0]=255&u,E[1]=u>>>8&255,r.check=B(r.check,E,2,0),l=u=0,r.mode=2;break}if(r.flags=0,r.head&&(r.head.done=!1),!(1&r.wrap)||(((255&u)<<8)+(u>>8))%31){t.msg="incorrect header check",r.mode=30;break}if(8!=(15&u)){t.msg="unknown compression method",r.mode=30;break}if(l-=4,k=8+(15&(u>>>=4)),0===r.wbits)r.wbits=k;else if(k>r.wbits){t.msg="invalid window size",r.mode=30;break}r.dmax=1<<k,t.adler=r.check=1,r.mode=512&u?10:12,l=u=0;break;case 2:for(;l<16;){if(0===o)break t;o--,u+=i[s++]<<l,l+=8}if(r.flags=u,8!=(255&r.flags)){t.msg="unknown compression method",r.mode=30;break}if(57344&r.flags){t.msg="unknown header flags set",r.mode=30;break}r.head&&(r.head.text=u>>8&1),512&r.flags&&(E[0]=255&u,E[1]=u>>>8&255,r.check=B(r.check,E,2,0)),l=u=0,r.mode=3;case 3:for(;l<32;){if(0===o)break t;o--,u+=i[s++]<<l,l+=8}r.head&&(r.head.time=u),512&r.flags&&(E[0]=255&u,E[1]=u>>>8&255,E[2]=u>>>16&255,E[3]=u>>>24&255,r.check=B(r.check,E,4,0)),l=u=0,r.mode=4;case 4:for(;l<16;){if(0===o)break t;o--,u+=i[s++]<<l,l+=8}r.head&&(r.head.xflags=255&u,r.head.os=u>>8),512&r.flags&&(E[0]=255&u,E[1]=u>>>8&255,r.check=B(r.check,E,2,0)),l=u=0,r.mode=5;case 5:if(1024&r.flags){for(;l<16;){if(0===o)break t;o--,u+=i[s++]<<l,l+=8}r.length=u,r.head&&(r.head.extra_len=u),512&r.flags&&(E[0]=255&u,E[1]=u>>>8&255,r.check=B(r.check,E,2,0)),l=u=0}else r.head&&(r.head.extra=null);r.mode=6;case 6:if(1024&r.flags&&(o<(c=r.length)&&(c=o),c&&(r.head&&(k=r.head.extra_len-r.length,r.head.extra||(r.head.extra=new Array(r.head.extra_len)),I.arraySet(r.head.extra,i,s,c,k)),512&r.flags&&(r.check=B(r.check,i,c,s)),o-=c,s+=c,r.length-=c),r.length))break t;r.length=0,r.mode=7;case 7:if(2048&r.flags){if(0===o)break t;for(c=0;k=i[s+c++],r.head&&k&&r.length<65536&&(r.head.name+=String.fromCharCode(k)),k&&c<o;);if(512&r.flags&&(r.check=B(r.check,i,c,s)),o-=c,s+=c,k)break t}else r.head&&(r.head.name=null);r.length=0,r.mode=8;case 8:if(4096&r.flags){if(0===o)break t;for(c=0;k=i[s+c++],r.head&&k&&r.length<65536&&(r.head.comment+=String.fromCharCode(k)),k&&c<o;);if(512&r.flags&&(r.check=B(r.check,i,c,s)),o-=c,s+=c,k)break t}else r.head&&(r.head.comment=null);r.mode=9;case 9:if(512&r.flags){for(;l<16;){if(0===o)break t;o--,u+=i[s++]<<l,l+=8}if(u!==(65535&r.check)){t.msg="header crc mismatch",r.mode=30;break}l=u=0}r.head&&(r.head.hcrc=r.flags>>9&1,r.head.done=!0),t.adler=r.check=0,r.mode=12;break;case 10:for(;l<32;){if(0===o)break t;o--,u+=i[s++]<<l,l+=8}t.adler=r.check=L(u),l=u=0,r.mode=11;case 11:if(0===r.havedict)return t.next_out=a,t.avail_out=h,t.next_in=s,t.avail_in=o,r.hold=u,r.bits=l,2;t.adler=r.check=1,r.mode=12;case 12:if(5===e||6===e)break t;case 13:if(r.last){u>>>=7&l,l-=7&l,r.mode=27;break}for(;l<3;){if(0===o)break t;o--,u+=i[s++]<<l,l+=8}switch(r.last=1&u,l-=1,3&(u>>>=1)){case 0:r.mode=14;break;case 1:if(j(r),r.mode=20,6!==e)break;u>>>=2,l-=2;break t;case 2:r.mode=17;break;case 3:t.msg="invalid block type",r.mode=30}u>>>=2,l-=2;break;case 14:for(u>>>=7&l,l-=7&l;l<32;){if(0===o)break t;o--,u+=i[s++]<<l,l+=8}if((65535&u)!=(u>>>16^65535)){t.msg="invalid stored block lengths",r.mode=30;break}if(r.length=65535&u,l=u=0,r.mode=15,6===e)break t;case 15:r.mode=16;case 16:if(c=r.length){if(o<c&&(c=o),h<c&&(c=h),0===c)break t;I.arraySet(n,i,s,c,a),o-=c,s+=c,h-=c,a+=c,r.length-=c;break}r.mode=12;break;case 17:for(;l<14;){if(0===o)break t;o--,u+=i[s++]<<l,l+=8}if(r.nlen=257+(31&u),u>>>=5,l-=5,r.ndist=1+(31&u),u>>>=5,l-=5,r.ncode=4+(15&u),u>>>=4,l-=4,286<r.nlen||30<r.ndist){t.msg="too many length or distance symbols",r.mode=30;break}r.have=0,r.mode=18;case 18:for(;r.have<r.ncode;){for(;l<3;){if(0===o)break t;o--,u+=i[s++]<<l,l+=8}r.lens[A[r.have++]]=7&u,u>>>=3,l-=3}for(;r.have<19;)r.lens[A[r.have++]]=0;if(r.lencode=r.lendyn,r.lenbits=7,S={bits:r.lenbits},x=T(0,r.lens,0,19,r.lencode,0,r.work,S),r.lenbits=S.bits,x){t.msg="invalid code lengths set",r.mode=30;break}r.have=0,r.mode=19;case 19:for(;r.have<r.nlen+r.ndist;){for(;g=(C=r.lencode[u&(1<<r.lenbits)-1])>>>16&255,b=65535&C,!((_=C>>>24)<=l);){if(0===o)break t;o--,u+=i[s++]<<l,l+=8}if(b<16)u>>>=_,l-=_,r.lens[r.have++]=b;else{if(16===b){for(z=_+2;l<z;){if(0===o)break t;o--,u+=i[s++]<<l,l+=8}if(u>>>=_,l-=_,0===r.have){t.msg="invalid bit length repeat",r.mode=30;break}k=r.lens[r.have-1],c=3+(3&u),u>>>=2,l-=2}else if(17===b){for(z=_+3;l<z;){if(0===o)break t;o--,u+=i[s++]<<l,l+=8}l-=_,k=0,c=3+(7&(u>>>=_)),u>>>=3,l-=3}else{for(z=_+7;l<z;){if(0===o)break t;o--,u+=i[s++]<<l,l+=8}l-=_,k=0,c=11+(127&(u>>>=_)),u>>>=7,l-=7}if(r.have+c>r.nlen+r.ndist){t.msg="invalid bit length repeat",r.mode=30;break}for(;c--;)r.lens[r.have++]=k}}if(30===r.mode)break;if(0===r.lens[256]){t.msg="invalid code -- missing end-of-block",r.mode=30;break}if(r.lenbits=9,S={bits:r.lenbits},x=T(D,r.lens,0,r.nlen,r.lencode,0,r.work,S),r.lenbits=S.bits,x){t.msg="invalid literal/lengths set",r.mode=30;break}if(r.distbits=6,r.distcode=r.distdyn,S={bits:r.distbits},x=T(F,r.lens,r.nlen,r.ndist,r.distcode,0,r.work,S),r.distbits=S.bits,x){t.msg="invalid distances set",r.mode=30;break}if(r.mode=20,6===e)break t;case 20:r.mode=21;case 21:if(6<=o&&258<=h){t.next_out=a,t.avail_out=h,t.next_in=s,t.avail_in=o,r.hold=u,r.bits=l,R(t,d),a=t.next_out,n=t.output,h=t.avail_out,s=t.next_in,i=t.input,o=t.avail_in,u=r.hold,l=r.bits,12===r.mode&&(r.back=-1);break}for(r.back=0;g=(C=r.lencode[u&(1<<r.lenbits)-1])>>>16&255,b=65535&C,!((_=C>>>24)<=l);){if(0===o)break t;o--,u+=i[s++]<<l,l+=8}if(g&&0==(240&g)){for(v=_,y=g,w=b;g=(C=r.lencode[w+((u&(1<<v+y)-1)>>v)])>>>16&255,b=65535&C,!(v+(_=C>>>24)<=l);){if(0===o)break t;o--,u+=i[s++]<<l,l+=8}u>>>=v,l-=v,r.back+=v}if(u>>>=_,l-=_,r.back+=_,r.length=b,0===g){r.mode=26;break}if(32&g){r.back=-1,r.mode=12;break}if(64&g){t.msg="invalid literal/length code",r.mode=30;break}r.extra=15&g,r.mode=22;case 22:if(r.extra){for(z=r.extra;l<z;){if(0===o)break t;o--,u+=i[s++]<<l,l+=8}r.length+=u&(1<<r.extra)-1,u>>>=r.extra,l-=r.extra,r.back+=r.extra}r.was=r.length,r.mode=23;case 23:for(;g=(C=r.distcode[u&(1<<r.distbits)-1])>>>16&255,b=65535&C,!((_=C>>>24)<=l);){if(0===o)break t;o--,u+=i[s++]<<l,l+=8}if(0==(240&g)){for(v=_,y=g,w=b;g=(C=r.distcode[w+((u&(1<<v+y)-1)>>v)])>>>16&255,b=65535&C,!(v+(_=C>>>24)<=l);){if(0===o)break t;o--,u+=i[s++]<<l,l+=8}u>>>=v,l-=v,r.back+=v}if(u>>>=_,l-=_,r.back+=_,64&g){t.msg="invalid distance code",r.mode=30;break}r.offset=b,r.extra=15&g,r.mode=24;case 24:if(r.extra){for(z=r.extra;l<z;){if(0===o)break t;o--,u+=i[s++]<<l,l+=8}r.offset+=u&(1<<r.extra)-1,u>>>=r.extra,l-=r.extra,r.back+=r.extra}if(r.offset>r.dmax){t.msg="invalid distance too far back",r.mode=30;break}r.mode=25;case 25:if(0===h)break t;if(c=d-h,r.offset>c){if((c=r.offset-c)>r.whave&&r.sane){t.msg="invalid distance too far back",r.mode=30;break}p=c>r.wnext?(c-=r.wnext,r.wsize-c):r.wnext-c,c>r.length&&(c=r.length),m=r.window}else m=n,p=a-r.offset,c=r.length;for(h<c&&(c=h),h-=c,r.length-=c;n[a++]=m[p++],--c;);0===r.length&&(r.mode=21);break;case 26:if(0===h)break t;n[a++]=r.length,h--,r.mode=21;break;case 27:if(r.wrap){for(;l<32;){if(0===o)break t;o--,u|=i[s++]<<l,l+=8}if(d-=h,t.total_out+=d,r.total+=d,d&&(t.adler=r.check=r.flags?B(r.check,n,d,a-d):O(r.check,n,d,a-d)),d=h,(r.flags?u:L(u))!==r.check){t.msg="incorrect data check",r.mode=30;break}l=u=0}r.mode=28;case 28:if(r.wrap&&r.flags){for(;l<32;){if(0===o)break t;o--,u+=i[s++]<<l,l+=8}if(u!==(4294967295&r.total)){t.msg="incorrect length check",r.mode=30;break}l=u=0}r.mode=29;case 29:x=1;break t;case 30:x=-3;break t;case 31:return-4;case 32:default:return U}return t.next_out=a,t.avail_out=h,t.next_in=s,t.avail_in=o,r.hold=u,r.bits=l,(r.wsize||d!==t.avail_out&&r.mode<30&&(r.mode<27||4!==e))&&Z(t,t.output,t.next_out,d-t.avail_out)?(r.mode=31,-4):(f-=t.avail_in,d-=t.avail_out,t.total_in+=f,t.total_out+=d,r.total+=d,r.wrap&&d&&(t.adler=r.check=r.flags?B(r.check,n,d,t.next_out-d):O(r.check,n,d,t.next_out-d)),t.data_type=r.bits+(r.last?64:0)+(12===r.mode?128:0)+(20===r.mode||15===r.mode?256:0),(0==f&&0===d||4===e)&&x===N&&(x=-5),x)},r.inflateEnd=function(t){if(!t||!t.state)return U;var e=t.state;return e.window&&(e.window=null),t.state=null,N},r.inflateGetHeader=function(t,e){var r;return t&&t.state?0==(2&(r=t.state).wrap)?U:((r.head=e).done=!1,N):U},r.inflateSetDictionary=function(t,e){var r,i=e.length;return t&&t.state?0!==(r=t.state).wrap&&11!==r.mode?U:11===r.mode&&O(1,e,i,0)!==r.check?-3:Z(t,e,i,i)?(r.mode=31,-4):(r.havedict=1,N):U},r.inflateInfo="pako inflate (from Nodeca project)"},{"../utils/common":41,"./adler32":43,"./crc32":45,"./inffast":48,"./inftrees":50}],50:[function(t,e,r){"use strict";var D=t("../utils/common"),F=[3,4,5,6,7,8,9,10,11,13,15,17,19,23,27,31,35,43,51,59,67,83,99,115,131,163,195,227,258,0,0],N=[16,16,16,16,16,16,16,16,17,17,17,17,18,18,18,18,19,19,19,19,20,20,20,20,21,21,21,21,16,72,78],U=[1,2,3,4,5,7,9,13,17,25,33,49,65,97,129,193,257,385,513,769,1025,1537,2049,3073,4097,6145,8193,12289,16385,24577,0,0],P=[16,16,16,16,17,17,18,18,19,19,20,20,21,21,22,22,23,23,24,24,25,25,26,26,27,27,28,28,29,29,64,64];e.exports=function(t,e,r,i,n,s,a,o){var h,u,l,f,d,c,p,m,_,g=o.bits,b=0,v=0,y=0,w=0,k=0,x=0,S=0,z=0,C=0,E=0,A=null,I=0,O=new D.Buf16(16),B=new D.Buf16(16),R=null,T=0;for(b=0;b<=15;b++)O[b]=0;for(v=0;v<i;v++)O[e[r+v]]++;for(k=g,w=15;1<=w&&0===O[w];w--);if(w<k&&(k=w),0===w)return n[s++]=20971520,n[s++]=20971520,o.bits=1,0;for(y=1;y<w&&0===O[y];y++);for(k<y&&(k=y),b=z=1;b<=15;b++)if(z<<=1,(z-=O[b])<0)return-1;if(0<z&&(0===t||1!==w))return-1;for(B[1]=0,b=1;b<15;b++)B[b+1]=B[b]+O[b];for(v=0;v<i;v++)0!==e[r+v]&&(a[B[e[r+v]]++]=v);if(c=0===t?(A=R=a,19):1===t?(A=F,I-=257,R=N,T-=257,256):(A=U,R=P,-1),b=y,d=s,S=v=E=0,l=-1,f=(C=1<<(x=k))-1,1===t&&852<C||2===t&&592<C)return 1;for(;;){for(p=b-S,_=a[v]<c?(m=0,a[v]):a[v]>c?(m=R[T+a[v]],A[I+a[v]]):(m=96,0),h=1<<b-S,y=u=1<<x;n[d+(E>>S)+(u-=h)]=p<<24|m<<16|_|0,0!==u;);for(h=1<<b-1;E&h;)h>>=1;if(0!==h?(E&=h-1,E+=h):E=0,v++,0==--O[b]){if(b===w)break;b=e[r+a[v]]}if(k<b&&(E&f)!==l){for(0===S&&(S=k),d+=y,z=1<<(x=b-S);x+S<w&&!((z-=O[x+S])<=0);)x++,z<<=1;if(C+=1<<x,1===t&&852<C||2===t&&592<C)return 1;n[l=E&f]=k<<24|x<<16|d-s|0}}return 0!==E&&(n[d+E]=b-S<<24|64<<16|0),o.bits=k,0}},{"../utils/common":41}],51:[function(t,e,r){"use strict";e.exports={2:"need dictionary",1:"stream end",0:"","-1":"file error","-2":"stream error","-3":"data error","-4":"insufficient memory","-5":"buffer error","-6":"incompatible version"}},{}],52:[function(t,e,r){"use strict";var n=t("../utils/common"),o=0,h=1;function i(t){for(var e=t.length;0<=--e;)t[e]=0}var s=0,a=29,u=256,l=u+1+a,f=30,d=19,_=2*l+1,g=15,c=16,p=7,m=256,b=16,v=17,y=18,w=[0,0,0,0,0,0,0,0,1,1,1,1,2,2,2,2,3,3,3,3,4,4,4,4,5,5,5,5,0],k=[0,0,0,0,1,1,2,2,3,3,4,4,5,5,6,6,7,7,8,8,9,9,10,10,11,11,12,12,13,13],x=[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,2,3,7],S=[16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15],z=new Array(2*(l+2));i(z);var C=new Array(2*f);i(C);var E=new Array(512);i(E);var A=new Array(256);i(A);var I=new Array(a);i(I);var O,B,R,T=new Array(f);function D(t,e,r,i,n){this.static_tree=t,this.extra_bits=e,this.extra_base=r,this.elems=i,this.max_length=n,this.has_stree=t&&t.length}function F(t,e){this.dyn_tree=t,this.max_code=0,this.stat_desc=e}function N(t){return t<256?E[t]:E[256+(t>>>7)]}function U(t,e){t.pending_buf[t.pending++]=255&e,t.pending_buf[t.pending++]=e>>>8&255}function P(t,e,r){t.bi_valid>c-r?(t.bi_buf|=e<<t.bi_valid&65535,U(t,t.bi_buf),t.bi_buf=e>>c-t.bi_valid,t.bi_valid+=r-c):(t.bi_buf|=e<<t.bi_valid&65535,t.bi_valid+=r)}function L(t,e,r){P(t,r[2*e],r[2*e+1])}function j(t,e){for(var r=0;r|=1&t,t>>>=1,r<<=1,0<--e;);return r>>>1}function Z(t,e,r){var i,n,s=new Array(g+1),a=0;for(i=1;i<=g;i++)s[i]=a=a+r[i-1]<<1;for(n=0;n<=e;n++){var o=t[2*n+1];0!==o&&(t[2*n]=j(s[o]++,o))}}function W(t){var e;for(e=0;e<l;e++)t.dyn_ltree[2*e]=0;for(e=0;e<f;e++)t.dyn_dtree[2*e]=0;for(e=0;e<d;e++)t.bl_tree[2*e]=0;t.dyn_ltree[2*m]=1,t.opt_len=t.static_len=0,t.last_lit=t.matches=0}function M(t){8<t.bi_valid?U(t,t.bi_buf):0<t.bi_valid&&(t.pending_buf[t.pending++]=t.bi_buf),t.bi_buf=0,t.bi_valid=0}function H(t,e,r,i){var n=2*e,s=2*r;return t[n]<t[s]||t[n]===t[s]&&i[e]<=i[r]}function G(t,e,r){for(var i=t.heap[r],n=r<<1;n<=t.heap_len&&(n<t.heap_len&&H(e,t.heap[n+1],t.heap[n],t.depth)&&n++,!H(e,i,t.heap[n],t.depth));)t.heap[r]=t.heap[n],r=n,n<<=1;t.heap[r]=i}function K(t,e,r){var i,n,s,a,o=0;if(0!==t.last_lit)for(;i=t.pending_buf[t.d_buf+2*o]<<8|t.pending_buf[t.d_buf+2*o+1],n=t.pending_buf[t.l_buf+o],o++,0===i?L(t,n,e):(L(t,(s=A[n])+u+1,e),0!==(a=w[s])&&P(t,n-=I[s],a),L(t,s=N(--i),r),0!==(a=k[s])&&P(t,i-=T[s],a)),o<t.last_lit;);L(t,m,e)}function Y(t,e){var r,i,n,s=e.dyn_tree,a=e.stat_desc.static_tree,o=e.stat_desc.has_stree,h=e.stat_desc.elems,u=-1;for(t.heap_len=0,t.heap_max=_,r=0;r<h;r++)0!==s[2*r]?(t.heap[++t.heap_len]=u=r,t.depth[r]=0):s[2*r+1]=0;for(;t.heap_len<2;)s[2*(n=t.heap[++t.heap_len]=u<2?++u:0)]=1,t.depth[n]=0,t.opt_len--,o&&(t.static_len-=a[2*n+1]);for(e.max_code=u,r=t.heap_len>>1;1<=r;r--)G(t,s,r);for(n=h;r=t.heap[1],t.heap[1]=t.heap[t.heap_len--],G(t,s,1),i=t.heap[1],t.heap[--t.heap_max]=r,t.heap[--t.heap_max]=i,s[2*n]=s[2*r]+s[2*i],t.depth[n]=(t.depth[r]>=t.depth[i]?t.depth[r]:t.depth[i])+1,s[2*r+1]=s[2*i+1]=n,t.heap[1]=n++,G(t,s,1),2<=t.heap_len;);t.heap[--t.heap_max]=t.heap[1],function(t,e){var r,i,n,s,a,o,h=e.dyn_tree,u=e.max_code,l=e.stat_desc.static_tree,f=e.stat_desc.has_stree,d=e.stat_desc.extra_bits,c=e.stat_desc.extra_base,p=e.stat_desc.max_length,m=0;for(s=0;s<=g;s++)t.bl_count[s]=0;for(h[2*t.heap[t.heap_max]+1]=0,r=t.heap_max+1;r<_;r++)p<(s=h[2*h[2*(i=t.heap[r])+1]+1]+1)&&(s=p,m++),h[2*i+1]=s,u<i||(t.bl_count[s]++,a=0,c<=i&&(a=d[i-c]),o=h[2*i],t.opt_len+=o*(s+a),f&&(t.static_len+=o*(l[2*i+1]+a)));if(0!==m){do{for(s=p-1;0===t.bl_count[s];)s--;t.bl_count[s]--,t.bl_count[s+1]+=2,t.bl_count[p]--,m-=2}while(0<m);for(s=p;0!==s;s--)for(i=t.bl_count[s];0!==i;)u<(n=t.heap[--r])||(h[2*n+1]!==s&&(t.opt_len+=(s-h[2*n+1])*h[2*n],h[2*n+1]=s),i--)}}(t,e),Z(s,u,t.bl_count)}function X(t,e,r){var i,n,s=-1,a=e[1],o=0,h=7,u=4;for(0===a&&(h=138,u=3),e[2*(r+1)+1]=65535,i=0;i<=r;i++)n=a,a=e[2*(i+1)+1],++o<h&&n===a||(o<u?t.bl_tree[2*n]+=o:0!==n?(n!==s&&t.bl_tree[2*n]++,t.bl_tree[2*b]++):o<=10?t.bl_tree[2*v]++:t.bl_tree[2*y]++,s=n,u=(o=0)===a?(h=138,3):n===a?(h=6,3):(h=7,4))}function V(t,e,r){var i,n,s=-1,a=e[1],o=0,h=7,u=4;for(0===a&&(h=138,u=3),i=0;i<=r;i++)if(n=a,a=e[2*(i+1)+1],!(++o<h&&n===a)){if(o<u)for(;L(t,n,t.bl_tree),0!=--o;);else 0!==n?(n!==s&&(L(t,n,t.bl_tree),o--),L(t,b,t.bl_tree),P(t,o-3,2)):o<=10?(L(t,v,t.bl_tree),P(t,o-3,3)):(L(t,y,t.bl_tree),P(t,o-11,7));s=n,u=(o=0)===a?(h=138,3):n===a?(h=6,3):(h=7,4)}}i(T);var q=!1;function J(t,e,r,i){P(t,(s<<1)+(i?1:0),3),function(t,e,r,i){M(t),i&&(U(t,r),U(t,~r)),n.arraySet(t.pending_buf,t.window,e,r,t.pending),t.pending+=r}(t,e,r,!0)}r._tr_init=function(t){q||(function(){var t,e,r,i,n,s=new Array(g+1);for(i=r=0;i<a-1;i++)for(I[i]=r,t=0;t<1<<w[i];t++)A[r++]=i;for(A[r-1]=i,i=n=0;i<16;i++)for(T[i]=n,t=0;t<1<<k[i];t++)E[n++]=i;for(n>>=7;i<f;i++)for(T[i]=n<<7,t=0;t<1<<k[i]-7;t++)E[256+n++]=i;for(e=0;e<=g;e++)s[e]=0;for(t=0;t<=143;)z[2*t+1]=8,t++,s[8]++;for(;t<=255;)z[2*t+1]=9,t++,s[9]++;for(;t<=279;)z[2*t+1]=7,t++,s[7]++;for(;t<=287;)z[2*t+1]=8,t++,s[8]++;for(Z(z,l+1,s),t=0;t<f;t++)C[2*t+1]=5,C[2*t]=j(t,5);O=new D(z,w,u+1,l,g),B=new D(C,k,0,f,g),R=new D(new Array(0),x,0,d,p)}(),q=!0),t.l_desc=new F(t.dyn_ltree,O),t.d_desc=new F(t.dyn_dtree,B),t.bl_desc=new F(t.bl_tree,R),t.bi_buf=0,t.bi_valid=0,W(t)},r._tr_stored_block=J,r._tr_flush_block=function(t,e,r,i){var n,s,a=0;0<t.level?(2===t.strm.data_type&&(t.strm.data_type=function(t){var e,r=4093624447;for(e=0;e<=31;e++,r>>>=1)if(1&r&&0!==t.dyn_ltree[2*e])return o;if(0!==t.dyn_ltree[18]||0!==t.dyn_ltree[20]||0!==t.dyn_ltree[26])return h;for(e=32;e<u;e++)if(0!==t.dyn_ltree[2*e])return h;return o}(t)),Y(t,t.l_desc),Y(t,t.d_desc),a=function(t){var e;for(X(t,t.dyn_ltree,t.l_desc.max_code),X(t,t.dyn_dtree,t.d_desc.max_code),Y(t,t.bl_desc),e=d-1;3<=e&&0===t.bl_tree[2*S[e]+1];e--);return t.opt_len+=3*(e+1)+5+5+4,e}(t),n=t.opt_len+3+7>>>3,(s=t.static_len+3+7>>>3)<=n&&(n=s)):n=s=r+5,r+4<=n&&-1!==e?J(t,e,r,i):4===t.strategy||s===n?(P(t,2+(i?1:0),3),K(t,z,C)):(P(t,4+(i?1:0),3),function(t,e,r,i){var n;for(P(t,e-257,5),P(t,r-1,5),P(t,i-4,4),n=0;n<i;n++)P(t,t.bl_tree[2*S[n]+1],3);V(t,t.dyn_ltree,e-1),V(t,t.dyn_dtree,r-1)}(t,t.l_desc.max_code+1,t.d_desc.max_code+1,a+1),K(t,t.dyn_ltree,t.dyn_dtree)),W(t),i&&M(t)},r._tr_tally=function(t,e,r){return t.pending_buf[t.d_buf+2*t.last_lit]=e>>>8&255,t.pending_buf[t.d_buf+2*t.last_lit+1]=255&e,t.pending_buf[t.l_buf+t.last_lit]=255&r,t.last_lit++,0===e?t.dyn_ltree[2*r]++:(t.matches++,e--,t.dyn_ltree[2*(A[r]+u+1)]++,t.dyn_dtree[2*N(e)]++),t.last_lit===t.lit_bufsize-1},r._tr_align=function(t){P(t,2,3),L(t,m,z),function(t){16===t.bi_valid?(U(t,t.bi_buf),t.bi_buf=0,t.bi_valid=0):8<=t.bi_valid&&(t.pending_buf[t.pending++]=255&t.bi_buf,t.bi_buf>>=8,t.bi_valid-=8)}(t)}},{"../utils/common":41}],53:[function(t,e,r){"use strict";e.exports=function(){this.input=null,this.next_in=0,this.avail_in=0,this.total_in=0,this.output=null,this.next_out=0,this.avail_out=0,this.total_out=0,this.msg="",this.state=null,this.data_type=2,this.adler=0}},{}],54:[function(t,e,r){"use strict";e.exports="function"==typeof setImmediate?setImmediate:function(){var t=[].slice.apply(arguments);t.splice(1,0,0),setTimeout.apply(null,t)}},{}]},{},[10])(10)});
  6930. /* WEBPACK VAR INJECTION */}.call(exports, __webpack_require__(55).Buffer, __webpack_require__(11), __webpack_require__(59).setImmediate))
  6931. /***/ }),
  6932. /* 55 */
  6933. /***/ (function(module, exports, __webpack_require__) {
  6934. "use strict";
  6935. /* WEBPACK VAR INJECTION */(function(global) {/*!
  6936. * The buffer module from node.js, for the browser.
  6937. *
  6938. * @author Feross Aboukhadijeh <http://feross.org>
  6939. * @license MIT
  6940. */
  6941. /* eslint-disable no-proto */
  6942. var base64 = __webpack_require__(56)
  6943. var ieee754 = __webpack_require__(57)
  6944. var isArray = __webpack_require__(58)
  6945. exports.Buffer = Buffer
  6946. exports.SlowBuffer = SlowBuffer
  6947. exports.INSPECT_MAX_BYTES = 50
  6948. /**
  6949. * If `Buffer.TYPED_ARRAY_SUPPORT`:
  6950. * === true Use Uint8Array implementation (fastest)
  6951. * === false Use Object implementation (most compatible, even IE6)
  6952. *
  6953. * Browsers that support typed arrays are IE 10+, Firefox 4+, Chrome 7+, Safari 5.1+,
  6954. * Opera 11.6+, iOS 4.2+.
  6955. *
  6956. * Due to various browser bugs, sometimes the Object implementation will be used even
  6957. * when the browser supports typed arrays.
  6958. *
  6959. * Note:
  6960. *
  6961. * - Firefox 4-29 lacks support for adding new properties to `Uint8Array` instances,
  6962. * See: https://bugzilla.mozilla.org/show_bug.cgi?id=695438.
  6963. *
  6964. * - Chrome 9-10 is missing the `TypedArray.prototype.subarray` function.
  6965. *
  6966. * - IE10 has a broken `TypedArray.prototype.subarray` function which returns arrays of
  6967. * incorrect length in some situations.
  6968. * We detect these buggy browsers and set `Buffer.TYPED_ARRAY_SUPPORT` to `false` so they
  6969. * get the Object implementation, which is slower but behaves correctly.
  6970. */
  6971. Buffer.TYPED_ARRAY_SUPPORT = global.TYPED_ARRAY_SUPPORT !== undefined
  6972. ? global.TYPED_ARRAY_SUPPORT
  6973. : typedArraySupport()
  6974. /*
  6975. * Export kMaxLength after typed array support is determined.
  6976. */
  6977. exports.kMaxLength = kMaxLength()
  6978. function typedArraySupport () {
  6979. try {
  6980. var arr = new Uint8Array(1)
  6981. arr.__proto__ = {__proto__: Uint8Array.prototype, foo: function () { return 42 }}
  6982. return arr.foo() === 42 && // typed array instances can be augmented
  6983. typeof arr.subarray === 'function' && // chrome 9-10 lack `subarray`
  6984. arr.subarray(1, 1).byteLength === 0 // ie10 has broken `subarray`
  6985. } catch (e) {
  6986. return false
  6987. }
  6988. }
  6989. function kMaxLength () {
  6990. return Buffer.TYPED_ARRAY_SUPPORT
  6991. ? 0x7fffffff
  6992. : 0x3fffffff
  6993. }
  6994. function createBuffer (that, length) {
  6995. if (kMaxLength() < length) {
  6996. throw new RangeError('Invalid typed array length')
  6997. }
  6998. if (Buffer.TYPED_ARRAY_SUPPORT) {
  6999. // Return an augmented `Uint8Array` instance, for best performance
  7000. that = new Uint8Array(length)
  7001. that.__proto__ = Buffer.prototype
  7002. } else {
  7003. // Fallback: Return an object instance of the Buffer class
  7004. if (that === null) {
  7005. that = new Buffer(length)
  7006. }
  7007. that.length = length
  7008. }
  7009. return that
  7010. }
  7011. /**
  7012. * The Buffer constructor returns instances of `Uint8Array` that have their
  7013. * prototype changed to `Buffer.prototype`. Furthermore, `Buffer` is a subclass of
  7014. * `Uint8Array`, so the returned instances will have all the node `Buffer` methods
  7015. * and the `Uint8Array` methods. Square bracket notation works as expected -- it
  7016. * returns a single octet.
  7017. *
  7018. * The `Uint8Array` prototype remains unmodified.
  7019. */
  7020. function Buffer (arg, encodingOrOffset, length) {
  7021. if (!Buffer.TYPED_ARRAY_SUPPORT && !(this instanceof Buffer)) {
  7022. return new Buffer(arg, encodingOrOffset, length)
  7023. }
  7024. // Common case.
  7025. if (typeof arg === 'number') {
  7026. if (typeof encodingOrOffset === 'string') {
  7027. throw new Error(
  7028. 'If encoding is specified then the first argument must be a string'
  7029. )
  7030. }
  7031. return allocUnsafe(this, arg)
  7032. }
  7033. return from(this, arg, encodingOrOffset, length)
  7034. }
  7035. Buffer.poolSize = 8192 // not used by this implementation
  7036. // TODO: Legacy, not needed anymore. Remove in next major version.
  7037. Buffer._augment = function (arr) {
  7038. arr.__proto__ = Buffer.prototype
  7039. return arr
  7040. }
  7041. function from (that, value, encodingOrOffset, length) {
  7042. if (typeof value === 'number') {
  7043. throw new TypeError('"value" argument must not be a number')
  7044. }
  7045. if (typeof ArrayBuffer !== 'undefined' && value instanceof ArrayBuffer) {
  7046. return fromArrayBuffer(that, value, encodingOrOffset, length)
  7047. }
  7048. if (typeof value === 'string') {
  7049. return fromString(that, value, encodingOrOffset)
  7050. }
  7051. return fromObject(that, value)
  7052. }
  7053. /**
  7054. * Functionally equivalent to Buffer(arg, encoding) but throws a TypeError
  7055. * if value is a number.
  7056. * Buffer.from(str[, encoding])
  7057. * Buffer.from(array)
  7058. * Buffer.from(buffer)
  7059. * Buffer.from(arrayBuffer[, byteOffset[, length]])
  7060. **/
  7061. Buffer.from = function (value, encodingOrOffset, length) {
  7062. return from(null, value, encodingOrOffset, length)
  7063. }
  7064. if (Buffer.TYPED_ARRAY_SUPPORT) {
  7065. Buffer.prototype.__proto__ = Uint8Array.prototype
  7066. Buffer.__proto__ = Uint8Array
  7067. if (typeof Symbol !== 'undefined' && Symbol.species &&
  7068. Buffer[Symbol.species] === Buffer) {
  7069. // Fix subarray() in ES2016. See: https://github.com/feross/buffer/pull/97
  7070. Object.defineProperty(Buffer, Symbol.species, {
  7071. value: null,
  7072. configurable: true
  7073. })
  7074. }
  7075. }
  7076. function assertSize (size) {
  7077. if (typeof size !== 'number') {
  7078. throw new TypeError('"size" argument must be a number')
  7079. } else if (size < 0) {
  7080. throw new RangeError('"size" argument must not be negative')
  7081. }
  7082. }
  7083. function alloc (that, size, fill, encoding) {
  7084. assertSize(size)
  7085. if (size <= 0) {
  7086. return createBuffer(that, size)
  7087. }
  7088. if (fill !== undefined) {
  7089. // Only pay attention to encoding if it's a string. This
  7090. // prevents accidentally sending in a number that would
  7091. // be interpretted as a start offset.
  7092. return typeof encoding === 'string'
  7093. ? createBuffer(that, size).fill(fill, encoding)
  7094. : createBuffer(that, size).fill(fill)
  7095. }
  7096. return createBuffer(that, size)
  7097. }
  7098. /**
  7099. * Creates a new filled Buffer instance.
  7100. * alloc(size[, fill[, encoding]])
  7101. **/
  7102. Buffer.alloc = function (size, fill, encoding) {
  7103. return alloc(null, size, fill, encoding)
  7104. }
  7105. function allocUnsafe (that, size) {
  7106. assertSize(size)
  7107. that = createBuffer(that, size < 0 ? 0 : checked(size) | 0)
  7108. if (!Buffer.TYPED_ARRAY_SUPPORT) {
  7109. for (var i = 0; i < size; ++i) {
  7110. that[i] = 0
  7111. }
  7112. }
  7113. return that
  7114. }
  7115. /**
  7116. * Equivalent to Buffer(num), by default creates a non-zero-filled Buffer instance.
  7117. * */
  7118. Buffer.allocUnsafe = function (size) {
  7119. return allocUnsafe(null, size)
  7120. }
  7121. /**
  7122. * Equivalent to SlowBuffer(num), by default creates a non-zero-filled Buffer instance.
  7123. */
  7124. Buffer.allocUnsafeSlow = function (size) {
  7125. return allocUnsafe(null, size)
  7126. }
  7127. function fromString (that, string, encoding) {
  7128. if (typeof encoding !== 'string' || encoding === '') {
  7129. encoding = 'utf8'
  7130. }
  7131. if (!Buffer.isEncoding(encoding)) {
  7132. throw new TypeError('"encoding" must be a valid string encoding')
  7133. }
  7134. var length = byteLength(string, encoding) | 0
  7135. that = createBuffer(that, length)
  7136. var actual = that.write(string, encoding)
  7137. if (actual !== length) {
  7138. // Writing a hex string, for example, that contains invalid characters will
  7139. // cause everything after the first invalid character to be ignored. (e.g.
  7140. // 'abxxcd' will be treated as 'ab')
  7141. that = that.slice(0, actual)
  7142. }
  7143. return that
  7144. }
  7145. function fromArrayLike (that, array) {
  7146. var length = array.length < 0 ? 0 : checked(array.length) | 0
  7147. that = createBuffer(that, length)
  7148. for (var i = 0; i < length; i += 1) {
  7149. that[i] = array[i] & 255
  7150. }
  7151. return that
  7152. }
  7153. function fromArrayBuffer (that, array, byteOffset, length) {
  7154. array.byteLength // this throws if `array` is not a valid ArrayBuffer
  7155. if (byteOffset < 0 || array.byteLength < byteOffset) {
  7156. throw new RangeError('\'offset\' is out of bounds')
  7157. }
  7158. if (array.byteLength < byteOffset + (length || 0)) {
  7159. throw new RangeError('\'length\' is out of bounds')
  7160. }
  7161. if (byteOffset === undefined && length === undefined) {
  7162. array = new Uint8Array(array)
  7163. } else if (length === undefined) {
  7164. array = new Uint8Array(array, byteOffset)
  7165. } else {
  7166. array = new Uint8Array(array, byteOffset, length)
  7167. }
  7168. if (Buffer.TYPED_ARRAY_SUPPORT) {
  7169. // Return an augmented `Uint8Array` instance, for best performance
  7170. that = array
  7171. that.__proto__ = Buffer.prototype
  7172. } else {
  7173. // Fallback: Return an object instance of the Buffer class
  7174. that = fromArrayLike(that, array)
  7175. }
  7176. return that
  7177. }
  7178. function fromObject (that, obj) {
  7179. if (Buffer.isBuffer(obj)) {
  7180. var len = checked(obj.length) | 0
  7181. that = createBuffer(that, len)
  7182. if (that.length === 0) {
  7183. return that
  7184. }
  7185. obj.copy(that, 0, 0, len)
  7186. return that
  7187. }
  7188. if (obj) {
  7189. if ((typeof ArrayBuffer !== 'undefined' &&
  7190. obj.buffer instanceof ArrayBuffer) || 'length' in obj) {
  7191. if (typeof obj.length !== 'number' || isnan(obj.length)) {
  7192. return createBuffer(that, 0)
  7193. }
  7194. return fromArrayLike(that, obj)
  7195. }
  7196. if (obj.type === 'Buffer' && isArray(obj.data)) {
  7197. return fromArrayLike(that, obj.data)
  7198. }
  7199. }
  7200. throw new TypeError('First argument must be a string, Buffer, ArrayBuffer, Array, or array-like object.')
  7201. }
  7202. function checked (length) {
  7203. // Note: cannot use `length < kMaxLength()` here because that fails when
  7204. // length is NaN (which is otherwise coerced to zero.)
  7205. if (length >= kMaxLength()) {
  7206. throw new RangeError('Attempt to allocate Buffer larger than maximum ' +
  7207. 'size: 0x' + kMaxLength().toString(16) + ' bytes')
  7208. }
  7209. return length | 0
  7210. }
  7211. function SlowBuffer (length) {
  7212. if (+length != length) { // eslint-disable-line eqeqeq
  7213. length = 0
  7214. }
  7215. return Buffer.alloc(+length)
  7216. }
  7217. Buffer.isBuffer = function isBuffer (b) {
  7218. return !!(b != null && b._isBuffer)
  7219. }
  7220. Buffer.compare = function compare (a, b) {
  7221. if (!Buffer.isBuffer(a) || !Buffer.isBuffer(b)) {
  7222. throw new TypeError('Arguments must be Buffers')
  7223. }
  7224. if (a === b) return 0
  7225. var x = a.length
  7226. var y = b.length
  7227. for (var i = 0, len = Math.min(x, y); i < len; ++i) {
  7228. if (a[i] !== b[i]) {
  7229. x = a[i]
  7230. y = b[i]
  7231. break
  7232. }
  7233. }
  7234. if (x < y) return -1
  7235. if (y < x) return 1
  7236. return 0
  7237. }
  7238. Buffer.isEncoding = function isEncoding (encoding) {
  7239. switch (String(encoding).toLowerCase()) {
  7240. case 'hex':
  7241. case 'utf8':
  7242. case 'utf-8':
  7243. case 'ascii':
  7244. case 'latin1':
  7245. case 'binary':
  7246. case 'base64':
  7247. case 'ucs2':
  7248. case 'ucs-2':
  7249. case 'utf16le':
  7250. case 'utf-16le':
  7251. return true
  7252. default:
  7253. return false
  7254. }
  7255. }
  7256. Buffer.concat = function concat (list, length) {
  7257. if (!isArray(list)) {
  7258. throw new TypeError('"list" argument must be an Array of Buffers')
  7259. }
  7260. if (list.length === 0) {
  7261. return Buffer.alloc(0)
  7262. }
  7263. var i
  7264. if (length === undefined) {
  7265. length = 0
  7266. for (i = 0; i < list.length; ++i) {
  7267. length += list[i].length
  7268. }
  7269. }
  7270. var buffer = Buffer.allocUnsafe(length)
  7271. var pos = 0
  7272. for (i = 0; i < list.length; ++i) {
  7273. var buf = list[i]
  7274. if (!Buffer.isBuffer(buf)) {
  7275. throw new TypeError('"list" argument must be an Array of Buffers')
  7276. }
  7277. buf.copy(buffer, pos)
  7278. pos += buf.length
  7279. }
  7280. return buffer
  7281. }
  7282. function byteLength (string, encoding) {
  7283. if (Buffer.isBuffer(string)) {
  7284. return string.length
  7285. }
  7286. if (typeof ArrayBuffer !== 'undefined' && typeof ArrayBuffer.isView === 'function' &&
  7287. (ArrayBuffer.isView(string) || string instanceof ArrayBuffer)) {
  7288. return string.byteLength
  7289. }
  7290. if (typeof string !== 'string') {
  7291. string = '' + string
  7292. }
  7293. var len = string.length
  7294. if (len === 0) return 0
  7295. // Use a for loop to avoid recursion
  7296. var loweredCase = false
  7297. for (;;) {
  7298. switch (encoding) {
  7299. case 'ascii':
  7300. case 'latin1':
  7301. case 'binary':
  7302. return len
  7303. case 'utf8':
  7304. case 'utf-8':
  7305. case undefined:
  7306. return utf8ToBytes(string).length
  7307. case 'ucs2':
  7308. case 'ucs-2':
  7309. case 'utf16le':
  7310. case 'utf-16le':
  7311. return len * 2
  7312. case 'hex':
  7313. return len >>> 1
  7314. case 'base64':
  7315. return base64ToBytes(string).length
  7316. default:
  7317. if (loweredCase) return utf8ToBytes(string).length // assume utf8
  7318. encoding = ('' + encoding).toLowerCase()
  7319. loweredCase = true
  7320. }
  7321. }
  7322. }
  7323. Buffer.byteLength = byteLength
  7324. function slowToString (encoding, start, end) {
  7325. var loweredCase = false
  7326. // No need to verify that "this.length <= MAX_UINT32" since it's a read-only
  7327. // property of a typed array.
  7328. // This behaves neither like String nor Uint8Array in that we set start/end
  7329. // to their upper/lower bounds if the value passed is out of range.
  7330. // undefined is handled specially as per ECMA-262 6th Edition,
  7331. // Section 13.3.3.7 Runtime Semantics: KeyedBindingInitialization.
  7332. if (start === undefined || start < 0) {
  7333. start = 0
  7334. }
  7335. // Return early if start > this.length. Done here to prevent potential uint32
  7336. // coercion fail below.
  7337. if (start > this.length) {
  7338. return ''
  7339. }
  7340. if (end === undefined || end > this.length) {
  7341. end = this.length
  7342. }
  7343. if (end <= 0) {
  7344. return ''
  7345. }
  7346. // Force coersion to uint32. This will also coerce falsey/NaN values to 0.
  7347. end >>>= 0
  7348. start >>>= 0
  7349. if (end <= start) {
  7350. return ''
  7351. }
  7352. if (!encoding) encoding = 'utf8'
  7353. while (true) {
  7354. switch (encoding) {
  7355. case 'hex':
  7356. return hexSlice(this, start, end)
  7357. case 'utf8':
  7358. case 'utf-8':
  7359. return utf8Slice(this, start, end)
  7360. case 'ascii':
  7361. return asciiSlice(this, start, end)
  7362. case 'latin1':
  7363. case 'binary':
  7364. return latin1Slice(this, start, end)
  7365. case 'base64':
  7366. return base64Slice(this, start, end)
  7367. case 'ucs2':
  7368. case 'ucs-2':
  7369. case 'utf16le':
  7370. case 'utf-16le':
  7371. return utf16leSlice(this, start, end)
  7372. default:
  7373. if (loweredCase) throw new TypeError('Unknown encoding: ' + encoding)
  7374. encoding = (encoding + '').toLowerCase()
  7375. loweredCase = true
  7376. }
  7377. }
  7378. }
  7379. // The property is used by `Buffer.isBuffer` and `is-buffer` (in Safari 5-7) to detect
  7380. // Buffer instances.
  7381. Buffer.prototype._isBuffer = true
  7382. function swap (b, n, m) {
  7383. var i = b[n]
  7384. b[n] = b[m]
  7385. b[m] = i
  7386. }
  7387. Buffer.prototype.swap16 = function swap16 () {
  7388. var len = this.length
  7389. if (len % 2 !== 0) {
  7390. throw new RangeError('Buffer size must be a multiple of 16-bits')
  7391. }
  7392. for (var i = 0; i < len; i += 2) {
  7393. swap(this, i, i + 1)
  7394. }
  7395. return this
  7396. }
  7397. Buffer.prototype.swap32 = function swap32 () {
  7398. var len = this.length
  7399. if (len % 4 !== 0) {
  7400. throw new RangeError('Buffer size must be a multiple of 32-bits')
  7401. }
  7402. for (var i = 0; i < len; i += 4) {
  7403. swap(this, i, i + 3)
  7404. swap(this, i + 1, i + 2)
  7405. }
  7406. return this
  7407. }
  7408. Buffer.prototype.swap64 = function swap64 () {
  7409. var len = this.length
  7410. if (len % 8 !== 0) {
  7411. throw new RangeError('Buffer size must be a multiple of 64-bits')
  7412. }
  7413. for (var i = 0; i < len; i += 8) {
  7414. swap(this, i, i + 7)
  7415. swap(this, i + 1, i + 6)
  7416. swap(this, i + 2, i + 5)
  7417. swap(this, i + 3, i + 4)
  7418. }
  7419. return this
  7420. }
  7421. Buffer.prototype.toString = function toString () {
  7422. var length = this.length | 0
  7423. if (length === 0) return ''
  7424. if (arguments.length === 0) return utf8Slice(this, 0, length)
  7425. return slowToString.apply(this, arguments)
  7426. }
  7427. Buffer.prototype.equals = function equals (b) {
  7428. if (!Buffer.isBuffer(b)) throw new TypeError('Argument must be a Buffer')
  7429. if (this === b) return true
  7430. return Buffer.compare(this, b) === 0
  7431. }
  7432. Buffer.prototype.inspect = function inspect () {
  7433. var str = ''
  7434. var max = exports.INSPECT_MAX_BYTES
  7435. if (this.length > 0) {
  7436. str = this.toString('hex', 0, max).match(/.{2}/g).join(' ')
  7437. if (this.length > max) str += ' ... '
  7438. }
  7439. return '<Buffer ' + str + '>'
  7440. }
  7441. Buffer.prototype.compare = function compare (target, start, end, thisStart, thisEnd) {
  7442. if (!Buffer.isBuffer(target)) {
  7443. throw new TypeError('Argument must be a Buffer')
  7444. }
  7445. if (start === undefined) {
  7446. start = 0
  7447. }
  7448. if (end === undefined) {
  7449. end = target ? target.length : 0
  7450. }
  7451. if (thisStart === undefined) {
  7452. thisStart = 0
  7453. }
  7454. if (thisEnd === undefined) {
  7455. thisEnd = this.length
  7456. }
  7457. if (start < 0 || end > target.length || thisStart < 0 || thisEnd > this.length) {
  7458. throw new RangeError('out of range index')
  7459. }
  7460. if (thisStart >= thisEnd && start >= end) {
  7461. return 0
  7462. }
  7463. if (thisStart >= thisEnd) {
  7464. return -1
  7465. }
  7466. if (start >= end) {
  7467. return 1
  7468. }
  7469. start >>>= 0
  7470. end >>>= 0
  7471. thisStart >>>= 0
  7472. thisEnd >>>= 0
  7473. if (this === target) return 0
  7474. var x = thisEnd - thisStart
  7475. var y = end - start
  7476. var len = Math.min(x, y)
  7477. var thisCopy = this.slice(thisStart, thisEnd)
  7478. var targetCopy = target.slice(start, end)
  7479. for (var i = 0; i < len; ++i) {
  7480. if (thisCopy[i] !== targetCopy[i]) {
  7481. x = thisCopy[i]
  7482. y = targetCopy[i]
  7483. break
  7484. }
  7485. }
  7486. if (x < y) return -1
  7487. if (y < x) return 1
  7488. return 0
  7489. }
  7490. // Finds either the first index of `val` in `buffer` at offset >= `byteOffset`,
  7491. // OR the last index of `val` in `buffer` at offset <= `byteOffset`.
  7492. //
  7493. // Arguments:
  7494. // - buffer - a Buffer to search
  7495. // - val - a string, Buffer, or number
  7496. // - byteOffset - an index into `buffer`; will be clamped to an int32
  7497. // - encoding - an optional encoding, relevant is val is a string
  7498. // - dir - true for indexOf, false for lastIndexOf
  7499. function bidirectionalIndexOf (buffer, val, byteOffset, encoding, dir) {
  7500. // Empty buffer means no match
  7501. if (buffer.length === 0) return -1
  7502. // Normalize byteOffset
  7503. if (typeof byteOffset === 'string') {
  7504. encoding = byteOffset
  7505. byteOffset = 0
  7506. } else if (byteOffset > 0x7fffffff) {
  7507. byteOffset = 0x7fffffff
  7508. } else if (byteOffset < -0x80000000) {
  7509. byteOffset = -0x80000000
  7510. }
  7511. byteOffset = +byteOffset // Coerce to Number.
  7512. if (isNaN(byteOffset)) {
  7513. // byteOffset: it it's undefined, null, NaN, "foo", etc, search whole buffer
  7514. byteOffset = dir ? 0 : (buffer.length - 1)
  7515. }
  7516. // Normalize byteOffset: negative offsets start from the end of the buffer
  7517. if (byteOffset < 0) byteOffset = buffer.length + byteOffset
  7518. if (byteOffset >= buffer.length) {
  7519. if (dir) return -1
  7520. else byteOffset = buffer.length - 1
  7521. } else if (byteOffset < 0) {
  7522. if (dir) byteOffset = 0
  7523. else return -1
  7524. }
  7525. // Normalize val
  7526. if (typeof val === 'string') {
  7527. val = Buffer.from(val, encoding)
  7528. }
  7529. // Finally, search either indexOf (if dir is true) or lastIndexOf
  7530. if (Buffer.isBuffer(val)) {
  7531. // Special case: looking for empty string/buffer always fails
  7532. if (val.length === 0) {
  7533. return -1
  7534. }
  7535. return arrayIndexOf(buffer, val, byteOffset, encoding, dir)
  7536. } else if (typeof val === 'number') {
  7537. val = val & 0xFF // Search for a byte value [0-255]
  7538. if (Buffer.TYPED_ARRAY_SUPPORT &&
  7539. typeof Uint8Array.prototype.indexOf === 'function') {
  7540. if (dir) {
  7541. return Uint8Array.prototype.indexOf.call(buffer, val, byteOffset)
  7542. } else {
  7543. return Uint8Array.prototype.lastIndexOf.call(buffer, val, byteOffset)
  7544. }
  7545. }
  7546. return arrayIndexOf(buffer, [ val ], byteOffset, encoding, dir)
  7547. }
  7548. throw new TypeError('val must be string, number or Buffer')
  7549. }
  7550. function arrayIndexOf (arr, val, byteOffset, encoding, dir) {
  7551. var indexSize = 1
  7552. var arrLength = arr.length
  7553. var valLength = val.length
  7554. if (encoding !== undefined) {
  7555. encoding = String(encoding).toLowerCase()
  7556. if (encoding === 'ucs2' || encoding === 'ucs-2' ||
  7557. encoding === 'utf16le' || encoding === 'utf-16le') {
  7558. if (arr.length < 2 || val.length < 2) {
  7559. return -1
  7560. }
  7561. indexSize = 2
  7562. arrLength /= 2
  7563. valLength /= 2
  7564. byteOffset /= 2
  7565. }
  7566. }
  7567. function read (buf, i) {
  7568. if (indexSize === 1) {
  7569. return buf[i]
  7570. } else {
  7571. return buf.readUInt16BE(i * indexSize)
  7572. }
  7573. }
  7574. var i
  7575. if (dir) {
  7576. var foundIndex = -1
  7577. for (i = byteOffset; i < arrLength; i++) {
  7578. if (read(arr, i) === read(val, foundIndex === -1 ? 0 : i - foundIndex)) {
  7579. if (foundIndex === -1) foundIndex = i
  7580. if (i - foundIndex + 1 === valLength) return foundIndex * indexSize
  7581. } else {
  7582. if (foundIndex !== -1) i -= i - foundIndex
  7583. foundIndex = -1
  7584. }
  7585. }
  7586. } else {
  7587. if (byteOffset + valLength > arrLength) byteOffset = arrLength - valLength
  7588. for (i = byteOffset; i >= 0; i--) {
  7589. var found = true
  7590. for (var j = 0; j < valLength; j++) {
  7591. if (read(arr, i + j) !== read(val, j)) {
  7592. found = false
  7593. break
  7594. }
  7595. }
  7596. if (found) return i
  7597. }
  7598. }
  7599. return -1
  7600. }
  7601. Buffer.prototype.includes = function includes (val, byteOffset, encoding) {
  7602. return this.indexOf(val, byteOffset, encoding) !== -1
  7603. }
  7604. Buffer.prototype.indexOf = function indexOf (val, byteOffset, encoding) {
  7605. return bidirectionalIndexOf(this, val, byteOffset, encoding, true)
  7606. }
  7607. Buffer.prototype.lastIndexOf = function lastIndexOf (val, byteOffset, encoding) {
  7608. return bidirectionalIndexOf(this, val, byteOffset, encoding, false)
  7609. }
  7610. function hexWrite (buf, string, offset, length) {
  7611. offset = Number(offset) || 0
  7612. var remaining = buf.length - offset
  7613. if (!length) {
  7614. length = remaining
  7615. } else {
  7616. length = Number(length)
  7617. if (length > remaining) {
  7618. length = remaining
  7619. }
  7620. }
  7621. // must be an even number of digits
  7622. var strLen = string.length
  7623. if (strLen % 2 !== 0) throw new TypeError('Invalid hex string')
  7624. if (length > strLen / 2) {
  7625. length = strLen / 2
  7626. }
  7627. for (var i = 0; i < length; ++i) {
  7628. var parsed = parseInt(string.substr(i * 2, 2), 16)
  7629. if (isNaN(parsed)) return i
  7630. buf[offset + i] = parsed
  7631. }
  7632. return i
  7633. }
  7634. function utf8Write (buf, string, offset, length) {
  7635. return blitBuffer(utf8ToBytes(string, buf.length - offset), buf, offset, length)
  7636. }
  7637. function asciiWrite (buf, string, offset, length) {
  7638. return blitBuffer(asciiToBytes(string), buf, offset, length)
  7639. }
  7640. function latin1Write (buf, string, offset, length) {
  7641. return asciiWrite(buf, string, offset, length)
  7642. }
  7643. function base64Write (buf, string, offset, length) {
  7644. return blitBuffer(base64ToBytes(string), buf, offset, length)
  7645. }
  7646. function ucs2Write (buf, string, offset, length) {
  7647. return blitBuffer(utf16leToBytes(string, buf.length - offset), buf, offset, length)
  7648. }
  7649. Buffer.prototype.write = function write (string, offset, length, encoding) {
  7650. // Buffer#write(string)
  7651. if (offset === undefined) {
  7652. encoding = 'utf8'
  7653. length = this.length
  7654. offset = 0
  7655. // Buffer#write(string, encoding)
  7656. } else if (length === undefined && typeof offset === 'string') {
  7657. encoding = offset
  7658. length = this.length
  7659. offset = 0
  7660. // Buffer#write(string, offset[, length][, encoding])
  7661. } else if (isFinite(offset)) {
  7662. offset = offset | 0
  7663. if (isFinite(length)) {
  7664. length = length | 0
  7665. if (encoding === undefined) encoding = 'utf8'
  7666. } else {
  7667. encoding = length
  7668. length = undefined
  7669. }
  7670. // legacy write(string, encoding, offset, length) - remove in v0.13
  7671. } else {
  7672. throw new Error(
  7673. 'Buffer.write(string, encoding, offset[, length]) is no longer supported'
  7674. )
  7675. }
  7676. var remaining = this.length - offset
  7677. if (length === undefined || length > remaining) length = remaining
  7678. if ((string.length > 0 && (length < 0 || offset < 0)) || offset > this.length) {
  7679. throw new RangeError('Attempt to write outside buffer bounds')
  7680. }
  7681. if (!encoding) encoding = 'utf8'
  7682. var loweredCase = false
  7683. for (;;) {
  7684. switch (encoding) {
  7685. case 'hex':
  7686. return hexWrite(this, string, offset, length)
  7687. case 'utf8':
  7688. case 'utf-8':
  7689. return utf8Write(this, string, offset, length)
  7690. case 'ascii':
  7691. return asciiWrite(this, string, offset, length)
  7692. case 'latin1':
  7693. case 'binary':
  7694. return latin1Write(this, string, offset, length)
  7695. case 'base64':
  7696. // Warning: maxLength not taken into account in base64Write
  7697. return base64Write(this, string, offset, length)
  7698. case 'ucs2':
  7699. case 'ucs-2':
  7700. case 'utf16le':
  7701. case 'utf-16le':
  7702. return ucs2Write(this, string, offset, length)
  7703. default:
  7704. if (loweredCase) throw new TypeError('Unknown encoding: ' + encoding)
  7705. encoding = ('' + encoding).toLowerCase()
  7706. loweredCase = true
  7707. }
  7708. }
  7709. }
  7710. Buffer.prototype.toJSON = function toJSON () {
  7711. return {
  7712. type: 'Buffer',
  7713. data: Array.prototype.slice.call(this._arr || this, 0)
  7714. }
  7715. }
  7716. function base64Slice (buf, start, end) {
  7717. if (start === 0 && end === buf.length) {
  7718. return base64.fromByteArray(buf)
  7719. } else {
  7720. return base64.fromByteArray(buf.slice(start, end))
  7721. }
  7722. }
  7723. function utf8Slice (buf, start, end) {
  7724. end = Math.min(buf.length, end)
  7725. var res = []
  7726. var i = start
  7727. while (i < end) {
  7728. var firstByte = buf[i]
  7729. var codePoint = null
  7730. var bytesPerSequence = (firstByte > 0xEF) ? 4
  7731. : (firstByte > 0xDF) ? 3
  7732. : (firstByte > 0xBF) ? 2
  7733. : 1
  7734. if (i + bytesPerSequence <= end) {
  7735. var secondByte, thirdByte, fourthByte, tempCodePoint
  7736. switch (bytesPerSequence) {
  7737. case 1:
  7738. if (firstByte < 0x80) {
  7739. codePoint = firstByte
  7740. }
  7741. break
  7742. case 2:
  7743. secondByte = buf[i + 1]
  7744. if ((secondByte & 0xC0) === 0x80) {
  7745. tempCodePoint = (firstByte & 0x1F) << 0x6 | (secondByte & 0x3F)
  7746. if (tempCodePoint > 0x7F) {
  7747. codePoint = tempCodePoint
  7748. }
  7749. }
  7750. break
  7751. case 3:
  7752. secondByte = buf[i + 1]
  7753. thirdByte = buf[i + 2]
  7754. if ((secondByte & 0xC0) === 0x80 && (thirdByte & 0xC0) === 0x80) {
  7755. tempCodePoint = (firstByte & 0xF) << 0xC | (secondByte & 0x3F) << 0x6 | (thirdByte & 0x3F)
  7756. if (tempCodePoint > 0x7FF && (tempCodePoint < 0xD800 || tempCodePoint > 0xDFFF)) {
  7757. codePoint = tempCodePoint
  7758. }
  7759. }
  7760. break
  7761. case 4:
  7762. secondByte = buf[i + 1]
  7763. thirdByte = buf[i + 2]
  7764. fourthByte = buf[i + 3]
  7765. if ((secondByte & 0xC0) === 0x80 && (thirdByte & 0xC0) === 0x80 && (fourthByte & 0xC0) === 0x80) {
  7766. tempCodePoint = (firstByte & 0xF) << 0x12 | (secondByte & 0x3F) << 0xC | (thirdByte & 0x3F) << 0x6 | (fourthByte & 0x3F)
  7767. if (tempCodePoint > 0xFFFF && tempCodePoint < 0x110000) {
  7768. codePoint = tempCodePoint
  7769. }
  7770. }
  7771. }
  7772. }
  7773. if (codePoint === null) {
  7774. // we did not generate a valid codePoint so insert a
  7775. // replacement char (U+FFFD) and advance only 1 byte
  7776. codePoint = 0xFFFD
  7777. bytesPerSequence = 1
  7778. } else if (codePoint > 0xFFFF) {
  7779. // encode to utf16 (surrogate pair dance)
  7780. codePoint -= 0x10000
  7781. res.push(codePoint >>> 10 & 0x3FF | 0xD800)
  7782. codePoint = 0xDC00 | codePoint & 0x3FF
  7783. }
  7784. res.push(codePoint)
  7785. i += bytesPerSequence
  7786. }
  7787. return decodeCodePointsArray(res)
  7788. }
  7789. // Based on http://stackoverflow.com/a/22747272/680742, the browser with
  7790. // the lowest limit is Chrome, with 0x10000 args.
  7791. // We go 1 magnitude less, for safety
  7792. var MAX_ARGUMENTS_LENGTH = 0x1000
  7793. function decodeCodePointsArray (codePoints) {
  7794. var len = codePoints.length
  7795. if (len <= MAX_ARGUMENTS_LENGTH) {
  7796. return String.fromCharCode.apply(String, codePoints) // avoid extra slice()
  7797. }
  7798. // Decode in chunks to avoid "call stack size exceeded".
  7799. var res = ''
  7800. var i = 0
  7801. while (i < len) {
  7802. res += String.fromCharCode.apply(
  7803. String,
  7804. codePoints.slice(i, i += MAX_ARGUMENTS_LENGTH)
  7805. )
  7806. }
  7807. return res
  7808. }
  7809. function asciiSlice (buf, start, end) {
  7810. var ret = ''
  7811. end = Math.min(buf.length, end)
  7812. for (var i = start; i < end; ++i) {
  7813. ret += String.fromCharCode(buf[i] & 0x7F)
  7814. }
  7815. return ret
  7816. }
  7817. function latin1Slice (buf, start, end) {
  7818. var ret = ''
  7819. end = Math.min(buf.length, end)
  7820. for (var i = start; i < end; ++i) {
  7821. ret += String.fromCharCode(buf[i])
  7822. }
  7823. return ret
  7824. }
  7825. function hexSlice (buf, start, end) {
  7826. var len = buf.length
  7827. if (!start || start < 0) start = 0
  7828. if (!end || end < 0 || end > len) end = len
  7829. var out = ''
  7830. for (var i = start; i < end; ++i) {
  7831. out += toHex(buf[i])
  7832. }
  7833. return out
  7834. }
  7835. function utf16leSlice (buf, start, end) {
  7836. var bytes = buf.slice(start, end)
  7837. var res = ''
  7838. for (var i = 0; i < bytes.length; i += 2) {
  7839. res += String.fromCharCode(bytes[i] + bytes[i + 1] * 256)
  7840. }
  7841. return res
  7842. }
  7843. Buffer.prototype.slice = function slice (start, end) {
  7844. var len = this.length
  7845. start = ~~start
  7846. end = end === undefined ? len : ~~end
  7847. if (start < 0) {
  7848. start += len
  7849. if (start < 0) start = 0
  7850. } else if (start > len) {
  7851. start = len
  7852. }
  7853. if (end < 0) {
  7854. end += len
  7855. if (end < 0) end = 0
  7856. } else if (end > len) {
  7857. end = len
  7858. }
  7859. if (end < start) end = start
  7860. var newBuf
  7861. if (Buffer.TYPED_ARRAY_SUPPORT) {
  7862. newBuf = this.subarray(start, end)
  7863. newBuf.__proto__ = Buffer.prototype
  7864. } else {
  7865. var sliceLen = end - start
  7866. newBuf = new Buffer(sliceLen, undefined)
  7867. for (var i = 0; i < sliceLen; ++i) {
  7868. newBuf[i] = this[i + start]
  7869. }
  7870. }
  7871. return newBuf
  7872. }
  7873. /*
  7874. * Need to make sure that buffer isn't trying to write out of bounds.
  7875. */
  7876. function checkOffset (offset, ext, length) {
  7877. if ((offset % 1) !== 0 || offset < 0) throw new RangeError('offset is not uint')
  7878. if (offset + ext > length) throw new RangeError('Trying to access beyond buffer length')
  7879. }
  7880. Buffer.prototype.readUIntLE = function readUIntLE (offset, byteLength, noAssert) {
  7881. offset = offset | 0
  7882. byteLength = byteLength | 0
  7883. if (!noAssert) checkOffset(offset, byteLength, this.length)
  7884. var val = this[offset]
  7885. var mul = 1
  7886. var i = 0
  7887. while (++i < byteLength && (mul *= 0x100)) {
  7888. val += this[offset + i] * mul
  7889. }
  7890. return val
  7891. }
  7892. Buffer.prototype.readUIntBE = function readUIntBE (offset, byteLength, noAssert) {
  7893. offset = offset | 0
  7894. byteLength = byteLength | 0
  7895. if (!noAssert) {
  7896. checkOffset(offset, byteLength, this.length)
  7897. }
  7898. var val = this[offset + --byteLength]
  7899. var mul = 1
  7900. while (byteLength > 0 && (mul *= 0x100)) {
  7901. val += this[offset + --byteLength] * mul
  7902. }
  7903. return val
  7904. }
  7905. Buffer.prototype.readUInt8 = function readUInt8 (offset, noAssert) {
  7906. if (!noAssert) checkOffset(offset, 1, this.length)
  7907. return this[offset]
  7908. }
  7909. Buffer.prototype.readUInt16LE = function readUInt16LE (offset, noAssert) {
  7910. if (!noAssert) checkOffset(offset, 2, this.length)
  7911. return this[offset] | (this[offset + 1] << 8)
  7912. }
  7913. Buffer.prototype.readUInt16BE = function readUInt16BE (offset, noAssert) {
  7914. if (!noAssert) checkOffset(offset, 2, this.length)
  7915. return (this[offset] << 8) | this[offset + 1]
  7916. }
  7917. Buffer.prototype.readUInt32LE = function readUInt32LE (offset, noAssert) {
  7918. if (!noAssert) checkOffset(offset, 4, this.length)
  7919. return ((this[offset]) |
  7920. (this[offset + 1] << 8) |
  7921. (this[offset + 2] << 16)) +
  7922. (this[offset + 3] * 0x1000000)
  7923. }
  7924. Buffer.prototype.readUInt32BE = function readUInt32BE (offset, noAssert) {
  7925. if (!noAssert) checkOffset(offset, 4, this.length)
  7926. return (this[offset] * 0x1000000) +
  7927. ((this[offset + 1] << 16) |
  7928. (this[offset + 2] << 8) |
  7929. this[offset + 3])
  7930. }
  7931. Buffer.prototype.readIntLE = function readIntLE (offset, byteLength, noAssert) {
  7932. offset = offset | 0
  7933. byteLength = byteLength | 0
  7934. if (!noAssert) checkOffset(offset, byteLength, this.length)
  7935. var val = this[offset]
  7936. var mul = 1
  7937. var i = 0
  7938. while (++i < byteLength && (mul *= 0x100)) {
  7939. val += this[offset + i] * mul
  7940. }
  7941. mul *= 0x80
  7942. if (val >= mul) val -= Math.pow(2, 8 * byteLength)
  7943. return val
  7944. }
  7945. Buffer.prototype.readIntBE = function readIntBE (offset, byteLength, noAssert) {
  7946. offset = offset | 0
  7947. byteLength = byteLength | 0
  7948. if (!noAssert) checkOffset(offset, byteLength, this.length)
  7949. var i = byteLength
  7950. var mul = 1
  7951. var val = this[offset + --i]
  7952. while (i > 0 && (mul *= 0x100)) {
  7953. val += this[offset + --i] * mul
  7954. }
  7955. mul *= 0x80
  7956. if (val >= mul) val -= Math.pow(2, 8 * byteLength)
  7957. return val
  7958. }
  7959. Buffer.prototype.readInt8 = function readInt8 (offset, noAssert) {
  7960. if (!noAssert) checkOffset(offset, 1, this.length)
  7961. if (!(this[offset] & 0x80)) return (this[offset])
  7962. return ((0xff - this[offset] + 1) * -1)
  7963. }
  7964. Buffer.prototype.readInt16LE = function readInt16LE (offset, noAssert) {
  7965. if (!noAssert) checkOffset(offset, 2, this.length)
  7966. var val = this[offset] | (this[offset + 1] << 8)
  7967. return (val & 0x8000) ? val | 0xFFFF0000 : val
  7968. }
  7969. Buffer.prototype.readInt16BE = function readInt16BE (offset, noAssert) {
  7970. if (!noAssert) checkOffset(offset, 2, this.length)
  7971. var val = this[offset + 1] | (this[offset] << 8)
  7972. return (val & 0x8000) ? val | 0xFFFF0000 : val
  7973. }
  7974. Buffer.prototype.readInt32LE = function readInt32LE (offset, noAssert) {
  7975. if (!noAssert) checkOffset(offset, 4, this.length)
  7976. return (this[offset]) |
  7977. (this[offset + 1] << 8) |
  7978. (this[offset + 2] << 16) |
  7979. (this[offset + 3] << 24)
  7980. }
  7981. Buffer.prototype.readInt32BE = function readInt32BE (offset, noAssert) {
  7982. if (!noAssert) checkOffset(offset, 4, this.length)
  7983. return (this[offset] << 24) |
  7984. (this[offset + 1] << 16) |
  7985. (this[offset + 2] << 8) |
  7986. (this[offset + 3])
  7987. }
  7988. Buffer.prototype.readFloatLE = function readFloatLE (offset, noAssert) {
  7989. if (!noAssert) checkOffset(offset, 4, this.length)
  7990. return ieee754.read(this, offset, true, 23, 4)
  7991. }
  7992. Buffer.prototype.readFloatBE = function readFloatBE (offset, noAssert) {
  7993. if (!noAssert) checkOffset(offset, 4, this.length)
  7994. return ieee754.read(this, offset, false, 23, 4)
  7995. }
  7996. Buffer.prototype.readDoubleLE = function readDoubleLE (offset, noAssert) {
  7997. if (!noAssert) checkOffset(offset, 8, this.length)
  7998. return ieee754.read(this, offset, true, 52, 8)
  7999. }
  8000. Buffer.prototype.readDoubleBE = function readDoubleBE (offset, noAssert) {
  8001. if (!noAssert) checkOffset(offset, 8, this.length)
  8002. return ieee754.read(this, offset, false, 52, 8)
  8003. }
  8004. function checkInt (buf, value, offset, ext, max, min) {
  8005. if (!Buffer.isBuffer(buf)) throw new TypeError('"buffer" argument must be a Buffer instance')
  8006. if (value > max || value < min) throw new RangeError('"value" argument is out of bounds')
  8007. if (offset + ext > buf.length) throw new RangeError('Index out of range')
  8008. }
  8009. Buffer.prototype.writeUIntLE = function writeUIntLE (value, offset, byteLength, noAssert) {
  8010. value = +value
  8011. offset = offset | 0
  8012. byteLength = byteLength | 0
  8013. if (!noAssert) {
  8014. var maxBytes = Math.pow(2, 8 * byteLength) - 1
  8015. checkInt(this, value, offset, byteLength, maxBytes, 0)
  8016. }
  8017. var mul = 1
  8018. var i = 0
  8019. this[offset] = value & 0xFF
  8020. while (++i < byteLength && (mul *= 0x100)) {
  8021. this[offset + i] = (value / mul) & 0xFF
  8022. }
  8023. return offset + byteLength
  8024. }
  8025. Buffer.prototype.writeUIntBE = function writeUIntBE (value, offset, byteLength, noAssert) {
  8026. value = +value
  8027. offset = offset | 0
  8028. byteLength = byteLength | 0
  8029. if (!noAssert) {
  8030. var maxBytes = Math.pow(2, 8 * byteLength) - 1
  8031. checkInt(this, value, offset, byteLength, maxBytes, 0)
  8032. }
  8033. var i = byteLength - 1
  8034. var mul = 1
  8035. this[offset + i] = value & 0xFF
  8036. while (--i >= 0 && (mul *= 0x100)) {
  8037. this[offset + i] = (value / mul) & 0xFF
  8038. }
  8039. return offset + byteLength
  8040. }
  8041. Buffer.prototype.writeUInt8 = function writeUInt8 (value, offset, noAssert) {
  8042. value = +value
  8043. offset = offset | 0
  8044. if (!noAssert) checkInt(this, value, offset, 1, 0xff, 0)
  8045. if (!Buffer.TYPED_ARRAY_SUPPORT) value = Math.floor(value)
  8046. this[offset] = (value & 0xff)
  8047. return offset + 1
  8048. }
  8049. function objectWriteUInt16 (buf, value, offset, littleEndian) {
  8050. if (value < 0) value = 0xffff + value + 1
  8051. for (var i = 0, j = Math.min(buf.length - offset, 2); i < j; ++i) {
  8052. buf[offset + i] = (value & (0xff << (8 * (littleEndian ? i : 1 - i)))) >>>
  8053. (littleEndian ? i : 1 - i) * 8
  8054. }
  8055. }
  8056. Buffer.prototype.writeUInt16LE = function writeUInt16LE (value, offset, noAssert) {
  8057. value = +value
  8058. offset = offset | 0
  8059. if (!noAssert) checkInt(this, value, offset, 2, 0xffff, 0)
  8060. if (Buffer.TYPED_ARRAY_SUPPORT) {
  8061. this[offset] = (value & 0xff)
  8062. this[offset + 1] = (value >>> 8)
  8063. } else {
  8064. objectWriteUInt16(this, value, offset, true)
  8065. }
  8066. return offset + 2
  8067. }
  8068. Buffer.prototype.writeUInt16BE = function writeUInt16BE (value, offset, noAssert) {
  8069. value = +value
  8070. offset = offset | 0
  8071. if (!noAssert) checkInt(this, value, offset, 2, 0xffff, 0)
  8072. if (Buffer.TYPED_ARRAY_SUPPORT) {
  8073. this[offset] = (value >>> 8)
  8074. this[offset + 1] = (value & 0xff)
  8075. } else {
  8076. objectWriteUInt16(this, value, offset, false)
  8077. }
  8078. return offset + 2
  8079. }
  8080. function objectWriteUInt32 (buf, value, offset, littleEndian) {
  8081. if (value < 0) value = 0xffffffff + value + 1
  8082. for (var i = 0, j = Math.min(buf.length - offset, 4); i < j; ++i) {
  8083. buf[offset + i] = (value >>> (littleEndian ? i : 3 - i) * 8) & 0xff
  8084. }
  8085. }
  8086. Buffer.prototype.writeUInt32LE = function writeUInt32LE (value, offset, noAssert) {
  8087. value = +value
  8088. offset = offset | 0
  8089. if (!noAssert) checkInt(this, value, offset, 4, 0xffffffff, 0)
  8090. if (Buffer.TYPED_ARRAY_SUPPORT) {
  8091. this[offset + 3] = (value >>> 24)
  8092. this[offset + 2] = (value >>> 16)
  8093. this[offset + 1] = (value >>> 8)
  8094. this[offset] = (value & 0xff)
  8095. } else {
  8096. objectWriteUInt32(this, value, offset, true)
  8097. }
  8098. return offset + 4
  8099. }
  8100. Buffer.prototype.writeUInt32BE = function writeUInt32BE (value, offset, noAssert) {
  8101. value = +value
  8102. offset = offset | 0
  8103. if (!noAssert) checkInt(this, value, offset, 4, 0xffffffff, 0)
  8104. if (Buffer.TYPED_ARRAY_SUPPORT) {
  8105. this[offset] = (value >>> 24)
  8106. this[offset + 1] = (value >>> 16)
  8107. this[offset + 2] = (value >>> 8)
  8108. this[offset + 3] = (value & 0xff)
  8109. } else {
  8110. objectWriteUInt32(this, value, offset, false)
  8111. }
  8112. return offset + 4
  8113. }
  8114. Buffer.prototype.writeIntLE = function writeIntLE (value, offset, byteLength, noAssert) {
  8115. value = +value
  8116. offset = offset | 0
  8117. if (!noAssert) {
  8118. var limit = Math.pow(2, 8 * byteLength - 1)
  8119. checkInt(this, value, offset, byteLength, limit - 1, -limit)
  8120. }
  8121. var i = 0
  8122. var mul = 1
  8123. var sub = 0
  8124. this[offset] = value & 0xFF
  8125. while (++i < byteLength && (mul *= 0x100)) {
  8126. if (value < 0 && sub === 0 && this[offset + i - 1] !== 0) {
  8127. sub = 1
  8128. }
  8129. this[offset + i] = ((value / mul) >> 0) - sub & 0xFF
  8130. }
  8131. return offset + byteLength
  8132. }
  8133. Buffer.prototype.writeIntBE = function writeIntBE (value, offset, byteLength, noAssert) {
  8134. value = +value
  8135. offset = offset | 0
  8136. if (!noAssert) {
  8137. var limit = Math.pow(2, 8 * byteLength - 1)
  8138. checkInt(this, value, offset, byteLength, limit - 1, -limit)
  8139. }
  8140. var i = byteLength - 1
  8141. var mul = 1
  8142. var sub = 0
  8143. this[offset + i] = value & 0xFF
  8144. while (--i >= 0 && (mul *= 0x100)) {
  8145. if (value < 0 && sub === 0 && this[offset + i + 1] !== 0) {
  8146. sub = 1
  8147. }
  8148. this[offset + i] = ((value / mul) >> 0) - sub & 0xFF
  8149. }
  8150. return offset + byteLength
  8151. }
  8152. Buffer.prototype.writeInt8 = function writeInt8 (value, offset, noAssert) {
  8153. value = +value
  8154. offset = offset | 0
  8155. if (!noAssert) checkInt(this, value, offset, 1, 0x7f, -0x80)
  8156. if (!Buffer.TYPED_ARRAY_SUPPORT) value = Math.floor(value)
  8157. if (value < 0) value = 0xff + value + 1
  8158. this[offset] = (value & 0xff)
  8159. return offset + 1
  8160. }
  8161. Buffer.prototype.writeInt16LE = function writeInt16LE (value, offset, noAssert) {
  8162. value = +value
  8163. offset = offset | 0
  8164. if (!noAssert) checkInt(this, value, offset, 2, 0x7fff, -0x8000)
  8165. if (Buffer.TYPED_ARRAY_SUPPORT) {
  8166. this[offset] = (value & 0xff)
  8167. this[offset + 1] = (value >>> 8)
  8168. } else {
  8169. objectWriteUInt16(this, value, offset, true)
  8170. }
  8171. return offset + 2
  8172. }
  8173. Buffer.prototype.writeInt16BE = function writeInt16BE (value, offset, noAssert) {
  8174. value = +value
  8175. offset = offset | 0
  8176. if (!noAssert) checkInt(this, value, offset, 2, 0x7fff, -0x8000)
  8177. if (Buffer.TYPED_ARRAY_SUPPORT) {
  8178. this[offset] = (value >>> 8)
  8179. this[offset + 1] = (value & 0xff)
  8180. } else {
  8181. objectWriteUInt16(this, value, offset, false)
  8182. }
  8183. return offset + 2
  8184. }
  8185. Buffer.prototype.writeInt32LE = function writeInt32LE (value, offset, noAssert) {
  8186. value = +value
  8187. offset = offset | 0
  8188. if (!noAssert) checkInt(this, value, offset, 4, 0x7fffffff, -0x80000000)
  8189. if (Buffer.TYPED_ARRAY_SUPPORT) {
  8190. this[offset] = (value & 0xff)
  8191. this[offset + 1] = (value >>> 8)
  8192. this[offset + 2] = (value >>> 16)
  8193. this[offset + 3] = (value >>> 24)
  8194. } else {
  8195. objectWriteUInt32(this, value, offset, true)
  8196. }
  8197. return offset + 4
  8198. }
  8199. Buffer.prototype.writeInt32BE = function writeInt32BE (value, offset, noAssert) {
  8200. value = +value
  8201. offset = offset | 0
  8202. if (!noAssert) checkInt(this, value, offset, 4, 0x7fffffff, -0x80000000)
  8203. if (value < 0) value = 0xffffffff + value + 1
  8204. if (Buffer.TYPED_ARRAY_SUPPORT) {
  8205. this[offset] = (value >>> 24)
  8206. this[offset + 1] = (value >>> 16)
  8207. this[offset + 2] = (value >>> 8)
  8208. this[offset + 3] = (value & 0xff)
  8209. } else {
  8210. objectWriteUInt32(this, value, offset, false)
  8211. }
  8212. return offset + 4
  8213. }
  8214. function checkIEEE754 (buf, value, offset, ext, max, min) {
  8215. if (offset + ext > buf.length) throw new RangeError('Index out of range')
  8216. if (offset < 0) throw new RangeError('Index out of range')
  8217. }
  8218. function writeFloat (buf, value, offset, littleEndian, noAssert) {
  8219. if (!noAssert) {
  8220. checkIEEE754(buf, value, offset, 4, 3.4028234663852886e+38, -3.4028234663852886e+38)
  8221. }
  8222. ieee754.write(buf, value, offset, littleEndian, 23, 4)
  8223. return offset + 4
  8224. }
  8225. Buffer.prototype.writeFloatLE = function writeFloatLE (value, offset, noAssert) {
  8226. return writeFloat(this, value, offset, true, noAssert)
  8227. }
  8228. Buffer.prototype.writeFloatBE = function writeFloatBE (value, offset, noAssert) {
  8229. return writeFloat(this, value, offset, false, noAssert)
  8230. }
  8231. function writeDouble (buf, value, offset, littleEndian, noAssert) {
  8232. if (!noAssert) {
  8233. checkIEEE754(buf, value, offset, 8, 1.7976931348623157E+308, -1.7976931348623157E+308)
  8234. }
  8235. ieee754.write(buf, value, offset, littleEndian, 52, 8)
  8236. return offset + 8
  8237. }
  8238. Buffer.prototype.writeDoubleLE = function writeDoubleLE (value, offset, noAssert) {
  8239. return writeDouble(this, value, offset, true, noAssert)
  8240. }
  8241. Buffer.prototype.writeDoubleBE = function writeDoubleBE (value, offset, noAssert) {
  8242. return writeDouble(this, value, offset, false, noAssert)
  8243. }
  8244. // copy(targetBuffer, targetStart=0, sourceStart=0, sourceEnd=buffer.length)
  8245. Buffer.prototype.copy = function copy (target, targetStart, start, end) {
  8246. if (!start) start = 0
  8247. if (!end && end !== 0) end = this.length
  8248. if (targetStart >= target.length) targetStart = target.length
  8249. if (!targetStart) targetStart = 0
  8250. if (end > 0 && end < start) end = start
  8251. // Copy 0 bytes; we're done
  8252. if (end === start) return 0
  8253. if (target.length === 0 || this.length === 0) return 0
  8254. // Fatal error conditions
  8255. if (targetStart < 0) {
  8256. throw new RangeError('targetStart out of bounds')
  8257. }
  8258. if (start < 0 || start >= this.length) throw new RangeError('sourceStart out of bounds')
  8259. if (end < 0) throw new RangeError('sourceEnd out of bounds')
  8260. // Are we oob?
  8261. if (end > this.length) end = this.length
  8262. if (target.length - targetStart < end - start) {
  8263. end = target.length - targetStart + start
  8264. }
  8265. var len = end - start
  8266. var i
  8267. if (this === target && start < targetStart && targetStart < end) {
  8268. // descending copy from end
  8269. for (i = len - 1; i >= 0; --i) {
  8270. target[i + targetStart] = this[i + start]
  8271. }
  8272. } else if (len < 1000 || !Buffer.TYPED_ARRAY_SUPPORT) {
  8273. // ascending copy from start
  8274. for (i = 0; i < len; ++i) {
  8275. target[i + targetStart] = this[i + start]
  8276. }
  8277. } else {
  8278. Uint8Array.prototype.set.call(
  8279. target,
  8280. this.subarray(start, start + len),
  8281. targetStart
  8282. )
  8283. }
  8284. return len
  8285. }
  8286. // Usage:
  8287. // buffer.fill(number[, offset[, end]])
  8288. // buffer.fill(buffer[, offset[, end]])
  8289. // buffer.fill(string[, offset[, end]][, encoding])
  8290. Buffer.prototype.fill = function fill (val, start, end, encoding) {
  8291. // Handle string cases:
  8292. if (typeof val === 'string') {
  8293. if (typeof start === 'string') {
  8294. encoding = start
  8295. start = 0
  8296. end = this.length
  8297. } else if (typeof end === 'string') {
  8298. encoding = end
  8299. end = this.length
  8300. }
  8301. if (val.length === 1) {
  8302. var code = val.charCodeAt(0)
  8303. if (code < 256) {
  8304. val = code
  8305. }
  8306. }
  8307. if (encoding !== undefined && typeof encoding !== 'string') {
  8308. throw new TypeError('encoding must be a string')
  8309. }
  8310. if (typeof encoding === 'string' && !Buffer.isEncoding(encoding)) {
  8311. throw new TypeError('Unknown encoding: ' + encoding)
  8312. }
  8313. } else if (typeof val === 'number') {
  8314. val = val & 255
  8315. }
  8316. // Invalid ranges are not set to a default, so can range check early.
  8317. if (start < 0 || this.length < start || this.length < end) {
  8318. throw new RangeError('Out of range index')
  8319. }
  8320. if (end <= start) {
  8321. return this
  8322. }
  8323. start = start >>> 0
  8324. end = end === undefined ? this.length : end >>> 0
  8325. if (!val) val = 0
  8326. var i
  8327. if (typeof val === 'number') {
  8328. for (i = start; i < end; ++i) {
  8329. this[i] = val
  8330. }
  8331. } else {
  8332. var bytes = Buffer.isBuffer(val)
  8333. ? val
  8334. : utf8ToBytes(new Buffer(val, encoding).toString())
  8335. var len = bytes.length
  8336. for (i = 0; i < end - start; ++i) {
  8337. this[i + start] = bytes[i % len]
  8338. }
  8339. }
  8340. return this
  8341. }
  8342. // HELPER FUNCTIONS
  8343. // ================
  8344. var INVALID_BASE64_RE = /[^+\/0-9A-Za-z-_]/g
  8345. function base64clean (str) {
  8346. // Node strips out invalid characters like \n and \t from the string, base64-js does not
  8347. str = stringtrim(str).replace(INVALID_BASE64_RE, '')
  8348. // Node converts strings with length < 2 to ''
  8349. if (str.length < 2) return ''
  8350. // Node allows for non-padded base64 strings (missing trailing ===), base64-js does not
  8351. while (str.length % 4 !== 0) {
  8352. str = str + '='
  8353. }
  8354. return str
  8355. }
  8356. function stringtrim (str) {
  8357. if (str.trim) return str.trim()
  8358. return str.replace(/^\s+|\s+$/g, '')
  8359. }
  8360. function toHex (n) {
  8361. if (n < 16) return '0' + n.toString(16)
  8362. return n.toString(16)
  8363. }
  8364. function utf8ToBytes (string, units) {
  8365. units = units || Infinity
  8366. var codePoint
  8367. var length = string.length
  8368. var leadSurrogate = null
  8369. var bytes = []
  8370. for (var i = 0; i < length; ++i) {
  8371. codePoint = string.charCodeAt(i)
  8372. // is surrogate component
  8373. if (codePoint > 0xD7FF && codePoint < 0xE000) {
  8374. // last char was a lead
  8375. if (!leadSurrogate) {
  8376. // no lead yet
  8377. if (codePoint > 0xDBFF) {
  8378. // unexpected trail
  8379. if ((units -= 3) > -1) bytes.push(0xEF, 0xBF, 0xBD)
  8380. continue
  8381. } else if (i + 1 === length) {
  8382. // unpaired lead
  8383. if ((units -= 3) > -1) bytes.push(0xEF, 0xBF, 0xBD)
  8384. continue
  8385. }
  8386. // valid lead
  8387. leadSurrogate = codePoint
  8388. continue
  8389. }
  8390. // 2 leads in a row
  8391. if (codePoint < 0xDC00) {
  8392. if ((units -= 3) > -1) bytes.push(0xEF, 0xBF, 0xBD)
  8393. leadSurrogate = codePoint
  8394. continue
  8395. }
  8396. // valid surrogate pair
  8397. codePoint = (leadSurrogate - 0xD800 << 10 | codePoint - 0xDC00) + 0x10000
  8398. } else if (leadSurrogate) {
  8399. // valid bmp char, but last char was a lead
  8400. if ((units -= 3) > -1) bytes.push(0xEF, 0xBF, 0xBD)
  8401. }
  8402. leadSurrogate = null
  8403. // encode utf8
  8404. if (codePoint < 0x80) {
  8405. if ((units -= 1) < 0) break
  8406. bytes.push(codePoint)
  8407. } else if (codePoint < 0x800) {
  8408. if ((units -= 2) < 0) break
  8409. bytes.push(
  8410. codePoint >> 0x6 | 0xC0,
  8411. codePoint & 0x3F | 0x80
  8412. )
  8413. } else if (codePoint < 0x10000) {
  8414. if ((units -= 3) < 0) break
  8415. bytes.push(
  8416. codePoint >> 0xC | 0xE0,
  8417. codePoint >> 0x6 & 0x3F | 0x80,
  8418. codePoint & 0x3F | 0x80
  8419. )
  8420. } else if (codePoint < 0x110000) {
  8421. if ((units -= 4) < 0) break
  8422. bytes.push(
  8423. codePoint >> 0x12 | 0xF0,
  8424. codePoint >> 0xC & 0x3F | 0x80,
  8425. codePoint >> 0x6 & 0x3F | 0x80,
  8426. codePoint & 0x3F | 0x80
  8427. )
  8428. } else {
  8429. throw new Error('Invalid code point')
  8430. }
  8431. }
  8432. return bytes
  8433. }
  8434. function asciiToBytes (str) {
  8435. var byteArray = []
  8436. for (var i = 0; i < str.length; ++i) {
  8437. // Node's code seems to be doing this and not & 0x7F..
  8438. byteArray.push(str.charCodeAt(i) & 0xFF)
  8439. }
  8440. return byteArray
  8441. }
  8442. function utf16leToBytes (str, units) {
  8443. var c, hi, lo
  8444. var byteArray = []
  8445. for (var i = 0; i < str.length; ++i) {
  8446. if ((units -= 2) < 0) break
  8447. c = str.charCodeAt(i)
  8448. hi = c >> 8
  8449. lo = c % 256
  8450. byteArray.push(lo)
  8451. byteArray.push(hi)
  8452. }
  8453. return byteArray
  8454. }
  8455. function base64ToBytes (str) {
  8456. return base64.toByteArray(base64clean(str))
  8457. }
  8458. function blitBuffer (src, dst, offset, length) {
  8459. for (var i = 0; i < length; ++i) {
  8460. if ((i + offset >= dst.length) || (i >= src.length)) break
  8461. dst[i + offset] = src[i]
  8462. }
  8463. return i
  8464. }
  8465. function isnan (val) {
  8466. return val !== val // eslint-disable-line no-self-compare
  8467. }
  8468. /* WEBPACK VAR INJECTION */}.call(exports, __webpack_require__(11)))
  8469. /***/ }),
  8470. /* 56 */
  8471. /***/ (function(module, exports, __webpack_require__) {
  8472. "use strict";
  8473. exports.byteLength = byteLength
  8474. exports.toByteArray = toByteArray
  8475. exports.fromByteArray = fromByteArray
  8476. var lookup = []
  8477. var revLookup = []
  8478. var Arr = typeof Uint8Array !== 'undefined' ? Uint8Array : Array
  8479. var code = 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/'
  8480. for (var i = 0, len = code.length; i < len; ++i) {
  8481. lookup[i] = code[i]
  8482. revLookup[code.charCodeAt(i)] = i
  8483. }
  8484. // Support decoding URL-safe base64 strings, as Node.js does.
  8485. // See: https://en.wikipedia.org/wiki/Base64#URL_applications
  8486. revLookup['-'.charCodeAt(0)] = 62
  8487. revLookup['_'.charCodeAt(0)] = 63
  8488. function getLens (b64) {
  8489. var len = b64.length
  8490. if (len % 4 > 0) {
  8491. throw new Error('Invalid string. Length must be a multiple of 4')
  8492. }
  8493. // Trim off extra bytes after placeholder bytes are found
  8494. // See: https://github.com/beatgammit/base64-js/issues/42
  8495. var validLen = b64.indexOf('=')
  8496. if (validLen === -1) validLen = len
  8497. var placeHoldersLen = validLen === len
  8498. ? 0
  8499. : 4 - (validLen % 4)
  8500. return [validLen, placeHoldersLen]
  8501. }
  8502. // base64 is 4/3 + up to two characters of the original data
  8503. function byteLength (b64) {
  8504. var lens = getLens(b64)
  8505. var validLen = lens[0]
  8506. var placeHoldersLen = lens[1]
  8507. return ((validLen + placeHoldersLen) * 3 / 4) - placeHoldersLen
  8508. }
  8509. function _byteLength (b64, validLen, placeHoldersLen) {
  8510. return ((validLen + placeHoldersLen) * 3 / 4) - placeHoldersLen
  8511. }
  8512. function toByteArray (b64) {
  8513. var tmp
  8514. var lens = getLens(b64)
  8515. var validLen = lens[0]
  8516. var placeHoldersLen = lens[1]
  8517. var arr = new Arr(_byteLength(b64, validLen, placeHoldersLen))
  8518. var curByte = 0
  8519. // if there are placeholders, only get up to the last complete 4 chars
  8520. var len = placeHoldersLen > 0
  8521. ? validLen - 4
  8522. : validLen
  8523. var i
  8524. for (i = 0; i < len; i += 4) {
  8525. tmp =
  8526. (revLookup[b64.charCodeAt(i)] << 18) |
  8527. (revLookup[b64.charCodeAt(i + 1)] << 12) |
  8528. (revLookup[b64.charCodeAt(i + 2)] << 6) |
  8529. revLookup[b64.charCodeAt(i + 3)]
  8530. arr[curByte++] = (tmp >> 16) & 0xFF
  8531. arr[curByte++] = (tmp >> 8) & 0xFF
  8532. arr[curByte++] = tmp & 0xFF
  8533. }
  8534. if (placeHoldersLen === 2) {
  8535. tmp =
  8536. (revLookup[b64.charCodeAt(i)] << 2) |
  8537. (revLookup[b64.charCodeAt(i + 1)] >> 4)
  8538. arr[curByte++] = tmp & 0xFF
  8539. }
  8540. if (placeHoldersLen === 1) {
  8541. tmp =
  8542. (revLookup[b64.charCodeAt(i)] << 10) |
  8543. (revLookup[b64.charCodeAt(i + 1)] << 4) |
  8544. (revLookup[b64.charCodeAt(i + 2)] >> 2)
  8545. arr[curByte++] = (tmp >> 8) & 0xFF
  8546. arr[curByte++] = tmp & 0xFF
  8547. }
  8548. return arr
  8549. }
  8550. function tripletToBase64 (num) {
  8551. return lookup[num >> 18 & 0x3F] +
  8552. lookup[num >> 12 & 0x3F] +
  8553. lookup[num >> 6 & 0x3F] +
  8554. lookup[num & 0x3F]
  8555. }
  8556. function encodeChunk (uint8, start, end) {
  8557. var tmp
  8558. var output = []
  8559. for (var i = start; i < end; i += 3) {
  8560. tmp =
  8561. ((uint8[i] << 16) & 0xFF0000) +
  8562. ((uint8[i + 1] << 8) & 0xFF00) +
  8563. (uint8[i + 2] & 0xFF)
  8564. output.push(tripletToBase64(tmp))
  8565. }
  8566. return output.join('')
  8567. }
  8568. function fromByteArray (uint8) {
  8569. var tmp
  8570. var len = uint8.length
  8571. var extraBytes = len % 3 // if we have 1 byte left, pad 2 bytes
  8572. var parts = []
  8573. var maxChunkLength = 16383 // must be multiple of 3
  8574. // go through the array every three bytes, we'll deal with trailing stuff later
  8575. for (var i = 0, len2 = len - extraBytes; i < len2; i += maxChunkLength) {
  8576. parts.push(encodeChunk(
  8577. uint8, i, (i + maxChunkLength) > len2 ? len2 : (i + maxChunkLength)
  8578. ))
  8579. }
  8580. // pad the end with zeros, but make sure to not forget the extra bytes
  8581. if (extraBytes === 1) {
  8582. tmp = uint8[len - 1]
  8583. parts.push(
  8584. lookup[tmp >> 2] +
  8585. lookup[(tmp << 4) & 0x3F] +
  8586. '=='
  8587. )
  8588. } else if (extraBytes === 2) {
  8589. tmp = (uint8[len - 2] << 8) + uint8[len - 1]
  8590. parts.push(
  8591. lookup[tmp >> 10] +
  8592. lookup[(tmp >> 4) & 0x3F] +
  8593. lookup[(tmp << 2) & 0x3F] +
  8594. '='
  8595. )
  8596. }
  8597. return parts.join('')
  8598. }
  8599. /***/ }),
  8600. /* 57 */
  8601. /***/ (function(module, exports) {
  8602. exports.read = function (buffer, offset, isLE, mLen, nBytes) {
  8603. var e, m
  8604. var eLen = (nBytes * 8) - mLen - 1
  8605. var eMax = (1 << eLen) - 1
  8606. var eBias = eMax >> 1
  8607. var nBits = -7
  8608. var i = isLE ? (nBytes - 1) : 0
  8609. var d = isLE ? -1 : 1
  8610. var s = buffer[offset + i]
  8611. i += d
  8612. e = s & ((1 << (-nBits)) - 1)
  8613. s >>= (-nBits)
  8614. nBits += eLen
  8615. for (; nBits > 0; e = (e * 256) + buffer[offset + i], i += d, nBits -= 8) {}
  8616. m = e & ((1 << (-nBits)) - 1)
  8617. e >>= (-nBits)
  8618. nBits += mLen
  8619. for (; nBits > 0; m = (m * 256) + buffer[offset + i], i += d, nBits -= 8) {}
  8620. if (e === 0) {
  8621. e = 1 - eBias
  8622. } else if (e === eMax) {
  8623. return m ? NaN : ((s ? -1 : 1) * Infinity)
  8624. } else {
  8625. m = m + Math.pow(2, mLen)
  8626. e = e - eBias
  8627. }
  8628. return (s ? -1 : 1) * m * Math.pow(2, e - mLen)
  8629. }
  8630. exports.write = function (buffer, value, offset, isLE, mLen, nBytes) {
  8631. var e, m, c
  8632. var eLen = (nBytes * 8) - mLen - 1
  8633. var eMax = (1 << eLen) - 1
  8634. var eBias = eMax >> 1
  8635. var rt = (mLen === 23 ? Math.pow(2, -24) - Math.pow(2, -77) : 0)
  8636. var i = isLE ? 0 : (nBytes - 1)
  8637. var d = isLE ? 1 : -1
  8638. var s = value < 0 || (value === 0 && 1 / value < 0) ? 1 : 0
  8639. value = Math.abs(value)
  8640. if (isNaN(value) || value === Infinity) {
  8641. m = isNaN(value) ? 1 : 0
  8642. e = eMax
  8643. } else {
  8644. e = Math.floor(Math.log(value) / Math.LN2)
  8645. if (value * (c = Math.pow(2, -e)) < 1) {
  8646. e--
  8647. c *= 2
  8648. }
  8649. if (e + eBias >= 1) {
  8650. value += rt / c
  8651. } else {
  8652. value += rt * Math.pow(2, 1 - eBias)
  8653. }
  8654. if (value * c >= 2) {
  8655. e++
  8656. c /= 2
  8657. }
  8658. if (e + eBias >= eMax) {
  8659. m = 0
  8660. e = eMax
  8661. } else if (e + eBias >= 1) {
  8662. m = ((value * c) - 1) * Math.pow(2, mLen)
  8663. e = e + eBias
  8664. } else {
  8665. m = value * Math.pow(2, eBias - 1) * Math.pow(2, mLen)
  8666. e = 0
  8667. }
  8668. }
  8669. for (; mLen >= 8; buffer[offset + i] = m & 0xff, i += d, m /= 256, mLen -= 8) {}
  8670. e = (e << mLen) | m
  8671. eLen += mLen
  8672. for (; eLen > 0; buffer[offset + i] = e & 0xff, i += d, e /= 256, eLen -= 8) {}
  8673. buffer[offset + i - d] |= s * 128
  8674. }
  8675. /***/ }),
  8676. /* 58 */
  8677. /***/ (function(module, exports) {
  8678. var toString = {}.toString;
  8679. module.exports = Array.isArray || function (arr) {
  8680. return toString.call(arr) == '[object Array]';
  8681. };
  8682. /***/ }),
  8683. /* 59 */
  8684. /***/ (function(module, exports, __webpack_require__) {
  8685. /* WEBPACK VAR INJECTION */(function(global) {var scope = (typeof global !== "undefined" && global) ||
  8686. (typeof self !== "undefined" && self) ||
  8687. window;
  8688. var apply = Function.prototype.apply;
  8689. // DOM APIs, for completeness
  8690. exports.setTimeout = function() {
  8691. return new Timeout(apply.call(setTimeout, scope, arguments), clearTimeout);
  8692. };
  8693. exports.setInterval = function() {
  8694. return new Timeout(apply.call(setInterval, scope, arguments), clearInterval);
  8695. };
  8696. exports.clearTimeout =
  8697. exports.clearInterval = function(timeout) {
  8698. if (timeout) {
  8699. timeout.close();
  8700. }
  8701. };
  8702. function Timeout(id, clearFn) {
  8703. this._id = id;
  8704. this._clearFn = clearFn;
  8705. }
  8706. Timeout.prototype.unref = Timeout.prototype.ref = function() {};
  8707. Timeout.prototype.close = function() {
  8708. this._clearFn.call(scope, this._id);
  8709. };
  8710. // Does not start the time, just sets up the members needed.
  8711. exports.enroll = function(item, msecs) {
  8712. clearTimeout(item._idleTimeoutId);
  8713. item._idleTimeout = msecs;
  8714. };
  8715. exports.unenroll = function(item) {
  8716. clearTimeout(item._idleTimeoutId);
  8717. item._idleTimeout = -1;
  8718. };
  8719. exports._unrefActive = exports.active = function(item) {
  8720. clearTimeout(item._idleTimeoutId);
  8721. var msecs = item._idleTimeout;
  8722. if (msecs >= 0) {
  8723. item._idleTimeoutId = setTimeout(function onTimeout() {
  8724. if (item._onTimeout)
  8725. item._onTimeout();
  8726. }, msecs);
  8727. }
  8728. };
  8729. // setimmediate attaches itself to the global object
  8730. __webpack_require__(60);
  8731. // On some exotic environments, it's not clear which object `setimmediate` was
  8732. // able to install onto. Search each possibility in the same order as the
  8733. // `setimmediate` library.
  8734. exports.setImmediate = (typeof self !== "undefined" && self.setImmediate) ||
  8735. (typeof global !== "undefined" && global.setImmediate) ||
  8736. (this && this.setImmediate);
  8737. exports.clearImmediate = (typeof self !== "undefined" && self.clearImmediate) ||
  8738. (typeof global !== "undefined" && global.clearImmediate) ||
  8739. (this && this.clearImmediate);
  8740. /* WEBPACK VAR INJECTION */}.call(exports, __webpack_require__(11)))
  8741. /***/ }),
  8742. /* 60 */
  8743. /***/ (function(module, exports, __webpack_require__) {
  8744. /* WEBPACK VAR INJECTION */(function(global, process) {(function (global, undefined) {
  8745. "use strict";
  8746. if (global.setImmediate) {
  8747. return;
  8748. }
  8749. var nextHandle = 1; // Spec says greater than zero
  8750. var tasksByHandle = {};
  8751. var currentlyRunningATask = false;
  8752. var doc = global.document;
  8753. var registerImmediate;
  8754. function setImmediate(callback) {
  8755. // Callback can either be a function or a string
  8756. if (typeof callback !== "function") {
  8757. callback = new Function("" + callback);
  8758. }
  8759. // Copy function arguments
  8760. var args = new Array(arguments.length - 1);
  8761. for (var i = 0; i < args.length; i++) {
  8762. args[i] = arguments[i + 1];
  8763. }
  8764. // Store and register the task
  8765. var task = { callback: callback, args: args };
  8766. tasksByHandle[nextHandle] = task;
  8767. registerImmediate(nextHandle);
  8768. return nextHandle++;
  8769. }
  8770. function clearImmediate(handle) {
  8771. delete tasksByHandle[handle];
  8772. }
  8773. function run(task) {
  8774. var callback = task.callback;
  8775. var args = task.args;
  8776. switch (args.length) {
  8777. case 0:
  8778. callback();
  8779. break;
  8780. case 1:
  8781. callback(args[0]);
  8782. break;
  8783. case 2:
  8784. callback(args[0], args[1]);
  8785. break;
  8786. case 3:
  8787. callback(args[0], args[1], args[2]);
  8788. break;
  8789. default:
  8790. callback.apply(undefined, args);
  8791. break;
  8792. }
  8793. }
  8794. function runIfPresent(handle) {
  8795. // From the spec: "Wait until any invocations of this algorithm started before this one have completed."
  8796. // So if we're currently running a task, we'll need to delay this invocation.
  8797. if (currentlyRunningATask) {
  8798. // Delay by doing a setTimeout. setImmediate was tried instead, but in Firefox 7 it generated a
  8799. // "too much recursion" error.
  8800. setTimeout(runIfPresent, 0, handle);
  8801. } else {
  8802. var task = tasksByHandle[handle];
  8803. if (task) {
  8804. currentlyRunningATask = true;
  8805. try {
  8806. run(task);
  8807. } finally {
  8808. clearImmediate(handle);
  8809. currentlyRunningATask = false;
  8810. }
  8811. }
  8812. }
  8813. }
  8814. function installNextTickImplementation() {
  8815. registerImmediate = function(handle) {
  8816. process.nextTick(function () { runIfPresent(handle); });
  8817. };
  8818. }
  8819. function canUsePostMessage() {
  8820. // The test against `importScripts` prevents this implementation from being installed inside a web worker,
  8821. // where `global.postMessage` means something completely different and can't be used for this purpose.
  8822. if (global.postMessage && !global.importScripts) {
  8823. var postMessageIsAsynchronous = true;
  8824. var oldOnMessage = global.onmessage;
  8825. global.onmessage = function() {
  8826. postMessageIsAsynchronous = false;
  8827. };
  8828. global.postMessage("", "*");
  8829. global.onmessage = oldOnMessage;
  8830. return postMessageIsAsynchronous;
  8831. }
  8832. }
  8833. function installPostMessageImplementation() {
  8834. // Installs an event handler on `global` for the `message` event: see
  8835. // * https://developer.mozilla.org/en/DOM/window.postMessage
  8836. // * http://www.whatwg.org/specs/web-apps/current-work/multipage/comms.html#crossDocumentMessages
  8837. var messagePrefix = "setImmediate$" + Math.random() + "$";
  8838. var onGlobalMessage = function(event) {
  8839. if (event.source === global &&
  8840. typeof event.data === "string" &&
  8841. event.data.indexOf(messagePrefix) === 0) {
  8842. runIfPresent(+event.data.slice(messagePrefix.length));
  8843. }
  8844. };
  8845. if (global.addEventListener) {
  8846. global.addEventListener("message", onGlobalMessage, false);
  8847. } else {
  8848. global.attachEvent("onmessage", onGlobalMessage);
  8849. }
  8850. registerImmediate = function(handle) {
  8851. global.postMessage(messagePrefix + handle, "*");
  8852. };
  8853. }
  8854. function installMessageChannelImplementation() {
  8855. var channel = new MessageChannel();
  8856. channel.port1.onmessage = function(event) {
  8857. var handle = event.data;
  8858. runIfPresent(handle);
  8859. };
  8860. registerImmediate = function(handle) {
  8861. channel.port2.postMessage(handle);
  8862. };
  8863. }
  8864. function installReadyStateChangeImplementation() {
  8865. var html = doc.documentElement;
  8866. registerImmediate = function(handle) {
  8867. // Create a <script> element; its readystatechange event will be fired asynchronously once it is inserted
  8868. // into the document. Do so, thus queuing up the task. Remember to clean up once it's been called.
  8869. var script = doc.createElement("script");
  8870. script.onreadystatechange = function () {
  8871. runIfPresent(handle);
  8872. script.onreadystatechange = null;
  8873. html.removeChild(script);
  8874. script = null;
  8875. };
  8876. html.appendChild(script);
  8877. };
  8878. }
  8879. function installSetTimeoutImplementation() {
  8880. registerImmediate = function(handle) {
  8881. setTimeout(runIfPresent, 0, handle);
  8882. };
  8883. }
  8884. // If supported, we should attach to the prototype of global, since that is where setTimeout et al. live.
  8885. var attachTo = Object.getPrototypeOf && Object.getPrototypeOf(global);
  8886. attachTo = attachTo && attachTo.setTimeout ? attachTo : global;
  8887. // Don't get fooled by e.g. browserify environments.
  8888. if ({}.toString.call(global.process) === "[object process]") {
  8889. // For Node.js before 0.9
  8890. installNextTickImplementation();
  8891. } else if (canUsePostMessage()) {
  8892. // For non-IE10 modern browsers
  8893. installPostMessageImplementation();
  8894. } else if (global.MessageChannel) {
  8895. // For web workers, where supported
  8896. installMessageChannelImplementation();
  8897. } else if (doc && "onreadystatechange" in doc.createElement("script")) {
  8898. // For IE 6–8
  8899. installReadyStateChangeImplementation();
  8900. } else {
  8901. // For older browsers
  8902. installSetTimeoutImplementation();
  8903. }
  8904. attachTo.setImmediate = setImmediate;
  8905. attachTo.clearImmediate = clearImmediate;
  8906. }(typeof self === "undefined" ? typeof global === "undefined" ? this : global : self));
  8907. /* WEBPACK VAR INJECTION */}.call(exports, __webpack_require__(11), __webpack_require__(8)))
  8908. /***/ }),
  8909. /* 61 */
  8910. /***/ (function(module, exports, __webpack_require__) {
  8911. "use strict";
  8912. exports.__esModule = true;
  8913. var _react = __webpack_require__(0);
  8914. var _react2 = _interopRequireDefault(_react);
  8915. var _propTypes = __webpack_require__(2);
  8916. var _propTypes2 = _interopRequireDefault(_propTypes);
  8917. var _StringResources = __webpack_require__(1);
  8918. var _StringResources2 = _interopRequireDefault(_StringResources);
  8919. var _caUiToolkit = __webpack_require__(3);
  8920. __webpack_require__(4);
  8921. function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
  8922. function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
  8923. function _possibleConstructorReturn(self, call) { if (!self) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return call && (typeof call === "object" || typeof call === "function") ? call : self; }
  8924. function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function, not " + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; } /**
  8925. * Licensed Materials - Property of IBM
  8926. * IBM Cognos Products: BI
  8927. * (C) Copyright IBM Corp. 2019
  8928. * US Government Users Restricted Rights - Use, duplication or disclosure restricted by GSA ADP Schedule Contract with IBM Corp.
  8929. */
  8930. var ConfirmReplaceDialog = function (_Component) {
  8931. _inherits(ConfirmReplaceDialog, _Component);
  8932. function ConfirmReplaceDialog(props) {
  8933. _classCallCheck(this, ConfirmReplaceDialog);
  8934. var _this = _possibleConstructorReturn(this, _Component.call(this, props));
  8935. _this._replace = function () {
  8936. _this.props.okCallback(_this.state.isApplyToAll);
  8937. };
  8938. _this._cancel = function () {
  8939. _this.props.cancelCallback(_this.state.isApplyToAll);
  8940. };
  8941. _this.state = {
  8942. isApplyToAll: _this.props.isApplyToAll
  8943. };
  8944. return _this;
  8945. }
  8946. ConfirmReplaceDialog.prototype.render = function render() {
  8947. var _this2 = this;
  8948. return _react2.default.createElement(
  8949. _caUiToolkit.Dialog,
  8950. { width: '500px', onClose: this._cancel, startingFocusIndex: 0 },
  8951. _react2.default.createElement(
  8952. _caUiToolkit.Dialog.Header,
  8953. null,
  8954. _StringResources2.default.get('schematicsReplaceDlgTitle')
  8955. ),
  8956. _react2.default.createElement(
  8957. _caUiToolkit.Dialog.Body,
  8958. null,
  8959. _StringResources2.default.get('schematicsReplaceDlgContent', { 'sourceName': this.props.sourceName })
  8960. ),
  8961. _react2.default.createElement(
  8962. _caUiToolkit.Dialog.Footer,
  8963. null,
  8964. _react2.default.createElement(
  8965. _caUiToolkit.FlexItem,
  8966. { grow: true },
  8967. _react2.default.createElement(
  8968. _caUiToolkit.FlexLayout,
  8969. {
  8970. direction: 'column',
  8971. width: '100%',
  8972. height: '100%',
  8973. alignItems: 'flex-start',
  8974. justifyContent: 'center'
  8975. },
  8976. _react2.default.createElement(
  8977. _caUiToolkit.FlexItem,
  8978. null,
  8979. _react2.default.createElement(_caUiToolkit.Checkbox, {
  8980. label: _StringResources2.default.get('schematicsReplaceDlgApplyToAllFiles'),
  8981. checked: this.state.isApplyToAll,
  8982. onChange: function onChange() {
  8983. return _this2.setState({ isApplyToAll: !_this2.state.isApplyToAll });
  8984. }
  8985. })
  8986. )
  8987. )
  8988. ),
  8989. _react2.default.createElement(_caUiToolkit.Dialog.Button, { id: 'idOkBtn', label: _StringResources2.default.get('okDialog'), onClick: this._replace, tabIndex: 0, intent: 'primary', variant: 'solid' }),
  8990. _react2.default.createElement(_caUiToolkit.Dialog.Button, { id: 'idCancelBtn', label: _StringResources2.default.get('cancelDialog'), onClick: this._cancel, tabIndex: 0, intent: 'primary', variant: 'frame' })
  8991. )
  8992. );
  8993. };
  8994. return ConfirmReplaceDialog;
  8995. }(_react.Component);
  8996. ConfirmReplaceDialog.propTypes = {
  8997. sourceName: _propTypes2.default.string.isRequired,
  8998. isApplyToAll: _propTypes2.default.bool.isRequired,
  8999. okCallback: _propTypes2.default.func.isRequired,
  9000. cancelCallback: _propTypes2.default.func.isRequired
  9001. };
  9002. exports.default = ConfirmReplaceDialog;
  9003. /***/ }),
  9004. /* 62 */
  9005. /***/ (function(module, exports, __webpack_require__) {
  9006. "use strict";
  9007. exports.__esModule = true;
  9008. var _react = __webpack_require__(0);
  9009. var _react2 = _interopRequireDefault(_react);
  9010. var _propTypes = __webpack_require__(2);
  9011. var _propTypes2 = _interopRequireDefault(_propTypes);
  9012. var _StringResources = __webpack_require__(1);
  9013. var _StringResources2 = _interopRequireDefault(_StringResources);
  9014. var _caUiToolkit = __webpack_require__(3);
  9015. __webpack_require__(4);
  9016. function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
  9017. function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
  9018. function _possibleConstructorReturn(self, call) { if (!self) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return call && (typeof call === "object" || typeof call === "function") ? call : self; }
  9019. function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function, not " + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; } /**
  9020. * Licensed Materials - Property of IBM
  9021. * IBM Cognos Products: BI
  9022. * (C) Copyright IBM Corp. 2019
  9023. * US Government Users Restricted Rights - Use, duplication or disclosure restricted by GSA ADP Schedule Contract with IBM Corp.
  9024. */
  9025. var ItemDetail = function (_Component) {
  9026. _inherits(ItemDetail, _Component);
  9027. function ItemDetail(props) {
  9028. _classCallCheck(this, ItemDetail);
  9029. return _possibleConstructorReturn(this, _Component.call(this, props));
  9030. }
  9031. /* componentWillReceiveProps(nextProps) {
  9032. } */
  9033. ItemDetail.prototype.renderCountSelection = function renderCountSelection() {
  9034. var selectionCount = this.props.selectionCount;
  9035. var label = selectionCount === 0 ? _StringResources2.default.get('schematicsNoSelection') : _StringResources2.default.get('schematicsMultipleSelection', { count: selectionCount });
  9036. return _react2.default.createElement(
  9037. _caUiToolkit.FlexLayout,
  9038. {
  9039. direction: 'column',
  9040. width: '100%',
  9041. height: '100%',
  9042. alignItems: 'center',
  9043. justifyContent: 'center',
  9044. className: 'clsSVGDetailContainer'
  9045. },
  9046. _react2.default.createElement(
  9047. _caUiToolkit.FlexItem,
  9048. null,
  9049. _react2.default.createElement(_caUiToolkit.Label, { type: 'caption', label: label })
  9050. )
  9051. );
  9052. };
  9053. ItemDetail.prototype.renderSingleSelection = function renderSingleSelection() {
  9054. var _this2 = this;
  9055. var _props = this.props,
  9056. item = _props.item,
  9057. index = _props.index,
  9058. fileRef = _props.fileRef;
  9059. var nameLabel = _StringResources2.default.get('nameLabelSchematic');
  9060. var captionLabel = _StringResources2.default.get('captionLabelSchematic');
  9061. var keyLabel = _StringResources2.default.get('keyLabelSchematic');
  9062. var sourceUrl = fileRef;
  9063. var source = item.source;
  9064. var caption = item.caption;
  9065. var key = item.key;
  9066. return _react2.default.createElement(
  9067. _caUiToolkit.FlexLayout,
  9068. {
  9069. direction: 'column',
  9070. width: '100%',
  9071. height: '100%',
  9072. alignItems: 'center',
  9073. className: 'clsSVGDetailContainer'
  9074. },
  9075. _react2.default.createElement(
  9076. _caUiToolkit.FlexItem,
  9077. null,
  9078. _react2.default.createElement(
  9079. _caUiToolkit.FlexLayout,
  9080. {
  9081. direction: 'column',
  9082. alignItems: 'center',
  9083. justifyContent: 'center',
  9084. className: 'clsSVGDetailStyle'
  9085. },
  9086. _react2.default.createElement(
  9087. _caUiToolkit.FlexItem,
  9088. { style: { width: '100%' } },
  9089. _react2.default.createElement(
  9090. _caUiToolkit.FlexItem,
  9091. null,
  9092. item && _react2.default.createElement('img', { style: { width: '100%', height: 'auto', maxWidth: '237px', maxHeight: '216px' }, src: sourceUrl })
  9093. )
  9094. )
  9095. )
  9096. ),
  9097. _react2.default.createElement(
  9098. _caUiToolkit.FlexItem,
  9099. null,
  9100. _react2.default.createElement(_caUiToolkit.VSpacer, { size: 2 })
  9101. ),
  9102. _react2.default.createElement(
  9103. _caUiToolkit.FlexItem,
  9104. { style: { width: '100%', height: '24px' } },
  9105. _react2.default.createElement(_caUiToolkit.Label, { type: 'caption', htmlFor: 'nameEdit', label: nameLabel })
  9106. ),
  9107. _react2.default.createElement(
  9108. _caUiToolkit.FlexItem,
  9109. { className: 'clsSVGDetailEdit' },
  9110. _react2.default.createElement(_caUiToolkit.TextInput, {
  9111. id: 'nameEdit',
  9112. value: source,
  9113. disabled: true })
  9114. ),
  9115. _react2.default.createElement(
  9116. _caUiToolkit.FlexItem,
  9117. null,
  9118. _react2.default.createElement(_caUiToolkit.VSpacer, { size: 3 })
  9119. ),
  9120. _react2.default.createElement(
  9121. _caUiToolkit.FlexItem,
  9122. { style: { width: '100%', height: '24px' } },
  9123. _react2.default.createElement(_caUiToolkit.Label, { type: 'caption', htmlFor: 'captionEdit', label: captionLabel })
  9124. ),
  9125. _react2.default.createElement(
  9126. _caUiToolkit.FlexItem,
  9127. { className: 'clsSVGDetailEdit' },
  9128. _react2.default.createElement(_caUiToolkit.TextInput, {
  9129. id: 'captionEdit',
  9130. value: caption,
  9131. onValueChange: function onValueChange(v) {
  9132. _this2.props.updateItemCallback('caption', v, index);
  9133. }
  9134. })
  9135. ),
  9136. _react2.default.createElement(
  9137. _caUiToolkit.FlexItem,
  9138. null,
  9139. _react2.default.createElement(_caUiToolkit.VSpacer, { size: 3 })
  9140. ),
  9141. _react2.default.createElement(
  9142. _caUiToolkit.FlexItem,
  9143. { style: { width: '100%', height: '24px' } },
  9144. _react2.default.createElement(_caUiToolkit.Label, { type: 'caption', htmlFor: 'keyEdit', label: keyLabel })
  9145. ),
  9146. _react2.default.createElement(
  9147. _caUiToolkit.FlexItem,
  9148. { className: 'clsSVGDetailEdit' },
  9149. _react2.default.createElement(_caUiToolkit.TextInput, {
  9150. id: 'keyEdit',
  9151. value: key,
  9152. onValueChange: function onValueChange(v) {
  9153. _this2.props.updateItemCallback('key', v, index);
  9154. }
  9155. })
  9156. )
  9157. );
  9158. };
  9159. ItemDetail.prototype.render = function render() {
  9160. var selectionCount = this.props.selectionCount;
  9161. if (selectionCount === 1) return this.renderSingleSelection();
  9162. return this.renderCountSelection();
  9163. };
  9164. return ItemDetail;
  9165. }(_react.Component);
  9166. ItemDetail.propTypes = {
  9167. item: _propTypes2.default.object.isRequired,
  9168. fileRef: _propTypes2.default.string.isRequired,
  9169. updateItemCallback: _propTypes2.default.func.isRequired,
  9170. index: _propTypes2.default.number.isRequired,
  9171. selectionCount: _propTypes2.default.number.isRequired
  9172. };
  9173. exports.default = ItemDetail;
  9174. /***/ }),
  9175. /* 63 */
  9176. /***/ (function(module, exports, __webpack_require__) {
  9177. "use strict";
  9178. exports.__esModule = true;
  9179. var _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; };
  9180. var _react = __webpack_require__(0);
  9181. var _react2 = _interopRequireDefault(_react);
  9182. var _propTypes = __webpack_require__(2);
  9183. var _propTypes2 = _interopRequireDefault(_propTypes);
  9184. var _StringResources = __webpack_require__(1);
  9185. var _StringResources2 = _interopRequireDefault(_StringResources);
  9186. var _VisualItem = __webpack_require__(64);
  9187. var _VisualItem2 = _interopRequireDefault(_VisualItem);
  9188. var _caUiToolkit = __webpack_require__(3);
  9189. __webpack_require__(4);
  9190. var _search_ = __webpack_require__(67);
  9191. var _search_2 = _interopRequireDefault(_search_);
  9192. function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
  9193. function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
  9194. function _possibleConstructorReturn(self, call) { if (!self) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return call && (typeof call === "object" || typeof call === "function") ? call : self; }
  9195. function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function, not " + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; } /**
  9196. * Licensed Materials - Property of IBM
  9197. * IBM Cognos Products: BI
  9198. * (C) Copyright IBM Corp. 2019
  9199. * US Government Users Restricted Rights - Use, duplication or disclosure restricted by GSA ADP Schedule Contract with IBM Corp.
  9200. */
  9201. // search_16 is placeHolder.
  9202. //import emptySearchResults from '@ba-ui-toolkit/ba-graphics/dist/illustrations-js/search-results_128.js';
  9203. var VisualItems = function (_Component) {
  9204. _inherits(VisualItems, _Component);
  9205. function VisualItems(props) {
  9206. _classCallCheck(this, VisualItems);
  9207. var _this = _possibleConstructorReturn(this, _Component.call(this, props));
  9208. _this._renderEmptySearchResults = function () {
  9209. var searchMatches = _this.props.searchMatches;
  9210. if (searchMatches && searchMatches.length === 0) return _react2.default.createElement(
  9211. _caUiToolkit.FlexLayout,
  9212. {
  9213. direction: 'column',
  9214. width: '100%',
  9215. height: '100%',
  9216. alignItems: 'center',
  9217. justifyContent: 'center'
  9218. },
  9219. _react2.default.createElement(
  9220. _caUiToolkit.FlexItem,
  9221. null,
  9222. _react2.default.createElement(
  9223. _caUiToolkit.FlexItem,
  9224. null,
  9225. _react2.default.createElement(_caUiToolkit.SVGIcon, {
  9226. width: 150,
  9227. height: 150,
  9228. focusable: false,
  9229. intent: 'info',
  9230. className: 'svgIcon',
  9231. verticalAlign: 'middle',
  9232. iconId: _search_2.default.id
  9233. })
  9234. ),
  9235. _react2.default.createElement(
  9236. _caUiToolkit.FlexItem,
  9237. null,
  9238. _react2.default.createElement(_caUiToolkit.VSpacer, { size: 2 })
  9239. ),
  9240. _react2.default.createElement(
  9241. _caUiToolkit.FlexItem,
  9242. null,
  9243. _react2.default.createElement(_caUiToolkit.Label, { label: _StringResources2.default.get('schematicsEmptySearchResults') })
  9244. )
  9245. )
  9246. );
  9247. };
  9248. return _this;
  9249. }
  9250. /* componentWillReceiveProps(nextProps) {
  9251. } */
  9252. VisualItems.prototype.renderVisualizationItem = function renderVisualizationItem(item, fileRef, selected, idx) {
  9253. // remove the props we don't want to pass to each child
  9254. return _react2.default.createElement(_VisualItem2.default, _extends({}, this.props, { key: item.source, item: item, fileRef: fileRef, selected: selected, idx: idx }));
  9255. };
  9256. VisualItems.prototype.render = function render() {
  9257. var _this2 = this;
  9258. var _props = this.props,
  9259. items = _props.items,
  9260. files = _props.files,
  9261. selections = _props.selections,
  9262. searchMatches = _props.searchMatches;
  9263. var contentItems = [];
  9264. items.forEach(function (item, idx) {
  9265. var selected = selections.indexOf(idx) !== -1;
  9266. if (searchMatches && searchMatches.indexOf(idx) !== -1 || !searchMatches) contentItems.push(_this2.renderVisualizationItem(item, files[idx], selected, idx));
  9267. });
  9268. return _react2.default.createElement(
  9269. _caUiToolkit.FlexLayout,
  9270. {
  9271. direction: 'row',
  9272. wrap: 'wrap',
  9273. alignItems: 'flex-start',
  9274. justifyContent: 'flex-start',
  9275. style: { alignContent: 'flex-start' },
  9276. className: 'clsSVGTilesStyle',
  9277. onClick: function onClick(e) {
  9278. e.stopPropagation();
  9279. _this2.props.deSelectAllCallback();
  9280. }
  9281. },
  9282. this._renderEmptySearchResults(),
  9283. contentItems
  9284. );
  9285. };
  9286. return VisualItems;
  9287. }(_react.Component);
  9288. VisualItems.propTypes = {
  9289. items: _propTypes2.default.array.isRequired,
  9290. files: _propTypes2.default.array.isRequired,
  9291. selections: _propTypes2.default.array.isRequired,
  9292. searchMatches: _propTypes2.default.array, // can be null means no search at all, show all items.
  9293. selectVisualItemCallback: _propTypes2.default.func.isRequired,
  9294. deSelectAllCallback: _propTypes2.default.func.isRequired,
  9295. handleVisualItemContextMenuCallback: _propTypes2.default.func.isRequired
  9296. };
  9297. exports.default = VisualItems;
  9298. /***/ }),
  9299. /* 64 */
  9300. /***/ (function(module, exports, __webpack_require__) {
  9301. "use strict";
  9302. exports.__esModule = true;
  9303. var _react = __webpack_require__(0);
  9304. var _react2 = _interopRequireDefault(_react);
  9305. var _propTypes = __webpack_require__(2);
  9306. var _propTypes2 = _interopRequireDefault(_propTypes);
  9307. var _StringResources = __webpack_require__(1);
  9308. var _StringResources2 = _interopRequireDefault(_StringResources);
  9309. var _ContextMenuWrapper = __webpack_require__(65);
  9310. var _ContextMenuWrapper2 = _interopRequireDefault(_ContextMenuWrapper);
  9311. var _caUiToolkit = __webpack_require__(3);
  9312. __webpack_require__(4);
  9313. var _menuOverflow_ = __webpack_require__(66);
  9314. var _menuOverflow_2 = _interopRequireDefault(_menuOverflow_);
  9315. function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
  9316. function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
  9317. function _possibleConstructorReturn(self, call) { if (!self) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return call && (typeof call === "object" || typeof call === "function") ? call : self; }
  9318. function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function, not " + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; } /**
  9319. * Licensed Materials - Property of IBM
  9320. * IBM Cognos Products: BI
  9321. * (C) Copyright IBM Corp. 2019
  9322. * US Government Users Restricted Rights - Use, duplication or disclosure restricted by GSA ADP Schedule Contract with IBM Corp.
  9323. */
  9324. var VisualItem = function (_Component) {
  9325. _inherits(VisualItem, _Component);
  9326. function VisualItem(props) {
  9327. _classCallCheck(this, VisualItem);
  9328. var _this = _possibleConstructorReturn(this, _Component.call(this, props));
  9329. _this._onClickHandler = function (e) {
  9330. e.stopPropagation();
  9331. _this.props.selectVisualItemCallback(_this.props.idx, e.ctrlKey || e.metaKey);
  9332. };
  9333. _this._onKeyDownHandler = function (e) {
  9334. // implement
  9335. if (e.keyCode === 32 || e.keyCode === 13) {
  9336. // TODO - we should cancel the event
  9337. // but this is react event so outside normal event processing
  9338. // see https://medium.com/@ericclemmons/react-event-preventdefault-78c28c950e46
  9339. // use native event to stop this
  9340. _this.props.selectVisualItemCallback(_this.props.idx, e.ctrlKey || e.metaKey);
  9341. }
  9342. };
  9343. _this._showVisualItemContextMenu = function (idx) {
  9344. _this.props.selectVisualItemCallback(idx);
  9345. _this.props.handleVisualItemContextMenuCallback();
  9346. _this.setState({ isContextMenuOpen: !_this.state.isContextMenuOpen });
  9347. };
  9348. _this._closeVisualItemContextMenu = function () {
  9349. _this.setState({ isContextMenuOpen: false });
  9350. };
  9351. _this._renderItem = function (fileRef, selected, idx) {
  9352. var className = 'clsSVGTileStyle' + (selected ? '_selected' : '');
  9353. return _react2.default.createElement(
  9354. _caUiToolkit.FlexLayout,
  9355. {
  9356. direction: 'column',
  9357. className: className,
  9358. role: 'button',
  9359. tabIndex: 0,
  9360. onClick: _this._onClickHandler,
  9361. onKeyDown: _this._onKeyDownHandler
  9362. },
  9363. _react2.default.createElement(
  9364. _caUiToolkit.FlexItem,
  9365. { style: { width: '100%', height: '16px' } },
  9366. _this._renderMenuOption(idx)
  9367. ),
  9368. _react2.default.createElement(
  9369. _caUiToolkit.FlexItem,
  9370. { grow: true, shrink: false },
  9371. _this._renderContent(fileRef)
  9372. )
  9373. );
  9374. };
  9375. _this._renderMenuOption = function (idx) {
  9376. return _react2.default.createElement(
  9377. _caUiToolkit.FlexLayout,
  9378. {
  9379. direction: 'row-reverse',
  9380. className: 'clsSVGTileStyleMenu'
  9381. },
  9382. _react2.default.createElement(
  9383. _caUiToolkit.FlexItem,
  9384. {
  9385. className: 'clsSVGTileStyleMenuAnchor'
  9386. },
  9387. _react2.default.createElement(_caUiToolkit.SVGIcon, {
  9388. size: 'small',
  9389. className: 'svgIcon',
  9390. verticalAlign: 'initial',
  9391. tabIndex: 0,
  9392. iconId: _menuOverflow_2.default.id,
  9393. onKeyDown: function onKeyDown(e) {
  9394. e.stopPropagation();
  9395. if (e.keyCode === 32 || e.keyCode === 13) {
  9396. _this._showVisualItemContextMenu(idx);
  9397. }
  9398. },
  9399. onClick: function onClick(e) {
  9400. e.stopPropagation();
  9401. _this._showVisualItemContextMenu(idx);
  9402. }
  9403. }),
  9404. _this._renderContextMenu(idx)
  9405. )
  9406. );
  9407. };
  9408. _this._renderContextMenu = function (idx) {
  9409. if (!_this.state.isContextMenuOpen) {
  9410. return;
  9411. }
  9412. return _this._getContextMenuContent(idx);
  9413. };
  9414. _this._renderContent = function (fileRef) {
  9415. // all urls are represented as blobs in our files data
  9416. // (implies that any integrator would extract and supply as blobs)
  9417. return _react2.default.createElement(
  9418. _caUiToolkit.FlexLayout,
  9419. {
  9420. direction: 'column',
  9421. width: '100%',
  9422. height: '100%',
  9423. alignItems: 'center',
  9424. justifyContent: 'center'
  9425. },
  9426. _react2.default.createElement(
  9427. _caUiToolkit.FlexItem,
  9428. { style: { width: '100%' } },
  9429. _react2.default.createElement(
  9430. _caUiToolkit.FlexItem,
  9431. null,
  9432. _react2.default.createElement('img', { style: { width: '100%', height: 'auto', maxWidth: '108px', maxHeight: '108px' },
  9433. src: fileRef
  9434. })
  9435. )
  9436. )
  9437. );
  9438. };
  9439. _this._renderItemLabel = function (item) {
  9440. return _react2.default.createElement(_caUiToolkit.Label, { label: item.caption, ellipsis: true });
  9441. };
  9442. _this.state = {
  9443. isContextMenuOpen: false
  9444. };
  9445. return _this;
  9446. }
  9447. VisualItem.prototype._getContextMenuContent = function _getContextMenuContent(idx) {
  9448. var _this2 = this;
  9449. var placement = 'bottomRight';
  9450. var align = 'left';
  9451. return _react2.default.createElement(_ContextMenuWrapper2.default, {
  9452. theme: true,
  9453. placement: placement,
  9454. align: align,
  9455. triggerNode: this.target,
  9456. domNodeToAttachTo: document.body,
  9457. onClose: this._closeVisualItemContextMenu,
  9458. onChange: function onChange(name, value) {
  9459. _this2._closeVisualItemContextMenu();
  9460. _this2.props.handleVisualItemContextMenuCallback(name, value, idx);
  9461. },
  9462. contextMenuItems: this._getContextMenuItems() });
  9463. };
  9464. VisualItem.prototype._getContextMenuItems = function _getContextMenuItems() {
  9465. var updateItem = [{
  9466. id: 'replace',
  9467. value: 'replace',
  9468. label: _StringResources2.default.get('schematicsContextMenuReplace')
  9469. }];
  9470. var deleteItem = [{
  9471. id: 'delete',
  9472. value: 'delete',
  9473. label: _StringResources2.default.get('schematicsContextMenuDelete')
  9474. }];
  9475. var sepator = {};
  9476. return [{ items: updateItem }, sepator, { items: deleteItem }];
  9477. };
  9478. //
  9479. // Main render function
  9480. //
  9481. VisualItem.prototype.render = function render() {
  9482. return _react2.default.createElement(
  9483. _caUiToolkit.FlexItem,
  9484. {
  9485. style: { marginLeft: '16px', marginTop: '16px' }
  9486. },
  9487. _react2.default.createElement(
  9488. 'div',
  9489. { ref: this._rootRef, style: { width: '128px' } },
  9490. _react2.default.createElement(
  9491. _caUiToolkit.FlexLayout,
  9492. {
  9493. fullHeight: true,
  9494. direction: 'column',
  9495. alignItems: 'flex-start'
  9496. },
  9497. _react2.default.createElement(
  9498. _caUiToolkit.FlexItem,
  9499. null,
  9500. this._renderItem(this.props.fileRef, this.props.selected, this.props.idx)
  9501. ),
  9502. _react2.default.createElement(
  9503. _caUiToolkit.FlexItem,
  9504. null,
  9505. _react2.default.createElement(_caUiToolkit.VSpacer, { size: 1 })
  9506. ),
  9507. _react2.default.createElement(
  9508. _caUiToolkit.FlexItem,
  9509. { alignSelf: 'center',
  9510. onClick: this._onClickHandler,
  9511. onKeyDown: this._onKeyDownHandler
  9512. },
  9513. this._renderItemLabel(this.props.item)
  9514. ),
  9515. _react2.default.createElement(
  9516. _caUiToolkit.FlexItem,
  9517. null,
  9518. _react2.default.createElement(_caUiToolkit.VSpacer, { size: 1 })
  9519. )
  9520. )
  9521. )
  9522. );
  9523. };
  9524. return VisualItem;
  9525. }(_react.Component);
  9526. VisualItem.propTypes = {
  9527. item: _propTypes2.default.object.isRequired,
  9528. fileRef: _propTypes2.default.string.isRequired,
  9529. selected: _propTypes2.default.bool.isRequired,
  9530. idx: _propTypes2.default.number.isRequired,
  9531. items: _propTypes2.default.array.isRequired,
  9532. files: _propTypes2.default.array.isRequired,
  9533. selections: _propTypes2.default.array.isRequired,
  9534. selectVisualItemCallback: _propTypes2.default.func.isRequired,
  9535. handleVisualItemContextMenuCallback: _propTypes2.default.func.isRequired
  9536. };
  9537. exports.default = VisualItem;
  9538. /***/ }),
  9539. /* 65 */
  9540. /***/ (function(module, exports, __webpack_require__) {
  9541. "use strict";
  9542. exports.__esModule = true;
  9543. var _react = __webpack_require__(0);
  9544. var _react2 = _interopRequireDefault(_react);
  9545. var _propTypes = __webpack_require__(2);
  9546. var _propTypes2 = _interopRequireDefault(_propTypes);
  9547. var _caUiToolkit = __webpack_require__(3);
  9548. __webpack_require__(4);
  9549. function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
  9550. function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
  9551. function _possibleConstructorReturn(self, call) { if (!self) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return call && (typeof call === "object" || typeof call === "function") ? call : self; }
  9552. function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function, not " + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; } /**
  9553. * Licensed Materials - Property of IBM
  9554. * IBM Cognos Products: BI
  9555. * (C) Copyright IBM Corp. 2019
  9556. * US Government Users Restricted Rights - Use, duplication or disclosure restricted by GSA ADP Schedule Contract with IBM Corp.
  9557. */
  9558. var ContextMenuWrapper = function (_Component) {
  9559. _inherits(ContextMenuWrapper, _Component);
  9560. function ContextMenuWrapper(props) {
  9561. _classCallCheck(this, ContextMenuWrapper);
  9562. return _possibleConstructorReturn(this, _Component.call(this, props));
  9563. }
  9564. ContextMenuWrapper.prototype.render = function render() {
  9565. var _props = this.props,
  9566. theme = _props.theme,
  9567. _props$placement = _props.placement,
  9568. placement = _props$placement === undefined ? 'bottomRight' : _props$placement,
  9569. _props$align = _props.align,
  9570. align = _props$align === undefined ? 'left' : _props$align,
  9571. _props$domNodeToAttac = _props.domNodeToAttachTo,
  9572. domNodeToAttachTo = _props$domNodeToAttac === undefined ? document.body : _props$domNodeToAttac,
  9573. triggerNode = _props.triggerNode,
  9574. contextMenuItems = _props.contextMenuItems,
  9575. onClose = _props.onClose,
  9576. onChange = _props.onChange;
  9577. if (!contextMenuItems || !contextMenuItems.length) {
  9578. return;
  9579. }
  9580. return _react2.default.createElement(
  9581. _caUiToolkit.ContextMenu,
  9582. {
  9583. theme: theme,
  9584. placement: placement,
  9585. align: align,
  9586. triggerNode: triggerNode,
  9587. domNodeToAttachTo: domNodeToAttachTo,
  9588. onClose: onClose,
  9589. onChange: onChange,
  9590. onClick: function onClick(e) {
  9591. // TODO - is there a better way than this?
  9592. // stop propagation of the click event out of context menu
  9593. // this stops a click event from being registered on the parent element
  9594. e.stopPropagation();
  9595. },
  9596. onKeyDown: function onKeyDown(e) {
  9597. // stop propagation of the key event out of context menu
  9598. // this stops a key event from being registered on the parent element
  9599. e.stopPropagation();
  9600. }
  9601. },
  9602. this._renderMenuItems(contextMenuItems)
  9603. );
  9604. };
  9605. ContextMenuWrapper.prototype._renderMenuItems = function _renderMenuItems(items) {
  9606. var _this2 = this;
  9607. if (items) {
  9608. return items.map(function (section, index) {
  9609. return _this2._renderMenuSection(section, index);
  9610. });
  9611. }
  9612. };
  9613. ContextMenuWrapper.prototype._renderMenuSection = function _renderMenuSection(section, key) {
  9614. if (Array.isArray(section.items)) {
  9615. var _section$name = section.name,
  9616. name = _section$name === undefined ? 'menu' : _section$name,
  9617. label = section.label,
  9618. items = section.items;
  9619. return _react2.default.createElement(_caUiToolkit.ContextMenu.List, {
  9620. key: key,
  9621. content: items,
  9622. name: name,
  9623. label: label,
  9624. clickSelection: true });
  9625. } else {
  9626. return _react2.default.createElement(_caUiToolkit.ContextMenu.Separator, {
  9627. key: key
  9628. });
  9629. }
  9630. };
  9631. return ContextMenuWrapper;
  9632. }(_react.Component);
  9633. ContextMenuWrapper.propTypes = {
  9634. contextMenuItems: _propTypes2.default.array,
  9635. placement: _propTypes2.default.string,
  9636. align: _propTypes2.default.string,
  9637. triggerNode: _propTypes2.default.object,
  9638. style: _propTypes2.default.object,
  9639. domNodeToAttachTo: _propTypes2.default.object,
  9640. theme: _propTypes2.default.bool,
  9641. onClose: _propTypes2.default.func,
  9642. onChange: _propTypes2.default.func
  9643. };
  9644. exports.default = ContextMenuWrapper;
  9645. /***/ }),
  9646. /* 66 */
  9647. /***/ (function(module, exports, __webpack_require__) {
  9648. !function(e,o){if(true)module.exports=o(__webpack_require__(7));else if("function"==typeof define&&define.amd)define(["@ba-ui-toolkit/ba-graphics/dist/icons-js/ba-graphics-icons-commons.js"],o);else{var c=o("object"==typeof exports?require("@ba-ui-toolkit/ba-graphics/dist/icons-js/ba-graphics-icons-commons.js"):e["@ba-ui-toolkit/ba-graphics/dist/icons-js/ba-graphics-icons-commons.js"]);for(var s in c)("object"==typeof exports?exports:e)[s]=c[s]}}("undefined"!=typeof self?self:this,function(e){return webpackJsonPBaGraphics([884],{"3865314c5959606874d4":function(o,c){o.exports=e},af83182bafd180c8d184:function(e,o,c){"use strict";Object.defineProperty(o,"__esModule",{value:!0});var s=c("3865314c5959606874d4"),i=(c.n(s),c("eb2240265499dbcd194b"));o.default=i.a},eb2240265499dbcd194b:function(e,o,c){"use strict";var s=c("9689a9c94ae38b47fa2c"),i=c.n(s),t=c("9ce58a7deea14f49ef01"),a=c.n(t),n=new i.a({id:"menu-overflow_24_v7",use:"menu-overflow_24_v7-usage",viewBox:"0 0 24 24",content:'<symbol xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" id="menu-overflow_24_v7"><circle cx="4" cy="12" r="2" /><circle cx="12" cy="12" r="2" /><circle cx="20" cy="12" r="2" /></symbol>'});a.a.add(n);o.a=n}},["af83182bafd180c8d184"])});
  9649. /***/ }),
  9650. /* 67 */
  9651. /***/ (function(module, exports, __webpack_require__) {
  9652. !function(e,s){if(true)module.exports=s(__webpack_require__(7));else if("function"==typeof define&&define.amd)define(["@ba-ui-toolkit/ba-graphics/dist/icons-js/ba-graphics-icons-commons.js"],s);else{var o=s("object"==typeof exports?require("@ba-ui-toolkit/ba-graphics/dist/icons-js/ba-graphics-icons-commons.js"):e["@ba-ui-toolkit/ba-graphics/dist/icons-js/ba-graphics-icons-commons.js"]);for(var a in o)("object"==typeof exports?exports:e)[a]=o[a]}}("undefined"!=typeof self?self:this,function(e){return webpackJsonPBaGraphics([447],{"2faa256623dda8fa3df1":function(e,s,o){"use strict";var a=o("9689a9c94ae38b47fa2c"),i=o.n(a),c=o("9ce58a7deea14f49ef01"),t=o.n(c),n=new i.a({id:"search_16_v7",use:"search_16_v7-usage",viewBox:"0 0 16 16",content:'<symbol xmlns="http://www.w3.org/2000/svg" viewBox="0 0 16 16" id="search_16_v7"><path d="M15 14.3L10.7 10c1.9-2.3 1.6-5.8-.7-7.7S4.2.7 2.3 3 .7 8.8 3 10.7c2 1.7 5 1.7 7 0l4.3 4.3.7-.7zM2 6.5C2 4 4 2 6.5 2S11 4 11 6.5 9 11 6.5 11 2 9 2 6.5z" /><path style="fill:none" d="M0 0h16v16H0z" /></symbol>'});t.a.add(n);s.a=n},"3865314c5959606874d4":function(s,o){s.exports=e},"7417e443bcec9c766abb":function(e,s,o){"use strict";Object.defineProperty(s,"__esModule",{value:!0});var a=o("3865314c5959606874d4"),i=(o.n(a),o("2faa256623dda8fa3df1"));s.default=i.a}},["7417e443bcec9c766abb"])});
  9653. /***/ }),
  9654. /* 68 */
  9655. /***/ (function(module, exports, __webpack_require__) {
  9656. "use strict";
  9657. exports.__esModule = true;
  9658. var _react = __webpack_require__(0);
  9659. var _react2 = _interopRequireDefault(_react);
  9660. var _propTypes = __webpack_require__(2);
  9661. var _propTypes2 = _interopRequireDefault(_propTypes);
  9662. var _StringResources = __webpack_require__(1);
  9663. var _StringResources2 = _interopRequireDefault(_StringResources);
  9664. var _caUiToolkit = __webpack_require__(3);
  9665. __webpack_require__(4);
  9666. var _Loader = __webpack_require__(25);
  9667. var _Loader2 = _interopRequireDefault(_Loader);
  9668. var _upload_ = __webpack_require__(69);
  9669. var _upload_2 = _interopRequireDefault(_upload_);
  9670. var _dismiss_ = __webpack_require__(70);
  9671. var _dismiss_2 = _interopRequireDefault(_dismiss_);
  9672. function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
  9673. function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
  9674. function _possibleConstructorReturn(self, call) { if (!self) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return call && (typeof call === "object" || typeof call === "function") ? call : self; }
  9675. function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function, not " + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; } /**
  9676. * Licensed Materials - Property of IBM
  9677. * IBM Cognos Products: BI
  9678. * (C) Copyright IBM Corp. 2019
  9679. * US Government Users Restricted Rights - Use, duplication or disclosure restricted by GSA ADP Schedule Contract with IBM Corp.
  9680. */
  9681. var ICON_ADD = 'add';
  9682. var ICON_REMOVE = 'remove';
  9683. var ICON_FILE_TYPES = '.svg .jpg .png';
  9684. var PackagePanel = function (_Component) {
  9685. _inherits(PackagePanel, _Component);
  9686. function PackagePanel(props) {
  9687. _classCallCheck(this, PackagePanel);
  9688. var _this = _possibleConstructorReturn(this, _Component.call(this, props));
  9689. _this._showOverlay = function () {
  9690. _this.setState({ isDragging: true });
  9691. };
  9692. _this._hideOverlay = function () {
  9693. _this.setState({ isDragging: false });
  9694. };
  9695. _this._findSourceName = function (_name) {
  9696. return _name.split('/').pop();
  9697. };
  9698. _this._getUrlCreator = function () {
  9699. return window.URL || window.webkitURL;
  9700. };
  9701. _this._handlePackageNameChange = function (_value) {
  9702. _this.props.onChange({ 'name': 'name', 'value': _value });
  9703. };
  9704. _this._handlePackageDescriptionChange = function (_value) {
  9705. _this.props.onChange({ 'name': 'description', 'value': _value });
  9706. };
  9707. _this._handleDragEnter = function () {
  9708. _this._showOverlay();
  9709. };
  9710. _this._handleDragOver = function (_event) {
  9711. _event.dataTransfer.dropEffect = 'copy';
  9712. _event.preventDefault();
  9713. _event.stopPropagation();
  9714. };
  9715. _this._handleDragEnd = function () {
  9716. _this._hideOverlay();
  9717. };
  9718. _this._handleDragLeave = function (_event) {
  9719. _this._hideOverlay();
  9720. _event.preventDefault();
  9721. };
  9722. _this._handleDrop = function (_event) {
  9723. _this._hideOverlay();
  9724. var failed = false;
  9725. // Check that the file type is '.svg'
  9726. for (var i = 0; i < _event.dataTransfer.files.length; i++) {
  9727. var file = _event.dataTransfer.files[i];
  9728. if (ICON_FILE_TYPES.indexOf(file.name.toLowerCase().substr(-4)) < 0) {
  9729. _this.props.onIconError(new Error(_StringResources2.default.get('schematicsInvalidType', { type: file.name })));
  9730. failed = true;
  9731. break;
  9732. }
  9733. }
  9734. if (!failed) _this._handleIconChange(ICON_ADD, _event.dataTransfer.files);
  9735. _event.preventDefault();
  9736. };
  9737. _this._handleIconChange = function (_action, _files) {
  9738. var _this$props = _this.props,
  9739. zipMaxSize = _this$props.zipMaxSize,
  9740. imgMaxSize = _this$props.imgMaxSize,
  9741. onIconError = _this$props.onIconError,
  9742. onIconChanged = _this$props.onIconChanged;
  9743. if (_action === 'add') {
  9744. var loader = new _Loader2.default(null, zipMaxSize, imgMaxSize, ICON_FILE_TYPES);
  9745. loader.load(_files, function (_fileList) {
  9746. if (_fileList.length > 0) {
  9747. var item = _fileList[0];
  9748. var blobUrl = null;
  9749. var sourceName = _this._findSourceName(item);
  9750. var loadPromise = loader.getFileAsBlob(item);
  9751. loadPromise.then(function (loadedBlobUrl) {
  9752. blobUrl = _this._getUrlCreator().createObjectURL(loadedBlobUrl);
  9753. onIconChanged(sourceName, blobUrl);
  9754. }).catch(onIconError);
  9755. }
  9756. }, onIconError);
  9757. } else if (_action === 'remove') {
  9758. onIconChanged('', '');
  9759. }
  9760. };
  9761. _this.state = {
  9762. isDragging: false
  9763. };
  9764. _this.inputRef = null;
  9765. _this.dndOverlay = null;
  9766. return _this;
  9767. }
  9768. //
  9769. // Utility functions
  9770. //
  9771. //
  9772. // Event handlers
  9773. //
  9774. // The package name has changed
  9775. // The package description has changed
  9776. PackagePanel.prototype._renderTabContent = function _renderTabContent() {
  9777. if (this.props.iconURL) return this._renderIconRow();else return this._renderDropZone();
  9778. };
  9779. PackagePanel.prototype._renderIconRow = function _renderIconRow() {
  9780. var _this2 = this;
  9781. var _props = this.props,
  9782. iconURL = _props.iconURL,
  9783. iconName = _props.iconName;
  9784. if (iconURL) {
  9785. return _react2.default.createElement(
  9786. _caUiToolkit.FlexLayout,
  9787. {
  9788. className: 'clsSVGIconRow',
  9789. direction: 'row',
  9790. justifyContent: 'flex-start',
  9791. alignItems: 'center'
  9792. },
  9793. _react2.default.createElement(
  9794. _caUiToolkit.FlexItem,
  9795. null,
  9796. _react2.default.createElement(
  9797. _caUiToolkit.FlexLayout,
  9798. {
  9799. direction: 'column',
  9800. alignItems: 'center',
  9801. justifyContent: 'center',
  9802. id: 'svgIconFL'
  9803. },
  9804. _react2.default.createElement(
  9805. _caUiToolkit.FlexItem,
  9806. { id: 'svgIconFI' },
  9807. _react2.default.createElement(
  9808. _caUiToolkit.FlexItem,
  9809. null,
  9810. _react2.default.createElement('img', {
  9811. id: 'svgIconIMG',
  9812. src: iconURL
  9813. })
  9814. )
  9815. )
  9816. )
  9817. ),
  9818. _react2.default.createElement(
  9819. _caUiToolkit.FlexItem,
  9820. null,
  9821. _react2.default.createElement(_caUiToolkit.HSpacer, { size: 2 })
  9822. ),
  9823. _react2.default.createElement(
  9824. _caUiToolkit.FlexItem,
  9825. { grow: true },
  9826. _react2.default.createElement(
  9827. _caUiToolkit.FlexLayout,
  9828. { direction: 'row', justifyContent: 'flex-start' },
  9829. _react2.default.createElement(
  9830. _caUiToolkit.FlexItem,
  9831. null,
  9832. _react2.default.createElement(_caUiToolkit.Label, { id: 'idSchematicIconLabel', type: 'caption', htmlFor: 'idSchematicIcon', label: iconName, ellipsis: true })
  9833. )
  9834. )
  9835. ),
  9836. _react2.default.createElement(
  9837. _caUiToolkit.FlexItem,
  9838. null,
  9839. _react2.default.createElement(_caUiToolkit.Button, {
  9840. id: 'idRemoveIcon',
  9841. intent: 'primary',
  9842. icon: _dismiss_2.default.id,
  9843. iconSize: 'small',
  9844. variant: 'icon',
  9845. onClick: function onClick() {
  9846. return _this2._handleIconChange(ICON_REMOVE, null);
  9847. },
  9848. title: _StringResources2.default.get('schematicsDeleteIcon'),
  9849. tabIndex: 0
  9850. })
  9851. )
  9852. );
  9853. } else return;
  9854. };
  9855. PackagePanel.prototype._renderDropZone = function _renderDropZone() {
  9856. var _this3 = this;
  9857. var imgMaxSize = this.props.imgMaxSize;
  9858. var dropLabel = _StringResources2.default.get('schematicsIconDropFiles');
  9859. var orLabel = _StringResources2.default.get('schematicsIconOr');
  9860. var fileTypesLabel = _StringResources2.default.get('schematicsIconFileTypes');
  9861. var fileSizeLabel = _StringResources2.default.get('schematicsIconFileSize', { size: imgMaxSize });
  9862. return _react2.default.createElement(
  9863. _caUiToolkit.FlexLayout,
  9864. {
  9865. fullHeight: true,
  9866. alignItems: 'center',
  9867. direction: 'column',
  9868. justifyContent: 'center'
  9869. },
  9870. _react2.default.createElement(
  9871. _caUiToolkit.FlexItem,
  9872. null,
  9873. _react2.default.createElement(_caUiToolkit.SVGIcon, {
  9874. width: 32,
  9875. height: 32,
  9876. focusable: false,
  9877. intent: 'info',
  9878. className: 'svgIcon',
  9879. verticalAlign: 'middle',
  9880. iconId: _upload_2.default.id
  9881. })
  9882. ),
  9883. _react2.default.createElement(
  9884. _caUiToolkit.FlexItem,
  9885. null,
  9886. _react2.default.createElement(_caUiToolkit.VSpacer, { size: 2 })
  9887. ),
  9888. _react2.default.createElement(
  9889. _caUiToolkit.FlexItem,
  9890. null,
  9891. _react2.default.createElement(_caUiToolkit.Label, { type: 'caption', label: dropLabel })
  9892. ),
  9893. _react2.default.createElement(
  9894. _caUiToolkit.FlexItem,
  9895. null,
  9896. _react2.default.createElement(_caUiToolkit.Label, { label: orLabel })
  9897. ),
  9898. _react2.default.createElement(
  9899. _caUiToolkit.FlexItem,
  9900. null,
  9901. _react2.default.createElement(_caUiToolkit.VSpacer, { size: 1 })
  9902. ),
  9903. _react2.default.createElement(
  9904. _caUiToolkit.FlexItem,
  9905. null,
  9906. _react2.default.createElement('input', {
  9907. ref: function ref(_ref) {
  9908. _this3.inputRef = _ref;
  9909. },
  9910. id: 'idChooseFile_Input',
  9911. accept: '.svg, .jpg, .png',
  9912. type: 'file',
  9913. onChange: function onChange() {
  9914. return _this3._handleIconChange(ICON_ADD, _this3.inputRef.files);
  9915. },
  9916. style: { display: 'none' }
  9917. }),
  9918. _react2.default.createElement(_caUiToolkit.Button, {
  9919. id: 'idChooseFile_Button',
  9920. intent: 'primary',
  9921. onClick: function onClick() {
  9922. return _this3.inputRef.click();
  9923. },
  9924. label: _StringResources2.default.get('schematicsChooseFile'),
  9925. tabIndex: 0
  9926. })
  9927. ),
  9928. _react2.default.createElement(
  9929. _caUiToolkit.FlexItem,
  9930. null,
  9931. _react2.default.createElement(_caUiToolkit.VSpacer, { size: 1 })
  9932. ),
  9933. _react2.default.createElement(
  9934. _caUiToolkit.FlexItem,
  9935. null,
  9936. _react2.default.createElement(_caUiToolkit.Label, { label: fileTypesLabel })
  9937. ),
  9938. _react2.default.createElement(
  9939. _caUiToolkit.FlexItem,
  9940. null,
  9941. _react2.default.createElement(_caUiToolkit.Label, { label: fileSizeLabel })
  9942. )
  9943. );
  9944. };
  9945. //
  9946. // Main render function
  9947. //
  9948. PackagePanel.prototype.render = function render() {
  9949. var _this4 = this;
  9950. var _props2 = this.props,
  9951. packageName = _props2.packageName,
  9952. packageDescription = _props2.packageDescription;
  9953. // This component keeps a simple state of whether we are dragging on not.
  9954. var overlayDisplayStyle = this.state.isDragging ? 'block' : 'none';
  9955. // Get the i18n strings
  9956. var packageNameLabel = _StringResources2.default.get('nameLabelSchematic');
  9957. var packageDescriptionLabel = _StringResources2.default.get('schematicsDescriptionLabel');
  9958. var iconLabel = _StringResources2.default.get('schematicsIconLabel');
  9959. return _react2.default.createElement(
  9960. _caUiToolkit.FlexLayout,
  9961. {
  9962. className: 'clsSVGTabsStyle',
  9963. direction: 'row',
  9964. style: { width: '100%' }
  9965. },
  9966. _react2.default.createElement(
  9967. _caUiToolkit.FlexItem,
  9968. null,
  9969. _react2.default.createElement(
  9970. _caUiToolkit.FlexLayout,
  9971. { className: 'clsSVGDetailsPanel',
  9972. direction: 'column'
  9973. },
  9974. _react2.default.createElement(
  9975. _caUiToolkit.FlexItem,
  9976. null,
  9977. _react2.default.createElement(_caUiToolkit.VSpacer, { size: 2 })
  9978. ),
  9979. _react2.default.createElement(
  9980. _caUiToolkit.FlexItem,
  9981. null,
  9982. _react2.default.createElement(_caUiToolkit.Label, { type: 'caption', htmlFor: 'packageNameEdit', label: packageNameLabel })
  9983. ),
  9984. _react2.default.createElement(
  9985. _caUiToolkit.FlexItem,
  9986. { className: 'clsSVGPackageEdit' },
  9987. _react2.default.createElement(_caUiToolkit.TextInput, {
  9988. id: 'packageNameEdit',
  9989. value: packageName,
  9990. onValueChange: this._handlePackageNameChange
  9991. })
  9992. ),
  9993. _react2.default.createElement(
  9994. _caUiToolkit.FlexItem,
  9995. null,
  9996. _react2.default.createElement(_caUiToolkit.VSpacer, { size: 3 })
  9997. ),
  9998. _react2.default.createElement(
  9999. _caUiToolkit.FlexItem,
  10000. { height: 24, overflow: 'hidden' },
  10001. _react2.default.createElement(_caUiToolkit.Label, { type: 'caption', htmlFor: 'packageDescriptionEdit', label: packageDescriptionLabel })
  10002. ),
  10003. _react2.default.createElement(
  10004. _caUiToolkit.FlexItem,
  10005. { className: 'clsSVGPackageEdit' },
  10006. _react2.default.createElement(_caUiToolkit.TextArea, {
  10007. id: 'packageDescriptionEdit',
  10008. value: packageDescription,
  10009. onChange: this._handlePackageDescriptionChange
  10010. })
  10011. )
  10012. )
  10013. ),
  10014. _react2.default.createElement(
  10015. _caUiToolkit.FlexItem,
  10016. null,
  10017. _react2.default.createElement(_caUiToolkit.HSpacer, { size: 4 })
  10018. ),
  10019. _react2.default.createElement(
  10020. _caUiToolkit.FlexItem,
  10021. null,
  10022. _react2.default.createElement(
  10023. _caUiToolkit.FlexLayout,
  10024. { direction: 'column' },
  10025. _react2.default.createElement(
  10026. _caUiToolkit.FlexItem,
  10027. null,
  10028. _react2.default.createElement(_caUiToolkit.VSpacer, { size: 2 })
  10029. ),
  10030. _react2.default.createElement(
  10031. _caUiToolkit.FlexItem,
  10032. null,
  10033. _react2.default.createElement(_caUiToolkit.Label, { type: 'caption', htmlFor: 'iconDropZone', label: iconLabel })
  10034. ),
  10035. _react2.default.createElement(
  10036. _caUiToolkit.FlexItem,
  10037. { className: 'clsSVGIconPanel' },
  10038. _react2.default.createElement(
  10039. _caUiToolkit.Container,
  10040. {
  10041. onDragEnter: function onDragEnter(e) {
  10042. return _this4._handleDragEnter(e);
  10043. },
  10044. className: this.state.isDragging ? 'clsSVGDropZone dragging' : 'clsSVGDropZone',
  10045. droppable: 'true'
  10046. },
  10047. _react2.default.createElement(_caUiToolkit.Container, {
  10048. className: 'clsSVGDndOverlay',
  10049. onDragOver: function onDragOver(e) {
  10050. return _this4._handleDragOver(e);
  10051. },
  10052. onDragEnd: function onDragEnd(e) {
  10053. return _this4._handleDragEnd(e);
  10054. },
  10055. onDragLeave: function onDragLeave(e) {
  10056. return _this4._handleDragLeave(e);
  10057. },
  10058. onDrop: function onDrop(e) {
  10059. return _this4._handleDrop(e);
  10060. },
  10061. style: { display: overlayDisplayStyle },
  10062. ref: function ref(_ref2) {
  10063. _this4.dndOverlay = _ref2;
  10064. }
  10065. }),
  10066. this._renderTabContent()
  10067. )
  10068. )
  10069. )
  10070. )
  10071. );
  10072. };
  10073. return PackagePanel;
  10074. }(_react.Component);
  10075. PackagePanel.defaultProps = {
  10076. iconName: '',
  10077. iconURL: '',
  10078. packageDescription: ''
  10079. };
  10080. PackagePanel.propTypes = {
  10081. packageName: _propTypes2.default.string.isRequired,
  10082. packageDescription: _propTypes2.default.string.isRequired,
  10083. iconURL: _propTypes2.default.string,
  10084. iconName: _propTypes2.default.string,
  10085. zipMaxSize: _propTypes2.default.number,
  10086. imgMaxSize: _propTypes2.default.number,
  10087. onChange: _propTypes2.default.func.isRequired,
  10088. onIconChanged: _propTypes2.default.func.isRequired,
  10089. onIconError: _propTypes2.default.func.isRequired
  10090. };
  10091. exports.default = PackagePanel;
  10092. /***/ }),
  10093. /* 69 */
  10094. /***/ (function(module, exports, __webpack_require__) {
  10095. !function(e,o){if(true)module.exports=o(__webpack_require__(7));else if("function"==typeof define&&define.amd)define(["@ba-ui-toolkit/ba-graphics/dist/icons-js/ba-graphics-icons-commons.js"],o);else{var s=o("object"==typeof exports?require("@ba-ui-toolkit/ba-graphics/dist/icons-js/ba-graphics-icons-commons.js"):e["@ba-ui-toolkit/ba-graphics/dist/icons-js/ba-graphics-icons-commons.js"]);for(var i in s)("object"==typeof exports?exports:e)[i]=s[i]}}("undefined"!=typeof self?self:this,function(e){return webpackJsonPBaGraphics([112],{"0768325c7d55ee3d0425":function(e,o,s){"use strict";var i=s("9689a9c94ae38b47fa2c"),t=s.n(i),a=s("9ce58a7deea14f49ef01"),c=s.n(a),n=new t.a({id:"upload_16_v7",use:"upload_16_v7-usage",viewBox:"0 0 16 16",content:'<symbol xmlns="http://www.w3.org/2000/svg" viewBox="0 0 16 16" id="upload_16_v7"><path d="M3 9l.7.7 3.8-3.8V15h1V5.9l3.8 3.8.7-.7-5-5zm0-5V2h10v2h1V2c0-.6-.4-1-1-1H3c-.6 0-1 .4-1 1v2h1z" /><path style="fill:none" d="M0 0h16v16H0z" /></symbol>'});c.a.add(n);o.a=n},"105375219d726d2ad9eb":function(e,o,s){"use strict";Object.defineProperty(o,"__esModule",{value:!0});var i=s("3865314c5959606874d4"),t=(s.n(i),s("0768325c7d55ee3d0425"));o.default=t.a},"3865314c5959606874d4":function(o,s){o.exports=e}},["105375219d726d2ad9eb"])});
  10096. /***/ }),
  10097. /* 70 */
  10098. /***/ (function(module, exports, __webpack_require__) {
  10099. !function(e,s){if(true)module.exports=s(__webpack_require__(7));else if("function"==typeof define&&define.amd)define(["@ba-ui-toolkit/ba-graphics/dist/icons-js/ba-graphics-icons-commons.js"],s);else{var i=s("object"==typeof exports?require("@ba-ui-toolkit/ba-graphics/dist/icons-js/ba-graphics-icons-commons.js"):e["@ba-ui-toolkit/ba-graphics/dist/icons-js/ba-graphics-icons-commons.js"]);for(var o in i)("object"==typeof exports?exports:e)[o]=i[o]}}("undefined"!=typeof self?self:this,function(e){return webpackJsonPBaGraphics([1319],{"3865314c5959606874d4":function(s,i){s.exports=e},"8d4ccaf2baec1d5ec793":function(e,s,i){"use strict";var o=i("9689a9c94ae38b47fa2c"),c=i.n(o),t=i("9ce58a7deea14f49ef01"),a=i.n(t),n=new c.a({id:"dismiss_16_v7",use:"dismiss_16_v7-usage",viewBox:"0 0 16 16",content:'<symbol xmlns="http://www.w3.org/2000/svg" viewBox="0 0 16 16" id="dismiss_16_v7"><path d="M14 3.5L12.5 2 8 6.5 3.5 2 2 3.5 6.5 8 2 12.5 3.5 14 8 9.5l4.5 4.5 1.5-1.5L9.5 8 14 3.5z" /></symbol>'});a.a.add(n);s.a=n},"97c51f33b6d3e5f2ee40":function(e,s,i){"use strict";Object.defineProperty(s,"__esModule",{value:!0});var o=i("3865314c5959606874d4"),c=(i.n(o),i("8d4ccaf2baec1d5ec793"));s.default=c.a}},["97c51f33b6d3e5f2ee40"])});
  10100. /***/ }),
  10101. /* 71 */
  10102. /***/ (function(module, exports, __webpack_require__) {
  10103. "use strict";
  10104. exports.__esModule = true;
  10105. var _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; /*
  10106. *+------------------------------------------------------------------------+
  10107. *| Licensed Materials - Property of IBM
  10108. *| IBM Cognos Products: BI
  10109. *| (C) Copyright IBM Corp. 2019
  10110. *|
  10111. *| US Government Users Restricted Rights - Use, duplication or disclosure
  10112. *| restricted by GSA ADP Schedule Contract with IBM Corp.
  10113. *+------------------------------------------------------------------------+
  10114. */
  10115. var _react = __webpack_require__(0);
  10116. var _react2 = _interopRequireDefault(_react);
  10117. var _reactDom = __webpack_require__(6);
  10118. var _reactDom2 = _interopRequireDefault(_reactDom);
  10119. function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
  10120. var DialogWrapper = {
  10121. show: function show(dialogClass, options) {
  10122. var container = document.querySelector('.dialogWrapper');
  10123. if (!container) {
  10124. container = document.body.appendChild(document.createElement('DIV'));
  10125. container.className = 'dialogWrapper';
  10126. }
  10127. var externalCloseCallback = options.onCloseDialog;
  10128. var props = _extends({}, options, {
  10129. ref: function ref(instance) {
  10130. if (instance) instance.openDialog();
  10131. },
  10132. onCloseDialog: function onCloseDialog() {
  10133. _reactDom2.default.unmountComponentAtNode(container);
  10134. if (externalCloseCallback) {
  10135. externalCloseCallback();
  10136. }
  10137. }
  10138. });
  10139. _reactDom2.default.render(_react2.default.createElement(dialogClass, props), container);
  10140. }
  10141. };
  10142. exports.default = DialogWrapper;
  10143. /***/ })
  10144. /******/ ]);
  10145. });
  10146. //# sourceMappingURL=authoring-common.js.map