froala_editor.pkgd.min.js.bak 976 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697989910010110210310410510610710810911011111211311411511611711811912012112212312412512612712812913013113213313413513613713813914014114214314414514614714814915015115215315415515615715815916016116216316416516616716816917017117217317417517617717817918018118218318418518618718818919019119219319419519619719819920020120220320420520620720820921021121221321421521621721821922022122222322422522622722822923023123223323423523623723823924024124224324424524624724824925025125225325425525625725825926026126226326426526626726826927027127227327427527627727827928028128228328428528628728828929029129229329429529629729829930030130230330430530630730830931031131231331431531631731831932032132232332432532632732832933033133233333433533633733833934034134234334434534634734834935035135235335435535635735835936036136236336436536636736836937037137237337437537637737837938038138238338438538638738838939039139239339439539639739839940040140240340440540640740840941041141241341441541641741841942042142242342442542642742842943043143243343443543643743843944044144244344444544644744844945045145245345445545645745845946046146246346446546646746846947047147247347447547647747847948048148248348448548648748848949049149249349449549649749849950050150250350450550650750850951051151251351451551651751851952052152252352452552652752852953053153253353453553653753853954054154254354454554654754854955055155255355455555655755855956056156256356456556656756856957057157257357457557657757857958058158258358458558658758858959059159259359459559659759859960060160260360460560660760860961061161261361461561661761861962062162262362462562662762862963063163263363463563663763863964064164264364464564664764864965065165265365465565665765865966066166266366466566666766866967067167267367467567667767867968068168268368468568668768868969069169269369469569669769869970070170270370470570670770870971071171271371471571671771871972072172272372472572672772872973073173273373473573673773873974074174274374474574674774874975075175275375475575675775875976076176276376476576676776876977077177277377477577677777877978078178278378478578678778878979079179279379479579679779879980080180280380480580680780880981081181281381481581681781881982082182282382482582682782882983083183283383483583683783883984084184284384484584684784884985085185285385485585685785885986086186286386486586686786886987087187287387487587687787887988088188288388488588688788888989089189289389489589689789889990090190290390490590690790890991091191291391491591691791891992092192292392492592692792892993093193293393493593693793893994094194294394494594694794894995095195295395495595695795895996096196296396496596696796896997097197297397497597697797897998098198298398498598698798898999099199299399499599699799899910001001100210031004100510061007100810091010101110121013101410151016101710181019102010211022102310241025102610271028102910301031103210331034103510361037103810391040104110421043104410451046104710481049105010511052105310541055105610571058105910601061106210631064106510661067106810691070107110721073107410751076107710781079108010811082108310841085108610871088108910901091109210931094109510961097109810991100110111021103110411051106110711081109111011111112111311141115111611171118111911201121112211231124112511261127112811291130113111321133113411351136113711381139114011411142114311441145114611471148114911501151115211531154115511561157115811591160116111621163116411651166116711681169117011711172117311741175117611771178117911801181118211831184118511861187118811891190119111921193119411951196119711981199120012011202120312041205120612071208120912101211121212131214121512161217121812191220122112221223122412251226122712281229123012311232123312341235123612371238123912401241124212431244124512461247124812491250125112521253125412551256125712581259126012611262126312641265126612671268126912701271127212731274127512761277127812791280128112821283128412851286128712881289129012911292129312941295129612971298129913001301130213031304130513061307130813091310131113121313131413151316131713181319132013211322132313241325132613271328132913301331133213331334133513361337133813391340134113421343134413451346134713481349135013511352135313541355135613571358135913601361136213631364136513661367136813691370137113721373137413751376137713781379138013811382138313841385138613871388138913901391139213931394139513961397139813991400140114021403140414051406140714081409141014111412141314141415141614171418141914201421142214231424142514261427142814291430143114321433143414351436143714381439144014411442144314441445144614471448144914501451145214531454145514561457145814591460146114621463146414651466146714681469147014711472147314741475147614771478147914801481148214831484148514861487148814891490149114921493149414951496149714981499150015011502150315041505150615071508150915101511151215131514151515161517151815191520152115221523152415251526152715281529153015311532153315341535153615371538153915401541154215431544154515461547154815491550155115521553155415551556155715581559156015611562156315641565156615671568156915701571157215731574157515761577157815791580158115821583158415851586158715881589159015911592159315941595159615971598159916001601160216031604160516061607160816091610161116121613161416151616161716181619162016211622162316241625162616271628162916301631163216331634163516361637163816391640164116421643164416451646164716481649165016511652165316541655165616571658165916601661166216631664166516661667166816691670167116721673167416751676167716781679168016811682168316841685168616871688168916901691169216931694169516961697169816991700170117021703170417051706170717081709171017111712171317141715171617171718171917201721172217231724172517261727172817291730173117321733173417351736173717381739174017411742174317441745174617471748174917501751175217531754175517561757175817591760176117621763176417651766176717681769177017711772177317741775177617771778177917801781178217831784178517861787178817891790179117921793179417951796179717981799180018011802180318041805180618071808180918101811181218131814181518161817181818191820182118221823182418251826182718281829183018311832183318341835183618371838183918401841184218431844184518461847184818491850185118521853185418551856185718581859186018611862186318641865186618671868186918701871187218731874187518761877187818791880188118821883188418851886188718881889189018911892189318941895189618971898189919001901190219031904190519061907190819091910191119121913191419151916191719181919192019211922192319241925192619271928192919301931193219331934193519361937193819391940194119421943194419451946194719481949195019511952195319541955195619571958195919601961196219631964196519661967196819691970197119721973197419751976197719781979198019811982198319841985198619871988198919901991199219931994199519961997199819992000200120022003200420052006200720082009201020112012201320142015201620172018201920202021202220232024202520262027202820292030203120322033203420352036203720382039204020412042204320442045204620472048204920502051205220532054205520562057205820592060206120622063206420652066206720682069207020712072207320742075207620772078207920802081208220832084208520862087208820892090209120922093209420952096209720982099210021012102210321042105210621072108210921102111211221132114211521162117211821192120212121222123212421252126212721282129213021312132213321342135213621372138213921402141214221432144214521462147214821492150215121522153215421552156215721582159216021612162216321642165216621672168216921702171217221732174217521762177217821792180218121822183218421852186218721882189219021912192219321942195219621972198219922002201220222032204220522062207220822092210221122122213221422152216221722182219222022212222222322242225222622272228222922302231223222332234223522362237223822392240224122422243224422452246224722482249225022512252225322542255225622572258225922602261226222632264226522662267226822692270227122722273227422752276227722782279228022812282228322842285228622872288228922902291229222932294229522962297229822992300230123022303230423052306230723082309231023112312231323142315231623172318231923202321232223232324232523262327232823292330233123322333233423352336233723382339234023412342234323442345234623472348234923502351235223532354235523562357235823592360236123622363236423652366236723682369237023712372237323742375237623772378237923802381238223832384238523862387238823892390239123922393239423952396239723982399240024012402240324042405240624072408240924102411241224132414241524162417241824192420242124222423242424252426242724282429243024312432243324342435243624372438243924402441244224432444244524462447244824492450245124522453245424552456245724582459246024612462246324642465246624672468246924702471247224732474247524762477247824792480248124822483248424852486248724882489249024912492249324942495249624972498249925002501250225032504250525062507250825092510251125122513251425152516251725182519252025212522252325242525252625272528252925302531253225332534253525362537253825392540254125422543254425452546254725482549255025512552255325542555255625572558255925602561256225632564256525662567256825692570257125722573257425752576257725782579258025812582258325842585258625872588258925902591259225932594259525962597259825992600260126022603260426052606260726082609261026112612261326142615261626172618261926202621262226232624262526262627262826292630263126322633263426352636263726382639264026412642264326442645264626472648264926502651265226532654265526562657265826592660266126622663266426652666266726682669267026712672267326742675267626772678267926802681268226832684268526862687268826892690269126922693269426952696269726982699270027012702270327042705270627072708270927102711271227132714271527162717271827192720272127222723272427252726272727282729273027312732273327342735273627372738273927402741274227432744274527462747274827492750275127522753275427552756275727582759276027612762276327642765276627672768276927702771277227732774277527762777277827792780278127822783278427852786278727882789279027912792279327942795279627972798279928002801280228032804280528062807280828092810281128122813281428152816281728182819282028212822282328242825282628272828282928302831283228332834283528362837283828392840284128422843284428452846284728482849285028512852285328542855285628572858285928602861286228632864286528662867286828692870287128722873287428752876287728782879288028812882288328842885288628872888288928902891289228932894289528962897289828992900290129022903290429052906290729082909291029112912291329142915291629172918291929202921292229232924292529262927292829292930293129322933293429352936293729382939294029412942294329442945294629472948294929502951295229532954295529562957295829592960296129622963296429652966296729682969297029712972297329742975297629772978297929802981298229832984298529862987298829892990299129922993299429952996299729982999300030013002300330043005300630073008300930103011301230133014301530163017301830193020302130223023302430253026302730283029303030313032303330343035303630373038303930403041304230433044304530463047304830493050305130523053305430553056305730583059306030613062306330643065306630673068306930703071307230733074307530763077307830793080308130823083308430853086308730883089309030913092309330943095309630973098309931003101310231033104310531063107310831093110311131123113311431153116311731183119312031213122312331243125312631273128312931303131313231333134313531363137313831393140314131423143314431453146314731483149315031513152315331543155315631573158315931603161316231633164316531663167316831693170317131723173317431753176317731783179318031813182318331843185318631873188318931903191319231933194319531963197319831993200320132023203320432053206320732083209321032113212321332143215321632173218321932203221322232233224322532263227322832293230323132323233323432353236323732383239324032413242324332443245324632473248324932503251325232533254325532563257325832593260326132623263326432653266326732683269327032713272327332743275327632773278327932803281328232833284328532863287328832893290329132923293329432953296329732983299330033013302330333043305330633073308330933103311331233133314331533163317331833193320332133223323332433253326332733283329333033313332333333343335333633373338333933403341334233433344334533463347334833493350335133523353335433553356335733583359336033613362336333643365336633673368336933703371337233733374337533763377337833793380338133823383338433853386338733883389339033913392339333943395339633973398339934003401340234033404340534063407340834093410341134123413341434153416341734183419342034213422342334243425342634273428342934303431343234333434343534363437343834393440344134423443344434453446344734483449345034513452345334543455345634573458345934603461346234633464346534663467346834693470347134723473347434753476347734783479348034813482348334843485348634873488348934903491349234933494349534963497349834993500350135023503350435053506350735083509351035113512351335143515351635173518351935203521352235233524352535263527352835293530353135323533353435353536353735383539354035413542354335443545354635473548354935503551355235533554355535563557355835593560356135623563356435653566356735683569357035713572357335743575357635773578357935803581358235833584358535863587358835893590359135923593359435953596359735983599360036013602360336043605360636073608360936103611361236133614361536163617361836193620362136223623362436253626362736283629363036313632363336343635363636373638363936403641364236433644364536463647364836493650365136523653365436553656365736583659366036613662366336643665366636673668366936703671367236733674367536763677367836793680368136823683368436853686368736883689369036913692369336943695369636973698369937003701370237033704370537063707370837093710371137123713371437153716371737183719372037213722372337243725372637273728372937303731373237333734373537363737373837393740374137423743374437453746374737483749375037513752375337543755375637573758375937603761376237633764376537663767376837693770377137723773377437753776377737783779378037813782378337843785378637873788378937903791379237933794379537963797379837993800380138023803380438053806380738083809381038113812381338143815381638173818381938203821382238233824382538263827382838293830383138323833383438353836383738383839384038413842384338443845384638473848384938503851385238533854385538563857385838593860386138623863386438653866386738683869387038713872387338743875387638773878387938803881388238833884388538863887388838893890389138923893389438953896389738983899390039013902390339043905390639073908390939103911391239133914391539163917391839193920392139223923392439253926392739283929393039313932393339343935393639373938393939403941394239433944394539463947394839493950395139523953395439553956395739583959396039613962396339643965396639673968396939703971397239733974397539763977397839793980398139823983398439853986398739883989399039913992399339943995399639973998399940004001400240034004400540064007400840094010401140124013401440154016401740184019402040214022402340244025402640274028402940304031403240334034403540364037403840394040404140424043404440454046404740484049405040514052405340544055405640574058405940604061406240634064406540664067406840694070407140724073407440754076407740784079408040814082408340844085408640874088408940904091409240934094409540964097409840994100410141024103410441054106410741084109411041114112411341144115411641174118411941204121412241234124412541264127412841294130413141324133413441354136413741384139414041414142414341444145414641474148414941504151415241534154415541564157415841594160416141624163416441654166416741684169417041714172417341744175417641774178417941804181418241834184418541864187418841894190419141924193419441954196419741984199420042014202420342044205420642074208420942104211421242134214421542164217421842194220422142224223422442254226422742284229423042314232423342344235423642374238423942404241424242434244424542464247424842494250425142524253425442554256425742584259426042614262426342644265426642674268426942704271427242734274427542764277427842794280428142824283428442854286428742884289429042914292429342944295429642974298429943004301430243034304430543064307430843094310431143124313431443154316431743184319432043214322432343244325432643274328432943304331433243334334433543364337433843394340434143424343434443454346434743484349435043514352435343544355435643574358435943604361436243634364436543664367436843694370437143724373437443754376437743784379438043814382438343844385438643874388438943904391439243934394439543964397439843994400440144024403440444054406440744084409441044114412441344144415441644174418441944204421442244234424442544264427442844294430443144324433443444354436443744384439444044414442444344444445444644474448444944504451445244534454445544564457445844594460446144624463446444654466446744684469447044714472447344744475447644774478447944804481448244834484448544864487448844894490449144924493449444954496449744984499450045014502450345044505450645074508450945104511451245134514451545164517451845194520452145224523452445254526452745284529453045314532453345344535453645374538453945404541454245434544454545464547454845494550455145524553455445554556455745584559456045614562456345644565456645674568456945704571457245734574457545764577457845794580458145824583458445854586458745884589459045914592459345944595459645974598459946004601460246034604460546064607460846094610461146124613461446154616461746184619462046214622462346244625462646274628462946304631463246334634463546364637463846394640464146424643464446454646464746484649465046514652465346544655465646574658465946604661466246634664466546664667466846694670467146724673467446754676467746784679468046814682468346844685468646874688468946904691469246934694469546964697469846994700470147024703470447054706470747084709471047114712471347144715471647174718471947204721472247234724472547264727472847294730473147324733473447354736473747384739474047414742474347444745474647474748474947504751475247534754475547564757475847594760476147624763476447654766476747684769477047714772477347744775477647774778477947804781478247834784478547864787478847894790479147924793479447954796479747984799480048014802480348044805480648074808480948104811481248134814481548164817481848194820482148224823482448254826482748284829483048314832483348344835483648374838483948404841484248434844484548464847484848494850485148524853485448554856485748584859486048614862486348644865486648674868486948704871487248734874487548764877487848794880488148824883488448854886488748884889489048914892489348944895489648974898489949004901490249034904490549064907490849094910491149124913491449154916491749184919492049214922492349244925492649274928492949304931493249334934493549364937493849394940494149424943494449454946494749484949495049514952495349544955495649574958495949604961496249634964496549664967496849694970497149724973497449754976497749784979498049814982498349844985498649874988498949904991499249934994499549964997499849995000500150025003500450055006500750085009501050115012501350145015501650175018501950205021502250235024502550265027502850295030503150325033503450355036503750385039504050415042504350445045504650475048504950505051505250535054505550565057505850595060506150625063506450655066506750685069507050715072507350745075507650775078507950805081508250835084508550865087508850895090509150925093509450955096509750985099510051015102510351045105510651075108510951105111511251135114511551165117511851195120512151225123512451255126512751285129513051315132513351345135513651375138513951405141514251435144514551465147514851495150515151525153515451555156515751585159516051615162516351645165516651675168516951705171517251735174517551765177517851795180518151825183518451855186518751885189519051915192519351945195519651975198519952005201520252035204520552065207520852095210521152125213521452155216521752185219522052215222522352245225522652275228522952305231523252335234523552365237523852395240524152425243524452455246524752485249525052515252525352545255525652575258525952605261526252635264526552665267526852695270527152725273527452755276527752785279528052815282528352845285528652875288528952905291529252935294529552965297529852995300530153025303530453055306530753085309531053115312531353145315531653175318531953205321532253235324532553265327532853295330533153325333533453355336533753385339534053415342534353445345534653475348534953505351535253535354535553565357535853595360536153625363536453655366536753685369537053715372537353745375537653775378537953805381538253835384538553865387538853895390539153925393539453955396539753985399540054015402540354045405540654075408540954105411541254135414541554165417541854195420542154225423542454255426542754285429543054315432543354345435543654375438543954405441544254435444544554465447544854495450545154525453545454555456545754585459546054615462546354645465546654675468546954705471547254735474547554765477547854795480548154825483548454855486548754885489549054915492549354945495549654975498549955005501550255035504550555065507550855095510551155125513551455155516551755185519552055215522552355245525552655275528552955305531553255335534553555365537553855395540554155425543554455455546554755485549555055515552555355545555555655575558555955605561556255635564556555665567556855695570557155725573557455755576557755785579558055815582558355845585558655875588558955905591559255935594559555965597559855995600560156025603560456055606560756085609561056115612561356145615561656175618561956205621562256235624562556265627562856295630563156325633563456355636563756385639564056415642564356445645564656475648564956505651565256535654565556565657565856595660566156625663566456655666566756685669567056715672567356745675567656775678567956805681568256835684568556865687568856895690569156925693569456955696569756985699570057015702570357045705570657075708570957105711571257135714571557165717571857195720572157225723572457255726572757285729573057315732573357345735573657375738573957405741574257435744574557465747574857495750575157525753575457555756575757585759576057615762576357645765576657675768576957705771577257735774577557765777577857795780578157825783578457855786578757885789579057915792579357945795579657975798579958005801580258035804580558065807580858095810581158125813581458155816581758185819582058215822582358245825582658275828582958305831583258335834583558365837583858395840584158425843584458455846584758485849585058515852585358545855585658575858585958605861586258635864586558665867586858695870587158725873587458755876587758785879588058815882588358845885588658875888588958905891589258935894589558965897589858995900590159025903590459055906590759085909591059115912591359145915591659175918591959205921592259235924592559265927592859295930593159325933593459355936593759385939594059415942594359445945594659475948594959505951595259535954595559565957595859595960596159625963596459655966596759685969597059715972597359745975597659775978597959805981598259835984598559865987598859895990599159925993599459955996599759985999600060016002600360046005600660076008600960106011601260136014601560166017601860196020602160226023602460256026602760286029603060316032603360346035603660376038603960406041604260436044604560466047604860496050605160526053605460556056605760586059606060616062606360646065606660676068606960706071607260736074607560766077607860796080608160826083608460856086608760886089609060916092609360946095609660976098609961006101610261036104610561066107610861096110611161126113611461156116611761186119612061216122612361246125612661276128612961306131613261336134613561366137613861396140614161426143614461456146614761486149615061516152615361546155615661576158615961606161616261636164616561666167616861696170617161726173617461756176617761786179618061816182618361846185618661876188618961906191619261936194619561966197619861996200620162026203620462056206620762086209621062116212621362146215621662176218621962206221622262236224622562266227622862296230623162326233623462356236623762386239624062416242624362446245624662476248624962506251625262536254625562566257625862596260626162626263626462656266626762686269627062716272627362746275627662776278627962806281628262836284628562866287628862896290629162926293629462956296629762986299630063016302630363046305630663076308630963106311631263136314631563166317631863196320632163226323632463256326632763286329633063316332633363346335633663376338633963406341634263436344634563466347634863496350635163526353635463556356635763586359636063616362636363646365636663676368636963706371637263736374637563766377637863796380638163826383638463856386638763886389639063916392639363946395639663976398639964006401640264036404640564066407640864096410641164126413641464156416641764186419642064216422642364246425642664276428642964306431643264336434643564366437643864396440644164426443644464456446644764486449645064516452645364546455645664576458645964606461646264636464646564666467646864696470647164726473647464756476647764786479648064816482648364846485648664876488648964906491649264936494649564966497649864996500650165026503650465056506650765086509651065116512651365146515651665176518651965206521652265236524652565266527652865296530653165326533653465356536653765386539654065416542654365446545654665476548654965506551655265536554655565566557655865596560656165626563656465656566656765686569657065716572657365746575657665776578657965806581658265836584658565866587658865896590659165926593659465956596659765986599660066016602660366046605660666076608660966106611661266136614661566166617661866196620662166226623662466256626662766286629663066316632663366346635663666376638663966406641664266436644664566466647664866496650665166526653665466556656665766586659666066616662666366646665666666676668666966706671667266736674667566766677667866796680668166826683668466856686668766886689669066916692669366946695669666976698669967006701670267036704670567066707670867096710671167126713671467156716671767186719672067216722672367246725672667276728672967306731673267336734673567366737673867396740674167426743674467456746674767486749675067516752675367546755675667576758675967606761676267636764676567666767676867696770677167726773677467756776677767786779678067816782678367846785678667876788678967906791679267936794679567966797679867996800680168026803680468056806680768086809681068116812681368146815681668176818681968206821682268236824682568266827682868296830683168326833683468356836683768386839684068416842684368446845684668476848684968506851685268536854685568566857685868596860686168626863686468656866686768686869687068716872687368746875687668776878687968806881688268836884688568866887688868896890689168926893689468956896689768986899690069016902690369046905690669076908690969106911691269136914691569166917691869196920692169226923692469256926692769286929693069316932693369346935693669376938693969406941694269436944694569466947694869496950695169526953695469556956695769586959696069616962696369646965696669676968696969706971697269736974697569766977697869796980698169826983698469856986698769886989699069916992699369946995699669976998699970007001700270037004700570067007700870097010701170127013701470157016701770187019702070217022702370247025702670277028702970307031703270337034703570367037703870397040704170427043704470457046704770487049705070517052705370547055705670577058705970607061706270637064706570667067706870697070707170727073707470757076707770787079708070817082708370847085708670877088708970907091709270937094709570967097709870997100710171027103710471057106710771087109711071117112711371147115711671177118711971207121712271237124712571267127712871297130713171327133713471357136713771387139714071417142714371447145714671477148714971507151715271537154715571567157715871597160716171627163716471657166716771687169717071717172717371747175717671777178717971807181718271837184718571867187718871897190719171927193719471957196719771987199720072017202720372047205720672077208720972107211721272137214721572167217721872197220722172227223722472257226722772287229723072317232723372347235723672377238723972407241724272437244724572467247724872497250725172527253725472557256725772587259726072617262726372647265726672677268726972707271727272737274727572767277727872797280728172827283728472857286728772887289729072917292729372947295729672977298729973007301730273037304730573067307730873097310731173127313731473157316731773187319732073217322732373247325732673277328732973307331733273337334733573367337733873397340734173427343734473457346734773487349735073517352735373547355735673577358735973607361736273637364736573667367736873697370737173727373737473757376737773787379738073817382738373847385738673877388738973907391739273937394739573967397739873997400740174027403740474057406740774087409741074117412741374147415741674177418741974207421742274237424742574267427742874297430743174327433743474357436743774387439744074417442744374447445744674477448744974507451745274537454745574567457745874597460746174627463746474657466746774687469747074717472747374747475747674777478747974807481748274837484748574867487748874897490749174927493749474957496749774987499750075017502750375047505750675077508750975107511751275137514751575167517751875197520752175227523752475257526752775287529753075317532753375347535753675377538753975407541754275437544754575467547754875497550755175527553755475557556755775587559756075617562756375647565756675677568756975707571757275737574757575767577757875797580758175827583758475857586758775887589759075917592759375947595759675977598759976007601760276037604760576067607760876097610761176127613761476157616761776187619762076217622762376247625762676277628762976307631763276337634763576367637763876397640764176427643764476457646764776487649765076517652765376547655765676577658765976607661766276637664766576667667766876697670767176727673767476757676767776787679768076817682768376847685768676877688768976907691769276937694769576967697769876997700770177027703770477057706770777087709771077117712771377147715771677177718771977207721772277237724772577267727772877297730773177327733773477357736773777387739774077417742774377447745774677477748774977507751775277537754775577567757775877597760776177627763776477657766776777687769777077717772777377747775777677777778777977807781778277837784778577867787778877897790779177927793779477957796779777987799780078017802780378047805780678077808780978107811781278137814781578167817781878197820782178227823782478257826782778287829783078317832783378347835783678377838783978407841784278437844784578467847784878497850785178527853785478557856785778587859786078617862786378647865786678677868786978707871787278737874787578767877787878797880788178827883788478857886788778887889789078917892789378947895789678977898789979007901790279037904790579067907790879097910791179127913791479157916791779187919792079217922792379247925792679277928792979307931793279337934793579367937793879397940794179427943794479457946794779487949795079517952795379547955795679577958795979607961796279637964796579667967796879697970797179727973797479757976797779787979798079817982798379847985798679877988798979907991799279937994799579967997799879998000800180028003800480058006800780088009801080118012801380148015801680178018801980208021802280238024802580268027802880298030803180328033803480358036803780388039804080418042804380448045804680478048804980508051805280538054805580568057805880598060806180628063806480658066806780688069807080718072807380748075807680778078807980808081808280838084808580868087808880898090809180928093809480958096809780988099810081018102810381048105810681078108810981108111811281138114811581168117811881198120812181228123812481258126812781288129813081318132813381348135813681378138813981408141814281438144814581468147814881498150815181528153815481558156815781588159816081618162816381648165816681678168816981708171817281738174817581768177817881798180818181828183818481858186818781888189819081918192819381948195819681978198819982008201820282038204820582068207820882098210821182128213821482158216821782188219822082218222822382248225822682278228822982308231823282338234823582368237823882398240824182428243824482458246824782488249825082518252825382548255825682578258825982608261826282638264826582668267826882698270827182728273827482758276827782788279828082818282828382848285828682878288828982908291829282938294829582968297829882998300830183028303830483058306830783088309831083118312831383148315831683178318831983208321832283238324832583268327832883298330833183328333833483358336833783388339834083418342834383448345834683478348834983508351835283538354835583568357835883598360836183628363836483658366836783688369837083718372837383748375837683778378837983808381838283838384838583868387838883898390839183928393839483958396839783988399840084018402840384048405840684078408840984108411841284138414841584168417841884198420842184228423842484258426842784288429843084318432843384348435843684378438843984408441844284438444844584468447844884498450845184528453845484558456845784588459846084618462846384648465846684678468846984708471847284738474847584768477847884798480848184828483848484858486848784888489849084918492849384948495849684978498849985008501850285038504850585068507850885098510851185128513851485158516851785188519852085218522852385248525852685278528852985308531853285338534853585368537853885398540854185428543854485458546854785488549855085518552855385548555855685578558855985608561856285638564856585668567856885698570857185728573857485758576857785788579858085818582858385848585858685878588858985908591859285938594859585968597859885998600860186028603860486058606860786088609861086118612861386148615861686178618861986208621862286238624862586268627862886298630863186328633863486358636863786388639864086418642864386448645864686478648864986508651865286538654865586568657865886598660866186628663866486658666866786688669867086718672867386748675867686778678867986808681868286838684868586868687868886898690869186928693869486958696869786988699870087018702870387048705870687078708870987108711871287138714871587168717871887198720872187228723872487258726872787288729873087318732873387348735873687378738873987408741874287438744874587468747874887498750875187528753875487558756875787588759876087618762876387648765876687678768876987708771877287738774877587768777877887798780878187828783878487858786878787888789879087918792879387948795879687978798879988008801880288038804880588068807880888098810881188128813881488158816881788188819882088218822882388248825882688278828882988308831883288338834883588368837883888398840884188428843884488458846884788488849885088518852885388548855885688578858885988608861886288638864886588668867886888698870887188728873887488758876887788788879888088818882888388848885888688878888888988908891889288938894889588968897889888998900890189028903890489058906890789088909891089118912891389148915891689178918891989208921892289238924892589268927892889298930893189328933893489358936893789388939894089418942894389448945894689478948894989508951895289538954895589568957895889598960896189628963896489658966896789688969897089718972897389748975897689778978897989808981898289838984898589868987898889898990899189928993899489958996899789988999900090019002900390049005900690079008900990109011901290139014901590169017901890199020902190229023902490259026902790289029903090319032903390349035903690379038903990409041904290439044904590469047904890499050905190529053905490559056905790589059906090619062906390649065906690679068906990709071907290739074907590769077907890799080908190829083908490859086908790889089909090919092909390949095909690979098909991009101910291039104910591069107910891099110911191129113911491159116911791189119912091219122912391249125912691279128912991309131913291339134913591369137913891399140914191429143914491459146914791489149915091519152915391549155915691579158915991609161916291639164916591669167916891699170917191729173917491759176917791789179918091819182918391849185918691879188918991909191919291939194919591969197919891999200920192029203920492059206920792089209921092119212921392149215921692179218921992209221922292239224922592269227922892299230923192329233923492359236923792389239924092419242924392449245924692479248924992509251925292539254925592569257925892599260926192629263926492659266926792689269927092719272927392749275927692779278927992809281928292839284928592869287928892899290929192929293929492959296929792989299930093019302930393049305930693079308930993109311931293139314931593169317931893199320932193229323932493259326932793289329933093319332933393349335933693379338933993409341934293439344934593469347934893499350935193529353935493559356935793589359936093619362936393649365936693679368936993709371937293739374937593769377937893799380938193829383938493859386938793889389939093919392939393949395939693979398939994009401940294039404940594069407940894099410941194129413941494159416941794189419942094219422942394249425942694279428942994309431943294339434943594369437943894399440944194429443944494459446944794489449945094519452945394549455945694579458945994609461946294639464946594669467946894699470947194729473947494759476947794789479948094819482948394849485948694879488948994909491949294939494949594969497949894999500950195029503950495059506950795089509951095119512951395149515951695179518951995209521952295239524952595269527952895299530953195329533953495359536953795389539954095419542954395449545954695479548954995509551955295539554955595569557955895599560956195629563956495659566956795689569957095719572957395749575957695779578957995809581958295839584958595869587958895899590959195929593959495959596959795989599960096019602960396049605960696079608960996109611961296139614961596169617961896199620962196229623962496259626962796289629963096319632963396349635963696379638963996409641964296439644964596469647964896499650965196529653965496559656965796589659966096619662966396649665966696679668966996709671967296739674967596769677967896799680968196829683968496859686968796889689969096919692969396949695969696979698969997009701970297039704970597069707970897099710971197129713971497159716971797189719972097219722972397249725972697279728972997309731973297339734973597369737973897399740974197429743974497459746974797489749975097519752975397549755975697579758975997609761976297639764976597669767976897699770977197729773977497759776977797789779978097819782978397849785978697879788978997909791979297939794979597969797979897999800980198029803980498059806980798089809981098119812981398149815981698179818981998209821982298239824982598269827982898299830983198329833983498359836983798389839984098419842984398449845984698479848984998509851985298539854985598569857985898599860986198629863986498659866986798689869987098719872987398749875987698779878987998809881988298839884988598869887988898899890989198929893989498959896989798989899990099019902990399049905990699079908990999109911991299139914991599169917991899199920992199229923992499259926992799289929993099319932993399349935993699379938993999409941994299439944994599469947994899499950995199529953995499559956995799589959996099619962996399649965996699679968996999709971997299739974997599769977997899799980998199829983998499859986998799889989999099919992999399949995999699979998999910000100011000210003100041000510006100071000810009100101001110012100131001410015100161001710018100191002010021100221002310024100251002610027100281002910030100311003210033100341003510036100371003810039100401004110042100431004410045100461004710048100491005010051100521005310054100551005610057100581005910060100611006210063100641006510066100671006810069100701007110072100731007410075100761007710078100791008010081100821008310084100851008610087100881008910090100911009210093100941009510096100971009810099101001010110102101031010410105101061010710108101091011010111101121011310114101151011610117101181011910120101211012210123101241012510126101271012810129101301013110132101331013410135101361013710138101391014010141101421014310144101451014610147101481014910150101511015210153101541015510156101571015810159101601016110162101631016410165101661016710168101691017010171101721017310174101751017610177101781017910180101811018210183101841018510186101871018810189101901019110192101931019410195101961019710198101991020010201102021020310204102051020610207102081020910210102111021210213102141021510216102171021810219102201022110222102231022410225102261022710228102291023010231102321023310234102351023610237102381023910240102411024210243102441024510246102471024810249102501025110252102531025410255102561025710258102591026010261102621026310264102651026610267102681026910270102711027210273102741027510276102771027810279102801028110282102831028410285102861028710288102891029010291102921029310294102951029610297102981029910300103011030210303103041030510306103071030810309103101031110312103131031410315103161031710318103191032010321103221032310324103251032610327103281032910330103311033210333103341033510336103371033810339103401034110342103431034410345103461034710348103491035010351103521035310354103551035610357103581035910360103611036210363103641036510366103671036810369103701037110372103731037410375103761037710378103791038010381103821038310384103851038610387103881038910390103911039210393103941039510396103971039810399104001040110402104031040410405104061040710408104091041010411104121041310414104151041610417104181041910420104211042210423104241042510426104271042810429104301043110432104331043410435104361043710438104391044010441104421044310444104451044610447104481044910450104511045210453104541045510456104571045810459104601046110462104631046410465104661046710468104691047010471104721047310474104751047610477104781047910480104811048210483104841048510486104871048810489104901049110492104931049410495104961049710498104991050010501105021050310504105051050610507105081050910510105111051210513105141051510516105171051810519105201052110522105231052410525105261052710528105291053010531105321053310534105351053610537105381053910540105411054210543105441054510546105471054810549105501055110552105531055410555105561055710558105591056010561105621056310564105651056610567105681056910570105711057210573105741057510576105771057810579105801058110582105831058410585105861058710588105891059010591105921059310594105951059610597105981059910600106011060210603106041060510606106071060810609106101061110612106131061410615106161061710618106191062010621106221062310624106251062610627106281062910630106311063210633106341063510636106371063810639106401064110642106431064410645106461064710648106491065010651106521065310654106551065610657106581065910660106611066210663106641066510666106671066810669106701067110672106731067410675106761067710678106791068010681106821068310684106851068610687106881068910690106911069210693106941069510696106971069810699107001070110702107031070410705107061070710708107091071010711107121071310714107151071610717107181071910720107211072210723107241072510726107271072810729107301073110732107331073410735107361073710738107391074010741107421074310744107451074610747107481074910750107511075210753107541075510756107571075810759107601076110762107631076410765107661076710768107691077010771107721077310774107751077610777107781077910780107811078210783107841078510786107871078810789107901079110792107931079410795107961079710798107991080010801108021080310804108051080610807108081080910810108111081210813108141081510816108171081810819108201082110822108231082410825108261082710828108291083010831108321083310834108351083610837108381083910840108411084210843108441084510846108471084810849108501085110852108531085410855108561085710858108591086010861108621086310864108651086610867108681086910870108711087210873108741087510876108771087810879108801088110882108831088410885108861088710888108891089010891108921089310894108951089610897108981089910900109011090210903109041090510906109071090810909109101091110912109131091410915109161091710918109191092010921109221092310924109251092610927109281092910930109311093210933109341093510936109371093810939109401094110942109431094410945109461094710948109491095010951109521095310954109551095610957109581095910960109611096210963109641096510966109671096810969109701097110972109731097410975109761097710978109791098010981109821098310984109851098610987109881098910990109911099210993109941099510996109971099810999110001100111002110031100411005110061100711008110091101011011110121101311014110151101611017110181101911020110211102211023110241102511026110271102811029110301103111032110331103411035110361103711038110391104011041110421104311044110451104611047110481104911050110511105211053110541105511056110571105811059110601106111062110631106411065110661106711068110691107011071110721107311074110751107611077110781107911080110811108211083110841108511086110871108811089110901109111092110931109411095110961109711098110991110011101111021110311104111051110611107111081110911110111111111211113111141111511116111171111811119111201112111122111231112411125111261112711128111291113011131111321113311134111351113611137111381113911140111411114211143111441114511146111471114811149111501115111152111531115411155111561115711158111591116011161111621116311164111651116611167111681116911170111711117211173111741117511176111771117811179111801118111182111831118411185111861118711188111891119011191111921119311194111951119611197111981119911200112011120211203112041120511206112071120811209112101121111212112131121411215112161121711218112191122011221112221122311224112251122611227112281122911230112311123211233112341123511236112371123811239112401124111242112431124411245112461124711248112491125011251112521125311254112551125611257112581125911260112611126211263112641126511266112671126811269112701127111272112731127411275112761127711278112791128011281112821128311284112851128611287112881128911290112911129211293112941129511296112971129811299113001130111302113031130411305113061130711308113091131011311113121131311314113151131611317113181131911320113211132211323113241132511326113271132811329113301133111332113331133411335113361133711338113391134011341113421134311344113451134611347113481134911350113511135211353113541135511356113571135811359113601136111362113631136411365113661136711368113691137011371113721137311374113751137611377113781137911380113811138211383113841138511386113871138811389113901139111392113931139411395113961139711398113991140011401114021140311404114051140611407114081140911410114111141211413114141141511416114171141811419114201142111422114231142411425114261142711428114291143011431114321143311434114351143611437114381143911440114411144211443114441144511446114471144811449114501145111452114531145411455114561145711458114591146011461114621146311464114651146611467114681146911470114711147211473114741147511476114771147811479114801148111482114831148411485114861148711488114891149011491114921149311494114951149611497114981149911500115011150211503115041150511506115071150811509115101151111512115131151411515115161151711518115191152011521115221152311524115251152611527115281152911530115311153211533115341153511536115371153811539115401154111542115431154411545115461154711548115491155011551115521155311554115551155611557115581155911560115611156211563115641156511566115671156811569115701157111572115731157411575115761157711578115791158011581115821158311584115851158611587115881158911590115911159211593115941159511596115971159811599116001160111602116031160411605116061160711608116091161011611116121161311614116151161611617116181161911620116211162211623116241162511626116271162811629116301163111632116331163411635116361163711638116391164011641116421164311644116451164611647116481164911650116511165211653116541165511656116571165811659116601166111662116631166411665116661166711668116691167011671116721167311674116751167611677116781167911680116811168211683116841168511686116871168811689116901169111692116931169411695116961169711698116991170011701117021170311704117051170611707117081170911710117111171211713117141171511716117171171811719117201172111722117231172411725117261172711728117291173011731117321173311734117351173611737117381173911740117411174211743117441174511746117471174811749117501175111752117531175411755117561175711758117591176011761117621176311764117651176611767117681176911770117711177211773117741177511776117771177811779117801178111782117831178411785117861178711788117891179011791117921179311794117951179611797117981179911800118011180211803118041180511806118071180811809118101181111812118131181411815118161181711818118191182011821118221182311824118251182611827118281182911830118311183211833118341183511836118371183811839118401184111842118431184411845118461184711848118491185011851118521185311854118551185611857118581185911860118611186211863118641186511866118671186811869118701187111872118731187411875118761187711878118791188011881118821188311884118851188611887118881188911890118911189211893118941189511896118971189811899119001190111902119031190411905119061190711908119091191011911119121191311914119151191611917119181191911920119211192211923119241192511926119271192811929119301193111932119331193411935119361193711938119391194011941119421194311944119451194611947119481194911950119511195211953119541195511956119571195811959119601196111962119631196411965119661196711968119691197011971119721197311974119751197611977119781197911980119811198211983119841198511986119871198811989119901199111992119931199411995119961199711998119991200012001120021200312004120051200612007120081200912010120111201212013120141201512016120171201812019120201202112022120231202412025120261202712028120291203012031120321203312034120351203612037120381203912040120411204212043120441204512046120471204812049120501205112052120531205412055120561205712058120591206012061120621206312064120651206612067120681206912070120711207212073120741207512076120771207812079120801208112082120831208412085120861208712088120891209012091120921209312094120951209612097120981209912100121011210212103121041210512106121071210812109121101211112112121131211412115121161211712118121191212012121121221212312124121251212612127121281212912130121311213212133121341213512136121371213812139121401214112142121431214412145121461214712148121491215012151121521215312154121551215612157121581215912160121611216212163121641216512166121671216812169121701217112172121731217412175121761217712178121791218012181121821218312184121851218612187121881218912190121911219212193121941219512196121971219812199122001220112202122031220412205122061220712208122091221012211122121221312214122151221612217122181221912220122211222212223122241222512226122271222812229122301223112232122331223412235122361223712238122391224012241122421224312244122451224612247122481224912250122511225212253122541225512256122571225812259122601226112262122631226412265122661226712268122691227012271122721227312274122751227612277122781227912280122811228212283122841228512286122871228812289122901229112292122931229412295122961229712298122991230012301123021230312304123051230612307123081230912310123111231212313123141231512316123171231812319123201232112322123231232412325123261232712328123291233012331123321233312334123351233612337123381233912340123411234212343123441234512346123471234812349123501235112352123531235412355123561235712358123591236012361123621236312364123651236612367123681236912370123711237212373123741237512376123771237812379123801238112382123831238412385123861238712388123891239012391123921239312394123951239612397123981239912400124011240212403124041240512406124071240812409124101241112412124131241412415124161241712418124191242012421124221242312424124251242612427124281242912430124311243212433124341243512436124371243812439124401244112442124431244412445124461244712448124491245012451124521245312454124551245612457124581245912460124611246212463124641246512466124671246812469124701247112472124731247412475124761247712478124791248012481124821248312484124851248612487124881248912490124911249212493124941249512496124971249812499125001250112502125031250412505125061250712508125091251012511125121251312514125151251612517125181251912520125211252212523125241252512526125271252812529125301253112532125331253412535125361253712538125391254012541125421254312544125451254612547125481254912550125511255212553125541255512556125571255812559125601256112562125631256412565125661256712568125691257012571125721257312574125751257612577125781257912580125811258212583125841258512586125871258812589125901259112592125931259412595125961259712598125991260012601126021260312604126051260612607126081260912610126111261212613126141261512616126171261812619126201262112622126231262412625126261262712628126291263012631126321263312634126351263612637126381263912640126411264212643126441264512646126471264812649126501265112652126531265412655126561265712658126591266012661126621266312664126651266612667126681266912670126711267212673126741267512676126771267812679126801268112682126831268412685126861268712688126891269012691126921269312694126951269612697126981269912700127011270212703127041270512706127071270812709127101271112712127131271412715127161271712718127191272012721127221272312724127251272612727127281272912730127311273212733127341273512736127371273812739127401274112742127431274412745127461274712748127491275012751127521275312754127551275612757127581275912760127611276212763127641276512766127671276812769127701277112772127731277412775127761277712778127791278012781127821278312784127851278612787127881278912790127911279212793127941279512796127971279812799128001280112802128031280412805128061280712808128091281012811128121281312814128151281612817128181281912820128211282212823128241282512826128271282812829128301283112832128331283412835128361283712838128391284012841128421284312844128451284612847128481284912850128511285212853128541285512856128571285812859128601286112862128631286412865128661286712868128691287012871128721287312874128751287612877128781287912880128811288212883128841288512886128871288812889128901289112892128931289412895128961289712898128991290012901129021290312904129051290612907129081290912910129111291212913129141291512916129171291812919129201292112922129231292412925129261292712928129291293012931129321293312934129351293612937129381293912940129411294212943129441294512946129471294812949129501295112952129531295412955129561295712958129591296012961129621296312964129651296612967129681296912970129711297212973129741297512976129771297812979129801298112982129831298412985129861298712988129891299012991129921299312994129951299612997129981299913000130011300213003130041300513006130071300813009130101301113012130131301413015130161301713018130191302013021130221302313024130251302613027130281302913030130311303213033130341303513036130371303813039130401304113042130431304413045130461304713048130491305013051130521305313054130551305613057130581305913060130611306213063130641306513066130671306813069130701307113072130731307413075130761307713078130791308013081130821308313084130851308613087130881308913090130911309213093130941309513096130971309813099131001310113102131031310413105131061310713108131091311013111131121311313114131151311613117131181311913120131211312213123131241312513126131271312813129131301313113132131331313413135131361313713138131391314013141131421314313144131451314613147131481314913150131511315213153131541315513156131571315813159131601316113162131631316413165131661316713168131691317013171131721317313174131751317613177131781317913180131811318213183131841318513186131871318813189131901319113192131931319413195131961319713198131991320013201132021320313204132051320613207132081320913210132111321213213132141321513216132171321813219132201322113222132231322413225132261322713228132291323013231132321323313234132351323613237132381323913240132411324213243132441324513246132471324813249132501325113252132531325413255132561325713258132591326013261132621326313264132651326613267132681326913270132711327213273132741327513276132771327813279132801328113282132831328413285132861328713288132891329013291132921329313294132951329613297132981329913300133011330213303133041330513306133071330813309133101331113312133131331413315133161331713318133191332013321133221332313324133251332613327133281332913330133311333213333133341333513336133371333813339133401334113342133431334413345133461334713348133491335013351133521335313354133551335613357133581335913360133611336213363133641336513366133671336813369133701337113372133731337413375133761337713378133791338013381133821338313384133851338613387133881338913390133911339213393133941339513396133971339813399134001340113402134031340413405134061340713408134091341013411134121341313414134151341613417134181341913420134211342213423134241342513426134271342813429134301343113432134331343413435134361343713438134391344013441134421344313444134451344613447134481344913450134511345213453134541345513456134571345813459134601346113462134631346413465134661346713468134691347013471134721347313474134751347613477134781347913480134811348213483134841348513486134871348813489134901349113492134931349413495134961349713498134991350013501135021350313504135051350613507135081350913510135111351213513135141351513516135171351813519135201352113522135231352413525135261352713528135291353013531135321353313534135351353613537135381353913540135411354213543135441354513546135471354813549135501355113552135531355413555135561355713558135591356013561135621356313564135651356613567135681356913570135711357213573135741357513576135771357813579135801358113582135831358413585135861358713588135891359013591135921359313594135951359613597135981359913600136011360213603136041360513606136071360813609136101361113612136131361413615136161361713618136191362013621136221362313624136251362613627136281362913630136311363213633136341363513636136371363813639136401364113642136431364413645136461364713648136491365013651136521365313654136551365613657136581365913660136611366213663136641366513666136671366813669136701367113672136731367413675136761367713678136791368013681136821368313684136851368613687136881368913690136911369213693136941369513696136971369813699137001370113702137031370413705137061370713708137091371013711137121371313714137151371613717137181371913720137211372213723137241372513726137271372813729137301373113732137331373413735137361373713738137391374013741137421374313744137451374613747137481374913750137511375213753137541375513756137571375813759137601376113762137631376413765137661376713768137691377013771137721377313774137751377613777137781377913780137811378213783137841378513786137871378813789137901379113792137931379413795137961379713798137991380013801138021380313804138051380613807138081380913810138111381213813138141381513816138171381813819138201382113822138231382413825138261382713828138291383013831138321383313834138351383613837138381383913840138411384213843138441384513846138471384813849138501385113852138531385413855138561385713858138591386013861138621386313864138651386613867138681386913870138711387213873138741387513876138771387813879138801388113882138831388413885138861388713888138891389013891138921389313894138951389613897138981389913900139011390213903139041390513906139071390813909139101391113912139131391413915139161391713918139191392013921139221392313924139251392613927139281392913930139311393213933139341393513936139371393813939139401394113942139431394413945139461394713948139491395013951139521395313954139551395613957139581395913960139611396213963139641396513966139671396813969139701397113972139731397413975139761397713978139791398013981139821398313984139851398613987139881398913990139911399213993139941399513996139971399813999140001400114002140031400414005140061400714008140091401014011140121401314014140151401614017140181401914020140211402214023140241402514026140271402814029140301403114032140331403414035140361403714038140391404014041140421404314044140451404614047140481404914050140511405214053140541405514056140571405814059140601406114062140631406414065140661406714068140691407014071140721407314074140751407614077140781407914080140811408214083140841408514086140871408814089140901409114092140931409414095140961409714098140991410014101141021410314104141051410614107141081410914110141111411214113141141411514116141171411814119141201412114122141231412414125141261412714128141291413014131141321413314134141351413614137141381413914140141411414214143141441414514146141471414814149141501415114152141531415414155141561415714158141591416014161141621416314164141651416614167141681416914170141711417214173141741417514176141771417814179141801418114182141831418414185141861418714188141891419014191141921419314194141951419614197141981419914200142011420214203142041420514206142071420814209142101421114212142131421414215142161421714218142191422014221142221422314224142251422614227142281422914230142311423214233142341423514236142371423814239142401424114242142431424414245142461424714248142491425014251142521425314254142551425614257142581425914260142611426214263142641426514266142671426814269142701427114272142731427414275142761427714278142791428014281142821428314284142851428614287142881428914290142911429214293142941429514296142971429814299143001430114302143031430414305143061430714308143091431014311143121431314314143151431614317143181431914320143211432214323143241432514326143271432814329143301433114332143331433414335143361433714338143391434014341143421434314344143451434614347143481434914350143511435214353143541435514356143571435814359143601436114362143631436414365143661436714368143691437014371143721437314374143751437614377143781437914380143811438214383143841438514386143871438814389143901439114392143931439414395143961439714398143991440014401144021440314404144051440614407144081440914410144111441214413144141441514416144171441814419144201442114422144231442414425144261442714428144291443014431144321443314434144351443614437144381443914440144411444214443144441444514446144471444814449144501445114452144531445414455144561445714458144591446014461144621446314464144651446614467144681446914470144711447214473144741447514476144771447814479144801448114482144831448414485144861448714488144891449014491144921449314494144951449614497144981449914500145011450214503145041450514506145071450814509145101451114512145131451414515145161451714518145191452014521145221452314524145251452614527145281452914530145311453214533145341453514536145371453814539145401454114542145431454414545145461454714548145491455014551145521455314554145551455614557145581455914560145611456214563145641456514566145671456814569145701457114572145731457414575145761457714578145791458014581145821458314584145851458614587145881458914590145911459214593145941459514596145971459814599146001460114602146031460414605146061460714608146091461014611146121461314614146151461614617146181461914620146211462214623146241462514626146271462814629146301463114632146331463414635146361463714638146391464014641146421464314644146451464614647146481464914650146511465214653146541465514656146571465814659146601466114662146631466414665146661466714668146691467014671146721467314674146751467614677146781467914680146811468214683146841468514686146871468814689146901469114692146931469414695146961469714698146991470014701147021470314704147051470614707147081470914710147111471214713147141471514716147171471814719147201472114722147231472414725147261472714728147291473014731147321473314734147351473614737147381473914740147411474214743147441474514746147471474814749147501475114752147531475414755147561475714758147591476014761147621476314764147651476614767147681476914770147711477214773147741477514776147771477814779147801478114782147831478414785147861478714788147891479014791147921479314794147951479614797147981479914800148011480214803148041480514806148071480814809148101481114812148131481414815148161481714818148191482014821148221482314824148251482614827148281482914830148311483214833148341483514836148371483814839148401484114842148431484414845148461484714848148491485014851148521485314854148551485614857148581485914860148611486214863148641486514866148671486814869148701487114872148731487414875148761487714878148791488014881148821488314884148851488614887148881488914890148911489214893148941489514896148971489814899149001490114902149031490414905149061490714908149091491014911149121491314914149151491614917149181491914920149211492214923149241492514926149271492814929149301493114932149331493414935149361493714938149391494014941149421494314944149451494614947149481494914950149511495214953149541495514956149571495814959149601496114962149631496414965149661496714968149691497014971149721497314974149751497614977149781497914980149811498214983149841498514986149871498814989149901499114992149931499414995149961499714998149991500015001150021500315004150051500615007150081500915010150111501215013150141501515016150171501815019150201502115022150231502415025150261502715028150291503015031150321503315034150351503615037150381503915040150411504215043150441504515046150471504815049150501505115052150531505415055150561505715058150591506015061150621506315064150651506615067150681506915070150711507215073150741507515076150771507815079150801508115082150831508415085150861508715088150891509015091150921509315094150951509615097150981509915100151011510215103151041510515106151071510815109151101511115112151131511415115151161511715118151191512015121151221512315124151251512615127151281512915130151311513215133151341513515136151371513815139151401514115142151431514415145151461514715148151491515015151151521515315154151551515615157151581515915160151611516215163151641516515166151671516815169151701517115172151731517415175151761517715178151791518015181151821518315184151851518615187151881518915190151911519215193151941519515196151971519815199152001520115202152031520415205152061520715208152091521015211152121521315214152151521615217152181521915220152211522215223152241522515226152271522815229152301523115232152331523415235152361523715238152391524015241152421524315244152451524615247152481524915250152511525215253152541525515256152571525815259152601526115262152631526415265152661526715268152691527015271152721527315274152751527615277152781527915280152811528215283152841528515286152871528815289152901529115292152931529415295152961529715298152991530015301153021530315304153051530615307153081530915310153111531215313153141531515316153171531815319153201532115322153231532415325153261532715328153291533015331153321533315334153351533615337153381533915340153411534215343153441534515346153471534815349153501535115352153531535415355153561535715358153591536015361153621536315364153651536615367153681536915370153711537215373153741537515376153771537815379153801538115382153831538415385153861538715388153891539015391153921539315394153951539615397153981539915400154011540215403154041540515406154071540815409154101541115412154131541415415154161541715418154191542015421154221542315424154251542615427154281542915430154311543215433154341543515436154371543815439154401544115442154431544415445154461544715448154491545015451154521545315454154551545615457154581545915460154611546215463154641546515466154671546815469154701547115472154731547415475154761547715478154791548015481154821548315484154851548615487154881548915490154911549215493154941549515496154971549815499155001550115502155031550415505155061550715508155091551015511155121551315514155151551615517155181551915520155211552215523155241552515526155271552815529155301553115532155331553415535155361553715538155391554015541155421554315544155451554615547155481554915550155511555215553155541555515556155571555815559155601556115562155631556415565155661556715568155691557015571155721557315574155751557615577155781557915580155811558215583155841558515586155871558815589155901559115592155931559415595155961559715598155991560015601156021560315604156051560615607156081560915610156111561215613156141561515616156171561815619156201562115622156231562415625156261562715628156291563015631156321563315634156351563615637156381563915640156411564215643156441564515646156471564815649156501565115652156531565415655156561565715658156591566015661156621566315664156651566615667156681566915670156711567215673156741567515676156771567815679156801568115682156831568415685156861568715688156891569015691156921569315694156951569615697156981569915700157011570215703157041570515706157071570815709157101571115712157131571415715157161571715718157191572015721157221572315724157251572615727157281572915730157311573215733157341573515736157371573815739157401574115742157431574415745157461574715748157491575015751157521575315754157551575615757157581575915760157611576215763157641576515766157671576815769157701577115772157731577415775157761577715778157791578015781157821578315784157851578615787157881578915790157911579215793157941579515796157971579815799158001580115802158031580415805158061580715808158091581015811158121581315814158151581615817158181581915820158211582215823158241582515826158271582815829158301583115832158331583415835158361583715838158391584015841158421584315844158451584615847158481584915850158511585215853158541585515856158571585815859158601586115862158631586415865158661586715868158691587015871158721587315874158751587615877158781587915880158811588215883158841588515886158871588815889158901589115892158931589415895158961589715898158991590015901159021590315904159051590615907159081590915910159111591215913159141591515916159171591815919159201592115922159231592415925159261592715928159291593015931159321593315934159351593615937159381593915940159411594215943159441594515946159471594815949159501595115952159531595415955159561595715958159591596015961159621596315964159651596615967159681596915970159711597215973159741597515976159771597815979159801598115982159831598415985159861598715988159891599015991159921599315994159951599615997159981599916000160011600216003160041600516006160071600816009160101601116012160131601416015160161601716018160191602016021160221602316024160251602616027160281602916030160311603216033160341603516036160371603816039160401604116042160431604416045160461604716048160491605016051160521605316054160551605616057160581605916060160611606216063160641606516066160671606816069160701607116072160731607416075160761607716078160791608016081160821608316084160851608616087160881608916090160911609216093160941609516096160971609816099161001610116102161031610416105161061610716108161091611016111161121611316114161151611616117161181611916120161211612216123161241612516126161271612816129161301613116132161331613416135161361613716138161391614016141161421614316144161451614616147161481614916150161511615216153161541615516156161571615816159161601616116162161631616416165161661616716168161691617016171161721617316174161751617616177161781617916180161811618216183161841618516186161871618816189161901619116192161931619416195161961619716198161991620016201162021620316204162051620616207162081620916210162111621216213162141621516216162171621816219162201622116222162231622416225162261622716228162291623016231162321623316234162351623616237162381623916240162411624216243162441624516246162471624816249162501625116252162531625416255162561625716258162591626016261162621626316264162651626616267162681626916270162711627216273162741627516276162771627816279162801628116282162831628416285162861628716288162891629016291162921629316294162951629616297162981629916300163011630216303163041630516306163071630816309163101631116312163131631416315163161631716318163191632016321163221632316324163251632616327163281632916330163311633216333163341633516336163371633816339163401634116342163431634416345163461634716348163491635016351163521635316354163551635616357163581635916360163611636216363163641636516366163671636816369163701637116372163731637416375163761637716378163791638016381163821638316384163851638616387163881638916390163911639216393163941639516396163971639816399164001640116402164031640416405164061640716408164091641016411164121641316414164151641616417164181641916420164211642216423164241642516426164271642816429164301643116432164331643416435164361643716438164391644016441164421644316444164451644616447164481644916450164511645216453164541645516456164571645816459164601646116462164631646416465164661646716468164691647016471164721647316474164751647616477164781647916480164811648216483164841648516486164871648816489164901649116492164931649416495164961649716498164991650016501165021650316504165051650616507165081650916510165111651216513165141651516516165171651816519165201652116522165231652416525165261652716528165291653016531165321653316534165351653616537165381653916540165411654216543165441654516546165471654816549165501655116552165531655416555165561655716558165591656016561165621656316564165651656616567165681656916570165711657216573165741657516576165771657816579165801658116582165831658416585165861658716588165891659016591165921659316594165951659616597165981659916600166011660216603166041660516606166071660816609166101661116612166131661416615166161661716618166191662016621166221662316624166251662616627166281662916630166311663216633166341663516636166371663816639166401664116642166431664416645166461664716648166491665016651166521665316654166551665616657166581665916660166611666216663166641666516666166671666816669166701667116672166731667416675166761667716678166791668016681166821668316684166851668616687166881668916690166911669216693166941669516696166971669816699167001670116702167031670416705167061670716708167091671016711167121671316714167151671616717167181671916720167211672216723167241672516726167271672816729167301673116732167331673416735167361673716738167391674016741167421674316744167451674616747167481674916750167511675216753167541675516756167571675816759167601676116762167631676416765167661676716768167691677016771167721677316774167751677616777167781677916780167811678216783167841678516786167871678816789167901679116792167931679416795167961679716798167991680016801168021680316804168051680616807168081680916810168111681216813168141681516816168171681816819168201682116822168231682416825168261682716828168291683016831168321683316834168351683616837168381683916840168411684216843168441684516846168471684816849168501685116852168531685416855168561685716858168591686016861168621686316864168651686616867168681686916870168711687216873168741687516876168771687816879168801688116882168831688416885168861688716888168891689016891168921689316894168951689616897168981689916900169011690216903169041690516906169071690816909169101691116912169131691416915169161691716918169191692016921169221692316924169251692616927169281692916930169311693216933169341693516936169371693816939169401694116942169431694416945169461694716948169491695016951169521695316954169551695616957169581695916960169611696216963169641696516966169671696816969169701697116972169731697416975169761697716978169791698016981169821698316984169851698616987169881698916990169911699216993169941699516996169971699816999170001700117002170031700417005170061700717008170091701017011170121701317014170151701617017170181701917020170211702217023170241702517026170271702817029170301703117032170331703417035170361703717038170391704017041170421704317044170451704617047170481704917050170511705217053170541705517056170571705817059170601706117062170631706417065170661706717068170691707017071170721707317074170751707617077170781707917080170811708217083170841708517086170871708817089170901709117092170931709417095170961709717098170991710017101171021710317104171051710617107171081710917110171111711217113171141711517116171171711817119171201712117122171231712417125171261712717128171291713017131171321713317134171351713617137171381713917140171411714217143171441714517146171471714817149171501715117152171531715417155171561715717158171591716017161171621716317164171651716617167171681716917170171711717217173171741717517176171771717817179171801718117182171831718417185171861718717188171891719017191171921719317194171951719617197171981719917200172011720217203172041720517206172071720817209172101721117212172131721417215172161721717218172191722017221172221722317224172251722617227172281722917230172311723217233172341723517236172371723817239172401724117242172431724417245172461724717248172491725017251172521725317254172551725617257172581725917260172611726217263172641726517266172671726817269172701727117272172731727417275172761727717278172791728017281172821728317284172851728617287172881728917290172911729217293172941729517296172971729817299173001730117302173031730417305173061730717308173091731017311173121731317314173151731617317173181731917320173211732217323173241732517326173271732817329173301733117332173331733417335173361733717338173391734017341173421734317344173451734617347173481734917350173511735217353173541735517356173571735817359173601736117362173631736417365173661736717368173691737017371173721737317374173751737617377173781737917380173811738217383173841738517386173871738817389173901739117392173931739417395173961739717398173991740017401174021740317404174051740617407174081740917410174111741217413174141741517416174171741817419174201742117422174231742417425174261742717428174291743017431174321743317434174351743617437174381743917440174411744217443174441744517446174471744817449174501745117452174531745417455174561745717458174591746017461174621746317464174651746617467174681746917470174711747217473174741747517476174771747817479174801748117482174831748417485174861748717488174891749017491174921749317494174951749617497174981749917500175011750217503175041750517506175071750817509175101751117512175131751417515175161751717518175191752017521175221752317524175251752617527175281752917530175311753217533175341753517536175371753817539175401754117542175431754417545175461754717548175491755017551175521755317554175551755617557175581755917560175611756217563175641756517566175671756817569175701757117572175731757417575175761757717578175791758017581175821758317584175851758617587175881758917590175911759217593175941759517596175971759817599176001760117602176031760417605176061760717608176091761017611176121761317614176151761617617176181761917620176211762217623176241762517626176271762817629176301763117632176331763417635176361763717638176391764017641176421764317644176451764617647176481764917650176511765217653176541765517656176571765817659176601766117662176631766417665176661766717668176691767017671176721767317674176751767617677176781767917680176811768217683176841768517686176871768817689176901769117692176931769417695176961769717698176991770017701177021770317704177051770617707177081770917710177111771217713177141771517716177171771817719177201772117722177231772417725177261772717728177291773017731177321773317734177351773617737177381773917740177411774217743177441774517746177471774817749177501775117752177531775417755177561775717758177591776017761177621776317764177651776617767177681776917770177711777217773177741777517776177771777817779177801778117782177831778417785177861778717788177891779017791177921779317794177951779617797177981779917800178011780217803178041780517806178071780817809178101781117812178131781417815178161781717818178191782017821178221782317824178251782617827178281782917830178311783217833178341783517836178371783817839178401784117842178431784417845178461784717848178491785017851178521785317854178551785617857178581785917860178611786217863178641786517866178671786817869178701787117872178731787417875178761787717878178791788017881178821788317884178851788617887178881788917890178911789217893178941789517896178971789817899179001790117902179031790417905179061790717908179091791017911179121791317914179151791617917179181791917920179211792217923179241792517926179271792817929179301793117932179331793417935179361793717938179391794017941179421794317944179451794617947179481794917950179511795217953179541795517956179571795817959179601796117962179631796417965179661796717968179691797017971179721797317974179751797617977179781797917980179811798217983179841798517986179871798817989179901799117992179931799417995179961799717998179991800018001180021800318004180051800618007180081800918010180111801218013180141801518016180171801818019180201802118022180231802418025180261802718028180291803018031180321803318034180351803618037180381803918040180411804218043180441804518046180471804818049180501805118052180531805418055180561805718058180591806018061180621806318064180651806618067180681806918070180711807218073180741807518076180771807818079180801808118082180831808418085180861808718088180891809018091180921809318094180951809618097180981809918100181011810218103181041810518106181071810818109181101811118112181131811418115181161811718118181191812018121181221812318124181251812618127181281812918130181311813218133181341813518136181371813818139181401814118142181431814418145181461814718148181491815018151181521815318154181551815618157181581815918160181611816218163181641816518166181671816818169181701817118172181731817418175181761817718178181791818018181181821818318184181851818618187181881818918190181911819218193181941819518196181971819818199182001820118202182031820418205182061820718208182091821018211182121821318214182151821618217182181821918220182211822218223182241822518226182271822818229182301823118232182331823418235182361823718238182391824018241182421824318244182451824618247182481824918250182511825218253182541825518256182571825818259182601826118262182631826418265182661826718268182691827018271182721827318274182751827618277182781827918280182811828218283182841828518286182871828818289182901829118292182931829418295182961829718298182991830018301183021830318304183051830618307183081830918310183111831218313183141831518316183171831818319183201832118322183231832418325183261832718328183291833018331183321833318334183351833618337183381833918340183411834218343183441834518346183471834818349183501835118352183531835418355183561835718358183591836018361183621836318364183651836618367183681836918370183711837218373183741837518376183771837818379183801838118382183831838418385183861838718388183891839018391183921839318394183951839618397183981839918400184011840218403184041840518406184071840818409184101841118412184131841418415184161841718418184191842018421184221842318424184251842618427184281842918430184311843218433184341843518436184371843818439184401844118442184431844418445184461844718448184491845018451184521845318454184551845618457184581845918460184611846218463184641846518466184671846818469184701847118472184731847418475184761847718478184791848018481184821848318484184851848618487184881848918490184911849218493184941849518496184971849818499185001850118502185031850418505185061850718508185091851018511185121851318514185151851618517185181851918520185211852218523185241852518526185271852818529
  1. ! function(e, t) {
  2. "object" == typeof exports && "undefined" != typeof module ? module.exports = t() : "function" == typeof define && define.amd ? define(t) : e.FroalaEditor = t()
  3. }(this, function() {
  4. "use strict";
  5. function Fe(e) {
  6. return (Fe = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function(e) {
  7. return typeof e
  8. } : function(e) {
  9. return e && "function" == typeof Symbol && e.constructor === Symbol && e !== Symbol.prototype ? "symbol" : typeof e
  10. })(e)
  11. }
  12. Element.prototype.matches || (Element.prototype.matches = Element.prototype.msMatchesSelector || Element.prototype.webkitMatchesSelector), Element.prototype.closest || (Element.prototype.closest = function(e) {
  13. var t = this;
  14. if (!document.documentElement.contains(t)) return null;
  15. do {
  16. if (t.matches(e)) return t;
  17. t = t.parentElement || t.parentNode
  18. } while (null !== t && 1 === t.nodeType);
  19. return null
  20. }), Element.prototype.matches || (Element.prototype.matches = Element.prototype.matchesSelector || Element.prototype.mozMatchesSelector || Element.prototype.msMatchesSelector || Element.prototype.oMatchesSelector || Element.prototype.webkitMatchesSelector || function(e) {
  21. for (var t = (this.document || this.ownerDocument).querySelectorAll(e), n = t.length; 0 <= --n && t.item(n) !== this;);
  22. return -1 < n
  23. }), Array.isArray || (Array.isArray = function(e) {
  24. return "[object Array]" === Object.prototype.toString.call(e)
  25. }), "function" != typeof Object.assign && Object.defineProperty(Object, "assign", {
  26. value: function(e, t) {
  27. if (null == e) throw new TypeError("Cannot convert undefined or null to object");
  28. for (var n = Object(e), r = 1; r < arguments.length; r++) {
  29. var a = arguments[r];
  30. if (null != a)
  31. for (var o in a) Object.prototype.hasOwnProperty.call(a, o) && (n[o] = a[o])
  32. }
  33. return n
  34. },
  35. writable: !0,
  36. configurable: !0
  37. }),
  38. function() {
  39. var i = /^\s*:scope/gi,
  40. s = /,\s*:scope/gi,
  41. l = document.createElement("div");
  42. function e(e, t) {
  43. var o = e[t];
  44. e[t] = function(e) {
  45. var t, n = !1,
  46. r = !1;
  47. if (e && (e.match(i) || e.match(s))) {
  48. this.parentNode || (l.appendChild(this), r = !0);
  49. var a = this.parentNode;
  50. return this.id || (this.id = "rootedQuerySelector_id_".concat((new Date).getTime()), n = !0), t = o.call(a, e.replace(i, "#".concat(this.id)).replace(s, ",#".concat(this.id))), n && (this.id = ""), r && l.removeChild(this), t
  51. }
  52. return o.call(this, e)
  53. }
  54. }
  55. try {
  56. l.querySelectorAll(":scope *")
  57. } catch (t) {
  58. e(Element.prototype, "querySelector"), e(Element.prototype, "querySelectorAll"), e(HTMLElement.prototype, "querySelector"), e(HTMLElement.prototype, "querySelectorAll")
  59. }
  60. }();
  61. function $e(e, t, n) {
  62. if ("string" != typeof e) return new $e.Bootstrap(e, t, n);
  63. var r = document.querySelectorAll(e);
  64. t && t.iframe_document && (r = t.iframe_document.querySelectorAll(e));
  65. for (var a = [], o = 0; o < r.length; o++) {
  66. var i = r[o]["data-froala.editor"];
  67. i ? a.push(i) : a.push(new $e.Bootstrap(r[o], t, n))
  68. }
  69. return 1 == a.length ? a[0] : a
  70. }
  71. $e.RegisterPlugins = function(e) {
  72. for (var t = 0; t < e.length; t++) e[t].call($e)
  73. }, Object.assign($e, {
  74. DEFAULTS: {
  75. initOnClick: !1,
  76. pluginsEnabled: null
  77. },
  78. MODULES: {},
  79. PLUGINS: {},
  80. VERSION: "3.0.3",
  81. INSTANCES: [],
  82. OPTS_MAPPING: {},
  83. SHARED: {},
  84. ID: 0
  85. }), $e.MODULES.node = function(i) {
  86. var n = i.$;
  87. function s(e) {
  88. return e && "IFRAME" !== e.tagName ? Array.prototype.slice.call(e.childNodes || []) : []
  89. }
  90. function l(e) {
  91. return !!e && (e.nodeType === Node.ELEMENT_NODE && 0 <= $e.BLOCK_TAGS.indexOf(e.tagName.toLowerCase()))
  92. }
  93. function c(e) {
  94. var t = {},
  95. n = e.attributes;
  96. if (n)
  97. for (var r = 0; r < n.length; r++) {
  98. var a = n[r];
  99. t[a.nodeName] = a.value
  100. }
  101. return t
  102. }
  103. function t(e) {
  104. for (var t = "", n = c(e), r = Object.keys(n).sort(), a = 0; a < r.length; a++) {
  105. var o = r[a],
  106. i = n[o];
  107. i.indexOf("'") < 0 && 0 <= i.indexOf('"') ? t += " ".concat(o, "='").concat(i, "'") : (0 <= i.indexOf('"') && 0 <= i.indexOf("'") && (i = i.replace(/"/g, "&quot;")), t += " ".concat(o, '="').concat(i, '"'))
  108. }
  109. return t
  110. }
  111. function r(e) {
  112. return e === i.el
  113. }
  114. return {
  115. isBlock: l,
  116. isEmpty: function d(e, t) {
  117. if (!e) return !0;
  118. if (e.querySelector("table")) return !1;
  119. var n = s(e);
  120. 1 === n.length && l(n[0]) && (n = s(n[0]));
  121. for (var r = !1, a = 0; a < n.length; a++) {
  122. var o = n[a];
  123. if (!(t && i.node.hasClass(o, "fr-marker") || o.nodeType === Node.TEXT_NODE && 0 === o.textContent.length)) {
  124. if ("BR" !== o.tagName && 0 < (o.textContent || "").replace(/\u200B/gi, "").replace(/\n/g, "").length) return !1;
  125. if (r) return !1;
  126. "BR" === o.tagName && (r = !0)
  127. }
  128. }
  129. return !(e.querySelectorAll($e.VOID_ELEMENTS.join(",")).length - e.querySelectorAll("br").length || e.querySelector("".concat(i.opts.htmlAllowedEmptyTags.join(":not(.fr-marker),"), ":not(.fr-marker)")) || 1 < e.querySelectorAll($e.BLOCK_TAGS.join(",")).length || e.querySelector("".concat(i.opts.htmlDoNotWrapTags.join(":not(.fr-marker),"), ":not(.fr-marker)")))
  130. },
  131. blockParent: function a(e) {
  132. for (; e && e.parentNode !== i.el && (!e.parentNode || !i.node.hasClass(e.parentNode, "fr-inner"));)
  133. if (l(e = e.parentNode)) return e;
  134. return null
  135. },
  136. deepestParent: function o(e, t, n) {
  137. if (void 0 === t && (t = []), void 0 === n && (n = !0), t.push(i.el), 0 <= t.indexOf(e.parentNode) || e.parentNode && i.node.hasClass(e.parentNode, "fr-inner") || e.parentNode && 0 <= $e.SIMPLE_ENTER_TAGS.indexOf(e.parentNode.tagName) && n) return null;
  138. for (; t.indexOf(e.parentNode) < 0 && e.parentNode && !i.node.hasClass(e.parentNode, "fr-inner") && ($e.SIMPLE_ENTER_TAGS.indexOf(e.parentNode.tagName) < 0 || !n) && (!l(e) || !l(e.parentNode) || !n);) e = e.parentNode;
  139. return e
  140. },
  141. rawAttributes: c,
  142. attributes: t,
  143. clearAttributes: function f(e) {
  144. for (var t = e.attributes, n = t.length - 1; 0 <= n; n--) {
  145. var r = t[n];
  146. e.removeAttribute(r.nodeName)
  147. }
  148. },
  149. openTagString: function p(e) {
  150. return "<".concat(e.tagName.toLowerCase()).concat(t(e), ">")
  151. },
  152. closeTagString: function u(e) {
  153. return "</".concat(e.tagName.toLowerCase(), ">")
  154. },
  155. isFirstSibling: function h(e, t) {
  156. void 0 === t && (t = !0);
  157. for (var n = e.previousSibling; n && t && i.node.hasClass(n, "fr-marker");) n = n.previousSibling;
  158. return !n || n.nodeType === Node.TEXT_NODE && "" === n.textContent && h(n)
  159. },
  160. isLastSibling: function g(e, t) {
  161. void 0 === t && (t = !0);
  162. for (var n = e.nextSibling; n && t && i.node.hasClass(n, "fr-marker");) n = n.nextSibling;
  163. return !n || n.nodeType === Node.TEXT_NODE && "" === n.textContent && g(n)
  164. },
  165. isList: function m(e) {
  166. return !!e && 0 <= ["UL", "OL"].indexOf(e.tagName)
  167. },
  168. isLink: function v(e) {
  169. return !!e && e.nodeType === Node.ELEMENT_NODE && "a" === e.tagName.toLowerCase()
  170. },
  171. isElement: r,
  172. contents: s,
  173. isVoid: function b(e) {
  174. return e && e.nodeType === Node.ELEMENT_NODE && 0 <= $e.VOID_ELEMENTS.indexOf((e.tagName || "").toLowerCase())
  175. },
  176. hasFocus: function E(e) {
  177. return e === i.doc.activeElement && (!i.doc.hasFocus || i.doc.hasFocus()) && Boolean(r(e) || e.type || e.href || ~e.tabIndex)
  178. },
  179. isEditable: function T(e) {
  180. return (!e.getAttribute || "false" !== e.getAttribute("contenteditable")) && ["STYLE", "SCRIPT"].indexOf(e.tagName) < 0
  181. },
  182. isDeletable: function A(e) {
  183. return e && e.nodeType === Node.ELEMENT_NODE && e.getAttribute("class") && 0 <= (e.getAttribute("class") || "").indexOf("fr-deletable")
  184. },
  185. hasClass: function C(e, t) {
  186. return e instanceof n && (e = e.get(0)), e && e.classList && e.classList.contains(t)
  187. },
  188. filter: function S(e) {
  189. return i.browser.msie ? e : {
  190. acceptNode: e
  191. }
  192. }
  193. }
  194. }, Object.assign($e.DEFAULTS, {
  195. htmlAllowedTags: ["a", "abbr", "address", "area", "article", "aside", "audio", "b", "base", "bdi", "bdo", "blockquote", "br", "button", "canvas", "caption", "cite", "code", "col", "colgroup", "datalist", "dd", "del", "details", "dfn", "dialog", "div", "dl", "dt", "em", "embed", "fieldset", "figcaption", "figure", "footer", "form", "h1", "h2", "h3", "h4", "h5", "h6", "header", "hgroup", "hr", "i", "iframe", "img", "input", "ins", "kbd", "keygen", "label", "legend", "li", "link", "main", "map", "mark", "menu", "menuitem", "meter", "nav", "noscript", "object", "ol", "optgroup", "option", "output", "p", "param", "pre", "progress", "queue", "rp", "rt", "ruby", "s", "samp", "script", "style", "section", "select", "small", "source", "span", "strike", "strong", "sub", "summary", "sup", "table", "tbody", "td", "textarea", "tfoot", "th", "thead", "time", "tr", "track", "u", "ul", "var", "video", "wbr"],
  196. htmlRemoveTags: ["script", "style"],
  197. htmlAllowedAttrs: ["accept", "accept-charset", "accesskey", "action", "align", "allowfullscreen", "allowtransparency", "alt", "async", "autocomplete", "autofocus", "autoplay", "autosave", "background", "bgcolor", "border", "charset", "cellpadding", "cellspacing", "checked", "cite", "class", "color", "cols", "colspan", "content", "contenteditable", "contextmenu", "controls", "coords", "data", "data-.*", "datetime", "default", "defer", "dir", "dirname", "disabled", "download", "draggable", "dropzone", "enctype", "for", "form", "formaction", "frameborder", "headers", "height", "hidden", "high", "href", "hreflang", "http-equiv", "icon", "id", "ismap", "itemprop", "keytype", "kind", "label", "lang", "language", "list", "loop", "low", "max", "maxlength", "media", "method", "min", "mozallowfullscreen", "multiple", "muted", "name", "novalidate", "open", "optimum", "pattern", "ping", "placeholder", "playsinline", "poster", "preload", "pubdate", "radiogroup", "readonly", "rel", "required", "reversed", "rows", "rowspan", "sandbox", "scope", "scoped", "scrolling", "seamless", "selected", "shape", "size", "sizes", "span", "src", "srcdoc", "srclang", "srcset", "start", "step", "summary", "spellcheck", "style", "tabindex", "target", "title", "type", "translate", "usemap", "value", "valign", "webkitallowfullscreen", "width", "wrap"],
  198. htmlAllowedStyleProps: [".*"],
  199. htmlAllowComments: !0,
  200. htmlUntouched: !1,
  201. fullPage: !1
  202. }), $e.HTML5Map = {
  203. B: "STRONG",
  204. I: "EM",
  205. STRIKE: "S"
  206. }, $e.MODULES.clean = function(f) {
  207. var d, p, u, h, g = f.$;
  208. function a(e) {
  209. if (e.nodeType === Node.ELEMENT_NODE && e.getAttribute("class") && 0 <= e.getAttribute("class").indexOf("fr-marker")) return !1;
  210. var t, n = f.node.contents(e),
  211. r = [];
  212. for (t = 0; t < n.length; t++) n[t].nodeType !== Node.ELEMENT_NODE || f.node.isVoid(n[t]) ? n[t].nodeType === Node.TEXT_NODE && (n[t].textContent = n[t].textContent.replace(/\u200b/g, "")) : n[t].textContent.replace(/\u200b/g, "").length !== n[t].textContent.length && a(n[t]);
  213. if (e.nodeType === Node.ELEMENT_NODE && !f.node.isVoid(e) && (e.normalize(), n = f.node.contents(e), r = e.querySelectorAll(".fr-marker"), n.length - r.length == 0)) {
  214. for (t = 0; t < n.length; t++)
  215. if (n[t].nodeType === Node.ELEMENT_NODE && (n[t].getAttribute("class") || "").indexOf("fr-marker") < 0) return !1;
  216. for (t = 0; t < r.length; t++) e.parentNode.insertBefore(r[t].cloneNode(!0), e);
  217. return e.parentNode.removeChild(e), !1
  218. }
  219. }
  220. function s(e, t) {
  221. if (e.nodeType === Node.COMMENT_NODE) return "\x3c!--".concat(e.nodeValue, "--\x3e");
  222. if (e.nodeType === Node.TEXT_NODE) return t ? e.textContent.replace(/&/g, "&amp;").replace(/</g, "&lt;").replace(/>/g, "&gt;") : e.textContent.replace(/&/g, "&amp;").replace(/</g, "&lt;").replace(/>/g, "&gt;").replace(/\u00A0/g, "&nbsp;").replace(/\u0009/g, "");
  223. if (e.nodeType !== Node.ELEMENT_NODE) return e.outerHTML;
  224. if (e.nodeType === Node.ELEMENT_NODE && 0 <= ["STYLE", "SCRIPT", "NOSCRIPT"].indexOf(e.tagName)) return e.outerHTML;
  225. if (e.nodeType === Node.ELEMENT_NODE && "svg" === e.tagName) {
  226. var n = document.createElement("div"),
  227. r = e.cloneNode(!0);
  228. return n.appendChild(r), n.innerHTML
  229. }
  230. if ("IFRAME" === e.tagName) return e.outerHTML.replace(/&lt;/g, "<").replace(/&gt;/g, ">");
  231. var a = e.childNodes;
  232. if (0 === a.length) return e.outerHTML;
  233. for (var o = "", i = 0; i < a.length; i++) "PRE" === e.tagName && (t = !0), o += s(a[i], t);
  234. return f.node.openTagString(e) + o + f.node.closeTagString(e)
  235. }
  236. var l = [];
  237. function m(e) {
  238. var t = e.replace(/;;/gi, ";");
  239. return ";" !== (t = t.replace(/^;/gi, "")).charAt(t.length) && (t += ";"), t
  240. }
  241. function c(e) {
  242. var t;
  243. for (t in e)
  244. if (Object.prototype.hasOwnProperty.call(e, t)) {
  245. var n = t.match(u),
  246. r = null;
  247. "style" === t && f.opts.htmlAllowedStyleProps.length && (r = e[t].match(h)), n && r ? e[t] = m(r.join(";")) : n && ("style" !== t || r) || delete e[t]
  248. }
  249. for (var a = "", o = Object.keys(e).sort(), i = 0; i < o.length; i++) e[t = o[i]].indexOf('"') < 0 ? a += " ".concat(t, '="').concat(e[t], '"') : a += " ".concat(t, "='").concat(e[t], "'");
  250. return a
  251. }
  252. function v(e, t) {
  253. var n, r = document.implementation.createHTMLDocument("Froala DOC").createElement("DIV");
  254. g(r).append(e);
  255. var a = "";
  256. if (r) {
  257. var o = f.node.contents(r);
  258. for (n = 0; n < o.length; n++) t(o[n]);
  259. for (o = f.node.contents(r), n = 0; n < o.length; n++) a += s(o[n])
  260. }
  261. return a
  262. }
  263. function b(e, t, n) {
  264. var r = e = function o(e) {
  265. return l = [], e = (e = (e = (e = e.replace(/<script\b[^<]*(?:(?!<\/script>)<[^<]*)*<\/script>/gi, function(e) {
  266. return l.push(e), "[FROALA.EDITOR.SCRIPT ".concat(l.length - 1, "]")
  267. })).replace(/<noscript\b[^<]*(?:(?!<\/noscript>)<[^<]*)*<\/noscript>/gi, function(e) {
  268. return l.push(e), "[FROALA.EDITOR.NOSCRIPT ".concat(l.length - 1, "]")
  269. })).replace(/<meta((?:[\w\W]*?)) http-equiv="/g, '<meta$1 data-fr-http-equiv="')).replace(/<img((?:[\w\W]*?)) src="/g, '<img$1 data-fr-src="')
  270. }(e),
  271. a = null;
  272. return f.opts.fullPage && (r = f.html.extractNode(e, "body") || (0 <= e.indexOf("<body") ? "" : e), n && (a = f.html.extractNode(e, "head") || "")), r = v(r, t), a && (a = v(a, t)),
  273. function i(e) {
  274. return e = (e = (e = e.replace(/\[FROALA\.EDITOR\.SCRIPT ([\d]*)\]/gi, function(e, t) {
  275. return 0 <= f.opts.htmlRemoveTags.indexOf("script") ? "" : l[parseInt(t, 10)]
  276. })).replace(/\[FROALA\.EDITOR\.NOSCRIPT ([\d]*)\]/gi, function(e, t) {
  277. return 0 <= f.opts.htmlRemoveTags.indexOf("noscript") ? "" : l[parseInt(t, 10)].replace(/&lt;/g, "<").replace(/&gt;/g, ">")
  278. })).replace(/<img((?:[\w\W]*?)) data-fr-src="/g, '<img$1 src="')
  279. }(function s(e, t, n) {
  280. if (f.opts.fullPage) {
  281. var r = f.html.extractDoctype(n),
  282. a = c(f.html.extractNodeAttrs(n, "html"));
  283. t = null === t ? f.html.extractNode(n, "head") || "<title></title>" : t;
  284. var o = c(f.html.extractNodeAttrs(n, "head")),
  285. i = c(f.html.extractNodeAttrs(n, "body"));
  286. return "".concat(r, "<html").concat(a, "><head").concat(o, ">").concat(t, "</head><body").concat(i, ">").concat(e, "</body></html>")
  287. }
  288. return e
  289. }(r, a, e))
  290. }
  291. function E(e) {
  292. var t = f.doc.createElement("DIV");
  293. return t.innerText = e, t.textContent
  294. }
  295. function T(e) {
  296. for (var t = f.node.contents(e), n = 0; n < t.length; n++) t[n].nodeType !== Node.TEXT_NODE && T(t[n]);
  297. ! function c(e) {
  298. if ("SPAN" === e.tagName && 0 <= (e.getAttribute("class") || "").indexOf("fr-marker")) return !1;
  299. if ("PRE" === e.tagName && function l(e) {
  300. var t = e.innerHTML;
  301. 0 <= t.indexOf("\n") && (e.innerHTML = t.replace(/\n/g, "<br>"))
  302. }(e), e.nodeType === Node.ELEMENT_NODE && (e.getAttribute("data-fr-src") && 0 !== e.getAttribute("data-fr-src").indexOf("blob:") && e.setAttribute("data-fr-src", f.helpers.sanitizeURL(E(e.getAttribute("data-fr-src")))), e.getAttribute("href") && e.setAttribute("href", f.helpers.sanitizeURL(E(e.getAttribute("href")))), e.getAttribute("src") && e.setAttribute("src", f.helpers.sanitizeURL(E(e.getAttribute("src")))), 0 <= ["TABLE", "TBODY", "TFOOT", "TR"].indexOf(e.tagName) && (e.innerHTML = e.innerHTML.trim())), !f.opts.pasteAllowLocalImages && e.nodeType === Node.ELEMENT_NODE && "IMG" === e.tagName && e.getAttribute("data-fr-src") && 0 === e.getAttribute("data-fr-src").indexOf("file://")) return e.parentNode.removeChild(e), !1;
  303. if (e.nodeType === Node.ELEMENT_NODE && $e.HTML5Map[e.tagName] && "" === f.node.attributes(e)) {
  304. var t = $e.HTML5Map[e.tagName],
  305. n = "<".concat(t, ">").concat(e.innerHTML, "</").concat(t, ">");
  306. e.insertAdjacentHTML("beforebegin", n), (e = e.previousSibling).parentNode.removeChild(e.nextSibling)
  307. }
  308. if (f.opts.htmlAllowComments || e.nodeType !== Node.COMMENT_NODE)
  309. if (e.tagName && e.tagName.match(p)) e.parentNode.removeChild(e);
  310. else if (e.tagName && !e.tagName.match(d)) "svg" === e.tagName ? e.parentNode.removeChild(e) : f.browser.safari && "path" === e.tagName && e.parentNode && "svg" === e.parentNode.tagName || (e.outerHTML = e.innerHTML);
  311. else {
  312. var r = e.attributes;
  313. if (r)
  314. for (var a = r.length - 1; 0 <= a; a--) {
  315. var o = r[a],
  316. i = o.nodeName.match(u),
  317. s = null;
  318. "style" === o.nodeName && f.opts.htmlAllowedStyleProps.length && (s = o.value.match(h)), i && s ? o.value = m(s.join(";")) : i && ("style" !== o.nodeName || s) || e.removeAttribute(o.nodeName)
  319. }
  320. } else 0 !== e.data.indexOf("[FROALA.EDITOR") && e.parentNode.removeChild(e)
  321. }(e)
  322. }
  323. return {
  324. _init: function e() {
  325. f.opts.fullPage && g.merge(f.opts.htmlAllowedTags, ["head", "title", "style", "link", "base", "body", "html", "meta"])
  326. },
  327. html: function A(e, t, n, r) {
  328. void 0 === t && (t = []), void 0 === n && (n = []), void 0 === r && (r = !1);
  329. var a, o = g.merge([], f.opts.htmlAllowedTags);
  330. for (a = 0; a < t.length; a++) 0 <= o.indexOf(t[a]) && o.splice(o.indexOf(t[a]), 1);
  331. var i = g.merge([], f.opts.htmlAllowedAttrs);
  332. for (a = 0; a < n.length; a++) 0 <= i.indexOf(n[a]) && i.splice(i.indexOf(n[a]), 1);
  333. return i.push("data-fr-.*"), i.push("fr-.*"), d = new RegExp("^".concat(o.join("$|^"), "$"), "gi"), u = new RegExp("^".concat(i.join("$|^"), "$"), "gi"), p = new RegExp("^".concat(f.opts.htmlRemoveTags.join("$|^"), "$"), "gi"), h = f.opts.htmlAllowedStyleProps.length ? new RegExp("((^|;|\\s)".concat(f.opts.htmlAllowedStyleProps.join(":.+?(?=;|$))|((^|;|\\s)"), ":.+?(?=(;)|$))"), "gi") : null, e = b(e, T, !0)
  334. },
  335. toHTML5: function r() {
  336. var e = f.el.querySelectorAll(Object.keys($e.HTML5Map).join(","));
  337. if (e.length) {
  338. var t = !1;
  339. f.el.querySelector(".fr-marker") || (f.selection.save(), t = !0);
  340. for (var n = 0; n < e.length; n++) "" === f.node.attributes(e[n]) && g(e[n]).replaceWith("<".concat($e.HTML5Map[e[n].tagName], ">").concat(e[n].innerHTML, "</").concat($e.HTML5Map[e[n].tagName], ">"));
  341. t && f.selection.restore()
  342. }
  343. },
  344. tables: function t() {
  345. ! function s() {
  346. for (var e = f.el.querySelectorAll("tr"), t = 0; t < e.length; t++) {
  347. for (var n = e[t].children, r = !0, a = 0; a < n.length; a++)
  348. if ("TH" !== n[a].tagName) {
  349. r = !1;
  350. break
  351. }
  352. if (!1 !== r && 0 !== n.length) {
  353. for (var o = e[t]; o && "TABLE" !== o.tagName && "THEAD" !== o.tagName;) o = o.parentNode;
  354. var i = o;
  355. "THEAD" !== i.tagName && (i = f.doc.createElement("THEAD"), o.insertBefore(i, o.firstChild)), i.appendChild(e[t])
  356. }
  357. }
  358. }()
  359. },
  360. lists: function C() {
  361. ! function s() {
  362. var e, t = [];
  363. do {
  364. if (t.length) {
  365. var n = t[0],
  366. r = f.doc.createElement("ul");
  367. n.parentNode.insertBefore(r, n);
  368. do {
  369. var a = n;
  370. n = n.nextSibling, r.appendChild(a)
  371. } while (n && "LI" === n.tagName)
  372. }
  373. t = [];
  374. for (var o = f.el.querySelectorAll("li"), i = 0; i < o.length; i++) e = o[i], f.node.isList(e.parentNode) || t.push(o[i])
  375. } while (0 < t.length)
  376. }(),
  377. function o() {
  378. for (var e = f.el.querySelectorAll("ol + ol, ul + ul"), t = 0; t < e.length; t++) {
  379. var n = e[t];
  380. if (f.node.isList(n.previousSibling) && f.node.openTagString(n) === f.node.openTagString(n.previousSibling)) {
  381. for (var r = f.node.contents(n), a = 0; a < r.length; a++) n.previousSibling.appendChild(r[a]);
  382. n.parentNode.removeChild(n)
  383. }
  384. }
  385. }(),
  386. function i() {
  387. for (var e = f.el.querySelectorAll("ul, ol"), t = 0; t < e.length; t++)
  388. for (var n = f.node.contents(e[t]), r = null, a = n.length - 1; 0 <= a; a--) "LI" !== n[a].tagName && "UL" != n[a].tagName && "OL" != n[a].tagName ? (r || (r = g(f.doc.createElement("LI"))).insertBefore(n[a]), r.prepend(n[a])) : r = null
  389. }(),
  390. function l() {
  391. var e, t, n;
  392. do {
  393. t = !1;
  394. var r = f.el.querySelectorAll("li:empty");
  395. for (e = 0; e < r.length; e++) r[e].parentNode.removeChild(r[e]);
  396. var a = f.el.querySelectorAll("ul, ol");
  397. for (e = 0; e < a.length; e++)(n = a[e]).querySelector("LI") || (t = !0, n.parentNode.removeChild(n))
  398. } while (!0 === t)
  399. }(),
  400. function a() {
  401. for (var e = f.el.querySelectorAll("ul > ul, ol > ol, ul > ol, ol > ul"), t = 0; t < e.length; t++) {
  402. var n = e[t],
  403. r = n.previousSibling;
  404. r && ("LI" === r.tagName ? r.appendChild(n) : g(n).wrap("<li></li>"))
  405. }
  406. }(),
  407. function c() {
  408. for (var e = f.el.querySelectorAll("li > ul, li > ol"), t = 0; t < e.length; t++) {
  409. var n = e[t];
  410. if (n.nextSibling) {
  411. var r = n.nextSibling,
  412. a = g(f.doc.createElement("LI"));
  413. g(n.parentNode).after(a.get(0));
  414. do {
  415. var o = r;
  416. r = r.nextSibling, a.append(o)
  417. } while (r)
  418. }
  419. }
  420. }(),
  421. function d() {
  422. for (var e = f.el.querySelectorAll("li > ul, li > ol"), t = 0; t < e.length; t++) {
  423. var n = e[t];
  424. if (f.node.isFirstSibling(n)) g(n).before("<br/>");
  425. else if (n.previousSibling && "BR" === n.previousSibling.tagName) {
  426. for (var r = n.previousSibling.previousSibling; r && f.node.hasClass(r, "fr-marker");) r = r.previousSibling;
  427. r && "BR" !== r.tagName && g(n.previousSibling).remove()
  428. }
  429. }
  430. }(),
  431. function n() {
  432. for (var e = f.el.querySelectorAll("li:empty"), t = 0; t < e.length; t++) g(e[t]).remove()
  433. }()
  434. },
  435. invisibleSpaces: function n(e) {
  436. return e.replace(/\u200b/g, "").length === e.length ? e : f.clean.exec(e, a)
  437. },
  438. exec: b
  439. }
  440. }, $e.XS = 0, $e.SM = 1, $e.MD = 2, $e.LG = 3;
  441. $e.LinkRegExCommon = "[".concat("a-z\\u0080-\\u009f\\u00a1-\\uffff0-9-_\\.", "]{1,}"), $e.LinkRegExEnd = "((:[0-9]{1,5})|)(((\\/|\\?|#)[a-z\\u00a1-\\uffff0-9@?\\|!^=%&amp;\\/~+#-\\'*-_{}]*)|())", $e.LinkRegExTLD = "((".concat($e.LinkRegExCommon, ")(\\.(com|net|org|edu|mil|gov|co|biz|info|me|dev)))"), $e.LinkRegExHTTP = "((ftp|http|https):\\/\\/".concat($e.LinkRegExCommon, ")"), $e.LinkRegExAuth = "((ftp|http|https):\\/\\/[\\u0021-\\uffff]{1,}@".concat($e.LinkRegExCommon, ")"), $e.LinkRegExWWW = "(www\\.".concat($e.LinkRegExCommon, "\\.[a-z0-9-]{2,24})"), $e.LinkRegEx = "(".concat($e.LinkRegExTLD, "|").concat($e.LinkRegExHTTP, "|").concat($e.LinkRegExWWW, "|").concat($e.LinkRegExAuth, ")").concat($e.LinkRegExEnd), $e.LinkProtocols = ["mailto", "tel", "sms", "notes", "data"], $e.MAIL_REGEX = /.+@.+\..+/i, $e.MODULES.helpers = function(o) {
  442. var i, s = o.$;
  443. function e() {
  444. var e = {},
  445. t = function o() {
  446. var e, t = -1;
  447. return "Microsoft Internet Explorer" === navigator.appName ? (e = navigator.userAgent, null !== new RegExp("MSIE ([0-9]{1,}[\\.0-9]{0,})").exec(e) && (t = parseFloat(RegExp.$1))) : "Netscape" === navigator.appName && (e = navigator.userAgent, null !== new RegExp("Trident/.*rv:([0-9]{1,}[\\.0-9]{0,})").exec(e) && (t = parseFloat(RegExp.$1))), t
  448. }();
  449. if (0 < t) e.msie = !0;
  450. else {
  451. var n = navigator.userAgent.toLowerCase(),
  452. r = /(edge)[ /]([\w.]+)/.exec(n) || /(chrome)[ /]([\w.]+)/.exec(n) || /(webkit)[ /]([\w.]+)/.exec(n) || /(opera)(?:.*version|)[ /]([\w.]+)/.exec(n) || /(msie) ([\w.]+)/.exec(n) || n.indexOf("compatible") < 0 && /(mozilla)(?:.*? rv:([\w.]+)|)/.exec(n) || [],
  453. a = r[1] || "";
  454. r[2];
  455. r[1] && (e[a] = !0), e.chrome ? e.webkit = !0 : e.webkit && (e.safari = !0)
  456. }
  457. return e.msie && (e.version = t), e
  458. }
  459. function t() {
  460. return /(iPad|iPhone|iPod)/g.test(navigator.userAgent) && !a()
  461. }
  462. function n() {
  463. return /(Android)/g.test(navigator.userAgent) && !a()
  464. }
  465. function r() {
  466. return /(Blackberry)/g.test(navigator.userAgent)
  467. }
  468. function a() {
  469. return /(Windows Phone)/gi.test(navigator.userAgent)
  470. }
  471. function l(e) {
  472. return parseInt(e, 10) || 0
  473. }
  474. var c = null;
  475. return {
  476. _init: function d() {
  477. o.browser = e()
  478. },
  479. isIOS: t,
  480. isMac: function f() {
  481. return null === c && (c = 0 <= navigator.platform.toUpperCase().indexOf("MAC")), c
  482. },
  483. isAndroid: n,
  484. isBlackberry: r,
  485. isWindowsPhone: a,
  486. isMobile: function p() {
  487. return n() || t() || r()
  488. },
  489. isEmail: function u(e) {
  490. return !/^(https?:|ftps?:|)\/\//i.test(e) && $e.MAIL_REGEX.test(e)
  491. },
  492. requestAnimationFrame: function h() {
  493. return window.requestAnimationFrame || window.webkitRequestAnimationFrame || window.mozRequestAnimationFrame || function(e) {
  494. window.setTimeout(e, 1e3 / 60)
  495. }
  496. },
  497. getPX: l,
  498. screenSize: function g() {
  499. var e = s(o.doc.createElement("DIV"));
  500. e.addClass("fr-visibility-helper"), s("body").first().append(e);
  501. try {
  502. var t = l(e.css("margin-left"));
  503. return e.remove(), t
  504. } catch (n) {
  505. return $e.LG
  506. }
  507. },
  508. isTouch: function m() {
  509. return "ontouchstart" in window || window.DocumentTouch && document instanceof window.DocumentTouch
  510. },
  511. sanitizeURL: function v(e) {
  512. return /^(https?:|ftps?:|)\/\//i.test(e) ? e : /^([A-Za-z]:(\\){1,2}|[A-Za-z]:((\\){1,2}[^\\]+)+)(\\)?$/i.test(e) ? e : new RegExp("^(".concat($e.LinkProtocols.join("|"), "):\\/\\/"), "i").test(e) ? e : e = encodeURIComponent(e).replace(/%23/g, "#").replace(/%2F/g, "/").replace(/%25/g, "%").replace(/mailto%3A/gi, "mailto:").replace(/file%3A/gi, "file:").replace(/sms%3A/gi, "sms:").replace(/tel%3A/gi, "tel:").replace(/notes%3A/gi, "notes:").replace(/data%3Aimage/gi, "data:image").replace(/blob%3A/gi, "blob:").replace(/%3A(\d)/gi, ":$1").replace(/webkit-fake-url%3A/gi, "webkit-fake-url:").replace(/%3F/g, "?").replace(/%3D/g, "=").replace(/%26/g, "&").replace(/&amp;/g, "&").replace(/%2C/g, ",").replace(/%3B/g, ";").replace(/%2B/g, "+").replace(/%40/g, "@").replace(/%5B/g, "[").replace(/%5D/g, "]").replace(/%7B/g, "{").replace(/%7D/g, "}")
  513. },
  514. isArray: function b(e) {
  515. return e && !Object.prototype.propertyIsEnumerable.call(e, "length") && "object" === Fe(e) && "number" == typeof e.length
  516. },
  517. RGBToHex: function E(e) {
  518. function t(e) {
  519. return "0".concat(parseInt(e, 10).toString(16)).slice(-2)
  520. }
  521. try {
  522. return e && "transparent" !== e ? /^#[0-9A-F]{6}$/i.test(e) ? e : (e = e.match(/^rgb\((\d+),\s*(\d+),\s*(\d+)\)$/), "#".concat(t(e[1])).concat(t(e[2])).concat(t(e[3])).toUpperCase()) : ""
  523. } catch (n) {
  524. return null
  525. }
  526. },
  527. HEXtoRGB: function T(e) {
  528. e = e.replace(/^#?([a-f\d])([a-f\d])([a-f\d])$/i, function(e, t, n, r) {
  529. return t + t + n + n + r + r
  530. });
  531. var t = /^#?([a-f\d]{2})([a-f\d]{2})([a-f\d]{2})$/i.exec(e);
  532. return t ? "rgb(".concat(parseInt(t[1], 16), ", ").concat(parseInt(t[2], 16), ", ").concat(parseInt(t[3], 16), ")") : ""
  533. },
  534. isURL: function A(e) {
  535. return !!/^(https?:|ftps?:|)\/\//i.test(e) && (e = String(e).replace(/</g, "%3C").replace(/>/g, "%3E").replace(/"/g, "%22").replace(/ /g, "%20"), new RegExp("^".concat($e.LinkRegExHTTP).concat($e.LinkRegExEnd, "$"), "gi").test(e))
  536. },
  537. getAlignment: function C(e) {
  538. e.css || (e = s(e));
  539. var t = (e.css("text-align") || "").replace(/-(.*)-/g, "");
  540. if (["left", "right", "justify", "center"].indexOf(t) < 0) {
  541. if (!i) {
  542. var n = s('<div dir="'.concat("rtl" === o.opts.direction ? "rtl" : "auto", '" style="text-align: ').concat(o.$el.css("text-align"), '; position: fixed; left: -3000px;"><span id="s1">.</span><span id="s2">.</span></div>'));
  543. s("body").first().append(n);
  544. var r = n.find("#s1").get(0).getBoundingClientRect().left,
  545. a = n.find("#s2").get(0).getBoundingClientRect().left;
  546. n.remove(), i = r < a ? "left" : "right"
  547. }
  548. t = i
  549. }
  550. return t
  551. },
  552. scrollTop: function S() {
  553. return o.o_win.pageYOffset ? o.o_win.pageYOffset : o.o_doc.documentElement && o.o_doc.documentElement.scrollTop ? o.o_doc.documentElement.scrollTop : o.o_doc.body.scrollTop ? o.o_doc.body.scrollTop : 0
  554. },
  555. scrollLeft: function y() {
  556. return o.o_win.pageXOffset ? o.o_win.pageXOffset : o.o_doc.documentElement && o.o_doc.documentElement.scrollLeft ? o.o_doc.documentElement.scrollLeft : o.o_doc.body.scrollLeft ? o.o_doc.body.scrollLeft : 0
  557. },
  558. isInViewPort: function R(e) {
  559. var t = e.getBoundingClientRect();
  560. return 0 <= (t = {
  561. top: Math.round(t.top),
  562. bottom: Math.round(t.bottom)
  563. }).top && t.bottom <= (window.innerHeight || document.documentElement.clientHeight) || t.top <= 0 && t.bottom >= (window.innerHeight || document.documentElement.clientHeight)
  564. }
  565. }
  566. }, $e.MODULES.events = function(l) {
  567. var e, o = l.$,
  568. i = {};
  569. function s(e, t, n) {
  570. m(e, t, n)
  571. }
  572. function c(e) {
  573. if (void 0 === e && (e = !0), !l.$wp) return !1;
  574. if (l.helpers.isIOS() && l.$win.get(0).focus(), l.core.hasFocus()) return !1;
  575. if (!l.core.hasFocus() && e) {
  576. var t = l.$win.scrollTop();
  577. if (l.browser.msie && l.$box && l.$box.css("position", "fixed"), l.browser.msie && l.$wp && l.$wp.css("overflow", "visible"), l.browser.msie && l.$sc && l.$sc.css("position", "fixed"), p(), l.el.focus(), l.events.trigger("focus"), f(), l.browser.msie && l.$sc && l.$sc.css("position", ""), l.browser.msie && l.$box && l.$box.css("position", ""), l.browser.msie && l.$wp && l.$wp.css("overflow", "auto"), t !== l.$win.scrollTop() && l.$win.scrollTop(t), !l.selection.info(l.el).atStart) return !1
  578. }
  579. if (!l.core.hasFocus() || 0 < l.$el.find(".fr-marker").length) return !1;
  580. if (l.selection.info(l.el).atStart && l.selection.isCollapsed() && null !== l.html.defaultTag()) {
  581. var n = l.markers.insert();
  582. if (n && !l.node.blockParent(n)) {
  583. o(n).remove();
  584. var r = l.$el.find(l.html.blockTagsQuery()).get(0);
  585. r && (o(r).prepend($e.MARKERS), l.selection.restore())
  586. } else n && o(n).remove()
  587. }
  588. }
  589. var d = !1;
  590. function f() {
  591. e = !0
  592. }
  593. function p() {
  594. e = !1
  595. }
  596. function u() {
  597. return e
  598. }
  599. function h(e, t, n) {
  600. var r, a = e.split(" ");
  601. if (1 < a.length) {
  602. for (var o = 0; o < a.length; o++) h(a[o], t, n);
  603. return !0
  604. }
  605. void 0 === n && (n = !1), r = 0 !== e.indexOf("shared.") ? (i[e] = i[e] || [], i[e]) : (l.shared._events[e] = l.shared._events[e] || [], l.shared._events[e]), n ? r.unshift(t) : r.push(t)
  606. }
  607. var g = [];
  608. function m(e, t, n, r, a) {
  609. "function" == typeof n && (a = r, r = n, n = !1);
  610. var o = a ? l.shared.$_events : g,
  611. i = a ? l.sid : l.id,
  612. s = "".concat(t.trim().split(" ").join(".ed".concat(i, " ")), ".ed").concat(i);
  613. n ? e.on(s, n, r) : e.on(s, r), o.push([e, s])
  614. }
  615. function t(e) {
  616. for (var t = 0; t < e.length; t++) e[t][0].off(e[t][1])
  617. }
  618. function v(e, t, n) {
  619. if (!l.edit.isDisabled() || n) {
  620. var r, a;
  621. if (0 !== e.indexOf("shared.")) r = i[e];
  622. else {
  623. if (0 < l.shared.count) return !1;
  624. r = l.shared._events[e]
  625. } if (r)
  626. for (var o = 0; o < r.length; o++)
  627. if (!1 === (a = r[o].apply(l, t))) return !1;
  628. return (!l.opts.events || !l.opts.events[e] || !1 !== (a = l.opts.events[e].apply(l, t))) && a
  629. }
  630. }
  631. function b() {
  632. for (var e in i) Object.prototype.hasOwnProperty.call(i, e) && delete i[e]
  633. }
  634. function E() {
  635. for (var e in l.shared._events) Object.prototype.hasOwnProperty.call(l.shared._events, e) && delete l.shared._events[e]
  636. }
  637. return {
  638. _init: function T() {
  639. l.shared.$_events = l.shared.$_events || [], l.shared._events = {},
  640. function e() {
  641. l.helpers.isMobile() ? (l._mousedown = "touchstart", l._mouseup = "touchend", l._move = "touchmove", l._mousemove = "touchmove") : (l._mousedown = "mousedown", l._mouseup = "mouseup", l._move = "", l._mousemove = "mousemove")
  642. }(),
  643. function t() {
  644. s(l.$el, "click mouseup mousedown touchstart touchend dragenter dragover dragleave dragend drop dragstart", function(e) {
  645. v(e.type, [e])
  646. }), h("mousedown", function() {
  647. for (var e = 0; e < $e.INSTANCES.length; e++) $e.INSTANCES[e] !== l && $e.INSTANCES[e].popups && $e.INSTANCES[e].popups.areVisible() && $e.INSTANCES[e].$el.find(".fr-marker").remove()
  648. })
  649. }(),
  650. function n() {
  651. s(l.$win, l._mousedown, function(e) {
  652. v("window.mousedown", [e]), f()
  653. }), s(l.$win, l._mouseup, function(e) {
  654. v("window.mouseup", [e])
  655. }), s(l.$win, "cut copy keydown keyup touchmove touchend", function(e) {
  656. v("window.".concat(e.type), [e])
  657. })
  658. }(),
  659. function r() {
  660. s(l.$doc, "dragend drop", function(e) {
  661. v("document.".concat(e.type), [e])
  662. })
  663. }(),
  664. function a() {
  665. s(l.$el, "keydown keypress keyup input", function(e) {
  666. v(e.type, [e])
  667. })
  668. }(),
  669. function o() {
  670. s(l.$el, "focus", function(e) {
  671. u() && (c(!1), !1 === d && v(e.type, [e]))
  672. }), s(l.$el, "blur", function(e) {
  673. u() && !0 === d && (v(e.type, [e]), f())
  674. }), m(l.$el, "mousedown", '[contenteditable="true"]', function() {
  675. p(), l.$el.blur()
  676. }), h("focus", function() {
  677. d = !0
  678. }), h("blur", function() {
  679. d = !1
  680. })
  681. }(), f(),
  682. function i() {
  683. s(l.$el, "cut copy paste beforepaste", function(e) {
  684. v(e.type, [e])
  685. })
  686. }(), h("destroy", b), h("shared.destroy", E)
  687. },
  688. on: h,
  689. trigger: v,
  690. bindClick: function r(e, t, n) {
  691. m(e, l._mousedown, t, function(e) {
  692. l.edit.isDisabled() || function n(e) {
  693. var t = o(e.currentTarget);
  694. return l.edit.isDisabled() || l.node.hasClass(t.get(0), "fr-disabled") ? (e.preventDefault(), !1) : "mousedown" === e.type && 1 !== e.which || (l.helpers.isMobile() || e.preventDefault(), (l.helpers.isAndroid() || l.helpers.isWindowsPhone()) && 0 === t.parents(".fr-dropdown-menu").length && (e.preventDefault(), e.stopPropagation()), t.addClass("fr-selected"), void l.events.trigger("commands.mousedown", [t]))
  695. }(e)
  696. }, !0), m(e, "".concat(l._mouseup, " ").concat(l._move), t, function(e) {
  697. l.edit.isDisabled() || function a(e, t) {
  698. var n = o(e.currentTarget);
  699. if (l.edit.isDisabled() || l.node.hasClass(n.get(0), "fr-disabled")) return e.preventDefault(), !1;
  700. if ("mouseup" === e.type && 1 !== e.which) return !0;
  701. if (!l.node.hasClass(n.get(0), "fr-selected")) return !0;
  702. if ("touchmove" !== e.type) {
  703. if (e.stopPropagation(), e.stopImmediatePropagation(), e.preventDefault(), !l.node.hasClass(n.get(0), "fr-selected")) return l.button.getButtons(".fr-selected", !0).removeClass("fr-selected"), !1;
  704. if (l.button.getButtons(".fr-selected", !0).removeClass("fr-selected"), n.data("dragging") || n.attr("disabled")) return n.removeData("dragging"), !1;
  705. var r = n.data("timeout");
  706. r && (clearTimeout(r), n.removeData("timeout")), t.apply(l, [e])
  707. } else n.data("timeout") || n.data("timeout", setTimeout(function() {
  708. n.data("dragging", !0)
  709. }, 100))
  710. }(e, n)
  711. }, !0), m(e, "mousedown click mouseup", t, function(e) {
  712. l.edit.isDisabled() || e.stopPropagation()
  713. }, !0), h("window.mouseup", function() {
  714. l.edit.isDisabled() || (e.find(t).removeClass("fr-selected"), f())
  715. }), m(e, "mouseover", t, function() {
  716. o(this).hasClass("fr-options") && o(this).prev(".fr-btn").addClass("fr-btn-hover"), o(this).next(".fr-btn").hasClass("fr-options") && o(this).next(".fr-btn").addClass("fr-btn-hover")
  717. }), m(e, "mouseout", t, function() {
  718. o(this).hasClass("fr-options") && o(this).prev(".fr-btn").removeClass("fr-btn-hover"), o(this).next(".fr-btn").hasClass("fr-options") && o(this).next(".fr-btn").removeClass("fr-btn-hover")
  719. })
  720. },
  721. disableBlur: p,
  722. enableBlur: f,
  723. blurActive: u,
  724. focus: c,
  725. chainTrigger: function A(e, t, n) {
  726. if (!l.edit.isDisabled() || n) {
  727. var r, a;
  728. if (0 !== e.indexOf("shared.")) r = i[e];
  729. else {
  730. if (0 < l.shared.count) return !1;
  731. r = l.shared._events[e]
  732. } if (r)
  733. for (var o = 0; o < r.length; o++) void 0 !== (a = r[o].apply(l, [t])) && (t = a);
  734. return l.opts.events && l.opts.events[e] && void 0 !== (a = l.opts.events[e].apply(l, [t])) && (t = a), t
  735. }
  736. },
  737. $on: m,
  738. $off: function n() {
  739. t(g), g = [], 0 === l.shared.count && (t(l.shared.$_events), l.shared.$_events = [])
  740. }
  741. }
  742. }, Object.assign($e.DEFAULTS, {
  743. indentMargin: 20
  744. }), $e.COMMANDS = {
  745. bold: {
  746. title: "Bold",
  747. toggle: !0,
  748. refresh: function(e) {
  749. var t = this.format.is("strong");
  750. e.toggleClass("fr-active", t).attr("aria-pressed", t)
  751. }
  752. },
  753. italic: {
  754. title: "Italic",
  755. toggle: !0,
  756. refresh: function(e) {
  757. var t = this.format.is("em");
  758. e.toggleClass("fr-active", t).attr("aria-pressed", t)
  759. }
  760. },
  761. underline: {
  762. title: "Underline",
  763. toggle: !0,
  764. refresh: function(e) {
  765. var t = this.format.is("u");
  766. e.toggleClass("fr-active", t).attr("aria-pressed", t)
  767. }
  768. },
  769. strikeThrough: {
  770. title: "Strikethrough",
  771. toggle: !0,
  772. refresh: function(e) {
  773. var t = this.format.is("s");
  774. e.toggleClass("fr-active", t).attr("aria-pressed", t)
  775. }
  776. },
  777. subscript: {
  778. title: "Subscript",
  779. toggle: !0,
  780. refresh: function(e) {
  781. var t = this.format.is("sub");
  782. e.toggleClass("fr-active", t).attr("aria-pressed", t)
  783. }
  784. },
  785. superscript: {
  786. title: "Superscript",
  787. toggle: !0,
  788. refresh: function(e) {
  789. var t = this.format.is("sup");
  790. e.toggleClass("fr-active", t).attr("aria-pressed", t)
  791. }
  792. },
  793. outdent: {
  794. title: "Decrease Indent"
  795. },
  796. indent: {
  797. title: "Increase Indent"
  798. },
  799. undo: {
  800. title: "Undo",
  801. undo: !1,
  802. forcedRefresh: !0,
  803. disabled: !0
  804. },
  805. redo: {
  806. title: "Redo",
  807. undo: !1,
  808. forcedRefresh: !0,
  809. disabled: !0
  810. },
  811. insertHR: {
  812. title: "Insert Horizontal Line"
  813. },
  814. clearFormatting: {
  815. title: "Clear Formatting"
  816. },
  817. selectAll: {
  818. title: "Select All",
  819. undo: !1
  820. },
  821. moreText: {
  822. title: "More Text",
  823. undo: !1
  824. },
  825. moreParagraph: {
  826. title: "More Paragraph",
  827. undo: !1
  828. },
  829. moreRich: {
  830. title: "More Rich",
  831. undo: !1
  832. },
  833. moreMisc: {
  834. title: "More Misc",
  835. undo: !1
  836. }
  837. }, $e.RegisterCommand = function(e, t) {
  838. $e.COMMANDS[e] = t
  839. }, $e.MODULES.commands = function(i) {
  840. var s = i.$;
  841. function a(e) {
  842. return i.html.defaultTag() && (e = "<".concat(i.html.defaultTag(), ">").concat(e, "</").concat(i.html.defaultTag(), ">")), e
  843. }
  844. var o = {
  845. bold: function() {
  846. e("bold", "strong")
  847. },
  848. subscript: function() {
  849. i.format.is("sup") && i.format.remove("sup"), e("subscript", "sub")
  850. },
  851. superscript: function() {
  852. i.format.is("sub") && i.format.remove("sub"), e("superscript", "sup")
  853. },
  854. italic: function() {
  855. e("italic", "em")
  856. },
  857. strikeThrough: function() {
  858. e("strikeThrough", "s")
  859. },
  860. underline: function() {
  861. e("underline", "u")
  862. },
  863. undo: function() {
  864. i.undo.run()
  865. },
  866. redo: function() {
  867. i.undo.redo()
  868. },
  869. indent: function() {
  870. r(1)
  871. },
  872. outdent: function() {
  873. r(-1)
  874. },
  875. show: function() {
  876. i.opts.toolbarInline && i.toolbar.showInline(null, !0)
  877. },
  878. insertHR: function() {
  879. i.selection.remove();
  880. var e = "";
  881. i.core.isEmpty() && (e = a(e = "<br>")), i.html.insert('<hr id="fr-just">'.concat(e));
  882. var t, n = i.$el.find("hr#fr-just");
  883. if (n.removeAttr("id"), 0 === n.next().length) {
  884. var r = i.html.defaultTag();
  885. r ? n.after(s(i.doc.createElement(r)).append("<br>").get(0)) : n.after("<br>")
  886. }
  887. n.prev().is("hr") ? t = i.selection.setAfter(n.get(0), !1) : n.next().is("hr") ? t = i.selection.setBefore(n.get(0), !1) : i.selection.setAfter(n.get(0), !1) || i.selection.setBefore(n.get(0), !1), t || void 0 === t || (e = a(e = "".concat($e.MARKERS, "<br>")), n.after(e)), i.selection.restore()
  888. },
  889. clearFormatting: function() {
  890. i.format.remove()
  891. },
  892. selectAll: function() {
  893. i.doc.execCommand("selectAll", !1, !1)
  894. },
  895. moreText: function(e) {
  896. t(e)
  897. },
  898. moreParagraph: function(e) {
  899. t(e)
  900. },
  901. moreRich: function(e) {
  902. t(e)
  903. },
  904. moreMisc: function(e) {
  905. t(e)
  906. }
  907. };
  908. function t(e) {
  909. ! function n(e) {
  910. var t = i.$tb.find('.fr-more-toolbar[data-name="'.concat(e.attr("data-group-name"), '"]'));
  911. i.$tb.find(".fr-open").not(e).removeClass("fr-open"), e.toggleClass("fr-open"), i.$tb.find(".fr-more-toolbar").removeClass("fr-overflow-visible"), i.$tb.find(".fr-expanded").not(t).length ? (i.$tb.find(".fr-expanded").toggleClass("fr-expanded"), t.toggleClass("fr-expanded")) : (t.toggleClass("fr-expanded"), i.$box.toggleClass("fr-toolbar-open"), i.$tb.toggleClass("fr-toolbar-open"))
  912. }(i.$tb.find("[data-cmd=".concat(e, "]"))), i.toolbar.setMoreToolbarsHeight()
  913. }
  914. function n(e, t) {
  915. if (!1 !== i.events.trigger("commands.before", s.merge([e], t || []))) {
  916. var n = $e.COMMANDS[e] && $e.COMMANDS[e].callback || o[e],
  917. r = !0,
  918. a = !1;
  919. $e.COMMANDS[e] && ("undefined" != typeof $e.COMMANDS[e].focus && (r = $e.COMMANDS[e].focus), "undefined" != typeof $e.COMMANDS[e].accessibilityFocus && (a = $e.COMMANDS[e].accessibilityFocus)), (!i.core.hasFocus() && r && !i.popups.areVisible() || !i.core.hasFocus() && a && i.accessibility.hasFocus()) && i.events.focus(!0), $e.COMMANDS[e] && !1 !== $e.COMMANDS[e].undo && (i.$el.find(".fr-marker").length && (i.events.disableBlur(), i.selection.restore()), i.undo.saveStep()), n && n.apply(i, s.merge([e], t || [])), i.events.trigger("commands.after", s.merge([e], t || [])), $e.COMMANDS[e] && !1 !== $e.COMMANDS[e].undo && i.undo.saveStep()
  920. }
  921. }
  922. function e(e, t) {
  923. i.format.toggle(t)
  924. }
  925. function r(e) {
  926. i.selection.save(), i.html.wrap(!0, !0, !0, !0), i.selection.restore();
  927. for (var t = i.selection.blocks(), n = 0; n < t.length; n++)
  928. if ("LI" !== t[n].tagName || "LI" !== t[n].parentNode.tagName) {
  929. var r = s(t[n]);
  930. "LI" != t[n].tagName && "LI" == t[n].parentNode.tagName && (r = s(t[n].parentNode));
  931. var a = "rtl" === i.opts.direction || "rtl" === r.css("direction") ? "margin-right" : "margin-left",
  932. o = i.helpers.getPX(r.css(a));
  933. if (r.width() < 2 * i.opts.indentMargin && 0 < e) continue;
  934. r.css(a, Math.max(o + e * i.opts.indentMargin, 0) || ""), r.removeClass("fr-temp-div")
  935. }
  936. i.selection.save(), i.html.unwrap(), i.selection.restore()
  937. }
  938. function l(e) {
  939. return function() {
  940. n(e)
  941. }
  942. }
  943. var c = {};
  944. for (var d in o) Object.prototype.hasOwnProperty.call(o, d) && (c[d] = l(d));
  945. return Object.assign(c, {
  946. exec: n,
  947. _init: function f() {
  948. i.events.on("keydown", function(e) {
  949. var t = i.selection.element();
  950. if (t && "HR" === t.tagName && !i.keys.isArrow(e.which)) return e.preventDefault(), !1
  951. }), i.events.on("keyup", function(e) {
  952. var t = i.selection.element();
  953. if (t && "HR" === t.tagName)
  954. if (e.which === $e.KEYCODE.ARROW_LEFT || e.which === $e.KEYCODE.ARROW_UP) {
  955. if (t.previousSibling) return i.node.isBlock(t.previousSibling) ? i.selection.setAtEnd(t.previousSibling) : s(t).before($e.MARKERS), i.selection.restore(), !1
  956. } else if ((e.which === $e.KEYCODE.ARROW_RIGHT || e.which === $e.KEYCODE.ARROW_DOWN) && t.nextSibling) return i.node.isBlock(t.nextSibling) ? i.selection.setAtStart(t.nextSibling) : s(t).after($e.MARKERS), i.selection.restore(), !1
  957. }), i.events.on("mousedown", function(e) {
  958. if (e.target && "HR" === e.target.tagName) return e.preventDefault(), e.stopPropagation(), !1
  959. }), i.events.on("mouseup", function() {
  960. var e = i.selection.element();
  961. e === i.selection.endElement() && e && "HR" === e.tagName && (e.nextSibling && (i.node.isBlock(e.nextSibling) ? i.selection.setAtStart(e.nextSibling) : s(e).after($e.MARKERS)), i.selection.restore())
  962. })
  963. }
  964. })
  965. }, $e.MODULES.cursorLists = function(g) {
  966. var m = g.$;
  967. function v(e) {
  968. for (var t = e;
  969. "LI" !== t.tagName;) t = t.parentNode;
  970. return t
  971. }
  972. function b(e) {
  973. for (var t = e; !g.node.isList(t);) t = t.parentNode;
  974. return t
  975. }
  976. return {
  977. _startEnter: function E(e) {
  978. var t, n = v(e),
  979. r = n.nextSibling,
  980. a = n.previousSibling,
  981. o = g.html.defaultTag();
  982. if (g.node.isEmpty(n, !0) && r) {
  983. for (var i = "", s = "", l = e.parentNode; !g.node.isList(l) && l.parentNode && ("LI" !== l.parentNode.tagName || l.parentNode === n);) i = g.node.openTagString(l) + i, s += g.node.closeTagString(l), l = l.parentNode;
  984. i = g.node.openTagString(l) + i, s += g.node.closeTagString(l);
  985. var c = "";
  986. for (c = l.parentNode && "LI" === l.parentNode.tagName ? "".concat(s, "<li>").concat($e.MARKERS, "<br>").concat(i) : o ? "".concat(s, "<").concat(o, ">").concat($e.MARKERS, "<br></").concat(o, ">").concat(i) : "".concat(s + $e.MARKERS, "<br>").concat(i);
  987. ["UL", "OL"].indexOf(l.tagName) < 0 || l.parentNode && "LI" === l.parentNode.tagName;) l = l.parentNode;
  988. m(n).replaceWith('<span id="fr-break"></span>');
  989. var d = g.node.openTagString(l) + m(l).html() + g.node.closeTagString(l);
  990. d = d.replace(/<span id="fr-break"><\/span>/g, c), m(l).replaceWith(d), g.$el.find("li:empty").remove()
  991. } else if (a && r || !g.node.isEmpty(n, !0)) {
  992. for (var f = "<br>", p = e.parentNode; p && "LI" !== p.tagName;) f = g.node.openTagString(p) + f + g.node.closeTagString(p), p = p.parentNode;
  993. m(n).before("<li>".concat(f, "</li>")), m(e).remove()
  994. } else if (a) {
  995. t = b(n);
  996. for (var u = "".concat($e.MARKERS, "<br>"), h = e.parentNode; h && "LI" !== h.tagName;) u = g.node.openTagString(h) + u + g.node.closeTagString(h), h = h.parentNode;
  997. t.parentNode && "LI" === t.parentNode.tagName ? m(t.parentNode).after("<li>".concat(u, "</li>")) : o ? m(t).after("<".concat(o, ">").concat(u, "</").concat(o, ">")) : m(t).after(u), m(n).remove()
  998. } else(t = b(n)).parentNode && "LI" === t.parentNode.tagName ? r ? m(t.parentNode).before("".concat(g.node.openTagString(n) + $e.MARKERS, "<br></li>")) : m(t.parentNode).after("".concat(g.node.openTagString(n) + $e.MARKERS, "<br></li>")) : o ? m(t).before("<".concat(o, ">").concat($e.MARKERS, "<br></").concat(o, ">")) : m(t).before("".concat($e.MARKERS, "<br>")), m(n).remove()
  999. },
  1000. _middleEnter: function c(e) {
  1001. for (var t = v(e), n = "", r = e, a = "", o = "", i = !1; r !== t;) {
  1002. var s = "A" === (r = r.parentNode).tagName && g.cursor.isAtEnd(e, r) ? "fr-to-remove" : "";
  1003. i || r == t || g.node.isBlock(r) || (i = !0, a += $e.INVISIBLE_SPACE), a = g.node.openTagString(m(r).clone().addClass(s).get(0)) + a, o = g.node.closeTagString(r) + o
  1004. }
  1005. n = o + n + a + $e.MARKERS + (g.opts.keepFormatOnDelete ? $e.INVISIBLE_SPACE : ""), m(e).replaceWith('<span id="fr-break"></span>');
  1006. var l = g.node.openTagString(t) + m(t).html() + g.node.closeTagString(t);
  1007. l = l.replace(/<span id="fr-break"><\/span>/g, n), m(t).replaceWith(l)
  1008. },
  1009. _endEnter: function l(e) {
  1010. for (var t = v(e), n = $e.MARKERS, r = "", a = e, o = !1; a !== t;) {
  1011. var i = "A" === (a = a.parentNode).tagName && g.cursor.isAtEnd(e, a) ? "fr-to-remove" : "";
  1012. o || a === t || g.node.isBlock(a) || (o = !0, r += $e.INVISIBLE_SPACE), r = g.node.openTagString(m(a).clone().addClass(i).get(0)) + r, n += g.node.closeTagString(a)
  1013. }
  1014. var s = r + n;
  1015. m(e).remove(), m(t).after(s)
  1016. },
  1017. _backspace: function d(e) {
  1018. var t = v(e),
  1019. n = t.previousSibling;
  1020. if (n) {
  1021. n = m(n).find(g.html.blockTagsQuery()).get(-1) || n, m(e).replaceWith($e.MARKERS);
  1022. var r = g.node.contents(n);
  1023. r.length && "BR" === r[r.length - 1].tagName && m(r[r.length - 1]).remove(), m(t).find(g.html.blockTagsQuery()).not("ol, ul, table").each(function() {
  1024. this.parentNode === t && m(this).replaceWith(m(this).html() + (g.node.isEmpty(this) ? "" : "<br>"))
  1025. });
  1026. for (var a, o = g.node.contents(t)[0]; o && !g.node.isList(o);) a = o.nextSibling, m(n).append(o), o = a;
  1027. for (n = t.previousSibling; o;) a = o.nextSibling, m(n).append(o), o = a;
  1028. 1 < (r = g.node.contents(n)).length && "BR" === r[r.length - 1].tagName && m(r[r.length - 1]).remove(), m(t).remove()
  1029. } else {
  1030. var i = b(t);
  1031. if (m(e).replaceWith($e.MARKERS), i.parentNode && "LI" === i.parentNode.tagName) {
  1032. var s = i.previousSibling;
  1033. g.node.isBlock(s) ? (m(t).find(g.html.blockTagsQuery()).not("ol, ul, table").each(function() {
  1034. this.parentNode === t && m(this).replaceWith(m(this).html() + (g.node.isEmpty(this) ? "" : "<br>"))
  1035. }), m(s).append(m(t).html())) : m(i).before(m(t).html())
  1036. } else {
  1037. var l = g.html.defaultTag();
  1038. l && 0 === m(t).find(g.html.blockTagsQuery()).length ? m(i).before("<".concat(l, ">").concat(m(t).html(), "</").concat(l, ">")) : m(i).before(m(t).html())
  1039. }
  1040. m(t).remove(), g.html.wrap(), 0 === m(i).find("li").length && m(i).remove()
  1041. }
  1042. },
  1043. _del: function f(e) {
  1044. var t, n = v(e),
  1045. r = n.nextSibling;
  1046. if (r) {
  1047. (t = g.node.contents(r)).length && "BR" === t[0].tagName && m(t[0]).remove(), m(r).find(g.html.blockTagsQuery()).not("ol, ul, table").each(function() {
  1048. this.parentNode === r && m(this).replaceWith(m(this).html() + (g.node.isEmpty(this) ? "" : "<br>"))
  1049. });
  1050. for (var a, o = e, i = g.node.contents(r)[0]; i && !g.node.isList(i);) a = i.nextSibling, m(o).after(i), o = i, i = a;
  1051. for (; i;) a = i.nextSibling, m(n).append(i), i = a;
  1052. m(e).replaceWith($e.MARKERS), m(r).remove()
  1053. } else {
  1054. for (var s = n; !s.nextSibling && s !== g.el;) s = s.parentNode;
  1055. if (s === g.el) return !1;
  1056. if (s = s.nextSibling, g.node.isBlock(s)) $e.NO_DELETE_TAGS.indexOf(s.tagName) < 0 && (m(e).replaceWith($e.MARKERS), (t = g.node.contents(n)).length && "BR" === t[t.length - 1].tagName && m(t[t.length - 1]).remove(), m(n).append(m(s).html()), m(s).remove());
  1057. else
  1058. for ((t = g.node.contents(n)).length && "BR" === t[t.length - 1].tagName && m(t[t.length - 1]).remove(), m(e).replaceWith($e.MARKERS); s && !g.node.isBlock(s) && "BR" !== s.tagName;) m(n).append(m(s)), s = s.nextSibling
  1059. }
  1060. }
  1061. }
  1062. }, $e.NO_DELETE_TAGS = ["TH", "TD", "TR", "TABLE", "FORM"], $e.SIMPLE_ENTER_TAGS = ["TH", "TD", "LI", "DL", "DT", "FORM"], $e.MODULES.cursor = function(u) {
  1063. var h = u.$;
  1064. function o(e) {
  1065. return !!e && (!!u.node.isBlock(e) || (e.nextSibling && e.nextSibling.nodeType === Node.TEXT_NODE && 0 === e.nextSibling.textContent.replace(/\u200b/g, "").length ? o(e.nextSibling) : !(e.nextSibling && (!e.previousSibling || "BR" !== e.nextSibling.tagName || e.nextSibling.nextSibling)) && o(e.parentNode)))
  1066. }
  1067. function i(e) {
  1068. return !!e && (!!u.node.isBlock(e) || (e.previousSibling && e.previousSibling.nodeType === Node.TEXT_NODE && 0 === e.previousSibling.textContent.replace(/\u200b/g, "").length ? i(e.previousSibling) : !e.previousSibling && (!(e.previousSibling || !u.node.hasClass(e.parentNode, "fr-inner")) || i(e.parentNode))))
  1069. }
  1070. function g(e, t) {
  1071. return !!e && (e !== u.$wp.get(0) && (e.previousSibling && e.previousSibling.nodeType === Node.TEXT_NODE && 0 === e.previousSibling.textContent.replace(/\u200b/g, "").length ? g(e.previousSibling, t) : !e.previousSibling && (e.parentNode === t || g(e.parentNode, t))))
  1072. }
  1073. function m(e, t) {
  1074. return !!e && (e !== u.$wp.get(0) && (e.nextSibling && e.nextSibling.nodeType === Node.TEXT_NODE && 0 === e.nextSibling.textContent.replace(/\u200b/g, "").length ? m(e.nextSibling, t) : !(e.nextSibling && (!e.previousSibling || "BR" !== e.nextSibling.tagName || e.nextSibling.nextSibling)) && (e.parentNode === t || m(e.parentNode, t))))
  1075. }
  1076. function c(e) {
  1077. return 0 < h(e).parentsUntil(u.$el, "LI").length && 0 === h(e).parentsUntil("LI", "TABLE").length
  1078. }
  1079. function d(e, t) {
  1080. var n = new RegExp("".concat(t ? "^" : "", "(([\\uD83C-\\uDBFF\\uDC00-\\uDFFF]+\\u200D)*[\\uD83C-\\uDBFF\\uDC00-\\uDFFF]{2})").concat(t ? "" : "$"), "i"),
  1081. r = e.match(n);
  1082. return r ? r[0].length : 1
  1083. }
  1084. function f(e) {
  1085. for (var t, n = e; !n.previousSibling;)
  1086. if (n = n.parentNode, u.node.isElement(n)) return !1;
  1087. if (n = n.previousSibling, !u.node.isBlock(n) && u.node.isEditable(n)) {
  1088. for (t = u.node.contents(n); n.nodeType !== Node.TEXT_NODE && !u.node.isDeletable(n) && t.length && u.node.isEditable(n);) n = t[t.length - 1], t = u.node.contents(n);
  1089. if (n.nodeType === Node.TEXT_NODE) {
  1090. var r = n.textContent,
  1091. a = r.length;
  1092. if (r.length && "\n" === r[r.length - 1]) return n.textContent = r.substring(0, a - 2), 0 === n.textContent.length && n.parentNode.removeChild(n), f(e);
  1093. if (u.opts.tabSpaces && r.length >= u.opts.tabSpaces) 0 === r.substr(r.length - u.opts.tabSpaces, r.length - 1).replace(/ /g, "").replace(new RegExp($e.UNICODE_NBSP, "g"), "").length && (a = r.length - u.opts.tabSpaces + 1);
  1094. n.textContent = r.substring(0, a - d(r)), u.opts.htmlUntouched && !e.nextSibling && n.textContent.length && " " === n.textContent[n.textContent.length - 1] && (n.textContent = n.textContent.substring(0, n.textContent.length - 1) + $e.UNICODE_NBSP);
  1095. var o = r.length !== n.textContent.length;
  1096. if (0 === n.textContent.length)
  1097. if (o && u.opts.keepFormatOnDelete) h(n).after($e.INVISIBLE_SPACE + $e.MARKERS);
  1098. else if (0 !== r.length && u.node.isBlock(n.parentNode)) h(n).after($e.MARKERS);
  1099. else if ((2 != n.parentNode.childNodes.length || n.parentNode != e.parentNode) && 1 != n.parentNode.childNodes.length || u.node.isBlock(n.parentNode) || u.node.isElement(n.parentNode) || !u.node.isDeletable(n.parentNode)) {
  1100. for (; !u.node.isElement(n.parentNode) && u.node.isEmpty(n.parentNode) && $e.NO_DELETE_TAGS.indexOf(n.parentNode.tagName) < 0;) {
  1101. var i = n;
  1102. n = n.parentNode, i.parentNode.removeChild(i)
  1103. }
  1104. h(n).after($e.MARKERS), u.node.isElement(n.parentNode) && !e.nextSibling && n.previousSibling && "BR" === n.previousSibling.tagName && h(e).after("<br>"), n.parentNode.removeChild(n)
  1105. } else h(n.parentNode).after($e.MARKERS), h(n.parentNode).remove();
  1106. else h(n).after($e.MARKERS)
  1107. } else u.node.isDeletable(n) ? (h(n).after($e.MARKERS), h(n).remove()) : e.nextSibling && "BR" === e.nextSibling.tagName && u.node.isVoid(n) && "BR" !== n.tagName ? (h(e.nextSibling).remove(), h(e).replaceWith($e.MARKERS)) : !1 !== u.events.trigger("node.remove", [h(n)]) && (h(n).after($e.MARKERS), h(n).remove())
  1108. } else if ($e.NO_DELETE_TAGS.indexOf(n.tagName) < 0 && (u.node.isEditable(n) || u.node.isDeletable(n)))
  1109. if (u.node.isDeletable(n)) h(e).replaceWith($e.MARKERS), h(n).remove();
  1110. else if (u.node.isEmpty(n) && !u.node.isList(n)) h(n).remove(), h(e).replaceWith($e.MARKERS);
  1111. else {
  1112. for (u.node.isList(n) && (n = h(n).find("li").last().get(0)), (t = u.node.contents(n)) && "BR" === t[t.length - 1].tagName && h(t[t.length - 1]).remove(), t = u.node.contents(n); t && u.node.isBlock(t[t.length - 1]);) n = t[t.length - 1], t = u.node.contents(n);
  1113. h(n).append($e.MARKERS);
  1114. for (var s = e; !s.previousSibling;) s = s.parentNode;
  1115. for (; s && "BR" !== s.tagName && !u.node.isBlock(s);) {
  1116. var l = s;
  1117. s = s.nextSibling, h(n).append(l)
  1118. }
  1119. s && "BR" === s.tagName && h(s).remove(), h(e).remove()
  1120. } else e.nextSibling && "BR" === e.nextSibling.tagName && h(e.nextSibling).remove();
  1121. return !0
  1122. }
  1123. function s(e) {
  1124. var t = 0 < h(e).parentsUntil(u.$el, "BLOCKQUOTE").length,
  1125. n = u.node.deepestParent(e, [], !t);
  1126. if (n && "BLOCKQUOTE" === n.tagName) {
  1127. var r = u.node.deepestParent(e, [h(e).parentsUntil(u.$el, "BLOCKQUOTE").get(0)]);
  1128. r && r.nextSibling && (n = r)
  1129. }
  1130. if (null !== n) {
  1131. var a, o = n.nextSibling;
  1132. if (u.node.isBlock(n) && (u.node.isEditable(n) || u.node.isDeletable(n)) && o && $e.NO_DELETE_TAGS.indexOf(o.tagName) < 0)
  1133. if (u.node.isDeletable(o)) h(o).remove(), h(e).replaceWith($e.MARKERS);
  1134. else if (u.node.isBlock(o) && u.node.isEditable(o))
  1135. if (u.node.isList(o))
  1136. if (u.node.isEmpty(n, !0)) h(n).remove(), h(o).find("li").first().prepend($e.MARKERS);
  1137. else {
  1138. var i = h(o).find("li").first();
  1139. "BLOCKQUOTE" === n.tagName && (a = u.node.contents(n)).length && u.node.isBlock(a[a.length - 1]) && (n = a[a.length - 1]), 0 === i.find("ul, ol").length && (h(e).replaceWith($e.MARKERS), i.find(u.html.blockTagsQuery()).not("ol, ul, table").each(function() {
  1140. this.parentNode === i.get(0) && h(this).replaceWith(h(this).html() + (u.node.isEmpty(this) ? "" : "<br>"))
  1141. }), h(n).append(u.node.contents(i.get(0))), i.remove(), 0 === h(o).find("li").length && h(o).remove())
  1142. } else {
  1143. if ((a = u.node.contents(o)).length && "BR" === a[0].tagName && h(a[0]).remove(), "BLOCKQUOTE" !== o.tagName && "BLOCKQUOTE" === n.tagName)
  1144. for (a = u.node.contents(n); a.length && u.node.isBlock(a[a.length - 1]);) n = a[a.length - 1], a = u.node.contents(n);
  1145. else if ("BLOCKQUOTE" === o.tagName && "BLOCKQUOTE" !== n.tagName)
  1146. for (a = u.node.contents(o); a.length && u.node.isBlock(a[0]);) o = a[0], a = u.node.contents(o);
  1147. h(e).replaceWith($e.MARKERS), h(n).append(o.innerHTML), h(o).remove()
  1148. } else {
  1149. for (h(e).replaceWith($e.MARKERS); o && "BR" !== o.tagName && !u.node.isBlock(o) && u.node.isEditable(o);) {
  1150. var s = o;
  1151. o = o.nextSibling, h(n).append(s)
  1152. }
  1153. o && "BR" === o.tagName && u.node.isEditable(o) && h(o).remove()
  1154. }
  1155. }
  1156. }
  1157. function n(e) {
  1158. for (var t, n = e; !n.nextSibling;)
  1159. if (n = n.parentNode, u.node.isElement(n)) return !1;
  1160. if ("BR" === (n = n.nextSibling).tagName && u.node.isEditable(n))
  1161. if (n.nextSibling) {
  1162. if (u.node.isBlock(n.nextSibling) && u.node.isEditable(n.nextSibling)) {
  1163. if (!($e.NO_DELETE_TAGS.indexOf(n.nextSibling.tagName) < 0)) return void h(n).remove();
  1164. n = n.nextSibling, h(n.previousSibling).remove()
  1165. }
  1166. } else if (o(n)) {
  1167. if (c(e)) u.cursorLists._del(e);
  1168. else u.node.deepestParent(n) && ((!u.node.isEmpty(u.node.blockParent(n)) || (u.node.blockParent(n).nextSibling && $e.NO_DELETE_TAGS.indexOf(u.node.blockParent(n).nextSibling.tagName)) < 0) && h(n).remove(), s(e));
  1169. return
  1170. }
  1171. if (!u.node.isBlock(n) && u.node.isEditable(n)) {
  1172. for (t = u.node.contents(n); n.nodeType !== Node.TEXT_NODE && t.length && !u.node.isDeletable(n) && u.node.isEditable(n);) n = t[0], t = u.node.contents(n);
  1173. n.nodeType === Node.TEXT_NODE ? (h(n).before($e.MARKERS), n.textContent.length && (n.textContent = n.textContent.substring(d(n.textContent, !0), n.textContent.length))) : u.node.isDeletable(n) ? (h(n).before($e.MARKERS), h(n).remove()) : !1 !== u.events.trigger("node.remove", [h(n)]) && (h(n).before($e.MARKERS), h(n).remove()), h(e).remove()
  1174. } else if ($e.NO_DELETE_TAGS.indexOf(n.tagName) < 0 && (u.node.isEditable(n) || u.node.isDeletable(n)))
  1175. if (u.node.isDeletable(n)) h(e).replaceWith($e.MARKERS), h(n).remove();
  1176. else if (u.node.isList(n)) e.previousSibling ? (h(n).find("li").first().prepend(e), u.cursorLists._backspace(e)) : (h(n).find("li").first().prepend($e.MARKERS), h(e).remove());
  1177. else if ((t = u.node.contents(n)) && "BR" === t[0].tagName && h(t[0]).remove(), t && "BLOCKQUOTE" === n.tagName) {
  1178. var r = t[0];
  1179. for (h(e).before($e.MARKERS); r && "BR" !== r.tagName;) {
  1180. var a = r;
  1181. r = r.nextSibling, h(e).before(a)
  1182. }
  1183. r && "BR" === r.tagName && h(r).remove()
  1184. } else h(e).after(h(n).html()).after($e.MARKERS), h(n).remove()
  1185. }
  1186. function p() {
  1187. for (var e = u.el.querySelectorAll("blockquote:empty"), t = 0; t < e.length; t++) e[t].parentNode.removeChild(e[t])
  1188. }
  1189. function l(e, t, n) {
  1190. var r, a = u.node.deepestParent(e, [], !n);
  1191. if (a && "BLOCKQUOTE" === a.tagName) return m(e, a) ? (r = u.html.defaultTag(), t ? h(e).replaceWith("<br>" + $e.MARKERS) : r ? h(a).after("<".concat(r, ">").concat($e.MARKERS, "<br></").concat(r, ">")) : h(a).after("".concat($e.MARKERS, "<br>")), h(e).remove()) : v(e, t, n), !1;
  1192. if (null === a)(r = u.html.defaultTag()) && u.node.isElement(e.parentNode) ? h(e).replaceWith("<".concat(r, ">").concat($e.MARKERS, "<br></").concat(r, ">")) : !e.previousSibling || h(e.previousSibling).is("br") || e.nextSibling ? h(e).replaceWith("<br>".concat($e.MARKERS)) : h(e).replaceWith("<br>".concat($e.MARKERS, "<br>"));
  1193. else {
  1194. var o = e,
  1195. i = "";
  1196. "PRE" != a.tagName || e.nextSibling || (t = !0), u.node.isBlock(a) && !t || (i = "<br/>");
  1197. var s, l = "",
  1198. c = "",
  1199. d = "",
  1200. f = "";
  1201. (r = u.html.defaultTag()) && u.node.isBlock(a) && (d = "<".concat(r, ">"), f = "</".concat(r, ">"), a.tagName === r.toUpperCase() && (d = u.node.openTagString(h(a).clone().removeAttr("id").get(0))));
  1202. do {
  1203. if (o = o.parentNode, !t || o !== a || t && !u.node.isBlock(a))
  1204. if (l += u.node.closeTagString(o), o === a && u.node.isBlock(a)) c = d + c;
  1205. else {
  1206. var p = ("A" === o.tagName || u.node.hasClass(o, "fa")) && m(e, o) ? "fr-to-remove" : "";
  1207. c = u.node.openTagString(h(o).clone().addClass(p).get(0)) + c
  1208. }
  1209. } while (o !== a);
  1210. i = l + i + c + (e.parentNode === a && u.node.isBlock(a) ? "" : $e.INVISIBLE_SPACE) + $e.MARKERS, u.node.isBlock(a) && !h(a).find("*").last().is("br") && h(a).append("<br/>"), h(e).after('<span id="fr-break"></span>'), h(e).remove(), a.nextSibling && !u.node.isBlock(a.nextSibling) || u.node.isBlock(a) || h(a).after("<br>"), s = (s = !t && u.node.isBlock(a) ? u.node.openTagString(a) + h(a).html() + f : u.node.openTagString(a) + h(a).html() + u.node.closeTagString(a)).replace(/<span id="fr-break"><\/span>/g, i), h(a).replaceWith(s)
  1211. }
  1212. }
  1213. function v(e, t, n) {
  1214. var r = u.node.deepestParent(e, [], !n);
  1215. if (null === r) u.html.defaultTag() && e.parentNode === u.el ? h(e).replaceWith("<".concat(u.html.defaultTag(), ">").concat($e.MARKERS, "<br></").concat(u.html.defaultTag(), ">")) : (e.nextSibling && !u.node.isBlock(e.nextSibling) || h(e).after("<br>"), h(e).replaceWith("<br>".concat($e.MARKERS)));
  1216. else if (e.previousSibling && "IMG" == e.previousSibling.tagName || e.nextSibling && "IMG" == e.nextSibling.tagName) h(e).replaceWith("<" + u.html.defaultTag() + ">" + $e.MARKERS + "<br></" + u.html.defaultTag() + ">");
  1217. else {
  1218. var a = e,
  1219. o = "";
  1220. "PRE" === r.tagName && (t = !0), u.node.isBlock(r) && !t || (o = "<br>");
  1221. var i = "",
  1222. s = "";
  1223. do {
  1224. var l = a;
  1225. if (a = a.parentNode, "BLOCKQUOTE" === r.tagName && u.node.isEmpty(l) && !u.node.hasClass(l, "fr-marker") && h(l).contains(e) && h(l).after(e), "BLOCKQUOTE" !== r.tagName || !m(e, a) && !g(e, a))
  1226. if (!t || a !== r || t && !u.node.isBlock(r)) {
  1227. i += u.node.closeTagString(a);
  1228. var c = "A" == a.tagName && m(e, a) || u.node.hasClass(a, "fa") ? "fr-to-remove" : "";
  1229. s = u.node.openTagString(h(a).clone().addClass(c).removeAttr("id").get(0)) + s
  1230. } else "BLOCKQUOTE" == r.tagName && t && (s = i = "")
  1231. } while (a !== r);
  1232. var d = r === e.parentNode && u.node.isBlock(r) || e.nextSibling;
  1233. if ("BLOCKQUOTE" === r.tagName)
  1234. if (e.previousSibling && u.node.isBlock(e.previousSibling) && e.nextSibling && "BR" === e.nextSibling.tagName && (h(e.nextSibling).after(e), e.nextSibling && "BR" === e.nextSibling.tagName && h(e.nextSibling).remove()), t) o = i + o + $e.MARKERS + s;
  1235. else {
  1236. var f = u.html.defaultTag();
  1237. o = "".concat(i + o + (f ? "<".concat(f, ">") : "") + $e.MARKERS, "<br>").concat(f ? "</".concat(f, ">") : "").concat(s)
  1238. } else o = i + o + s + (d ? "" : $e.INVISIBLE_SPACE) + $e.MARKERS;
  1239. h(e).replaceWith('<span id="fr-break"></span>');
  1240. var p = u.node.openTagString(r) + h(r).html() + u.node.closeTagString(r);
  1241. p = p.replace(/<span id="fr-break"><\/span>/g, o), h(r).replaceWith(p)
  1242. }
  1243. }
  1244. return {
  1245. enter: function b(e) {
  1246. var t = u.markers.insert();
  1247. if (!t) return !0;
  1248. for (var n = t.parentNode; n && !u.node.isElement(n);) {
  1249. if ("false" === n.getAttribute("contenteditable")) return h(t).replaceWith($e.MARKERS), u.selection.restore(), !1;
  1250. if ("true" === n.getAttribute("contenteditable")) break;
  1251. n = n.parentNode
  1252. }
  1253. u.el.normalize();
  1254. var r = !1;
  1255. 0 < h(t).parentsUntil(u.$el, "BLOCKQUOTE").length && (r = !0), h(t).parentsUntil(u.$el, "TD, TH").length && (r = !1), o(t) ? !c(t) || e || r ? l(t, e, r) : u.cursorLists._endEnter(t) : i(t) ? !c(t) || e || r ? function s(e, t, n) {
  1256. var r, a = u.node.deepestParent(e, [], !n);
  1257. if (a && "TABLE" === a.tagName) return h(a).find("td, th").first().prepend(e), s(e, t, n);
  1258. if (a && "BLOCKQUOTE" === a.tagName)
  1259. if (g(e, a)) {
  1260. if (!t) return (r = u.html.defaultTag()) ? h(a).before("<".concat(r, ">").concat($e.MARKERS, "<br></").concat(r, ">")) : h(a).before("".concat($e.MARKERS, "<br>")), h(e).remove(), !1
  1261. } else m(e, a) ? l(e, t, !0) : v(e, t, !0);
  1262. if (null === a)(r = u.html.defaultTag()) && u.node.isElement(e.parentNode) ? h(e).replaceWith("<".concat(r, ">").concat($e.MARKERS, "<br></").concat(r, ">")) : h(e).replaceWith("<br>".concat($e.MARKERS));
  1263. else {
  1264. if (u.node.isBlock(a))
  1265. if ("PRE" === a.tagName && (t = !0), t) h(e).remove(), h(a).prepend("<br>".concat($e.MARKERS));
  1266. else if (e.nextSibling && "IMG" == e.nextSibling.tagName || e.nextSibling && e.nextSibling.nextElementSibling && "IMG" == e.nextSibling.nextElementSibling) h(e).replaceWith("<" + u.html.defaultTag() + ">" + $e.MARKERS + "<br></" + u.html.defaultTag() + ">");
  1267. else {
  1268. if (u.node.isEmpty(a, !0)) return l(e, t, n);
  1269. if (u.opts.keepFormatOnDelete) {
  1270. for (var o = e, i = $e.INVISIBLE_SPACE; o !== a && !u.node.isElement(o);) o = o.parentNode, i = u.node.openTagString(o) + i + u.node.closeTagString(o);
  1271. h(a).before(i)
  1272. } else h(a).before("".concat(u.node.openTagString(h(a).clone().removeAttr("id").get(0)), "<br>").concat(u.node.closeTagString(a)))
  1273. } else h(a).before("<br>");
  1274. h(e).remove()
  1275. }
  1276. }(t, e, r) : u.cursorLists._startEnter(t) : !c(t) || e || r ? v(t, e, r) : u.cursorLists._middleEnter(t),
  1277. function a() {
  1278. u.$el.find(".fr-to-remove").each(function() {
  1279. for (var e = u.node.contents(this), t = 0; t < e.length; t++) e[t].nodeType === Node.TEXT_NODE && (e[t].textContent = e[t].textContent.replace(/\u200B/g, ""));
  1280. h(this).replaceWith(this.innerHTML)
  1281. })
  1282. }(), u.html.fillEmptyBlocks(!0), u.opts.htmlUntouched || (u.html.cleanEmptyTags(), u.clean.lists(), u.spaces.normalizeAroundCursor()), u.selection.restore()
  1283. },
  1284. backspace: function E() {
  1285. var e = !1,
  1286. t = u.markers.insert();
  1287. if (!t) return !0;
  1288. for (var n = t.parentNode; n && !u.node.isElement(n);) {
  1289. if ("false" === n.getAttribute("contenteditable")) return h(t).replaceWith($e.MARKERS), u.selection.restore(), !1;
  1290. if ("true" === n.getAttribute("contenteditable")) break;
  1291. n = n.parentNode
  1292. }
  1293. u.el.normalize();
  1294. var r = t.previousSibling;
  1295. if (r) {
  1296. var a = r.textContent;
  1297. a && a.length && 8203 === a.charCodeAt(a.length - 1) && (1 === a.length ? h(r).remove() : r.textContent = r.textContent.substr(0, a.length - d(a)))
  1298. }
  1299. return o(t) ? c(t) && g(t, h(t).parents("li:first").get(0)) ? u.cursorLists._backspace(t) : e = f(t) : i(t) ? c(t) && g(t, h(t).parents("li").first().get(0)) ? u.cursorLists._backspace(t) : function l(e) {
  1300. for (var t = 0 < h(e).parentsUntil(u.$el, "BLOCKQUOTE").length, n = u.node.deepestParent(e, [], !t), r = n; n && !n.previousSibling && "BLOCKQUOTE" !== n.tagName && n.parentElement !== u.el && !u.node.hasClass(n.parentElement, "fr-inner") && $e.SIMPLE_ENTER_TAGS.indexOf(n.parentElement.tagName) < 0;) n = n.parentElement;
  1301. if (n && "BLOCKQUOTE" === n.tagName) {
  1302. var a = u.node.deepestParent(e, [h(e).parentsUntil(u.$el, "BLOCKQUOTE").get(0)]);
  1303. a && a.previousSibling && (r = n = a)
  1304. }
  1305. if (null !== n) {
  1306. var o, i = n.previousSibling;
  1307. if (u.node.isBlock(n) && u.node.isEditable(n))
  1308. if (i && $e.NO_DELETE_TAGS.indexOf(i.tagName) < 0) {
  1309. if (u.node.isDeletable(i)) h(i).remove(), h(e).replaceWith($e.MARKERS);
  1310. else if (u.node.isEditable(i))
  1311. if (u.node.isBlock(i))
  1312. if (u.node.isEmpty(i) && !u.node.isList(i)) h(i).remove(), h(e).after(u.opts.keepFormatOnDelete ? $e.INVISIBLE_SPACE : "");
  1313. else {
  1314. if (u.node.isList(i) && (i = h(i).find("li").last().get(0)), (o = u.node.contents(i)).length && "BR" === o[o.length - 1].tagName && h(o[o.length - 1]).remove(), "BLOCKQUOTE" === i.tagName && "BLOCKQUOTE" !== n.tagName)
  1315. for (o = u.node.contents(i); o.length && u.node.isBlock(o[o.length - 1]);) i = o[o.length - 1], o = u.node.contents(i);
  1316. else if ("BLOCKQUOTE" !== i.tagName && "BLOCKQUOTE" === r.tagName)
  1317. for (o = u.node.contents(r); o.length && u.node.isBlock(o[0]);) r = o[0], o = u.node.contents(r);
  1318. if (u.node.isEmpty(n)) h(e).remove(), u.selection.setAtEnd(i, !0);
  1319. else {
  1320. h(e).replaceWith($e.MARKERS);
  1321. var s = i.childNodes;
  1322. u.node.isBlock(s[s.length - 1]) ? h(s[s.length - 1]).append(r.innerHTML) : h(i).append(r.innerHTML)
  1323. }
  1324. h(r).remove(), u.node.isEmpty(n) && h(n).remove()
  1325. } else h(e).replaceWith($e.MARKERS), "BLOCKQUOTE" === n.tagName && i.nodeType === Node.ELEMENT_NODE ? h(i).remove() : (h(i).after(u.node.isEmpty(n) ? "" : h(n).html()), h(n).remove(), "BR" === i.tagName && h(i).remove())
  1326. } else i || (n && "BLOCKQUOTE" === n.tagName && 0 === h(n).text().replace(/\u200B/g, "").length ? h(n).remove() : u.node.isEmpty(n) && n.parentNode && u.node.isEditable(n.parentNode) && n.parentNode != u.el && h(n.parentNode).remove())
  1327. }
  1328. }(t) : e = f(t), h(t).remove(), p(), u.html.fillEmptyBlocks(!0), u.opts.htmlUntouched || (u.html.cleanEmptyTags(), u.clean.lists(), u.spaces.normalizeAroundCursor()), u.selection.restore(), e
  1329. },
  1330. del: function r() {
  1331. var e = u.markers.insert();
  1332. if (!e) return !1;
  1333. if (u.el.normalize(), o(e))
  1334. if (c(e))
  1335. if (0 === h(e).parents("li").first().find("ul, ol").length) u.cursorLists._del(e);
  1336. else {
  1337. var t = h(e).parents("li").first().find("ul, ol").first().find("li").first();
  1338. (t = t.find(u.html.blockTagsQuery()).get(-1) || t).prepend(e), u.cursorLists._backspace(e)
  1339. } else s(e);
  1340. else i(e), n(e);
  1341. h(e).remove(), p(), u.html.fillEmptyBlocks(!0), u.opts.htmlUntouched || (u.html.cleanEmptyTags(), u.clean.lists()), u.spaces.normalizeAroundCursor(), u.selection.restore()
  1342. },
  1343. isAtEnd: m,
  1344. isAtStart: g
  1345. }
  1346. }, $e.MODULES.data = function(f) {
  1347. function p(e) {
  1348. return e
  1349. }
  1350. function c(e) {
  1351. for (var t = e.toString(), n = 0, r = 0; r < t.length; r++) n += parseInt(t.charAt(r), 10);
  1352. return 10 < n ? n % 9 + 1 : n
  1353. }
  1354. function d(e, t, n) {
  1355. for (var r = Math.abs(n); 0 < r--;) e -= t;
  1356. return n < 0 && (e += 123), e
  1357. }
  1358. function u(e) {
  1359. return e && "block" !== e.css("display") ? (e.remove(), !0) : e && 0 === f.helpers.getPX(e.css("height")) ? (e.remove(), !0) : !(!e || "absolute" !== e.css("position") && "fixed" !== e.css("position") || (e.remove(), 0))
  1360. }
  1361. function h(e) {
  1362. return e && 0 === f.$box.find(e).length
  1363. }
  1364. function g() {
  1365. if (10 < e && (f[p(R("0ppecjvc=="))](), setTimeout(function() {
  1366. E.FE = null
  1367. }, 10)), !f.$box) return !1;
  1368. f.$wp.prepend(R(p(R(S)))), v = f.$wp.find("> div").first(), b = v.find("> a"), "rtl" === f.opts.direction && v.css("left", "auto").css("right", 0).attr("direction", "rtl"), e++
  1369. }
  1370. function m(e) {
  1371. for (var t = [R("9qqG-7amjlwq=="), R("KA3B3C2A6D1D5H5H1A3=="), R("3B9B3B5F3C4G3E3=="), R("QzbzvxyB2yA-9m=="), R("ji1kacwmgG5bc=="), R("nmA-13aogi1A3c1jd=="), R("BA9ggq=="), R("emznbjbH3fij=="), R("tkC-22d1qC-13sD1wzF-7=="), R("tA3jjf=="), R("1D1brkm==")], n = 0; n < t.length; n++)
  1372. if (String.prototype.endsWith || (String.prototype.endsWith = function(e, t) {
  1373. return (void 0 === t || t > this.length) && (t = this.length), this.substring(t - e.length, t) === e
  1374. }), e.endsWith(t[n])) return !0;
  1375. return !1
  1376. }
  1377. var v, b, E = f.$,
  1378. T = "sC-7OB2fwhVC4vsG-7ohPA4ZD4D-8f1J3stzB-11bFE2FC1A3NB2IF1HE1TH4WB8eB-11zVG2F3I3yYB5ZG4CB2DA15CC5AD3F1A1KG1oLA10B1A6wQF1H3vgale2C4F4XA2qc2A5D5B3pepmriKB3OE1HD1fUC10pjD-11E-11TB4YJ3bC-16zE-11yc1B2CE2BC3jhjKC1pdA-21OA6C1D5B-8vF4QA11pD6sqf1C3lldA-16BD4A2H3qoEA7bB-16rmNH5H1F1vSB7RE2A3TH4YC5A5b1A4d1B3whepyAC3AA2zknC3mbgf1SC4WH4PD8TC5ZB2C3H3jb2A5ZA2EF2aoFC5qqHC4B1H1zeGA7UA5RF4TA29TA6ZC4d1C3hyWA10A3rBB2E3decorationRD3QC10UD3E6E6ZD2F3F3fme2E5uxxrEC9C3E4fB-11azhHB1LD7D6VF4VVTPC6b1C4TYG3qzDD6B3B3AH4I2H2kxbHE1JD1yihfd1QD6WB1D4mhrc1B5rvFG3A14A7cDA2OC1AA1JB5zC-16KA6WB4C-8wvlTB5A5lkZB2C2C7zynBD2D2bI-7C-21d1HE2cubyvPC8A6VB3aroxxZE4C4F4e1I2BE1WjdifH1H4A14NA1GB1YG-10tWA3A14A9sVA2C5XH2A29b2A6gsleGG2jaED2D-13fhE1OA8NjwytyTD4e1sc1D-16ZC3B5C-9e1C2FB6EFF5B2C2JH4E1C2tdLE5A3UG4G-7b2D3B4fA-9oh1G3kqvB4AG3ibnjcAC6D2B1cDA9KC2QA6bRC4VA30RB8hYB2A4A-8h1A21A2B2==",
  1379. A = "7D4YH4fkhHB3pqDC3H2E1fkMD1IB1NF1D3QD9wB5rxqlh1A8c2B4ZA3FD2AA6FB5EB3jJG4D2J-7aC-21GB6PC5RE4TC11QD6XC4XE3XH3mlvnqjbaOA2OC2BE6A1fmI-7ujwbc1G5f1F3e1C11mXF4owBG3E1yD1E4F1D2D-8B-8C-7yC-22HD1MF5UE4cWA3D8D6a1B2C3H3a3I3sZA4B3A2akfwEB3xHD5D1F1wIC11pA-16xdxtVI2C9A6YC4a1A2F3B2GA6B4C3lsjyJB1eMA1D-11MF5PE4ja1D3D7byrf1C3e1C7D-16lwqAF3H2A1B-21wNE1MA1OG1HB2A-16tSE5UD4RB3icRA4F-10wtwzBB3E1C3CC2DA8LA2LA1EB1kdH-8uVB7decorg1J2B7B6qjrqGI2J1C6ijehIB1hkemC-13hqkrH4H-7QD6XF5XF3HLNAC3CB2aD2CD2KB10B4ycg1A-8KA4H4B11jVB5TC4yqpB-21pd1E4pedzGB6MD5B3ncB-7MA4LD2JB6PD5uH-8TB9C7YD5XD2E3I3jmiDB3zeimhLD8E2F2JC1H-9ivkPC5lG-10SB1D3H3A-21rc1A3d1E3fsdqwfGA2KA1OrC-22LA6D1B4afUB16SC7AitC-8qYA11fsxcajGA15avjNE2A-9h1hDB16B9tPC1C5F5UC1G3B8d2A5d1D4RnHJ3C3JB5D3ucMG1yzD-17hafjC-8VD3yWC6e1YD2H3ZE2C8C5oBA3H3D2vFA4WzJC4C2i1A-65fNB8afWA1H4A26mvkC-13ZB3E3h1A21BC4eFB2GD2AA5ghqND2A2B2==",
  1380. C = "IC1A8A3A5A8B1E2E5A4B3==",
  1381. S = "sC-7OB2fwhVC4vsG-7ohPA4ZD4D-8f1J3stzB-11bFE2EE1MA2ND1KD1IE4cA-21pSD2D5ve1G3h1A8b1E5ZC3CD2FA16mC5OC5E1hpnG1NA10B1D7hkUD4I-7b2C3C5nXD2E3F3whidEC2EH3GI2mJE2E2bxci1WA10VC7pllSG2F3A7xd1A4ZC3DB2aaeGA2DE4H2E1j1ywD-13FD1A3VE4WA3D8C6wuc1A2hf1B5B7vnrrjA1B9ic1mpbD1oMB1iSB7rWC4RI4G-7upB6jd1A2F3H2EA4FD3kDF4A2moc1anJD1TD4VI4b2C7oeQF4c1E3XC7ZA3C3G3uDB2wGB6D1JC4D1JD4C1hTE6QC5pH4pD3C-22D7c1A3textAA4gdlB2mpozkmhNC1mrxA3yWA5edhg1I2H3B7ozgmvAI3I2B5GD1LD2RSNH1KA1XA5SB4PA3sA9tlmC-9tnf1G3nd1coBH4I2I2JC3C-16LE6A1tnUA3vbwQB1G3f1A20a3A8a1C6pxAB2eniuE1F3kH2lnjB2hB-16XA5PF1G4zwtYA5B-11mzTG2B9pHB3BE2hGH3B3B2cMD5C1F1wzPA8E7VG5H5vD3H-7C8tyvsVF2I1G2A5fE3bg1mgajoyxMA4fhuzSD8aQB2B4g1A20ukb1A4B3F3GG2CujjanIC1ObiB11SD1C5pWC1D4YB8YE5FE-11jXE2F-7jB4CC2G-10uLH4E1C2tA-13yjUH5d1H1A7sWD5E4hmjF-7pykafoGA16hDD4joyD-8OA33B3C2tC7cRE4SA31a1B8d1e2A4F4g1A2A22CC5zwlAC2C1A12==",
  1382. y = function() {
  1383. for (var e = 0, t = document.domain, n = t.split("."), r = "_gd".concat((new Date).getTime()); e < n.length - 1 && -1 === document.cookie.indexOf("".concat(r, "=").concat(r));) t = n.slice(-1 - ++e).join("."), document.cookie = "".concat(r, "=").concat(r, ";domain=").concat(t, ";");
  1384. return document.cookie = "".concat(r, "=;expires=Thu, 01 Jan 1970 00:00:01 GMT;domain=").concat(t, ";"), (t || "").replace(/(^\.*)|(\.*$)/g, "")
  1385. }(),
  1386. R = p(function L(e) {
  1387. if (!e) return e;
  1388. for (var t = "", n = p("charCodeAt"), r = p("fromCharCode"), a = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789".indexOf(e[0]), o = 1; o < e.length - 2; o++) {
  1389. for (var i = c(++a), s = e[n](o), l = "";
  1390. /[0-9-]/.test(e[o + 1]);) l += e[++o];
  1391. s = d(s, i, l = parseInt(l, 10) || 0), s ^= a - 1 & 31, t += String[r](s)
  1392. }
  1393. return t
  1394. }),
  1395. e = 0;
  1396. return {
  1397. _init: function w() {
  1398. var e = f.opts.key || [""],
  1399. t = R(p("ziRA1E3B9pA5B-11D-11xg1A3ZB5D1D4B-11ED2EG2pdeoC1clIH4wB-22yQD5uF4YE3E3A9=="));
  1400. "string" == typeof e && (e = [e]);
  1401. for (var n, r, a, o = !(f.ul = !0), i = 0, s = 0; s < e.length; s++) {
  1402. var l = (r = e[s], 4 === (a = (R(r) || "").split("|")).length && "V3" === a[0] ? [a[1], a[3], a[2]] : [null, null, ""]),
  1403. c = l[2];
  1404. if (c === R(p(R("LGnD1KNZf1CPBYCAZB-8F3UDSLLSG1VFf1A3C2=="))) || 0 <= c.indexOf(y, c.length - y.length) || m(y)) {
  1405. if (null !== (n = l[1]) && !(0 == n.indexOf("TRIAL") ? (n = new Date(n.replace(/TRIAL/, "")), new Date(n) < new Date && (T = A, 1)) : new Date(n) < new Date(R(C))) || !(0 < (y || "").length) || m(y)) {
  1406. f.ul = !1;
  1407. break
  1408. }
  1409. o = !0, S = T, i = l[0] || -1
  1410. }
  1411. }
  1412. /**var d = new Image;
  1413. !0 === f.ul && (g(), d.src = o ? "".concat(p(R(t)), "e=").concat(i) : "".concat(p(R(t)), "u")), !0 === f.ul && (f.events.on("contentChanged", function() {
  1414. (function e() {
  1415. return u(v) || u(b) || h(v) || h(b)
  1416. })() && g()
  1417. }), f.events.on("html.get", function(e) {
  1418. return e + R("qD2H-9G3ioD-17qA1tE1B-8qI3A4hA-13C-11E2C1njfldD1E6pg1C-8sC3hfbkcD2G3stC-22gqgB3G2B-7vtoA4nweeD1A31A15B9uC-16A1F5dkykdc1B8dE-11bA3F2D3A9gd1E7F2tlI-8H-7vtxB2A5B2C3B2F2B5A6ldbyC4iqC-22D-17E-13mA3D2dywiB3oxlvfC1H4C2TjqbzlnI3ntB4E3qA2zaqsC6D3pmnkoE3C6D5wvuE3bwifdhB6hch1E4xibD-17dmrC1rG-7pntnF6nB-8F1D2A11C8plrkmF2F3MC-16bocqA2WwA-21ayeA1C4d1isC-22rD-13D6DfjpjtC2E6hB2G2G4A-7D2==")
  1419. })), f.events.on("html.set", function() {
  1420. var e = f.el.querySelector('[data-f-id="pbf"]');
  1421. e && E(e).remove()
  1422. }), f.events.on("destroy", function() {
  1423. v && v.length && v.remove()
  1424. }, !0)**/
  1425. }
  1426. }
  1427. }, $e.MODULES.edit = function(t) {
  1428. function e() {
  1429. if (t.browser.mozilla) try {
  1430. t.doc.execCommand("enableObjectResizing", !1, "false"), t.doc.execCommand("enableInlineTableEditing", !1, "false")
  1431. } catch (e) {}
  1432. if (t.browser.msie) try {
  1433. t.doc.body.addEventListener("mscontrolselect", function(e) {
  1434. return e.preventDefault(), !1
  1435. })
  1436. } catch (e) {}
  1437. }
  1438. var n = !1;
  1439. function r() {
  1440. return n
  1441. }
  1442. return {
  1443. _init: function a() {
  1444. t.events.on("focus", function() {
  1445. r() ? t.edit.off() : t.edit.on()
  1446. })
  1447. },
  1448. on: function o() {
  1449. t.$wp ? (t.$el.attr("contenteditable", !0), t.$el.removeClass("fr-disabled").attr("aria-disabled", !1), e()) : t.$el.is("a") && t.$el.attr("contenteditable", !0), t.events.trigger("edit.on", [], !0), n = !1
  1450. },
  1451. off: function i() {
  1452. t.events.disableBlur(), t.$wp ? (t.$el.attr("contenteditable", !1), t.$el.addClass("fr-disabled").attr("aria-disabled", !0)) : t.$el.is("a") && t.$el.attr("contenteditable", !1), t.events.trigger("edit.off"), t.events.enableBlur(), n = !0
  1453. },
  1454. disableDesign: e,
  1455. isDisabled: r
  1456. }
  1457. }, $e.MODULES.format = function(m) {
  1458. var v = m.$;
  1459. function f(e, t) {
  1460. var n = "<".concat(e);
  1461. for (var r in t) Object.prototype.hasOwnProperty.call(t, r) && (n += " ".concat(r, '="').concat(t[r], '"'));
  1462. return n += ">"
  1463. }
  1464. function p(e, t) {
  1465. var n = e;
  1466. for (var r in t) Object.prototype.hasOwnProperty.call(t, r) && (n += "id" === r ? "#".concat(t[r]) : "class" === r ? ".".concat(t[r]) : "[".concat(r, '="').concat(t[r], '"]'));
  1467. return n
  1468. }
  1469. function u(e, t) {
  1470. return !(!e || e.nodeType !== Node.ELEMENT_NODE) && (e.matches || e.matchesSelector || e.msMatchesSelector || e.mozMatchesSelector || e.webkitMatchesSelector || e.oMatchesSelector).call(e, t)
  1471. }
  1472. function b(e, t, n) {
  1473. if (e) {
  1474. for (; e.nodeType === Node.COMMENT_NODE;) e = e.nextSibling;
  1475. if (e) {
  1476. if (m.node.isBlock(e) && "HR" !== e.tagName) return m.node.hasClass(e.firstChild, "fr-marker") ? b(e.firstChild.nextSibling, t, n) : b(e.firstChild, t, n), !1;
  1477. var r = v(m.doc.createElement(t));
  1478. r.attr(n), r.insertBefore(e);
  1479. for (var a = e; a && !v(a).is(".fr-marker") && 0 === v(a).find(".fr-marker").length && "UL" !== a.tagName && "OL" !== a.tagName;) {
  1480. var o = a;
  1481. if (m.node.isBlock(a) && "HR" !== e.tagName) return b(a.firstChild, t, n), !1;
  1482. a = a.nextSibling, r.append(o)
  1483. }
  1484. if (a) {
  1485. if (v(a).find(".fr-marker").length || "UL" === a.tagName || "OL" === a.tagName) b(a.firstChild, t, n);
  1486. else if (m.browser.mozilla && m.node.hasClass(a, "fr-marker")) {
  1487. var i, s = m.selection.blocks(),
  1488. l = s.length;
  1489. for (i = 0; i < l; i++) s[i] != a.parentNode && s[i].childNodes.length && s[i].childNodes[0] != a.parentNode && (a = s[i].childNodes[1] || s[i].childNodes[0], (r = v(f(t, n)).insertBefore(a)).append(a))
  1490. }
  1491. } else {
  1492. for (var c = r.get(0).parentNode; c && !c.nextSibling && !m.node.isElement(c);) c = c.parentNode;
  1493. if (c) {
  1494. var d = c.nextSibling;
  1495. d && (m.node.isBlock(d) ? "HR" === d.tagName ? b(d.nextSibling, t, n) : b(d.firstChild, t, n) : b(d, t, n))
  1496. }
  1497. }
  1498. r.is(":empty") && r.remove()
  1499. }
  1500. }
  1501. }
  1502. function n(e, t) {
  1503. var n;
  1504. if (void 0 === t && (t = {}), t.style && delete t.style, m.selection.isCollapsed()) {
  1505. m.markers.insert(), m.$el.find(".fr-marker").replaceWith(f(e, t) + $e.INVISIBLE_SPACE + $e.MARKERS + function i(e) {
  1506. return "</".concat(e, ">")
  1507. }(e)), m.selection.restore()
  1508. } else {
  1509. var r;
  1510. m.selection.save(), b(m.$el.find('.fr-marker[data-type="true"]').length && m.$el.find('.fr-marker[data-type="true"]').get(0).nextSibling, e, t);
  1511. do {
  1512. for (r = m.$el.find("".concat(p(e, t), " > ").concat(p(e, t))), n = 0; n < r.length; n++) r[n].outerHTML = r[n].innerHTML
  1513. } while (r.length);
  1514. m.el.normalize();
  1515. var a = m.el.querySelectorAll(".fr-marker");
  1516. for (n = 0; n < a.length; n++) {
  1517. var o = v(a[n]);
  1518. !0 === o.data("type") ? u(o.get(0).nextSibling, p(e, t)) && o.next().prepend(o) : u(o.get(0).previousSibling, p(e, t)) && o.prev().append(o)
  1519. }
  1520. m.selection.restore()
  1521. }
  1522. }
  1523. function E(e, t, n, r) {
  1524. if (!r) {
  1525. var a = !1;
  1526. if (!0 === e.data("type"))
  1527. for (; m.node.isFirstSibling(e.get(0)) && !e.parent().is(m.$el) && !e.parent().is("ol") && !e.parent().is("ul");) e.parent().before(e), a = !0;
  1528. else if (!1 === e.data("type"))
  1529. for (; m.node.isLastSibling(e.get(0)) && !e.parent().is(m.$el) && !e.parent().is("ol") && !e.parent().is("ul");) e.parent().after(e), a = !0;
  1530. if (a) return !0
  1531. }
  1532. if (e.parents(t).length || void 0 === t) {
  1533. var o = "",
  1534. i = "",
  1535. s = e.parent();
  1536. if (s.is(m.$el) || m.node.isBlock(s.get(0))) return !1;
  1537. for (; !(m.node.isBlock(s.parent().get(0)) || void 0 !== t && u(s.get(0), p(t, n)));) o += m.node.closeTagString(s.get(0)), i = m.node.openTagString(s.get(0)) + i, s = s.parent();
  1538. var l = e.get(0).outerHTML;
  1539. e.replaceWith('<span id="mark"></span>');
  1540. var c = s.html().replace(/<span id="mark"><\/span>/, o + m.node.closeTagString(s.get(0)) + i + l + o + m.node.openTagString(s.get(0)) + i);
  1541. return s.replaceWith(m.node.openTagString(s.get(0)) + c + m.node.closeTagString(s.get(0))), !0
  1542. }
  1543. return !1
  1544. }
  1545. function r(e, t) {
  1546. void 0 === t && (t = {}), t.style && delete t.style;
  1547. var n = m.selection.isCollapsed();
  1548. m.selection.save();
  1549. for (var r = !0; r;) {
  1550. r = !1;
  1551. for (var a = m.$el.find(".fr-marker"), o = 0; o < a.length; o++) {
  1552. var i = v(a[o]),
  1553. s = null;
  1554. if (i.attr("data-cloned") || n || (s = i.clone().removeClass("fr-marker").addClass("fr-clone"), i.data("type") && "true" === i.data("type").toString() ? i.attr("data-cloned", !0).after(s) : i.attr("data-cloned", !0).before(s)), E(i, e, t, n)) {
  1555. r = !0;
  1556. break
  1557. }
  1558. }
  1559. }! function d(e, t, n, r) {
  1560. for (var a = m.node.contents(e.get(0)), o = 0; o < a.length; o++) {
  1561. var i = a[o];
  1562. if (m.node.hasClass(i, "fr-marker")) t = (t + 1) % 2;
  1563. else if (t)
  1564. if (0 < v(i).find(".fr-marker").length) t = d(v(i), t, n, r);
  1565. else {
  1566. for (var s = v(i).find(n || "*:not(br)"), l = s.length - 1; 0 <= l; l--) {
  1567. var c = s[l];
  1568. m.node.isBlock(c) || m.node.isVoid(c) || void 0 !== n && !u(c, p(n, r)) ? m.node.isBlock(c) && void 0 === n && "TABLE" !== i.tagName && m.node.clearAttributes(c) : m.node.hasClass(c, "fr-clone") || (c.outerHTML = c.innerHTML)
  1569. }
  1570. void 0 === n && i.nodeType === Node.ELEMENT_NODE && !m.node.isVoid(i) || u(i, p(n, r)) ? m.node.isBlock(i) || m.node.hasClass(i, "fr-clone") || (i.outerHTML = i.innerHTML) : void 0 === n && i.nodeType === Node.ELEMENT_NODE && m.node.isBlock(i) && "TABLE" !== i.tagName && m.node.clearAttributes(i)
  1571. } else 0 < v(i).find(".fr-marker").length && (t = d(v(i), t, n, r))
  1572. }
  1573. return t
  1574. }(m.$el, 0, e, t), n || (m.$el.find(".fr-marker").remove(), m.$el.find(".fr-clone").removeClass("fr-clone").addClass("fr-marker")), n && m.$el.find(".fr-marker").before($e.INVISIBLE_SPACE).after($e.INVISIBLE_SPACE), m.html.cleanEmptyTags(), m.el.normalize(), m.selection.restore()
  1575. }
  1576. function t(e, t) {
  1577. var n, r, a, o, i, s = null;
  1578. if (m.selection.isCollapsed()) {
  1579. m.markers.insert();
  1580. var l = (r = m.$el.find(".fr-marker")).parent();
  1581. if (m.node.openTagString(l.get(0)) === '<span style="'.concat(e, ": ").concat(l.css(e), ';">')) {
  1582. if (m.node.isEmpty(l.get(0))) s = v(m.doc.createElement("span")).attr("style", "".concat(e, ": ").concat(t, ";")).html("".concat($e.INVISIBLE_SPACE).concat($e.MARKERS)), l.replaceWith(s);
  1583. else {
  1584. var c = {};
  1585. c["style*"] = "".concat(e, ":"), E(r, "span", c, !0), r = m.$el.find(".fr-marker"), t ? (s = v(m.doc.createElement("span")).attr("style", "".concat(e, ": ").concat(t, ";")).html("".concat($e.INVISIBLE_SPACE).concat($e.MARKERS)), r.replaceWith(s)) : r.replaceWith($e.INVISIBLE_SPACE + $e.MARKERS)
  1586. }
  1587. m.html.cleanEmptyTags()
  1588. } else m.node.isEmpty(l.get(0)) && l.is("span") ? (r.replaceWith($e.MARKERS), l.css(e, t)) : (s = v('<span style="'.concat(e, ": ").concat(t, ';">').concat($e.INVISIBLE_SPACE).concat($e.MARKERS, "</span>")), r.replaceWith(s));
  1589. s && T(s, e, t)
  1590. } else {
  1591. if (m.selection.save(), null === t || "color" === e && 0 < m.$el.find(".fr-marker").parents("u, a").length) {
  1592. var d = m.$el.find(".fr-marker");
  1593. for (n = 0; n < d.length; n++)
  1594. if (!0 === (r = v(d[n])).data("type") || "true" === r.data("type"))
  1595. for (; m.node.isFirstSibling(r.get(0)) && !r.parent().is(m.$el) && !m.node.isElement(r.parent().get(0)) && !m.node.isBlock(r.parent().get(0));) r.parent().before(r);
  1596. else
  1597. for (; m.node.isLastSibling(r.get(0)) && !r.parent().is(m.$el) && !m.node.isElement(r.parent().get(0)) && !m.node.isBlock(r.parent().get(0));) r.parent().after(r)
  1598. }
  1599. for (var f = m.$el.find('.fr-marker[data-type="true"]').get(0).nextSibling; f.firstChild;) f = f.firstChild;
  1600. var p = {
  1601. "class": "fr-unprocessed"
  1602. };
  1603. for (t && (p.style = "".concat(e, ": ").concat(t, ";")), b(f, "span", p), m.$el.find(".fr-marker + .fr-unprocessed").each(function() {
  1604. v(this).prepend(v(this).prev())
  1605. }), m.$el.find(".fr-unprocessed + .fr-marker").each(function() {
  1606. v(this).prev().append(v(this))
  1607. }), (t || "").match(/\dem$/) && m.$el.find("span.fr-unprocessed").removeClass("fr-unprocessed"); 0 < m.$el.find("span.fr-unprocessed").length;) {
  1608. if ((s = m.$el.find("span.fr-unprocessed").first().removeClass("fr-unprocessed")).parent().get(0).normalize(), s.parent().is("span") && 1 === s.parent().get(0).childNodes.length) {
  1609. s.parent().css(e, t);
  1610. var u = s;
  1611. s = s.parent(), u.replaceWith(u.html())
  1612. }
  1613. var h = s.find("span");
  1614. for (n = h.length - 1; 0 <= n; n--) a = h[n], o = e, i = void 0, (i = v(a)).css(o, ""), "" === i.attr("style") && i.replaceWith(i.html());
  1615. T(s, e, t)
  1616. }
  1617. }! function g() {
  1618. var e;
  1619. for (; 0 < m.$el.find(".fr-split:empty").length;) m.$el.find(".fr-split:empty").remove();
  1620. m.$el.find(".fr-split").removeClass("fr-split"), m.$el.find('[style=""]').removeAttr("style"), m.$el.find('[class=""]').removeAttr("class"), m.html.cleanEmptyTags();
  1621. for (var t = m.$el.find("span"), n = t.length - 1; 0 <= n; n--) {
  1622. var r = t[n];
  1623. r.attributes && 0 !== r.attributes.length || v(r).replaceWith(r.innerHTML)
  1624. }
  1625. m.el.normalize();
  1626. var a = m.$el.find("span[style] + span[style]");
  1627. for (e = 0; e < a.length; e++) {
  1628. var o = v(a[e]),
  1629. i = v(a[e]).prev();
  1630. o.get(0).previousSibling === i.get(0) && m.node.openTagString(o.get(0)) === m.node.openTagString(i.get(0)) && (o.prepend(i.html()), i.remove())
  1631. }
  1632. m.$el.find("span[style] span[style]").each(function() {
  1633. if (0 <= v(this).attr("style").indexOf("font-size")) {
  1634. var e = v(this).parents("span[style]");
  1635. 0 <= e.attr("style").indexOf("background-color") && (v(this).attr("style", "".concat(v(this).attr("style"), ";").concat(e.attr("style"))), E(v(this), "span[style]", {}, !1))
  1636. }
  1637. }), m.el.normalize(), m.selection.restore()
  1638. }()
  1639. }
  1640. function T(e, t, n) {
  1641. var r, a, o, i = e.parentsUntil(m.$el, "span[style]"),
  1642. s = [];
  1643. for (r = i.length - 1; 0 <= r; r--) a = i[r], o = t, 0 === v(a).attr("style").indexOf("".concat(o, ":")) || 0 <= v(a).attr("style").indexOf(";".concat(o, ":")) || 0 <= v(a).attr("style").indexOf("; ".concat(o, ":")) || s.push(i[r]);
  1644. if ((i = i.not(s)).length) {
  1645. for (var l = "", c = "", d = "", f = "", p = e.get(0); p = p.parentNode, v(p).addClass("fr-split"), l += m.node.closeTagString(p), c = m.node.openTagString(v(p).clone().addClass("fr-split").get(0)) + c, i.get(0) !== p && (d += m.node.closeTagString(p), f = m.node.openTagString(v(p).clone().addClass("fr-split").get(0)) + f), i.get(0) !== p;);
  1646. var u = "".concat(l + m.node.openTagString(v(i.get(0)).clone().css(t, n || "").get(0)) + f + e.css(t, "").get(0).outerHTML + d, "</span>").concat(c);
  1647. e.replaceWith('<span id="fr-break"></span>');
  1648. var h = i.get(0).outerHTML;
  1649. v(i.get(0)).replaceWith(h.replace(/<span id="fr-break"><\/span>/g, function() {
  1650. return u
  1651. }))
  1652. }
  1653. }
  1654. function a(e, t) {
  1655. void 0 === t && (t = {}), t.style && delete t.style;
  1656. var n = m.selection.ranges(0),
  1657. r = n.startContainer;
  1658. if (r.nodeType === Node.ELEMENT_NODE && 0 < r.childNodes.length && r.childNodes[n.startOffset] && (r = r.childNodes[n.startOffset]), !n.collapsed && r.nodeType === Node.TEXT_NODE && n.startOffset === (r.textContent || "").length) {
  1659. for (; !m.node.isBlock(r.parentNode) && !r.nextSibling;) r = r.parentNode;
  1660. r.nextSibling && (r = r.nextSibling)
  1661. }
  1662. for (var a = r; a && a.nodeType === Node.ELEMENT_NODE && !u(a, p(e, t));) a = a.firstChild;
  1663. if (a && a.nodeType === Node.ELEMENT_NODE && u(a, p(e, t))) return !0;
  1664. var o = r;
  1665. for (o && o.nodeType !== Node.ELEMENT_NODE && (o = o.parentNode); o && o.nodeType === Node.ELEMENT_NODE && o !== m.el && !u(o, p(e, t));) o = o.parentNode;
  1666. return !(!o || o.nodeType !== Node.ELEMENT_NODE || o === m.el || !u(o, p(e, t)))
  1667. }
  1668. return {
  1669. is: a,
  1670. toggle: function o(e, t) {
  1671. a(e, t) ? r(e, t) : n(e, t)
  1672. },
  1673. apply: n,
  1674. remove: r,
  1675. applyStyle: t,
  1676. removeStyle: function i(e) {
  1677. t(e, null)
  1678. }
  1679. }
  1680. }, $e.MODULES.spaces = function(l) {
  1681. function r(e, t) {
  1682. var n = e.previousSibling,
  1683. r = e.nextSibling,
  1684. a = e.textContent,
  1685. o = e.parentNode;
  1686. if (!l.html.isPreformatted(o)) {
  1687. t && (a = a.replace(/[\f\n\r\t\v ]{2,}/g, " "), r && "BR" !== r.tagName && !l.node.isBlock(r) || !(l.node.isBlock(o) || l.node.isLink(o) && !o.nextSibling || l.node.isElement(o)) || (a = a.replace(/[\f\n\r\t\v ]{1,}$/g, "")), n && "BR" !== n.tagName && !l.node.isBlock(n) || !(l.node.isBlock(o) || l.node.isLink(o) && !o.previousSibling || l.node.isElement(o)) || (a = a.replace(/^[\f\n\r\t\v ]{1,}/g, "")), (l.node.isBlock(r) || l.node.isBlock(n)) && (a = a.replace(/^[\f\n\r\t\v ]{1,}/g, "")), " " === a && (n && l.node.isVoid(n) || r && l.node.isVoid(r)) && !(n && r && l.node.isVoid(n) || r && n && l.node.isVoid(r)) && (a = "")), (!n && l.node.isBlock(r) || !r && l.node.isBlock(n)) && l.node.isBlock(o) && o !== l.el && (a = a.replace(/^[\f\n\r\t\v ]{1,}/g, "")), t || (a = a.replace(new RegExp($e.UNICODE_NBSP, "g"), " "));
  1688. for (var i = "", s = 0; s < a.length; s++) 32 != a.charCodeAt(s) || 0 !== s && 32 != i.charCodeAt(s - 1) || n && r && l.node.isVoid(n) || n && r && l.node.isVoid(r) ? i += a[s] : i += $e.UNICODE_NBSP;
  1689. (!r || r && l.node.isBlock(r) || r && r.nodeType === Node.ELEMENT_NODE && l.win.getComputedStyle(r) && "block" === l.win.getComputedStyle(r).display) && (l.node.isVoid(n) || (i = i.replace(/ $/, $e.UNICODE_NBSP))), !n || l.node.isVoid(n) || l.node.isBlock(n) || 1 !== (i = i.replace(/^\u00A0([^ $])/, " $1")).length || 160 !== i.charCodeAt(0) || !r || l.node.isVoid(r) || l.node.isBlock(r) || l.node.hasClass(n, "fr-marker") && l.node.hasClass(r, "fr-marker") || (i = " "), t || (i = i.replace(/([^ \u00A0])\u00A0([^ \u00A0])/g, "$1 $2")), e.textContent !== i && (e.textContent = i)
  1690. }
  1691. }
  1692. function c(e, t) {
  1693. if (void 0 !== e && e || (e = l.el), void 0 === t && (t = !1), !e.getAttribute || "false" !== e.getAttribute("contenteditable"))
  1694. if (e.nodeType === Node.TEXT_NODE) r(e, t);
  1695. else if (e.nodeType === Node.ELEMENT_NODE)
  1696. for (var n = l.doc.createTreeWalker(e, NodeFilter.SHOW_TEXT, l.node.filter(function(e) {
  1697. for (var t = e.parentNode; t && t !== l.el;) {
  1698. if ("STYLE" === t.tagName || "IFRAME" === t.tagName) return !1;
  1699. if ("PRE" === t.tagName) return !1;
  1700. t = t.parentNode
  1701. }
  1702. return null !== e.textContent.match(/([ \u00A0\f\n\r\t\v]{2,})|(^[ \u00A0\f\n\r\t\v]{1,})|([ \u00A0\f\n\r\t\v]{1,}$)/g) && !l.node.hasClass(e.parentNode, "fr-marker")
  1703. }), !1); n.nextNode();) r(n.currentNode, t)
  1704. }
  1705. return {
  1706. normalize: c,
  1707. normalizeAroundCursor: function d() {
  1708. for (var e = [], t = l.el.querySelectorAll(".fr-marker"), n = 0; n < t.length; n++) {
  1709. for (var r = null, a = l.node.blockParent(t[n]), o = (r = a || t[n]).nextSibling, i = r.previousSibling; o && "BR" === o.tagName;) o = o.nextSibling;
  1710. for (; i && "BR" === i.tagName;) i = i.previousSibling;
  1711. r && e.indexOf(r) < 0 && e.push(r), i && e.indexOf(i) < 0 && e.push(i), o && e.indexOf(o) < 0 && e.push(o)
  1712. }
  1713. for (var s = 0; s < e.length; s++) c(e[s])
  1714. }
  1715. }
  1716. }, $e.START_MARKER = '<span class="fr-marker" data-id="0" data-type="true" style="display: none; line-height: 0;">'.concat($e.INVISIBLE_SPACE = "&#8203;", "</span>"), $e.END_MARKER = '<span class="fr-marker" data-id="0" data-type="false" style="display: none; line-height: 0;">'.concat($e.INVISIBLE_SPACE, "</span>"), $e.MARKERS = $e.START_MARKER + $e.END_MARKER, $e.MODULES.markers = function(d) {
  1717. var f = d.$;
  1718. function l() {
  1719. if (!d.$wp) return null;
  1720. try {
  1721. var e = d.selection.ranges(0),
  1722. t = e.commonAncestorContainer;
  1723. if (t !== d.el && !d.$el.contains(t)) return null;
  1724. var n = e.cloneRange(),
  1725. r = e.cloneRange();
  1726. n.collapse(!0);
  1727. var a = f(d.doc.createElement("SPAN")).addClass("fr-marker").attr("style", "display: none; line-height: 0;").html($e.INVISIBLE_SPACE).get(0);
  1728. if (n.insertNode(a), a = d.$el.find("span.fr-marker").get(0)) {
  1729. for (var o = a.nextSibling; o && o.nodeType === Node.TEXT_NODE && 0 === o.textContent.length;) f(o).remove(), o = d.$el.find("span.fr-marker").get(0).nextSibling;
  1730. return d.selection.clear(), d.selection.get().addRange(r), a
  1731. }
  1732. return null
  1733. } catch (i) {}
  1734. }
  1735. function c() {
  1736. d.$el.find(".fr-marker").remove()
  1737. }
  1738. return {
  1739. place: function p(e, t, n) {
  1740. var r, a, o;
  1741. try {
  1742. var i = e.cloneRange();
  1743. if (i.collapse(t), i.insertNode(function l(e, t) {
  1744. var n = f(d.doc.createElement("SPAN"));
  1745. return n.addClass("fr-marker").attr("data-id", t).attr("data-type", e).attr("style", "display: ".concat(d.browser.safari ? "none" : "inline-block", "; line-height: 0;")).html($e.INVISIBLE_SPACE), n.get(0)
  1746. }(t, n)), !0 === t)
  1747. for (o = (r = d.$el.find('span.fr-marker[data-type="true"][data-id="'.concat(n, '"]')).get(0)).nextSibling; o && o.nodeType === Node.TEXT_NODE && 0 === o.textContent.length;) f(o).remove(), o = r.nextSibling;
  1748. if (!0 === t && !e.collapsed) {
  1749. for (; !d.node.isElement(r.parentNode) && !o;) f(r.parentNode).after(r), o = r.nextSibling;
  1750. if (o && o.nodeType === Node.ELEMENT_NODE && d.node.isBlock(o) && "HR" !== o.tagName) {
  1751. for (a = [o]; o = a[0], (a = d.node.contents(o))[0] && d.node.isBlock(a[0]););
  1752. f(o).prepend(f(r))
  1753. }
  1754. }
  1755. if (!1 === t && !e.collapsed) {
  1756. if ((o = (r = d.$el.find('span.fr-marker[data-type="false"][data-id="'.concat(n, '"]')).get(0)).previousSibling) && o.nodeType === Node.ELEMENT_NODE && d.node.isBlock(o) && "HR" !== o.tagName) {
  1757. for (a = [o]; o = a[a.length - 1], (a = d.node.contents(o))[a.length - 1] && d.node.isBlock(a[a.length - 1]););
  1758. f(o).append(f(r))
  1759. }(r.parentNode && 0 <= ["TD", "TH"].indexOf(r.parentNode.tagName) || !r.previousSibling && d.node.isBlock(r.parentElement)) && r.parentNode.previousSibling && !r.previousSibling && f(r.parentNode.previousSibling).append(r)
  1760. }
  1761. var s = d.$el.find('span.fr-marker[data-type="'.concat(t, '"][data-id="').concat(n, '"]')).get(0);
  1762. return s && (s.style.display = "none"), s
  1763. } catch (c) {
  1764. return null
  1765. }
  1766. },
  1767. insert: l,
  1768. split: function i() {
  1769. d.selection.isCollapsed() || d.selection.remove();
  1770. var e = d.$el.find(".fr-marker").get(0);
  1771. if (e || (e = l()), !e) return null;
  1772. var t = d.node.deepestParent(e);
  1773. if (t || (t = d.node.blockParent(e)) && "LI" !== t.tagName && (t = null), t)
  1774. if (d.node.isBlock(t) && d.node.isEmpty(t)) "LI" !== t.tagName || t.parentNode.firstElementChild !== t || d.node.isEmpty(t.parentNode) ? f(t).replaceWith('<span class="fr-marker"></span>') : f(t).append('<span class="fr-marker"></span>');
  1775. else if (d.cursor.isAtStart(e, t)) f(t).before('<span class="fr-marker"></span>'), f(e).remove();
  1776. else if (d.cursor.isAtEnd(e, t)) f(t).after('<span class="fr-marker"></span>'), f(e).remove();
  1777. else {
  1778. for (var n = e, r = "", a = ""; n = n.parentNode, r += d.node.closeTagString(n), a = d.node.openTagString(n) + a, n !== t;);
  1779. f(e).replaceWith('<span id="fr-break"></span>');
  1780. var o = d.node.openTagString(t) + f(t).html() + d.node.closeTagString(t);
  1781. o = o.replace(/<span id="fr-break"><\/span>/g, "".concat(r, '<span class="fr-marker"></span>').concat(a)), f(t).replaceWith(o)
  1782. }
  1783. return d.$el.find(".fr-marker").get(0)
  1784. },
  1785. insertAtPoint: function u(e) {
  1786. var t, n = e.clientX,
  1787. r = e.clientY;
  1788. c();
  1789. var a = null;
  1790. if ("undefined" != typeof d.doc.caretPositionFromPoint ? (t = d.doc.caretPositionFromPoint(n, r), (a = d.doc.createRange()).setStart(t.offsetNode, t.offset), a.setEnd(t.offsetNode, t.offset)) : "undefined" != typeof d.doc.caretRangeFromPoint && (t = d.doc.caretRangeFromPoint(n, r), (a = d.doc.createRange()).setStart(t.startContainer, t.startOffset), a.setEnd(t.startContainer, t.startOffset)), null !== a && "undefined" != typeof d.win.getSelection) {
  1791. var o = d.win.getSelection();
  1792. o.removeAllRanges(), o.addRange(a)
  1793. } else if ("undefined" != typeof d.doc.body.createTextRange) try {
  1794. (a = d.doc.body.createTextRange()).moveToPoint(n, r);
  1795. var i = a.duplicate();
  1796. i.moveToPoint(n, r), a.setEndPoint("EndToEnd", i), a.select()
  1797. } catch (s) {
  1798. return !1
  1799. }
  1800. l()
  1801. },
  1802. remove: c
  1803. }
  1804. }, $e.MODULES.selection = function(A) {
  1805. var C = A.$;
  1806. function s() {
  1807. var e = "";
  1808. return A.win.getSelection ? e = A.win.getSelection() : A.doc.getSelection ? e = A.doc.getSelection() : A.doc.selection && (e = A.doc.selection.createRange().text), e.toString()
  1809. }
  1810. function T() {
  1811. return A.win.getSelection ? A.win.getSelection() : A.doc.getSelection ? A.doc.getSelection() : A.doc.selection.createRange()
  1812. }
  1813. function d(e) {
  1814. var t = T(),
  1815. n = [];
  1816. if (t && t.getRangeAt && t.rangeCount) {
  1817. n = [];
  1818. for (var r = 0; r < t.rangeCount; r++) n.push(t.getRangeAt(r))
  1819. } else n = A.doc.createRange ? [A.doc.createRange()] : [];
  1820. return void 0 !== e ? n[e] : n
  1821. }
  1822. function S() {
  1823. var e = T();
  1824. try {
  1825. e.removeAllRanges ? e.removeAllRanges() : e.empty ? e.empty() : e.clear && e.clear()
  1826. } catch (t) {}
  1827. }
  1828. function f(e, t) {
  1829. var n = e;
  1830. return n.nodeType === Node.ELEMENT_NODE && 0 < n.childNodes.length && n.childNodes[t] && (n = n.childNodes[t]), n.nodeType === Node.TEXT_NODE && (n = n.parentNode), n
  1831. }
  1832. function y() {
  1833. if (A.$wp) {
  1834. A.markers.remove();
  1835. var e, t, n = d(),
  1836. r = [];
  1837. for (t = 0; t < n.length; t++)
  1838. if (n[t].startContainer !== A.doc || A.browser.msie) {
  1839. var a = (e = n[t]).collapsed,
  1840. o = A.markers.place(e, !0, t),
  1841. i = A.markers.place(e, !1, t);
  1842. if (void 0 !== o && o || !a || (C(".fr-marker").remove(), A.selection.setAtEnd(A.el)), A.el.normalize(), A.browser.safari && !a) try {
  1843. (e = A.doc.createRange()).setStartAfter(o), e.setEndBefore(i), r.push(e)
  1844. } catch (s) {}
  1845. }
  1846. if (A.browser.safari && r.length)
  1847. for (A.selection.clear(), t = 0; t < r.length; t++) A.selection.get().addRange(r[t])
  1848. }
  1849. }
  1850. function R() {
  1851. var e, t = A.el.querySelectorAll('.fr-marker[data-type="true"]');
  1852. if (!A.$wp) return A.markers.remove(), !1;
  1853. if (0 === t.length) return !1;
  1854. if (A.browser.msie || A.browser.edge)
  1855. for (e = 0; e < t.length; e++) t[e].style.display = "inline-block";
  1856. A.core.hasFocus() || A.browser.msie || A.browser.webkit || A.$el.focus(), S();
  1857. var n = T();
  1858. for (e = 0; e < t.length; e++) {
  1859. var r = C(t[e]).data("id"),
  1860. a = t[e],
  1861. o = A.doc.createRange(),
  1862. i = A.$el.find('.fr-marker[data-type="false"][data-id="'.concat(r, '"]'));
  1863. (A.browser.msie || A.browser.edge) && i.css("display", "inline-block");
  1864. var s = null;
  1865. if (0 < i.length) {
  1866. i = i[0];
  1867. try {
  1868. for (var l = !1, c = a.nextSibling, d = null; c && c.nodeType === Node.TEXT_NODE && 0 === c.textContent.length;) c = (d = c).nextSibling, C(d).remove();
  1869. for (var f = i.nextSibling; f && f.nodeType === Node.TEXT_NODE && 0 === f.textContent.length;) f = (d = f).nextSibling, C(d).remove();
  1870. if (a.nextSibling === i || i.nextSibling === a) {
  1871. for (var p = a.nextSibling === i ? a : i, u = p === a ? i : a, h = p.previousSibling; h && h.nodeType === Node.TEXT_NODE && 0 === h.length;) h = (d = h).previousSibling, C(d).remove();
  1872. if (h && h.nodeType === Node.TEXT_NODE)
  1873. for (; h && h.previousSibling && h.previousSibling.nodeType === Node.TEXT_NODE;) h.previousSibling.textContent += h.textContent, h = h.previousSibling, C(h.nextSibling).remove();
  1874. for (var g = u.nextSibling; g && g.nodeType === Node.TEXT_NODE && 0 === g.length;) g = (d = g).nextSibling, C(d).remove();
  1875. if (g && g.nodeType === Node.TEXT_NODE)
  1876. for (; g && g.nextSibling && g.nextSibling.nodeType === Node.TEXT_NODE;) g.nextSibling.textContent = g.textContent + g.nextSibling.textContent, g = g.nextSibling, C(g.previousSibling).remove();
  1877. if (h && (A.node.isVoid(h) || A.node.isBlock(h)) && (h = null), g && (A.node.isVoid(g) || A.node.isBlock(g)) && (g = null), h && g && h.nodeType === Node.TEXT_NODE && g.nodeType === Node.TEXT_NODE) {
  1878. C(a).remove(), C(i).remove();
  1879. var m = h.textContent.length;
  1880. h.textContent += g.textContent, C(g).remove(), A.opts.htmlUntouched || A.spaces.normalize(h), o.setStart(h, m), o.setEnd(h, m), l = !0
  1881. } else !h && g && g.nodeType === Node.TEXT_NODE ? (C(a).remove(), C(i).remove(), A.opts.htmlUntouched || A.spaces.normalize(g), s = C(A.doc.createTextNode("\u200b")).get(0), C(g).before(s), o.setStart(g, 0), o.setEnd(g, 0), l = !0) : !g && h && h.nodeType === Node.TEXT_NODE && (C(a).remove(), C(i).remove(), A.opts.htmlUntouched || A.spaces.normalize(h), s = C(A.doc.createTextNode("\u200b")).get(0), C(h).after(s), o.setStart(h, h.textContent.length), o.setEnd(h, h.textContent.length), l = !0)
  1882. }
  1883. if (!l) {
  1884. var v = void 0,
  1885. b = void 0;
  1886. b = (A.browser.chrome || A.browser.edge) && a.nextSibling === i ? (v = L(i, o, !0) || o.setStartAfter(i), L(a, o, !1) || o.setEndBefore(a)) : (a.previousSibling === i && (i = (a = i).nextSibling), i.nextSibling && "BR" === i.nextSibling.tagName || !i.nextSibling && A.node.isBlock(a.previousSibling) || a.previousSibling && "BR" === a.previousSibling.tagName || (a.style.display = "inline", i.style.display = "inline", s = C(A.doc.createTextNode("\u200b")).get(0)), v = L(a, o, !0) || C(a).before(s) && o.setStartBefore(a), L(i, o, !1) || C(i).after(s) && o.setEndAfter(i)), "function" == typeof v && v(), "function" == typeof b && b()
  1887. }
  1888. } catch (E) {}
  1889. }
  1890. s && C(s).remove();
  1891. try {
  1892. n.addRange(o)
  1893. } catch (E) {}
  1894. }
  1895. A.markers.remove()
  1896. }
  1897. function L(e, t, n) {
  1898. var r, a = e.previousSibling,
  1899. o = e.nextSibling;
  1900. return a && o && a.nodeType === Node.TEXT_NODE && o.nodeType === Node.TEXT_NODE ? (r = a.textContent.length, n ? (o.textContent = a.textContent + o.textContent, C(a).remove(), C(e).remove(), A.opts.htmlUntouched || A.spaces.normalize(o), function() {
  1901. t.setStart(o, r)
  1902. }) : (a.textContent += o.textContent, C(o).remove(), C(e).remove(), A.opts.htmlUntouched || A.spaces.normalize(a), function() {
  1903. t.setEnd(a, r)
  1904. })) : a && !o && a.nodeType === Node.TEXT_NODE ? (r = a.textContent.length, n ? (A.opts.htmlUntouched || A.spaces.normalize(a), function() {
  1905. t.setStart(a, r)
  1906. }) : (A.opts.htmlUntouched || A.spaces.normalize(a), function() {
  1907. t.setEnd(a, r)
  1908. })) : !(!o || a || o.nodeType !== Node.TEXT_NODE) && (n ? (A.opts.htmlUntouched || A.spaces.normalize(o), function() {
  1909. t.setStart(o, 0)
  1910. }) : (A.opts.htmlUntouched || A.spaces.normalize(o), function() {
  1911. t.setEnd(o, 0)
  1912. }))
  1913. }
  1914. function w() {
  1915. for (var e = d(), t = 0; t < e.length; t++)
  1916. if (!e[t].collapsed) return !1;
  1917. return !0
  1918. }
  1919. function a(e) {
  1920. var t, n, r = !1,
  1921. a = !1;
  1922. if (A.win.getSelection) {
  1923. var o = A.win.getSelection();
  1924. o.rangeCount && ((n = (t = o.getRangeAt(0)).cloneRange()).selectNodeContents(e), n.setEnd(t.startContainer, t.startOffset), r = "" === n.toString(), n.selectNodeContents(e), n.setStart(t.endContainer, t.endOffset), a = "" === n.toString())
  1925. } else A.doc.selection && "Control" !== A.doc.selection.type && ((n = (t = A.doc.selection.createRange()).duplicate()).moveToElementText(e), n.setEndPoint("EndToStart", t), r = "" === n.text, n.moveToElementText(e), n.setEndPoint("StartToEnd", t), a = "" === n.text);
  1926. return {
  1927. atStart: r,
  1928. atEnd: a
  1929. }
  1930. }
  1931. function _(e, t) {
  1932. void 0 === t && (t = !0);
  1933. var n = C(e).html();
  1934. n && n.replace(/\u200b/g, "").length !== n.length && C(e).html(n.replace(/\u200b/g, ""));
  1935. for (var r = A.node.contents(e), a = 0; a < r.length; a++) r[a].nodeType !== Node.ELEMENT_NODE ? C(r[a]).remove() : (_(r[a], 0 === a), 0 === a && (t = !1));
  1936. if (e.nodeType === Node.TEXT_NODE) {
  1937. var o = C(document.createElement("span")).attr("data-first", "true").attr("data-text", "true");
  1938. C(e)[0].replaceWith(o[0])
  1939. } else t && C(e).attr("data-first", !0)
  1940. }
  1941. function O() {
  1942. return 0 === C(this).find("fr-inner").length
  1943. }
  1944. function p() {
  1945. try {
  1946. if (!A.$wp) return !1;
  1947. for (var e = d(0).commonAncestorContainer; e && !A.node.isElement(e);) e = e.parentNode;
  1948. return !!A.node.isElement(e)
  1949. } catch (t) {
  1950. return !1
  1951. }
  1952. }
  1953. function r(e, t) {
  1954. if (!e || 0 < e.getElementsByClassName("fr-marker").length) return !1;
  1955. for (var n = e.firstChild; n && (A.node.isBlock(n) || t && !A.node.isVoid(n) && n.nodeType === Node.ELEMENT_NODE);) n = (e = n).firstChild;
  1956. e.innerHTML = $e.MARKERS + e.innerHTML
  1957. }
  1958. function o(e, t) {
  1959. if (!e || 0 < e.getElementsByClassName("fr-marker").length) return !1;
  1960. for (var n = e.lastChild; n && (A.node.isBlock(n) || t && !A.node.isVoid(n) && n.nodeType === Node.ELEMENT_NODE);) n = (e = n).lastChild;
  1961. var r = A.doc.createElement("SPAN");
  1962. for (r.setAttribute("id", "fr-sel-markers"), r.innerHTML = $e.MARKERS; e.parentNode && A.opts.htmlAllowedEmptyTags && 0 <= A.opts.htmlAllowedEmptyTags.indexOf(e.tagName.toLowerCase());) e = e.parentNode;
  1963. e.appendChild(r);
  1964. var a = e.querySelector("#fr-sel-markers");
  1965. a.outerHTML = a.innerHTML
  1966. }
  1967. return {
  1968. text: s,
  1969. get: T,
  1970. ranges: d,
  1971. clear: S,
  1972. element: function l() {
  1973. var e = T();
  1974. try {
  1975. if (e.rangeCount) {
  1976. var t, n = d(0),
  1977. r = n.startContainer;
  1978. if (A.node.isElement(r) && 0 === n.startOffset && r.childNodes.length)
  1979. for (; r.childNodes.length && r.childNodes[0].nodeType === Node.ELEMENT_NODE;) r = r.childNodes[0];
  1980. if (r.nodeType === Node.TEXT_NODE && n.startOffset === (r.textContent || "").length && r.nextSibling && (r = r.nextSibling), r.nodeType === Node.ELEMENT_NODE) {
  1981. var a = !1;
  1982. if (0 < r.childNodes.length && r.childNodes[n.startOffset]) {
  1983. for (t = r.childNodes[n.startOffset]; t && t.nodeType === Node.TEXT_NODE && 0 === t.textContent.length;) t = t.nextSibling;
  1984. if (t && t.textContent.replace(/\u200B/g, "") === s().replace(/\u200B/g, "") && (r = t, a = !0), !a && 1 < r.childNodes.length && 0 < n.startOffset && r.childNodes[n.startOffset - 1]) {
  1985. for (t = r.childNodes[n.startOffset - 1]; t && t.nodeType === Node.TEXT_NODE && 0 === t.textContent.length;) t = t.nextSibling;
  1986. t && t.textContent.replace(/\u200B/g, "") === s().replace(/\u200B/g, "") && (r = t, a = !0)
  1987. }
  1988. } else !n.collapsed && r.nextSibling && r.nextSibling.nodeType === Node.ELEMENT_NODE && (t = r.nextSibling) && t.textContent.replace(/\u200B/g, "") === s().replace(/\u200B/g, "") && (r = t, a = !0);
  1989. !a && 0 < r.childNodes.length && C(r.childNodes[0]).text().replace(/\u200B/g, "") === s().replace(/\u200B/g, "") && ["BR", "IMG", "HR"].indexOf(r.childNodes[0].tagName) < 0 && (r = r.childNodes[0])
  1990. }
  1991. for (; r.nodeType !== Node.ELEMENT_NODE && r.parentNode;) r = r.parentNode;
  1992. for (var o = r; o && "HTML" !== o.tagName;) {
  1993. if (o === A.el) return r;
  1994. o = C(o).parent()[0]
  1995. }
  1996. }
  1997. } catch (i) {}
  1998. return A.el
  1999. },
  2000. endElement: function c() {
  2001. var e = T();
  2002. try {
  2003. if (e.rangeCount) {
  2004. var t, n = d(0),
  2005. r = n.endContainer;
  2006. if (r.nodeType === Node.ELEMENT_NODE) {
  2007. var a = !1;
  2008. 0 < r.childNodes.length && r.childNodes[n.endOffset] && C(r.childNodes[n.endOffset]).text() === s() ? (r = r.childNodes[n.endOffset], a = !0) : !n.collapsed && r.previousSibling && r.previousSibling.nodeType === Node.ELEMENT_NODE ? (t = r.previousSibling) && t.textContent.replace(/\u200B/g, "") === s().replace(/\u200B/g, "") && (r = t, a = !0) : !n.collapsed && 0 < r.childNodes.length && r.childNodes[n.endOffset] && (t = r.childNodes[n.endOffset].previousSibling).nodeType === Node.ELEMENT_NODE && t && t.textContent.replace(/\u200B/g, "") === s().replace(/\u200B/g, "") && (r = t, a = !0), !a && 0 < r.childNodes.length && C(r.childNodes[r.childNodes.length - 1]).text() === s() && ["BR", "IMG", "HR"].indexOf(r.childNodes[r.childNodes.length - 1].tagName) < 0 && (r = r.childNodes[r.childNodes.length - 1])
  2009. }
  2010. for (r.nodeType === Node.TEXT_NODE && 0 === n.endOffset && r.previousSibling && r.previousSibling.nodeType === Node.ELEMENT_NODE && (r = r.previousSibling); r.nodeType !== Node.ELEMENT_NODE && r.parentNode;) r = r.parentNode;
  2011. for (var o = r; o && "HTML" !== o.tagName;) {
  2012. if (o === A.el) return r;
  2013. o = C(o).parent()[0]
  2014. }
  2015. }
  2016. } catch (i) {}
  2017. return A.el
  2018. },
  2019. save: y,
  2020. restore: R,
  2021. isCollapsed: w,
  2022. isFull: function i() {
  2023. if (w()) return !1;
  2024. A.selection.save();
  2025. var e, t = A.el.querySelectorAll("td, th, img, br");
  2026. for (e = 0; e < t.length; e++) t[e].nextSibling && (t[e].innerHTML = '<span class="fr-mk">'.concat($e.INVISIBLE_SPACE, "</span>").concat(t[e].innerHTML));
  2027. var n = !1,
  2028. r = a(A.el);
  2029. for (r.atStart && r.atEnd && (n = !0), t = A.el.querySelectorAll(".fr-mk"), e = 0; e < t.length; e++) t[e].parentNode.removeChild(t[e]);
  2030. return A.selection.restore(), n
  2031. },
  2032. inEditor: p,
  2033. remove: function N() {
  2034. if (w()) return !0;
  2035. var e;
  2036. function t(e) {
  2037. for (var t = e.previousSibling; t && t.nodeType === Node.TEXT_NODE && 0 === t.textContent.length;) {
  2038. var n = t;
  2039. t = t.previousSibling, C(n).remove()
  2040. }
  2041. return t
  2042. }
  2043. function n(e) {
  2044. for (var t = e.nextSibling; t && t.nodeType === Node.TEXT_NODE && 0 === t.textContent.length;) {
  2045. var n = t;
  2046. t = t.nextSibling, C(n).remove()
  2047. }
  2048. return t
  2049. }
  2050. y();
  2051. var r = A.$el.find('.fr-marker[data-type="true"]');
  2052. for (e = 0; e < r.length; e++)
  2053. for (var a = r[e]; !(t(a) || A.node.isBlock(a.parentNode) || A.$el.is(a.parentNode) || A.node.hasClass(a.parentNode, "fr-inner"));) C(a.parentNode).before(a);
  2054. var o = A.$el.find('.fr-marker[data-type="false"]');
  2055. for (e = 0; e < o.length; e++) {
  2056. for (var i = o[e]; !(n(i) || A.node.isBlock(i.parentNode) || A.$el.is(i.parentNode) || A.node.hasClass(i.parentNode, "fr-inner"));) C(i.parentNode).after(i);
  2057. i.parentNode && A.node.isBlock(i.parentNode) && A.node.isEmpty(i.parentNode) && !A.$el.is(i.parentNode) && !A.node.hasClass(i.parentNode, "fr-inner") && A.opts.keepFormatOnDelete && C(i.parentNode).after(i)
  2058. }
  2059. if (function E() {
  2060. for (var e = A.$el.find(".fr-marker"), t = 0; t < e.length; t++)
  2061. if (C(e[t]).parentsUntil('.fr-element, [contenteditable="true"]', '[contenteditable="false"]').length) return !1;
  2062. return !0
  2063. }()) {
  2064. ! function T(e, t) {
  2065. var n = A.node.contents(e.get(0));
  2066. 0 <= ["TD", "TH"].indexOf(e.get(0).tagName) && 1 === e.find(".fr-marker").length && (A.node.hasClass(n[0], "fr-marker") || "BR" == n[0].tagName && A.node.hasClass(n[0].nextElementSibling, "fr-marker")) && e.attr("data-del-cell", !0);
  2067. for (var r = 0; r < n.length; r++) {
  2068. var a = n[r];
  2069. A.node.hasClass(a, "fr-marker") ? t = (t + 1) % 2 : t ? 0 < C(a).find(".fr-marker").length ? t = T(C(a), t) : ["TD", "TH"].indexOf(a.tagName) < 0 && !A.node.hasClass(a, "fr-inner") ? !A.opts.keepFormatOnDelete || 0 < A.$el.find("[data-first]").length || A.node.isVoid(a) ? C(a).remove() : _(a) : A.node.hasClass(a, "fr-inner") ? 0 === C(a).find(".fr-inner").length ? C(a).html("<br>") : C(a).find(".fr-inner").filter(O).html("<br>") : (C(a).empty(), C(a).attr("data-del-cell", !0)) : 0 < C(a).find(".fr-marker").length && (t = T(C(a), t))
  2070. }
  2071. return t
  2072. }(A.$el, 0);
  2073. var s = A.$el.find('[data-first="true"]');
  2074. if (s.length) A.$el.find(".fr-marker").remove(), s.append($e.INVISIBLE_SPACE + $e.MARKERS).removeAttr("data-first"), s.attr("data-text") && s.replaceWith(s.html());
  2075. else
  2076. for (A.$el.find("table").filter(function() {
  2077. return 0 < C(this).find("[data-del-cell]").length && C(this).find("[data-del-cell]").length === C(this).find("td, th").length
  2078. }).remove(), A.$el.find("[data-del-cell]").removeAttr("data-del-cell"), r = A.$el.find('.fr-marker[data-type="true"]'), e = 0; e < r.length; e++) {
  2079. var l = r[e],
  2080. c = l.nextSibling,
  2081. d = A.$el.find('.fr-marker[data-type="false"][data-id="'.concat(C(l).data("id"), '"]')).get(0);
  2082. if (d) {
  2083. if (l && (!c || c !== d)) {
  2084. var f = A.node.blockParent(l),
  2085. p = A.node.blockParent(d),
  2086. u = !1,
  2087. h = !1;
  2088. if (f && 0 <= ["UL", "OL"].indexOf(f.tagName) && (u = !(f = null)), p && 0 <= ["UL", "OL"].indexOf(p.tagName) && (h = !(p = null)), C(l).after(d), f !== p)
  2089. if (null !== f || u)
  2090. if (null !== p || h || 0 !== C(f).parentsUntil(A.$el, "table").length) f && p && 0 === C(f).parentsUntil(A.$el, "table").length && 0 === C(p).parentsUntil(A.$el, "table").length && !C(f).contains(p) && !C(p).contains(f) && (C(f).append(C(p).html()), C(p).remove());
  2091. else {
  2092. for (c = f; !c.nextSibling && c.parentNode !== A.el;) c = c.parentNode;
  2093. for (c = c.nextSibling; c && "BR" !== c.tagName;) {
  2094. var g = c.nextSibling;
  2095. C(f).append(c), c = g
  2096. }
  2097. c && "BR" === c.tagName && C(c).remove()
  2098. } else {
  2099. var m = A.node.deepestParent(l);
  2100. m ? (C(m).after(C(p).html()), C(p).remove()) : 0 === C(p).parentsUntil(A.$el, "table").length && (C(l).next().after(C(p).html()), C(p).remove())
  2101. }
  2102. }
  2103. } else d = C(l).clone().attr("data-type", !1), C(l).after(d)
  2104. }
  2105. }
  2106. A.$el.find("li:empty").remove(), A.opts.keepFormatOnDelete || A.html.fillEmptyBlocks(), A.html.cleanEmptyTags(!0), A.opts.htmlUntouched || (A.clean.lists(), A.$el.find("li:empty").append("<br>"), A.spaces.normalize());
  2107. var v = A.$el.find(".fr-marker").last().get(0),
  2108. b = A.$el.find(".fr-marker").first().get(0);
  2109. void 0 !== v && void 0 !== b && !v.nextSibling && b.previousSibling && "BR" === b.previousSibling.tagName && A.node.isElement(v.parentNode) && A.node.isElement(b.parentNode) && A.$el.append("<br>"), R()
  2110. },
  2111. blocks: function u() {
  2112. var e, t, n = [],
  2113. r = T();
  2114. if (p() && r.rangeCount) {
  2115. var a = d();
  2116. for (e = 0; e < a.length; e++) {
  2117. var o = a[e],
  2118. i = f(o.startContainer, o.startOffset),
  2119. s = f(o.endContainer, o.endOffset);
  2120. (A.node.isBlock(i) || A.node.hasClass(i, "fr-inner")) && n.indexOf(i) < 0 && n.push(i), (t = A.node.blockParent(i)) && n.indexOf(t) < 0 && n.push(t);
  2121. for (var l = [], c = i; c !== s && c !== A.el;) l.indexOf(c) < 0 && c.children && c.children.length ? (l.push(c), c = c.children[0]) : c.nextSibling ? c = c.nextSibling : c.parentNode && (c = c.parentNode, l.push(c)), A.node.isBlock(c) && l.indexOf(c) < 0 && n.indexOf(c) < 0 && (c !== s || 0 < o.endOffset) && n.push(c);
  2122. A.node.isBlock(s) && n.indexOf(s) < 0 && 0 < o.endOffset && n.push(s), (t = A.node.blockParent(s)) && n.indexOf(t) < 0 && n.push(t)
  2123. }
  2124. }
  2125. for (e = n.length - 1; 0 < e; e--) C(n[e]).find(n).length && n.splice(e, 1);
  2126. return n
  2127. },
  2128. info: a,
  2129. setAtEnd: o,
  2130. setAtStart: r,
  2131. setBefore: function h(e, t) {
  2132. void 0 === t && (t = !0);
  2133. for (var n = e.previousSibling; n && n.nodeType === Node.TEXT_NODE && 0 === n.textContent.length;) n = n.previousSibling;
  2134. return n ? (A.node.isBlock(n) ? o(n) : "BR" === n.tagName ? C(n).before($e.MARKERS) : C(n).after($e.MARKERS), !0) : !!t && (A.node.isBlock(e) ? r(e) : C(e).before($e.MARKERS), !0)
  2135. },
  2136. setAfter: function g(e, t) {
  2137. void 0 === t && (t = !0);
  2138. for (var n = e.nextSibling; n && n.nodeType === Node.TEXT_NODE && 0 === n.textContent.length;) n = n.nextSibling;
  2139. return n ? (A.node.isBlock(n) ? r(n) : C(n).before($e.MARKERS), !0) : !!t && (A.node.isBlock(e) ? o(e) : C(e).after($e.MARKERS), !0)
  2140. },
  2141. rangeElement: f
  2142. }
  2143. }, Object.assign($e.DEFAULTS, {
  2144. language: null
  2145. }), $e.LANGUAGE = {}, $e.MODULES.language = function(e) {
  2146. var t;
  2147. return {
  2148. _init: function n() {
  2149. $e.LANGUAGE && (t = $e.LANGUAGE[e.opts.language]), t && t.direction && (e.opts.direction = t.direction)
  2150. },
  2151. translate: function r(e) {
  2152. return t && t.translation[e] && t.translation[e].length ? t.translation[e] : e
  2153. }
  2154. }
  2155. }, Object.assign($e.DEFAULTS, {
  2156. placeholderText: "Type something"
  2157. }), $e.MODULES.placeholder = function(f) {
  2158. var p = f.$;
  2159. function e() {
  2160. f.$placeholder || function d() {
  2161. f.$placeholder = p(f.doc.createElement("SPAN")).addClass("fr-placeholder"), f.$wp.append(f.$placeholder)
  2162. }();
  2163. var e = f.opts.iframe ? f.$iframe.prev().outerHeight(!0) : f.$el.prev().outerHeight(!0),
  2164. t = 0,
  2165. n = 0,
  2166. r = 0,
  2167. a = 0,
  2168. o = 0,
  2169. i = 0,
  2170. s = f.node.contents(f.el),
  2171. l = p(f.selection.element()).css("text-align");
  2172. if (s.length && s[0].nodeType === Node.ELEMENT_NODE) {
  2173. var c = p(s[0]);
  2174. (0 < f.$wp.prev().length || 0 < f.$el.prev().length) && f.ready && (t = f.helpers.getPX(c.css("margin-top")), a = f.helpers.getPX(c.css("padding-top")), n = f.helpers.getPX(c.css("margin-left")), r = f.helpers.getPX(c.css("margin-right")), o = f.helpers.getPX(c.css("padding-left")), i = f.helpers.getPX(c.css("padding-right"))), f.$placeholder.css("font-size", c.css("font-size")), f.$placeholder.css("line-height", c.css("line-height"))
  2175. } else f.$placeholder.css("font-size", f.$el.css("font-size")), f.$placeholder.css("line-height", f.$el.css("line-height"));
  2176. f.$wp.addClass("show-placeholder"), f.$placeholder.css({
  2177. marginTop: Math.max(f.helpers.getPX(f.$el.css("margin-top")), t) + (e || 0),
  2178. paddingTop: Math.max(f.helpers.getPX(f.$el.css("padding-top")), a),
  2179. paddingLeft: Math.max(f.helpers.getPX(f.$el.css("padding-left")), o),
  2180. marginLeft: Math.max(f.helpers.getPX(f.$el.css("margin-left")), n),
  2181. paddingRight: Math.max(f.helpers.getPX(f.$el.css("padding-right")), i),
  2182. marginRight: Math.max(f.helpers.getPX(f.$el.css("margin-right")), r),
  2183. textAlign: l
  2184. }).text(f.language.translate(f.opts.placeholderText || f.$oel.attr("placeholder") || "")), f.$placeholder.html(f.$placeholder.text().replace(/\n/g, "<br>"))
  2185. }
  2186. function t() {
  2187. f.$wp.removeClass("show-placeholder")
  2188. }
  2189. function n() {
  2190. if (!f.$wp) return !1;
  2191. f.core.isEmpty() ? e() : t()
  2192. }
  2193. return {
  2194. _init: function r() {
  2195. if (!f.$wp) return !1;
  2196. f.events.on("init input keydown keyup contentChanged initialized", n)
  2197. },
  2198. show: e,
  2199. hide: t,
  2200. refresh: n,
  2201. isVisible: function a() {
  2202. return !f.$wp || f.node.hasClass(f.$wp.get(0), "show-placeholder")
  2203. }
  2204. }
  2205. }, $e.UNICODE_NBSP = String.fromCharCode(160), $e.VOID_ELEMENTS = ["area", "base", "br", "col", "embed", "hr", "img", "input", "keygen", "link", "menuitem", "meta", "param", "source", "track", "wbr"], $e.BLOCK_TAGS = ["address", "article", "aside", "audio", "blockquote", "canvas", "details", "dd", "div", "dl", "dt", "fieldset", "figcaption", "figure", "footer", "form", "h1", "h2", "h3", "h4", "h5", "h6", "header", "hgroup", "hr", "li", "main", "nav", "noscript", "ol", "output", "p", "pre", "section", "table", "tbody", "td", "tfoot", "th", "thead", "tr", "ul", "video"], Object.assign($e.DEFAULTS, {
  2206. htmlAllowedEmptyTags: ["textarea", "a", "iframe", "object", "video", "style", "script", ".fa", ".fr-emoticon", ".fr-inner", "path", "line"],
  2207. htmlDoNotWrapTags: ["script", "style"],
  2208. htmlSimpleAmpersand: !1,
  2209. htmlIgnoreCSSProperties: [],
  2210. htmlExecuteScripts: !0
  2211. }), $e.MODULES.html = function(N) {
  2212. var p = N.$;
  2213. function d() {
  2214. return N.opts.enter === $e.ENTER_P ? "p" : N.opts.enter === $e.ENTER_DIV ? "div" : N.opts.enter === $e.ENTER_BR ? null : void 0
  2215. }
  2216. function s(e, t) {
  2217. return !(!e || e === N.el) && (t ? -1 != ["PRE", "SCRIPT", "STYLE"].indexOf(e.tagName) || s(e.parentNode, t) : -1 !== ["PRE", "SCRIPT", "STYLE"].indexOf(e.tagName))
  2218. }
  2219. function o(e) {
  2220. var t, n = [],
  2221. r = [];
  2222. if (e) {
  2223. var a = N.el.querySelectorAll(".fr-marker");
  2224. for (t = 0; t < a.length; t++) {
  2225. var o = N.node.blockParent(a[t]) || a[t];
  2226. if (o) {
  2227. var i = o.nextSibling,
  2228. s = o.previousSibling;
  2229. o && r.indexOf(o) < 0 && N.node.isBlock(o) && r.push(o), s && N.node.isBlock(s) && r.indexOf(s) < 0 && r.push(s), i && N.node.isBlock(i) && r.indexOf(i) < 0 && r.push(i)
  2230. }
  2231. }
  2232. } else r = N.el.querySelectorAll(u());
  2233. var l = u();
  2234. for (l += ",".concat($e.VOID_ELEMENTS.join(",")), l += ", .fr-inner", l += ",".concat(N.opts.htmlAllowedEmptyTags.join(":not(.fr-marker),"), ":not(.fr-marker)"), t = r.length - 1; 0 <= t; t--)
  2235. if (!(r[t].textContent && 0 < r[t].textContent.replace(/\u200B|\n/g, "").length || 0 < r[t].querySelectorAll(l).length)) {
  2236. for (var c = N.node.contents(r[t]), d = !1, f = 0; f < c.length; f++)
  2237. if (c[f].nodeType !== Node.COMMENT_NODE && c[f].textContent && 0 < c[f].textContent.replace(/\u200B|\n/g, "").length) {
  2238. d = !0;
  2239. break
  2240. }
  2241. d || n.push(r[t])
  2242. }
  2243. return n
  2244. }
  2245. function u() {
  2246. return $e.BLOCK_TAGS.join(", ")
  2247. }
  2248. function e(e) {
  2249. var t, n, r = p.merge([], $e.VOID_ELEMENTS);
  2250. r = p.merge(r, N.opts.htmlAllowedEmptyTags), r = void 0 === e ? p.merge(r, $e.BLOCK_TAGS) : p.merge(r, $e.NO_DELETE_TAGS), t = N.el.querySelectorAll("*:empty:not(".concat(r.join("):not("), "):not(.fr-marker)"));
  2251. do {
  2252. n = !1;
  2253. for (var a = 0; a < t.length; a++) 0 !== t[a].attributes.length && void 0 === t[a].getAttribute("href") || (t[a].parentNode.removeChild(t[a]), n = !0);
  2254. t = N.el.querySelectorAll("*:empty:not(".concat(r.join("):not("), "):not(.fr-marker)"))
  2255. } while (t.length && n)
  2256. }
  2257. function i(e, t) {
  2258. var n = d();
  2259. if (t && (n = "div"), n) {
  2260. for (var r = N.doc.createDocumentFragment(), a = null, o = !1, i = e.firstChild, s = !1; i;) {
  2261. var l = i.nextSibling;
  2262. if (i.nodeType === Node.ELEMENT_NODE && (N.node.isBlock(i) || 0 <= N.opts.htmlDoNotWrapTags.indexOf(i.tagName.toLowerCase()) && !N.node.hasClass(i, "fr-marker"))) a = null, r.appendChild(i.cloneNode(!0));
  2263. else if (i.nodeType !== Node.ELEMENT_NODE && i.nodeType !== Node.TEXT_NODE) a = null, r.appendChild(i.cloneNode(!0));
  2264. else if ("BR" === i.tagName) null === a ? (a = N.doc.createElement(n), s = !0, t && (a.setAttribute("class", "fr-temp-div"), a.setAttribute("data-empty", !0)), a.appendChild(i.cloneNode(!0)), r.appendChild(a)) : !1 === o && (a.appendChild(N.doc.createElement("br")), t && (a.setAttribute("class", "fr-temp-div"), a.setAttribute("data-empty", !0))), a = null;
  2265. else {
  2266. var c = i.textContent;
  2267. i.nodeType !== Node.TEXT_NODE || 0 < c.replace(/\n/g, "").replace(/(^ *)|( *$)/g, "").length || c.replace(/(^ *)|( *$)/g, "").length && c.indexOf("\n") < 0 ? (null === a && (a = N.doc.createElement(n), s = !0, t && a.setAttribute("class", "fr-temp-div"), r.appendChild(a), o = !1), a.appendChild(i.cloneNode(!0)), o || N.node.hasClass(i, "fr-marker") || i.nodeType === Node.TEXT_NODE && 0 === c.replace(/ /g, "").length || (o = !0)) : s = !0
  2268. }
  2269. i = l
  2270. }
  2271. s && (e.innerHTML = "", e.appendChild(r))
  2272. }
  2273. }
  2274. function l(e, t) {
  2275. for (var n = e.length - 1; 0 <= n; n--) i(e[n], t)
  2276. }
  2277. function t(e, t, n, r, a) {
  2278. if (!N.$wp) return !1;
  2279. void 0 === e && (e = !1), void 0 === t && (t = !1), void 0 === n && (n = !1), void 0 === r && (r = !1), void 0 === a && (a = !1);
  2280. var o = N.$wp.scrollTop();
  2281. i(N.el, e), r && l(N.el.querySelectorAll(".fr-inner"), e), t && l(N.el.querySelectorAll("td, th"), e), n && l(N.el.querySelectorAll("blockquote"), e), a && l(N.el.querySelectorAll("li"), e), o !== N.$wp.scrollTop() && N.$wp.scrollTop(o)
  2282. }
  2283. function n(e) {
  2284. if (void 0 === e && (e = N.el), e && 0 <= ["SCRIPT", "STYLE", "PRE"].indexOf(e.tagName)) return !1;
  2285. for (var t = N.doc.createTreeWalker(e, NodeFilter.SHOW_TEXT, N.node.filter(function(e) {
  2286. return null !== e.textContent.match(/([ \n]{2,})|(^[ \n]{1,})|([ \n]{1,}$)/g)
  2287. }), !1); t.nextNode();) {
  2288. var n = t.currentNode;
  2289. if (!s(n.parentNode, !0)) {
  2290. var r = N.node.isBlock(n.parentNode) || N.node.isElement(n.parentNode),
  2291. a = n.textContent.replace(/(?!^)( ){2,}(?!$)/g, " ").replace(/\n/g, " ").replace(/^[ ]{2,}/g, " ").replace(/[ ]{2,}$/g, " ");
  2292. if (r) {
  2293. var o = n.previousSibling,
  2294. i = n.nextSibling;
  2295. o && i && " " === a ? a = N.node.isBlock(o) && N.node.isBlock(i) ? "" : " " : (o || (a = a.replace(/^ */, "")), i || (a = a.replace(/ *$/, "")))
  2296. }
  2297. n.textContent = a
  2298. }
  2299. }
  2300. }
  2301. function r(e, t, n) {
  2302. var r = new RegExp(t, "gi").exec(e);
  2303. return r ? r[n] : null
  2304. }
  2305. function x(e) {
  2306. var t = e.doctype,
  2307. n = "<!DOCTYPE html>";
  2308. return t && (n = "<!DOCTYPE ".concat(t.name).concat(t.publicId ? ' PUBLIC "'.concat(t.publicId, '"') : "").concat(!t.publicId && t.systemId ? " SYSTEM" : "").concat(t.systemId ? ' "'.concat(t.systemId, '"') : "", ">")), n
  2309. }
  2310. function c(e) {
  2311. var t = e.parentNode;
  2312. if (t && (N.node.isBlock(t) || N.node.isElement(t)) && ["TD", "TH"].indexOf(t.tagName) < 0) {
  2313. for (var n = e.previousSibling, r = e.nextSibling; n && (n.nodeType === Node.TEXT_NODE && 0 === n.textContent.replace(/\n|\r/g, "").length || N.node.hasClass(n, "fr-tmp"));) n = n.previousSibling;
  2314. if (r) return !1;
  2315. n && t && "BR" !== n.tagName && !N.node.isBlock(n) && !r && 0 < t.textContent.replace(/\u200B/g, "").length && 0 < n.textContent.length && !N.node.hasClass(n, "fr-marker") && (N.el === t && !r && N.opts.enter === $e.ENTER_BR && N.browser.msie || e.parentNode.removeChild(e))
  2316. } else !t || N.node.isBlock(t) || N.node.isElement(t) || e.previousSibling || e.nextSibling || !N.node.isDeletable(e.parentNode) || c(e.parentNode)
  2317. }
  2318. function h() {
  2319. N.opts.htmlUntouched || (e(), t(), n(), N.spaces.normalize(null, !0), N.html.fillEmptyBlocks(), N.clean.lists(), N.clean.tables(), N.clean.toHTML5(), N.html.cleanBRs()), N.selection.restore(), a(), N.placeholder.refresh()
  2320. }
  2321. function a() {
  2322. N.node.isEmpty(N.el) && (null !== d() ? N.el.querySelector(u()) || N.el.querySelector("".concat(N.opts.htmlDoNotWrapTags.join(":not(.fr-marker),"), ":not(.fr-marker)")) || (N.core.hasFocus() ? (N.$el.html("<".concat(d(), ">").concat($e.MARKERS, "<br/></").concat(d(), ">")), N.selection.restore()) : N.$el.html("<".concat(d(), "><br/></").concat(d(), ">"))) : N.el.querySelector("*:not(.fr-marker):not(br)") || (N.core.hasFocus() ? (N.$el.html("".concat($e.MARKERS, "<br/>")), N.selection.restore()) : N.$el.html("<br/>")))
  2323. }
  2324. function g(e, t) {
  2325. return r(e, "<".concat(t, "[^>]*?>([\\w\\W]*)</").concat(t, ">"), 1)
  2326. }
  2327. function m(e, t) {
  2328. var n = p("<div ".concat(r(e, "<".concat(t, "([^>]*?)>"), 1) || "", ">"));
  2329. return N.node.rawAttributes(n.get(0))
  2330. }
  2331. function v(e) {
  2332. return (r(e, "<!DOCTYPE([^>]*?)>", 0) || "<!DOCTYPE html>").replace(/\n/g, " ").replace(/ {2,}/g, " ")
  2333. }
  2334. function b(e, t) {
  2335. N.opts.htmlExecuteScripts ? e.html(t) : e.get(0).innerHTML = t
  2336. }
  2337. function I(e) {
  2338. var t;
  2339. (t = /:not\(([^)]*)\)/g).test(e) && (e = e.replace(t, " $1 "));
  2340. var n = 100 * (e.match(/(#[^\s+>~.[:]+)/g) || []).length + 10 * (e.match(/(\[[^]]+\])/g) || []).length + 10 * (e.match(/(\.[^\s+>~.[:]+)/g) || []).length + 10 * (e.match(/(:[\w-]+\([^)]*\))/gi) || []).length + 10 * (e.match(/(:[^\s+>~.[:]+)/g) || []).length + (e.match(/(::[^\s+>~.[:]+|:first-line|:first-letter|:before|:after)/gi) || []).length;
  2341. return n += ((e = (e = e.replace(/[*\s+>~]/g, " ")).replace(/[#.]/g, " ")).match(/([^\s+>~.[:]+)/g) || []).length
  2342. }
  2343. function k(e) {
  2344. if (N.events.trigger("html.processGet", [e]), e && e.getAttribute && "" === e.getAttribute("class") && e.removeAttribute("class"), e && e.getAttribute && "" === e.getAttribute("style") && e.removeAttribute("style"), e && e.nodeType === Node.ELEMENT_NODE) {
  2345. var t, n = e.querySelectorAll('[class=""],[style=""]');
  2346. for (t = 0; t < n.length; t++) {
  2347. var r = n[t];
  2348. "" === r.getAttribute("class") && r.removeAttribute("class"), "" === r.getAttribute("style") && r.removeAttribute("style")
  2349. }
  2350. if ("BR" === e.tagName) c(e);
  2351. else {
  2352. var a = e.querySelectorAll("br");
  2353. for (t = 0; t < a.length; t++) c(a[t])
  2354. }
  2355. }
  2356. }
  2357. function M(e, t) {
  2358. return e[3] - t[3]
  2359. }
  2360. function f(e) {
  2361. var t = N.doc.createElement("div");
  2362. return t.innerHTML = e, null !== t.querySelector(u())
  2363. }
  2364. function E(e) {
  2365. var t = null;
  2366. if (void 0 === e && (t = N.selection.element()), N.opts.keepFormatOnDelete) return !1;
  2367. var n, r, a = t ? (t.textContent.match(/\u200B/g) || []).length - t.querySelectorAll(".fr-marker").length : 0;
  2368. if ((N.el.textContent.match(/\u200B/g) || []).length - N.el.querySelectorAll(".fr-marker").length === a) return !1;
  2369. do {
  2370. r = !1, n = N.el.querySelectorAll("*:not(.fr-marker)");
  2371. for (var o = 0; o < n.length; o++) {
  2372. var i = n[o];
  2373. if (t !== i) {
  2374. var s = i.textContent;
  2375. 0 === i.children.length && 1 === s.length && 8203 === s.charCodeAt(0) && "TD" !== i.tagName && (p(i).remove(), r = !0)
  2376. }
  2377. }
  2378. } while (r)
  2379. }
  2380. function T() {
  2381. E(), N.placeholder && setTimeout(N.placeholder.refresh, 0)
  2382. }
  2383. return {
  2384. defaultTag: d,
  2385. isPreformatted: s,
  2386. emptyBlocks: o,
  2387. emptyBlockTagsQuery: function A() {
  2388. return "".concat($e.BLOCK_TAGS.join(":empty, "), ":empty")
  2389. },
  2390. blockTagsQuery: u,
  2391. fillEmptyBlocks: function C(e) {
  2392. var t = o(e);
  2393. N.node.isEmpty(N.el) && N.opts.enter === $e.ENTER_BR && t.push(N.el);
  2394. for (var n = 0; n < t.length; n++) {
  2395. var r = t[n];
  2396. "false" === r.getAttribute("contenteditable") || r.querySelector("".concat(N.opts.htmlAllowedEmptyTags.join(":not(.fr-marker),"), ":not(.fr-marker)")) || N.node.isVoid(r) || "TABLE" !== r.tagName && "TBODY" !== r.tagName && "TR" !== r.tagName && "UL" !== r.tagName && "OL" !== r.tagName && r.appendChild(N.doc.createElement("br"))
  2397. }
  2398. if (N.browser.msie && N.opts.enter === $e.ENTER_BR) {
  2399. var a = N.node.contents(N.el);
  2400. a.length && a[a.length - 1].nodeType === Node.TEXT_NODE && N.$el.append("<br>")
  2401. }
  2402. },
  2403. cleanEmptyTags: e,
  2404. cleanWhiteTags: E,
  2405. cleanBlankSpaces: n,
  2406. blocks: function S() {
  2407. return N.$el.get(0).querySelectorAll(u())
  2408. },
  2409. getDoctype: x,
  2410. set: function y(e) {
  2411. var t = N.clean.html((e || "").trim(), [], [], N.opts.fullPage);
  2412. if (N.opts.fullPage) {
  2413. var n = g(t, "body") || (0 <= t.indexOf("<body") ? "" : t),
  2414. r = m(t, "body"),
  2415. a = g(t, "head") || "<title></title>",
  2416. o = m(t, "head"),
  2417. i = p("<div>");
  2418. i.append(a).contents().each(function() {
  2419. (this.nodeType === Node.COMMENT_NODE || 0 <= ["BASE", "LINK", "META", "NOSCRIPT", "SCRIPT", "STYLE", "TEMPLATE", "TITLE"].indexOf(this.tagName)) && this.parentNode.removeChild(this)
  2420. });
  2421. var s = i.html().trim();
  2422. a = p("<div>").append(a).contents().map(function() {
  2423. return this.nodeType === Node.COMMENT_NODE ? "\x3c!--".concat(this.nodeValue, "--\x3e") : 0 <= ["BASE", "LINK", "META", "NOSCRIPT", "SCRIPT", "STYLE", "TEMPLATE", "TITLE"].indexOf(this.tagName) ? this.outerHTML : ""
  2424. }).toArray().join("");
  2425. var l = v(t),
  2426. c = m(t, "html");
  2427. b(N.$el, "".concat(s, "\n").concat(n)), N.node.clearAttributes(N.el), N.$el.attr(r), N.$el.addClass("fr-view"), N.$el.attr("spellcheck", N.opts.spellcheck), N.$el.attr("dir", N.opts.direction), b(N.$head, a), N.node.clearAttributes(N.$head.get(0)), N.$head.attr(o), N.node.clearAttributes(N.$html.get(0)), N.$html.attr(c), N.iframe_document.doctype.parentNode.replaceChild(function f(e, t) {
  2428. var n = e.match(/<!DOCTYPE ?([^ ]*) ?([^ ]*) ?"?([^"]*)"? ?"?([^"]*)"?>/i);
  2429. return n ? t.implementation.createDocumentType(n[1], n[3], n[4]) : t.implementation.createDocumentType("html")
  2430. }(l, N.iframe_document), N.iframe_document.doctype)
  2431. } else b(N.$el, t);
  2432. var d = N.edit.isDisabled();
  2433. N.edit.on(), N.core.injectStyle(N.opts.iframeDefaultStyle + N.opts.iframeStyle), h(), N.opts.useClasses || (N.$el.find("[fr-original-class]").each(function() {
  2434. this.setAttribute("class", this.getAttribute("fr-original-class")), this.removeAttribute("fr-original-class")
  2435. }), N.$el.find("[fr-original-style]").each(function() {
  2436. this.setAttribute("style", this.getAttribute("fr-original-style")), this.removeAttribute("fr-original-style")
  2437. })), d && N.edit.off(), N.events.trigger("html.set")
  2438. },
  2439. get: function D(e, t) {
  2440. if (!N.$wp) return N.$oel.clone().removeClass("fr-view").removeAttr("contenteditable").get(0).outerHTML;
  2441. var n = "";
  2442. N.events.trigger("html.beforeGet");
  2443. var r, a, o = [],
  2444. i = {},
  2445. s = [],
  2446. l = N.el.querySelectorAll("input, textarea");
  2447. for (r = 0; r < l.length; r++) l[r].setAttribute("value", l[r].value);
  2448. if (!N.opts.useClasses && !t) {
  2449. var c = new RegExp("^".concat(N.opts.htmlIgnoreCSSProperties.join("$|^"), "$"), "gi");
  2450. for (r = 0; r < N.doc.styleSheets.length; r++) {
  2451. var d = void 0,
  2452. f = 0;
  2453. try {
  2454. d = N.doc.styleSheets[r].cssRules, N.doc.styleSheets[r].ownerNode && "STYLE" === N.doc.styleSheets[r].ownerNode.nodeType && (f = 1)
  2455. } catch (O) {}
  2456. if (d)
  2457. for (var p = 0, u = d.length; p < u; p++)
  2458. if (d[p].selectorText && 0 < d[p].style.cssText.length) {
  2459. var h = d[p].selectorText.replace(/body |\.fr-view /g, "").replace(/::/g, ":"),
  2460. g = void 0;
  2461. try {
  2462. g = N.el.querySelectorAll(h)
  2463. } catch (O) {
  2464. g = []
  2465. }
  2466. for (a = 0; a < g.length; a++) {
  2467. !g[a].getAttribute("fr-original-style") && g[a].getAttribute("style") ? (g[a].setAttribute("fr-original-style", g[a].getAttribute("style")), o.push(g[a])) : g[a].getAttribute("fr-original-style") || (g[a].setAttribute("fr-original-style", ""), o.push(g[a])), i[g[a]] || (i[g[a]] = {});
  2468. for (var m = 1e3 * f + I(d[p].selectorText), v = d[p].style.cssText.split(";"), b = 0; b < v.length; b++) {
  2469. var E = v[b].trim().split(":")[0];
  2470. if (E && !E.match(c) && (i[g[a]][E] || (i[g[a]][E] = 0) <= (g[a].getAttribute("fr-original-style") || "").indexOf("".concat(E, ":")) && (i[g[a]][E] = 1e4), m >= i[g[a]][E] && (i[g[a]][E] = m, v[b].trim().length))) {
  2471. var T = v[b].trim().split(":");
  2472. T.splice(0, 1), s.push([g[a], E.trim(), T.join(":").trim(), m])
  2473. }
  2474. }
  2475. }
  2476. }
  2477. }
  2478. for (s.sort(M), r = 0; r < s.length; r++) {
  2479. var A = s[r];
  2480. A[0].style[A[1]] = A[2]
  2481. }
  2482. for (r = 0; r < o.length; r++)
  2483. if (o[r].getAttribute("class") && (o[r].setAttribute("fr-original-class", o[r].getAttribute("class")), o[r].removeAttribute("class")), 0 < (o[r].getAttribute("fr-original-style") || "").trim().length) {
  2484. var C = o[r].getAttribute("fr-original-style").split(";");
  2485. for (a = 0; a < C.length; a++)
  2486. if (0 < C[a].indexOf(":")) {
  2487. var S = C[a].split(":"),
  2488. y = S[0];
  2489. S.splice(0, 1), o[r].style[y.trim()] = S.join(":").trim()
  2490. }
  2491. }
  2492. }
  2493. if (N.node.isEmpty(N.el)) N.opts.fullPage && (n = x(N.iframe_document), n += "<html".concat(N.node.attributes(N.$html.get(0)), ">").concat(N.$html.find("head").get(0).outerHTML, "<body></body></html>"));
  2494. else if (void 0 === e && (e = !1), N.opts.fullPage) {
  2495. n = x(N.iframe_document), N.$el.removeClass("fr-view");
  2496. var R = N.opts.heightMin,
  2497. L = N.opts.height,
  2498. w = N.opts.heightMax;
  2499. N.opts.heightMin = null, N.opts.height = null, N.opts.heightMax = null, N.size.refresh(), n += "<html".concat(N.node.attributes(N.$html.get(0)), ">").concat(N.$html.html(), "</html>"), N.opts.heightMin = R, N.opts.height = L, N.opts.heightMax = w, N.size.refresh(), N.$el.addClass("fr-view")
  2500. } else n = N.$el.html(); if (!N.opts.useClasses && !t)
  2501. for (r = 0; r < o.length; r++) o[r].getAttribute("fr-original-class") && (o[r].setAttribute("class", o[r].getAttribute("fr-original-class")), o[r].removeAttribute("fr-original-class")), null !== o[r].getAttribute("fr-original-style") && void 0 !== o[r].getAttribute("fr-original-style") ? (0 !== o[r].getAttribute("fr-original-style").length ? o[r].setAttribute("style", o[r].getAttribute("fr-original-style")) : o[r].removeAttribute("style"), o[r].removeAttribute("fr-original-style")) : o[r].removeAttribute("style");
  2502. N.opts.fullPage && (n = (n = (n = (n = (n = (n = (n = (n = n.replace(/<style data-fr-style="true">(?:[\w\W]*?)<\/style>/g, "")).replace(/<link([^>]*)data-fr-style="true"([^>]*)>/g, "")).replace(/<style(?:[\w\W]*?)class="firebugResetStyles"(?:[\w\W]*?)>(?:[\w\W]*?)<\/style>/g, "")).replace(/<body((?:[\w\W]*?)) spellcheck="true"((?:[\w\W]*?))>((?:[\w\W]*?))<\/body>/g, "<body$1$2>$3</body>")).replace(/<body((?:[\w\W]*?)) contenteditable="(true|false)"((?:[\w\W]*?))>((?:[\w\W]*?))<\/body>/g, "<body$1$3>$4</body>")).replace(/<body((?:[\w\W]*?)) dir="([\w]*)"((?:[\w\W]*?))>((?:[\w\W]*?))<\/body>/g, "<body$1$3>$4</body>")).replace(/<body((?:[\w\W]*?))class="([\w\W]*?)(fr-rtl|fr-ltr)([\w\W]*?)"((?:[\w\W]*?))>((?:[\w\W]*?))<\/body>/g, '<body$1class="$2$4"$5>$6</body>')).replace(/<body((?:[\w\W]*?)) class=""((?:[\w\W]*?))>((?:[\w\W]*?))<\/body>/g, "<body$1$2>$3</body>")), N.opts.htmlSimpleAmpersand && (n = n.replace(/&amp;/gi, "&")), N.events.trigger("html.afterGet"), e || (n = n.replace(/<span[^>]*? class\s*=\s*["']?fr-marker["']?[^>]+>\u200b<\/span>/gi, "")), n = N.clean.invisibleSpaces(n), n = N.clean.exec(n, k);
  2503. var _ = N.events.chainTrigger("html.get", n);
  2504. return "string" == typeof _ && (n = _), n = (n = n.replace(/<pre(?:[\w\W]*?)>(?:[\w\W]*?)<\/pre>/g, function(e) {
  2505. return e.replace(/<br>/g, "\n")
  2506. })).replace(/<meta((?:[\w\W]*?)) data-fr-http-equiv="/g, '<meta$1 http-equiv="')
  2507. },
  2508. getSelected: function R() {
  2509. function e(e, t) {
  2510. for (; t && (t.nodeType === Node.TEXT_NODE || !N.node.isBlock(t)) && !N.node.isElement(t) && !N.node.hasClass(t, "fr-inner");) t && t.nodeType !== Node.TEXT_NODE && p(e).wrapInner(N.node.openTagString(t) + N.node.closeTagString(t)), t = t.parentNode;
  2511. t && e.innerHTML === t.innerHTML ? e.innerHTML = t.outerHTML : -1 != t.innerText.indexOf(e.innerHTML) && (e.innerHTML = N.node.openTagString(t) + e.innerHTML + N.node.closeTagString(t))
  2512. }
  2513. var t, n, r = "";
  2514. if ("undefined" != typeof N.win.getSelection) {
  2515. N.browser.mozilla && (N.selection.save(), 1 < N.$el.find('.fr-marker[data-type="false"]').length && (N.$el.find('.fr-marker[data-type="false"][data-id="0"]').remove(), N.$el.find('.fr-marker[data-type="false"]:last').attr("data-id", "0"), N.$el.find(".fr-marker").not('[data-id="0"]').remove()), N.selection.restore());
  2516. for (var a = N.selection.ranges(), o = 0; o < a.length; o++) {
  2517. var i = document.createElement("div");
  2518. i.appendChild(a[o].cloneContents()), e(i, (n = t = void 0, n = null, N.win.getSelection ? (t = N.win.getSelection()) && t.rangeCount && (n = t.getRangeAt(0).commonAncestorContainer).nodeType !== Node.ELEMENT_NODE && (n = n.parentNode) : (t = N.doc.selection) && "Control" !== t.type && (n = t.createRange().parentElement()), null !== n && (0 <= p(n).parents().toArray().indexOf(N.el) || n === N.el) ? n : null)), 0 < p(i).find(".fr-element").length && (i = N.el), r += i.innerHTML
  2519. }
  2520. } else "undefined" != typeof N.doc.selection && "Text" === N.doc.selection.type && (r = N.doc.selection.createRange().htmlText);
  2521. return r
  2522. },
  2523. insert: function L(e, t, n) {
  2524. var r;
  2525. if (N.selection.isCollapsed() || N.selection.remove(), r = t ? e : N.clean.html(e), e.indexOf('class="fr-marker"') < 0 && (r = function i(e) {
  2526. var t = N.doc.createElement("div");
  2527. return t.innerHTML = e, N.selection.setAtEnd(t, !0), t.innerHTML
  2528. }(r)), N.node.isEmpty(N.el) && !N.opts.keepFormatOnDelete && f(r)) N.el.innerHTML = r;
  2529. else {
  2530. var a = N.markers.insert();
  2531. if (a) {
  2532. N.node.isLastSibling(a) && p(a).parent().hasClass("fr-deletable") && p(a).insertAfter(p(a).parent());
  2533. var o = N.node.blockParent(a);
  2534. if ((f(r) || n) && (N.node.deepestParent(a) || o && "LI" === o.tagName)) {
  2535. if (o && "LI" === o.tagName && (r = function s(e) {
  2536. if (!N.html.defaultTag()) return e;
  2537. var t = N.doc.createElement("div");
  2538. t.innerHTML = e;
  2539. for (var n = t.querySelectorAll(":scope > ".concat(N.html.defaultTag())), r = n.length - 1; 0 <= r; r--) {
  2540. var a = n[r];
  2541. N.node.isBlock(a.previousSibling) || (a.previousSibling && !N.node.isEmpty(a) && p("<br>").insertAfter(a.previousSibling), a.outerHTML = a.innerHTML)
  2542. }
  2543. return t.innerHTML
  2544. }(r)), !(a = N.markers.split())) return !1;
  2545. a.outerHTML = r
  2546. } else a.outerHTML = r
  2547. } else N.el.innerHTML += r
  2548. }
  2549. h(), N.keys.positionCaret(), N.events.trigger("html.inserted")
  2550. },
  2551. wrap: t,
  2552. unwrap: function w() {
  2553. N.$el.find("div.fr-temp-div").each(function() {
  2554. this.previousSibling && this.previousSibling.nodeType === Node.TEXT_NODE && p(this).before("<br>"), p(this).attr("data-empty") || !this.nextSibling || N.node.isBlock(this.nextSibling) && !p(this.nextSibling).hasClass("fr-temp-div") ? p(this).replaceWith(p(this).html()) : p(this).replaceWith("".concat(p(this).html(), "<br>"))
  2555. }), N.$el.find(".fr-temp-div").removeClass("fr-temp-div").filter(function() {
  2556. return "" === p(this).attr("class")
  2557. }).removeAttr("class")
  2558. },
  2559. escapeEntities: function _(e) {
  2560. return e.replace(/</gi, "&lt;").replace(/>/gi, "&gt;").replace(/"/gi, "&quot;").replace(/'/gi, "&#39;")
  2561. },
  2562. checkIfEmpty: a,
  2563. extractNode: g,
  2564. extractNodeAttrs: m,
  2565. extractDoctype: v,
  2566. cleanBRs: function O() {
  2567. for (var e = N.el.getElementsByTagName("br"), t = 0; t < e.length; t++) c(e[t])
  2568. },
  2569. _init: function B() {
  2570. N.$wp && (N.events.on("mouseup", T), N.events.on("keydown", T), N.events.on("contentChanged", a))
  2571. }
  2572. }
  2573. }, $e.ENTER_P = 0, $e.ENTER_DIV = 1, $e.ENTER_BR = 2, $e.KEYCODE = {
  2574. BACKSPACE: 8,
  2575. TAB: 9,
  2576. ENTER: 13,
  2577. SHIFT: 16,
  2578. CTRL: 17,
  2579. ALT: 18,
  2580. ESC: 27,
  2581. SPACE: 32,
  2582. ARROW_LEFT: 37,
  2583. ARROW_UP: 38,
  2584. ARROW_RIGHT: 39,
  2585. ARROW_DOWN: 40,
  2586. DELETE: 46,
  2587. ZERO: 48,
  2588. ONE: 49,
  2589. TWO: 50,
  2590. THREE: 51,
  2591. FOUR: 52,
  2592. FIVE: 53,
  2593. SIX: 54,
  2594. SEVEN: 55,
  2595. EIGHT: 56,
  2596. NINE: 57,
  2597. FF_SEMICOLON: 59,
  2598. FF_EQUALS: 61,
  2599. QUESTION_MARK: 63,
  2600. A: 65,
  2601. B: 66,
  2602. C: 67,
  2603. D: 68,
  2604. E: 69,
  2605. F: 70,
  2606. G: 71,
  2607. H: 72,
  2608. I: 73,
  2609. J: 74,
  2610. K: 75,
  2611. L: 76,
  2612. M: 77,
  2613. N: 78,
  2614. O: 79,
  2615. P: 80,
  2616. Q: 81,
  2617. R: 82,
  2618. S: 83,
  2619. T: 84,
  2620. U: 85,
  2621. V: 86,
  2622. W: 87,
  2623. X: 88,
  2624. Y: 89,
  2625. Z: 90,
  2626. META: 91,
  2627. NUM_ZERO: 96,
  2628. NUM_ONE: 97,
  2629. NUM_TWO: 98,
  2630. NUM_THREE: 99,
  2631. NUM_FOUR: 100,
  2632. NUM_FIVE: 101,
  2633. NUM_SIX: 102,
  2634. NUM_SEVEN: 103,
  2635. NUM_EIGHT: 104,
  2636. NUM_NINE: 105,
  2637. NUM_MULTIPLY: 106,
  2638. NUM_PLUS: 107,
  2639. NUM_MINUS: 109,
  2640. NUM_PERIOD: 110,
  2641. NUM_DIVISION: 111,
  2642. F1: 112,
  2643. F2: 113,
  2644. F3: 114,
  2645. F4: 115,
  2646. F5: 116,
  2647. F6: 117,
  2648. F7: 118,
  2649. F8: 119,
  2650. F9: 120,
  2651. F10: 121,
  2652. F11: 122,
  2653. F12: 123,
  2654. FF_HYPHEN: 173,
  2655. SEMICOLON: 186,
  2656. DASH: 189,
  2657. EQUALS: 187,
  2658. COMMA: 188,
  2659. HYPHEN: 189,
  2660. PERIOD: 190,
  2661. SLASH: 191,
  2662. APOSTROPHE: 192,
  2663. TILDE: 192,
  2664. SINGLE_QUOTE: 222,
  2665. OPEN_SQUARE_BRACKET: 219,
  2666. BACKSLASH: 220,
  2667. CLOSE_SQUARE_BRACKET: 221,
  2668. IME: 229
  2669. }, Object.assign($e.DEFAULTS, {
  2670. enter: $e.ENTER_P,
  2671. multiLine: !0,
  2672. tabSpaces: 0
  2673. }), $e.MODULES.keys = function(p) {
  2674. var u, n, r, t = p.$,
  2675. h = !1;
  2676. function e() {
  2677. if (p.browser.mozilla && p.selection.isCollapsed() && !h) {
  2678. var e = p.selection.ranges(0),
  2679. t = e.startContainer,
  2680. n = e.startOffset;
  2681. t && t.nodeType === Node.TEXT_NODE && n <= t.textContent.length && 0 < n && 32 === t.textContent.charCodeAt(n - 1) && (p.selection.save(), p.spaces.normalize(), p.selection.restore())
  2682. }
  2683. }
  2684. function a() {
  2685. p.selection.isFull() && setTimeout(function() {
  2686. var e = p.html.defaultTag();
  2687. e ? p.$el.html("<".concat(e, ">").concat($e.MARKERS, "<br/></").concat(e, ">")) : p.$el.html("".concat($e.MARKERS, "<br/>")), p.selection.restore(), p.placeholder.refresh(), p.button.bulkRefresh(), p.undo.saveStep()
  2688. }, 0)
  2689. }
  2690. function o() {
  2691. h = !1
  2692. }
  2693. function i() {
  2694. h = !1
  2695. }
  2696. function g() {
  2697. var e = p.html.defaultTag();
  2698. e ? p.$el.html("<".concat(e, ">").concat($e.MARKERS, "<br/></").concat(e, ">")) : p.$el.html("".concat($e.MARKERS, "<br/>")), p.selection.restore()
  2699. }
  2700. function s(e) {
  2701. var t = p.selection.element();
  2702. if (t && 0 <= ["INPUT", "TEXTAREA"].indexOf(t.tagName)) return !0;
  2703. if (e && v(e.which)) return !0;
  2704. p.events.disableBlur();
  2705. var n = e.which;
  2706. if (16 === n) return !0;
  2707. if ((u = n) === $e.KEYCODE.IME) return h = !0;
  2708. h = !1;
  2709. var r = b(n) && !m(e) && !e.altKey,
  2710. a = n === $e.KEYCODE.BACKSPACE || n === $e.KEYCODE.DELETE;
  2711. if ((p.selection.isFull() && !p.opts.keepFormatOnDelete && !p.placeholder.isVisible() || a && p.placeholder.isVisible() && p.opts.keepFormatOnDelete) && (r || a) && (g(), !b(n))) return e.preventDefault(), !0;
  2712. n === $e.KEYCODE.ENTER ? e.shiftKey ? function o(e) {
  2713. e.preventDefault(), e.stopPropagation(), p.opts.multiLine && (p.selection.isCollapsed() || p.selection.remove(), p.cursor.enter(!0))
  2714. }(e) : function i(e) {
  2715. p.opts.multiLine ? (p.helpers.isIOS() || (e.preventDefault(), e.stopPropagation()), p.selection.isCollapsed() || p.selection.remove(), p.cursor.enter()) : (e.preventDefault(), e.stopPropagation())
  2716. }(e) : n === $e.KEYCODE.BACKSPACE && (e.metaKey || e.ctrlKey) ? function s() {
  2717. setTimeout(function() {
  2718. p.events.disableBlur(), p.events.focus()
  2719. }, 0)
  2720. }() : n !== $e.KEYCODE.BACKSPACE || m(e) || e.altKey ? n !== $e.KEYCODE.DELETE || m(e) || e.altKey || e.shiftKey ? n === $e.KEYCODE.SPACE ? function l(e) {
  2721. var t = p.selection.element();
  2722. if (!p.helpers.isMobile() && t && "A" === t.tagName) {
  2723. e.preventDefault(), e.stopPropagation(), p.selection.isCollapsed() || p.selection.remove();
  2724. var n = p.markers.insert();
  2725. if (n) {
  2726. var r = n.previousSibling;
  2727. !n.nextSibling && n.parentNode && "A" === n.parentNode.tagName ? (n.parentNode.insertAdjacentHTML("afterend", "&nbsp;".concat($e.MARKERS)), n.parentNode.removeChild(n)) : (r && r.nodeType === Node.TEXT_NODE && 1 === r.textContent.length && 160 === r.textContent.charCodeAt(0) ? r.textContent += " " : n.insertAdjacentHTML("beforebegin", "&nbsp;"), n.outerHTML = $e.MARKERS), p.selection.restore()
  2728. }
  2729. }
  2730. }(e) : n === $e.KEYCODE.TAB ? function c(e) {
  2731. if (0 < p.opts.tabSpaces)
  2732. if (p.selection.isCollapsed()) {
  2733. p.undo.saveStep(), e.preventDefault(), e.stopPropagation();
  2734. for (var t = "", n = 0; n < p.opts.tabSpaces; n++) t += "&nbsp;";
  2735. p.html.insert(t), p.placeholder.refresh(), p.undo.saveStep()
  2736. } else e.preventDefault(), e.stopPropagation(), e.shiftKey ? p.commands.outdent() : p.commands.indent()
  2737. }(e) : m(e) || !b(e.which) || p.selection.isCollapsed() || e.ctrlKey || e.altKey || p.selection.remove() : p.placeholder.isVisible() ? (p.opts.keepFormatOnDelete || g(), e.preventDefault(), e.stopPropagation()) : function d(e) {
  2738. e.preventDefault(), e.stopPropagation(), "" === p.selection.text() && "IMG" != p.selection.element().tagName ? p.cursor.del() : p.selection.remove(), p.placeholder.refresh()
  2739. }(e) : p.placeholder.isVisible() ? (p.opts.keepFormatOnDelete || g(), e.preventDefault(), e.stopPropagation()) : function f(e) {
  2740. if (p.selection.isCollapsed())
  2741. if (p.cursor.backspace(), p.helpers.isIOS()) {
  2742. var t = p.selection.ranges(0);
  2743. t.deleteContents(), t.insertNode(document.createTextNode("\u200b")), p.selection.get().modify("move", "forward", "character")
  2744. } else e.preventDefault(), e.stopPropagation();
  2745. else e.preventDefault(), e.stopPropagation(), p.selection.remove();
  2746. p.placeholder.refresh()
  2747. }(e), p.events.enableBlur()
  2748. }
  2749. function l() {
  2750. if (!p.$wp) return !0;
  2751. var e;
  2752. p.opts.height || p.opts.heightMax ? (e = p.position.getBoundingRect().top, (p.helpers.isIOS() || p.helpers.isAndroid()) && (e -= p.helpers.scrollTop()), p.opts.iframe && (e += p.$iframe.offset().top), e > p.$wp.offset().top - p.helpers.scrollTop() + p.$wp.height() - 20 && p.$wp.scrollTop(e + p.$wp.scrollTop() - (p.$wp.height() + p.$wp.offset().top) + p.helpers.scrollTop() + 20)) : (e = p.position.getBoundingRect().top, p.opts.toolbarBottom && (e += p.opts.toolbarStickyOffset), (p.helpers.isIOS() || p.helpers.isAndroid()) && (e -= p.helpers.scrollTop()), p.opts.iframe && (e += p.$iframe.offset().top, e -= p.helpers.scrollTop()), (e += p.opts.toolbarStickyOffset) > p.o_win.innerHeight - 20 && t(p.o_win).scrollTop(e + p.helpers.scrollTop() - p.o_win.innerHeight + 20), e = p.position.getBoundingRect().top, p.opts.toolbarBottom || (e -= p.opts.toolbarStickyOffset), (p.helpers.isIOS() || p.helpers.isAndroid()) && (e -= p.helpers.scrollTop()), p.opts.iframe && (e += p.$iframe.offset().top, e -= p.helpers.scrollTop()), e < 100 && t(p.o_win).scrollTop(e + p.helpers.scrollTop() - 100))
  2753. }
  2754. function c(e) {
  2755. var t = p.selection.element();
  2756. if (t && 0 <= ["INPUT", "TEXTAREA"].indexOf(t.tagName)) return !0;
  2757. if (e && 0 === e.which && u && (e.which = u), p.helpers.isAndroid() && p.browser.mozilla) return !0;
  2758. if (h) return !1;
  2759. if (e && p.helpers.isIOS() && e.which === $e.KEYCODE.ENTER && p.doc.execCommand("undo"), !p.selection.isCollapsed()) return !0;
  2760. if (e && (e.which === $e.KEYCODE.META || e.which === $e.KEYCODE.CTRL)) return !0;
  2761. if (e && v(e.which)) return !0;
  2762. if (e && !p.helpers.isIOS() && (e.which === $e.KEYCODE.ENTER || e.which === $e.KEYCODE.BACKSPACE || 37 <= e.which && e.which <= 40 && !p.browser.msie)) try {
  2763. l()
  2764. } catch (r) {}
  2765. var n = p.selection.element();
  2766. (function a(e) {
  2767. if (!e) return !1;
  2768. var t = e.innerHTML;
  2769. return !!((t = t.replace(/<span[^>]*? class\s*=\s*["']?fr-marker["']?[^>]+>\u200b<\/span>/gi, "")) && /\u200B/.test(t) && 0 < t.replace(/\u200B/gi, "").length)
  2770. })(n) && !p.node.hasClass(n, "fr-marker") && "IFRAME" !== n.tagName && function o(e) {
  2771. return !p.helpers.isIOS() || 0 === ((e.textContent || "").match(/[\u3041-\u3096\u30A0-\u30FF\u4E00-\u9FFF\u3130-\u318F\uAC00-\uD7AF]/gi) || []).length
  2772. }(n) && (p.selection.save(), function i(e) {
  2773. for (var t = p.doc.createTreeWalker(e, NodeFilter.SHOW_TEXT, p.node.filter(function(e) {
  2774. return /\u200B/gi.test(e.textContent)
  2775. }), !1); t.nextNode();) {
  2776. var n = t.currentNode;
  2777. n.textContent = n.textContent.replace(/\u200B/gi, "")
  2778. }
  2779. }(n), p.selection.restore())
  2780. }
  2781. function m(e) {
  2782. if (-1 !== navigator.userAgent.indexOf("Mac OS X")) {
  2783. if (e.metaKey && !e.altKey) return !0
  2784. } else if (e.ctrlKey && !e.altKey) return !0;
  2785. return !1
  2786. }
  2787. function v(e) {
  2788. if (e >= $e.KEYCODE.ARROW_LEFT && e <= $e.KEYCODE.ARROW_DOWN) return !0
  2789. }
  2790. function b(e) {
  2791. if (e >= $e.KEYCODE.ZERO && e <= $e.KEYCODE.NINE) return !0;
  2792. if (e >= $e.KEYCODE.NUM_ZERO && e <= $e.KEYCODE.NUM_MULTIPLY) return !0;
  2793. if (e >= $e.KEYCODE.A && e <= $e.KEYCODE.Z) return !0;
  2794. if (p.browser.webkit && 0 === e) return !0;
  2795. switch (e) {
  2796. case $e.KEYCODE.SPACE:
  2797. case $e.KEYCODE.QUESTION_MARK:
  2798. case $e.KEYCODE.NUM_PLUS:
  2799. case $e.KEYCODE.NUM_MINUS:
  2800. case $e.KEYCODE.NUM_PERIOD:
  2801. case $e.KEYCODE.NUM_DIVISION:
  2802. case $e.KEYCODE.SEMICOLON:
  2803. case $e.KEYCODE.FF_SEMICOLON:
  2804. case $e.KEYCODE.DASH:
  2805. case $e.KEYCODE.EQUALS:
  2806. case $e.KEYCODE.FF_EQUALS:
  2807. case $e.KEYCODE.COMMA:
  2808. case $e.KEYCODE.PERIOD:
  2809. case $e.KEYCODE.SLASH:
  2810. case $e.KEYCODE.APOSTROPHE:
  2811. case $e.KEYCODE.SINGLE_QUOTE:
  2812. case $e.KEYCODE.OPEN_SQUARE_BRACKET:
  2813. case $e.KEYCODE.BACKSLASH:
  2814. case $e.KEYCODE.CLOSE_SQUARE_BRACKET:
  2815. return !0;
  2816. default:
  2817. return !1
  2818. }
  2819. }
  2820. function d(e) {
  2821. var t = e.which;
  2822. if (m(e) || 37 <= t && t <= 40 || !b(t) && t !== $e.KEYCODE.DELETE && t !== $e.KEYCODE.BACKSPACE && t !== $e.KEYCODE.ENTER && t !== $e.KEYCODE.IME) return !0;
  2823. n || (r = p.snapshot.get(), p.undo.canDo() || p.undo.saveStep()), clearTimeout(n), n = setTimeout(function() {
  2824. n = null, p.undo.saveStep()
  2825. }, Math.max(250, p.opts.typingTimer))
  2826. }
  2827. function f(e) {
  2828. var t = e.which;
  2829. if (m(e) || 37 <= t && t <= 40) return !0;
  2830. r && n ? (p.undo.saveStep(r), r = null) : void 0 !== t && 0 !== t || r || n || p.undo.saveStep()
  2831. }
  2832. function E(e) {
  2833. if (e && "BR" === e.tagName) return !1;
  2834. try {
  2835. return 0 === (e.textContent || "").length && e.querySelector && !e.querySelector(":scope > br") || e.childNodes && 1 === e.childNodes.length && e.childNodes[0].getAttribute && ("false" === e.childNodes[0].getAttribute("contenteditable") || p.node.hasClass(e.childNodes[0], "fr-img-caption"))
  2836. } catch (t) {
  2837. return !1
  2838. }
  2839. }
  2840. function T(e) {
  2841. var t = p.el.childNodes,
  2842. n = p.html.defaultTag(),
  2843. r = p.node.blockParent(p.selection.blocks()[0]);
  2844. return r && "TR" == r.tagName && r.getAttribute("contenteditable") == undefined && (r = r.closest("table")), !p.node.isEditable(e.target) || r && "false" === r.getAttribute("contenteditable") ? p.toolbar.disable() : p.toolbar.enable(), !(!e.target || e.target === p.el) || (0 === t.length || void(t[0].offsetHeight + t[0].offsetTop <= e.offsetY ? E(t[t.length - 1]) && (n ? p.$el.append("<".concat(n, ">").concat($e.MARKERS, "<br></").concat(n, ">")) : p.$el.append("".concat($e.MARKERS, "<br>")), p.selection.restore(), l()) : e.offsetY <= 10 && E(t[0]) && (n ? p.$el.prepend("<".concat(n, ">").concat($e.MARKERS, "<br></").concat(n, ">")) : p.$el.prepend("".concat($e.MARKERS, "<br>")), p.selection.restore(), l())))
  2845. }
  2846. function A() {
  2847. n && clearTimeout(n)
  2848. }
  2849. return {
  2850. _init: function C() {
  2851. p.events.on("keydown", d), p.events.on("input", e), p.events.on("mousedown", i), p.events.on("keyup input", f), p.events.on("keypress", o), p.events.on("keydown", s), p.events.on("keyup", c), p.events.on("destroy", A), p.events.on("html.inserted", c), p.events.on("cut", a), p.opts.multiLine && p.events.on("click", T)
  2852. },
  2853. ctrlKey: m,
  2854. isCharacter: b,
  2855. isArrow: v,
  2856. forceUndo: function S() {
  2857. n && (clearTimeout(n), p.undo.saveStep(), r = null)
  2858. },
  2859. isIME: function y() {
  2860. return h
  2861. },
  2862. isBrowserAction: function R(e) {
  2863. var t = e.which;
  2864. return m(e) || t === $e.KEYCODE.F5
  2865. },
  2866. positionCaret: l
  2867. }
  2868. }, Object.assign($e.DEFAULTS, {
  2869. pastePlain: !1,
  2870. pasteDeniedTags: ["colgroup", "col", "meta"],
  2871. pasteDeniedAttrs: ["class", "id", "style"],
  2872. pasteAllowedStyleProps: [".*"],
  2873. pasteAllowLocalImages: !1
  2874. }), $e.MODULES.paste = function(L) {
  2875. var i, s, o, w, _ = L.$;
  2876. function n(e, t) {
  2877. try {
  2878. L.win.localStorage.setItem("fr-copied-html", e), L.win.localStorage.setItem("fr-copied-text", t)
  2879. } catch (n) {}
  2880. }
  2881. function e(e) {
  2882. var t = L.html.getSelected();
  2883. n(t, _(L.doc.createElement("div")).html(t).text()), "cut" === e.type && (L.undo.saveStep(), setTimeout(function() {
  2884. L.selection.save(), L.html.wrap(), L.selection.restore(), L.events.focus(), L.undo.saveStep()
  2885. }, 0))
  2886. }
  2887. var l = !1;
  2888. function t(e) {
  2889. if (L.edit.isDisabled()) return !1;
  2890. if (l) return !1;
  2891. if (e.originalEvent && (e = e.originalEvent), !1 === L.events.trigger("paste.before", [e])) return e.preventDefault(), !1;
  2892. if (e && e.clipboardData && e.clipboardData.getData) {
  2893. var t = "",
  2894. n = e.clipboardData.types;
  2895. if (L.helpers.isArray(n))
  2896. for (var r = 0; r < n.length; r++) t += "".concat(n[r], ";");
  2897. else t = n; if (i = "", /text\/rtf/.test(t) && (s = e.clipboardData.getData("text/rtf")), /text\/html/.test(t) && !L.browser.safari ? i = e.clipboardData.getData("text/html") : /text\/rtf/.test(t) && L.browser.safari ? i = s : /public.rtf/.test(t) && L.browser.safari && (i = e.clipboardData.getData("text/rtf")), "" !== i) return c(), e.preventDefault && (e.stopPropagation(), e.preventDefault()), !1;
  2898. i = null
  2899. }
  2900. return function a() {
  2901. L.selection.save(), L.events.disableBlur(), i = null, o ? (o.html(""), L.browser.edge && L.opts.iframe && L.$el.append(o)) : (o = _('<div contenteditable="true" style="position: fixed; top: 0; left: -9999px; height: 100%; width: 0; word-break: break-all; overflow:hidden; z-index: 2147483647; line-height: 140%; -moz-user-select: text; -webkit-user-select: text; -ms-user-select: text; user-select: text;" tabIndex="-1"></div>'), L.browser.webkit || L.browser.mozilla ? (o.css("top", L.$sc.scrollTop()), L.$el.after(o)) : L.browser.edge && L.opts.iframe ? L.$el.append(o) : L.$box.after(o), L.events.on("destroy", function() {
  2902. o.remove()
  2903. }));
  2904. var e;
  2905. L.helpers.isIOS() && L.$sc && (e = L.$sc.scrollTop());
  2906. L.opts.iframe && L.$el.attr("contenteditable", "false");
  2907. o.focus(), L.helpers.isIOS() && L.$sc && L.$sc.scrollTop(e);
  2908. L.win.setTimeout(c, 1)
  2909. }(), !1
  2910. }
  2911. function r(e) {
  2912. if (e.originalEvent && (e = e.originalEvent), e && e.dataTransfer && e.dataTransfer.getData) {
  2913. var t = "",
  2914. n = e.dataTransfer.types;
  2915. if (L.helpers.isArray(n))
  2916. for (var r = 0; r < n.length; r++) t += "".concat(n[r], ";");
  2917. else t = n; if (i = "", /text\/rtf/.test(t) && (s = e.dataTransfer.getData("text/rtf")), /text\/html/.test(t) ? i = e.dataTransfer.getData("text/html") : /text\/rtf/.test(t) && L.browser.safari ? i = s : /text\/plain/.test(t) && !this.browser.mozilla && (i = L.html.escapeEntities(e.dataTransfer.getData("text/plain")).replace(/\n/g, "<br>")), "" !== i) {
  2918. L.keys.forceUndo(), w = L.snapshot.get(), L.selection.save(), L.$el.find(".fr-marker").removeClass("fr-marker").addClass("fr-marker-helper");
  2919. var a = L.markers.insertAtPoint(e);
  2920. if (L.$el.find(".fr-marker").removeClass("fr-marker").addClass("fr-marker-placeholder"), L.$el.find(".fr-marker-helper").addClass("fr-marker").removeClass("fr-marker-helper"), L.selection.restore(), L.selection.remove(), L.$el.find(".fr-marker-placeholder").addClass("fr-marker").removeClass("fr-marker-placeholder"), !1 !== a) {
  2921. var o = L.el.querySelector(".fr-marker");
  2922. return _(o).replaceWith($e.MARKERS), L.selection.restore(), c(), e.preventDefault && (e.stopPropagation(), e.preventDefault()), !1
  2923. }
  2924. } else i = null
  2925. }
  2926. }
  2927. function c() {
  2928. L.opts.iframe && L.$el.attr("contenteditable", "true"), L.browser.edge && L.opts.iframe && L.$box.after(o), w || (L.keys.forceUndo(), w = L.snapshot.get()), i || (i = o.get(0).innerHTML, L.selection.restore(), L.events.enableBlur());
  2929. var e = i.match(/(class="?Mso|class='?Mso|class="?Xl|class='?Xl|class=Xl|style="[^"]*\bmso-|style='[^']*\bmso-|w:WordDocument)/gi),
  2930. t = L.events.chainTrigger("paste.beforeCleanup", i);
  2931. t && "string" == typeof t && (i = t), (!e || e && !1 !== L.events.trigger("paste.wordPaste", [i])) && a(i, e)
  2932. }
  2933. function O(e) {
  2934. for (var t = "", n = 0; n++ < e;) t += "&nbsp;";
  2935. return t
  2936. }
  2937. function a(e, t, n) {
  2938. var r, a = null,
  2939. o = null;
  2940. if (0 <= e.toLowerCase().indexOf("<body")) {
  2941. var i = "";
  2942. 0 <= e.indexOf("<style") && (i = e.replace(/[.\s\S\w\W<>]*(<style[^>]*>[\s]*[.\s\S\w\W<>]*[\s]*<\/style>)[.\s\S\w\W<>]*/gi, "$1")), e = (e = i + e.replace(/[.\s\S\w\W<>]*<body[^>]*>[\s]*([.\s\S\w\W<>]*)[\s]*<\/body>[.\s\S\w\W<>]*/gi, "$1")).replace(/ \n/g, " ").replace(/\n /g, " ").replace(/([^>])\n([^<])/g, "$1 $2")
  2943. }
  2944. var s = !1;
  2945. 0 <= e.indexOf('id="docs-internal-guid') && (e = e.replace(/^[\w\W\s\S]* id="docs-internal-guid[^>]*>([\w\W\s\S]*)<\/b>[\w\W\s\S]*$/g, "$1"), s = !0), 0 <= e.indexOf('content="Sheets"') && (e = e.replace(/width:0px;/g, ""));
  2946. var l = !1;
  2947. if (!t)
  2948. if ((l = function A(e) {
  2949. var t = null;
  2950. try {
  2951. t = L.win.localStorage.getItem("fr-copied-text")
  2952. } catch (n) {}
  2953. return !(!t || _("<div>").html(e).text().replace(/\u00A0/gi, " ").replace(/\r|\n/gi, "") !== t.replace(/\u00A0/gi, " ").replace(/\r|\n/gi, ""))
  2954. }(e)) && (e = L.win.localStorage.getItem("fr-copied-html")), l) e = L.clean.html(e, L.opts.pasteDeniedTags, L.opts.pasteDeniedAttrs);
  2955. else {
  2956. var c = L.opts.htmlAllowedStyleProps;
  2957. L.opts.htmlAllowedStyleProps = L.opts.pasteAllowedStyleProps, L.opts.htmlAllowComments = !1, e = (e = (e = e.replace(/<span class="Apple-tab-span">\s*<\/span>/g, O(L.opts.tabSpaces || 4))).replace(/<span class="Apple-tab-span" style="white-space:pre">(\t*)<\/span>/g, function(e, t) {
  2958. return O(t.length * (L.opts.tabSpaces || 4))
  2959. })).replace(/\t/g, O(L.opts.tabSpaces || 4)), e = L.clean.html(e, L.opts.pasteDeniedTags, L.opts.pasteDeniedAttrs), L.opts.htmlAllowedStyleProps = c, L.opts.htmlAllowComments = !0, e = (e = (e = N(e)).replace(/\r/g, "")).replace(/^ */g, "").replace(/ *$/g, "")
  2960. }!t || L.wordPaste && n || (0 === (e = e.replace(/^\n*/g, "").replace(/^ /g, "")).indexOf("<colgroup>") && (e = "<table>".concat(e, "</table>")), e = N(e = function C(e) {
  2961. var t;
  2962. e = (e = (e = (e = (e = (e = (e = (e = (e = (e = (e = (e = (e = (e = (e = e.replace(/<p(.*?)class="?'?MsoListParagraph"?'? ([\s\S]*?)>([\s\S]*?)<\/p>/gi, "<ul><li>$3</li></ul>")).replace(/<p(.*?)class="?'?NumberedText"?'? ([\s\S]*?)>([\s\S]*?)<\/p>/gi, "<ol><li>$3</li></ol>")).replace(/<p(.*?)class="?'?MsoListParagraphCxSpFirst"?'?([\s\S]*?)(level\d)?([\s\S]*?)>([\s\S]*?)<\/p>/gi, "<ul><li$3>$5</li>")).replace(/<p(.*?)class="?'?NumberedTextCxSpFirst"?'?([\s\S]*?)(level\d)?([\s\S]*?)>([\s\S]*?)<\/p>/gi, "<ol><li$3>$5</li>")).replace(/<p(.*?)class="?'?MsoListParagraphCxSpMiddle"?'?([\s\S]*?)(level\d)?([\s\S]*?)>([\s\S]*?)<\/p>/gi, "<li$3>$5</li>")).replace(/<p(.*?)class="?'?NumberedTextCxSpMiddle"?'?([\s\S]*?)(level\d)?([\s\S]*?)>([\s\S]*?)<\/p>/gi, "<li$3>$5</li>")).replace(/<p(.*?)class="?'?MsoListBullet"?'?([\s\S]*?)(level\d)?([\s\S]*?)>([\s\S]*?)<\/p>/gi, "<li$3>$5</li>")).replace(/<p(.*?)class="?'?MsoListParagraphCxSpLast"?'?([\s\S]*?)(level\d)?([\s\S]*?)>([\s\S]*?)<\/p>/gi, "<li$3>$5</li></ul>")).replace(/<p(.*?)class="?'?NumberedTextCxSpLast"?'?([\s\S]*?)(level\d)?([\s\S]*?)>([\s\S]*?)<\/p>/gi, "<li$3>$5</li></ol>")).replace(/<span([^<]*?)style="?'?mso-list:Ignore"?'?([\s\S]*?)>([\s\S]*?)<span/gi, "<span><span")).replace(/<!--\[if !supportLists\]-->([\s\S]*?)<!--\[endif\]-->/gi, "")).replace(/<!\[if !supportLists\]>([\s\S]*?)<!\[endif\]>/gi, "")).replace(/(\n|\r| class=(")?Mso[a-zA-Z0-9]+(")?)/gi, " ")).replace(/<!--[\s\S]*?-->/gi, "")).replace(/<(\/)*(meta|link|span|\\?xml:|st1:|o:|font)(.*?)>/gi, "");
  2963. var n, r = ["style", "script", "applet", "embed", "noframes", "noscript"];
  2964. for (t = 0; t < r.length; t++) {
  2965. var a = new RegExp("<".concat(r[t], ".*?").concat(r[t], "(.*?)>"), "gi");
  2966. e = e.replace(a, "")
  2967. }
  2968. for (e = (e = (e = e.replace(/&nbsp;/gi, " ")).replace(/<td([^>]*)><\/td>/g, "<td$1><br></td>")).replace(/<th([^>]*)><\/th>/g, "<th$1><br></th>");
  2969. (e = (n = e).replace(/<[^/>][^>]*><\/[^>]+>/gi, "")) !== n;);
  2970. e = (e = e.replace(/<lilevel([^1])([^>]*)>/gi, '<li data-indent="true"$2>')).replace(/<lilevel1([^>]*)>/gi, "<li$1>"), e = (e = (e = L.clean.html(e, L.opts.pasteDeniedTags, L.opts.pasteDeniedAttrs)).replace(/<a>(.[^<]+)<\/a>/gi, "$1")).replace(/<br> */g, "<br>");
  2971. var o = L.o_doc.createElement("div");
  2972. o.innerHTML = e;
  2973. var i = o.querySelectorAll("li[data-indent]");
  2974. for (t = 0; t < i.length; t++) {
  2975. var s = i[t],
  2976. l = s.previousElementSibling;
  2977. if (l && "LI" === l.tagName) {
  2978. var c = l.querySelector(":scope > ul, :scope > ol");
  2979. c || (c = document.createElement("ul"), l.appendChild(c)), c.appendChild(s)
  2980. } else s.removeAttribute("data-indent")
  2981. }
  2982. return L.html.cleanBlankSpaces(o), e = o.innerHTML
  2983. }(e))), L.opts.pastePlain && !l && (e = function S(e) {
  2984. var t, n = null,
  2985. r = L.doc.createElement("div");
  2986. r.innerHTML = e;
  2987. var a = r.querySelectorAll("p, div, h1, h2, h3, h4, h5, h6, pre, blockquote");
  2988. for (t = 0; t < a.length; t++)(n = a[t]).outerHTML = "<".concat(L.html.defaultTag() || "DIV", ">").concat(n.innerHTML, "</").concat(L.html.defaultTag() || "DIV", ">");
  2989. for (t = (a = r.querySelectorAll("*:not(".concat("p, div, h1, h2, h3, h4, h5, h6, pre, blockquote, ul, ol, li, table, tbody, thead, tr, td, br, img".split(",").join("):not("), ")"))).length - 1; 0 <= t; t--)(n = a[t]).outerHTML = n.innerHTML;
  2990. return function o(e) {
  2991. for (var t = L.node.contents(e), n = 0; n < t.length; n++) t[n].nodeType !== Node.TEXT_NODE && t[n].nodeType !== Node.ELEMENT_NODE ? t[n].parentNode.removeChild(t[n]) : o(t[n])
  2992. }(r), r.innerHTML
  2993. }(e));
  2994. var d = L.events.chainTrigger("paste.afterCleanup", e);
  2995. if ("string" == typeof d && (e = d), "" !== e) {
  2996. var f = L.o_doc.createElement("div");
  2997. 0 <= (f.innerHTML = e).indexOf("<body>") ? (L.html.cleanBlankSpaces(f), L.spaces.normalize(f, !0)) : L.spaces.normalize(f);
  2998. var p = f.getElementsByTagName("span");
  2999. for (r = p.length - 1; 0 <= r; r--) {
  3000. var u = p[r];
  3001. 0 === u.attributes.length && (u.outerHTML = u.innerHTML)
  3002. }
  3003. if (!0 === L.opts.linkAlwaysBlank) {
  3004. var h = f.getElementsByTagName("a");
  3005. for (r = h.length - 1; 0 <= r; r--) {
  3006. var g = h[r];
  3007. g.getAttribute("target") || g.setAttribute("target", "_blank")
  3008. }
  3009. }
  3010. var m = L.selection.element(),
  3011. v = !1;
  3012. if (m && _(m).parentsUntil(L.el, "ul, ol").length && (v = !0), v) {
  3013. var b = f.children;
  3014. 1 === b.length && 0 <= ["OL", "UL"].indexOf(b[0].tagName) && (b[0].outerHTML = b[0].innerHTML)
  3015. }
  3016. if (!s) {
  3017. var E = f.getElementsByTagName("br");
  3018. for (r = E.length - 1; 0 <= r; r--) {
  3019. var T = E[r];
  3020. L.node.isBlock(T.previousSibling) && T.parentNode.removeChild(T)
  3021. }
  3022. }
  3023. if (L.opts.enter === $e.ENTER_BR)
  3024. for (r = (a = f.querySelectorAll("p, div")).length - 1; 0 <= r; r--) 0 === (o = a[r]).attributes.length && (o.outerHTML = o.innerHTML + (o.nextSibling && !L.node.isEmpty(o) ? "<br>" : ""));
  3025. else if (L.opts.enter === $e.ENTER_DIV)
  3026. for (r = (a = f.getElementsByTagName("p")).length - 1; 0 <= r; r--) 0 === (o = a[r]).attributes.length && (o.outerHTML = "<div>".concat(o.innerHTML, "</div>"));
  3027. else L.opts.enter === $e.ENTER_P && 1 === f.childNodes.length && "P" === f.childNodes[0].tagName && 0 === f.childNodes[0].attributes.length && (f.childNodes[0].outerHTML = f.childNodes[0].innerHTML);
  3028. e = f.innerHTML, l && (e = function y(e) {
  3029. var t, n = L.o_doc.createElement("div");
  3030. n.innerHTML = e;
  3031. var r = n.querySelectorAll("*:empty:not(td):not(th):not(tr):not(iframe):not(svg):not(".concat($e.VOID_ELEMENTS.join("):not("), "):not(").concat(L.opts.htmlAllowedEmptyTags.join("):not("), ")"));
  3032. for (; r.length;) {
  3033. for (t = 0; t < r.length; t++) r[t].parentNode.removeChild(r[t]);
  3034. r = n.querySelectorAll("*:empty:not(td):not(th):not(tr):not(iframe):not(svg):not(".concat($e.VOID_ELEMENTS.join("):not("), "):not(").concat(L.opts.htmlAllowedEmptyTags.join("):not("), ")"))
  3035. }
  3036. return n.innerHTML
  3037. }(e)), L.html.insert(e, !0)
  3038. }! function R() {
  3039. L.events.trigger("paste.after")
  3040. }(), L.undo.saveStep(w), w = null, L.undo.saveStep()
  3041. }
  3042. function d(e) {
  3043. for (var t = e.length - 1; 0 <= t; t--) e[t].attributes && e[t].attributes.length && e.splice(t, 1);
  3044. return e
  3045. }
  3046. function N(e) {
  3047. var t, n = L.o_doc.createElement("div");
  3048. n.innerHTML = e;
  3049. for (var r = d(Array.prototype.slice.call(n.querySelectorAll(":scope > div:not([style]), td > div:not([style]), th > div:not([style]), li > div:not([style])"))); r.length;) {
  3050. var a = r[r.length - 1];
  3051. if (L.html.defaultTag() && "div" !== L.html.defaultTag()) a.querySelector(L.html.blockTagsQuery()) ? a.outerHTML = a.innerHTML : a.outerHTML = "<".concat(L.html.defaultTag(), ">").concat(a.innerHTML, "</").concat(L.html.defaultTag(), ">");
  3052. else {
  3053. var o = a.querySelectorAll("*");
  3054. !o.length || "BR" !== o[o.length - 1].tagName && 0 === a.innerText.length ? a.outerHTML = a.innerHTML + (a.nextSibling ? "<br>" : "") : !o.length || "BR" !== o[o.length - 1].tagName || o[o.length - 1].nextSibling ? a.outerHTML = a.innerHTML + (a.nextSibling ? "<br>" : "") : a.outerHTML = a.innerHTML
  3055. }
  3056. r = d(Array.prototype.slice.call(n.querySelectorAll(":scope > div:not([style]), td > div:not([style]), th > div:not([style]), li > div:not([style])")))
  3057. }
  3058. for (r = d(Array.prototype.slice.call(n.querySelectorAll("div:not([style])"))); r.length;) {
  3059. for (t = 0; t < r.length; t++) {
  3060. var i = r[t],
  3061. s = i.innerHTML.replace(/\u0009/gi, "").trim();
  3062. i.outerHTML = s
  3063. }
  3064. r = d(Array.prototype.slice.call(n.querySelectorAll("div:not([style])")))
  3065. }
  3066. return n.innerHTML
  3067. }
  3068. function f() {
  3069. L.el.removeEventListener("copy", e), L.el.removeEventListener("cut", e), L.el.removeEventListener("paste", t)
  3070. }
  3071. return {
  3072. _init: function p() {
  3073. L.el.addEventListener("copy", e), L.el.addEventListener("cut", e), L.el.addEventListener("paste", t, {
  3074. capture: !0
  3075. }), L.events.on("drop", r), L.browser.msie && L.browser.version < 11 && (L.events.on("mouseup", function(e) {
  3076. 2 === e.button && (setTimeout(function() {
  3077. l = !1
  3078. }, 50), l = !0)
  3079. }, !0), L.events.on("beforepaste", t)), L.events.on("destroy", f)
  3080. },
  3081. cleanEmptyTagsAndDivs: N,
  3082. getRtfClipboard: function u() {
  3083. return s
  3084. },
  3085. saveCopiedText: n,
  3086. clean: a
  3087. }
  3088. }, Object.assign($e.DEFAULTS, {
  3089. shortcutsEnabled: [],
  3090. shortcutsHint: !0
  3091. }), $e.SHORTCUTS_MAP = {}, $e.RegisterShortcut = function(e, t, n, r, a, o) {
  3092. $e.SHORTCUTS_MAP[(a ? "^" : "") + (o ? "@" : "") + e] = {
  3093. cmd: t,
  3094. val: n,
  3095. letter: r,
  3096. shift: a,
  3097. option: o
  3098. }, $e.DEFAULTS.shortcutsEnabled.push(t)
  3099. }, $e.RegisterShortcut($e.KEYCODE.E, "show", null, "E", !1, !1), $e.RegisterShortcut($e.KEYCODE.B, "bold", null, "B", !1, !1), $e.RegisterShortcut($e.KEYCODE.I, "italic", null, "I", !1, !1), $e.RegisterShortcut($e.KEYCODE.U, "underline", null, "U", !1, !1), $e.RegisterShortcut($e.KEYCODE.S, "strikeThrough", null, "S", !1, !1), $e.RegisterShortcut($e.KEYCODE.CLOSE_SQUARE_BRACKET, "indent", null, "]", !1, !1), $e.RegisterShortcut($e.KEYCODE.OPEN_SQUARE_BRACKET, "outdent", null, "[", !1, !1), $e.RegisterShortcut($e.KEYCODE.Z, "undo", null, "Z", !1, !1), $e.RegisterShortcut($e.KEYCODE.Z, "redo", null, "Z", !0, !1), $e.RegisterShortcut($e.KEYCODE.Y, "redo", null, "Y", !1, !1), $e.MODULES.shortcuts = function(s) {
  3100. var r = null;
  3101. var l = !1;
  3102. function e(e) {
  3103. if (!s.core.hasFocus()) return !0;
  3104. var t = e.which,
  3105. n = -1 !== navigator.userAgent.indexOf("Mac OS X") ? e.metaKey : e.ctrlKey;
  3106. if ("keyup" === e.type && l && t !== $e.KEYCODE.META) return l = !1;
  3107. "keydown" === e.type && (l = !1);
  3108. var r = (e.shiftKey ? "^" : "") + (e.altKey ? "@" : "") + t,
  3109. a = s.node.blockParent(s.selection.blocks()[0]);
  3110. if (a && "TR" == a.tagName && a.getAttribute("contenteditable") == undefined && (a = a.closest("table")), n && $e.SHORTCUTS_MAP[r] && (!a || "false" !== a.getAttribute("contenteditable"))) {
  3111. var o = $e.SHORTCUTS_MAP[r].cmd;
  3112. if (o && 0 <= s.opts.shortcutsEnabled.indexOf(o)) {
  3113. var i = $e.SHORTCUTS_MAP[r].val;
  3114. if (!1 === s.events.trigger("shortcut", [e, o, i])) return !(l = !0);
  3115. if (o && (s.commands[o] || $e.COMMANDS[o] && $e.COMMANDS[o].callback)) return e.preventDefault(), e.stopPropagation(), "keydown" === e.type && ((s.commands[o] || $e.COMMANDS[o].callback)(), l = !0), !1
  3116. }
  3117. }
  3118. }
  3119. return {
  3120. _init: function t() {
  3121. s.events.on("keydown", e, !0), s.events.on("keyup", e, !0)
  3122. },
  3123. get: function a(e) {
  3124. if (!s.opts.shortcutsHint) return null;
  3125. if (!r)
  3126. for (var t in r = {}, $e.SHORTCUTS_MAP) Object.prototype.hasOwnProperty.call($e.SHORTCUTS_MAP, t) && 0 <= s.opts.shortcutsEnabled.indexOf($e.SHORTCUTS_MAP[t].cmd) && (r["".concat($e.SHORTCUTS_MAP[t].cmd, ".").concat($e.SHORTCUTS_MAP[t].val || "")] = {
  3127. shift: $e.SHORTCUTS_MAP[t].shift,
  3128. option: $e.SHORTCUTS_MAP[t].option,
  3129. letter: $e.SHORTCUTS_MAP[t].letter
  3130. });
  3131. var n = r[e];
  3132. return n ? (s.helpers.isMac() ? String.fromCharCode(8984) : "".concat(s.language.translate("Ctrl"), "+")) + (n.shift ? s.helpers.isMac() ? String.fromCharCode(8679) : "".concat(s.language.translate("Shift"), "+") : "") + (n.option ? s.helpers.isMac() ? String.fromCharCode(8997) : "".concat(s.language.translate("Alt"), "+") : "") + n.letter : null
  3133. }
  3134. }
  3135. }, $e.MODULES.snapshot = function(l) {
  3136. function n(e) {
  3137. for (var t = e.parentNode.childNodes, n = 0, r = null, a = 0; a < t.length; a++) {
  3138. if (r) {
  3139. var o = t[a].nodeType === Node.TEXT_NODE && "" === t[a].textContent,
  3140. i = r.nodeType === Node.TEXT_NODE && t[a].nodeType === Node.TEXT_NODE,
  3141. s = r.nodeType === Node.TEXT_NODE && "" === r.textContent;
  3142. o || i || s || n++
  3143. }
  3144. if (t[a] === e) return n;
  3145. r = t[a]
  3146. }
  3147. }
  3148. function a(e) {
  3149. var t = [];
  3150. if (!e.parentNode) return [];
  3151. for (; !l.node.isElement(e);) t.push(n(e)), e = e.parentNode;
  3152. return t.reverse()
  3153. }
  3154. function o(e, t) {
  3155. for (; e && e.nodeType === Node.TEXT_NODE;) {
  3156. var n = e.previousSibling;
  3157. n && n.nodeType === Node.TEXT_NODE && (t += n.textContent.length), e = n
  3158. }
  3159. return t
  3160. }
  3161. function c(e) {
  3162. for (var t = l.el, n = 0; n < e.length; n++) t = t.childNodes[e[n]];
  3163. return t
  3164. }
  3165. function r(e, t) {
  3166. try {
  3167. var n = c(t.scLoc),
  3168. r = t.scOffset,
  3169. a = c(t.ecLoc),
  3170. o = t.ecOffset,
  3171. i = l.doc.createRange();
  3172. i.setStart(n, r), i.setEnd(a, o), e.addRange(i)
  3173. } catch (s) {}
  3174. }
  3175. return {
  3176. get: function i() {
  3177. var e, t = {};
  3178. if (l.events.trigger("snapshot.before"), t.html = (l.$wp ? l.$el.html() : l.$oel.get(0).outerHTML).replace(/ style=""/g, ""), t.ranges = [], l.$wp && l.selection.inEditor() && l.core.hasFocus())
  3179. for (var n = l.selection.ranges(), r = 0; r < n.length; r++) t.ranges.push({
  3180. scLoc: a((e = n[r]).startContainer),
  3181. scOffset: o(e.startContainer, e.startOffset),
  3182. ecLoc: a(e.endContainer),
  3183. ecOffset: o(e.endContainer, e.endOffset)
  3184. });
  3185. return l.events.trigger("snapshot.after", [t]), t
  3186. },
  3187. restore: function s(e) {
  3188. l.$el.html() !== e.html && (l.opts.htmlExecuteScripts ? l.$el.html(e.html) : l.el.innerHTML = e.html);
  3189. var t = l.selection.get();
  3190. l.selection.clear(), l.events.focus(!0);
  3191. for (var n = 0; n < e.ranges.length; n++) r(t, e.ranges[n])
  3192. },
  3193. equal: function d(e, t) {
  3194. return e.html === t.html && (!l.core.hasFocus() || JSON.stringify(e.ranges) === JSON.stringify(t.ranges))
  3195. }
  3196. }
  3197. }, $e.MODULES.undo = function(n) {
  3198. function e(e) {
  3199. var t = e.which;
  3200. n.keys.ctrlKey(e) && (t === $e.KEYCODE.Z && e.shiftKey && e.preventDefault(), t === $e.KEYCODE.Z && e.preventDefault())
  3201. }
  3202. var t = null;
  3203. function r() {
  3204. if (n.undo_stack && !n.undoing)
  3205. for (; n.undo_stack.length > n.undo_index;) n.undo_stack.pop()
  3206. }
  3207. function a() {
  3208. n.undo_index = 0, n.undo_stack = []
  3209. }
  3210. function o() {
  3211. n.undo_stack = []
  3212. }
  3213. return {
  3214. _init: function i() {
  3215. a(), n.events.on("initialized", function() {
  3216. t = (n.$wp ? n.$el.html() : n.$oel.get(0).outerHTML).replace(/ style=""/g, "")
  3217. }), n.events.on("blur", function() {
  3218. n.el.querySelector(".fr-dragging") || n.undo.saveStep()
  3219. }), n.events.on("keydown", e), n.events.on("destroy", o)
  3220. },
  3221. run: function s() {
  3222. if (1 < n.undo_index) {
  3223. n.undoing = !0;
  3224. var e = n.undo_stack[--n.undo_index - 1];
  3225. clearTimeout(n._content_changed_timer), n.snapshot.restore(e), t = e.html, n.popups.hideAll(), n.toolbar.enable(), n.events.trigger("contentChanged"), n.events.trigger("commands.undo"), n.undoing = !1
  3226. }
  3227. },
  3228. redo: function l() {
  3229. if (n.undo_index < n.undo_stack.length) {
  3230. n.undoing = !0;
  3231. var e = n.undo_stack[n.undo_index++];
  3232. clearTimeout(n._content_changed_timer), n.snapshot.restore(e), t = e.html, n.popups.hideAll(), n.toolbar.enable(), n.events.trigger("contentChanged"), n.events.trigger("commands.redo"), n.undoing = !1
  3233. }
  3234. },
  3235. canDo: function c() {
  3236. return !(0 === n.undo_stack.length || n.undo_index <= 1)
  3237. },
  3238. canRedo: function d() {
  3239. return n.undo_index !== n.undo_stack.length
  3240. },
  3241. dropRedo: r,
  3242. reset: a,
  3243. saveStep: function f(e) {
  3244. !n.undo_stack || n.undoing || n.el.querySelector(".fr-marker") || (void 0 === e ? (e = n.snapshot.get(), n.undo_stack[n.undo_index - 1] && n.snapshot.equal(n.undo_stack[n.undo_index - 1], e) || (r(), n.undo_stack.push(e), n.undo_index++, e.html !== t && (n.events.trigger("contentChanged"), t = e.html))) : (r(), 0 < n.undo_index ? n.undo_stack[n.undo_index - 1] = e : (n.undo_stack.push(e), n.undo_index++)))
  3245. }
  3246. }
  3247. }, Object.assign($e.DEFAULTS, {
  3248. height: null,
  3249. heightMax: null,
  3250. heightMin: null,
  3251. width: null
  3252. }), $e.MODULES.size = function(e) {
  3253. function t() {
  3254. n(), e.opts.height && e.$el.css("minHeight", e.opts.height - e.helpers.getPX(e.$el.css("padding-top")) - e.helpers.getPX(e.$el.css("padding-bottom"))), e.$iframe.height(e.$el.outerHeight(!0))
  3255. }
  3256. function n() {
  3257. e.opts.heightMin ? e.$el.css("minHeight", e.opts.heightMin) : e.$el.css("minHeight", ""), e.opts.heightMax ? (e.$wp.css("maxHeight", e.opts.heightMax), e.$wp.css("overflow", "auto")) : (e.$wp.css("maxHeight", ""), e.$wp.css("overflow", "")), e.opts.height ? (e.$wp.css("height", e.opts.height), e.$wp.css("overflow", "auto"), e.$el.css("minHeight", e.opts.height - e.helpers.getPX(e.$el.css("padding-top")) - e.helpers.getPX(e.$el.css("padding-bottom")))) : (e.$wp.css("height", ""), e.opts.heightMin || e.$el.css("minHeight", ""), e.opts.heightMax || e.$wp.css("overflow", "")), e.opts.width && e.$box.width(e.opts.width)
  3258. }
  3259. return {
  3260. _init: function r() {
  3261. if (!e.$wp) return !1;
  3262. n(), e.$iframe && (e.events.on("keyup keydown", function() {
  3263. setTimeout(t, 0)
  3264. }, !0), e.events.on("commands.after html.set init initialized paste.after", t))
  3265. },
  3266. syncIframe: t,
  3267. refresh: n
  3268. }
  3269. }, Object.assign($e.DEFAULTS, {
  3270. documentReady: !1,
  3271. editorClass: null,
  3272. typingTimer: 500,
  3273. iframe: !1,
  3274. requestWithCORS: !0,
  3275. requestWithCredentials: !1,
  3276. requestHeaders: {},
  3277. useClasses: !0,
  3278. spellcheck: !0,
  3279. iframeDefaultStyle: 'html{margin:0px;height:auto;}body{height:auto;padding:10px;background:transparent;color:#000000;position:relative;z-index: 2;-webkit-user-select:auto;margin:0px;overflow:hidden;min-height:20px;}body:after{content:"";display:block;clear:both;}body::-moz-selection{background:#b5d6fd;color:#000;}body::selection{background:#b5d6fd;color:#000;}',
  3280. iframeStyle: "",
  3281. iframeStyleFiles: [],
  3282. direction: "auto",
  3283. zIndex: 1,
  3284. tabIndex: null,
  3285. disableRightClick: !1,
  3286. scrollableContainer: "body",
  3287. keepFormatOnDelete: !1,
  3288. theme: null
  3289. }), $e.MODULES.core = function(i) {
  3290. var r = i.$;
  3291. function n() {
  3292. if (i.$box.addClass("fr-box".concat(i.opts.editorClass ? " ".concat(i.opts.editorClass) : "")), i.$box.attr("role", "application"), i.$wp.addClass("fr-wrapper"), i.opts.documentReady && i.$box.addClass("fr-document"), function a() {
  3293. i.opts.iframe || i.$el.addClass("fr-element fr-view")
  3294. }(), i.opts.iframe) {
  3295. i.$iframe.addClass("fr-iframe"), i.$el.addClass("fr-view");
  3296. for (var e = 0; e < i.o_doc.styleSheets.length; e++) {
  3297. var t = void 0;
  3298. try {
  3299. t = i.o_doc.styleSheets[e].cssRules
  3300. } catch (o) {}
  3301. if (t)
  3302. for (var n = 0, r = t.length; n < r; n++)!t[n].selectorText || 0 !== t[n].selectorText.indexOf(".fr-view") && 0 !== t[n].selectorText.indexOf(".fr-element") || 0 < t[n].style.cssText.length && (0 === t[n].selectorText.indexOf(".fr-view") ? i.opts.iframeStyle += "".concat(t[n].selectorText.replace(/\.fr-view/g, "body"), "{").concat(t[n].style.cssText, "}") : i.opts.iframeStyle += "".concat(t[n].selectorText.replace(/\.fr-element/g, "body"), "{").concat(t[n].style.cssText, "}"))
  3303. }
  3304. }
  3305. "auto" !== i.opts.direction && i.$box.removeClass("fr-ltr fr-rtl").addClass("fr-".concat(i.opts.direction)), i.$el.attr("dir", i.opts.direction), i.$wp.attr("dir", i.opts.direction), 1 < i.opts.zIndex && i.$box.css("z-index", i.opts.zIndex), i.opts.theme && i.$box.addClass("".concat(i.opts.theme, "-theme")), i.opts.tabIndex = i.opts.tabIndex || i.$oel.attr("tabIndex"), i.opts.tabIndex && i.$el.attr("tabIndex", i.opts.tabIndex)
  3306. }
  3307. return {
  3308. _init: function a() {
  3309. if ($e.INSTANCES.push(i), function e() {
  3310. i.drag_support = {
  3311. filereader: "undefined" != typeof FileReader,
  3312. formdata: Boolean(i.win.FormData),
  3313. progress: "upload" in new XMLHttpRequest
  3314. }
  3315. }(), i.$wp) {
  3316. n(), i.html.set(i._original_html), i.$el.attr("spellcheck", i.opts.spellcheck), i.helpers.isMobile() && (i.$el.attr("autocomplete", i.opts.spellcheck ? "on" : "off"), i.$el.attr("autocorrect", i.opts.spellcheck ? "on" : "off"), i.$el.attr("autocapitalize", i.opts.spellcheck ? "on" : "off")), i.opts.disableRightClick && i.events.$on(i.$el, "contextmenu", function(e) {
  3317. if (2 === e.button) return !1
  3318. });
  3319. try {
  3320. i.doc.execCommand("styleWithCSS", !1, !1)
  3321. } catch (t) {}
  3322. }
  3323. "TEXTAREA" === i.$oel.get(0).tagName && (i.events.on("contentChanged", function() {
  3324. i.$oel.val(i.html.get())
  3325. }), i.events.on("form.submit", function() {
  3326. i.$oel.val(i.html.get())
  3327. }), i.events.on("form.reset", function() {
  3328. i.html.set(i._original_html)
  3329. }), i.$oel.val(i.html.get())), i.helpers.isIOS() && i.events.$on(i.$doc, "selectionchange", function() {
  3330. i.$doc.get(0).hasFocus() || i.$win.get(0).focus()
  3331. }), i.events.trigger("init"), i.opts.autofocus && !i.opts.initOnClick && i.$wp && i.events.on("initialized", function() {
  3332. i.events.focus(!0)
  3333. })
  3334. },
  3335. destroy: function t(e) {
  3336. "TEXTAREA" === i.$oel.get(0).tagName && i.$oel.val(e), i.$box && i.$box.removeAttr("role"), i.$wp && ("TEXTAREA" === i.$oel.get(0).tagName ? (i.$el.html(""), i.$wp.html(""), i.$box.replaceWith(i.$oel), i.$oel.show()) : (i.$wp.replaceWith(e), i.$el.html(""), i.$box.removeClass("fr-view fr-ltr fr-box ".concat(i.opts.editorClass || "")), i.opts.theme && i.$box.addClass("".concat(i.opts.theme, "-theme")))), this.$wp = null, this.$el = null, this.el = null, this.$box = null
  3337. },
  3338. isEmpty: function e() {
  3339. return i.node.isEmpty(i.el)
  3340. },
  3341. getXHR: function o(e, t) {
  3342. var n = new XMLHttpRequest;
  3343. for (var r in n.open(t, e, !0), i.opts.requestWithCredentials && (n.withCredentials = !0), i.opts.requestHeaders) Object.prototype.hasOwnProperty.call(i.opts.requestHeaders, r) && n.setRequestHeader(r, i.opts.requestHeaders[r]);
  3344. return n
  3345. },
  3346. injectStyle: function s(e) {
  3347. if (i.opts.iframe) {
  3348. i.$head.find("style[data-fr-style], link[data-fr-style]").remove(), i.$head.append('<style data-fr-style="true">'.concat(e, "</style>"));
  3349. for (var t = 0; t < i.opts.iframeStyleFiles.length; t++) {
  3350. var n = r('<link data-fr-style="true" rel="stylesheet" href="'.concat(i.opts.iframeStyleFiles[t], '">'));
  3351. n.get(0).addEventListener("load", i.size.syncIframe), i.$head.append(n)
  3352. }
  3353. }
  3354. },
  3355. hasFocus: function l() {
  3356. return i.browser.mozilla && i.helpers.isMobile() ? i.selection.inEditor() : i.node.hasFocus(i.el) || 0 < i.$el.find("*:focus").length
  3357. },
  3358. sameInstance: function c(e) {
  3359. if (!e) return !1;
  3360. var t = e.data("instance");
  3361. return !!t && t.id === i.id
  3362. }
  3363. }
  3364. }, $e.POPUP_TEMPLATES = {
  3365. "text.edit": "[_EDIT_]"
  3366. }, $e.RegisterTemplate = function(e, t) {
  3367. $e.POPUP_TEMPLATES[e] = t
  3368. }, $e.MODULES.popups = function(f) {
  3369. var d = f.$;
  3370. f.shared.popups || (f.shared.popups = {});
  3371. var p, u = f.shared.popups;
  3372. function h(e, t) {
  3373. t.isVisible() || (t = f.$sc), t.is(u[e].data("container")) || (u[e].data("container", t), t.append(u[e]))
  3374. }
  3375. function i() {
  3376. d(this).toggleClass("fr-not-empty", !0)
  3377. }
  3378. function s() {
  3379. var e = d(this);
  3380. e.toggleClass("fr-not-empty", "" !== e.val())
  3381. }
  3382. function g(e) {
  3383. return u[e] && f.node.hasClass(u[e], "fr-active") && f.core.sameInstance(u[e]) || !1
  3384. }
  3385. function m(e) {
  3386. for (var t in u)
  3387. if (Object.prototype.hasOwnProperty.call(u, t) && g(t) && (void 0 === e || u[t].data("instance") === e)) return u[t];
  3388. return !1
  3389. }
  3390. function n(e) {
  3391. var t = null;
  3392. if ((t = "string" != typeof e ? e : u[e]) && f.node.hasClass(t, "fr-active") && (t.removeClass("fr-active fr-above"), f.events.trigger("popups.hide.".concat(e)), f.$tb && (1 < f.opts.zIndex ? f.$tb.css("zIndex", f.opts.zIndex + 1) : f.$tb.css("zIndex", "")), f.events.disableBlur(), t.find("input, textarea, button").each(function() {
  3393. this === this.ownerDocument.activeElement && this.blur()
  3394. }), t.find("input, textarea").attr("disabled", "disabled"), p))
  3395. for (var n = 0; n < p.length; n++) d(p[n]).removeClass("fr-btn-active-popup")
  3396. }
  3397. function v(e) {
  3398. for (var t in void 0 === e && (e = []), u) Object.prototype.hasOwnProperty.call(u, t) && e.indexOf(t) < 0 && n(t)
  3399. }
  3400. function t() {
  3401. f.shared.exit_flag = !0
  3402. }
  3403. function b() {
  3404. f.shared.exit_flag = !1
  3405. }
  3406. function o() {
  3407. return f.shared.exit_flag
  3408. }
  3409. function l(e, t) {
  3410. var n, r = function c(e, t) {
  3411. var n = $e.POPUP_TEMPLATES[e];
  3412. if (!n) return null;
  3413. for (var r in "function" == typeof n && (n = n.apply(f)), t) Object.prototype.hasOwnProperty.call(t, r) && (n = n.replace("[_".concat(r.toUpperCase(), "_]"), t[r]));
  3414. return n
  3415. }(e, t),
  3416. a = d(f.doc.createElement("DIV"));
  3417. if (!r) return a.addClass("fr-popup fr-empty"), (n = d("body").first()).append(a), a.data("container", n), u[e] = a;
  3418. a.addClass("fr-popup".concat(f.helpers.isMobile() ? " fr-mobile" : " fr-desktop").concat(f.opts.toolbarInline ? " fr-inline" : "")), a.html(r), f.opts.theme && a.addClass("".concat(f.opts.theme, "-theme")), 1 < f.opts.zIndex && (f.opts.editInPopup ? a.css("z-index", f.opts.zIndex + 2) : f.$tb.css("z-index", f.opts.zIndex + 2)), "auto" !== f.opts.direction && a.removeClass("fr-ltr fr-rtl").addClass("fr-".concat(f.opts.direction)), a.find("input, textarea").attr("dir", f.opts.direction).attr("disabled", "disabled"), (n = d("body").first()).append(a), a.data("container", n);
  3419. var o = (u[e] = a).find(".fr-color-hex-layer");
  3420. if (0 < o.length) {
  3421. var i = f.helpers.getPX(a.find(".fr-color-set > span").css("width")),
  3422. s = f.helpers.getPX(o.css("paddingLeft")),
  3423. l = f.helpers.getPX(o.css("paddingRight"));
  3424. o.css("width", i * f.opts.colorsStep + s + l)
  3425. }
  3426. return f.button.bindCommands(a, !1), a
  3427. }
  3428. function E(r) {
  3429. var a = u[r];
  3430. return {
  3431. _windowResize: function() {
  3432. var e = a.data("instance") || f;
  3433. !e.helpers.isMobile() && a.isVisible() && (e.events.disableBlur(), e.popups.hide(r), e.events.enableBlur())
  3434. },
  3435. _inputFocus: function(e) {
  3436. var t = a.data("instance") || f,
  3437. n = d(e.currentTarget);
  3438. if (n.is("input:file") && n.closest(".fr-layer").addClass("fr-input-focus"), e.preventDefault(), e.stopPropagation(), setTimeout(function() {
  3439. t.events.enableBlur()
  3440. }, 100), t.helpers.isMobile()) {
  3441. var r = d(t.o_win).scrollTop();
  3442. setTimeout(function() {
  3443. d(t.o_win).scrollTop(r)
  3444. }, 0)
  3445. }
  3446. },
  3447. _inputBlur: function(e) {
  3448. var t = a.data("instance") || f,
  3449. n = d(e.currentTarget);
  3450. n.is("input:file") && n.closest(".fr-layer").removeClass("fr-input-focus"), document.activeElement !== this && d(this).isVisible() && (t.events.blurActive() && t.events.trigger("blur"), t.events.enableBlur())
  3451. },
  3452. _editorKeydown: function(e) {
  3453. var t = a.data("instance") || f;
  3454. t.keys.ctrlKey(e) || e.which === $e.KEYCODE.ALT || e.which === $e.KEYCODE.ESC || (g(r) && a.findVisible(".fr-back").length ? t.button.exec(a.findVisible(".fr-back").first()) : e.which !== $e.KEYCODE.ALT && t.popups.hide(r))
  3455. },
  3456. _preventFocus: function(e) {
  3457. var t = a.data("instance") || f,
  3458. n = e.originalEvent ? e.originalEvent.target || e.originalEvent.originalTarget : null;
  3459. "mouseup" === e.type || d(n).is(":focus") || t.events.disableBlur(), "mouseup" !== e.type || d(n).hasClass("fr-command") || 0 < d(n).parents(".fr-command").length || d(n).hasClass("fr-dropdown-content") || f.button.hideActiveDropdowns(a), (f.browser.safari || f.browser.mozilla) && "mousedown" === e.type && d(n).is("input[type=file]") && t.events.disableBlur();
  3460. var r = "input, textarea, button, select, label, .fr-command";
  3461. if (n && !d(n).is(r) && 0 === d(n).parents(r).length) return e.stopPropagation(), !1;
  3462. n && d(n).is(r) && e.stopPropagation(), b()
  3463. },
  3464. _editorMouseup: function() {
  3465. a.isVisible() && o() && 0 < a.findVisible("input:focus, textarea:focus, button:focus, select:focus").length && f.events.disableBlur()
  3466. },
  3467. _windowMouseup: function(e) {
  3468. if (!f.core.sameInstance(a)) return !0;
  3469. var t = a.data("instance") || f;
  3470. a.isVisible() && o() && (e.stopPropagation(), t.markers.remove(), t.popups.hide(r), b())
  3471. },
  3472. _windowKeydown: function(e) {
  3473. if (!f.core.sameInstance(a)) return !0;
  3474. var t = a.data("instance") || f,
  3475. n = e.which;
  3476. if ($e.KEYCODE.ESC === n) {
  3477. if (t.popups.isVisible(r) && t.opts.toolbarInline) return e.stopPropagation(), t.popups.isVisible(r) && (a.findVisible(".fr-back").length ? (t.button.exec(a.findVisible(".fr-back").first()), t.accessibility.focusPopupButton(a)) : a.findVisible(".fr-dismiss").length ? t.button.exec(a.findVisible(".fr-dismiss").first()) : (t.popups.hide(r), t.toolbar.showInline(null, !0), t.accessibility.focusPopupButton(a))), !1;
  3478. if (t.popups.isVisible(r)) return a.findVisible(".fr-back").length ? (t.button.exec(a.findVisible(".fr-back").first), t.accessibility.focusPopupButton(a)) : a.findVisible(".fr-dismiss").length ? t.button.exec(a.findVisible(".fr-dismiss").first()) : (t.popups.hide(r), t.accessibility.focusPopupButton(a)), !1
  3479. }
  3480. },
  3481. _repositionPopup: function() {
  3482. if (!f.opts.height && !f.opts.heightMax || f.opts.toolbarInline) return !0;
  3483. if (f.$wp && g(r) && a.parent().get(0) === f.$sc.get(0)) {
  3484. var e = a.offset().top - f.$wp.offset().top,
  3485. t = f.$wp.outerHeight();
  3486. f.node.hasClass(a.get(0), "fr-above") && (e += a.outerHeight()), t < e || e < 0 ? a.addClass("fr-hidden") : a.removeClass("fr-hidden")
  3487. }
  3488. }
  3489. }
  3490. }
  3491. function c(e, t) {
  3492. f.events.on("mouseup", e._editorMouseup, !0), f.$wp && f.events.on("keydown", e._editorKeydown), f.events.on("blur", function() {
  3493. m() && f.markers.remove(), u[t].find("iframe").length || v()
  3494. }), f.$wp && !f.helpers.isMobile() && f.events.$on(f.$wp, "scroll.popup".concat(t), e._repositionPopup), f.events.on("window.mouseup", e._windowMouseup, !0), f.events.on("window.keydown", e._windowKeydown, !0), u[t].data("inst".concat(f.id), !0), f.events.on("destroy", function() {
  3495. f.core.sameInstance(u[t]) && (d("body").first().append(u[t]), u[t].removeClass("fr-active"))
  3496. }, !0)
  3497. }
  3498. function T() {
  3499. var e = d(this).prev().children().first();
  3500. e.attr("checked", !e.attr("checked"))
  3501. }
  3502. function e() {
  3503. for (var e in u)
  3504. if (Object.prototype.hasOwnProperty.call(u, e)) {
  3505. var t = u[e];
  3506. t && (t.html("").removeData().remove(), u[e] = null)
  3507. }
  3508. u = []
  3509. }
  3510. return f.shared.exit_flag = !1, {
  3511. _init: function r() {
  3512. f.events.on("shared.destroy", e, !0), f.events.on("window.mousedown", t), f.events.on("window.touchmove", b), f.events.$on(d(f.o_win), "scroll", b), f.events.on("mousedown", function(e) {
  3513. m() && (e.stopPropagation(), f.$el.find(".fr-marker").remove(), t(), f.events.disableBlur())
  3514. })
  3515. },
  3516. create: function A(e, t) {
  3517. var n = l(e, t),
  3518. r = E(e);
  3519. c(r, e), f.events.$on(n, "mousedown mouseup touchstart touchend touch", "*", r._preventFocus, !0), f.events.$on(n, "focus", "input, textarea, button, select", r._inputFocus, !0), f.events.$on(n, "blur", "input, textarea, button, select", r._inputBlur, !0);
  3520. var a = n.find("input, textarea");
  3521. return function o(e) {
  3522. for (var t = 0; t < e.length; t++) {
  3523. var n = e[t],
  3524. r = d(n);
  3525. 0 === r.next().length && r.attr("placeholder") && (r.after('<label for="'.concat(r.attr("id"), '">').concat(r.attr("placeholder"), "</label>")), r.attr("placeholder", ""))
  3526. }
  3527. }(a), f.events.$on(a, "focus", i), f.events.$on(a, "blur change", s), f.events.$on(n, "click", ".fr-checkbox + label", T), f.accessibility.registerPopup(e), f.helpers.isIOS() && f.events.$on(n, "touchend", "label", function() {
  3528. d("#".concat(d(this).attr("for"))).prop("checked", function(e, t) {
  3529. return !t
  3530. })
  3531. }, !0), f.events.$on(d(f.o_win), "resize", r._windowResize, !0), n
  3532. },
  3533. get: function a(e) {
  3534. var t = u[e];
  3535. return t && !t.data("inst".concat(f.id)) && c(E(e), e), t
  3536. },
  3537. show: function C(e, t, n, r, a) {
  3538. if (g(e) || (m() && 0 < f.$el.find(".fr-marker").length ? (f.events.disableBlur(), f.selection.restore()) : m() || (f.events.disableBlur(), f.events.focus(), f.events.enableBlur())), v([e]), !u[e]) return !1;
  3539. var o = f.button.getButtons(".fr-dropdown.fr-active");
  3540. o.removeClass("fr-active").attr("aria-expanded", !1).parents(".fr-toolbar").css("zIndex", "").find("> .fr-dropdown-wrapper").css("height", ""), o.next().attr("aria-hidden", !0).css("overflow", "").find("> .fr-dropdown-wrapper").css("height", ""), u[e].data("instance", f), f.$tb && f.$tb.data("instance", f);
  3541. var i = g(e);
  3542. u[e].addClass("fr-active").removeClass("fr-hidden").find("input, textarea").removeAttr("disabled");
  3543. var s = u[e].data("container");
  3544. if (function d(e, t) {
  3545. t.isVisible() || (t = f.$sc), t.contains([u[e].get(0)]) || t.append(u[e])
  3546. }(e, s), f.opts.toolbarInline && s && f.$tb && s.get(0) === f.$tb.get(0) && (h(e, f.$sc), n = f.$tb.offset().top - f.helpers.getPX(f.$tb.css("margin-top")), t = f.$tb.offset().left + f.$tb.outerWidth() / 2, f.node.hasClass(f.$tb.get(0), "fr-above") && n && (n += f.$tb.outerHeight()), r = 0), s = u[e].data("container"), f.opts.iframe && !r && !i) {
  3547. var l = f.helpers.getPX(f.$wp.find(".fr-iframe").css("padding-top")),
  3548. c = f.helpers.getPX(f.$wp.find(".fr-iframe").css("padding-left"));
  3549. t && (t -= f.$iframe.offset().left + c), n && (n -= f.$iframe.offset().top + l)
  3550. }
  3551. s.is(f.$tb) ? f.$tb.css("zIndex", (f.opts.zIndex || 1) + 4) : u[e].css("zIndex", (f.opts.zIndex || 1) + 4), f.opts.toolbarBottom && s && f.$tb && s.get(0) === f.$tb.get(0) && (u[e].addClass("fr-above"), n && (n -= u[e].outerHeight())), a && (t -= u[e].width() / 2), t + u[e].outerWidth() > f.$sc.offset().left + f.$sc.width() && (t -= t + u[e].outerWidth() - f.$sc.offset().left - f.$sc.width()), t < f.$sc.offset().left && "rtl" === f.opts.direction && (t = f.$sc.offset().left), u[e].removeClass("fr-active"), f.position.at(t, n, u[e], r || 0), u[e].addClass("fr-active"), i || f.accessibility.focusPopup(u[e]), f.opts.toolbarInline && f.toolbar.hide(), f.$tb && (p = f.$tb.find(".fr-btn-active-popup")), f.events.trigger("popups.show.".concat(e)), E(e)._repositionPopup(), b()
  3552. },
  3553. hide: n,
  3554. onHide: function S(e, t) {
  3555. f.events.on("popups.hide.".concat(e), t)
  3556. },
  3557. hideAll: v,
  3558. setContainer: h,
  3559. refresh: function y(e) {
  3560. u[e].data("instance", f), f.events.trigger("popups.refresh.".concat(e));
  3561. for (var t = u[e].find(".fr-command"), n = 0; n < t.length; n++) {
  3562. var r = d(t[n]);
  3563. 0 === r.parents(".fr-dropdown-menu").length && f.button.refresh(r)
  3564. }
  3565. },
  3566. onRefresh: function R(e, t) {
  3567. f.events.on("popups.refresh.".concat(e), t)
  3568. },
  3569. onShow: function L(e, t) {
  3570. f.events.on("popups.show.".concat(e), t)
  3571. },
  3572. isVisible: g,
  3573. areVisible: m
  3574. }
  3575. }, $e.MODULES.accessibility = function(f) {
  3576. var p = f.$,
  3577. o = !0;
  3578. function l(t) {
  3579. t && t.length && !f.$el.find('[contenteditable="true"]').is(":focus") && (t.data("blur-event-set") || t.parents(".fr-popup").length || (f.events.$on(t, "blur", function() {
  3580. var e = t.parents(".fr-toolbar, .fr-popup").data("instance") || f;
  3581. e.events.blurActive() && !f.core.hasFocus() && e.events.trigger("blur"), setTimeout(function() {
  3582. e.events.enableBlur()
  3583. }, 100)
  3584. }, !0), t.data("blur-event-set", !0)), (t.parents(".fr-toolbar, .fr-popup").data("instance") || f).events.disableBlur(), t.get(0).focus(), f.shared.$f_el = t)
  3585. }
  3586. function u(e, t) {
  3587. var n = t ? "last" : "first",
  3588. r = s(g(e))[n]();
  3589. if (r.length) return l(r), !0
  3590. }
  3591. function i(e) {
  3592. return e.is("input, textarea, select") && t(), f.events.disableBlur(), e.get(0).focus(), !0
  3593. }
  3594. function h(e, t) {
  3595. var n = e.find("input, textarea, button, select").filter(function() {
  3596. return p(this).isVisible()
  3597. }).not(":disabled");
  3598. if ((n = t ? n.last() : n.first()).length) return i(n);
  3599. if (f.shared.with_kb) {
  3600. var r = e.findVisible(".fr-active-item").first();
  3601. if (r.length) return i(r);
  3602. var a = e.findVisible("[tabIndex]").first();
  3603. if (a.length) return i(a)
  3604. }
  3605. }
  3606. function t() {
  3607. 0 === f.$el.find(".fr-marker").length && f.core.hasFocus() && f.selection.save()
  3608. }
  3609. function c() {
  3610. var e = f.popups.areVisible();
  3611. if (e) {
  3612. var t = e.find(".fr-buttons");
  3613. return t.find("button:focus, .fr-group span:focus").length ? !u(e.data("instance").$tb) : !u(t)
  3614. }
  3615. return !u(f.$tb)
  3616. }
  3617. function d() {
  3618. var e = null;
  3619. return f.shared.$f_el.is(".fr-dropdown.fr-active") ? e = f.shared.$f_el : f.shared.$f_el.closest(".fr-dropdown-menu").prev().is(".fr-dropdown.fr-active") && (e = f.shared.$f_el.closest(".fr-dropdown-menu").prev()), e
  3620. }
  3621. function s(e) {
  3622. for (var t = -1, n = 0; n < e.length; n++) p(e[n]).hasClass("fr-open") && (t = n);
  3623. var r = e.index(f.$tb.find(".fr-more-toolbar.fr-expanded > button.fr-command").first());
  3624. if (0 < r && -1 !== t) {
  3625. var a = e.slice(r, e.length),
  3626. o = (e = e.slice(0, r)).slice(0, t + 1),
  3627. i = e.slice(t + 1, e.length);
  3628. e = o;
  3629. for (var s = 0; s < a.length; s++) e.push(a[s]);
  3630. for (var l = 0; l < i.length; l++) e.push(i[l])
  3631. }
  3632. return e
  3633. }
  3634. function g(e) {
  3635. return e.findVisible("button:not(.fr-disabled), .fr-group span.fr-command").filter(function(e) {
  3636. var t = p(e).parents(".fr-more-toolbar");
  3637. return 0 === t.length || 0 < t.length && t.hasClass("fr-expanded")
  3638. })
  3639. }
  3640. function n(e, t, n) {
  3641. if (f.shared.$f_el) {
  3642. var r = d();
  3643. r && (f.button.click(r), f.shared.$f_el = r);
  3644. var a = s(g(e)),
  3645. o = a.index(f.shared.$f_el);
  3646. if (0 === o && !n || o === a.length - 1 && n) {
  3647. var i;
  3648. if (t) {
  3649. if (e.parent().is(".fr-popup")) i = !h(e.parent().children().not(".fr-buttons"), !n);
  3650. !1 === i && (f.shared.$f_el = null)
  3651. }
  3652. t && !1 === i || u(e, !n)
  3653. } else l(p(a.get(o + (n ? 1 : -1))));
  3654. return !1
  3655. }
  3656. }
  3657. function m(e, t) {
  3658. return n(e, t, !0)
  3659. }
  3660. function v(e, t) {
  3661. return n(e, t)
  3662. }
  3663. function b(e) {
  3664. if (f.shared.$f_el) {
  3665. var t;
  3666. if (f.shared.$f_el.is(".fr-dropdown.fr-active")) return l(t = e ? f.shared.$f_el.next().find(".fr-command:not(.fr-disabled)").first() : f.shared.$f_el.next().find(".fr-command:not(.fr-disabled)").last()), !1;
  3667. if (f.shared.$f_el.is("a.fr-command")) return (t = e ? f.shared.$f_el.closest("li").nextAllVisible().first().find(".fr-command:not(.fr-disabled)").first() : f.shared.$f_el.closest("li").prevAllVisible().first().find(".fr-command:not(.fr-disabled)").first()).length || (t = e ? f.shared.$f_el.closest(".fr-dropdown-menu").find(".fr-command:not(.fr-disabled)").first() : f.shared.$f_el.closest(".fr-dropdown-menu").find(".fr-command:not(.fr-disabled)").last()), l(t), !1
  3668. }
  3669. }
  3670. function E() {
  3671. if (f.shared.$f_el) {
  3672. if (f.shared.$f_el.hasClass("fr-dropdown")) f.button.click(f.shared.$f_el);
  3673. else if (f.shared.$f_el.is("button.fr-back")) {
  3674. f.opts.toolbarInline && (f.events.disableBlur(), f.events.focus());
  3675. var e = f.popups.areVisible(f);
  3676. e && (f.shared.with_kb = !1), f.button.click(f.shared.$f_el), A(e)
  3677. } else {
  3678. if (f.events.disableBlur(), f.button.click(f.shared.$f_el), f.shared.$f_el.attr("data-group-name")) {
  3679. var t = f.$tb.find('.fr-more-toolbar[data-name="'.concat(f.shared.$f_el.attr("data-group-name"), '"]')),
  3680. n = f.shared.$f_el;
  3681. t.hasClass("fr-expanded") && (n = t.findVisible("button:not(.fr-disabled)").first()), n && l(n)
  3682. } else if (f.shared.$f_el.attr("data-popup")) {
  3683. var r = f.popups.areVisible(f);
  3684. r && r.data("popup-button", f.shared.$f_el)
  3685. } else if (f.shared.$f_el.attr("data-modal")) {
  3686. var a = f.modals.areVisible(f);
  3687. a && a.data("modal-button", f.shared.$f_el)
  3688. }
  3689. f.shared.$f_el = null
  3690. }
  3691. return !1
  3692. }
  3693. }
  3694. function T() {
  3695. f.shared.$f_el && (f.events.disableBlur(), f.shared.$f_el.blur(), f.shared.$f_el = null), !1 !== f.events.trigger("toolbar.focusEditor") && (f.events.disableBlur(), f.$el.get(0).focus(), f.events.focus())
  3696. }
  3697. function a(r) {
  3698. r && r.length && (f.events.$on(r, "keydown", function(e) {
  3699. if (!p(e.target).is("a.fr-command, button.fr-command, .fr-group span.fr-command")) return !0;
  3700. var t = r.parents(".fr-popup").data("instance") || r.data("instance") || f;
  3701. f.shared.with_kb = !0;
  3702. var n = t.accessibility.exec(e, r);
  3703. return f.shared.with_kb = !1, n
  3704. }, !0), f.events.$on(r, "mouseenter", "[tabIndex]", function(e) {
  3705. var t = r.parents(".fr-popup").data("instance") || r.data("instance") || f;
  3706. if (!o) return e.stopPropagation(), void e.preventDefault();
  3707. var n = p(e.currentTarget);
  3708. t.shared.$f_el && t.shared.$f_el.not(n) && t.accessibility.focusEditor()
  3709. }, !0), f.$tb && f.events.$on(f.$tb, "transitionend", ".fr-more-toolbar", function() {
  3710. f.shared.$f_el = p(document.activeElement)
  3711. }))
  3712. }
  3713. function A(e) {
  3714. var t = e.data("popup-button");
  3715. t && setTimeout(function() {
  3716. l(t), e.data("popup-button", null)
  3717. }, 0)
  3718. }
  3719. function C(e) {
  3720. var t = f.popups.areVisible(e);
  3721. t && t.data("popup-button", null)
  3722. }
  3723. function e(e) {
  3724. var t = -1 !== navigator.userAgent.indexOf("Mac OS X") ? e.metaKey : e.ctrlKey;
  3725. if (e.which !== $e.KEYCODE.F10 || t || e.shiftKey || !e.altKey) return !0;
  3726. f.shared.with_kb = !0;
  3727. var n = f.popups.areVisible(f),
  3728. r = !1;
  3729. return n && (r = h(n.children().not(".fr-buttons"))), r || c(), f.shared.with_kb = !1, e.preventDefault(), e.stopPropagation(), !1
  3730. }
  3731. return {
  3732. _init: function r() {
  3733. f.$wp ? f.events.on("keydown", e, !0) : f.events.$on(f.$win, "keydown", e, !0), f.events.on("mousedown", function(e) {
  3734. C(f), f.shared.$f_el && (f.accessibility.restoreSelection(), e.stopPropagation(), f.events.disableBlur(), f.shared.$f_el = null)
  3735. }, !0), f.events.on("blur", function() {
  3736. f.shared.$f_el = null, C(f)
  3737. }, !0)
  3738. },
  3739. registerPopup: function S(e) {
  3740. var t = f.popups.get(e),
  3741. n = function r(c) {
  3742. var d = f.popups.get(c);
  3743. return {
  3744. _tiKeydown: function(e) {
  3745. var t = d.data("instance") || f;
  3746. if (!1 === t.events.trigger("popup.tab", [e])) return !1;
  3747. var n = e.which,
  3748. r = d.find(":focus").first();
  3749. if ($e.KEYCODE.TAB === n) {
  3750. e.preventDefault();
  3751. var a = d.children().not(".fr-buttons"),
  3752. o = a.findVisible("input, textarea, button, select").not(".fr-no-touch input, .fr-no-touch textarea, .fr-no-touch button, .fr-no-touch select, :disabled").toArray(),
  3753. i = o.indexOf(this) + (e.shiftKey ? -1 : 1);
  3754. if (0 <= i && i < o.length) return t.events.disableBlur(), p(o[i]).focus(), e.stopPropagation(), !1;
  3755. var s = d.find(".fr-buttons");
  3756. if (s.length && u(s, Boolean(e.shiftKey))) return e.stopPropagation(), !1;
  3757. if (h(a)) return e.stopPropagation(), !1
  3758. } else {
  3759. if ($e.KEYCODE.ENTER !== n || !e.target || "TEXTAREA" === e.target.tagName) return $e.KEYCODE.ESC === n ? (e.preventDefault(), e.stopPropagation(), t.accessibility.restoreSelection(), t.popups.isVisible(c) && d.findVisible(".fr-back").length ? (t.opts.toolbarInline && (t.events.disableBlur(), t.events.focus()), t.button.exec(d.findVisible(".fr-back").first()), A(d)) : t.popups.isVisible(c) && d.findVisible(".fr-dismiss").length ? t.button.exec(d.findVisible(".fr-dismiss").first()) : (t.popups.hide(c), t.opts.toolbarInline && t.toolbar.showInline(null, !0), A(d)), !1) : $e.KEYCODE.SPACE === n && (r.is(".fr-submit") || r.is(".fr-dismiss")) ? (e.preventDefault(), e.stopPropagation(), t.events.disableBlur(), t.button.exec(r), !0) : t.keys.isBrowserAction(e) ? void e.stopPropagation() : r.is("input[type=text], textarea") ? void e.stopPropagation() : $e.KEYCODE.SPACE === n && (r.is(".fr-link-attr") || r.is("input[type=file]")) ? void e.stopPropagation() : (e.stopPropagation(), e.preventDefault(), !1);
  3760. var l = null;
  3761. 0 < d.findVisible(".fr-submit").length ? l = d.findVisible(".fr-submit").first() : d.findVisible(".fr-dismiss").length && (l = d.findVisible(".fr-dismiss").first()), l && (e.preventDefault(), e.stopPropagation(), t.events.disableBlur(), t.button.exec(l))
  3762. }
  3763. },
  3764. _tiMouseenter: function() {
  3765. var e = d.data("instance") || f;
  3766. C(e)
  3767. }
  3768. }
  3769. }(e);
  3770. a(t.find(".fr-buttons")), f.events.$on(t, "mouseenter", "tabIndex", n._tiMouseenter, !0), f.events.$on(t.children().not(".fr-buttons"), "keydown", "[tabIndex]", n._tiKeydown, !0), f.popups.onHide(e, function() {
  3771. (t.data("instance") || f).accessibility.restoreSelection()
  3772. }), f.popups.onShow(e, function() {
  3773. o = !1, setTimeout(function() {
  3774. o = !0
  3775. }, 0)
  3776. })
  3777. },
  3778. registerToolbar: a,
  3779. focusToolbarElement: l,
  3780. focusToolbar: u,
  3781. focusContent: h,
  3782. focusPopup: function y(r) {
  3783. var a = r.children().not(".fr-buttons");
  3784. a.data("mouseenter-event-set") || (f.events.$on(a, "mouseenter", "[tabIndex]", function(e) {
  3785. var t = r.data("instance") || f;
  3786. if (!o) return e.stopPropagation(), void e.preventDefault();
  3787. var n = a.find(":focus").first();
  3788. n.length && !n.is("input, button, textarea, select") && (t.events.disableBlur(), n.blur(), t.events.disableBlur(), t.events.focus())
  3789. }), a.data("mouseenter-event-set", !0)), !h(a) && f.shared.with_kb && u(r.find(".fr-buttons"))
  3790. },
  3791. focusModal: function R(e) {
  3792. f.core.hasFocus() || (f.events.disableBlur(), f.events.focus()), f.accessibility.saveSelection(), f.events.disableBlur(), f.el.blur(), f.selection.clear(), f.events.disableBlur(), f.shared.with_kb ? e.find(".fr-command[tabIndex], [tabIndex]").first().focus() : e.find("[tabIndex]").first().focus()
  3793. },
  3794. focusEditor: T,
  3795. focusPopupButton: A,
  3796. focusModalButton: function L(e) {
  3797. var t = e.data("modal-button");
  3798. t && setTimeout(function() {
  3799. l(t), e.data("modal-button", null)
  3800. }, 0)
  3801. },
  3802. hasFocus: function w() {
  3803. return null !== f.shared.$f_el
  3804. },
  3805. exec: function _(e, t) {
  3806. var n = -1 !== navigator.userAgent.indexOf("Mac OS X") ? e.metaKey : e.ctrlKey,
  3807. r = e.which,
  3808. a = !1;
  3809. return r !== $e.KEYCODE.TAB || n || e.shiftKey || e.altKey ? r !== $e.KEYCODE.ARROW_RIGHT || n || e.shiftKey || e.altKey ? r !== $e.KEYCODE.TAB || n || !e.shiftKey || e.altKey ? r !== $e.KEYCODE.ARROW_LEFT || n || e.shiftKey || e.altKey ? r !== $e.KEYCODE.ARROW_UP || n || e.shiftKey || e.altKey ? r !== $e.KEYCODE.ARROW_DOWN || n || e.shiftKey || e.altKey ? r !== $e.KEYCODE.ENTER && r !== $e.KEYCODE.SPACE || n || e.shiftKey || e.altKey ? r !== $e.KEYCODE.ESC || n || e.shiftKey || e.altKey ? r !== $e.KEYCODE.F10 || n || e.shiftKey || !e.altKey || (a = c()) : a = function o(e) {
  3810. if (f.shared.$f_el) {
  3811. var t = d();
  3812. return t ? (f.button.click(t), l(t)) : e.parent().findVisible(".fr-back").length ? (f.shared.with_kb = !1, f.opts.toolbarInline && (f.events.disableBlur(), f.events.focus()), f.button.exec(e.parent().findVisible(".fr-back")).first(), A(e.parent())) : f.shared.$f_el.is("button, .fr-group span") && (e.parent().is(".fr-popup") ? (f.accessibility.restoreSelection(), f.shared.$f_el = null, !1 !== f.events.trigger("toolbar.esc") && (f.popups.hide(e.parent()), f.opts.toolbarInline && f.toolbar.showInline(null, !0), A(e.parent()))) : T()), !1
  3813. }
  3814. }(t) : a = E() : a = function i() {
  3815. return f.shared.$f_el && f.shared.$f_el.is(".fr-dropdown:not(.fr-active)") ? E() : b(!0)
  3816. }() : a = function s() {
  3817. return b()
  3818. }() : a = v(t) : a = v(t, !0) : a = m(t) : a = m(t, !0), f.shared.$f_el || void 0 !== a || (a = !0), !a && f.keys.isBrowserAction(e) && (a = !0), !!a || (e.preventDefault(), e.stopPropagation(), !1)
  3819. },
  3820. saveSelection: t,
  3821. restoreSelection: function O() {
  3822. f.$el.find(".fr-marker").length && (f.events.disableBlur(), f.selection.restore(), f.events.enableBlur())
  3823. }
  3824. }
  3825. }, Object.assign($e.DEFAULTS, {
  3826. tooltips: !0
  3827. }), $e.MODULES.tooltip = function(o) {
  3828. var i = o.$;
  3829. function r() {
  3830. o.helpers.isMobile() || o.$tooltip && o.$tooltip.removeClass("fr-visible").css("left", "-3000px").css("position", "fixed")
  3831. }
  3832. function a(e, t) {
  3833. if (!o.helpers.isMobile() && (e.data("title") || e.data("title", e.attr("title")), e.data("title"))) {
  3834. o.$tooltip || function a() {
  3835. o.opts.tooltips && !o.helpers.isMobile() && (o.shared.$tooltip ? o.$tooltip = o.shared.$tooltip : (o.shared.$tooltip = i(o.doc.createElement("DIV")).addClass("fr-tooltip"), o.$tooltip = o.shared.$tooltip, o.opts.theme && o.$tooltip.addClass("".concat(o.opts.theme, "-theme")), i(o.o_doc).find("body").first().append(o.$tooltip)), o.events.on("shared.destroy", function() {
  3836. o.$tooltip.html("").removeData().remove(), o.$tooltip = null
  3837. }, !0))
  3838. }(), e.removeAttr("title"), o.$tooltip.text(o.language.translate(e.data("title"))), o.$tooltip.addClass("fr-visible");
  3839. var n = e.offset().left + (e.outerWidth() - o.$tooltip.outerWidth()) / 2;
  3840. n < 0 && (n = 0), n + o.$tooltip.outerWidth() > i(o.o_win).width() && (n = i(o.o_win).width() - o.$tooltip.outerWidth()), void 0 === t && (t = o.opts.toolbarBottom), e.offset().top - i(window).scrollTop() + e.outerHeight() + 10 >= i(window).height() && (t = !0);
  3841. var r = t ? e.offset().top - o.$tooltip.height() : e.offset().top + e.outerHeight();
  3842. o.$tooltip.css("position", ""), o.$tooltip.css("left", n), o.$tooltip.css("top", Math.ceil(r)), "static" !== i(o.o_doc).find("body").first().css("position") ? (o.$tooltip.css("margin-left", -i(o.o_doc).find("body").first().offset().left), o.$tooltip.css("margin-top", -i(o.o_doc).find("body").first().offset().top)) : (o.$tooltip.css("margin-left", ""), o.$tooltip.css("margin-top", ""))
  3843. }
  3844. }
  3845. return {
  3846. hide: r,
  3847. to: a,
  3848. bind: function s(e, t, n) {
  3849. o.opts.tooltips && !o.helpers.isMobile() && (o.events.$on(e, "mouseover", t, function(e) {
  3850. o.node.hasClass(e.currentTarget, "fr-disabled") || o.edit.isDisabled() || a(i(e.currentTarget), n)
  3851. }, !0), o.events.$on(e, "mouseout ".concat(o._mousedown, " ").concat(o._mouseup), t, function() {
  3852. r()
  3853. }, !0))
  3854. }
  3855. }
  3856. }, $e.TOOLBAR_VISIBLE_BUTTONS = 3, $e.MODULES.button = function(g) {
  3857. var h = g.$,
  3858. i = [];
  3859. (g.opts.toolbarInline || g.opts.toolbarContainer) && (g.shared.buttons || (g.shared.buttons = []), i = g.shared.buttons);
  3860. var s = [];
  3861. function l(e, t, n) {
  3862. for (var r = h(), a = 0; a < e.length; a++) {
  3863. var o = h(e[a]);
  3864. if (o.is(t) && (r = r.add(o)), n && o.is(".fr-dropdown")) {
  3865. var i = o.next().find(t);
  3866. r = r.add(i)
  3867. }
  3868. }
  3869. return r
  3870. }
  3871. function m(e, t) {
  3872. var n, r = h();
  3873. if (!e) return r;
  3874. for (n in r = (r = r.add(l(i, e, t))).add(l(s, e, t)), g.shared.popups)
  3875. if (Object.prototype.hasOwnProperty.call(g.shared.popups, n)) {
  3876. var a = g.shared.popups[n].children().find(e);
  3877. r = r.add(a)
  3878. }
  3879. for (n in g.shared.modals)
  3880. if (Object.prototype.hasOwnProperty.call(g.shared.modals, n)) {
  3881. var o = g.shared.modals[n].$modal.find(e);
  3882. r = r.add(o)
  3883. }
  3884. return r
  3885. }
  3886. function a(e) {
  3887. var t = e.next(),
  3888. n = g.node.hasClass(e.get(0), "fr-active"),
  3889. r = m(".fr-dropdown.fr-active").not(e),
  3890. a = e.parents(".fr-toolbar, .fr-popup").data("instance") || g;
  3891. a.helpers.isIOS() && !a.el.querySelector(".fr-marker") && (a.selection.save(), a.selection.clear(), a.selection.restore()), t.parents(".fr-more-toolbar").addClass("fr-overflow-visible");
  3892. var o = 0,
  3893. i = 0,
  3894. s = t.find("> .fr-dropdown-wrapper");
  3895. if (!n) {
  3896. var l = e.data("cmd");
  3897. t.find(".fr-command").removeClass("fr-active").attr("aria-selected", !1), $e.COMMANDS[l] && $e.COMMANDS[l].refreshOnShow && $e.COMMANDS[l].refreshOnShow.apply(a, [e, t]), t.css("left", e.offset().left - e.parents(".fr-btn-wrap, .fr-toolbar, .fr-buttons").offset().left - ("rtl" === g.opts.direction ? t.width() - e.outerWidth() : 0)), t.addClass("test-height"), o = t.outerHeight(), i = g.helpers.getPX(s.css("max-height")), t.removeClass("test-height"), t.css("top", "").css("bottom", "");
  3898. var c = e.outerHeight() / 10;
  3899. if (!g.opts.toolbarBottom && t.offset().top + e.outerHeight() + o < h(g.o_doc).height()) t.css("top", e.position().top + e.outerHeight() - c);
  3900. else {
  3901. var d = 0,
  3902. f = e.parents(".fr-more-toolbar");
  3903. 0 < f.length && (d = f.first().height()), t.css("bottom", e.parents(".fr-popup, .fr-toolbar").first().height() - d - e.position().top)
  3904. }
  3905. }(e.addClass("fr-blink").toggleClass("fr-active"), e.hasClass("fr-options")) && e.prev().toggleClass("fr-expanded");
  3906. e.hasClass("fr-active") ? (t.attr("aria-hidden", !1), e.attr("aria-expanded", !0), function u(e, t, n) {
  3907. n <= t && e.parent().css("overflow", "auto"), e.css("height", Math.min(t, n))
  3908. }(s, o, i)) : (t.attr("aria-hidden", !0).css("overflow", ""), e.attr("aria-expanded", !1), s.css("height", "")), setTimeout(function() {
  3909. e.removeClass("fr-blink")
  3910. }, 300), t.css("margin-left", ""), t.offset().left + t.outerWidth() > g.$sc.offset().left + g.$sc.width() && t.css("margin-left", -(t.offset().left + t.outerWidth() - g.$sc.offset().left - g.$sc.width())), t.offset().left < g.$sc.offset().left && "rtl" === g.opts.direction && t.css("margin-left", g.$sc.offset().left), r.removeClass("fr-active").attr("aria-expanded", !1).next().attr("aria-hidden", !0).css("overflow", "").find("> .fr-dropdown-wrapper").css("height", ""), r.prev(".fr-expanded").removeClass("fr-expanded"), r.parents(".fr-toolbar:not(.fr-inline)").css("zIndex", ""), 0 !== e.parents(".fr-popup").length || g.opts.toolbarInline || (g.node.hasClass(e.get(0), "fr-active") ? g.$tb.css("zIndex", (g.opts.zIndex || 1) + 4) : g.$tb.css("zIndex", ""));
  3911. var p = t.find("a.fr-command.fr-active").first();
  3912. g.helpers.isMobile() || (p.length ? (g.accessibility.focusToolbarElement(p), s.scrollTop(Math.abs(p.parents(".fr-dropdown-content").offset().top - p.offset().top) - p.offset().top)) : (g.accessibility.focusToolbarElement(e), s.scrollTop(0)))
  3913. }
  3914. function o(e) {
  3915. e.addClass("fr-blink"), setTimeout(function() {
  3916. e.removeClass("fr-blink")
  3917. }, 500);
  3918. for (var t = e.data("cmd"), n = []; void 0 !== e.data("param".concat(n.length + 1));) n.push(e.data("param".concat(n.length + 1)));
  3919. var r = m(".fr-dropdown.fr-active");
  3920. r.length && (r.removeClass("fr-active").attr("aria-expanded", !1).next().attr("aria-hidden", !0).css("overflow", "").find("> .fr-dropdown-wrapper").css("height", ""), r.prev(".fr-expanded").removeClass("fr-expanded"), r.parents(".fr-toolbar:not(.fr-inline)").css("zIndex", "")), e.parents(".fr-popup, .fr-toolbar").data("instance").commands.exec(t, n)
  3921. }
  3922. function t(e) {
  3923. var t = e.parents(".fr-popup, .fr-toolbar").data("instance");
  3924. if (0 === e.parents(".fr-popup").length && e.data("popup") && !e.hasClass("fr-btn-active-popup") && e.addClass("fr-btn-active-popup"), 0 !== e.parents(".fr-popup").length || e.data("popup") || t.popups.hideAll(), t.popups.areVisible() && !t.popups.areVisible(t)) {
  3925. for (var n = 0; n < $e.INSTANCES.length; n++) $e.INSTANCES[n] !== t && $e.INSTANCES[n].popups && $e.INSTANCES[n].popups.areVisible() && $e.INSTANCES[n].$el.find(".fr-marker").remove();
  3926. t.popups.hideAll()
  3927. }
  3928. g.node.hasClass(e.get(0), "fr-dropdown") ? a(e) : (! function r(e) {
  3929. o(e)
  3930. }(e), $e.COMMANDS[e.data("cmd")] && !1 !== $e.COMMANDS[e.data("cmd")].refreshAfterCallback && t.button.bulkRefresh())
  3931. }
  3932. function c(e) {
  3933. t(h(e.currentTarget))
  3934. }
  3935. function d(e) {
  3936. var t = e.find(".fr-dropdown.fr-active");
  3937. t.length && (t.removeClass("fr-active").attr("aria-expanded", !1).next().attr("aria-hidden", !0).css("overflow", "").find("> .fr-dropdown-wrapper").css("height", ""), t.parents(".fr-toolbar:not(.fr-inline)").css("zIndex", ""), t.prev().removeClass("fr-expanded"))
  3938. }
  3939. function f(e) {
  3940. e.preventDefault(), e.stopPropagation()
  3941. }
  3942. function p(e) {
  3943. if (e.stopPropagation(), !g.helpers.isMobile()) return !1
  3944. }
  3945. function v(e) {
  3946. var t = 1 < arguments.length && arguments[1] !== undefined ? arguments[1] : {},
  3947. n = 2 < arguments.length ? arguments[2] : undefined;
  3948. if (g.helpers.isMobile() && !1 === t.showOnMobile) return "";
  3949. var r = t.displaySelection;
  3950. "function" == typeof r && (r = r(g));
  3951. var a = "";
  3952. if ("options" !== t.type)
  3953. if (r) {
  3954. var o = "function" == typeof t.defaultSelection ? t.defaultSelection(g) : t.defaultSelection;
  3955. a = '<span style="width:'.concat(t.displaySelectionWidth || 100, 'px">').concat(g.language.translate(o || t.title), "</span>")
  3956. } else a = g.icon.create(t.icon || e), a += '<span class="fr-sr-only">'.concat(g.language.translate(t.title) || "", "</span>");
  3957. var i = t.popup ? ' data-popup="true"' : "",
  3958. s = t.modal ? ' data-modal="true"' : "",
  3959. l = g.shortcuts.get("".concat(e, "."));
  3960. l = l ? " (".concat(l, ")") : "";
  3961. var c = "".concat(e, "-").concat(g.id),
  3962. d = "dropdown-menu-".concat(c),
  3963. f = '<button id="'.concat(c, '"').concat(t.more_btn ? ' data-group-name="'.concat(c, '" ') : "", 'type="button" tabIndex="-1" role="button"').concat(t.toggle ? ' aria-pressed="false"' : "").concat("dropdown" === t.type || "options" === t.type ? ' aria-controls="'.concat(d, '" aria-expanded="false" aria-haspopup="true"') : "").concat(t.disabled ? ' aria-disabled="true"' : "", ' title="').concat(g.language.translate(t.title) || "").concat(l, '" class="fr-command fr-btn').concat("dropdown" === t.type || "options" == t.type ? " fr-dropdown" : "").concat("options" == t.type ? " fr-options" : "").concat("more" == t.type ? " fr-more" : "").concat(t.displaySelection ? " fr-selection" : "").concat(t.back ? " fr-back" : "").concat(t.disabled ? " fr-disabled" : "").concat(n ? "" : " fr-hidden", '" data-cmd="').concat(e, '"').concat(i).concat(s, ">").concat(a, "</button>");
  3964. if ("dropdown" === t.type || "options" === t.type) {
  3965. var p = '<div id="'.concat(d, '" class="fr-dropdown-menu" role="listbox" aria-labelledby="').concat(c, '" aria-hidden="true"><div class="fr-dropdown-wrapper" role="presentation"><div class="fr-dropdown-content" role="presentation">');
  3966. p += function u(e, t) {
  3967. var n = "";
  3968. if (t.html) "function" == typeof t.html ? n += t.html.call(g) : n += t.html;
  3969. else {
  3970. var r = t.options;
  3971. for (var a in "function" == typeof r && (r = r()), n += '<ul class="fr-dropdown-list" role="presentation">', r)
  3972. if (Object.prototype.hasOwnProperty.call(r, a)) {
  3973. var o = g.shortcuts.get("".concat(e, ".").concat(a));
  3974. o = o ? '<span class="fr-shortcut">'.concat(o, "</span>") : "", n += '<li role="presentation"><a class="fr-command" tabIndex="-1" role="option" data-cmd="'.concat("options" === t.type ? e.replace(/Options/g, "") : e, '" data-param1="').concat(a, '" title="').concat(r[a], '">').concat(g.language.translate(r[a]), "</a></li>")
  3975. }
  3976. n += "</ul>"
  3977. }
  3978. return n
  3979. }(e, t), f += p += "</div></div></div>"
  3980. }
  3981. return t.hasOptions && t.hasOptions.apply(g) && (f = '<div class="fr-btn-wrap">'.concat(f, " ").concat(v(e + "Options", Object.assign({}, t, {
  3982. type: "options",
  3983. hasOptions: !1
  3984. }), n), " </div>")), f
  3985. }
  3986. function e(a) {
  3987. var o = g.$tb && g.$tb.data("instance") || g;
  3988. if (!1 === g.events.trigger("buttons.refresh")) return !0;
  3989. setTimeout(function() {
  3990. for (var e = o.selection.inEditor() && o.core.hasFocus(), t = 0; t < a.length; t++) {
  3991. var n = h(a[t]),
  3992. r = n.data("cmd");
  3993. 0 === n.parents(".fr-popup").length ? e || $e.COMMANDS[r] && $e.COMMANDS[r].forcedRefresh ? o.button.refresh(n) : g.node.hasClass(n.get(0), "fr-dropdown") || (n.removeClass("fr-active"), n.attr("aria-pressed") && n.attr("aria-pressed", !1)) : n.parents(".fr-popup").isVisible() && o.button.refresh(n)
  3994. }
  3995. }, 0)
  3996. }
  3997. function n() {
  3998. e(i), e(s)
  3999. }
  4000. function r() {
  4001. i = [], s = []
  4002. }
  4003. g.shared.popup_buttons || (g.shared.popup_buttons = []), s = g.shared.popup_buttons;
  4004. var u = null;
  4005. function b() {
  4006. clearTimeout(u), u = setTimeout(n, 50)
  4007. }
  4008. return {
  4009. _init: function E() {
  4010. g.opts.toolbarInline ? g.events.on("toolbar.show", n) : (g.events.on("mouseup", b), g.events.on("keyup", b), g.events.on("blur", b), g.events.on("focus", b), g.events.on("contentChanged", b), g.helpers.isMobile() && g.events.$on(g.$doc, "selectionchange", n)), g.events.on("shared.destroy", r)
  4011. },
  4012. build: v,
  4013. buildList: function T(e, t) {
  4014. for (var n = "", r = 0; r < e.length; r++) {
  4015. var a = e[r],
  4016. o = $e.COMMANDS[a];
  4017. o && "undefined" != typeof o.plugin && g.opts.pluginsEnabled.indexOf(o.plugin) < 0 || (o ? n += v(a, o, void 0 === t || 0 <= t.indexOf(a)) : "|" === a ? n += '<div class="fr-separator fr-vs" role="separator" aria-orientation="vertical"></div>' : "-" === a && (n += '<div class="fr-separator fr-hs" role="separator" aria-orientation="horizontal"></div>'))
  4018. }
  4019. return n
  4020. },
  4021. buildGroup: function A(e) {
  4022. var t = "",
  4023. n = "";
  4024. for (var r in e) {
  4025. var a = e[r];
  4026. if (a.buttons) {
  4027. for (var o = "", i = "", s = 0, l = "left", c = $e.TOOLBAR_VISIBLE_BUTTONS, d = 0; d < a.buttons.length; d++) {
  4028. var f = a.buttons[d],
  4029. p = $e.COMMANDS[f];
  4030. !p || p && "undefined" != typeof p.plugin && g.opts.pluginsEnabled.indexOf(p.plugin) < 0 || (e[r].align !== undefined && (l = e[r].align), e[r].buttonsVisible !== undefined && (c = e[r].buttonsVisible), e.showMoreButtons && c <= s ? i += v(f, p, !0) : o += v(f, p, !0), s++)
  4031. }
  4032. if (e.showMoreButtons && c < s) {
  4033. var u = r,
  4034. h = $e.COMMANDS[u];
  4035. h.more_btn = !0, o += v(u, h, !0)
  4036. }
  4037. t += '<div class="fr-btn-grp fr-float-'.concat(l, '">').concat(o, "</div>"), e.showMoreButtons && 0 < i.length && (n += '<div class="fr-more-toolbar" data-name="'.concat(r + "-" + g.id, '">').concat(i, "</div>"))
  4038. }
  4039. }
  4040. return g.opts.toolbarBottom ? "".concat(n, '<div class="fr-newline"></div>').concat(t) : "".concat(t, '<div class="fr-newline"></div>').concat(n)
  4041. },
  4042. bindCommands: function C(t, e) {
  4043. g.events.bindClick(t, ".fr-command:not(.fr-disabled)", c), g.events.$on(t, "".concat(g._mousedown, " ").concat(g._mouseup, " ").concat(g._move), ".fr-dropdown-menu", f, !0), g.events.$on(t, "".concat(g._mousedown, " ").concat(g._mouseup, " ").concat(g._move), ".fr-dropdown-menu .fr-dropdown-wrapper", p, !0);
  4044. var n = t.get(0).ownerDocument,
  4045. r = "defaultView" in n ? n.defaultView : n.parentWindow;
  4046. function a(e) {
  4047. (!e || e.type === g._mouseup && e.target !== h("html").get(0) || "keydown" === e.type && (g.keys.isCharacter(e.which) && !g.keys.ctrlKey(e) || e.which === $e.KEYCODE.ESC)) && d(t)
  4048. }
  4049. g.events.$on(h(r), "".concat(g._mouseup, " resize keydown"), a, !0), g.opts.iframe && g.events.$on(g.$win, g._mouseup, a, !0), g.node.hasClass(t.get(0), "fr-popup") ? h.merge(s, t.find(".fr-btn").toArray()) : h.merge(i, t.find(".fr-btn").toArray()), g.tooltip.bind(t, ".fr-btn, .fr-title", e)
  4050. },
  4051. refresh: function S(e) {
  4052. var t, n = e.parents(".fr-popup, .fr-toolbar").data("instance") || g,
  4053. r = e.data("cmd");
  4054. g.node.hasClass(e.get(0), "fr-dropdown") ? t = e.next() : (e.removeClass("fr-active"), e.attr("aria-pressed") && e.attr("aria-pressed", !1)), $e.COMMANDS[r] && $e.COMMANDS[r].refresh ? $e.COMMANDS[r].refresh.apply(n, [e, t]) : g.refresh[r] && n.refresh[r](e, t)
  4055. },
  4056. bulkRefresh: n,
  4057. exec: o,
  4058. click: t,
  4059. hideActiveDropdowns: d,
  4060. addButtons: function y(e) {
  4061. for (var t = 0; t < e.length; t++) i.push(e)
  4062. },
  4063. getButtons: m,
  4064. getPosition: function R(e) {
  4065. var t = e.offset().left,
  4066. n = g.opts.toolbarBottom ? 10 : e.outerHeight() - 10;
  4067. return {
  4068. left: t,
  4069. top: e.offset().top + n
  4070. }
  4071. }
  4072. }
  4073. }, $e.ICON_TEMPLATES = {
  4074. font_awesome: '<i class="fa fa-[NAME]" aria-hidden="true"></i>',
  4075. font_awesome_5: '<i class="fas fa-[FA5NAME]" aria-hidden="true"></i>',
  4076. font_awesome_5r: '<i class="far fa-[FA5NAME]" aria-hidden="true"></i>',
  4077. font_awesome_5l: '<i class="fal fa-[FA5NAME]" aria-hidden="true"></i>',
  4078. font_awesome_5b: '<i class="fab fa-[FA5NAME]" aria-hidden="true"></i>',
  4079. text: '<span style="text-align: center;">[NAME]</span>',
  4080. image: "<img src=[SRC] alt=[ALT] />",
  4081. svg: '<svg class="fr-svg" focusable="false" viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg"><path d="[PATH]"/></svg>',
  4082. empty: " "
  4083. }, $e.ICONS = {
  4084. bold: {
  4085. NAME: "bold",
  4086. SVG_KEY: "bold"
  4087. },
  4088. italic: {
  4089. NAME: "italic",
  4090. SVG_KEY: "italic"
  4091. },
  4092. underline: {
  4093. NAME: "underline",
  4094. SVG_KEY: "underline"
  4095. },
  4096. strikeThrough: {
  4097. NAME: "strikethrough",
  4098. SVG_KEY: "strikeThrough"
  4099. },
  4100. subscript: {
  4101. NAME: "subscript",
  4102. SVG_KEY: "subscript"
  4103. },
  4104. superscript: {
  4105. NAME: "superscript",
  4106. SVG_KEY: "superscript"
  4107. },
  4108. color: {
  4109. NAME: "tint",
  4110. SVG_KEY: "textColor"
  4111. },
  4112. outdent: {
  4113. NAME: "outdent",
  4114. SVG_KEY: "outdent"
  4115. },
  4116. indent: {
  4117. NAME: "indent",
  4118. SVG_KEY: "indent"
  4119. },
  4120. undo: {
  4121. NAME: "rotate-left",
  4122. FA5NAME: "undo",
  4123. SVG_KEY: "undo"
  4124. },
  4125. redo: {
  4126. NAME: "rotate-right",
  4127. FA5NAME: "redo",
  4128. SVG_KEY: "redo"
  4129. },
  4130. insertHR: {
  4131. NAME: "minus",
  4132. SVG_KEY: "horizontalLine"
  4133. },
  4134. clearFormatting: {
  4135. NAME: "eraser",
  4136. SVG_KEY: "clearFormatting"
  4137. },
  4138. selectAll: {
  4139. NAME: "mouse-pointer",
  4140. SVG_KEY: "selectAll"
  4141. },
  4142. moreText: {
  4143. NAME: "ellipsis-v",
  4144. SVG_KEY: "textMore"
  4145. },
  4146. moreParagraph: {
  4147. NAME: "ellipsis-v",
  4148. SVG_KEY: "paragraphMore"
  4149. },
  4150. moreRich: {
  4151. NAME: "ellipsis-v",
  4152. SVG_KEY: "insertMore"
  4153. },
  4154. moreMisc: {
  4155. NAME: "ellipsis-v",
  4156. SVG_KEY: "more"
  4157. }
  4158. }, $e.DefineIconTemplate = function(e, t) {
  4159. $e.ICON_TEMPLATES[e] = t
  4160. }, $e.DefineIcon = function(e, t) {
  4161. $e.ICONS[e] = t
  4162. }, Object.assign($e.DEFAULTS, {
  4163. iconsTemplate: "svg"
  4164. }), $e.MODULES.icon = function(a) {
  4165. return {
  4166. create: function o(n) {
  4167. var e = null,
  4168. r = $e.ICONS[n];
  4169. if (void 0 !== r) {
  4170. var t = r.template || $e.ICON_DEFAULT_TEMPLATE || a.opts.iconsTemplate;
  4171. t && t.apply && (t = t.apply(a)), r.FA5NAME || (r.FA5NAME = r.NAME), "svg" !== t || r.PATH || (r.PATH = $e.SVG[r.SVG_KEY] || ""), t && (t = $e.ICON_TEMPLATES[t]) && (e = t.replace(/\[([a-zA-Z0-9]*)\]/g, function(e, t) {
  4172. return "NAME" === t ? r[t] || n : r[t]
  4173. }))
  4174. }
  4175. return e || n
  4176. },
  4177. getTemplate: function r(e) {
  4178. var t = $e.ICONS[e],
  4179. n = a.opts.iconsTemplate;
  4180. return void 0 !== t ? n = t.template || $e.ICON_DEFAULT_TEMPLATE || a.opts.iconsTemplate : n
  4181. }
  4182. }
  4183. }, $e.SVG = {
  4184. add: "M19,13h-6v6h-2v-6H5v-2h6V5h2v6h6V13z",
  4185. advancedImageEditor: "M3,17v2h6v-2H3z M3,5v2h10V5H3z M13,21v-2h8v-2h-8v-2h-2v6H13z M7,9v2H3v2h4v2h2V9H7z M21,13v-2H11v2H21z M15,9h2V7h4V5h-4 V3h-2V9z",
  4186. alignCenter: "M9,18h6v-2H9V18z M6,11v2h12v-2H6z M3,6v2h18V6H3z",
  4187. alignJustify: "M3,18h18v-2H3V18z M3,11v2h18v-2H3z M3,6v2h18V6H3z",
  4188. alignLeft: "M3,18h6v-2H3V18z M3,11v2h12v-2H3z M3,6v2h18V6H3z",
  4189. alignRight: "M15,18h6v-2h-6V18z M9,11v2h12v-2H9z M3,6v2h18V6H3z",
  4190. anchors: "M16,4h-4H8C6.9,4,6,4.9,6,6v4v10l6-2.6l6,2.6V10V6C18,4.9,17.1,4,16,4z M16,17l-4-1.8L8,17v-7V6h4h4v4V17z",
  4191. back: "M20 11L7.83 11 11.425 7.405 10.01 5.991 5.416 10.586 5.414 10.584 4 11.998 4.002 12 4 12.002 5.414 13.416 5.416 13.414 10.01 18.009 11.425 16.595 7.83 13 20 13 20 13 20 11 20 11Z",
  4192. backgroundColor: "M9.91752,12.24082l7.74791-5.39017,1.17942,1.29591-6.094,7.20747L9.91752,12.24082M7.58741,12.652l4.53533,4.98327a.93412.93412,0,0,0,1.39531-.0909L20.96943,8.7314A.90827.90827,0,0,0,20.99075,7.533l-2.513-2.76116a.90827.90827,0,0,0-1.19509-.09132L7.809,11.27135A.93412.93412,0,0,0,7.58741,12.652ZM2.7939,18.52772,8.41126,19.5l1.47913-1.34617-3.02889-3.328Z",
  4193. blockquote: "M10.31788,5l.93817,1.3226A12.88271,12.88271,0,0,0,8.1653,9.40125a5.54242,5.54242,0,0,0-.998,3.07866v.33733q.36089-.04773.66067-.084a4.75723,4.75723,0,0,1,.56519-.03691,2.87044,2.87044,0,0,1,2.11693.8427,2.8416,2.8416,0,0,1,.8427,2.09274,3.37183,3.37183,0,0,1-.8898,2.453A3.143,3.143,0,0,1,8.10547,19,3.40532,3.40532,0,0,1,5.375,17.7245,4.91156,4.91156,0,0,1,4.30442,14.453,9.3672,9.3672,0,0,1,5.82051,9.32933,14.75716,14.75716,0,0,1,10.31788,5Zm8.39243,0,.9369,1.3226a12.88289,12.88289,0,0,0-3.09075,3.07865,5.54241,5.54241,0,0,0-.998,3.07866v.33733q.33606-.04773.63775-.084a4.91773,4.91773,0,0,1,.58938-.03691,2.8043,2.8043,0,0,1,2.1042.83,2.89952,2.89952,0,0,1,.80578,2.10547,3.42336,3.42336,0,0,1-.86561,2.453A3.06291,3.06291,0,0,1,16.49664,19,3.47924,3.47924,0,0,1,13.742,17.7245,4.846,4.846,0,0,1,12.64721,14.453,9.25867,9.25867,0,0,1,14.17476,9.3898,15.26076,15.26076,0,0,1,18.71031,5Z",
  4194. bold: "M15.25,11.8h0A3.68,3.68,0,0,0,17,9a3.93,3.93,0,0,0-3.86-4H6.65V19h7a3.74,3.74,0,0,0,3.7-3.78V15.1A3.64,3.64,0,0,0,15.25,11.8ZM8.65,7h4.2a2.09,2.09,0,0,1,2,1.3,2.09,2.09,0,0,1-1.37,2.61,2.23,2.23,0,0,1-.63.09H8.65Zm4.6,10H8.65V13h4.6a2.09,2.09,0,0,1,2,1.3,2.09,2.09,0,0,1-1.37,2.61A2.23,2.23,0,0,1,13.25,17Z",
  4195. cellBackground: "M16.6,12.4L7.6,3.5L6.2,4.9l2.4,2.4l-5.2,5.2c-0.6,0.6-0.6,1.5,0,2.1l5.5,5.5c0.3,0.3,0.7,0.4,1.1,0.4s0.8-0.1,1.1-0.4 l5.5-5.5C17.2,14,17.2,13,16.6,12.4z M5.2,13.5L10,8.7l4.8,4.8H5.2z M19,15c0,0-2,2.2-2,3.5c0,1.1,0.9,2,2,2s2-0.9,2-2 C21,17.2,19,15,19,15z",
  4196. cellBorderColor: "M22,22H2v2h20V22z",
  4197. cellOptions: "M20,5H4C2.9,5,2,5.9,2,7v10c0,1.1,0.9,2,2,2h16c1.1,0,2-0.9,2-2V7C22,5.9,21.1,5,20,5z M9.5,6.5h5V9h-5V6.5z M8,17.5H4 c-0.3,0-0.5-0.2-0.5-0.4c0,0,0,0,0,0V17v-2H8V17.5z M8,13.5H3.5v-3H8V13.5z M8,9H3.5V7c0-0.3,0.2-0.5,0.4-0.5c0,0,0,0,0,0H8V9z M14.5,17.5h-5V15h5V17.5z M20.5,17c0,0.3-0.2,0.5-0.4,0.5c0,0,0,0,0,0H16V15h4.5V17z M20.5,13.5H16v-3h4.5V13.5z M20.5,9H16V6.5h4 c0.3,0,0.5,0.2,0.5,0.4c0,0,0,0,0,0V9z",
  4198. cellStyle: "M20,19.9l0.9,3.6l-3.2-1.9l-3.3,1.9l0.8-3.6L12.3,17h3.8l1.7-3.5l1.4,3.5H23L20,19.9z M20,5H4C2.9,5,2,5.9,2,7v10 c0,1.1,0.9,2,2,2h7.5l-0.6-0.6L10,17.5H9.5V15h5.4l1.1-2.3v-2.2h4.5v3H20l0.6,1.5H22V7C22,5.9,21.1,5,20,5z M3.5,7 c0-0.3,0.2-0.5,0.4-0.5c0,0,0,0,0.1,0h4V9H3.5V7z M3.5,10.5H8v3H3.5V10.5z M4,17.5c-0.3,0-0.5-0.2-0.5-0.4c0,0,0,0,0-0.1v-2H8v2.5H4 z M14.5,9h-5V6.5h5V9z M20.5,9H16V6.5h4c0.3,0,0.5,0.2,0.5,0.4c0,0,0,0,0,0.1V9z",
  4199. clearFormatting: "M11.48,10.09l-1.2-1.21L8.8,7.41,6.43,5,5.37,6.1,8.25,9,4.66,19h2l1.43-4h5.14l1.43,4h2l-.89-2.51L18.27,19l1.07-1.06L14.59,13.2ZM8.8,13l.92-2.56L12.27,13Zm.56-7.15L9.66,5h2l1.75,4.9Z",
  4200. close: "M13.4,12l5.6,5.6L17.6,19L12,13.4L6.4,19L5,17.6l5.6-5.6L5,6.4L6.4,5l5.6,5.6L17.6,5L19,6.4L13.4,12z",
  4201. codeView: "M9.4,16.6,4.8,12,9.4,7.4,8,6,2,12l6,6Zm5.2,0L19.2,12,14.6,7.4,16,6l6,6-6,6Z",
  4202. cogs: "M18.877 12.907a6.459 6.459 0 0 0 0 -1.814l1.952 -1.526a0.468 0.468 0 0 0 0.111 -0.593l-1.851 -3.2a0.461 0.461 0 0 0 -0.407 -0.231 0.421 0.421 0 0 0 -0.157 0.028l-2.3 0.925a6.755 6.755 0 0 0 -1.563 -0.907l-0.352 -2.452a0.451 0.451 0 0 0 -0.453 -0.388h-3.7a0.451 0.451 0 0 0 -0.454 0.388L9.347 5.588A7.077 7.077 0 0 0 7.783 6.5l-2.3 -0.925a0.508 0.508 0 0 0 -0.166 -0.028 0.457 0.457 0 0 0 -0.4 0.231l-1.851 3.2a0.457 0.457 0 0 0 0.111 0.593l1.952 1.526A7.348 7.348 0 0 0 5.063 12a7.348 7.348 0 0 0 0.064 0.907L3.175 14.433a0.468 0.468 0 0 0 -0.111 0.593l1.851 3.2a0.461 0.461 0 0 0 0.407 0.231 0.421 0.421 0 0 0 0.157 -0.028l2.3 -0.925a6.74 6.74 0 0 0 1.564 0.907L9.7 20.864a0.451 0.451 0 0 0 0.454 0.388h3.7a0.451 0.451 0 0 0 0.453 -0.388l0.352 -2.452a7.093 7.093 0 0 0 1.563 -0.907l2.3 0.925a0.513 0.513 0 0 0 0.167 0.028 0.457 0.457 0 0 0 0.4 -0.231l1.851 -3.2a0.468 0.468 0 0 0 -0.111 -0.593Zm-0.09 2.029l-0.854 1.476 -2.117 -0.852 -0.673 0.508a5.426 5.426 0 0 1 -1.164 0.679l-0.795 0.323 -0.33 2.269h-1.7l-0.32 -2.269 -0.793 -0.322a5.3 5.3 0 0 1 -1.147 -0.662L8.2 15.56l-2.133 0.86 -0.854 -1.475 1.806 -1.411 -0.1 -0.847c-0.028 -0.292 -0.046 -0.5 -0.046 -0.687s0.018 -0.4 0.045 -0.672l0.106 -0.854L5.217 9.064l0.854 -1.475 2.117 0.851 0.673 -0.508a5.426 5.426 0 0 1 1.164 -0.679l0.8 -0.323 0.331 -2.269h1.7l0.321 2.269 0.792 0.322a5.3 5.3 0 0 1 1.148 0.661l0.684 0.526 2.133 -0.859 0.853 1.473 -1.8 1.421 0.1 0.847a5 5 0 0 1 0.046 0.679c0 0.193 -0.018 0.4 -0.045 0.672l-0.106 0.853ZM12 14.544A2.544 2.544 0 1 1 14.546 12 2.552 2.552 0 0 1 12 14.544Z",
  4203. columns: "M20,5H4C2.9,5,2,5.9,2,7v10c0,1.1,0.9,2,2,2h16c1.1,0,2-0.9,2-2V7C22,5.9,21.1,5,20,5z M8,17.5H4c-0.3,0-0.5-0.2-0.5-0.4 c0,0,0,0,0,0V17v-2H8V17.5z M8,13.5H3.5v-3H8V13.5z M8,9H3.5V7c0-0.3,0.2-0.5,0.4-0.5c0,0,0,0,0,0H8V9z M20.5,17 c0,0.3-0.2,0.5-0.4,0.5c0,0,0,0,0,0H16V15h4.5V17z M20.5,13.5H16v-3h4.5V13.5z M20.5,9H16V6.5h4c0.3,0,0.5,0.2,0.5,0.4c0,0,0,0,0,0 V9z",
  4204. editLink: "M17,11.2L12.8,7L5,14.8V19h4.2L17,11.2z M7,16.8v-1.5l5.6-5.6l1.4,1.5l-5.6,5.6H7z M13.5,6.3l0.7-0.7c0.8-0.8,2.1-0.8,2.8,0 c0,0,0,0,0,0L18.4,7c0.8,0.8,0.8,2,0,2.8l-0.7,0.7L13.5,6.3z",
  4205. exitFullscreen: "M5,16H8v3h2V14H5ZM8,8H5v2h5V5H8Zm6,11h2V16h3V14H14ZM16,8V5H14v5h5V8Z",
  4206. fontAwesome: "M18.99018,13.98212V7.52679c-.08038-1.21875-1.33929-.683-1.33929-.683-2.933,1.39282-4.36274.61938-5.85938.15625a6.23272,6.23272,0,0,0-2.79376-.20062l-.00946.004A1.98777,1.98777,0,0,0,7.62189,5.106a.984.984,0,0,0-.17517-.05432c-.02447-.0055-.04882-.01032-.0736-.0149A.9565.9565,0,0,0,7.1908,5H6.82539a.9565.9565,0,0,0-.18232.0368c-.02472.00458-.04907.0094-.07348.01484a.985.985,0,0,0-.17523.05438,1.98585,1.98585,0,0,0-.573,3.49585v9.394A1.004,1.004,0,0,0,6.82539,19H7.1908a1.00406,1.00406,0,0,0,1.00409-1.00409V15.52234c3.64221-1.09827,5.19709.64282,7.09888.57587a5.57291,5.57291,0,0,0,3.25446-1.05805A1.2458,1.2458,0,0,0,18.99018,13.98212Z",
  4207. fontFamily: "M16,19h2L13,5H11L6,19H8l1.43-4h5.14Zm-5.86-6L12,7.8,13.86,13Z",
  4208. fontSize: "M20.75,19h1.5l-3-10h-1.5l-3,10h1.5L17,16.5h3Zm-3.3-4,1.05-3.5L19.55,15Zm-5.7,4h2l-5-14h-2l-5,14h2l1.43-4h5.14ZM5.89,13,7.75,7.8,9.61,13Z",
  4209. fullscreen: "M7,14H5v5h5V17H7ZM5,10H7V7h3V5H5Zm12,7H14v2h5V14H17ZM14,5V7h3v3h2V5Z",
  4210. help: "M11,17h2v2h-2V17z M12,5C9.8,5,8,6.8,8,9h2c0-1.1,0.9-2,2-2s2,0.9,2,2c0,2-3,1.7-3,5v1h2v-1c0-2.2,3-2.5,3-5 C16,6.8,14.2,5,12,5z",
  4211. horizontalLine: "M5,12h14 M19,11H5v2h14V11z",
  4212. imageAltText: "M19,7h-6v12h-2V7H5V5h6h2h6V7z",
  4213. imageCaption: "M14.2,11l3.8,5H6l3-3.9l2.1,2.7L14,11H14.2z M8.5,11c0.8,0,1.5-0.7,1.5-1.5S9.3,8,8.5,8S7,8.7,7,9.5C7,10.3,7.7,11,8.5,11z M22,6v12c0,1.1-0.9,2-2,2H4c-1.1,0-2-0.9-2-2V6c0-1.1,0.9-2,2-2h16C21.1,4,22,4.9,22,6z M20,8.8V6H4v12h16V8.8z M22,22H2v2h20V22z",
  4214. imageClass: "M9.5,13.4l-2.9-2.9h3.8L12.2,7l1.4,3.5h3.8l-3,2.9l0.9,3.6L12,15.1L8.8,17L9.5,13.4z M22,6v12c0,1.1-0.9,2-2,2H4 c-1.1,0-2-0.9-2-2V6c0-1.1,0.9-2,2-2h16C21.1,4,22,4.9,22,6z M20,6H4v12h16V8.8V6z",
  4215. imageDisplay: "M3,5h18v2H3V5z M13,9h8v2h-8V9z M13,13h8v2h-8V13z M3,17h18v2H3V17z M3,9h8v6H3V9z",
  4216. imageManager: "M20,6h-7l-2-2H4C2.9,4,2,4.9,2,6v12c0,1.1,0.9,2,2,2h16c1.1,0,2-0.9,2-2V8C22,6.9,21.1,6,20,6z M20,18H4V6h6.2l2,2H20V18z M18,16l-3.8-5H14l-2.9,3.8L9,12.1L6,16H18z M10,9.5C10,8.7,9.3,8,8.5,8S7,8.7,7,9.5S7.7,11,8.5,11S10,10.3,10,9.5z",
  4217. imageSize: "M16.9,4c-0.3,0-0.5,0.2-0.8,0.3L3.3,13c-0.9,0.6-1.1,1.9-0.5,2.8l2.2,3.3c0.4,0.7,1.2,1,2,0.8c0.3,0,0.5-0.2,0.8-0.3 L20.7,11c0.9-0.6,1.1-1.9,0.5-2.8l-2.2-3.3C18.5,4.2,17.7,3.9,16.9,4L16.9,4z M16.9,9.9L18.1,9l-2-2.9L17,5.6c0.1,0,0.1-0.1,0.2-0.1 c0.2,0,0.4,0,0.5,0.2L19.9,9c0.2,0.2,0.1,0.5-0.1,0.7L7,18.4c-0.1,0-0.1,0.1-0.2,0.1c-0.2,0-0.4,0-0.5-0.2L4.1,15 c-0.2-0.2-0.1-0.5,0.1-0.7L5,13.7l2,2.9l1.2-0.8l-2-2.9L7.5,12l1.1,1.7l1.2-0.8l-1.1-1.7l1.2-0.8l2,2.9l1.2-0.8l-2-2.9l1.2-0.8 l1.1,1.7l1.2-0.8l-1.1-1.7L14.9,7L16.9,9.9z",
  4218. indent: "M3,9v6l3-3L3,9z M3,19h18v-2H3V19z M3,7h18V5H3V7z M9,11h12V9H9V11z M9,15h12v-2H9V15z",
  4219. inlineClass: "M9.9,13.313A1.2,1.2,0,0,1,9.968,13H6.277l1.86-5.2,1.841,5.148A1.291,1.291,0,0,1,11.212,12h.426l-2.5-7h-2l-5,14h2l1.43-4H9.9Zm2.651,6.727a2.884,2.884,0,0,1-.655-2.018v-2.71A1.309,1.309,0,0,1,13.208,14h3.113a3.039,3.039,0,0,1,2,1.092s1.728,1.818,2.964,2.928a1.383,1.383,0,0,1,.318,1.931,1.44,1.44,0,0,1-.19.215l-3.347,3.31a1.309,1.309,0,0,1-1.832.258h0a1.282,1.282,0,0,1-.258-.257l-1.71-1.728Zm2.48-3.96a.773.773,0,1,0,.008,0Z",
  4220. inlineStyle: "M11.88,15h.7l.7-1.7-3-8.3h-2l-5,14h2l1.4-4Zm-4.4-2,1.9-5.2,1.9,5.2ZM15.4,21.545l3.246,1.949-.909-3.637L20.72,17H16.954l-1.429-3.506L13.837,17H10.071l2.857,2.857-.779,3.637Z",
  4221. insertEmbed: "M20.73889,15.45929a3.4768,3.4768,0,0,0-5.45965-.28662L9.5661,12.50861a3.49811,3.49811,0,0,0-.00873-1.01331l5.72174-2.66809a3.55783,3.55783,0,1,0-.84527-1.81262L8.70966,9.6839a3.50851,3.50851,0,1,0,.0111,4.63727l5.7132,2.66412a3.49763,3.49763,0,1,0,6.30493-1.526ZM18.00745,5.01056A1.49993,1.49993,0,1,1,16.39551,6.3894,1.49994,1.49994,0,0,1,18.00745,5.01056ZM5.99237,13.49536a1.49989,1.49989,0,1,1,1.61194-1.37878A1.49982,1.49982,0,0,1,5.99237,13.49536Zm11.78211,5.494a1.49993,1.49993,0,1,1,1.61193-1.37885A1.49987,1.49987,0,0,1,17.77448,18.98932Z",
  4222. insertFile: "M7,3C5.9,3,5,3.9,5,5v14c0,1.1,0.9,2,2,2h10c1.1,0,2-0.9,2-2V7.6L14.4,3H7z M17,19H7V5h6v4h4V19z",
  4223. insertImage: "M14.2,11l3.8,5H6l3-3.9l2.1,2.7L14,11H14.2z M8.5,11c0.8,0,1.5-0.7,1.5-1.5S9.3,8,8.5,8S7,8.7,7,9.5C7,10.3,7.7,11,8.5,11z M22,6v12c0,1.1-0.9,2-2,2H4c-1.1,0-2-0.9-2-2V6c0-1.1,0.9-2,2-2h16C21.1,4,22,4.9,22,6z M20,8.8V6H4v12h16V8.8z",
  4224. insertLink: "M11,17H7A5,5,0,0,1,7,7h4V9H7a3,3,0,0,0,0,6h4ZM17,7H13V9h4a3,3,0,0,1,0,6H13v2h4A5,5,0,0,0,17,7Zm-1,4H8v2h8Z",
  4225. insertMore: "M16.5,13h-6v6h-2V13h-6V11h6V5h2v6h6Zm5,4.5A1.5,1.5,0,1,1,20,16,1.5,1.5,0,0,1,21.5,17.5Zm0-4A1.5,1.5,0,1,1,20,12,1.5,1.5,0,0,1,21.5,13.5Zm0-4A1.5,1.5,0,1,1,20,8,1.5,1.5,0,0,1,21.5,9.5Z",
  4226. insertTable: "M20,5H4C2.9,5,2,5.9,2,7v2v1.5v3V15v2c0,1.1,0.9,2,2,2h16c1.1,0,2-0.9,2-2v-2v-1.5v-3V9V7C22,5.9,21.1,5,20,5z M9.5,13.5v-3 h5v3H9.5z M14.5,15v2.5h-5V15H14.5z M9.5,9V6.5h5V9H9.5z M3.5,7c0-0.3,0.2-0.5,0.5-0.5h4V9H3.5V7z M3.5,10.5H8v3H3.5V10.5z M3.5,17 v-2H8v2.5H4C3.7,17.5,3.5,17.3,3.5,17z M20.5,17c0,0.3-0.2,0.5-0.5,0.5h-4V15h4.5V17z M20.5,13.5H16v-3h4.5V13.5z M16,9V6.5h4 c0.3,0,0.5,0.2,0.5,0.5v2H16z",
  4227. insertVideo: "M15,8v8H5V8H15m2,2.5V7a1,1,0,0,0-1-1H4A1,1,0,0,0,3,7V17a1,1,0,0,0,1,1H16a1,1,0,0,0,1-1V13.5l2.29,2.29A1,1,0,0,0,21,15.08V8.91a1,1,0,0,0-1.71-.71Z",
  4228. upload: "M12 6.66667a4.87654 4.87654 0 0 1 4.77525 3.92342l0.29618 1.50268 1.52794 0.10578a2.57021 2.57021 0 0 1 -0.1827 5.13478H6.5a3.49774 3.49774 0 0 1 -0.3844 -6.97454l1.06682 -0.11341L7.678 9.29387A4.86024 4.86024 0 0 1 12 6.66667m0 -2A6.871 6.871 0 0 0 5.90417 8.37 5.49773 5.49773 0 0 0 6.5 19.33333H18.41667a4.57019 4.57019 0 0 0 0.32083 -9.13A6.86567 6.86567 0 0 0 12 4.66667Zm0.99976 7.2469h1.91406L11.99976 9 9.08618 11.91357h1.91358v3H11V16h2V14h-0.00024Z",
  4229. italic: "M11.76,9h2l-2.2,10h-2Zm1.68-4a1,1,0,1,0,1,1,1,1,0,0,0-1-1Z",
  4230. search: "M15.5 14h-0.79l-0.28 -0.27C15.41 12.59 16 11.11 16 9.5 16 5.91 13.09 3 9.5 3S3 5.91 3 9.5 5.91 16 9.5 16c1.61 0 3.09 -0.59 4.23 -1.57l0.27 0.28v0.79l5 4.99L20.49 19l-4.99 -5zm-6 0C7.01 14 5 11.99 5 9.5S7.01 5 9.5 5 14 7.01 14 9.5 11.99 14 9.5 14z",
  4231. lineHeight: "M6.25,7h2.5L5.25,3.5,1.75,7h2.5V17H1.75l3.5,3.5L8.75,17H6.25Zm4-2V7h12V5Zm0,14h12V17h-12Zm0-6h12V11h-12Z",
  4232. linkStyles: "M19,17.9l0.9,3.6l-3.2-1.9l-3.3,1.9l0.8-3.6L11.3,15h3.8l1.7-3.5l1.4,3.5H22L19,17.9z M20,12c0,0.3-0.1,0.7-0.2,1h2.1 c0.1-0.3,0.1-0.6,0.1-1c0-2.8-2.2-5-5-5h-4v2h4C18.7,9,20,10.3,20,12z M14.8,11H8v2h3.3h2.5L14.8,11z M9.9,16.4L8.5,15H7 c-1.7,0-3-1.3-3-3s1.3-3,3-3h4V7H7c-2.8,0-5,2.2-5,5s2.2,5,5,5h3.5L9.9,16.4z",
  4233. mention: "M12.4,5c-4.1,0-7.5,3.4-7.5,7.5S8.3,20,12.4,20h3.8v-1.5h-3.8c-3.3,0-6-2.7-6-6s2.7-6,6-6s6,2.7,6,6v1.1 c0,0.6-0.5,1.2-1.1,1.2s-1.1-0.6-1.1-1.2v-1.1c0-2.1-1.7-3.8-3.8-3.8s-3.7,1.7-3.7,3.8s1.7,3.8,3.8,3.8c1,0,2-0.4,2.7-1.1 c0.5,0.7,1.3,1.1,2.2,1.1c1.5,0,2.6-1.2,2.6-2.7v-1.1C19.9,8.4,16.6,5,12.4,5z M12.4,14.7c-1.2,0-2.3-1-2.3-2.2s1-2.3,2.3-2.3 s2.3,1,2.3,2.3S13.6,14.7,12.4,14.7z",
  4234. more: "M13.5,17c0,0.8-0.7,1.5-1.5,1.5s-1.5-0.7-1.5-1.5s0.7-1.5,1.5-1.5S13.5,16.2,13.5,17z M13.5,12c0,0.8-0.7,1.5-1.5,1.5 s-1.5-0.7-1.5-1.5s0.7-1.5,1.5-1.5S13.5,11.2,13.5,12z M13.5,7c0,0.8-0.7,1.5-1.5,1.5S10.5,7.8,10.5,7s0.7-1.5,1.5-1.5 S13.5,6.2,13.5,7z",
  4235. openLink: "M17,17H7V7h3V5H7C6,5,5,6,5,7v10c0,1,1,2,2,2h10c1,0,2-1,2-2v-3h-2V17z M14,5v2h1.6l-5.8,5.8l1.4,1.4L17,8.4V10h2V5H14z",
  4236. orderedList: "M2.5,16h2v.5h-1v1h1V18h-2v1h3V15h-3Zm1-7h1V5h-2V6h1Zm-1,2H4.3L2.5,13.1V14h3V13H3.7l1.8-2.1V10h-3Zm5-5V8h14V6Zm0,12h14V16H7.5Zm0-5h14V11H7.5Z",
  4237. outdent: "M3,12l3,3V9L3,12z M3,19h18v-2H3V19z M3,7h18V5H3V7z M9,11h12V9H9V11z M9,15h12v-2H9V15z",
  4238. pageBreaker: "M3,9v6l3-3L3,9z M21,9H8V4h2v3h9V4h2V9z M21,20h-2v-3h-9v3H8v-5h13V20z M11,13H8v-2h3V13z M16,13h-3v-2h3V13z M21,13h-3v-2 h3V13z",
  4239. paragraphFormat: "M10.15,5A4.11,4.11,0,0,0,6.08,8.18,4,4,0,0,0,10,13v6h2V7h2V19h2V7h2V5ZM8,9a2,2,0,0,1,2-2v4A2,2,0,0,1,8,9Z",
  4240. paragraphMore: "M7.682,5a4.11,4.11,0,0,0-4.07,3.18,4,4,0,0,0,3.11,4.725h0l.027.005a3.766,3.766,0,0,0,.82.09v6h2V7h2V19h2V7h2V5ZM5.532,9a2,2,0,0,1,2-2v4A2,2,0,0,1,5.532,9Zm14.94,8.491a1.5,1.5,0,1,1-1.5-1.5A1.5,1.5,0,0,1,20.472,17.491Zm0-4a1.5,1.5,0,1,1-1.5-1.5A1.5,1.5,0,0,1,20.472,13.491Zm0-4a1.5,1.5,0,1,1-1.5-1.5A1.5,1.5,0,0,1,20.472,9.491Z",
  4241. paragraphStyle: "M4,9c0-1.1,0.9-2,2-2v4C4.9,11,4,10.1,4,9z M16.7,20.5l3.2,1.9L19,18.8l3-2.9h-3.7l-1.4-3.5L15.3,16h-3.8l2.9,2.9l-0.9,3.6 L16.7,20.5z M10,17.4V19h1.6L10,17.4z M6.1,5c-1.9,0-3.6,1.3-4,3.2c-0.5,2.1,0.8,4.2,2.9,4.7c0,0,0,0,0,0h0.2C5.5,13,5.8,13,6,13v6 h2V7h2v7h2V7h2V5H6.1z",
  4242. pdfExport: "M7,3C5.9,3,5,3.9,5,5v14c0,1.1,0.9,2,2,2h10c1.1,0,2-0.9,2-2V7.6L14.4,3H7z M17,19H7V5h6v4h4V19z M16.3,13.5 c-0.2-0.6-1.1-0.8-2.6-0.8c-0.1,0-0.1,0-0.2,0c-0.3-0.3-0.8-0.9-1-1.2c-0.2-0.2-0.3-0.3-0.4-0.6c0.2-0.7,0.2-1,0.3-1.5 c0.1-0.9,0-1.6-0.2-1.8c-0.4-0.2-0.7-0.2-0.9-0.2c-0.1,0-0.3,0.2-0.7,0.7c-0.2,0.7-0.1,1.8,0.6,2.8c-0.2,0.8-0.7,1.6-1,2.4 c-0.8,0.2-1.5,0.7-1.9,1.1c-0.7,0.7-0.9,1.1-0.7,1.6c0,0.3,0.2,0.6,0.7,0.6c0.3-0.1,0.3-0.2,0.7-0.3c0.6-0.3,1.2-1.7,1.7-2.4 c0.8-0.2,1.7-0.3,2-0.3c0.1,0,0.3,0,0.6,0c0.8,0.8,1.2,1.1,1.8,1.2c0.1,0,0.2,0,0.3,0c0.3,0,0.8-0.1,1-0.6 C16.4,14.1,16.4,13.9,16.3,13.5z M8.3,15.7c-0.1,0.1-0.2,0.1-0.2,0.1c0-0.1,0-0.3,0.6-0.8c0.2-0.2,0.6-0.3,0.9-0.7 C9,15,8.6,15.5,8.3,15.7z M11.3,9c0-0.1,0.1-0.2,0.1-0.2S11.6,9,11.5,10c0,0.1,0,0.3-0.1,0.7C11.3,10.1,11,9.5,11.3,9z M10.9,13.1 c0.2-0.6,0.6-1,0.7-1.5c0.1,0.1,0.1,0.1,0.2,0.2c0.1,0.2,0.3,0.7,0.7,0.9C12.2,12.8,11.6,13,10.9,13.1z M15.2,14.1 c-0.1,0-0.1,0-0.2,0c-0.2,0-0.7-0.2-1-0.7c1.1,0,1.6,0.2,1.6,0.6C15.5,14.1,15.4,14.1,15.2,14.1z",
  4243. print: "M16.1,17c0-0.6,0.4-1,1-1c0.6,0,1,0.4,1,1s-0.4,1-1,1C16.5,18,16.1,17.6,16.1,17z M22,15v4c0,1.1-0.9,2-2,2H4 c-1.1,0-2-0.9-2-2v-4c0-1.1,0.9-2,2-2h1V5c0-1.1,0.9-2,2-2h7.4L19,7.6V13h1C21.1,13,22,13.9,22,15z M7,13h10V9h-4V5H7V13z M20,15H4 v4h16V15z",
  4244. redo: "M13.6,9.4c1.7,0.3,3.2,0.9,4.6,2L21,8.5v7h-7l2.7-2.7C13,10.1,7.9,11,5.3,14.7c-0.2,0.3-0.4,0.5-0.5,0.8L3,14.6 C5.1,10.8,9.3,8.7,13.6,9.4z",
  4245. removeTable: "M15,10v8H9v-8H15 M14,4H9.9l-1,1H6v2h12V5h-3L14,4z M17,8H7v10c0,1.1,0.9,2,2,2h6c1.1,0,2-0.9,2-2V8z",
  4246. remove: "M15,10v8H9v-8H15 M14,4H9.9l-1,1H6v2h12V5h-3L14,4z M17,8H7v10c0,1.1,0.9,2,2,2h6c1.1,0,2-0.9,2-2V8z",
  4247. replaceImage: "M16,5v3H4v2h12v3l4-4L16,5z M8,19v-3h12v-2H8v-3l-4,4L8,19z",
  4248. row: "M20,5H4C2.9,5,2,5.9,2,7v2v1.5v3V15v2c0,1.1,0.9,2,2,2h16c1.1,0,2-0.9,2-2v-2v-1.5v-3V9V7C22,5.9,21.1,5,20,5z M16,6.5h4 c0.3,0,0.5,0.2,0.5,0.5v2H16V6.5z M9.5,6.5h5V9h-5V6.5z M3.5,7c0-0.3,0.2-0.5,0.5-0.5h4V9H3.5V7z M8,17.5H4c-0.3,0-0.5-0.2-0.5-0.5 v-2H8V17.5z M14.5,17.5h-5V15h5V17.5z M20.5,17c0,0.3-0.2,0.5-0.5,0.5h-4V15h4.5V17z",
  4249. selectAll: "M5,7h2V5C5.9,5,5,5.9,5,7z M5,11h2V9H5V11z M9,19h2v-2H9V19z M5,11h2V9H5V11z M15,5h-2v2h2V5z M17,5v2h2C19,5.9,18.1,5,17,5 z M7,19v-2H5C5,18.1,5.9,19,7,19z M5,15h2v-2H5V15z M11,5H9v2h2V5z M13,19h2v-2h-2V19z M17,11h2V9h-2V11z M17,19c1.1,0,2-0.9,2-2h-2 V19z M17,11h2V9h-2V11z M17,15h2v-2h-2V15z M13,19h2v-2h-2V19z M13,7h2V5h-2V7z M9,15h6V9H9V15z M11,11h2v2h-2V11z",
  4250. smile: "M11.991,3A9,9,0,1,0,21,12,8.99557,8.99557,0,0,0,11.991,3ZM12,19a7,7,0,1,1,7-7A6.99808,6.99808,0,0,1,12,19Zm3.105-5.2h1.503a4.94542,4.94542,0,0,1-9.216,0H8.895a3.57808,3.57808,0,0,0,6.21,0ZM7.5,9.75A1.35,1.35,0,1,1,8.85,11.1,1.35,1.35,0,0,1,7.5,9.75Zm6.3,0a1.35,1.35,0,1,1,1.35,1.35A1.35,1.35,0,0,1,13.8,9.75Z",
  4251. spellcheck: "M19.1,13.6l-5.6,5.6l-2.7-2.7l-1.4,1.4l4.1,4.1l7-7L19.1,13.6z M10.8,13.7l2.7,2.7l0.8-0.8L10.5,5h-2l-5,14h2l1.4-4h2.6 L10.8,13.7z M9.5,7.8l1.9,5.2H7.6L9.5,7.8z",
  4252. star: "M12.1,7.7l1,2.5l0.4,0.9h1h2.4l-2.1,2l-0.6,0.6l0.2,0.9l0.6,2.3l-2.2-1.3L12,15.2l-0.8,0.5L9,17l0.5-2.5l0.1-0.8L9,13.1 l-2-2h2.5h0.9l0.4-0.8L12.1,7.7 M12.2,4L9.5,9.6H3.4L8,14.2L6.9,20l5.1-3.1l5.3,3.1l-1.5-5.8l4.8-4.6h-6.1L12.2,4L12.2,4z",
  4253. strikeThrough: "M3,12.20294H21v1.5H16.63422a3.59782,3.59782,0,0,1,.34942,1.5929,3.252,3.252,0,0,1-1.31427,2.6997A5.55082,5.55082,0,0,1,12.20251,19a6.4421,6.4421,0,0,1-2.62335-.539,4.46335,4.46335,0,0,1-1.89264-1.48816,3.668,3.668,0,0,1-.67016-2.15546V14.704h.28723v-.0011h.34149v.0011H9.02v.11334a2.18275,2.18275,0,0,0,.85413,1.83069,3.69,3.69,0,0,0,2.32836.67926,3.38778,3.38778,0,0,0,2.07666-.5462,1.73346,1.73346,0,0,0,.7013-1.46655,1.69749,1.69749,0,0,0-.647-1.43439,3.00525,3.00525,0,0,0-.27491-.17725H3ZM16.34473,7.05981A4.18163,4.18163,0,0,0,14.6236,5.5462,5.627,5.627,0,0,0,12.11072,5,5.16083,5.16083,0,0,0,8.74719,6.06213,3.36315,3.36315,0,0,0,7.44006,8.76855a3.22923,3.22923,0,0,0,.3216,1.42786h2.59668c-.08338-.05365-.18537-.10577-.25269-.16064a1.60652,1.60652,0,0,1-.65283-1.30036,1.79843,1.79843,0,0,1,.68842-1.5108,3.12971,3.12971,0,0,1,1.96948-.55243,3.04779,3.04779,0,0,1,2.106.6687,2.35066,2.35066,0,0,1,.736,1.83258v.11341h2.00317V9.17346A3.90013,3.90013,0,0,0,16.34473,7.05981Z",
  4254. subscript: "M10.4,12l3.6,3.6L12.6,17L9,13.4L5.4,17L4,15.6L7.6,12L4,8.4L5.4,7L9,10.6L12.6,7L14,8.4L10.4,12z M18.31234,19.674 l1.06812-1.1465c0.196-0.20141,0.37093-0.40739,0.5368-0.6088c0.15975-0.19418,0.30419-0.40046,0.432-0.617 c0.11969-0.20017,0.21776-0.41249,0.29255-0.6334c0.07103-0.21492,0.10703-0.43986,0.10662-0.66621 c0.00297-0.28137-0.04904-0.56062-0.1531-0.82206c-0.09855-0.24575-0.25264-0.46534-0.45022-0.6416 c-0.20984-0.18355-0.45523-0.32191-0.72089-0.40646c-0.63808-0.19005-1.3198-0.17443-1.94851,0.04465 c-0.28703,0.10845-0.54746,0.2772-0.76372,0.49487c-0.20881,0.20858-0.37069,0.45932-0.47483,0.73548 c-0.10002,0.26648-0.15276,0.54838-0.15585,0.833l-0.00364,0.237H17.617l0.00638-0.22692 c0.00158-0.12667,0.01966-0.25258,0.05377-0.37458c0.03337-0.10708,0.08655-0.20693,0.15679-0.29437 c0.07105-0.08037,0.15959-0.14335,0.25882-0.1841c0.22459-0.08899,0.47371-0.09417,0.7018-0.01458 c0.0822,0.03608,0.15559,0.08957,0.21509,0.15679c0.06076,0.07174,0.10745,0.15429,0.13761,0.24333 c0.03567,0.10824,0.05412,0.22141,0.05469,0.33538c-0.00111,0.08959-0.0118,0.17881-0.0319,0.26612 c-0.02913,0.10428-0.07076,0.20465-0.124,0.29893c-0.07733,0.13621-0.1654,0.26603-0.26338,0.38823 c-0.13438,0.17465-0.27767,0.34226-0.42929,0.50217l-2.15634,2.35315V21H21v-1.326H18.31234z",
  4255. superscript: "M10.4,12,14,15.6,12.6,17,9,13.4,5.4,17,4,15.6,7.6,12,4,8.4,5.4,7,9,10.6,12.6,7,14,8.4Zm8.91234-3.326,1.06812-1.1465c.196-.20141.37093-.40739.5368-.6088a4.85745,4.85745,0,0,0,.432-.617,3.29,3.29,0,0,0,.29255-.6334,2.11079,2.11079,0,0,0,.10662-.66621,2.16127,2.16127,0,0,0-.1531-.82206,1.7154,1.7154,0,0,0-.45022-.6416,2.03,2.03,0,0,0-.72089-.40646,3.17085,3.17085,0,0,0-1.94851.04465,2.14555,2.14555,0,0,0-.76372.49487,2.07379,2.07379,0,0,0-.47483.73548,2.446,2.446,0,0,0-.15585.833l-.00364.237H18.617L18.62338,5.25a1.45865,1.45865,0,0,1,.05377-.37458.89552.89552,0,0,1,.15679-.29437.70083.70083,0,0,1,.25882-.1841,1.00569,1.00569,0,0,1,.7018-.01458.62014.62014,0,0,1,.21509.15679.74752.74752,0,0,1,.13761.24333,1.08893,1.08893,0,0,1,.05469.33538,1.25556,1.25556,0,0,1-.0319.26612,1.34227,1.34227,0,0,1-.124.29893,2.94367,2.94367,0,0,1-.26338.38823,6.41629,6.41629,0,0,1-.42929.50217L17.19709,8.92642V10H22V8.674Z",
  4256. symbols: "M15.77493,16.98885a8.21343,8.21343,0,0,0,1.96753-2.57651,7.34824,7.34824,0,0,0,.6034-3.07618A6.09092,6.09092,0,0,0,11.99515,5a6.13347,6.13347,0,0,0-4.585,1.79187,6.417,6.417,0,0,0-1.756,4.69207,6.93955,6.93955,0,0,0,.622,2.97415,8.06587,8.06587,0,0,0,1.949,2.53076H5.41452V19h5.54114v-.04331h-.00147V16.84107a5.82825,5.82825,0,0,1-2.2052-2.2352A6.40513,6.40513,0,0,1,7.97672,11.447,4.68548,4.68548,0,0,1,9.07785,8.19191a3.73232,3.73232,0,0,1,2.9173-1.22462,3.76839,3.76839,0,0,1,2.91241,1.21489,4.482,4.482,0,0,1,1.11572,3.154,6.71141,6.71141,0,0,1-.75384,3.24732,5.83562,5.83562,0,0,1-2.22357,2.25759v2.11562H13.0444V19h5.54108V16.98885Z",
  4257. tags: "M8.9749 7.47489a1.5 1.5 0 1 1 -1.5 1.5A1.5 1.5 0 0 1 8.9749 7.47489Zm3.78866 -3.12713L16.5362 8.12041l0.33565 0.33564 2.77038 2.77038a2.01988 2.01988 0 0 1 0.59 1.42 1.95518 1.95518 0 0 1 -0.5854 1.40455l0.00044 0.00043 -5.59583 5.59583 -0.00043 -0.00044a1.95518 1.95518 0 0 1 -1.40455 0.5854 1.98762 1.98762 0 0 1 -1.41 -0.58L8.45605 16.87185l-0.33564 -0.33565L4.35777 12.77357a1.99576 1.99576 0 0 1 -0.59 -1.42V9.36358l0 -3.59582a2.00579 2.00579 0 0 1 2 -2l3.59582 0h1.98995A1.98762 1.98762 0 0 1 12.76356 4.34776ZM15.46186 9.866l-0.33564 -0.33564L11.36359 5.76776H5.76776v5.59583L9.866 15.46186l2.7794 2.7794 5.5878 -5.60385 -0.001 -0.001Z",
  4258. tableHeader: "M20,5H4C2.9,5,2,5.9,2,7v10c0,1.1,0.9,2,2,2h16c1.1,0,2-0.9,2-2V7C22,5.9,21.1,5,20,5z M8,17.5H4c-0.3,0-0.5-0.2-0.5-0.4 l0,0V17v-2H8V17.5z M8,13.5H3.5v-3H8V13.5z M14.5,17.5h-5V15h5V17.5z M14.5,13.5h-5v-3h5V13.5z M20.5,17c0,0.3-0.2,0.5-0.4,0.5l0,0 H16V15h4.5V17z M20.5,13.5H16v-3h4.5V13.5z M20.5,9h-4.4H16h-1.5h-5H8H7.9H3.5V7c0-0.3,0.2-0.5,0.4-0.5l0,0h4l0,0h8.2l0,0H20 c0.3,0,0.5,0.2,0.5,0.4l0,0V9z",
  4259. tableStyle: "M20.0171,19.89752l.9,3.6-3.2-1.9-3.3,1.9.8-3.6-2.9-2.9h3.8l1.7-3.5,1.4,3.5h3.8ZM20,5H4A2.00591,2.00591,0,0,0,2,7V17a2.00591,2.00591,0,0,0,2,2h7.49115l-.58826-.58826L9.99115,17.5H9.5V14.9975h5.36511L16,12.66089V10.5h4.5v3h-.52783l.599,1.4975H22V7A2.00591,2.00591,0,0,0,20,5ZM3.5,7A.4724.4724,0,0,1,4,6.5H8V9H3.5Zm0,3.5H8v3H3.5Zm.5,7a.4724.4724,0,0,1-.5-.5V15H8v2.5Zm10.5-4h-5v-3h5Zm0-4.5h-5V6.5h5Zm6,0H16V6.5h4a.4724.4724,0,0,1,.5.5Z",
  4260. textColor: "M15.2,13.494s-3.6,3.9-3.6,6.3a3.65,3.65,0,0,0,7.3.1v-.1C18.9,17.394,15.2,13.494,15.2,13.494Zm-1.47-1.357.669-.724L12.1,5h-2l-5,14h2l1.43-4h2.943A24.426,24.426,0,0,1,13.726,12.137ZM11.1,7.8l1.86,5.2H9.244Z",
  4261. textMore: "M13.55,19h2l-5-14h-2l-5,14h2l1.4-4h5.1Zm-5.9-6,1.9-5.2,1.9,5.2Zm12.8,4.5a1.5,1.5,0,1,1-1.5-1.5A1.5,1.5,0,0,1,20.45,17.5Zm0-4a1.5,1.5,0,1,1-1.5-1.5A1.5,1.5,0,0,1,20.45,13.5Zm0-4A1.5,1.5,0,1,1,18.95,8,1.5,1.5,0,0,1,20.45,9.5Z",
  4262. underline: "M19,20v2H5V20Zm-3-6.785a4,4,0,0,1-5.74,3.4A3.75,3.75,0,0,1,8,13.085V5.005H6v8.21a6,6,0,0,0,8,5.44,5.851,5.851,0,0,0,4-5.65v-8H16ZM16,5v0h2V5ZM8,5H6v0H8Z",
  4263. undo: "M10.4,9.4c-1.7,0.3-3.2,0.9-4.6,2L3,8.5v7h7l-2.7-2.7c3.7-2.6,8.8-1.8,11.5,1.9c0.2,0.3,0.4,0.5,0.5,0.8l1.8-0.9 C18.9,10.8,14.7,8.7,10.4,9.4z",
  4264. unlink: "M14.4,11l1.6,1.6V11H14.4z M17,7h-4v1.9h4c1.7,0,3.1,1.4,3.1,3.1c0,1.3-0.8,2.4-1.9,2.8l1.4,1.4C21,15.4,22,13.8,22,12 C22,9.2,19.8,7,17,7z M2,4.3l3.1,3.1C3.3,8.1,2,9.9,2,12c0,2.8,2.2,5,5,5h4v-1.9H7c-1.7,0-3.1-1.4-3.1-3.1c0-1.6,1.2-2.9,2.8-3.1 L8.7,11H8v2h2.7l2.3,2.3V17h1.7l4,4l1.4-1.4L3.4,2.9L2,4.3z",
  4265. unorderedList: "M4,10.5c-0.8,0-1.5,0.7-1.5,1.5s0.7,1.5,1.5,1.5s1.5-0.7,1.5-1.5S4.8,10.5,4,10.5z M4,5.5C3.2,5.5,2.5,6.2,2.5,7 S3.2,8.5,4,8.5S5.5,7.8,5.5,7S4.8,5.5,4,5.5z M4,15.5c-0.8,0-1.5,0.7-1.5,1.5s0.7,1.5,1.5,1.5s1.5-0.7,1.5-1.5S4.8,15.5,4,15.5z M7.5,6v2h14V6H7.5z M7.5,18h14v-2h-14V18z M7.5,13h14v-2h-14V13z",
  4266. verticalAlignBottom: "M16,13h-3V3h-2v10H8l4,4L16,13z M3,19v2h18v-2H3z",
  4267. verticalAlignMiddle: "M3,11v2h18v-2H3z M8,18h3v3h2v-3h3l-4-4L8,18z M16,6h-3V3h-2v3H8l4,4L16,6z",
  4268. verticalAlignTop: "M8,11h3v10h2V11h3l-4-4L8,11z M21,5V3H3v2H21z"
  4269. }, $e.MODULES.modals = function(l) {
  4270. var i = l.$;
  4271. l.shared.modals || (l.shared.modals = {});
  4272. var a, c = l.shared.modals;
  4273. function e() {
  4274. for (var e in c)
  4275. if (Object.prototype.hasOwnProperty.call(c, e)) {
  4276. var t = c[e];
  4277. t && t.$modal && t.$modal.removeData().remove()
  4278. }
  4279. a && a.removeData().remove(), c = {}
  4280. }
  4281. function s(e, t) {
  4282. if (c[e]) {
  4283. var n = c[e].$modal,
  4284. r = n.data("instance") || l;
  4285. r.events.enableBlur(), n.hide(), a.hide(), i(r.o_doc).find("body").first().removeClass("prevent-scroll fr-mobile"), n.removeClass("fr-active"), t || (r.accessibility.restoreSelection(), r.events.trigger("modals.hide"))
  4286. }
  4287. }
  4288. function n(e) {
  4289. var t;
  4290. if ("string" == typeof e) {
  4291. if (!c[e]) return;
  4292. t = c[e].$modal
  4293. } else t = e;
  4294. return t && l.node.hasClass(t, "fr-active") && l.core.sameInstance(t) || !1
  4295. }
  4296. return {
  4297. _init: function t() {
  4298. l.events.on("shared.destroy", e, !0)
  4299. },
  4300. get: function r(e) {
  4301. return c[e]
  4302. },
  4303. create: function d(n, e, t) {
  4304. if (e = '<div class="fr-modal-head-line">'.concat(e, "</div>"), l.shared.$overlay || (l.shared.$overlay = i(l.doc.createElement("DIV")).addClass("fr-overlay"), i("body").first().append(l.shared.$overlay)), a = l.shared.$overlay, l.opts.theme && a.addClass("".concat(l.opts.theme, "-theme")), !c[n]) {
  4305. var r = function o(e, t) {
  4306. var n = '<div tabIndex="-1" class="fr-modal'.concat(l.opts.theme ? " ".concat(l.opts.theme, "-theme") : "", '"><div class="fr-modal-wrapper">'),
  4307. r = '<button title="'.concat(l.language.translate("Cancel"), '" class="fr-command fr-btn fr-modal-close"><svg xmlns="http://www.w3.org/2000/svg" x="0px" y="0px" viewBox="0 0 24 24"><path d="').concat($e.SVG.close, '"/></svg></button>');
  4308. n += '<div class="fr-modal-head">'.concat(e).concat(r, "</div>"), n += '<div tabIndex="-1" class="fr-modal-body">'.concat(t, "</div>"), n += "</div></div>";
  4309. var a = i(l.doc.createElement("DIV"));
  4310. return a.html(n), a.find("> .fr-modal")
  4311. }(e, t);
  4312. c[n] = {
  4313. $modal: r,
  4314. $head: r.find(".fr-modal-head"),
  4315. $body: r.find(".fr-modal-body")
  4316. }, l.helpers.isMobile() || r.addClass("fr-desktop"), i("body").first().append(r), l.events.$on(r, "click", ".fr-modal-close", function() {
  4317. s(n)
  4318. }, !0), c[n].$body.css("margin-top", c[n].$head.outerHeight()), l.events.$on(r, "keydown", function(e) {
  4319. var t = e.which;
  4320. return t === $e.KEYCODE.ESC ? (s(n), l.accessibility.focusModalButton(r), !1) : !(!i(e.currentTarget).is("input[type=text], textarea") && t !== $e.KEYCODE.ARROW_UP && t !== $e.KEYCODE.ARROW_DOWN && !l.keys.isBrowserAction(e) && (e.preventDefault(), e.stopPropagation(), 1))
  4321. }, !0), s(n, !0)
  4322. }
  4323. return c[n]
  4324. },
  4325. show: function o(e) {
  4326. if (c[e]) {
  4327. var t = c[e].$modal;
  4328. t.data("instance", l), t.show(), a.show(), i(l.o_doc).find("body").first().addClass("prevent-scroll"), l.helpers.isMobile() && i(l.o_doc).find("body").first().addClass("fr-mobile"), t.addClass("fr-active"), l.accessibility.focusModal(t)
  4329. }
  4330. },
  4331. hide: s,
  4332. resize: function f(e) {
  4333. if (c[e]) {
  4334. var t = c[e],
  4335. n = t.$modal,
  4336. r = t.$body,
  4337. a = l.o_win.innerHeight,
  4338. o = n.find(".fr-modal-wrapper"),
  4339. i = a - o.outerHeight(!0) + (o.height() - (r.outerHeight(!0) - r.height())),
  4340. s = "auto";
  4341. i < r.get(0).scrollHeight && (s = i), r.height(s)
  4342. }
  4343. },
  4344. isVisible: n,
  4345. areVisible: function p(e) {
  4346. for (var t in c)
  4347. if (Object.prototype.hasOwnProperty.call(c, t) && n(t) && (void 0 === e || c[t].$modal.data("instance") === e)) return c[t].$modal;
  4348. return !1
  4349. }
  4350. }
  4351. }, $e.MODULES.position = function(T) {
  4352. var A = T.$;
  4353. function a() {
  4354. var e = T.selection.ranges(0).getBoundingClientRect();
  4355. if (0 === e.top && 0 === e.left && 0 === e.width || 0 === e.height) {
  4356. var t = !1;
  4357. 0 === T.$el.find(".fr-marker").length && (T.selection.save(), t = !0);
  4358. var n = T.$el.find(".fr-marker").first();
  4359. n.css("display", "inline"), n.css("line-height", "");
  4360. var r = n.offset(),
  4361. a = n.outerHeight();
  4362. n.css("display", "none"), n.css("line-height", 0), (e = {}).left = r && r.left, e.width = 0, e.height = a, e.top = r && r.top - (T.helpers.isMobile() && !T.helpers.isIOS() || T.opts.iframe ? 0 : T.helpers.scrollTop()), e.right = 1, e.bottom = 1, e.ok = !0, t && T.selection.restore()
  4363. }
  4364. return e
  4365. }
  4366. function o(e, t, n, r) {
  4367. var a = n.data("container");
  4368. if (!a || "BODY" === a.get(0).tagName && "static" === a.css("position") || (e && (e -= a.offset().left), t && (t -= a.offset().top), "BODY" !== a.get(0).tagName ? (e && (e += a.get(0).scrollLeft), t && (t += a.get(0).scrollTop)) : "absolute" === a.css("position") && (e && (e += a.position().left), t && (t += a.position().top))), T.opts.iframe && a && T.$tb && a.get(0) !== T.$tb.get(0)) {
  4369. var o = T.helpers.getPX(T.$wp.find(".fr-iframe").css("padding-top")),
  4370. i = T.helpers.getPX(T.$wp.find(".fr-iframe").css("padding-left"));
  4371. e && (e += T.$iframe.offset().left + i), t && (t += T.$iframe.offset().top + o)
  4372. }
  4373. var s = function l(e, t) {
  4374. var n = e.outerWidth(!0);
  4375. return t + n > T.$sc.get(0).clientWidth - 10 && (t = T.$sc.get(0).clientWidth - n - 10), t < 0 && (t = 10), t
  4376. }(n, e);
  4377. e && n.css("left", s), t && n.css("top", function c(e, t, n) {
  4378. var r = e.outerHeight(!0);
  4379. if (!T.helpers.isMobile() && T.$tb && e.parent().get(0) !== T.$tb.get(0)) {
  4380. var a = e.parent().offset().top,
  4381. o = t - r - (n || 0);
  4382. e.parent().get(0) === T.$sc.get(0) && (a -= e.parent().position().top);
  4383. var i = T.$sc.get(0).clientHeight;
  4384. a + t + r > T.$sc.offset().top + i && 0 < e.parent().offset().top + o && 0 < o ? o > T.$wp.scrollTop() && (t = o, e.addClass("fr-above")) : e.removeClass("fr-above")
  4385. }
  4386. return t
  4387. }(n, t, r))
  4388. }
  4389. function t(e) {
  4390. var n = A(e),
  4391. t = n.is(".fr-sticky-on"),
  4392. r = n.data("sticky-top"),
  4393. a = n.data("sticky-scheduled");
  4394. if (void 0 === r) {
  4395. n.data("sticky-top", 0);
  4396. var o = A('<div class="fr-sticky-dummy" style="height: '.concat(n.outerHeight(), 'px;"></div>'));
  4397. T.$box.prepend(o)
  4398. } else T.$box.find(".fr-sticky-dummy").css("height", n.outerHeight()); if (T.core.hasFocus() || 0 < T.$tb.findVisible("input:focus").length) {
  4399. var i = T.helpers.scrollTop(),
  4400. s = Math.min(Math.max(i - T.$tb.parent().offset().top, 0), T.$tb.parent().outerHeight() - n.outerHeight());
  4401. if (s !== r && s !== a && (clearTimeout(n.data("sticky-timeout")), n.data("sticky-scheduled", s), n.outerHeight() < i - T.$tb.parent().offset().top && n.addClass("fr-opacity-0"), n.data("sticky-timeout", setTimeout(function() {
  4402. var e = T.helpers.scrollTop(),
  4403. t = Math.min(Math.max(e - T.$tb.parent().offset().top, 0), T.$tb.parent().outerHeight() - n.outerHeight());
  4404. 0 < t && "BODY" === T.$tb.parent().get(0).tagName && (t += T.$tb.parent().position().top), t !== r && (n.css("top", Math.max(t, 0)), n.data("sticky-top", t), n.data("sticky-scheduled", t)), n.removeClass("fr-opacity-0")
  4405. }, 100))), !t) {
  4406. var l = T.$tb.parent(),
  4407. c = l.get(0).offsetWidth - l.get(0).clientWidth;
  4408. n.css("top", "0"), n.width(l.width() - c), n.addClass("fr-sticky-on"), T.$box.addClass("fr-sticky-box")
  4409. }
  4410. } else clearTimeout(A(e).css("sticky-timeout")), n.css("top", "0"), n.css("position", ""), n.css("width", ""), n.data("sticky-top", 0), n.removeClass("fr-sticky-on"), T.$box.removeClass("fr-sticky-box")
  4411. }
  4412. function n(e) {
  4413. if (e.offsetWidth) {
  4414. var t = A(e),
  4415. n = t.outerHeight(),
  4416. r = t.data("sticky-position"),
  4417. a = A("body" === T.opts.scrollableContainer ? T.o_win : T.opts.scrollableContainer).outerHeight(),
  4418. o = 0,
  4419. i = 0;
  4420. "body" !== T.opts.scrollableContainer && (o = T.$sc.offset().top, i = A(T.o_win).outerHeight() - o - a);
  4421. var s = "body" === T.opts.scrollableContainer ? T.helpers.scrollTop() : o,
  4422. l = t.is(".fr-sticky-on");
  4423. t.data("sticky-parent") || t.data("sticky-parent", t.parent());
  4424. var c = t.data("sticky-parent"),
  4425. d = c.offset().top,
  4426. f = c.outerHeight();
  4427. if (t.data("sticky-offset") ? T.$box.find(".fr-sticky-dummy").css("height", "".concat(n, "px")) : (t.data("sticky-offset", !0), t.after('<div class="fr-sticky-dummy" style="height: '.concat(n, 'px;"></div>'))), !r) {
  4428. var p = "auto" !== t.css("top") || "auto" !== t.css("bottom");
  4429. p || t.css("position", "fixed"), r = {
  4430. top: T.node.hasClass(t.get(0), "fr-top"),
  4431. bottom: T.node.hasClass(t.get(0), "fr-bottom")
  4432. }, p || t.css("position", ""), t.data("sticky-position", r), t.data("top", T.node.hasClass(t.get(0), "fr-top") ? t.css("top") : "auto"), t.data("bottom", T.node.hasClass(t.get(0), "fr-bottom") ? t.css("bottom") : "auto")
  4433. }
  4434. var u = T.helpers.getPX(t.data("top")),
  4435. h = T.helpers.getPX(t.data("bottom")),
  4436. g = r.top && function b() {
  4437. return d < s + u && s + u <= d + f - n
  4438. }() && (T.helpers.isInViewPort(T.$sc.get(0)) || "body" === T.opts.scrollableContainer),
  4439. m = r.bottom && function E() {
  4440. return d + n < s + a - h && s + a - h < d + f
  4441. }();
  4442. if (g || m) {
  4443. var v = c.get(0).offsetWidth - c.get(0).clientWidth;
  4444. t.css("width", "".concat(c.get(0).getBoundingClientRect().width - v, "px")), l || (t.addClass("fr-sticky-on"), t.removeClass("fr-sticky-off"), t.css("top") && ("auto" !== t.data("top") ? t.css("top", T.helpers.getPX(t.data("top")) + o) : t.data("top", "auto")), t.css("bottom") && ("auto" !== t.data("bottom") ? t.css("bottom", T.helpers.getPX(t.data("bottom")) + i) : t.css("bottom", "auto")))
  4445. } else T.node.hasClass(t.get(0), "fr-sticky-off") || (t.css("width", ""), t.removeClass("fr-sticky-on"), t.addClass("fr-sticky-off"), t.css("top") && "auto" !== t.data("top") && r.top && t.css("top", 0), t.css("bottom") && "auto" !== t.data("bottom") && r.bottom && t.css("bottom", 0))
  4446. }
  4447. }
  4448. function r() {
  4449. if (T.helpers.requestAnimationFrame()(r), !1 !== T.events.trigger("position.refresh"))
  4450. for (var e = 0; e < T._stickyElements.length; e++) t(T._stickyElements[e])
  4451. }
  4452. function i() {
  4453. if (T._stickyElements)
  4454. for (var e = 0; e < T._stickyElements.length; e++) n(T._stickyElements[e])
  4455. }
  4456. return {
  4457. _init: function s() {
  4458. ! function e() {
  4459. T._stickyElements = [], T.helpers.isIOS() ? (r(), T.events.$on(A(T.o_win), "scroll", function() {
  4460. if (T.core.hasFocus())
  4461. for (var e = 0; e < T._stickyElements.length; e++) {
  4462. var t = A(T._stickyElements[e]),
  4463. n = t.parent(),
  4464. r = T.helpers.scrollTop();
  4465. t.outerHeight() < r - n.offset().top && (t.addClass("fr-opacity-0"), t.data("sticky-top", -1), t.data("sticky-scheduled", -1))
  4466. }
  4467. }, !0)) : ("body" !== T.opts.scrollableContainer && T.events.$on(A(T.opts.scrollableContainer), "scroll", i, !0), T.events.$on(A(T.o_win), "scroll", i, !0), T.events.$on(A(T.o_win), "resize", i, !0), T.events.on("initialized", i), T.events.on("focus", i), T.events.$on(A(T.o_win), "resize", "textarea", i, !0)), T.events.on("destroy", function() {
  4468. T._stickyElements = []
  4469. })
  4470. }()
  4471. },
  4472. forSelection: function l(e) {
  4473. var t = a();
  4474. e.css({
  4475. top: 0,
  4476. left: 0
  4477. });
  4478. var n = t.top + t.height,
  4479. r = t.left + t.width / 2 - e.get(0).offsetWidth / 2 + T.helpers.scrollLeft();
  4480. T.opts.iframe || (n += T.helpers.scrollTop()), o(r, n, e, t.height)
  4481. },
  4482. addSticky: function c(e) {
  4483. e.addClass("fr-sticky"), T.helpers.isIOS() && e.addClass("fr-sticky-ios"), e.removeClass("fr-sticky"), T._stickyElements.push(e.get(0))
  4484. },
  4485. refresh: i,
  4486. at: o,
  4487. getBoundingRect: a
  4488. }
  4489. }, $e.MODULES.refresh = function(l) {
  4490. var c = l.$;
  4491. function a(e, t) {
  4492. e.toggleClass("fr-disabled", t).attr("aria-disabled", t)
  4493. }
  4494. function e(e) {
  4495. var t = l.$tb.find('.fr-more-toolbar[data-name="'.concat(e.attr("data-group-name"), '"]')),
  4496. n = function s(e, t) {
  4497. var n = 0,
  4498. r = t.find("> .fr-command, > .fr-btn-wrap");
  4499. r.each(function(e, t) {
  4500. n += c(t).outerWidth()
  4501. });
  4502. var a, o = l.helpers.getPX(c(r[0]).css("margin-left")),
  4503. i = l.helpers.getPX(c(r[0]).css("margin-right"));
  4504. a = "rtl" === l.opts.direction ? l.$tb.outerWidth() - e.offset().left + l.$tb.offset().left - (n + e.outerWidth() + r.length * (o + i)) / 2 : e.offset().left - l.$tb.offset().left - (n - e.outerWidth() + r.length * (o + i)) / 2;
  4505. a + n + r.length * (o + i) > l.$tb.outerWidth() && (a -= (n + r.length * (o + i) - e.outerWidth()) / 2);
  4506. a < 0 && (a = 0);
  4507. return a
  4508. }(e, t);
  4509. "rtl" === l.opts.direction ? t.css("padding-right", n) : t.css("padding-left", n)
  4510. }
  4511. return {
  4512. undo: function t(e) {
  4513. a(e, !l.undo.canDo())
  4514. },
  4515. redo: function n(e) {
  4516. a(e, !l.undo.canRedo())
  4517. },
  4518. outdent: function o(e) {
  4519. if (l.node.hasClass(e.get(0), "fr-no-refresh")) return !1;
  4520. for (var t = l.selection.blocks(), n = 0; n < t.length; n++) {
  4521. var r = "rtl" === l.opts.direction || "rtl" === c(t[n]).css("direction") ? "margin-right" : "margin-left";
  4522. if ("LI" === t[n].tagName || "LI" === t[n].parentNode.tagName) return a(e, !1), !0;
  4523. if (0 < l.helpers.getPX(c(t[n]).css(r))) return a(e, !1), !0
  4524. }
  4525. a(e, !0)
  4526. },
  4527. indent: function i(e) {
  4528. if (l.node.hasClass(e.get(0), "fr-no-refresh")) return !1;
  4529. for (var t = l.selection.blocks(), n = 0; n < t.length; n++) {
  4530. for (var r = t[n].previousSibling; r && r.nodeType === Node.TEXT_NODE && 0 === r.textContent.length;) r = r.previousSibling;
  4531. if ("LI" !== t[n].tagName || r) return a(e, !1), !0;
  4532. a(e, !0)
  4533. }
  4534. },
  4535. moreText: e,
  4536. moreParagraph: e,
  4537. moreMisc: e,
  4538. moreRich: e
  4539. }
  4540. }, Object.assign($e.DEFAULTS, {
  4541. attribution: !0,
  4542. toolbarBottom: !1,
  4543. toolbarButtons: null,
  4544. toolbarButtonsXS: null,
  4545. toolbarButtonsSM: null,
  4546. toolbarButtonsMD: null,
  4547. toolbarContainer: null,
  4548. toolbarInline: !1,
  4549. toolbarSticky: !0,
  4550. toolbarStickyOffset: 0,
  4551. toolbarVisibleWithoutSelection: !1
  4552. }), $e.TOOLBAR_BUTTONS = {
  4553. moreText: {
  4554. buttons: ["bold", "italic", "underline", "strikeThrough", "subscript", "superscript", "fontFamily", "fontSize", "textColor", "backgroundColor", "inlineClass", "inlineStyle", "clearFormatting"]
  4555. },
  4556. moreParagraph: {
  4557. buttons: ["alignLeft", "alignCenter", "formatOLSimple", "alignRight", "alignJustify", "formatOL", "formatUL", "paragraphFormat", "paragraphStyle", "lineHeight", "outdent", "indent", "quote"]
  4558. },
  4559. moreRich: {
  4560. buttons: ["insertLink", "insertImage", "insertVideo", "insertTable", "emoticons", "fontAwesome", "specialCharacters", "embedly", "insertFile", "insertHR"]
  4561. },
  4562. moreMisc: {
  4563. buttons: ["undo", "redo", "fullscreen", "print", "getPDF", "spellChecker", "selectAll", "html", "help"],
  4564. align: "right",
  4565. buttonsVisible: 2
  4566. }
  4567. }, $e.TOOLBAR_BUTTONS_MD = null, ($e.TOOLBAR_BUTTONS_SM = {}).moreText = Object.assign({}, $e.TOOLBAR_BUTTONS.moreText, {
  4568. buttonsVisible: 2
  4569. }), $e.TOOLBAR_BUTTONS_SM.moreParagraph = Object.assign({}, $e.TOOLBAR_BUTTONS.moreParagraph, {
  4570. buttonsVisible: 2
  4571. }), $e.TOOLBAR_BUTTONS_SM.moreRich = Object.assign({}, $e.TOOLBAR_BUTTONS.moreRich, {
  4572. buttonsVisible: 2
  4573. }), $e.TOOLBAR_BUTTONS_SM.moreMisc = Object.assign({}, $e.TOOLBAR_BUTTONS.moreMisc, {
  4574. buttonsVisible: 2
  4575. }), ($e.TOOLBAR_BUTTONS_XS = {}).moreText = Object.assign({}, $e.TOOLBAR_BUTTONS.moreText, {
  4576. buttonsVisible: 0
  4577. }), $e.TOOLBAR_BUTTONS_XS.moreParagraph = Object.assign({}, $e.TOOLBAR_BUTTONS.moreParagraph, {
  4578. buttonsVisible: 0
  4579. }), $e.TOOLBAR_BUTTONS_XS.moreRich = Object.assign({}, $e.TOOLBAR_BUTTONS.moreRich, {
  4580. buttonsVisible: 0
  4581. }), $e.TOOLBAR_BUTTONS_XS.moreMisc = Object.assign({}, $e.TOOLBAR_BUTTONS.moreMisc, {
  4582. buttonsVisible: 2
  4583. }), $e.POWERED_BY = '', $e.MODULES.toolbar = function(m) {
  4584. var v, b = m.$,
  4585. t = [];
  4586. function e(e) {
  4587. var n = {};
  4588. if (Array.isArray(e)) {
  4589. if (!Array.isArray(e[0])) {
  4590. for (var t = [], r = [], a = 0; a < e.length; a++) "|" === e[a] || "-" === e[a] ? (0 < r.length && t.push(r), r = []) : r.push(e[a]);
  4591. 0 < r.length && t.push(r), e = t
  4592. }
  4593. e.forEach(function(e, t) {
  4594. n["group".concat(t + 1)] = {
  4595. buttons: e
  4596. }
  4597. }), n.showMoreButtons = !1
  4598. } else "object" !== Fe(e) || Array.isArray(e) || ((n = e).showMoreButtons = !0);
  4599. return n
  4600. }
  4601. function E() {
  4602. var e = m.helpers.screenSize();
  4603. return t[v = e]
  4604. }
  4605. function T() {
  4606. for (var e = m.$tb.find(".fr-more-toolbar"), c = "", t = 0; t < e.length; t++) {
  4607. var d = b(e[t]);
  4608. d.hasClass("fr-expanded") ? function() {
  4609. var n = m.helpers.getPX(d.css("padding-left")),
  4610. e = d.find("> .fr-command, > .fr-btn-wrap"),
  4611. t = b(e[0]),
  4612. r = m.helpers.getPX(t.css("margin-left")),
  4613. a = m.helpers.getPX(t.css("margin-right")),
  4614. o = m.helpers.getPX(t.css("margin-top")),
  4615. i = m.helpers.getPX(t.css("margin-bottom"));
  4616. if (e.each(function(e, t) {
  4617. n += b(t).outerWidth() + r + a
  4618. }), m.$tb.outerWidth() < n) {
  4619. var s = Math.floor(n / m.$tb.outerWidth());
  4620. n += s * (n / d[0].childElementCount), s = Math.ceil(n / m.$tb.outerWidth());
  4621. var l = (m.helpers.getPX(t.css("height")) + o + i) * s;
  4622. d.css("height", l), c = l
  4623. }
  4624. }() : d.css("height", "")
  4625. }
  4626. m.$tb.css("padding-bottom", c)
  4627. }
  4628. function r() {
  4629. if (v !== m.helpers.screenSize()) {
  4630. var e = E(),
  4631. t = b(),
  4632. n = b();
  4633. for (var r in m.$tb.find(".fr-btn-grp > .fr-command, .fr-more-toolbar > .fr-command, .fr-btn-grp > .fr-btn-wrap > .fr-command, .fr-more-toolbar > .fr-btn-wrap > .fr-command").addClass("fr-hidden"),
  4634. function g() {
  4635. for (var t = m.$tb.find(".fr-btn-grp, .fr-more-toolbar"), r = function r(e) {
  4636. var n = b(t[e]);
  4637. n.children().each(function(e, t) {
  4638. n.before(t)
  4639. }), n.remove()
  4640. }, e = 0; e < t.length; e++) r(e)
  4641. }(), e) {
  4642. var a = e[r];
  4643. if (a.buttons) {
  4644. var o = void 0,
  4645. i = 0,
  4646. s = 3,
  4647. l = b('<div class="fr-btn-grp fr-float-'.concat(e[r].align ? e[r].align : "left", '"></div>'));
  4648. e.showMoreButtons && (o = b('<div class="fr-more-toolbar"></div>').data("name", "".concat(r, "-").concat(m.id)));
  4649. for (var c = 0; c < a.buttons.length; c++) {
  4650. a.buttonsVisible !== undefined && (s = a.buttonsVisible);
  4651. var d = m.$tb.find('> .fr-command[data-cmd="' + a.buttons[c] + '"], > div.fr-btn-wrap > .fr-command[data-cmd="' + a.buttons[c] + '"]'),
  4652. f = null;
  4653. m.node.hasClass(d.next().get(0), "fr-dropdown-menu") && (f = d.next()), m.node.hasClass(d.next().get(0), "fr-options") && (d.removeClass("fr-hidden"), d.next().removeClass("fr-hidden"), d = d.parent()), d.removeClass("fr-hidden"), e.showMoreButtons && s <= i ? (o.append(d), f && o.append(f)) : (l.append(d), f && l.append(f)), i++
  4654. }
  4655. if (e.showMoreButtons && s < i) {
  4656. var p = m.$tb.find('.fr-command[data-cmd="'.concat(r, '"]'));
  4657. if (0 < p.length) p.removeClass("fr-hidden fr-open");
  4658. else {
  4659. var u = r,
  4660. h = $e.COMMANDS[u];
  4661. h.more_btn = !0, p = b(m.button.build(u, h, !0)), m.button.addButtons(p)
  4662. }
  4663. l.append(p)
  4664. }
  4665. t.push(l), e.showMoreButtons && n.push(o)
  4666. }
  4667. }
  4668. m.opts.toolbarBottom ? (m.$tb.append(n), m.$tb.find(".fr-newline").remove(), m.$tb.append('<div class="fr-newline"></div>'), m.$tb.append(t)) : (m.$tb.append(t), m.$tb.find(".fr-newline").remove(), m.$tb.append('<div class="fr-newline"></div>'), m.$tb.append(n)), m.$tb.removeClass("fr-toolbar-open"), m.$box.removeClass("fr-toolbar-open"), m.events.trigger("codeView.toggle")
  4669. }
  4670. T()
  4671. }
  4672. function n(e, t) {
  4673. setTimeout(function() {
  4674. if ((!e || e.which != $e.KEYCODE.ESC) && m.selection.inEditor() && m.core.hasFocus() && !m.popups.areVisible() && "false" != b(m.selection.blocks()[0]).closest("table").attr("contenteditable") && (m.opts.toolbarVisibleWithoutSelection || !m.selection.isCollapsed() && !m.keys.isIME() || t)) {
  4675. if (m.$tb.data("instance", m), !1 === m.events.trigger("toolbar.show", [e])) return;
  4676. m.$tb.show(), m.opts.toolbarContainer || m.position.forSelection(m.$tb), 1 < m.opts.zIndex ? m.$tb.css("z-index", m.opts.zIndex + 1) : m.$tb.css("z-index", null)
  4677. }
  4678. }, 0)
  4679. }
  4680. function a(e) {
  4681. return (!e || "blur" !== e.type || document.activeElement !== m.el) && (!(!e || "keydown" !== e.type || !m.keys.ctrlKey(e)) || (!!m.button.getButtons(".fr-dropdown.fr-active").next().find(m.o_doc.activeElement).length || void(!1 !== m.events.trigger("toolbar.hide") && m.$tb.hide())))
  4682. }
  4683. t[$e.XS] = e(m.opts.toolbarButtonsXS || m.opts.toolbarButtons || $e.TOOLBAR_BUTTONS_XS || $e.TOOLBAR_BUTTONS || []), t[$e.SM] = e(m.opts.toolbarButtonsSM || m.opts.toolbarButtons || $e.TOOLBAR_BUTTONS_SM || $e.TOOLBAR_BUTTONS || []), t[$e.MD] = e(m.opts.toolbarButtonsMD || m.opts.toolbarButtons || $e.TOOLBAR_BUTTONS_MD || $e.TOOLBAR_BUTTONS || []), t[$e.LG] = e(m.opts.toolbarButtons || $e.TOOLBAR_BUTTONS || []);
  4684. var o = null;
  4685. function i(e) {
  4686. clearTimeout(o), e && e.which === $e.KEYCODE.ESC || (o = setTimeout(n, m.opts.typingTimer))
  4687. }
  4688. function s() {
  4689. m.events.on("window.mousedown", a), m.events.on("keydown", a), m.events.on("blur", a), m.events.$on(m.$tb, "transitionend", ".fr-more-toolbar", function() {
  4690. m.position.forSelection(m.$tb)
  4691. }), m.helpers.isMobile() || m.events.on("window.mouseup", n), m.helpers.isMobile() ? m.helpers.isIOS() || (m.events.on("window.touchend", n), m.browser.mozilla && setInterval(n, 200)) : m.events.on("window.keyup", i), m.events.on("keydown", function(e) {
  4692. e && e.which === $e.KEYCODE.ESC && a()
  4693. }), m.events.on("keydown", function(e) {
  4694. if (e.which === $e.KEYCODE.ALT) return e.stopPropagation(), !1
  4695. }, !0), m.events.$on(m.$wp, "scroll.toolbar", n), m.events.on("commands.after", n), m.helpers.isMobile() && (m.events.$on(m.$doc, "selectionchange", i), m.events.$on(m.$doc, "orientationchange", n))
  4696. }
  4697. function l() {
  4698. m.$tb.html("").removeData().remove(), m.$tb = null, m.$second_tb && (m.$second_tb.html("").removeData().remove(), m.$second_tb = null)
  4699. }
  4700. function c() {
  4701. m.$box.removeClass("fr-top fr-bottom fr-inline fr-basic"), m.$box.find(".fr-sticky-dummy").remove()
  4702. }
  4703. function d() {
  4704. m.opts.theme && m.$tb.addClass("".concat(m.opts.theme, "-theme")), 1 < m.opts.zIndex && m.$tb.css("z-index", m.opts.zIndex + 1), "auto" !== m.opts.direction && m.$tb.removeClass("fr-ltr fr-rtl").addClass("fr-".concat(m.opts.direction)), m.helpers.isMobile() ? m.$tb.addClass("fr-mobile") : m.$tb.addClass("fr-desktop"), m.opts.toolbarContainer ? (m.opts.toolbarInline && (s(), a()), m.opts.toolbarBottom ? m.$tb.addClass("fr-bottom") : m.$tb.addClass("fr-top")) : function e() {
  4705. m.opts.toolbarInline ? (m.$sc.append(m.$tb), m.$tb.data("container", m.$sc), m.$tb.addClass("fr-inline"), s(), m.opts.toolbarBottom = !1) : (m.opts.toolbarBottom && !m.helpers.isIOS() ? (m.$box.append(m.$tb), m.$tb.addClass("fr-bottom"), m.$box.addClass("fr-bottom")) : (m.opts.toolbarBottom = !1, m.$box.prepend(m.$tb), m.$tb.addClass("fr-top"), m.$box.addClass("fr-top")), m.$tb.addClass("fr-basic"), m.opts.toolbarSticky && (m.opts.toolbarStickyOffset && (m.opts.toolbarBottom ? m.$tb.css("bottom", m.opts.toolbarStickyOffset) : m.$tb.css("top", m.opts.toolbarStickyOffset)), m.position.addSticky(m.$tb)))
  4706. }(),
  4707. function t() {
  4708. var e = m.button.buildGroup(E());
  4709. m.$tb.append(e), T(), m.button.bindCommands(m.$tb)
  4710. }(),
  4711. function n() {
  4712. m.events.$on(b(m.o_win), "resize", r), m.events.$on(b(m.o_win), "orientationchange", r)
  4713. }(), m.accessibility.registerToolbar(m.$tb), m.events.$on(m.$tb, "".concat(m._mousedown, " ").concat(m._mouseup), function(e) {
  4714. var t = e.originalEvent ? e.originalEvent.target || e.originalEvent.originalTarget : null;
  4715. if (t && "INPUT" !== t.tagName && !m.edit.isDisabled()) return e.stopPropagation(), e.preventDefault(), !1
  4716. }, !0), m.events.$on(m.$tb, "transitionend", ".fr-more-toolbar", function() {
  4717. m.$box.hasClass("fr-fullscreen") && (m.opts.height = m.o_win.innerHeight - (m.opts.toolbarInline ? 0 : m.$tb.outerHeight() + (m.$second_tb ? m.$second_tb.outerHeight() : 0)), m.size.refresh())
  4718. })
  4719. }
  4720. var f = !1;
  4721. return {
  4722. _init: function p() {
  4723. if (m.$sc = b(m.opts.scrollableContainer).first(), !m.$wp) return !1;
  4724. m.opts.toolbarInline || m.opts.toolbarBottom || (m.$second_tb = b(m.doc.createElement("div")).attr("class", "second-toolbar"), m.$box.append(m.$second_tb), (!1 !== m.ul || m.opts.attribution) && m.$second_tb.prepend($e.POWERED_BY)), m.opts.toolbarContainer ? (m.shared.$tb ? (m.$tb = m.shared.$tb, m.opts.toolbarInline && s()) : (m.shared.$tb = b(m.doc.createElement("DIV")), m.shared.$tb.addClass("fr-toolbar"), m.$tb = m.shared.$tb, b(m.opts.toolbarContainer).append(m.$tb), d(), m.$tb.data("instance", m)), m.opts.toolbarInline ? m.$box.addClass("fr-inline") : m.$box.addClass("fr-basic"), m.events.on("focus", function() {
  4725. m.$tb.data("instance", m)
  4726. }, !0), m.opts.toolbarInline = !1) : m.opts.toolbarInline ? (m.$box.addClass("fr-inline"), m.shared.$tb ? (m.$tb = m.shared.$tb, s()) : (m.shared.$tb = b(m.doc.createElement("DIV")), m.shared.$tb.addClass("fr-toolbar"), m.$tb = m.shared.$tb, d())) : (m.$box.addClass("fr-basic"), m.$tb = b(m.doc.createElement("DIV")), m.$tb.addClass("fr-toolbar"), d(), m.$tb.data("instance", m)), m.events.on("destroy", c, !0), m.events.on(m.opts.toolbarInline || m.opts.toolbarContainer ? "shared.destroy" : "destroy", l, !0), m.events.on("edit.on", function() {
  4727. m.$tb.removeClass("fr-disabled").removeAttr("aria-disabled")
  4728. }), m.events.on("edit.off", function() {
  4729. m.$tb.addClass("fr-disabled").attr("aria-disabled", !0)
  4730. }),
  4731. function e() {
  4732. m.events.on("shortcut", function(e, t, n) {
  4733. var r;
  4734. if (t && !n ? r = m.$tb.find('.fr-command[data-cmd="'.concat(t, '"]')) : t && n && (r = m.$tb.find('.fr-command[data-cmd="'.concat(t, '"][data-param1="').concat(n, '"]'))), r.length && (e.preventDefault(), e.stopPropagation(), r.parents(".fr-toolbar").data("instance", m), "keydown" === e.type)) return m.button.exec(r), !1
  4735. })
  4736. }()
  4737. },
  4738. hide: a,
  4739. show: function u() {
  4740. if (!1 === m.events.trigger("toolbar.show")) return !1;
  4741. m.$tb.show()
  4742. },
  4743. showInline: n,
  4744. disable: function h() {
  4745. !f && m.$tb && (m.$tb.find(".fr-btn-grp > .fr-command, .fr-more-toolbar > .fr-command").addClass("fr-disabled fr-no-refresh").attr("aria-disabled", !0), f = !0)
  4746. },
  4747. enable: function g() {
  4748. f && m.$tb && (m.$tb.find(".fr-btn-grp > .fr-command, .fr-more-toolbar > .fr-command").removeClass("fr-disabled fr-no-refresh").attr("aria-disabled", !1), f = !1), m.button.bulkRefresh()
  4749. },
  4750. setMoreToolbarsHeight: T
  4751. }
  4752. };
  4753. var c = ["scroll", "wheel", "touchmove", "touchstart", "touchend"],
  4754. d = ["webkit", "moz", "ms", "o"],
  4755. f = ["transitionend"],
  4756. a = document.createElement("div").style,
  4757. o = ["Webkit", "Moz", "ms", "O", "css", "style"],
  4758. s = {
  4759. visibility: "hidden",
  4760. display: "block"
  4761. },
  4762. r = ["focus", "blur", "click"],
  4763. l = {},
  4764. p = function p(e, t) {
  4765. return {
  4766. altKey: e.altKey,
  4767. bubbles: e.bubbles,
  4768. cancelable: e.cancelable,
  4769. changedTouches: e.changedTouches,
  4770. ctrlKey: e.ctrlKey,
  4771. detail: e.detail,
  4772. eventPhase: e.eventPhase,
  4773. metaKey: e.metaKey,
  4774. pageX: e.pageX,
  4775. pageY: e.pageY,
  4776. shiftKey: e.shiftKey,
  4777. view: e.view,
  4778. "char": e["char"],
  4779. key: e.key,
  4780. keyCode: e.keyCode,
  4781. button: e.button,
  4782. buttons: e.buttons,
  4783. clientX: e.clientX,
  4784. clientY: e.clientY,
  4785. offsetX: e.offsetX,
  4786. offsetY: e.offsetY,
  4787. pointerId: e.pointerId,
  4788. pointerType: e.pointerType,
  4789. screenX: e.screenX,
  4790. screenY: e.screenY,
  4791. targetTouches: e.targetTouches,
  4792. toElement: e.toElement,
  4793. touches: e.touches,
  4794. type: e.type,
  4795. which: e.which,
  4796. target: e.target,
  4797. currentTarget: t,
  4798. originalEvent: e,
  4799. stopPropagation: function() {
  4800. e.stopPropagation()
  4801. },
  4802. stopImmediatePropagation: function() {
  4803. e.stopImmediatePropagation()
  4804. },
  4805. preventDefault: function() {
  4806. -1 === c.indexOf(e.type) && e.preventDefault()
  4807. }
  4808. }
  4809. },
  4810. u = function u(e) {
  4811. return e.ownerDocument && e.ownerDocument.body.contains(e) || "#document" === e.nodeName || "HTML" === e.nodeName || e === window
  4812. },
  4813. h = function h(n, r) {
  4814. return function(e) {
  4815. var t = e.target;
  4816. if (r)
  4817. for (r = m(r); t && t !== this;) t.matches && t.matches(m(r)) && n.call(t, p(e, t)), t = t.parentNode;
  4818. else u(t) && n.call(t, p(e, t))
  4819. }
  4820. },
  4821. g = function g(e, t) {
  4822. return new E(e, t)
  4823. },
  4824. m = function m(e) {
  4825. return e && "string" == typeof e ? e.replace(/^\s*>/g, ":scope >").replace(/,\s*>/g, ", :scope >") : e
  4826. },
  4827. v = function v(e) {
  4828. return "function" == typeof e && "number" != typeof e.nodeType
  4829. },
  4830. b = g;
  4831. g.fn = g.prototype = {
  4832. constructor: g,
  4833. length: 0,
  4834. contains: function(e) {
  4835. if (!e) return !1;
  4836. if (Array.isArray(e)) {
  4837. for (var t = 0; t < e.length; t++)
  4838. if (this.contains(e[t]) && this != e[t]) return !0;
  4839. return !1
  4840. }
  4841. for (var n = 0; n < this.length; n++)
  4842. for (var r = e; r;) {
  4843. if (r == this[n] || r[0] && r[0].isEqualNode(this[n])) return !0;
  4844. r = r.parentNode
  4845. }
  4846. return !1
  4847. },
  4848. findVisible: function(e) {
  4849. for (var t = this.find(e), n = t.length - 1; 0 <= n; n--) b(t[n]).isVisible() || t.splice(n, 1);
  4850. return t
  4851. },
  4852. formatParams: function(t) {
  4853. var e = "?".concat(Object.keys(t).map(function(e) {
  4854. return "".concat(e, "=").concat(encodeURIComponent(t[e]))
  4855. }).join("&"));
  4856. return "?" === e ? "" : e
  4857. },
  4858. ajax: function(t) {
  4859. var n = new XMLHttpRequest;
  4860. for (var e in "GET" === t.method.toUpperCase() && (t.url = t.url + this.formatParams(t.data)), n.open(t.method, t.url, !0), t.withCredentials && (n.withCredentials = !0), t.crossDomain && n.setRequestHeader("Access-Control-Allow-Origin", "*"), t.headers) Object.prototype.hasOwnProperty.call(t.headers, e) && n.setRequestHeader(e, t.headers[e]);
  4861. "json" === t.dataType && n.setRequestHeader("Content-Type", "application/json"), n.onload = function() {
  4862. if (200 == n.status) {
  4863. var e = n.responseText;
  4864. "json" === t.dataType && (e = JSON.parse(e)), t.done(e, n.status, n)
  4865. } else t.fail(n)
  4866. };
  4867. var r = new FormData;
  4868. for (var a in t.data) r.append(a, encodeURIComponent(t.data[a]));
  4869. n.send(r)
  4870. },
  4871. prevAll: function() {
  4872. var e = b();
  4873. if (!this[0]) return e;
  4874. for (var t = this[0]; t && t.previousSibling;) t = t.previousSibling, e.push(t);
  4875. return e
  4876. },
  4877. index: function(e) {
  4878. return e ? "string" == typeof e ? [].indexOf.call(b(e), this[0]) : [].indexOf.call(this, e.length ? e[0] : e) : this[0] && this[0].parentNode ? this.first().prevAll().length : -1
  4879. },
  4880. isVisible: function() {
  4881. return !!this[0] && !!(this[0].offsetWidth || this[0].offsetHeight || this[0].getClientRects().length)
  4882. },
  4883. toArray: function() {
  4884. return [].slice.call(this)
  4885. },
  4886. get: function(e) {
  4887. return null == e ? [].slice.call(this) : e < 0 ? this[e + this.length] : this[e]
  4888. },
  4889. pushStack: function(e) {
  4890. var t = g.merge(this.constructor(), e);
  4891. return t.prevObject = this, t
  4892. },
  4893. wrapAll: function(e) {
  4894. var t;
  4895. return this[0] && (v(e) && (e = e.call(this[0])), t = g(e, this[0].ownerDocument).eq(0).clone(!0), this[0].parentNode && t.insertBefore(this[0]), t.map(function() {
  4896. for (var e = this; e.firstElementChild;) e = e.firstElementChild;
  4897. return e
  4898. }).append(this)), this
  4899. },
  4900. wrapInner: function(e) {
  4901. if ("string" == typeof e) {
  4902. for (var t = e.split(" "), n = 0; n < t.length && 0 === t[n].trim().length;) n++;
  4903. if (n < t.length && (e = document.createElement(t[n].trim()), n++), "string" != typeof e)
  4904. for (var r = b(e); n < t.length; n++) {
  4905. t[n] = t[n].trim();
  4906. var a = t[n].split("=");
  4907. r.attr(a[0], a[1].replace('"', ""))
  4908. }
  4909. }
  4910. for (; !this[0].firstChild && this[0].firstChild !== e;) e.appendChild(this[0].firstChild)
  4911. },
  4912. wrap: function(t) {
  4913. var n = v(t);
  4914. return this.each(function(e) {
  4915. b(this).wrapAll(n ? t.call(this, e) : t)
  4916. })
  4917. },
  4918. unwrap: function() {
  4919. return this.parent().each(function() {
  4920. this.nodeName && this.nodeName.toLowerCase() === name.toLowerCase() || g(this).replaceWith(this.childNodes)
  4921. })
  4922. },
  4923. grep: function(e, t, n) {
  4924. for (var r = [], a = 0, o = e.length, i = !n; a < o; a++)!t(e[a], a) !== i && r.push(e[a]);
  4925. return r
  4926. },
  4927. map: function(n) {
  4928. return this.pushStack(g.map(this, function(e, t) {
  4929. return n.call(e, t, e)
  4930. }))
  4931. },
  4932. slice: function() {
  4933. return this.pushStack([].slice.apply(this, arguments))
  4934. },
  4935. each: function(e) {
  4936. if (this.length)
  4937. for (var t = 0; t < this.length && !1 !== e.call(this[t], t, this[t]); t++);
  4938. return this
  4939. },
  4940. first: function() {
  4941. return this.eq(0)
  4942. },
  4943. last: function() {
  4944. return this.eq(-1)
  4945. },
  4946. eq: function(e) {
  4947. var t = this.length,
  4948. n = +e + (e < 0 ? t : 0);
  4949. return this.pushStack(0 <= n && n < t ? [this[n]] : [])
  4950. },
  4951. empty: function() {
  4952. for (var e = 0; e < this.length; e++) this[e].innerHTML = ""
  4953. },
  4954. contents: function() {
  4955. for (var e = b(), t = 0; t < this.length; t++)
  4956. for (var n = this[t].childNodes, r = 0; r < n.length; r++) e.push(n[r]);
  4957. return e
  4958. },
  4959. attr: function(e, t) {
  4960. if ("object" === Fe(e)) {
  4961. for (var n in e) Object.prototype.hasOwnProperty.call(e, n) && null !== e[n] && this.attr(n, e[n]);
  4962. return this
  4963. }
  4964. if (void 0 === t) return 0 === this.length || !this[0].getAttribute && "checked" !== e ? undefined : "checked" === e ? this[0].checked : "tagName" === e ? this[0].tagName : this[0].getAttribute(e);
  4965. if ("checked" === e)
  4966. for (var r = 0; r < this.length; r++) this[r].checked = t;
  4967. else if ("tagName" === e)
  4968. for (var a = 0; a < this.length; a++) this[a].tagName = t;
  4969. else
  4970. for (var o = 0; o < this.length; o++) this[o].setAttribute(e, t);
  4971. return this
  4972. },
  4973. removeAttr: function(e) {
  4974. for (var t = 0; t < this.length; t++) this[t].removeAttribute && this[t].removeAttribute(e);
  4975. return this
  4976. },
  4977. hide: function() {
  4978. return this.css("display", "none"), this
  4979. },
  4980. show: function() {
  4981. return this.css("display", "block"), this
  4982. },
  4983. focus: function() {
  4984. return this.length && this[0].focus(), this
  4985. },
  4986. blur: function() {
  4987. return this.length && this[0].blur(), this
  4988. },
  4989. data: function(e, t) {
  4990. if (void 0 !== t) {
  4991. for (var n = 0; n < this.length; n++) "object" !== Fe(this[n]["data-" + e] = t) && "function" != typeof t && this[n].setAttribute && this[n].setAttribute("data-" + e, t);
  4992. return this
  4993. }
  4994. if (void 0 !== t) return this.attr("data-" + e, t);
  4995. if (0 === this.length) return undefined;
  4996. for (var r = 0; r < this.length; r++) {
  4997. var a = this[r]["data-" + e];
  4998. if (null == a && this[r].getAttribute && (a = this[r].getAttribute("data-" + e)), void 0 !== a && null != a) return a
  4999. }
  5000. return undefined
  5001. },
  5002. removeData: function(e) {
  5003. for (var t = 0; t < this.length; t++) this[t].removeAttribute && this[t].removeAttribute("data-" + e), this[t]["data-" + e] = null;
  5004. return this
  5005. },
  5006. getCorrectStyleName: function(e) {
  5007. if (!l[e]) {
  5008. var t;
  5009. e in a && (t = e);
  5010. for (var n = e[0].toUpperCase() + e.slice(1), r = o.length; r--;)(e = o[r] + n) in a && (t = e);
  5011. l[e] = t
  5012. }
  5013. return l[e]
  5014. },
  5015. css: function(e, t) {
  5016. if (void 0 !== t) {
  5017. if (0 === this.length) return this;
  5018. ("string" != typeof t || "" === t.trim() || isNaN(t)) && "number" != typeof t || !/(margin)|(padding)|(height)|(width)|(top)|(left)|(right)|(bottom)/gi.test(e) || /(line-height)/gi.test(e) || (t += "px");
  5019. for (var n = 0; n < this.length; n++) e = b(this).getCorrectStyleName(e), this[n].style[e] = t;
  5020. return this
  5021. }
  5022. if ("string" == typeof e) {
  5023. if (0 === this.length) return undefined;
  5024. var r = this[0].ownerDocument || document,
  5025. a = r.defaultView || r.parentWindow;
  5026. return e = b(this).getCorrectStyleName(e), a.getComputedStyle(this[0])[e]
  5027. }
  5028. for (var o in e) Object.prototype.hasOwnProperty.call(e, o) && this.css(o, e[o]);
  5029. return this
  5030. },
  5031. toggleClass: function(e, t) {
  5032. if (1 < e.split(" ").length) {
  5033. for (var n = e.split(" "), r = 0; r < n.length; r++) this.toggleClass(n[r], t);
  5034. return this
  5035. }
  5036. for (var a = 0; a < this.length; a++) void 0 === t ? this[a].classList.contains(e) ? this[a].classList.remove(e) : this[a].classList.add(e) : t ? this[a].classList.contains(e) || this[a].classList.add(e) : this[a].classList.contains(e) && this[a].classList.remove(e);
  5037. return this
  5038. },
  5039. addClass: function(e) {
  5040. if (0 === e.length) return this;
  5041. if (1 < e.split(" ").length) {
  5042. for (var t = e.split(" "), n = 0; n < t.length; n++) this.addClass(t[n]);
  5043. return this
  5044. }
  5045. for (var r = 0; r < this.length; r++) this[r].classList.add(e);
  5046. return this
  5047. },
  5048. removeClass: function(e) {
  5049. if (1 < e.split(" ").length) {
  5050. for (var t = e.split(" "), n = 0; n < t.length; n++) t[n] = t[n].trim(), t[n].length && this.removeClass(t[n]);
  5051. return this
  5052. }
  5053. for (var r = 0; r < this.length; r++) e.length && this[r].classList.remove(e);
  5054. return this
  5055. },
  5056. getClass: function(e) {
  5057. return e.getAttribute && e.getAttribute("class") || ""
  5058. },
  5059. stripAndCollapse: function(e) {
  5060. return (e.match(/[^\x20\t\r\n\f]+/g) || []).join(" ")
  5061. },
  5062. hasClass: function(e) {
  5063. var t, n, r = 0;
  5064. for (t = " " + e + " "; n = this[r++];)
  5065. if (1 === n.nodeType && -1 < (" " + b(this).stripAndCollapse(b(this).getClass(n)) + " ").indexOf(t)) return !0;
  5066. return !1
  5067. },
  5068. scrollTop: function(e) {
  5069. if (void 0 === e) return 0 === this.length ? undefined : this[0] === document ? document.documentElement.scrollTop : this[0].scrollTop;
  5070. for (var t = 0; t < this.length; t++) this[t] === document ? window.scrollTo(document.documentElement.scrollLeft, e) : this[t].scrollTop = e
  5071. },
  5072. scrollLeft: function(e) {
  5073. if (void 0 === e) return 0 === this.length ? undefined : this[0] === document ? document.documentElement.scrollLeft : this[0].scrollLeft;
  5074. for (var t = 0; t < this.length; t++) this[t] === document ? window.scrollTo(e, document.documentElement.scrollTop) : this[t].scrollLeft = e
  5075. },
  5076. on: function(e, t, n) {
  5077. if (1 < e.split(" ").length) {
  5078. for (var r = e.split(" "), a = 0; a < r.length; a++)
  5079. if (-1 !== f.indexOf(e))
  5080. for (var o = 0; o < d.length; o++) this.on(d[o] + e[0].toUpperCase() + e.slice(1), t, n);
  5081. else this.on(r[a], t, n);
  5082. return this
  5083. }
  5084. n = "function" == typeof t ? h(t, null) : h(n, t);
  5085. for (var i = 0; i < this.length; i++) {
  5086. var s = b(this[i]);
  5087. s.data("events") || s.data("events", []), s.data("events").push([e, n]);
  5088. var l = e.split(".");
  5089. l = l[0], 0 <= c.indexOf(l) ? s.get(0).addEventListener(l, n, {
  5090. passive: !0
  5091. }) : s.get(0).addEventListener(l, n)
  5092. }
  5093. },
  5094. off: function(e) {
  5095. if (1 < e.split(" ").length) {
  5096. for (var t = e.split(" "), n = 0; n < t.length; n++) this.off(t[n]);
  5097. return this
  5098. }
  5099. for (var r = 0; r < this.length; r++) {
  5100. var a = b(this[r]);
  5101. if (a.data("events")) {
  5102. var o = e.split(".");
  5103. o = o[0];
  5104. for (var i = a.data("events") || [], s = i.length - 1; 0 <= s; s--) {
  5105. var l = i[s];
  5106. l[0] == e && (a.get(0).removeEventListener(o, l[1]), i.splice(s, 1))
  5107. }
  5108. }
  5109. }
  5110. },
  5111. trigger: function(e) {
  5112. for (var t = 0; t < this.length; t++) {
  5113. var n = void 0;
  5114. "function" == typeof Event ? n = 0 <= e.search(/^mouse/g) ? new MouseEvent(e, {
  5115. view: window,
  5116. cancelable: !0,
  5117. bubbles: !0
  5118. }) : new Event(e) : 0 <= e.search(/^mouse/g) ? (n = document.createEvent("MouseEvents")).initMouseEvent(e, !0, !0, window, 0, 0, 0, 0, 0, !1, !1, !1, !1, 0, null) : (n = document.createEvent("Event")).initEvent(e, !0, !0), 0 <= r.indexOf(e) && "function" == typeof this[t][e] ? this[t][e]() : this[t].dispatchEvent(n)
  5119. }
  5120. },
  5121. triggerHandler: function() {},
  5122. val: function(e) {
  5123. if (void 0 === e) return this[0].value;
  5124. for (var t = 0; t < this.length; t++) this[t].value = e;
  5125. return this
  5126. },
  5127. siblings: function() {
  5128. return b(this[0]).parent().children().not(this)
  5129. },
  5130. find: function(e) {
  5131. var t = b();
  5132. if ("string" != typeof e) {
  5133. for (var n = 0; n < e.length; n++)
  5134. for (var r = 0; r < this.length; r++)
  5135. if (this[r] !== e[n] && b(this[r]).contains(e[n])) {
  5136. t.push(e[n]);
  5137. break
  5138. }
  5139. return t
  5140. }
  5141. var a = function a(e) {
  5142. return "object" === ("undefined" == typeof HTMLElement ? "undefined" : Fe(HTMLElement)) ? e instanceof HTMLElement : e && "object" === Fe(e) && null !== e && 1 === e.nodeType && "string" == typeof e.nodeName
  5143. };
  5144. e = m(e);
  5145. for (var o = 0; o < this.length; o++)
  5146. if (this[o].querySelectorAll) {
  5147. var i = [];
  5148. e && "string" == typeof e ? i = this[o].querySelectorAll(e) : a(e) && (i = [e]);
  5149. for (var s = 0; s < i.length; s++) t.push(i[s])
  5150. }
  5151. return t
  5152. },
  5153. children: function() {
  5154. for (var e = b(), t = 0; t < this.length; t++)
  5155. for (var n = this[t].children, r = 0; r < n.length; r++) e.push(n[r]);
  5156. return e
  5157. },
  5158. not: function(e) {
  5159. if ("string" == typeof e)
  5160. for (var t = this.length - 1; 0 <= t; t--) this[t].matches(e) && this.splice(t, 1);
  5161. else if (e instanceof g) {
  5162. for (var n = this.length - 1; 0 <= n; n--)
  5163. for (var r = 0; r < e.length; r++)
  5164. if (this[n] === e[r]) {
  5165. this.splice(n, 1);
  5166. break
  5167. }
  5168. } else
  5169. for (var a = this.length - 1; 0 <= a; a--) this[a] === e[0] && this.splice(a, 1);
  5170. return this
  5171. },
  5172. add: function(e) {
  5173. for (var t = 0; t < e.length; t++) this.push(e[t]);
  5174. return this
  5175. },
  5176. closest: function(e) {
  5177. for (var t = 0; t < this.length; t++) {
  5178. var n = this[t].closest(e);
  5179. if (n) return b(n)
  5180. }
  5181. return b()
  5182. },
  5183. html: function(e) {
  5184. if (void 0 === e) return 0 === this.length ? undefined : this[0].innerHTML;
  5185. if ("string" == typeof e)
  5186. for (var t = 0; t < this.length; t++) {
  5187. this[t].innerHTML = e;
  5188. for (var n = this[t].children, r = this[t].ownerDocument || document, a = 0; a < n.length; a++)
  5189. if ("SCRIPT" === n[a].tagName) {
  5190. var o = r.createElement("script");
  5191. o.innerHTML = n[a].innerHTML, r.head.appendChild(o).parentNode.removeChild(o)
  5192. }
  5193. } else {
  5194. this[0].innerHTML = "", this.append(e[0]);
  5195. var i = this[0].ownerDocument || document;
  5196. if ("SCRIPT" === e[0].tagName) {
  5197. var s = i.createElement("script");
  5198. s.innerHTML = e[0].innerHTML, i.head.appendChild(s).parentNode.removeChild(s)
  5199. }
  5200. }
  5201. return this
  5202. },
  5203. text: function(e) {
  5204. if (!e) return this.length ? this[0].textContent : "";
  5205. for (var t = 0; t < this.length; t++) this[t].textContent = e
  5206. },
  5207. after: function e(t) {
  5208. if (t)
  5209. if ("string" == typeof t)
  5210. for (var n = 0; n < this.length; n++) {
  5211. var e = this[n];
  5212. if (e.nodeType != Node.ELEMENT_NODE) {
  5213. var r = e.ownerDocument.createElement("SPAN");
  5214. b(e).after(r), b(r).after(t).remove()
  5215. } else e.insertAdjacentHTML("afterend", t)
  5216. } else {
  5217. var a = this[0];
  5218. if (a.nextSibling)
  5219. if (t instanceof g)
  5220. for (var o = 0; o < t.length; o++) a.nextSibling.parentNode.insertBefore(t[o], a.nextSibling);
  5221. else a.nextSibling.parentNode.insertBefore(t, a.nextSibling);
  5222. else b(a.parentNode).append(t)
  5223. }
  5224. return this
  5225. },
  5226. clone: function(e) {
  5227. for (var t = b(), n = 0; n < this.length; n++) t.push(this[n].cloneNode(e));
  5228. return t
  5229. },
  5230. replaceWith: function(e) {
  5231. if ("string" == typeof e)
  5232. for (var t = 0; t < this.length; t++) this[t].parentNode && (this[t].outerHTML = e);
  5233. else if (e.length)
  5234. for (var n = 0; n < this.length; n++) this.replaceWith(e[n]);
  5235. else this.after(e).remove()
  5236. },
  5237. insertBefore: function(e) {
  5238. return b(e).before(this[0]), this
  5239. },
  5240. before: function e(t) {
  5241. if (t instanceof g) {
  5242. for (var n = 0; n < t.length; n++) this.before(t[n]);
  5243. return this
  5244. }
  5245. if (t)
  5246. if ("string" == typeof t)
  5247. for (var r = 0; r < this.length; r++) {
  5248. var e = this[r];
  5249. if (e.nodeType != Node.ELEMENT_NODE) {
  5250. var a = e.ownerDocument.createElement("SPAN");
  5251. b(e).before(a), b(a).before(t).remove()
  5252. } else e.parentNode && e.insertAdjacentHTML("beforebegin", t)
  5253. } else {
  5254. var o = this[0];
  5255. if (o.parentNode)
  5256. if (t instanceof g)
  5257. for (var i = 0; i < t.length; i++) o.parentNode.insertBefore(t[i], o);
  5258. else o.parentNode.insertBefore(t, o)
  5259. }
  5260. return this
  5261. },
  5262. append: function(e) {
  5263. if (0 == this.length) return this;
  5264. if ("string" == typeof e)
  5265. for (var t = 0; t < this.length; t++) {
  5266. var n = this[t],
  5267. r = n.ownerDocument.createElement("SPAN");
  5268. b(n).append(r), b(r).after(e).remove()
  5269. } else if (e instanceof g || Array.isArray(e))
  5270. for (var a = 0; a < e.length; a++) this.append(e[a]);
  5271. else this[0].appendChild(e);
  5272. return this
  5273. },
  5274. prepend: function(e) {
  5275. if (0 == this.length) return this;
  5276. if ("string" == typeof e)
  5277. for (var t = 0; t < this.length; t++) {
  5278. var n = this[t],
  5279. r = n.ownerDocument.createElement("SPAN");
  5280. b(n).prepend(r), b(r).before(e).remove()
  5281. } else if (e instanceof g)
  5282. for (var a = 0; a < e.length; a++) this.prepend(e[a]);
  5283. else {
  5284. var o = this[0];
  5285. o.firstChild ? o.firstChild ? o.insertBefore(e, o.firstChild) : o.appendChild(e) : b(o).append(e)
  5286. }
  5287. return this
  5288. },
  5289. remove: function() {
  5290. for (var e = 0; e < this.length; e++) this[e].parentNode && this[e].parentNode.removeChild(this[e]);
  5291. return this
  5292. },
  5293. prev: function() {
  5294. return this.length && this[0].previousElementSibling ? b(this[0].previousElementSibling) : b()
  5295. },
  5296. next: function() {
  5297. return this.length && this[0].nextElementSibling ? b(this[0].nextElementSibling) : b()
  5298. },
  5299. outerHeight: function(e) {
  5300. if (0 === this.length) return undefined;
  5301. var t = this[0];
  5302. if (t === t.window) return t.innerHeight;
  5303. var n = {},
  5304. r = this.isVisible();
  5305. if (!r)
  5306. for (var a in s) n[a] = t.style[a], t.style[a] = s[a];
  5307. var o = t.offsetHeight;
  5308. if (e && (o += parseInt(b(t).css("marginTop")) + parseInt(b(t).css("marginBottom"))), !r)
  5309. for (var i in s) t.style[i] = n[i];
  5310. return o
  5311. },
  5312. outerWidth: function(e) {
  5313. if (0 === this.length) return undefined;
  5314. var t = this[0];
  5315. if (t === t.window) return t.outerWidth;
  5316. var n = {},
  5317. r = this.isVisible();
  5318. if (!r)
  5319. for (var a in s) n[a] = t.style[a], t.style[a] = s[a];
  5320. var o = t.offsetWidth;
  5321. if (e && (o += parseInt(b(t).css("marginLeft")) + parseInt(b(t).css("marginRight"))), !r)
  5322. for (var i in s) t.style[i] = n[i];
  5323. return o
  5324. },
  5325. width: function(e) {
  5326. if (e === undefined) return this[0] instanceof HTMLDocument ? this[0].body.offsetWidth : this[0].offsetWidth;
  5327. this[0].style.width = e + "px"
  5328. },
  5329. height: function(e) {
  5330. var t = this[0];
  5331. if (e === undefined) {
  5332. if (t instanceof HTMLDocument) {
  5333. var n = t.documentElement;
  5334. return Math.max(t.body.scrollHeight, n.scrollHeight, t.body.offsetHeight, n.offsetHeight, n.clientHeight)
  5335. }
  5336. return t.offsetHeight
  5337. }
  5338. t.style.height = e + "px"
  5339. },
  5340. is: function(e) {
  5341. return 0 !== this.length && ("string" == typeof e && this[0].matches ? this[0].matches(e) : e instanceof g ? this[0] == e[0] : this[0] == e)
  5342. },
  5343. parent: function() {
  5344. return 0 === this.length ? b() : b(this[0].parentNode)
  5345. },
  5346. parents: function(e) {
  5347. for (var t = b(), n = 0; n < this.length; n++)
  5348. for (var r = this[n].parentNode; r && r != document && r.matches;) e ? r.matches(e) && t.push(r) : t.push(r), r = r.parentNode;
  5349. return t
  5350. },
  5351. parentsUntil: function(e, t) {
  5352. var n = b();
  5353. e instanceof g && 0 < e.length && (e = e[0]);
  5354. for (var r = 0; r < this.length; r++)
  5355. for (var a = this[r].parentNode; a && a != document && a.matches && a != e && this[r] != e && ("string" != typeof e || !a.matches(e));) t ? a.matches(t) && n.push(a) : n.push(a), a = a.parentNode;
  5356. return n
  5357. },
  5358. insertAfter: function(e) {
  5359. var t = e.parent()[0];
  5360. t && t.insertBefore(this[0], e[0].nextElementSibling)
  5361. },
  5362. filter: function(e) {
  5363. var t = b();
  5364. if ("function" == typeof e)
  5365. for (var n = 0; n < this.length; n++) e.call(this[n], this[n]) && t.push(this[n]);
  5366. else if ("string" == typeof e)
  5367. for (var r = 0; r < this.length; r++) this[r].matches(e) && t.push(this[r]);
  5368. return t
  5369. },
  5370. offset: function() {
  5371. var e = this[0].getBoundingClientRect(),
  5372. t = this[0].ownerDocument.defaultView;
  5373. return {
  5374. top: e.top + t.pageYOffset,
  5375. left: e.left + t.pageXOffset
  5376. }
  5377. },
  5378. position: function() {
  5379. return {
  5380. left: this[0].offsetLeft,
  5381. top: this[0].offsetTop
  5382. }
  5383. },
  5384. push: [].push,
  5385. splice: [].splice
  5386. }, g.extend = function(e) {
  5387. e = e || {};
  5388. for (var t = 1; t < arguments.length; t++)
  5389. if (arguments[t])
  5390. for (var n in arguments[t]) Object.prototype.hasOwnProperty.call(arguments[t], n) && (e[n] = arguments[t][n]);
  5391. return e
  5392. }, g.merge = function(e, t) {
  5393. for (var n = +t.length, r = 0, a = e.length; r < n; r++) e[a++] = t[r];
  5394. return e.length = a, e
  5395. }, g.map = function(e, t, n) {
  5396. var r, a, o = 0,
  5397. i = [];
  5398. if (Array.isArray(e))
  5399. for (r = e.length; o < r; o++) null != (a = t(e[o], o, n)) && i.push(a);
  5400. else
  5401. for (o in e) null != (a = t(e[o], o, n)) && i.push(a);
  5402. return [].concat.apply([], i)
  5403. };
  5404. var E = function E(e, t) {
  5405. if (!e) return this;
  5406. if ("string" == typeof e && "<" === e[0]) {
  5407. var n = document.createElement("DIV");
  5408. return n.innerHTML = e, b(n.firstElementChild)
  5409. }
  5410. if (t = t instanceof g ? t[0] : t, "string" != typeof e) return e instanceof g ? e : (this[0] = e, this.length = 1, this);
  5411. e = m(e);
  5412. for (var r = (t || document).querySelectorAll(e), a = 0; a < r.length; a++) this[a] = r[a];
  5413. return this.length = r.length, this
  5414. };
  5415. E.prototype = g.prototype;
  5416. var T = $e;
  5417. function A() {
  5418. this.doc = this.$el.get(0).ownerDocument, this.win = "defaultView" in this.doc ? this.doc.defaultView : this.doc.parentWindow, this.$doc = g(this.doc), this.$win = g(this.win), this.opts.pluginsEnabled || (this.opts.pluginsEnabled = Object.keys(T.PLUGINS)), this.opts.initOnClick ? (this.load(T.MODULES), this.$el.on("touchstart.init", function() {
  5419. g(this).data("touched", !0)
  5420. }), this.$el.on("touchmove.init", function() {
  5421. g(this).removeData("touched")
  5422. }), this.$el.on("mousedown.init touchend.init dragenter.init focus.init", function r(e) {
  5423. if ("touchend" === e.type && !this.$el.data("touched")) return !0;
  5424. if (1 === e.which || !e.which) {
  5425. this.$el.off("mousedown.init touchstart.init touchmove.init touchend.init dragenter.init focus.init"), this.load(T.MODULES), this.load(T.PLUGINS);
  5426. var t = e.originalEvent && e.originalEvent.originalTarget;
  5427. if (t && "IMG" === t.tagName && g(t).trigger("mousedown"), "undefined" == typeof this.ul && this.destroy(), "touchend" === e.type && this.image && e.originalEvent && e.originalEvent.target && g(e.originalEvent.target).is("img")) {
  5428. var n = this;
  5429. setTimeout(function() {
  5430. n.image.edit(g(e.originalEvent.target))
  5431. }, 100)
  5432. }
  5433. this.ready = !0, this.events.trigger("initialized")
  5434. }
  5435. }.bind(this)), this.events.trigger("initializationDelayed")) : (this.load(T.MODULES), this.load(T.PLUGINS), g(this.o_win).scrollTop(this.c_scroll), "undefined" == typeof this.ul && this.destroy(), this.ready = !0, this.events.trigger("initialized"))
  5436. }
  5437. if (T.Bootstrap = function(e, t, n) {
  5438. this.id = ++T.ID, this.$ = g;
  5439. var r = {};
  5440. "function" == typeof t && (n = t, t = {}), n && (t.events || (t.events = {}), t.events.initialized = n), t && t.documentReady && (r.toolbarButtons = [
  5441. ["fullscreen", "undo", "redo", "getPDF", "print"],
  5442. ["bold", "italic", "underline", "textColor", "backgroundColor", "clearFormatting"],
  5443. ["alignLeft", "alignCenter", "alignRight", "alignJustify"],
  5444. ["formatOL", "formatUL", "indent", "outdent"],
  5445. ["paragraphFormat"],
  5446. ["fontFamily"],
  5447. ["fontSize"],
  5448. ["insertLink", "insertImage", "quote"]
  5449. ], r.paragraphFormatSelection = !0, r.fontFamilySelection = !0, r.fontSizeSelection = !0, r.placeholderText = "", r.quickInsertEnabled = !1, r.charCounterCount = !1), this.opts = Object.assign({}, Object.assign({}, T.DEFAULTS, r, "object" === Fe(t) && t));
  5450. var a = JSON.stringify(this.opts);
  5451. T.OPTS_MAPPING[a] = T.OPTS_MAPPING[a] || this.id, this.sid = T.OPTS_MAPPING[a], T.SHARED[this.sid] = T.SHARED[this.sid] || {}, this.shared = T.SHARED[this.sid], this.shared.count = (this.shared.count || 0) + 1, this.$oel = g(e), this.$oel.data("froala.editor", this), this.o_doc = e.ownerDocument, this.o_win = "defaultView" in this.o_doc ? this.o_doc.defaultView : this.o_doc.parentWindow, this.c_scroll = g(this.o_win).scrollTop(), this._init()
  5452. }, T.Bootstrap.prototype._init = function() {
  5453. var e = this.$oel.get(0).tagName;
  5454. this.$oel.closest("label").length;
  5455. var t = function() {
  5456. "TEXTAREA" !== e && (this._original_html = this._original_html || this.$oel.html()), this.$box = this.$box || this.$oel, this.opts.fullPage && (this.opts.iframe = !0), this.opts.iframe ? (this.$iframe = g('<iframe src="about:blank" frameBorder="0">'), this.$wp = g("<div></div>"), this.$box.html(this.$wp), this.$wp.append(this.$iframe), this.$iframe.get(0).contentWindow.document.open(), this.$iframe.get(0).contentWindow.document.write("<!DOCTYPE html>"), this.$iframe.get(0).contentWindow.document.write("<html><head></head><body></body></html>"), this.$iframe.get(0).contentWindow.document.close(), this.iframe_document = this.$iframe.get(0).contentWindow.document, this.$el = g(this.iframe_document.querySelector("body")), this.el = this.$el.get(0), this.$head = g(this.iframe_document.querySelector("head")), this.$html = g(this.iframe_document.querySelector("html"))) : (this.$el = g(this.o_doc.createElement("DIV")), this.el = this.$el.get(0), this.$wp = g(this.o_doc.createElement("DIV")).append(this.$el), this.$box.html(this.$wp)), setTimeout(A.bind(this), 0)
  5457. }.bind(this),
  5458. n = function() {
  5459. this.$box = g("<div>"), this.$oel.before(this.$box).hide(), this._original_html = this.$oel.val();
  5460. var e = this;
  5461. this.$oel.parents("form").on("submit.".concat(this.id), function() {
  5462. e.events.trigger("form.submit")
  5463. }), this.$oel.parents("form").on("reset.".concat(this.id), function() {
  5464. e.events.trigger("form.reset")
  5465. }), t()
  5466. }.bind(this),
  5467. r = function() {
  5468. this.$el = this.$oel, this.el = this.$el.get(0), this.$el.attr("contenteditable", !0).css("outline", "none").css("display", "inline-block"), this.opts.multiLine = !1, this.opts.toolbarInline = !1, setTimeout(A.bind(this), 0)
  5469. }.bind(this),
  5470. a = function() {
  5471. this.$el = this.$oel, this.el = this.$el.get(0), this.opts.toolbarInline = !1, setTimeout(A.bind(this), 0)
  5472. }.bind(this),
  5473. o = function() {
  5474. this.$el = this.$oel, this.el = this.$el.get(0), this.opts.toolbarInline = !1, this.$oel.on("click.popup", function(e) {
  5475. e.preventDefault()
  5476. }), setTimeout(A.bind(this), 0)
  5477. }.bind(this);
  5478. this.opts.editInPopup ? o() : "TEXTAREA" === e ? n() : "A" === e ? r() : "IMG" === e ? a() : "BUTTON" === e || "INPUT" === e ? (this.opts.editInPopup = !0, this.opts.toolbarInline = !1, o()) : t()
  5479. }, T.Bootstrap.prototype.load = function(e) {
  5480. for (var t in e)
  5481. if (Object.prototype.hasOwnProperty.call(e, t)) {
  5482. if (this[t]) continue;
  5483. if (T.PLUGINS[t] && this.opts.pluginsEnabled.indexOf(t) < 0) continue;
  5484. if (this[t] = new e[t](this), this[t]._init && (this[t]._init(), this.opts.initOnClick && "core" === t)) return !1
  5485. }
  5486. }, T.Bootstrap.prototype.destroy = function() {
  5487. this.destrying = !0, this.shared.count--, this.events.$off();
  5488. var e = this.html.get();
  5489. if (this.opts.iframe && (this.events.disableBlur(), this.win.focus(), this.events.enableBlur()), this.events.trigger("destroy", [], !0), this.events.trigger("shared.destroy", [], !0), 0 === this.shared.count) {
  5490. for (var t in this.shared) Object.prototype.hasOwnProperty.call(this.shared, t) && (this.shared[t] = null, T.SHARED[this.sid][t] = null);
  5491. delete T.SHARED[this.sid]
  5492. }
  5493. this.$oel.parents("form").off(".".concat(this.id)), this.$oel.off("click.popup"), this.$oel.removeData("froala.editor"), this.$oel.off("froalaEditor"), this.core.destroy(e), T.INSTANCES.splice(T.INSTANCES.indexOf(this), 1)
  5494. }, $e.PLUGINS.align = function(a) {
  5495. var o = a.$;
  5496. return {
  5497. apply: function i(e) {
  5498. var t = a.selection.element();
  5499. if (o(t).parents(".fr-img-caption").length) o(t).css("text-align", e);
  5500. else {
  5501. a.selection.save(), a.html.wrap(!0, !0, !0, !0), a.selection.restore();
  5502. for (var n = a.selection.blocks(), r = 0; r < n.length; r++) o(n[r]).css("text-align", e).removeClass("fr-temp-div"), "" === o(n[r]).attr("class") && o(n[r]).removeAttr("class"), "" === o(n[r]).attr("style") && o(n[r]).removeAttr("style");
  5503. a.selection.save(), a.html.unwrap(), a.selection.restore()
  5504. }
  5505. },
  5506. refresh: function r(e) {
  5507. var t = a.selection.blocks();
  5508. if (t.length) {
  5509. var n = a.helpers.getAlignment(o(t[0]));
  5510. e.find("> *").first().replaceWith(a.icon.create("align-" + n))
  5511. }
  5512. },
  5513. refreshOnShow: function s(e, t) {
  5514. var n = a.selection.blocks();
  5515. if (n.length) {
  5516. var r = a.helpers.getAlignment(o(n[0]));
  5517. t.find('a.fr-command[data-param1="' + r + '"]').addClass("fr-active").attr("aria-selected", !0)
  5518. }
  5519. },
  5520. refreshForToolbar: function l(e) {
  5521. var t = a.selection.blocks();
  5522. if (t.length) {
  5523. var n = a.helpers.getAlignment(o(t[0]));
  5524. "align" + (n = n.charAt(0).toUpperCase() + n.slice(1)) === e.attr("data-cmd") && e.addClass("fr-active")
  5525. }
  5526. }
  5527. }
  5528. }, $e.DefineIcon("align", {
  5529. NAME: "align-left",
  5530. SVG_KEY: "alignLeft"
  5531. }), $e.DefineIcon("align-left", {
  5532. NAME: "align-left",
  5533. SVG_KEY: "alignLeft"
  5534. }), $e.DefineIcon("align-right", {
  5535. NAME: "align-right",
  5536. SVG_KEY: "alignRight"
  5537. }), $e.DefineIcon("align-center", {
  5538. NAME: "align-center",
  5539. SVG_KEY: "alignCenter"
  5540. }), $e.DefineIcon("align-justify", {
  5541. NAME: "align-justify",
  5542. SVG_KEY: "alignJustify"
  5543. }), $e.RegisterCommand("align", {
  5544. type: "dropdown",
  5545. title: "Align",
  5546. options: {
  5547. left: "Align Left",
  5548. center: "Align Center",
  5549. right: "Align Right",
  5550. justify: "Align Justify"
  5551. },
  5552. html: function() {
  5553. var e = '<ul class="fr-dropdown-list" role="presentation">',
  5554. t = $e.COMMANDS.align.options;
  5555. for (var n in t) t.hasOwnProperty(n) && (e += '<li role="presentation"><a class="fr-command fr-title" tabIndex="-1" role="option" data-cmd="align" data-param1="' + n + '" title="' + this.language.translate(t[n]) + '">' + this.icon.create("align-" + n) + '<span class="fr-sr-only">' + this.language.translate(t[n]) + "</span></a></li>");
  5556. return e += "</ul>"
  5557. },
  5558. callback: function(e, t) {
  5559. this.align.apply(t)
  5560. },
  5561. refresh: function(e) {
  5562. this.align.refresh(e)
  5563. },
  5564. refreshOnShow: function(e, t) {
  5565. this.align.refreshOnShow(e, t)
  5566. },
  5567. plugin: "align"
  5568. }), $e.RegisterCommand("alignLeft", {
  5569. type: "button",
  5570. icon: "align-left",
  5571. title: "Align Left",
  5572. callback: function() {
  5573. this.align.apply("left")
  5574. },
  5575. refresh: function(e) {
  5576. this.align.refreshForToolbar(e)
  5577. },
  5578. plugin: "align"
  5579. }), $e.RegisterCommand("alignRight", {
  5580. type: "button",
  5581. icon: "align-right",
  5582. title: "Align Right",
  5583. callback: function() {
  5584. this.align.apply("right")
  5585. },
  5586. refresh: function(e) {
  5587. this.align.refreshForToolbar(e)
  5588. },
  5589. plugin: "align"
  5590. }), $e.RegisterCommand("alignCenter", {
  5591. type: "button",
  5592. icon: "align-center",
  5593. title: "Align Center",
  5594. callback: function() {
  5595. this.align.apply("center")
  5596. },
  5597. refresh: function(e) {
  5598. this.align.refreshForToolbar(e)
  5599. },
  5600. plugin: "align"
  5601. }), $e.RegisterCommand("alignJustify", {
  5602. type: "button",
  5603. icon: "align-justify",
  5604. title: "Align Justify",
  5605. callback: function() {
  5606. this.align.apply("justify")
  5607. },
  5608. refresh: function(e) {
  5609. this.align.refreshForToolbar(e)
  5610. },
  5611. plugin: "align"
  5612. }), Object.assign($e.DEFAULTS, {
  5613. charCounterMax: -1,
  5614. charCounterCount: !0
  5615. }), $e.PLUGINS.charCounter = function(n) {
  5616. var r, t = n.$;
  5617. function a() {
  5618. return (n.el.textContent || "").replace(/\u200B/g, "").length
  5619. }
  5620. function e(e) {
  5621. if (n.opts.charCounterMax < 0) return !0;
  5622. if (a() < n.opts.charCounterMax) return !0;
  5623. var t = e.which;
  5624. return !(!n.keys.ctrlKey(e) && n.keys.isCharacter(t) || t === $e.KEYCODE.IME) || (e.preventDefault(), e.stopPropagation(), n.events.trigger("charCounter.exceeded"), !1)
  5625. }
  5626. function o(e) {
  5627. return n.opts.charCounterMax < 0 ? e : t("<div>").html(e).text().length + a() <= n.opts.charCounterMax ? e : (n.events.trigger("charCounter.exceeded"), "")
  5628. }
  5629. function i() {
  5630. if (n.opts.charCounterCount) {
  5631. var e = a() + (0 < n.opts.charCounterMax ? "/" + n.opts.charCounterMax : "");
  5632. r.text("".concat(n.language.translate("Characters"), " : ").concat(e)), n.opts.toolbarBottom && r.css("margin-bottom", n.$tb.outerHeight(!0));
  5633. var t = n.$wp.get(0).offsetWidth - n.$wp.get(0).clientWidth;
  5634. 0 <= t && ("rtl" == n.opts.direction ? r.css("margin-left", t) : r.css("margin-right", t))
  5635. }
  5636. }
  5637. return {
  5638. _init: function s() {
  5639. return !!n.$wp && !!n.opts.charCounterCount && ((r = t(document.createElement("span")).attr("class", "fr-counter")).css("bottom", n.$wp.css("border-bottom-width")), n.$second_tb && n.$second_tb.append(r), n.events.on("keydown", e, !0), n.events.on("paste.afterCleanup", o), n.events.on("keyup contentChanged input", function() {
  5640. n.events.trigger("charCounter.update")
  5641. }), n.events.on("charCounter.update", i), n.events.trigger("charCounter.update"), void n.events.on("destroy", function() {
  5642. t(n.o_win).off("resize.char" + n.id), r.removeData().remove(), r = null
  5643. }))
  5644. },
  5645. count: a
  5646. }
  5647. }, $e.PLUGINS.codeBeautifier = function() {
  5648. var e, t, n, r, j = {};
  5649. function O(r, e) {
  5650. var t = {
  5651. "@page": !0,
  5652. "@font-face": !0,
  5653. "@keyframes": !0,
  5654. "@media": !0,
  5655. "@supports": !0,
  5656. "@document": !0
  5657. },
  5658. n = {
  5659. "@media": !0,
  5660. "@supports": !0,
  5661. "@document": !0
  5662. };
  5663. e = e || {}, r = (r = r || "").replace(/\r\n|[\r\u2028\u2029]/g, "\n");
  5664. var a = e.indent_size || 4,
  5665. o = e.indent_char || " ",
  5666. i = e.selector_separator_newline === undefined || e.selector_separator_newline,
  5667. s = e.end_with_newline !== undefined && e.end_with_newline,
  5668. l = e.newline_between_rules === undefined || e.newline_between_rules,
  5669. c = e.eol ? e.eol : "\n";
  5670. "string" == typeof a && (a = parseInt(a, 10)), e.indent_with_tabs && (o = "\t", a = 1), c = c.replace(/\\r/, "\r").replace(/\\n/, "\n");
  5671. var d, f = /^\s+$/,
  5672. p = -1,
  5673. u = 0;
  5674. function h() {
  5675. return (d = r.charAt(++p)) || ""
  5676. }
  5677. function g(e) {
  5678. var t, n = p;
  5679. return e && v(), t = r.charAt(p + 1) || "", p = n - 1, h(), t
  5680. }
  5681. function m(e) {
  5682. for (var t = p; h();)
  5683. if ("\\" === d) h();
  5684. else {
  5685. if (-1 !== e.indexOf(d)) break;
  5686. if ("\n" === d) break
  5687. }
  5688. return r.substring(t, p + 1)
  5689. }
  5690. function v() {
  5691. for (var e = ""; f.test(g());) h(), e += d;
  5692. return e
  5693. }
  5694. function b() {
  5695. var e = "";
  5696. for (d && f.test(d) && (e = d); f.test(h());) e += d;
  5697. return e
  5698. }
  5699. function E(e) {
  5700. var t = p;
  5701. for (e = "/" === g(), h(); h();) {
  5702. if (!e && "*" === d && "/" === g()) {
  5703. h();
  5704. break
  5705. }
  5706. if (e && "\n" === d) return r.substring(t, p)
  5707. }
  5708. return r.substring(t, p) + d
  5709. }
  5710. function T(e) {
  5711. return r.substring(p - e.length, p).toLowerCase() === e
  5712. }
  5713. function A() {
  5714. for (var e = 0, t = p + 1; t < r.length; t++) {
  5715. var n = r.charAt(t);
  5716. if ("{" === n) return !0;
  5717. if ("(" === n) e += 1;
  5718. else if (")" === n) {
  5719. if (0 === e) return !1;
  5720. e -= 1
  5721. } else if (" " === n || "}" === n) return !1
  5722. }
  5723. return !1
  5724. }
  5725. var C = r.match(/^[\t ]*/)[0],
  5726. S = new Array(a + 1).join(o),
  5727. y = 0,
  5728. R = 0;
  5729. for (var L, w, _ = {
  5730. "{": function(e) {
  5731. _.singleSpace(), O.push(e), _.newLine()
  5732. },
  5733. "}": function(e) {
  5734. _.newLine(), O.push(e), _.newLine()
  5735. },
  5736. _lastCharWhitespace: function() {
  5737. return f.test(O[O.length - 1])
  5738. },
  5739. newLine: function(e) {
  5740. O.length && (e || "\n" === O[O.length - 1] || _.trim(), O.push("\n"), C && O.push(C))
  5741. },
  5742. singleSpace: function() {
  5743. O.length && !_._lastCharWhitespace() && O.push(" ")
  5744. },
  5745. preserveSingleSpace: function() {
  5746. isAfterSpace && _.singleSpace()
  5747. },
  5748. trim: function() {
  5749. for (; _._lastCharWhitespace();) O.pop()
  5750. }
  5751. }, O = [], N = !1, x = !1, I = !1, k = "", M = "";;) {
  5752. var D = -1 !== b().indexOf("\n");
  5753. if (M = k, !(k = d)) break;
  5754. if ("/" === d && "*" === g()) {
  5755. var B = 0 === y;
  5756. (D || B) && _.newLine(), O.push(E()), _.newLine(), B && _.newLine(!0)
  5757. } else if ("/" === d && "/" === g()) D || "{" === M || _.trim(), _.singleSpace(), O.push(E()), _.newLine();
  5758. else if ("@" === d) {
  5759. _.preserveSingleSpace(), O.push(d);
  5760. var F = (void 0, L = p, w = m(": , {}()[]/='\""), p = L - 1, h(), w);
  5761. F.match(/[ :]$/) && (h(), F = m(": ").replace(/\s$/, ""), O.push(F), _.singleSpace()), (F = F.replace(/\s$/, "")) in t && (R += 1, F in n && (I = !0))
  5762. } else "#" === d && "{" === g() ? (_.preserveSingleSpace(), O.push(m("}"))) : "{" === d ? "}" === g(!0) ? (v(), h(), _.singleSpace(), O.push("{}"), _.newLine(), l && 0 === y && _.newLine(!0)) : (y++, C += S, _["{"](d), N = I ? (I = !1, R < y) : R <= y) : "}" === d ? (y--, C = C.slice(0, -a), _["}"](d), x = N = !1, R && R--, l && 0 === y && _.newLine(!0)) : ":" === d ? (v(), !N && !I || T("&") || A() ? ":" === g() ? (h(), O.push("::")) : O.push(":") : (x = !0, O.push(":"), _.singleSpace())) : '"' === d || "'" === d ? (_.preserveSingleSpace(), O.push(m(d))) : " " === d ? (x = !1, O.push(d), _.newLine()) : "(" === d ? T("url") ? (O.push(d), v(), h() && (")" !== d && '"' !== d && "'" !== d ? O.push(m(")")) : p--)) : (u++, _.preserveSingleSpace(), O.push(d), v()) : ")" === d ? (O.push(d), u--) : "," === d ? (O.push(d), v(), i && !x && u < 1 ? _.newLine() : _.singleSpace()) : ("]" === d || ("[" === d ? _.preserveSingleSpace() : "=" === d ? (v(), d = "=") : _.preserveSingleSpace()), O.push(d))
  5763. }
  5764. var $ = "";
  5765. return C && ($ += C), $ += O.join("").replace(/[\r\n\t ]+$/, ""), s && ($ += "\n"), "\n" != c && ($ = $.replace(/[\n]/g, c)), $
  5766. }
  5767. function q(e, t) {
  5768. for (var n = 0; n < t.length; n += 1)
  5769. if (t[n] === e) return !0;
  5770. return !1
  5771. }
  5772. function X(e) {
  5773. return e.replace(/^\s+|\s+$/g, "")
  5774. }
  5775. function N(e, t) {
  5776. return new a(e, t).beautify()
  5777. }
  5778. e = j, t = "\xaa\xb5\xba\xc0-\xd6\xd8-\xf6\xf8-\u02c1\u02c6-\u02d1\u02e0-\u02e4\u02ec\u02ee\u0370-\u0374\u0376\u0377\u037a-\u037d\u0386\u0388-\u038a\u038c\u038e-\u03a1\u03a3-\u03f5\u03f7-\u0481\u048a-\u0527\u0531-\u0556\u0559\u0561-\u0587\u05d0-\u05ea\u05f0-\u05f2\u0620-\u064a\u066e\u066f\u0671-\u06d3\u06d5\u06e5\u06e6\u06ee\u06ef\u06fa-\u06fc\u06ff\u0710\u0712-\u072f\u074d-\u07a5\u07b1\u07ca-\u07ea\u07f4\u07f5\u07fa\u0800-\u0815\u081a\u0824\u0828\u0840-\u0858\u08a0\u08a2-\u08ac\u0904-\u0939\u093d\u0950\u0958-\u0961\u0971-\u0977\u0979-\u097f\u0985-\u098c\u098f\u0990\u0993-\u09a8\u09aa-\u09b0\u09b2\u09b6-\u09b9\u09bd\u09ce\u09dc\u09dd\u09df-\u09e1\u09f0\u09f1\u0a05-\u0a0a\u0a0f\u0a10\u0a13-\u0a28\u0a2a-\u0a30\u0a32\u0a33\u0a35\u0a36\u0a38\u0a39\u0a59-\u0a5c\u0a5e\u0a72-\u0a74\u0a85-\u0a8d\u0a8f-\u0a91\u0a93-\u0aa8\u0aaa-\u0ab0\u0ab2\u0ab3\u0ab5-\u0ab9\u0abd\u0ad0\u0ae0\u0ae1\u0b05-\u0b0c\u0b0f\u0b10\u0b13-\u0b28\u0b2a-\u0b30\u0b32\u0b33\u0b35-\u0b39\u0b3d\u0b5c\u0b5d\u0b5f-\u0b61\u0b71\u0b83\u0b85-\u0b8a\u0b8e-\u0b90\u0b92-\u0b95\u0b99\u0b9a\u0b9c\u0b9e\u0b9f\u0ba3\u0ba4\u0ba8-\u0baa\u0bae-\u0bb9\u0bd0\u0c05-\u0c0c\u0c0e-\u0c10\u0c12-\u0c28\u0c2a-\u0c33\u0c35-\u0c39\u0c3d\u0c58\u0c59\u0c60\u0c61\u0c85-\u0c8c\u0c8e-\u0c90\u0c92-\u0ca8\u0caa-\u0cb3\u0cb5-\u0cb9\u0cbd\u0cde\u0ce0\u0ce1\u0cf1\u0cf2\u0d05-\u0d0c\u0d0e-\u0d10\u0d12-\u0d3a\u0d3d\u0d4e\u0d60\u0d61\u0d7a-\u0d7f\u0d85-\u0d96\u0d9a-\u0db1\u0db3-\u0dbb\u0dbd\u0dc0-\u0dc6\u0e01-\u0e30\u0e32\u0e33\u0e40-\u0e46\u0e81\u0e82\u0e84\u0e87\u0e88\u0e8a\u0e8d\u0e94-\u0e97\u0e99-\u0e9f\u0ea1-\u0ea3\u0ea5\u0ea7\u0eaa\u0eab\u0ead-\u0eb0\u0eb2\u0eb3\u0ebd\u0ec0-\u0ec4\u0ec6\u0edc-\u0edf\u0f00\u0f40-\u0f47\u0f49-\u0f6c\u0f88-\u0f8c\u1000-\u102a\u103f\u1050-\u1055\u105a-\u105d\u1061\u1065\u1066\u106e-\u1070\u1075-\u1081\u108e\u10a0-\u10c5\u10c7\u10cd\u10d0-\u10fa\u10fc-\u1248\u124a-\u124d\u1250-\u1256\u1258\u125a-\u125d\u1260-\u1288\u128a-\u128d\u1290-\u12b0\u12b2-\u12b5\u12b8-\u12be\u12c0\u12c2-\u12c5\u12c8-\u12d6\u12d8-\u1310\u1312-\u1315\u1318-\u135a\u1380-\u138f\u13a0-\u13f4\u1401-\u166c\u166f-\u167f\u1681-\u169a\u16a0-\u16ea\u16ee-\u16f0\u1700-\u170c\u170e-\u1711\u1720-\u1731\u1740-\u1751\u1760-\u176c\u176e-\u1770\u1780-\u17b3\u17d7\u17dc\u1820-\u1877\u1880-\u18a8\u18aa\u18b0-\u18f5\u1900-\u191c\u1950-\u196d\u1970-\u1974\u1980-\u19ab\u19c1-\u19c7\u1a00-\u1a16\u1a20-\u1a54\u1aa7\u1b05-\u1b33\u1b45-\u1b4b\u1b83-\u1ba0\u1bae\u1baf\u1bba-\u1be5\u1c00-\u1c23\u1c4d-\u1c4f\u1c5a-\u1c7d\u1ce9-\u1cec\u1cee-\u1cf1\u1cf5\u1cf6\u1d00-\u1dbf\u1e00-\u1f15\u1f18-\u1f1d\u1f20-\u1f45\u1f48-\u1f4d\u1f50-\u1f57\u1f59\u1f5b\u1f5d\u1f5f-\u1f7d\u1f80-\u1fb4\u1fb6-\u1fbc\u1fbe\u1fc2-\u1fc4\u1fc6-\u1fcc\u1fd0-\u1fd3\u1fd6-\u1fdb\u1fe0-\u1fec\u1ff2-\u1ff4\u1ff6-\u1ffc\u2071\u207f\u2090-\u209c\u2102\u2107\u210a-\u2113\u2115\u2119-\u211d\u2124\u2126\u2128\u212a-\u212d\u212f-\u2139\u213c-\u213f\u2145-\u2149\u214e\u2160-\u2188\u2c00-\u2c2e\u2c30-\u2c5e\u2c60-\u2ce4\u2ceb-\u2cee\u2cf2\u2cf3\u2d00-\u2d25\u2d27\u2d2d\u2d30-\u2d67\u2d6f\u2d80-\u2d96\u2da0-\u2da6\u2da8-\u2dae\u2db0-\u2db6\u2db8-\u2dbe\u2dc0-\u2dc6\u2dc8-\u2dce\u2dd0-\u2dd6\u2dd8-\u2dde\u2e2f\u3005-\u3007\u3021-\u3029\u3031-\u3035\u3038-\u303c\u3041-\u3096\u309d-\u309f\u30a1-\u30fa\u30fc-\u30ff\u3105-\u312d\u3131-\u318e\u31a0-\u31ba\u31f0-\u31ff\u3400-\u4db5\u4e00-\u9fcc\ua000-\ua48c\ua4d0-\ua4fd\ua500-\ua60c\ua610-\ua61f\ua62a\ua62b\ua640-\ua66e\ua67f-\ua697\ua6a0-\ua6ef\ua717-\ua71f\ua722-\ua788\ua78b-\ua78e\ua790-\ua793\ua7a0-\ua7aa\ua7f8-\ua801\ua803-\ua805\ua807-\ua80a\ua80c-\ua822\ua840-\ua873\ua882-\ua8b3\ua8f2-\ua8f7\ua8fb\ua90a-\ua925\ua930-\ua946\ua960-\ua97c\ua984-\ua9b2\ua9cf\uaa00-\uaa28\uaa40-\uaa42\uaa44-\uaa4b\uaa60-\uaa76\uaa7a\uaa80-\uaaaf\uaab1\uaab5\uaab6\uaab9-\uaabd\uaac0\uaac2\uaadb-\uaadd\uaae0-\uaaea\uaaf2-\uaaf4\uab01-\uab06\uab09-\uab0e\uab11-\uab16\uab20-\uab26\uab28-\uab2e\uabc0-\uabe2\uac00-\ud7a3\ud7b0-\ud7c6\ud7cb-\ud7fb\uf900-\ufa6d\ufa70-\ufad9\ufb00-\ufb06\ufb13-\ufb17\ufb1d\ufb1f-\ufb28\ufb2a-\ufb36\ufb38-\ufb3c\ufb3e\ufb40\ufb41\ufb43\ufb44\ufb46-\ufbb1\ufbd3-\ufd3d\ufd50-\ufd8f\ufd92-\ufdc7\ufdf0-\ufdfb\ufe70-\ufe74\ufe76-\ufefc\uff21-\uff3a\uff41-\uff5a\uff66-\uffbe\uffc2-\uffc7\uffca-\uffcf\uffd2-\uffd7\uffda-\uffdc", n = new RegExp("[" + t + "]"), r = new RegExp("[" + t + "\u0300-\u036f\u0483-\u0487\u0591-\u05bd\u05bf\u05c1\u05c2\u05c4\u05c5\u05c7\u0610-\u061a\u0620-\u0649\u0672-\u06d3\u06e7-\u06e8\u06fb-\u06fc\u0730-\u074a\u0800-\u0814\u081b-\u0823\u0825-\u0827\u0829-\u082d\u0840-\u0857\u08e4-\u08fe\u0900-\u0903\u093a-\u093c\u093e-\u094f\u0951-\u0957\u0962-\u0963\u0966-\u096f\u0981-\u0983\u09bc\u09be-\u09c4\u09c7\u09c8\u09d7\u09df-\u09e0\u0a01-\u0a03\u0a3c\u0a3e-\u0a42\u0a47\u0a48\u0a4b-\u0a4d\u0a51\u0a66-\u0a71\u0a75\u0a81-\u0a83\u0abc\u0abe-\u0ac5\u0ac7-\u0ac9\u0acb-\u0acd\u0ae2-\u0ae3\u0ae6-\u0aef\u0b01-\u0b03\u0b3c\u0b3e-\u0b44\u0b47\u0b48\u0b4b-\u0b4d\u0b56\u0b57\u0b5f-\u0b60\u0b66-\u0b6f\u0b82\u0bbe-\u0bc2\u0bc6-\u0bc8\u0bca-\u0bcd\u0bd7\u0be6-\u0bef\u0c01-\u0c03\u0c46-\u0c48\u0c4a-\u0c4d\u0c55\u0c56\u0c62-\u0c63\u0c66-\u0c6f\u0c82\u0c83\u0cbc\u0cbe-\u0cc4\u0cc6-\u0cc8\u0cca-\u0ccd\u0cd5\u0cd6\u0ce2-\u0ce3\u0ce6-\u0cef\u0d02\u0d03\u0d46-\u0d48\u0d57\u0d62-\u0d63\u0d66-\u0d6f\u0d82\u0d83\u0dca\u0dcf-\u0dd4\u0dd6\u0dd8-\u0ddf\u0df2\u0df3\u0e34-\u0e3a\u0e40-\u0e45\u0e50-\u0e59\u0eb4-\u0eb9\u0ec8-\u0ecd\u0ed0-\u0ed9\u0f18\u0f19\u0f20-\u0f29\u0f35\u0f37\u0f39\u0f41-\u0f47\u0f71-\u0f84\u0f86-\u0f87\u0f8d-\u0f97\u0f99-\u0fbc\u0fc6\u1000-\u1029\u1040-\u1049\u1067-\u106d\u1071-\u1074\u1082-\u108d\u108f-\u109d\u135d-\u135f\u170e-\u1710\u1720-\u1730\u1740-\u1750\u1772\u1773\u1780-\u17b2\u17dd\u17e0-\u17e9\u180b-\u180d\u1810-\u1819\u1920-\u192b\u1930-\u193b\u1951-\u196d\u19b0-\u19c0\u19c8-\u19c9\u19d0-\u19d9\u1a00-\u1a15\u1a20-\u1a53\u1a60-\u1a7c\u1a7f-\u1a89\u1a90-\u1a99\u1b46-\u1b4b\u1b50-\u1b59\u1b6b-\u1b73\u1bb0-\u1bb9\u1be6-\u1bf3\u1c00-\u1c22\u1c40-\u1c49\u1c5b-\u1c7d\u1cd0-\u1cd2\u1d00-\u1dbe\u1e01-\u1f15\u200c\u200d\u203f\u2040\u2054\u20d0-\u20dc\u20e1\u20e5-\u20f0\u2d81-\u2d96\u2de0-\u2dff\u3021-\u3028\u3099\u309a\ua640-\ua66d\ua674-\ua67d\ua69f\ua6f0-\ua6f1\ua7f8-\ua800\ua806\ua80b\ua823-\ua827\ua880-\ua881\ua8b4-\ua8c4\ua8d0-\ua8d9\ua8f3-\ua8f7\ua900-\ua909\ua926-\ua92d\ua930-\ua945\ua980-\ua983\ua9b3-\ua9c0\uaa00-\uaa27\uaa40-\uaa41\uaa4c-\uaa4d\uaa50-\uaa59\uaa7b\uaae0-\uaae9\uaaf2-\uaaf3\uabc0-\uabe1\uabec\uabed\uabf0-\uabf9\ufb20-\ufb28\ufe00-\ufe0f\ufe20-\ufe26\ufe33\ufe34\ufe4d-\ufe4f\uff10-\uff19\uff3f]"), e.newline = /[\n\r\u2028\u2029]/, e.lineBreak = new RegExp("\r\n|" + e.newline.source), e.allLineBreaks = new RegExp(e.lineBreak.source, "g"), e.isIdentifierStart = function(e) {
  5779. return e < 65 ? 36 === e || 64 === e : e < 91 || (e < 97 ? 95 === e : e < 123 || 170 <= e && n.test(String.fromCharCode(e)))
  5780. }, e.isIdentifierChar = function(e) {
  5781. return e < 48 ? 36 === e : e < 58 || !(e < 65) && (e < 91 || (e < 97 ? 95 === e : e < 123 || 170 <= e && r.test(String.fromCharCode(e))))
  5782. };
  5783. var Z = {
  5784. BlockStatement: "BlockStatement",
  5785. Statement: "Statement",
  5786. ObjectLiteral: "ObjectLiteral",
  5787. ArrayLiteral: "ArrayLiteral",
  5788. ForInitializer: "ForInitializer",
  5789. Conditional: "Conditional",
  5790. Expression: "Expression"
  5791. };
  5792. function a(r, e) {
  5793. var c, a, o, d, i, s, l, f, p, t, n, u, h, g = [],
  5794. m = "";
  5795. function v(e, t) {
  5796. var n = 0;
  5797. return e && (n = e.indentation_level, !c.just_added_newline() && e.line_indent_level > n && (n = e.line_indent_level)), {
  5798. mode: t,
  5799. parent: e,
  5800. last_text: e ? e.last_text : "",
  5801. last_word: e ? e.last_word : "",
  5802. declaration_statement: !1,
  5803. declaration_assignment: !1,
  5804. multiline_frame: !1,
  5805. if_block: !1,
  5806. else_block: !1,
  5807. do_block: !1,
  5808. do_while: !1,
  5809. in_case_statement: !1,
  5810. in_case: !1,
  5811. case_body: !1,
  5812. indentation_level: n,
  5813. line_indent_level: e ? e.line_indent_level : n,
  5814. start_line_index: c.get_line_number(),
  5815. ternary_depth: 0
  5816. }
  5817. }
  5818. for (u = {
  5819. TK_START_EXPR: function M() {
  5820. N();
  5821. var e = Z.Expression;
  5822. if ("[" === d.text) {
  5823. if ("TK_WORD" === i || ")" === f.last_text) return "TK_RESERVED" === i && q(f.last_text, o.line_starters) && (c.space_before_token = !0), R(e), S(), y(), void(h.space_in_paren && (c.space_before_token = !0));
  5824. e = Z.ArrayLiteral, L(f.mode) && ("[" !== f.last_text && ("," !== f.last_text || "]" !== s && "}" !== s) || h.keep_array_indentation || A())
  5825. } else "TK_RESERVED" === i && "for" === f.last_text ? e = Z.ForInitializer : "TK_RESERVED" === i && q(f.last_text, ["if", "while"]) && (e = Z.Conditional);
  5826. " " === f.last_text || "TK_START_BLOCK" === i ? A() : "TK_END_EXPR" === i || "TK_START_EXPR" === i || "TK_END_BLOCK" === i || "." === f.last_text ? T(d.wanted_newline) : "TK_RESERVED" === i && "(" === d.text || "TK_WORD" === i || "TK_OPERATOR" === i ? "TK_RESERVED" === i && ("function" === f.last_word || "typeof" === f.last_word) || "*" === f.last_text && "function" === s ? h.space_after_anon_function && (c.space_before_token = !0) : "TK_RESERVED" !== i || !q(f.last_text, o.line_starters) && "catch" !== f.last_text || h.space_before_conditional && (c.space_before_token = !0) : c.space_before_token = !0;
  5827. "(" === d.text && "TK_RESERVED" === i && "await" === f.last_word && (c.space_before_token = !0);
  5828. "(" === d.text && ("TK_EQUALS" !== i && "TK_OPERATOR" !== i || O() || T());
  5829. R(e), S(), h.space_in_paren && (c.space_before_token = !0);
  5830. y()
  5831. },
  5832. TK_END_EXPR: function D() {
  5833. for (; f.mode === Z.Statement;) _();
  5834. f.multiline_frame && T("]" === d.text && L(f.mode) && !h.keep_array_indentation);
  5835. h.space_in_paren && ("TK_START_EXPR" !== i || h.space_in_empty_paren ? c.space_before_token = !0 : (c.trim(), c.space_before_token = !1));
  5836. "]" === d.text && h.keep_array_indentation ? (S(), _()) : (_(), S());
  5837. c.remove_redundant_indentation(p), f.do_while && p.mode === Z.Conditional && (p.mode = Z.Expression, f.do_block = !1, f.do_while = !1)
  5838. },
  5839. TK_START_BLOCK: function B() {
  5840. var e = I(1),
  5841. t = I(2);
  5842. t && (":" === t.text && q(e.type, ["TK_STRING", "TK_WORD", "TK_RESERVED"]) || q(e.text, ["get", "set"]) && q(t.type, ["TK_WORD", "TK_RESERVED"])) ? q(s, ["class", "interface"]) ? R(Z.BlockStatement) : R(Z.ObjectLiteral) : R(Z.BlockStatement);
  5843. var n = !e.comments_before.length && "}" === e.text && "function" === f.last_word && "TK_END_EXPR" === i;
  5844. "expand" === h.brace_style || "none" === h.brace_style && d.wanted_newline ? "TK_OPERATOR" !== i && (n || "TK_EQUALS" === i || "TK_RESERVED" === i && x(f.last_text) && "else" !== f.last_text) ? c.space_before_token = !0 : A(!1, !0) : "TK_OPERATOR" !== i && "TK_START_EXPR" !== i ? "TK_START_BLOCK" === i ? A() : c.space_before_token = !0 : L(p.mode) && "," === f.last_text && ("}" === s ? c.space_before_token = !0 : A());
  5845. S(), y()
  5846. },
  5847. TK_END_BLOCK: function F() {
  5848. for (; f.mode === Z.Statement;) _();
  5849. var e = "TK_START_BLOCK" === i;
  5850. "expand" === h.brace_style ? e || A() : e || (L(f.mode) && h.keep_array_indentation ? (h.keep_array_indentation = !1, A(), h.keep_array_indentation = !0) : A());
  5851. _(), S()
  5852. },
  5853. TK_WORD: k,
  5854. TK_RESERVED: k,
  5855. TK_SEMICOLON: function $() {
  5856. N() && (c.space_before_token = !1);
  5857. for (; f.mode === Z.Statement && !f.if_block && !f.do_block;) _();
  5858. S()
  5859. },
  5860. TK_STRING: function P() {
  5861. N() ? c.space_before_token = !0 : "TK_RESERVED" === i || "TK_WORD" === i ? c.space_before_token = !0 : "TK_COMMA" === i || "TK_START_EXPR" === i || "TK_EQUALS" === i || "TK_OPERATOR" === i ? O() || T() : A();
  5862. S()
  5863. },
  5864. TK_EQUALS: function H() {
  5865. N();
  5866. f.declaration_statement && (f.declaration_assignment = !0);
  5867. c.space_before_token = !0, S(), c.space_before_token = !0
  5868. },
  5869. TK_OPERATOR: function K() {
  5870. N();
  5871. if ("TK_RESERVED" === i && x(f.last_text)) return c.space_before_token = !0, void S();
  5872. if ("*" === d.text && "TK_DOT" === i) return void S();
  5873. if (":" === d.text && f.in_case) return f.case_body = !0, y(), S(), A(), void(f.in_case = !1);
  5874. if ("::" === d.text) return void S();
  5875. "TK_OPERATOR" === i && T();
  5876. var e = !0,
  5877. t = !0;
  5878. q(d.text, ["--", "++", "!", "~"]) || q(d.text, ["-", "+"]) && (q(i, ["TK_START_BLOCK", "TK_START_EXPR", "TK_EQUALS", "TK_OPERATOR"]) || q(f.last_text, o.line_starters) || "," === f.last_text) ? (t = e = !1, !d.wanted_newline || "--" !== d.text && "++" !== d.text || A(!1, !0), " " === f.last_text && w(f.mode) && (e = !0), "TK_RESERVED" === i ? e = !0 : "TK_END_EXPR" === i ? e = !("]" === f.last_text && ("--" === d.text || "++" === d.text)) : "TK_OPERATOR" === i && (e = q(d.text, ["--", "-", "++", "+"]) && q(f.last_text, ["--", "-", "++", "+"]), q(d.text, ["+", "-"]) && q(f.last_text, ["--", "++"]) && (t = !0)), f.mode !== Z.BlockStatement && f.mode !== Z.Statement || "{" !== f.last_text && " " !== f.last_text || A()) : ":" === d.text ? 0 === f.ternary_depth ? e = !1 : f.ternary_depth -= 1 : "?" === d.text ? f.ternary_depth += 1 : "*" === d.text && "TK_RESERVED" === i && "function" === f.last_text && (t = e = !1);
  5879. c.space_before_token = c.space_before_token || e, S(), c.space_before_token = t
  5880. },
  5881. TK_COMMA: function U() {
  5882. if (f.declaration_statement) return w(f.parent.mode) && (f.declaration_assignment = !1), S(), void(f.declaration_assignment ? A(f.declaration_assignment = !1, !0) : (c.space_before_token = !0, h.comma_first && T()));
  5883. S(), f.mode === Z.ObjectLiteral || f.mode === Z.Statement && f.parent.mode === Z.ObjectLiteral ? (f.mode === Z.Statement && _(), A()) : (c.space_before_token = !0, h.comma_first && T())
  5884. },
  5885. TK_BLOCK_COMMENT: function W() {
  5886. if (c.raw) return c.add_raw_token(d), void(d.directives && "end" === d.directives.preserve && (h.test_output_raw || (c.raw = !1)));
  5887. if (d.directives) return A(!1, !0), S(), "start" === d.directives.preserve && (c.raw = !0), void A(!1, !0);
  5888. if (!j.newline.test(d.text) && !d.wanted_newline) return c.space_before_token = !0, S(), void(c.space_before_token = !0);
  5889. var e, t = function i(e) {
  5890. var t;
  5891. e = e.replace(/\x0d/g, "");
  5892. var n = [];
  5893. t = e.indexOf("\n");
  5894. for (; - 1 !== t;) n.push(e.substring(0, t)), e = e.substring(t + 1), t = e.indexOf("\n");
  5895. e.length && n.push(e);
  5896. return n
  5897. }(d.text),
  5898. n = !1,
  5899. r = !1,
  5900. a = d.whitespace_before,
  5901. o = a.length;
  5902. A(!1, !0), 1 < t.length && (! function s(e, t) {
  5903. for (var n = 0; n < e.length; n++) {
  5904. var r = X(e[n]);
  5905. if (r.charAt(0) !== t) return !1
  5906. }
  5907. return !0
  5908. }(t.slice(1), "*") ? function l(e, t) {
  5909. for (var n, r = 0, a = e.length; r < a; r++)
  5910. if ((n = e[r]) && 0 !== n.indexOf(t)) return !1;
  5911. return !0
  5912. }(t.slice(1), a) && (r = !0) : n = !0);
  5913. for (S(t[0]), e = 1; e < t.length; e++) A(!1, !0), n ? S(" " + t[e].replace(/^\s+/g, "")) : r && t[e].length > o ? S(t[e].substring(o)) : c.add_token(t[e]);
  5914. A(!1, !0)
  5915. },
  5916. TK_COMMENT: function V() {
  5917. d.wanted_newline ? A(!1, !0) : c.trim(!0);
  5918. c.space_before_token = !0, S(), A(!1, !0)
  5919. },
  5920. TK_DOT: function z() {
  5921. N();
  5922. "TK_RESERVED" === i && x(f.last_text) ? c.space_before_token = !0 : T(")" === f.last_text && h.break_chained_methods);
  5923. S()
  5924. },
  5925. TK_UNKNOWN: function G() {
  5926. S(), "\n" === d.text[d.text.length - 1] && A()
  5927. },
  5928. TK_EOF: function Y() {
  5929. for (; f.mode === Z.Statement;) _()
  5930. }
  5931. }, h = {}, (e = e || {}).braces_on_own_line !== undefined && (h.brace_style = e.braces_on_own_line ? "expand" : "collapse"), h.brace_style = e.brace_style ? e.brace_style : h.brace_style ? h.brace_style : "collapse", "expand-strict" === h.brace_style && (h.brace_style = "expand"), h.indent_size = e.indent_size ? parseInt(e.indent_size, 10) : 4, h.indent_char = e.indent_char ? e.indent_char : " ", h.eol = e.eol ? e.eol : "\n", h.preserve_newlines = e.preserve_newlines === undefined || e.preserve_newlines, h.break_chained_methods = e.break_chained_methods !== undefined && e.break_chained_methods, h.max_preserve_newlines = e.max_preserve_newlines === undefined ? 0 : parseInt(e.max_preserve_newlines, 10), h.space_in_paren = e.space_in_paren !== undefined && e.space_in_paren, h.space_in_empty_paren = e.space_in_empty_paren !== undefined && e.space_in_empty_paren, h.jslint_happy = e.jslint_happy !== undefined && e.jslint_happy, h.space_after_anon_function = e.space_after_anon_function !== undefined && e.space_after_anon_function, h.keep_array_indentation = e.keep_array_indentation !== undefined && e.keep_array_indentation, h.space_before_conditional = e.space_before_conditional === undefined || e.space_before_conditional, h.unescape_strings = e.unescape_strings !== undefined && e.unescape_strings, h.wrap_line_length = e.wrap_line_length === undefined ? 0 : parseInt(e.wrap_line_length, 10), h.e4x = e.e4x !== undefined && e.e4x, h.end_with_newline = e.end_with_newline !== undefined && e.end_with_newline, h.comma_first = e.comma_first !== undefined && e.comma_first, h.test_output_raw = e.test_output_raw !== undefined && e.test_output_raw, h.jslint_happy && (h.space_after_anon_function = !0), e.indent_with_tabs && (h.indent_char = "\t", h.indent_size = 1), h.eol = h.eol.replace(/\\r/, "\r").replace(/\\n/, "\n"), l = ""; 0 < h.indent_size;) l += h.indent_char, h.indent_size -= 1;
  5932. var b = 0;
  5933. if (r && r.length) {
  5934. for (;
  5935. " " === r.charAt(b) || "\t" === r.charAt(b);) m += r.charAt(b), b += 1;
  5936. r = r.substring(b)
  5937. }
  5938. function E(e) {
  5939. var t = e.newlines;
  5940. if (h.keep_array_indentation && L(f.mode))
  5941. for (var n = 0; n < t; n += 1) A(0 < n);
  5942. else if (h.max_preserve_newlines && t > h.max_preserve_newlines && (t = h.max_preserve_newlines), h.preserve_newlines && 1 < e.newlines) {
  5943. A();
  5944. for (var r = 1; r < t; r += 1) A(!0)
  5945. }
  5946. u[(d = e).type]()
  5947. }
  5948. function T(e) {
  5949. if (e = e !== undefined && e, !c.just_added_newline())
  5950. if (h.preserve_newlines && d.wanted_newline || e) A(!1, !0);
  5951. else if (h.wrap_line_length) {
  5952. c.current_line.get_character_count() + d.text.length + (c.space_before_token ? 1 : 0) >= h.wrap_line_length && A(!1, !0)
  5953. }
  5954. }
  5955. function A(e, t) {
  5956. if (!t && " " !== f.last_text && "," !== f.last_text && "=" !== f.last_text && "TK_OPERATOR" !== i)
  5957. for (; f.mode === Z.Statement && !f.if_block && !f.do_block;) _();
  5958. c.add_new_line(e) && (f.multiline_frame = !0)
  5959. }
  5960. function C() {
  5961. c.just_added_newline() && (h.keep_array_indentation && L(f.mode) && d.wanted_newline ? (c.current_line.push(d.whitespace_before), c.space_before_token = !1) : c.set_indent(f.indentation_level) && (f.line_indent_level = f.indentation_level))
  5962. }
  5963. function S(e) {
  5964. c.raw ? c.add_raw_token(d) : (h.comma_first && "TK_COMMA" === i && c.just_added_newline() && "," === c.previous_line.last() && (c.previous_line.pop(), C(), c.add_token(","), c.space_before_token = !0), e = e || d.text, C(), c.add_token(e))
  5965. }
  5966. function y() {
  5967. f.indentation_level += 1
  5968. }
  5969. function R(e) {
  5970. p = f ? (t.push(f), f) : v(null, e), f = v(p, e)
  5971. }
  5972. function L(e) {
  5973. return e === Z.ArrayLiteral
  5974. }
  5975. function w(e) {
  5976. return q(e, [Z.Expression, Z.ForInitializer, Z.Conditional])
  5977. }
  5978. function _() {
  5979. 0 < t.length && (p = f, f = t.pop(), p.mode === Z.Statement && c.remove_redundant_indentation(p))
  5980. }
  5981. function O() {
  5982. return f.parent.mode === Z.ObjectLiteral && f.mode === Z.Statement && (":" === f.last_text && 0 === f.ternary_depth || "TK_RESERVED" === i && q(f.last_text, ["get", "set"]))
  5983. }
  5984. function N() {
  5985. return !!("TK_RESERVED" === i && q(f.last_text, ["const", "let", "const"]) && "TK_WORD" === d.type || "TK_RESERVED" === i && "do" === f.last_text || "TK_RESERVED" === i && "return" === f.last_text && !d.wanted_newline || "TK_RESERVED" === i && "else" === f.last_text && ("TK_RESERVED" !== d.type || "if" !== d.text) || "TK_END_EXPR" === i && (p.mode === Z.ForInitializer || p.mode === Z.Conditional) || "TK_WORD" === i && f.mode === Z.BlockStatement && !f.in_case && "--" !== d.text && "++" !== d.text && "function" !== s && "TK_WORD" !== d.type && "TK_RESERVED" !== d.type || f.mode === Z.ObjectLiteral && (":" === f.last_text && 0 === f.ternary_depth || "TK_RESERVED" === i && q(f.last_text, ["get", "set"]))) && (R(Z.Statement), y(), "TK_RESERVED" === i && q(f.last_text, ["const", "let", "const"]) && "TK_WORD" === d.type && (f.declaration_statement = !0), O() || T("TK_RESERVED" === d.type && q(d.text, ["do", "for", "if", "while"])), !0)
  5986. }
  5987. function x(e) {
  5988. return q(e, ["case", "return", "do", "if", "throw", "else"])
  5989. }
  5990. function I(e) {
  5991. var t = a + (e || 0);
  5992. return t < 0 || t >= g.length ? null : g[t]
  5993. }
  5994. function k() {
  5995. ("TK_RESERVED" === d.type && f.mode !== Z.ObjectLiteral && q(d.text, ["set", "get"]) && (d.type = "TK_WORD"), "TK_RESERVED" === d.type && f.mode === Z.ObjectLiteral) && (":" === I(1).text && (d.type = "TK_WORD"));
  5996. if (N() || !d.wanted_newline || w(f.mode) || "TK_OPERATOR" === i && "--" !== f.last_text && "++" !== f.last_text || "TK_EQUALS" === i || !h.preserve_newlines && "TK_RESERVED" === i && q(f.last_text, ["const", "let", "const", "set", "get"]) || A(), f.do_block && !f.do_while) {
  5997. if ("TK_RESERVED" === d.type && "while" === d.text) return c.space_before_token = !0, S(), c.space_before_token = !0, void(f.do_while = !0);
  5998. A(), f.do_block = !1
  5999. }
  6000. if (f.if_block)
  6001. if (f.else_block || "TK_RESERVED" !== d.type || "else" !== d.text) {
  6002. for (; f.mode === Z.Statement;) _();
  6003. f.if_block = !1, f.else_block = !1
  6004. } else f.else_block = !0;
  6005. if ("TK_RESERVED" === d.type && ("case" === d.text || "default" === d.text && f.in_case_statement)) return A(), (f.case_body || h.jslint_happy) && (! function e() {
  6006. 0 < f.indentation_level && (!f.parent || f.indentation_level > f.parent.indentation_level) && (f.indentation_level -= 1)
  6007. }(), f.case_body = !1), S(), f.in_case = !0, void(f.in_case_statement = !0);
  6008. if ("TK_RESERVED" === d.type && "function" === d.text && ((q(f.last_text, ["}", " "]) || c.just_added_newline() && !q(f.last_text, ["[", "{", ":", "=", ","])) && (c.just_added_blankline() || d.comments_before.length || (A(), A(!0))), "TK_RESERVED" === i || "TK_WORD" === i ? "TK_RESERVED" === i && q(f.last_text, ["get", "set", "new", "return", "export", "async"]) ? c.space_before_token = !0 : "TK_RESERVED" === i && "default" === f.last_text && "export" === s ? c.space_before_token = !0 : A() : "TK_OPERATOR" === i || "=" === f.last_text ? c.space_before_token = !0 : (f.multiline_frame || !w(f.mode) && !L(f.mode)) && A()), "TK_COMMA" !== i && "TK_START_EXPR" !== i && "TK_EQUALS" !== i && "TK_OPERATOR" !== i || O() || T(), "TK_RESERVED" === d.type && q(d.text, ["function", "get", "set"])) return S(), void(f.last_word = d.text);
  6009. (n = "NONE", "TK_END_BLOCK" === i ? "TK_RESERVED" === d.type && q(d.text, ["else", "catch", "finally"]) ? "expand" === h.brace_style || "end-expand" === h.brace_style || "none" === h.brace_style && d.wanted_newline ? n = "NEWLINE" : (n = "SPACE", c.space_before_token = !0) : n = "NEWLINE" : "TK_SEMICOLON" === i && f.mode === Z.BlockStatement ? n = "NEWLINE" : "TK_SEMICOLON" === i && w(f.mode) ? n = "SPACE" : "TK_STRING" === i ? n = "NEWLINE" : "TK_RESERVED" === i || "TK_WORD" === i || "*" === f.last_text && "function" === s ? n = "SPACE" : "TK_START_BLOCK" === i ? n = "NEWLINE" : "TK_END_EXPR" === i && (c.space_before_token = !0, n = "NEWLINE"), "TK_RESERVED" === d.type && q(d.text, o.line_starters) && ")" !== f.last_text && (n = "else" === f.last_text || "export" === f.last_text ? "SPACE" : "NEWLINE"), "TK_RESERVED" === d.type && q(d.text, ["else", "catch", "finally"])) ? "TK_END_BLOCK" !== i || "expand" === h.brace_style || "end-expand" === h.brace_style || "none" === h.brace_style && d.wanted_newline ? A() : (c.trim(!0), "}" !== c.current_line.last() && A(), c.space_before_token = !0): "NEWLINE" === n ? "TK_RESERVED" === i && x(f.last_text) ? c.space_before_token = !0 : "TK_END_EXPR" !== i ? "TK_START_EXPR" === i && "TK_RESERVED" === d.type && q(d.text, ["const", "let", "const"]) || ":" === f.last_text || ("TK_RESERVED" === d.type && "if" === d.text && "else" === f.last_text ? c.space_before_token = !0 : A()) : "TK_RESERVED" === d.type && q(d.text, o.line_starters) && ")" !== f.last_text && A() : f.multiline_frame && L(f.mode) && "," === f.last_text && "}" === s ? A() : "SPACE" === n && (c.space_before_token = !0);
  6010. S(), f.last_word = d.text, "TK_RESERVED" === d.type && "do" === d.text && (f.do_block = !0), "TK_RESERVED" === d.type && "if" === d.text && (f.if_block = !0)
  6011. }
  6012. i = "TK_START_BLOCK", s = "", (c = new Q(l, m)).raw = h.test_output_raw, t = [], R(Z.BlockStatement), this.beautify = function() {
  6013. var e, t;
  6014. for (o = new ee(r, h, l), g = o.tokenize(), a = 0; e = I();) {
  6015. for (var n = 0; n < e.comments_before.length; n++) E(e.comments_before[n]);
  6016. E(e), s = f.last_text, i = e.type, f.last_text = e.text, a += 1
  6017. }
  6018. return t = c.get_code(), h.end_with_newline && (t += "\n"), "\n" != h.eol && (t = t.replace(/[\n]/g, h.eol)), t
  6019. }
  6020. }
  6021. function o(t) {
  6022. var n = 0,
  6023. r = -1,
  6024. a = [],
  6025. o = !0;
  6026. this.set_indent = function(e) {
  6027. n = t.baseIndentLength + e * t.indent_length, r = e
  6028. }, this.get_character_count = function() {
  6029. return n
  6030. }, this.is_empty = function() {
  6031. return o
  6032. }, this.last = function() {
  6033. return this._empty ? null : a[a.length - 1]
  6034. }, this.push = function(e) {
  6035. a.push(e), n += e.length, o = !1
  6036. }, this.pop = function() {
  6037. var e = null;
  6038. return o || (e = a.pop(), n -= e.length, o = 0 === a.length), e
  6039. }, this.remove_indent = function() {
  6040. 0 < r && (r -= 1, n -= t.indent_length)
  6041. }, this.trim = function() {
  6042. for (;
  6043. " " === this.last();) a.pop(), n -= 1;
  6044. o = 0 === a.length
  6045. }, this.toString = function() {
  6046. var e = "";
  6047. return this._empty || (0 <= r && (e = t.indent_cache[r]), e += a.join("")), e
  6048. }
  6049. }
  6050. function Q(t, n) {
  6051. n = n || "", this.indent_cache = [n], this.baseIndentLength = n.length, this.indent_length = t.length, this.raw = !1;
  6052. var r = [];
  6053. this.baseIndentString = n, this.indent_string = t, this.previous_line = null, this.current_line = null, this.space_before_token = !1, this.add_outputline = function() {
  6054. this.previous_line = this.current_line, this.current_line = new o(this), r.push(this.current_line)
  6055. }, this.add_outputline(), this.get_line_number = function() {
  6056. return r.length
  6057. }, this.add_new_line = function(e) {
  6058. return (1 !== this.get_line_number() || !this.just_added_newline()) && (!(!e && this.just_added_newline()) && (this.raw || this.add_outputline(), !0))
  6059. }, this.get_code = function() {
  6060. return r.join("\n").replace(/[\r\n\t ]+$/, "")
  6061. }, this.set_indent = function(e) {
  6062. if (1 < r.length) {
  6063. for (; e >= this.indent_cache.length;) this.indent_cache.push(this.indent_cache[this.indent_cache.length - 1] + this.indent_string);
  6064. return this.current_line.set_indent(e), !0
  6065. }
  6066. return this.current_line.set_indent(0), !1
  6067. }, this.add_raw_token = function(e) {
  6068. for (var t = 0; t < e.newlines; t++) this.add_outputline();
  6069. this.current_line.push(e.whitespace_before), this.current_line.push(e.text), this.space_before_token = !1
  6070. }, this.add_token = function(e) {
  6071. this.add_space_before_token(), this.current_line.push(e)
  6072. }, this.add_space_before_token = function() {
  6073. this.space_before_token && !this.just_added_newline() && this.current_line.push(" "), this.space_before_token = !1
  6074. }, this.remove_redundant_indentation = function(e) {
  6075. if (!e.multiline_frame && e.mode !== Z.ForInitializer && e.mode !== Z.Conditional)
  6076. for (var t = e.start_line_index, n = r.length; t < n;) r[t].remove_indent(), t++
  6077. }, this.trim = function(e) {
  6078. for (e = e !== undefined && e, this.current_line.trim(t, n); e && 1 < r.length && this.current_line.is_empty();) r.pop(), this.current_line = r[r.length - 1], this.current_line.trim();
  6079. this.previous_line = 1 < r.length ? r[r.length - 2] : null
  6080. }, this.just_added_newline = function() {
  6081. return this.current_line.is_empty()
  6082. }, this.just_added_blankline = function() {
  6083. return !!this.just_added_newline() && (1 === r.length || r[r.length - 2].is_empty())
  6084. }
  6085. }
  6086. var J = function J(e, t, n, r, a, o) {
  6087. this.type = e, this.text = t, this.comments_before = [], this.newlines = n || 0, this.wanted_newline = 0 < n, this.whitespace_before = r || "", this.parent = null, this.directives = null
  6088. };
  6089. function ee(_, O, e) {
  6090. var N = "\n\r\t ".split(""),
  6091. x = /[0-9]/,
  6092. I = /[01234567]/,
  6093. k = /[0123456789abcdefABCDEF]/,
  6094. M = "+ - * / % & ++ -- = += -= *= /= %= == === != !== > < >= <= >> << >>> >>>= >>= <<= && &= | || ! ~ , : ? ^ ^= |= :: =>".split(" ");
  6095. this.line_starters = "continue,try,throw,return,const,let,const,if,switch,case,default,for,while,break,function,import,export".split(",");
  6096. var D, B, F, $, P, H, K = this.line_starters.concat(["do", "in", "else", "get", "set", "new", "catch", "finally", "typeof", "yield", "async", "await"]),
  6097. U = /([\s\S]*?)((?:\*\/)|$)/g,
  6098. W = /([^\n\r\u2028\u2029]*)/g,
  6099. V = /\/\* beautify( \w+[:]\w+)+ \*\//g,
  6100. z = / (\w+)[:](\w+)/g,
  6101. G = /([\s\S]*?)((?:\/\*\sbeautify\signore:end\s\*\/)|$)/g,
  6102. Y = /((<\?php|<\?=)[\s\S]*?\?>)|(<%[\s\S]*?%>)/g;
  6103. function i() {
  6104. var e, t, n = [];
  6105. if (D = 0, B = "", H <= P) return ["", "TK_EOF"];
  6106. t = $.length ? $[$.length - 1] : new J("TK_START_BLOCK", "{");
  6107. var r = _.charAt(P);
  6108. for (P += 1; q(r, N);) {
  6109. if (j.newline.test(r) ? "\n" === r && "\r" === _.charAt(P - 2) || (D += 1, n = []) : n.push(r), H <= P) return ["", "TK_EOF"];
  6110. r = _.charAt(P), P += 1
  6111. }
  6112. if (n.length && (B = n.join("")), x.test(r)) {
  6113. var a = !0,
  6114. o = !0,
  6115. i = x;
  6116. for ("0" === r && P < H && /[Xxo]/.test(_.charAt(P)) ? (o = a = !1, r += _.charAt(P), P += 1, i = /[o]/.test(_.charAt(P)) ? I : k) : (r = "", P -= 1); P < H && i.test(_.charAt(P));) r += _.charAt(P), P += 1, a && P < H && "." === _.charAt(P) && (r += _.charAt(P), P += 1, a = !1), o && P < H && /[Ee]/.test(_.charAt(P)) && (r += _.charAt(P), (P += 1) < H && /[+-]/.test(_.charAt(P)) && (r += _.charAt(P), P += 1), a = o = !1);
  6117. return [r, "TK_WORD"]
  6118. }
  6119. if (j.isIdentifierStart(_.charCodeAt(P - 1))) {
  6120. if (P < H)
  6121. for (; j.isIdentifierChar(_.charCodeAt(P)) && (r += _.charAt(P), (P += 1) !== H););
  6122. return "TK_DOT" === t.type || "TK_RESERVED" === t.type && q(t.text, ["set", "get"]) || !q(r, K) ? [r, "TK_WORD"] : "in" === r ? [r, "TK_OPERATOR"] : [r, "TK_RESERVED"]
  6123. }
  6124. if ("(" === r || "[" === r) return [r, "TK_START_EXPR"];
  6125. if (")" === r || "]" === r) return [r, "TK_END_EXPR"];
  6126. if ("{" === r) return [r, "TK_START_BLOCK"];
  6127. if ("}" === r) return [r, "TK_END_BLOCK"];
  6128. if (" " === r) return [r, "TK_SEMICOLON"];
  6129. if ("/" === r) {
  6130. var s = "";
  6131. if ("*" === _.charAt(P)) {
  6132. P += 1, U.lastIndex = P;
  6133. var l = U.exec(_);
  6134. s = "/*" + l[0], P += l[0].length;
  6135. var c = function L(e) {
  6136. if (!e.match(V)) return null;
  6137. var t = {};
  6138. z.lastIndex = 0;
  6139. for (var n = z.exec(e); n;) t[n[1]] = n[2], n = z.exec(e);
  6140. return t
  6141. }(s);
  6142. return c && "start" === c.ignore && (G.lastIndex = P, s += (l = G.exec(_))[0], P += l[0].length), [s = s.replace(j.lineBreak, "\n"), "TK_BLOCK_COMMENT", c]
  6143. }
  6144. if ("/" === _.charAt(P)) {
  6145. P += 1, W.lastIndex = P;
  6146. var d = W.exec(_);
  6147. return s = "//" + d[0], P += d[0].length, [s, "TK_COMMENT"]
  6148. }
  6149. }
  6150. if ("`" === r || "'" === r || '"' === r || ("/" === r || O.e4x && "<" === r && _.slice(P - 1).match(/^<([-a-zA-Z:0-9_.]+|{[^{}]*}|!\[CDATA\[[\s\S]*?\]\])(\s+[-a-zA-Z:0-9_.]+\s*=\s*('[^']*'|"[^"]*"|{.*?}))*\s*(\/?)\s*>/)) && ("TK_RESERVED" === t.type && q(t.text, ["return", "case", "throw", "else", "do", "typeof", "yield"]) || "TK_END_EXPR" === t.type && ")" === t.text && t.parent && "TK_RESERVED" === t.parent.type && q(t.parent.text, ["if", "while", "for"]) || q(t.type, ["TK_COMMENT", "TK_START_EXPR", "TK_START_BLOCK", "TK_END_BLOCK", "TK_OPERATOR", "TK_EQUALS", "TK_EOF", "TK_SEMICOLON", "TK_COMMA"]))) {
  6151. var f = r,
  6152. p = !1,
  6153. u = !1;
  6154. if (e = r, "/" === f)
  6155. for (var h = !1; P < H && (p || h || _.charAt(P) !== f) && !j.newline.test(_.charAt(P));) e += _.charAt(P), p ? p = !1 : (p = "\\" === _.charAt(P), "[" === _.charAt(P) ? h = !0 : "]" === _.charAt(P) && (h = !1)), P += 1;
  6156. else if (O.e4x && "<" === f) {
  6157. var g = /<(\/?)([-a-zA-Z:0-9_.]+|{[^{}]*}|!\[CDATA\[[\s\S]*?\]\])(\s+[-a-zA-Z:0-9_.]+\s*=\s*('[^']*'|"[^"]*"|{.*?}))*\s*(\/?)\s*>/g,
  6158. m = _.slice(P - 1),
  6159. v = g.exec(m);
  6160. if (v && 0 === v.index) {
  6161. for (var b = v[2], E = 0; v;) {
  6162. var T = !!v[1],
  6163. A = v[2],
  6164. C = !!v[v.length - 1] || "![CDATA[" === A.slice(0, 8);
  6165. if (A !== b || C || (T ? --E : ++E), E <= 0) break;
  6166. v = g.exec(m)
  6167. }
  6168. var S = v ? v.index + v[0].length : m.length;
  6169. return m = m.slice(0, S), P += S - 1, [m = m.replace(j.lineBreak, "\n"), "TK_STRING"]
  6170. }
  6171. } else
  6172. for (; P < H && (p || _.charAt(P) !== f && ("`" === f || !j.newline.test(_.charAt(P))));)(p || "`" === f) && j.newline.test(_.charAt(P)) ? ("\r" === _.charAt(P) && "\n" === _.charAt(P + 1) && (P += 1), e += "\n") : e += _.charAt(P), p = p ? ("x" !== _.charAt(P) && "u" !== _.charAt(P) || (u = !0), !1) : "\\" === _.charAt(P), P += 1; if (u && O.unescape_strings && (e = function w(e) {
  6173. var t, n = !1,
  6174. r = "",
  6175. a = 0,
  6176. o = "",
  6177. i = 0;
  6178. for (; n || a < e.length;)
  6179. if (t = e.charAt(a), a++, n) {
  6180. if (n = !1, "x" === t) o = e.substr(a, 2), a += 2;
  6181. else {
  6182. if ("u" !== t) {
  6183. r += "\\" + t;
  6184. continue
  6185. }
  6186. o = e.substr(a, 4), a += 4
  6187. } if (!o.match(/^[0123456789abcdefABCDEF]+$/)) return e;
  6188. if (0 <= (i = parseInt(o, 16)) && i < 32) {
  6189. r += "x" === t ? "\\x" + o : "\\u" + o;
  6190. continue
  6191. }
  6192. if (34 === i || 39 === i || 92 === i) r += "\\" + String.fromCharCode(i);
  6193. else {
  6194. if ("x" === t && 126 < i && i <= 255) return e;
  6195. r += String.fromCharCode(i)
  6196. }
  6197. } else "\\" === t ? n = !0 : r += t;
  6198. return r
  6199. }(e)), P < H && _.charAt(P) === f && (e += f, P += 1, "/" === f))
  6200. for (; P < H && j.isIdentifierStart(_.charCodeAt(P));) e += _.charAt(P), P += 1;
  6201. return [e, "TK_STRING"]
  6202. }
  6203. if ("#" === r) {
  6204. if (0 === $.length && "!" === _.charAt(P)) {
  6205. for (e = r; P < H && "\n" !== r;) e += r = _.charAt(P), P += 1;
  6206. return [X(e) + "\n", "TK_UNKNOWN"]
  6207. }
  6208. var y = "#";
  6209. if (P < H && x.test(_.charAt(P))) {
  6210. for (; y += r = _.charAt(P), (P += 1) < H && "#" !== r && "=" !== r;);
  6211. return "#" === r || ("[" === _.charAt(P) && "]" === _.charAt(P + 1) ? (y += "[]", P += 2) : "{" === _.charAt(P) && "}" === _.charAt(P + 1) && (y += "{}", P += 2)), [y, "TK_WORD"]
  6212. }
  6213. }
  6214. if ("<" === r && ("?" === _.charAt(P) || "%" === _.charAt(P))) {
  6215. Y.lastIndex = P - 1;
  6216. var R = Y.exec(_);
  6217. if (R) return r = R[0], P += r.length - 1, [r = r.replace(j.lineBreak, "\n"), "TK_STRING"]
  6218. }
  6219. if ("<" === r && "\x3c!--" === _.substring(P - 1, P + 3)) {
  6220. for (P += 3, r = "\x3c!--"; !j.newline.test(_.charAt(P)) && P < H;) r += _.charAt(P), P++;
  6221. return F = !0, [r, "TK_COMMENT"]
  6222. }
  6223. if ("-" === r && F && "--\x3e" === _.substring(P - 1, P + 2)) return F = !1, P += 2, ["--\x3e", "TK_COMMENT"];
  6224. if ("." === r) return [r, "TK_DOT"];
  6225. if (q(r, M)) {
  6226. for (; P < H && q(r + _.charAt(P), M) && (r += _.charAt(P), !(H <= (P += 1))););
  6227. return "," === r ? [r, "TK_COMMA"] : "=" === r ? [r, "TK_EQUALS"] : [r, "TK_OPERATOR"]
  6228. }
  6229. return [r, "TK_UNKNOWN"]
  6230. }
  6231. this.tokenize = function() {
  6232. var e, t, n;
  6233. H = _.length, P = 0, F = !1, $ = [];
  6234. for (var r = null, a = [], o = []; !t || "TK_EOF" !== t.type;) {
  6235. for (n = i(), e = new J(n[1], n[0], D, B);
  6236. "TK_COMMENT" === e.type || "TK_BLOCK_COMMENT" === e.type || "TK_UNKNOWN" === e.type;) "TK_BLOCK_COMMENT" === e.type && (e.directives = n[2]), o.push(e), n = i(), e = new J(n[1], n[0], D, B);
  6237. o.length && (e.comments_before = o, o = []), "TK_START_BLOCK" === e.type || "TK_START_EXPR" === e.type ? (e.parent = t, a.push(r), r = e) : ("TK_END_BLOCK" === e.type || "TK_END_EXPR" === e.type) && r && ("]" === e.text && "[" === r.text || ")" === e.text && "(" === r.text || "}" === e.text && "{" === r.text) && (e.parent = r.parent, r = a.pop()), $.push(e), t = e
  6238. }
  6239. return $
  6240. }
  6241. }
  6242. return {
  6243. run: function x(e, t) {
  6244. function i(e) {
  6245. return e.replace(/\s+$/g, "")
  6246. }
  6247. var n, r, a, m, o, s, v, l, c, b, E, T, d, f;
  6248. for ((t = t || {}).wrap_line_length !== undefined && 0 !== parseInt(t.wrap_line_length, 10) || t.max_char === undefined || 0 === parseInt(t.max_char, 10) || (t.wrap_line_length = t.max_char), r = t.indent_inner_html !== undefined && t.indent_inner_html, a = t.indent_size === undefined ? 4 : parseInt(t.indent_size, 10), m = t.indent_char === undefined ? " " : t.indent_char, s = t.brace_style === undefined ? "collapse" : t.brace_style, o = 0 === parseInt(t.wrap_line_length, 10) ? 32786 : parseInt(t.wrap_line_length || 250, 10), v = t.unformatted || ["a", "span", "img", "bdo", "em", "strong", "dfn", "code", "samp", "kbd", "const", "cite", "abbr", "acronym", "q", "sub", "sup", "tt", "i", "b", "big", "small", "u", "s", "strike", "font", "ins", "del", "address", "pre"], l = t.preserve_newlines === undefined || t.preserve_newlines, c = l ? isNaN(parseInt(t.max_preserve_newlines, 10)) ? 32786 : parseInt(t.max_preserve_newlines, 10) : 0, b = t.indent_handlebars !== undefined && t.indent_handlebars, E = t.wrap_attributes === undefined ? "auto" : t.wrap_attributes, T = t.wrap_attributes_indent_size === undefined ? a : parseInt(t.wrap_attributes_indent_size, 10) || a, d = t.end_with_newline !== undefined && t.end_with_newline, f = Array.isArray(t.extra_liners) ? t.extra_liners.concat() : "string" == typeof t.extra_liners ? t.extra_liners.split(",") : "head,body,/html".split(","), t.indent_with_tabs && (m = "\t", a = 1), (n = new function _() {
  6249. return this.pos = 0, this.token = "", this.current_mode = "CONTENT", this.tags = {
  6250. parent: "parent1",
  6251. parentcount: 1,
  6252. parent1: ""
  6253. }, this.tag_type = "", this.token_text = this.last_token = this.last_text = this.token_type = "", this.newlines = 0, this.indent_content = r, this.Utils = {
  6254. whitespace: "\n\r\t ".split(""),
  6255. single_token: "br,input,link,meta,source,!doctype,basefont,base,area,hr,wbr,param,img,isindex,embed".split(","),
  6256. extra_liners: f,
  6257. in_array: function(e, t) {
  6258. for (var n = 0; n < t.length; n++)
  6259. if (e === t[n]) return !0;
  6260. return !1
  6261. }
  6262. }, this.is_whitespace = function(e) {
  6263. for (; 0 < e.length; e++)
  6264. if (!this.Utils.in_array(e.charAt(0), this.Utils.whitespace)) return !1;
  6265. return !0
  6266. }, this.traverse_whitespace = function() {
  6267. var e = "";
  6268. if (e = this.input.charAt(this.pos), this.Utils.in_array(e, this.Utils.whitespace)) {
  6269. for (this.newlines = 0; this.Utils.in_array(e, this.Utils.whitespace);) l && "\n" === e && this.newlines <= c && (this.newlines += 1), this.pos++, e = this.input.charAt(this.pos);
  6270. return !0
  6271. }
  6272. return !1
  6273. }, this.space_or_wrap = function(e) {
  6274. this.line_char_count >= this.wrap_line_length ? (this.print_newline(!1, e), this.print_indentation(e)) : (this.line_char_count++, e.push(" "))
  6275. }, this.get_content = function() {
  6276. for (var e = "", t = [];
  6277. "<" != this.input.charAt(this.pos);) {
  6278. if (this.pos >= this.input.length) return t.length ? t.join("") : ["", "TK_EOF"];
  6279. if (this.traverse_whitespace()) this.space_or_wrap(t);
  6280. else {
  6281. if (b) {
  6282. var n = this.input.substr(this.pos, 3);
  6283. if ("{{#" === n || "{{/" === n) break;
  6284. if ("{{!" === n) return [this.get_tag(), "TK_TAG_HANDLEBARS_COMMENT"];
  6285. if ("{{" === this.input.substr(this.pos, 2) && "{{else}}" === this.get_tag(!0)) break
  6286. }
  6287. e = this.input.charAt(this.pos), this.pos++, this.line_char_count++, t.push(e)
  6288. }
  6289. }
  6290. return t.length ? t.join("") : ""
  6291. }, this.get_contents_to = function(e) {
  6292. if (this.pos === this.input.length) return ["", "TK_EOF"];
  6293. var t = "",
  6294. n = new RegExp("</" + e + "\\s*>", "igm");
  6295. n.lastIndex = this.pos;
  6296. var r = n.exec(this.input),
  6297. a = r ? r.index : this.input.length;
  6298. return this.pos < a && (t = this.input.substring(this.pos, a), this.pos = a), t
  6299. }, this.record_tag = function(e) {
  6300. this.tags[e + "count"] ? this.tags[e + "count"]++ : this.tags[e + "count"] = 1, this.tags[e + this.tags[e + "count"]] = this.indent_level, this.tags[e + this.tags[e + "count"] + "parent"] = this.tags.parent, this.tags.parent = e + this.tags[e + "count"]
  6301. }, this.retrieve_tag = function(e) {
  6302. if (this.tags[e + "count"]) {
  6303. for (var t = this.tags.parent; t && e + this.tags[e + "count"] !== t;) t = this.tags[t + "parent"];
  6304. t && (this.indent_level = this.tags[e + this.tags[e + "count"]], this.tags.parent = this.tags[t + "parent"]), delete this.tags[e + this.tags[e + "count"] + "parent"], delete this.tags[e + this.tags[e + "count"]], 1 === this.tags[e + "count"] ? delete this.tags[e + "count"] : this.tags[e + "count"]--
  6305. }
  6306. }, this.indent_to_tag = function(e) {
  6307. if (this.tags[e + "count"]) {
  6308. for (var t = this.tags.parent; t && e + this.tags[e + "count"] !== t;) t = this.tags[t + "parent"];
  6309. t && (this.indent_level = this.tags[e + this.tags[e + "count"]])
  6310. }
  6311. }, this.get_tag = function(e) {
  6312. var t, n, r = "",
  6313. a = [],
  6314. o = "",
  6315. i = !1,
  6316. s = !0,
  6317. l = this.pos,
  6318. c = this.line_char_count;
  6319. e = e !== undefined && e;
  6320. do {
  6321. if (this.pos >= this.input.length) return e && (this.pos = l, this.line_char_count = c), a.length ? a.join("") : ["", "TK_EOF"];
  6322. if (r = this.input.charAt(this.pos), this.pos++, this.Utils.in_array(r, this.Utils.whitespace)) i = !0;
  6323. else {
  6324. if ("'" !== r && '"' !== r || (r += this.get_unformatted(r), i = !0), "=" === r && (i = !1), a.length && "=" != a[a.length - 1] && ">" != r && i) {
  6325. if (this.space_or_wrap(a), i = !1, !s && "force" === E && "/" != r) {
  6326. this.print_newline(!0, a), this.print_indentation(a);
  6327. for (var d = 0; d < T; d++) a.push(m)
  6328. }
  6329. for (var f = 0; f < a.length; f++)
  6330. if (" " === a[f]) {
  6331. s = !1;
  6332. break
  6333. }
  6334. }
  6335. if (b && "<" === n && r + this.input.charAt(this.pos) === "{{" && (r += this.get_unformatted("}}"), a.length && " " != a[a.length - 1] && "<" != a[a.length - 1] && (r = " " + r), i = !0), "<" !== r || n || (t = this.pos - 1, n = "<"), b && !n && 2 <= a.length && "{" === a[a.length - 1] && "{" === a[a.length - 2] && (t = "#" === r || "/" === r || "!" === r ? this.pos - 3 : this.pos - 2, n = "{"), this.line_char_count++, a.push(r), a[1] && ("!" === a[1] || "?" === a[1] || "%" === a[1])) {
  6336. a = [this.get_comment(t)];
  6337. break
  6338. }
  6339. if (b && a[1] && "{" === a[1] && a[2] && "!" === a[2]) {
  6340. a = [this.get_comment(t)];
  6341. break
  6342. }
  6343. if (b && "{" === n && 2 < a.length && "}" === a[a.length - 2] && "}" === a[a.length - 1]) break
  6344. }
  6345. } while (">" != r);
  6346. var p, u, h = a.join("");
  6347. p = -1 != h.indexOf(" ") ? h.indexOf(" ") : "{" === h[0] ? h.indexOf("}") : h.indexOf(">"), u = "<" !== h[0] && b ? "#" === h[2] ? 3 : 2 : 1;
  6348. var g = h.substring(u, p).toLowerCase();
  6349. return "/" === h.charAt(h.length - 2) || this.Utils.in_array(g, this.Utils.single_token) ? e || (this.tag_type = "SINGLE") : b && "{" === h[0] && "else" === g ? e || (this.indent_to_tag("if"), this.tag_type = "HANDLEBARS_ELSE", this.indent_content = !0, this.traverse_whitespace()) : this.is_unformatted(g, v) ? (o = this.get_unformatted("</" + g + ">", h), a.push(o), this.pos, this.tag_type = "SINGLE") : "script" === g && (-1 === h.search("type") || -1 < h.search("type") && -1 < h.search(/\b(text|application)\/(x-)?(javascript|ecmascript|jscript|livescript)/)) ? e || (this.record_tag(g), this.tag_type = "SCRIPT") : "style" === g && (-1 === h.search("type") || -1 < h.search("type") && -1 < h.search("text/css")) ? e || (this.record_tag(g), this.tag_type = "STYLE") : "!" === g.charAt(0) ? e || (this.tag_type = "SINGLE", this.traverse_whitespace()) : e || ("/" === g.charAt(0) ? (this.retrieve_tag(g.substring(1)), this.tag_type = "END") : (this.record_tag(g), "html" != g.toLowerCase() && (this.indent_content = !0), this.tag_type = "START"), this.traverse_whitespace() && this.space_or_wrap(a), this.Utils.in_array(g, this.Utils.extra_liners) && (this.print_newline(!1, this.output), this.output.length && "\n" != this.output[this.output.length - 2] && this.print_newline(!0, this.output))), e && (this.pos = l, this.line_char_count = c), a.join("")
  6350. }, this.get_comment = function(e) {
  6351. var t = "",
  6352. n = ">",
  6353. r = !1;
  6354. this.pos = e;
  6355. var a = this.input.charAt(this.pos);
  6356. for (this.pos++; this.pos <= this.input.length && ((t += a)[t.length - 1] !== n[n.length - 1] || -1 == t.indexOf(n));)!r && t.length < 10 && (0 === t.indexOf("<![if") ? (n = "<![endif]>", r = !0) : 0 === t.indexOf("<![cdata[") ? (n = "]]>", r = !0) : 0 === t.indexOf("<![") ? (n = "]>", r = !0) : 0 === t.indexOf("\x3c!--") ? (n = "--\x3e", r = !0) : 0 === t.indexOf("{{!") ? (n = "}}", r = !0) : 0 === t.indexOf("<?") ? (n = "?>", r = !0) : 0 === t.indexOf("<%") && (n = "%>", r = !0)), a = this.input.charAt(this.pos), this.pos++;
  6357. return t
  6358. }, this.get_unformatted = function(e, t) {
  6359. if (t && -1 != t.toLowerCase().indexOf(e)) return "";
  6360. var n = "",
  6361. r = "",
  6362. a = 0,
  6363. o = !0;
  6364. do {
  6365. if (this.pos >= this.input.length) return r;
  6366. if (n = this.input.charAt(this.pos), this.pos++, this.Utils.in_array(n, this.Utils.whitespace)) {
  6367. if (!o) {
  6368. this.line_char_count--;
  6369. continue
  6370. }
  6371. if ("\n" === n || "\r" === n) {
  6372. r += "\n", this.line_char_count = 0;
  6373. continue
  6374. }
  6375. }
  6376. r += n, this.line_char_count++, o = !0, b && "{" === n && r.length && "{" === r[r.length - 2] && (a = (r += this.get_unformatted("}}")).length)
  6377. } while (-1 === r.toLowerCase().indexOf(e, a));
  6378. return r
  6379. }, this.get_token = function() {
  6380. var e;
  6381. if ("TK_TAG_SCRIPT" !== this.last_token && "TK_TAG_STYLE" !== this.last_token) return "CONTENT" === this.current_mode ? "string" != typeof(e = this.get_content()) ? e : [e, "TK_CONTENT"] : "TAG" === this.current_mode ? "string" != typeof(e = this.get_tag()) ? e : [e, "TK_TAG_" + this.tag_type] : void 0;
  6382. var t = this.last_token.substr(7);
  6383. return "string" != typeof(e = this.get_contents_to(t)) ? e : [e, "TK_" + t]
  6384. }, this.get_full_indent = function(e) {
  6385. return (e = this.indent_level + e || 0) < 1 ? "" : new Array(e + 1).join(this.indent_string)
  6386. }, this.is_unformatted = function(e, t) {
  6387. if (!this.Utils.in_array(e, t)) return !1;
  6388. if ("a" != e.toLowerCase() || !this.Utils.in_array("a", t)) return !0;
  6389. var n = (this.get_tag(!0) || "").match(/^\s*<\s*\/?([a-z]*)\s*[^>]*>\s*$/);
  6390. return !(n && !this.Utils.in_array(n, t))
  6391. }, this.printer = function(e, t, n, r, a) {
  6392. this.input = e || "", this.output = [], this.indent_character = t, this.indent_string = "", this.indent_size = n, this.brace_style = a, this.indent_level = 0, this.wrap_line_length = r;
  6393. for (var o = this.line_char_count = 0; o < this.indent_size; o++) this.indent_string += this.indent_character;
  6394. this.print_newline = function(e, t) {
  6395. this.line_char_count = 0, t && t.length && (e || "\n" != t[t.length - 1]) && ("\n" != t[t.length - 1] && (t[t.length - 1] = i(t[t.length - 1])), t.push("\n"))
  6396. }, this.print_indentation = function(e) {
  6397. for (var t = 0; t < this.indent_level; t++) e.push(this.indent_string), this.line_char_count += this.indent_string.length
  6398. }, this.print_token = function(e) {
  6399. this.is_whitespace(e) && !this.output.length || ((e || "" !== e) && this.output.length && "\n" === this.output[this.output.length - 1] && (this.print_indentation(this.output), e = function t(e) {
  6400. return e.replace(/^\s+/g, "")
  6401. }(e)), this.print_token_raw(e))
  6402. }, this.print_token_raw = function(e) {
  6403. 0 < this.newlines && (e = i(e)), e && "" !== e && (1 < e.length && "\n" === e[e.length - 1] ? (this.output.push(e.slice(0, -1)), this.print_newline(!1, this.output)) : this.output.push(e));
  6404. for (var t = 0; t < this.newlines; t++) this.print_newline(0 < t, this.output);
  6405. this.newlines = 0
  6406. }, this.indent = function() {
  6407. this.indent_level++
  6408. }, this.unindent = function() {
  6409. 0 < this.indent_level && this.indent_level--
  6410. }
  6411. }, this
  6412. }).printer(e, m, a, o, s);;) {
  6413. var p = n.get_token();
  6414. if (n.token_text = p[0], n.token_type = p[1], "TK_EOF" === n.token_type) break;
  6415. switch (n.token_type) {
  6416. case "TK_TAG_START":
  6417. n.print_newline(!1, n.output), n.print_token(n.token_text), n.indent_content && (n.indent(), n.indent_content = !1), n.current_mode = "CONTENT";
  6418. break;
  6419. case "TK_TAG_STYLE":
  6420. case "TK_TAG_SCRIPT":
  6421. n.print_newline(!1, n.output), n.print_token(n.token_text), n.current_mode = "CONTENT";
  6422. break;
  6423. case "TK_TAG_END":
  6424. if ("TK_CONTENT" === n.last_token && "" === n.last_text) {
  6425. var u = n.token_text.match(/\w+/)[0],
  6426. h = null;
  6427. n.output.length && (h = n.output[n.output.length - 1].match(/(?:<|{{#)\/?\s*(\w+)/)), (null === h || h[1] != u && !n.Utils.in_array(h[1], v)) && n.print_newline(!1, n.output)
  6428. }
  6429. n.print_token(n.token_text), n.current_mode = "CONTENT";
  6430. break;
  6431. case "TK_TAG_SINGLE":
  6432. var g = n.token_text.match(/^\s*<([a-z-]+)/i);
  6433. g && n.Utils.in_array(g[1], v) || n.print_newline(!1, n.output), n.print_token(n.token_text), n.current_mode = "CONTENT";
  6434. break;
  6435. case "TK_TAG_HANDLEBARS_ELSE":
  6436. n.print_token(n.token_text), n.indent_content && (n.indent(), n.indent_content = !1), n.current_mode = "CONTENT";
  6437. break;
  6438. case "TK_TAG_HANDLEBARS_COMMENT":
  6439. case "TK_CONTENT":
  6440. n.print_token(n.token_text), n.current_mode = "TAG";
  6441. break;
  6442. case "TK_STYLE":
  6443. case "TK_SCRIPT":
  6444. if ("" !== n.token_text) {
  6445. n.print_newline(!1, n.output);
  6446. var A = n.token_text,
  6447. C = void 0,
  6448. S = 1;
  6449. "TK_SCRIPT" === n.token_type ? C = N : "TK_STYLE" === n.token_type && (C = O), "keep" === t.indent_scripts ? S = 0 : "separate" === t.indent_scripts && (S = -n.indent_level);
  6450. var y = n.get_full_indent(S);
  6451. if (C) A = C(A.replace(/^\s*/, y), t);
  6452. else {
  6453. var R = A.match(/^\s*/)[0].match(/[^\n\r]*$/)[0].split(n.indent_string).length - 1,
  6454. L = n.get_full_indent(S - R);
  6455. A = A.replace(/^\s*/, y).replace(/\r\n|\r|\n/g, "\n" + L).replace(/\s+$/, "")
  6456. }
  6457. A && (n.print_token_raw(A), n.print_newline(!0, n.output))
  6458. }
  6459. n.current_mode = "TAG";
  6460. break;
  6461. default:
  6462. "" !== n.token_text && n.print_token(n.token_text)
  6463. }
  6464. n.last_token = n.token_type, n.last_text = n.token_text
  6465. }
  6466. var w = n.output.join("").replace(/[\r\n\t ]+$/, "");
  6467. return d && (w += "\n"), w
  6468. }
  6469. }
  6470. }, Object.assign($e.DEFAULTS, {
  6471. codeMirror: window.CodeMirror,
  6472. codeMirrorOptions: {
  6473. lineNumbers: !0,
  6474. tabMode: "indent",
  6475. indentWithTabs: !0,
  6476. lineWrapping: !0,
  6477. mode: "text/html",
  6478. tabSize: 2
  6479. },
  6480. codeBeautifierOptions: {
  6481. end_with_newline: !0,
  6482. indent_inner_html: !0,
  6483. extra_liners: ["p", "h1", "h2", "h3", "h4", "h5", "h6", "blockquote", "pre", "ul", "ol", "table", "dl"],
  6484. brace_style: "expand",
  6485. indent_char: "\t",
  6486. indent_size: 1,
  6487. wrap_line_length: 0
  6488. },
  6489. codeViewKeepActiveButtons: ["fullscreen"]
  6490. }), $e.PLUGINS.codeView = function(c) {
  6491. var d, f, p = c.$;
  6492. function u() {
  6493. return c.$box.hasClass("fr-code-view")
  6494. }
  6495. function h() {
  6496. return f ? f.getValue() : d.val()
  6497. }
  6498. function g() {
  6499. u() && (f && f.setSize(null, c.opts.height ? c.opts.height : "auto"), c.opts.heightMin || c.opts.height ? (c.$box.find(".CodeMirror-scroll, .CodeMirror-gutters").css("min-height", c.opts.heightMin || c.opts.height), d.css("height", c.opts.height)) : c.$box.find(".CodeMirror-scroll, .CodeMirror-gutters").css("min-height", ""))
  6500. }
  6501. var m, v = !1;
  6502. function b() {
  6503. u() && c.events.trigger("blur")
  6504. }
  6505. function E() {
  6506. u() && v && c.events.trigger("focus")
  6507. }
  6508. function r(e) {
  6509. d || (! function l() {
  6510. d = p('<textarea class="fr-code" tabIndex="-1">'), c.$wp.append(d), d.attr("dir", c.opts.direction), c.$box.hasClass("fr-basic") || (m = p('<a data-cmd="html" title="Code View" class="fr-command fr-btn html-switch' + (c.helpers.isMobile() ? "" : " fr-desktop") + '" role="button" tabIndex="-1"><i class="fa fa-code"></i></button>'), c.$box.append(m), c.events.bindClick(c.$box, "a.html-switch", function() {
  6511. c.events.trigger("commands.before", ["html"]), T(!1), c.events.trigger("commands.after", ["html"])
  6512. }));
  6513. var e = function e() {
  6514. return !u()
  6515. };
  6516. c.events.on("buttons.refresh", e), c.events.on("copy", e, !0), c.events.on("cut", e, !0), c.events.on("paste", e, !0), c.events.on("destroy", A, !0), c.events.on("html.set", function() {
  6517. u() && T(!0)
  6518. }), c.events.on("codeView.update", g), c.events.on("codeView.toggle", function() {
  6519. c.$box.hasClass("fr-code-view") && T()
  6520. }), c.events.on("form.submit", function() {
  6521. u() && (c.html.set(h()), c.events.trigger("contentChanged", [], !0))
  6522. }, !0)
  6523. }(), !f && c.opts.codeMirror ? ((f = c.opts.codeMirror.fromTextArea(d.get(0), c.opts.codeMirrorOptions)).on("blur", b), f.on("focus", E)) : (c.events.$on(d, "keydown keyup change input", function() {
  6524. c.opts.height ? this.removeAttribute("rows") : (this.rows = 1, 0 === this.value.length ? this.style.height = "auto" : this.style.height = this.scrollHeight + "px")
  6525. }), c.events.$on(d, "blur", b), c.events.$on(d, "focus", E))), c.undo.saveStep(), c.html.cleanEmptyTags(), c.html.cleanWhiteTags(!0), c.core.hasFocus() && (c.core.isEmpty() || (c.selection.save(), c.$el.find('.fr-marker[data-type="true"]').first().replaceWith('<span class="fr-tmp fr-sm">F</span>'), c.$el.find('.fr-marker[data-type="false"]').last().replaceWith('<span class="fr-tmp fr-em">F</span>')));
  6526. var t = c.html.get(!1, !0);
  6527. c.$el.find("span.fr-tmp").remove(), c.$box.toggleClass("fr-code-view", !0);
  6528. var n, r, a = !1;
  6529. if (c.core.hasFocus() && (a = !0, c.events.disableBlur(), c.$el.blur()), t = (t = t.replace(/<span class="fr-tmp fr-sm">F<\/span>/, "FROALA-SM")).replace(/<span class="fr-tmp fr-em">F<\/span>/, "FROALA-EM"), c.codeBeautifier && (t = c.codeBeautifier.run(t, c.opts.codeBeautifierOptions)), f) {
  6530. n = t.indexOf("FROALA-SM"), (r = t.indexOf("FROALA-EM")) < n ? n = r : r -= 9;
  6531. var o = (t = t.replace(/FROALA-SM/g, "").replace(/FROALA-EM/g, "")).substring(0, n).length - t.substring(0, n).replace(/\n/g, "").length,
  6532. i = t.substring(0, r).length - t.substring(0, r).replace(/\n/g, "").length;
  6533. n = t.substring(0, n).length - t.substring(0, t.substring(0, n).lastIndexOf("\n") + 1).length, r = t.substring(0, r).length - t.substring(0, t.substring(0, r).lastIndexOf("\n") + 1).length, f.setSize(null, c.opts.height ? c.opts.height : "auto"), c.opts.heightMin && c.$box.find(".CodeMirror-scroll").css("min-height", c.opts.heightMin), f.setValue(t), v = !a, f.focus(), v = !0, f.setSelection({
  6534. line: o,
  6535. ch: n
  6536. }, {
  6537. line: i,
  6538. ch: r
  6539. }), f.refresh(), f.clearHistory()
  6540. } else {
  6541. n = t.indexOf("FROALA-SM"), r = t.indexOf("FROALA-EM") - 9, c.opts.heightMin && d.css("min-height", c.opts.heightMin), c.opts.height && d.css("height", c.opts.height), c.opts.heightMax && d.css("max-height", c.opts.height || c.opts.heightMax), d.val(t.replace(/FROALA-SM/g, "").replace(/FROALA-EM/g, "")).trigger("change");
  6542. var s = p(c.o_doc).scrollTop();
  6543. v = !a, d.focus(), v = !0, d.get(0).setSelectionRange(n, r), p(c.o_doc).scrollTop(s)
  6544. }
  6545. c.$tb.find(".fr-btn-grp > .fr-command, .fr-more-toolbar > .fr-command, .fr-btn-grp > .fr-btn-wrap > .fr-command, .fr-more-toolbar > .fr-btn-wrap > .fr-command").not(e).filter(function() {
  6546. return c.opts.codeViewKeepActiveButtons.indexOf(p(this).data("cmd")) < 0
  6547. }).addClass("fr-disabled").attr("aria-disabled", !0), e.addClass("fr-active").attr("aria-pressed", !0), !c.helpers.isMobile() && c.opts.toolbarInline && c.toolbar.hide()
  6548. }
  6549. function T(e) {
  6550. void 0 === e && (e = !u());
  6551. var t = c.$tb.find('.fr-command[data-cmd="html"]');
  6552. e ? (c.popups.hideAll(), r(t)) : (c.$box.toggleClass("fr-code-view", !1), function n(e) {
  6553. var t = h();
  6554. c.html.set(t), c.$el.blur(), c.$tb.find(".fr-btn-grp > .fr-command, .fr-more-toolbar > .fr-command, .fr-btn-grp > .fr-btn-wrap > .fr-command, .fr-more-toolbar > .fr-btn-wrap > .fr-command").not(e).removeClass("fr-disabled").attr("aria-disabled", !1), e.removeClass("fr-active").attr("aria-pressed", !1), c.selection.setAtStart(c.el), c.selection.restore(), c.placeholder.refresh(), c.undo.saveStep()
  6555. }(t))
  6556. }
  6557. function A() {
  6558. u() && T(!1), f && f.toTextArea(), d.val("").removeData().remove(), d = null, m && (m.remove(), m = null)
  6559. }
  6560. return {
  6561. _init: function e() {
  6562. if (c.events.on("focus", function() {
  6563. c.opts.toolbarContainer && function t() {
  6564. var e = c.$tb.find('.fr-command[data-cmd="html"]');
  6565. u() ? (c.$tb.find(".fr-btn-grp > .fr-command, .fr-more-toolbar > .fr-command").not(e).filter(function() {
  6566. return c.opts.codeViewKeepActiveButtons.indexOf(p(this).data("cmd")) < 0
  6567. }).addClass("fr-disabled").attr("aria-disabled", !1), e.addClass("fr-active").attr("aria-pressed", !1)) : (c.$tb.find(".fr-btn-grp > .fr-command, .fr-more-toolbar > .fr-command").not(e).removeClass("fr-disabled").attr("aria-disabled", !1), e.removeClass("fr-active").attr("aria-pressed", !1))
  6568. }()
  6569. }), !c.$wp) return !1
  6570. },
  6571. toggle: T,
  6572. isActive: u,
  6573. get: h
  6574. }
  6575. }, $e.RegisterCommand("html", {
  6576. title: "Code View",
  6577. undo: !1,
  6578. focus: !1,
  6579. forcedRefresh: !0,
  6580. toggle: !0,
  6581. callback: function() {
  6582. this.codeView.toggle()
  6583. },
  6584. plugin: "codeView"
  6585. }), $e.DefineIcon("html", {
  6586. NAME: "code",
  6587. SVG_KEY: "codeView"
  6588. }), Object.assign($e.POPUP_TEMPLATES, {
  6589. "textColor.picker": "[_BUTTONS_][_TEXT_COLORS_][_CUSTOM_COLOR_]",
  6590. "backgroundColor.picker": "[_BUTTONS_][_BACKGROUND_COLORS_][_CUSTOM_COLOR_]"
  6591. }), Object.assign($e.DEFAULTS, {
  6592. colorsText: ["#61BD6D", "#1ABC9C", "#54ACD2", "#2C82C9", "#9365B8", "#475577", "#CCCCCC", "#41A85F", "#00A885", "#3D8EB9", "#2969B0", "#553982", "#28324E", "#000000", "#F7DA64", "#FBA026", "#EB6B56", "#E25041", "#A38F84", "#EFEFEF", "#FFFFFF", "#FAC51C", "#F37934", "#D14841", "#B8312F", "#7C706B", "#D1D5D8", "REMOVE"],
  6593. colorsBackground: ["#61BD6D", "#1ABC9C", "#54ACD2", "#2C82C9", "#9365B8", "#475577", "#CCCCCC", "#41A85F", "#00A885", "#3D8EB9", "#2969B0", "#553982", "#28324E", "#000000", "#F7DA64", "#FBA026", "#EB6B56", "#E25041", "#A38F84", "#EFEFEF", "#FFFFFF", "#FAC51C", "#F37934", "#D14841", "#B8312F", "#7C706B", "#D1D5D8", "REMOVE"],
  6594. colorsStep: 7,
  6595. colorsHEXInput: !0,
  6596. colorsButtons: ["colorsBack", "|", "-"]
  6597. }), $e.PLUGINS.colors = function(m) {
  6598. var v = m.$,
  6599. s = '<div class="fr-color-hex-layer fr-active fr-layer" id="fr-color-hex-layer- \n '.concat(m.id, '"><div class="fr-input-line"><input maxlength="7" id="[ID]"\n type="text" placeholder="').concat(m.language.translate("HEX Color"), '" \n tabIndex="1" aria-required="true"></div><div class="fr-action-buttons"><button \n type="button" class="fr-command fr-submit" data-cmd="[COMMAND]" tabIndex="2" role="button">\n ').concat(m.language.translate("OK"), "</button></div></div>");
  6600. function l(e) {
  6601. for (var t = "text" === e ? m.opts.colorsText : m.opts.colorsBackground, n = '<div class="fr-color-set fr-'.concat(e, '-color fr-selected-set">'), r = 0; r < t.length; r++) 0 !== r && r % m.opts.colorsStep == 0 && (n += "<br>"), "REMOVE" !== t[r] ? n += '<span class="fr-command fr-select-color" style="background:'.concat(t[r], ';" \n tabIndex="-1" aria-selected="false" role="button" data-cmd="apply').concat(e, 'Color" \n data-param1="').concat(t[r], '"><span class="fr-sr-only"> ').concat(m.language.translate("Color")).concat(t[r], " \n &nbsp;&nbsp;&nbsp;</span></span>") : n += '<span class="fr-command fr-select-color" data-cmd="apply'.concat(e, 'Color"\n tabIndex="-1" role="button" data-param1="REMOVE" \n title="').concat(m.language.translate("Clear Formatting"), '">').concat(m.icon.create("remove"), ' \n <span class="fr-sr-only"> ').concat(m.language.translate("Clear Formatting"), " </span></span>");
  6602. return n + "</div>"
  6603. }
  6604. function c(e) {
  6605. var t, n = m.popups.get("".concat(e, "Color.picker")),
  6606. r = v(m.selection.element());
  6607. t = "background" === e ? "background-color" : "color";
  6608. var a = n.find(".fr-".concat(e, "-color .fr-select-color"));
  6609. for (a.find(".fr-selected-color").remove(), a.removeClass("fr-active-item"), a.not('[data-param1="REMOVE"]').attr("aria-selected", !1); r.get(0) !== m.el;) {
  6610. if ("transparent" !== r.css(t) && "rgba(0, 0, 0, 0)" !== r.css(t)) {
  6611. var o = n.find(".fr-".concat(e, '-color .fr-select-color[data-param1="').concat(m.helpers.RGBToHex(r.css(t)), '"]'));
  6612. o.append('<span class="fr-selected-color" aria-hidden="true">\uf00c</span>'), o.addClass("fr-active-item").attr("aria-selected", !0);
  6613. break
  6614. }
  6615. r = r.parent()
  6616. }! function i(e) {
  6617. var t = m.popups.get("".concat(e, "Color.picker")),
  6618. n = t.find(".fr-".concat(e, "-color .fr-active-item")).attr("data-param1"),
  6619. r = t.find(".fr-color-hex-layer input");
  6620. n || (n = "");
  6621. r.length && v(r.val(n).input).trigger("change")
  6622. }(e)
  6623. }
  6624. function r(e) {
  6625. "REMOVE" !== e ? m.format.applyStyle("background-color", m.helpers.HEXtoRGB(e)) : m.format.removeStyle("background-color"), m.popups.hide("backgroundColor.picker")
  6626. }
  6627. function a(e) {
  6628. "REMOVE" !== e ? m.format.applyStyle("color", m.helpers.HEXtoRGB(e)) : m.format.removeStyle("color"), m.popups.hide("textColor.picker")
  6629. }
  6630. return {
  6631. showColorsPopup: function d(e) {
  6632. var t = m.$tb.find('.fr-command[data-cmd="'.concat(e, '"]')),
  6633. n = m.popups.get("".concat(e, ".picker"));
  6634. if (n || (n = function i(e) {
  6635. var t = "";
  6636. m.opts.toolbarInline && 0 < m.opts.colorsButtons.length && (t += '<div class="fr-buttons fr-colors-buttons fr-tabs">\n '.concat(m.button.buildList(m.opts.colorsButtons), "\n </div>"));
  6637. var n, r = "";
  6638. n = "textColor" === e ? (m.opts.colorsHEXInput && (r = s.replace(/\[ID\]/g, "fr-color-hex-layer-text-".concat(m.id)).replace(/\[COMMAND\]/g, "customTextColor")), {
  6639. buttons: t,
  6640. text_colors: l("text"),
  6641. custom_color: r
  6642. }) : (m.opts.colorsHEXInput && (r = s.replace(/\[ID\]/g, "fr-color-hex-layer-background-".concat(m.id)).replace(/\[COMMAND\]/g, "customBackgroundColor")), {
  6643. buttons: t,
  6644. background_colors: l("background"),
  6645. custom_color: r
  6646. });
  6647. var a = m.popups.create("".concat(e, ".picker"), n);
  6648. return function o(h, g) {
  6649. m.events.on("popup.tab", function(e) {
  6650. var t = v(e.currentTarget);
  6651. if (!m.popups.isVisible(g) || !t.is("span")) return !0;
  6652. var n = e.which,
  6653. r = !0;
  6654. if ($e.KEYCODE.TAB === n) {
  6655. var a = h.find(".fr-buttons");
  6656. r = !m.accessibility.focusToolbar(a, !!e.shiftKey)
  6657. } else if ($e.KEYCODE.ARROW_UP === n || $e.KEYCODE.ARROW_DOWN === n || $e.KEYCODE.ARROW_LEFT === n || $e.KEYCODE.ARROW_RIGHT === n) {
  6658. if (t.is("span.fr-select-color")) {
  6659. var o = t.parent().find("span.fr-select-color"),
  6660. i = o.index(t),
  6661. s = m.opts.colorsStep,
  6662. l = Math.floor(o.length / s),
  6663. c = i % s,
  6664. d = Math.floor(i / s),
  6665. f = d * s + c,
  6666. p = l * s;
  6667. $e.KEYCODE.ARROW_UP === n ? f = ((f - s) % p + p) % p : $e.KEYCODE.ARROW_DOWN === n ? f = (f + s) % p : $e.KEYCODE.ARROW_LEFT === n ? f = ((f - 1) % p + p) % p : $e.KEYCODE.ARROW_RIGHT === n && (f = (f + 1) % p);
  6668. var u = v(o.get(f));
  6669. m.events.disableBlur(), u.focus(), r = !1
  6670. }
  6671. } else $e.KEYCODE.ENTER === n && (m.button.exec(t), r = !1);
  6672. return !1 === r && (e.preventDefault(), e.stopPropagation()), r
  6673. }, !0)
  6674. }(a, "".concat(e, ".picker")), a
  6675. }(e)), !n.hasClass("fr-active"))
  6676. if (m.popups.setContainer("".concat(e, ".picker"), m.$tb), c("textColor" === e ? "text" : "background"), t.isVisible()) {
  6677. var r = m.button.getPosition(t),
  6678. a = r.left,
  6679. o = r.top;
  6680. m.popups.show("".concat(e, ".picker"), a, o, t.outerHeight())
  6681. } else m.position.forSelection(n), m.popups.show("".concat(e, ".picker"))
  6682. },
  6683. background: r,
  6684. customColor: function o(e) {
  6685. var t = m.popups.get("".concat(e, "Color.picker")).find(".fr-color-hex-layer input");
  6686. if (t.length) {
  6687. var n = t.val();
  6688. "background" === e ? r(n) : a(n)
  6689. }
  6690. },
  6691. text: a,
  6692. back: function e() {
  6693. m.popups.hide("textColor.picker"), m.popups.hide("backgroundColor.picker"), m.toolbar.showInline()
  6694. }
  6695. }
  6696. }, $e.DefineIcon("textColor", {
  6697. NAME: "tint",
  6698. SVG_KEY: "textColor"
  6699. }), $e.RegisterCommand("textColor", {
  6700. title: "Text Color",
  6701. undo: !1,
  6702. focus: !0,
  6703. refreshOnCallback: !1,
  6704. popup: !0,
  6705. callback: function() {
  6706. this.popups.isVisible("textColor.picker") ? (this.$el.find(".fr-marker").length && (this.events.disableBlur(), this.selection.restore()), this.popups.hide("textColor.picker")) : this.colors.showColorsPopup("textColor")
  6707. }
  6708. }), $e.RegisterCommand("applytextColor", {
  6709. undo: !0,
  6710. callback: function(e, t) {
  6711. this.colors.text(t)
  6712. }
  6713. }), $e.RegisterCommand("customTextColor", {
  6714. title: "OK",
  6715. undo: !0,
  6716. callback: function() {
  6717. this.colors.customColor("text")
  6718. }
  6719. }), $e.DefineIcon("backgroundColor", {
  6720. NAME: "paint-brush",
  6721. SVG_KEY: "backgroundColor"
  6722. }), $e.RegisterCommand("backgroundColor", {
  6723. title: "Background Color",
  6724. undo: !1,
  6725. focus: !0,
  6726. refreshOnCallback: !1,
  6727. popup: !0,
  6728. callback: function() {
  6729. this.popups.isVisible("backgroundColor.picker") ? (this.$el.find(".fr-marker").length && (this.events.disableBlur(), this.selection.restore()), this.popups.hide("backgroundColor.picker")) : this.colors.showColorsPopup("backgroundColor")
  6730. }
  6731. }), $e.RegisterCommand("applybackgroundColor", {
  6732. undo: !0,
  6733. callback: function(e, t) {
  6734. this.colors.background(t)
  6735. }
  6736. }), $e.RegisterCommand("customBackgroundColor", {
  6737. title: "OK",
  6738. undo: !0,
  6739. callback: function() {
  6740. this.colors.customColor("background")
  6741. }
  6742. }), $e.DefineIcon("colorsBack", {
  6743. NAME: "arrow-left",
  6744. SVG_KEY: "back"
  6745. }), $e.RegisterCommand("colorsBack", {
  6746. title: "Back",
  6747. undo: !1,
  6748. focus: !1,
  6749. back: !0,
  6750. refreshAfterCallback: !1,
  6751. callback: function() {
  6752. this.colors.back()
  6753. }
  6754. }), $e.DefineIcon("remove", {
  6755. NAME: "eraser",
  6756. SVG_KEY: "remove"
  6757. }), Object.assign($e.DEFAULTS, {
  6758. dragInline: !0
  6759. }), $e.PLUGINS.draggable = function(d) {
  6760. var f, p = d.$;
  6761. function e(e) {
  6762. return !(!e.originalEvent || !e.originalEvent.target || e.originalEvent.target.nodeType !== Node.TEXT_NODE) || (e.target && "A" === e.target.tagName && 1 === e.target.childNodes.length && "IMG" === e.target.childNodes[0].tagName && (e.target = e.target.childNodes[0]), p(e.target).hasClass("fr-draggable") ? (d.undo.canDo() || d.undo.saveStep(), d.opts.dragInline ? d.$el.attr("contenteditable", !0) : d.$el.attr("contenteditable", !1), d.opts.toolbarInline && d.toolbar.hide(), p(e.target).addClass("fr-dragging"), d.browser.msie || d.browser.edge || d.selection.clear(), void e.originalEvent.dataTransfer.setData("text", "Froala")) : (e.preventDefault(), !1))
  6763. }
  6764. function u(e) {
  6765. return !(e && ("HTML" === e.tagName || "BODY" === e.tagName || d.node.isElement(e)))
  6766. }
  6767. function h(e, t, n) {
  6768. if (d.opts.iframe) {
  6769. var r = d.helpers.getPX(d.$wp.find(".fr-iframe").css("padding-top")),
  6770. a = d.helpers.getPX(d.$wp.find(".fr-iframe").css("padding-left"));
  6771. e += d.$iframe.offset().top + r, t += d.$iframe.offset().left + a
  6772. }
  6773. f.offset().top !== e && f.css("top", e), f.offset().left !== t && f.css("left", t), f.width() !== n && f.css("width", n)
  6774. }
  6775. function t(e) {
  6776. e.originalEvent.dataTransfer.dropEffect = "move", d.opts.dragInline ? (! function n() {
  6777. for (var e = null, t = 0; t < $e.INSTANCES.length; t++)
  6778. if ((e = $e.INSTANCES[t].$el.find(".fr-dragging")).length) return e.get(0)
  6779. }() || d.browser.msie || d.browser.edge) && e.preventDefault() : (e.preventDefault(), function c(e) {
  6780. var t = d.doc.elementFromPoint(e.originalEvent.pageX - d.win.pageXOffset, e.originalEvent.pageY - d.win.pageYOffset);
  6781. if (!u(t)) {
  6782. for (var n = 0, r = t; !u(r) && r === t && 0 < e.originalEvent.pageY - d.win.pageYOffset - n;) n++, r = d.doc.elementFromPoint(e.originalEvent.pageX - d.win.pageXOffset, e.originalEvent.pageY - d.win.pageYOffset - n);
  6783. (!u(r) || f && 0 === d.$el.find(r).length && r !== f.get(0)) && (r = null);
  6784. for (var a = 0, o = t; !u(o) && o === t && e.originalEvent.pageY - d.win.pageYOffset + a < p(d.doc).height();) a++, o = d.doc.elementFromPoint(e.originalEvent.pageX - d.win.pageXOffset, e.originalEvent.pageY - d.win.pageYOffset + a);
  6785. (!u(o) || f && 0 === d.$el.find(o).length && o !== f.get(0)) && (o = null), t = null === o && r ? r : o && null === r ? o : o && r ? n < a ? r : o : null
  6786. }
  6787. if (p(t).hasClass("fr-drag-helper")) return !1;
  6788. if (t && !d.node.isBlock(t) && (t = d.node.blockParent(t)), t && 0 <= ["TD", "TH", "TR", "THEAD", "TBODY"].indexOf(t.tagName) && (t = p(t).parents("table").get(0)), t && 0 <= ["LI"].indexOf(t.tagName) && (t = p(t).parents("UL, OL").get(0)), t && !p(t).hasClass("fr-drag-helper")) {
  6789. var i;
  6790. f || ($e.$draggable_helper || ($e.$draggable_helper = p(document.createElement("div")).attr("class", "fr-drag-helper")), f = $e.$draggable_helper, d.events.on("shared.destroy", function() {
  6791. f.html("").removeData().remove(), f = null
  6792. }, !0)), i = e.originalEvent.pageY < p(t).offset().top + p(t).outerHeight() / 2;
  6793. var s = p(t),
  6794. l = 0;
  6795. i || 0 !== s.next().length ? (i || (s = s.next()), "before" === f.data("fr-position") && s.is(f.data("fr-tag")) || (0 < s.prev().length && (l = parseFloat(s.prev().css("margin-bottom")) || 0), l = Math.max(l, parseFloat(s.css("margin-top")) || 0), h(s.offset().top - l / 2 - d.$box.offset().top, s.offset().left - d.win.pageXOffset - d.$box.offset().left, s.width()), f.data("fr-position", "before"))) : "after" === f.data("fr-position") && s.is(f.data("fr-tag")) || (l = parseFloat(s.css("margin-bottom")) || 0, h(s.offset().top + p(t).height() + l / 2 - d.$box.offset().top, s.offset().left - d.win.pageXOffset - d.$box.offset().left, s.width()), f.data("fr-position", "after")), f.data("fr-tag", s), f.addClass("fr-visible"), d.$box.append(f)
  6796. } else f && 0 < d.$box.find(f).length && f.removeClass("fr-visible")
  6797. }(e))
  6798. }
  6799. function n(e) {
  6800. e.originalEvent.dataTransfer.dropEffect = "move", d.opts.dragInline || e.preventDefault()
  6801. }
  6802. function r(e) {
  6803. d.$el.attr("contenteditable", !0);
  6804. var t = d.$el.find(".fr-dragging");
  6805. f && f.hasClass("fr-visible") && d.$box.find(f).length ? a(e) : t.length && (e.preventDefault(), e.stopPropagation()), f && d.$box.find(f).length && f.removeClass("fr-visible"), t.removeClass("fr-dragging")
  6806. }
  6807. function a(e) {
  6808. var t, n;
  6809. d.$el.attr("contenteditable", !0);
  6810. for (var r = 0; r < $e.INSTANCES.length; r++)
  6811. if ((t = $e.INSTANCES[r].$el.find(".fr-dragging")).length) {
  6812. n = $e.INSTANCES[r];
  6813. break
  6814. }
  6815. if (t.length) {
  6816. if (e.preventDefault(), e.stopPropagation(), f && f.hasClass("fr-visible") && d.$box.find(f).length) f.data("fr-tag")[f.data("fr-position")]('<span class="fr-marker"></span>'), f.removeClass("fr-visible");
  6817. else if (!1 === d.markers.insertAtPoint(e.originalEvent)) return !1;
  6818. if (t.removeClass("fr-dragging"), !1 === (t = d.events.chainTrigger("element.beforeDrop", t))) return !1;
  6819. var a = t;
  6820. if (t.parent().is("A") && 1 === t.parent().get(0).childNodes.length && (a = t.parent()), d.core.isEmpty()) d.events.focus();
  6821. else d.$el.find(".fr-marker").replaceWith($e.MARKERS), d.selection.restore(); if (n === d || d.undo.canDo() || d.undo.saveStep(), d.core.isEmpty()) d.$el.html(a);
  6822. else {
  6823. var o = d.markers.insert();
  6824. 0 === a.find(o).length ? p(o).replaceWith(a) : 0 === t.find(o).length && p(o).replaceWith(t), t.after($e.MARKERS), d.selection.restore()
  6825. }
  6826. return d.popups.hideAll(), d.selection.save(), d.$el.find(d.html.emptyBlockTagsQuery()).not("TD, TH, LI, .fr-inner").not(d.opts.htmlAllowedEmptyTags.join(",")).remove(), d.html.wrap(), d.html.fillEmptyBlocks(), d.selection.restore(), d.undo.saveStep(), d.opts.iframe && d.size.syncIframe(), n !== d && (n.popups.hideAll(), n.$el.find(n.html.emptyBlockTagsQuery()).not("TD, TH, LI, .fr-inner").remove(), n.html.wrap(), n.html.fillEmptyBlocks(), n.undo.saveStep(), n.events.trigger("element.dropped"), n.opts.iframe && n.size.syncIframe()), d.events.trigger("element.dropped", [a]), !1
  6827. }
  6828. f && f.removeClass("fr-visible"), d.undo.canDo() || d.undo.saveStep(), setTimeout(function() {
  6829. d.undo.saveStep()
  6830. }, 0)
  6831. }
  6832. function o(e) {
  6833. if (e && "DIV" === e.tagName && d.node.hasClass(e, "fr-drag-helper")) e.parentNode.removeChild(e);
  6834. else if (e && e.nodeType === Node.ELEMENT_NODE)
  6835. for (var t = e.querySelectorAll("div.fr-drag-helper"), n = 0; n < t.length; n++) t[n].parentNode.removeChild(t[n])
  6836. }
  6837. return {
  6838. _init: function i() {
  6839. d.opts.enter === $e.ENTER_BR && (d.opts.dragInline = !0), d.events.on("dragstart", e, !0), d.events.on("dragover", t, !0), d.events.on("dragenter", n, !0), d.events.on("document.dragend", r, !0), d.events.on("document.drop", r, !0), d.events.on("drop", a, !0), d.events.on("html.processGet", o)
  6840. }
  6841. }
  6842. }, Object.assign($e.DEFAULTS, {
  6843. editInPopup: !1
  6844. }), $e.MODULES.editInPopup = function(r) {
  6845. function e() {
  6846. r.events.$on(r.$el, r._mouseup, function() {
  6847. setTimeout(function() {
  6848. ! function n() {
  6849. var e, t = r.popups.get("text.edit");
  6850. e = "INPUT" === r.el.tagName ? r.$el.attr("placeholder") : r.$el.text(), t.find("input").val(e).trigger("change"), r.popups.setContainer("text.edit", r.$sc), r.popups.show("text.edit", r.$el.offset().left + r.$el.outerWidth() / 2, r.$el.offset().top + r.$el.outerHeight(), r.$el.outerHeight())
  6851. }()
  6852. }, 10)
  6853. })
  6854. }
  6855. return {
  6856. _init: function n() {
  6857. r.opts.editInPopup && (function t() {
  6858. var e = {
  6859. edit: '<div id="fr-text-edit-'.concat(r.id, '" class="fr-layer fr-text-edit-layer"><div class="fr-input-line"><input type="text" placeholder="').concat(r.language.translate("Text"), '" tabIndex="1"></div><div class="fr-action-buttons"><button type="button" class="fr-command fr-submit" data-cmd="updateText" tabIndex="2">').concat(r.language.translate("Update"), "</button></div></div>")
  6860. };
  6861. r.popups.create("text.edit", e)
  6862. }(), e())
  6863. },
  6864. update: function t() {
  6865. var e = r.popups.get("text.edit").find("input").val();
  6866. 0 === e.length && (e = r.opts.placeholderText), "INPUT" === r.el.tagName ? r.$el.attr("placeholder", e) : r.$el.text(e), r.events.trigger("contentChanged"), r.popups.hide("text.edit")
  6867. }
  6868. }
  6869. }, $e.RegisterCommand("updateText", {
  6870. focus: !1,
  6871. undo: !1,
  6872. callback: function() {
  6873. this.editInPopup.update()
  6874. }
  6875. }), Object.assign($e.POPUP_TEMPLATES, {
  6876. emoticons: "[_BUTTONS_][_CUSTOM_LAYER_]"
  6877. }), Object.assign($e.DEFAULTS, {
  6878. emoticonsSet: [{
  6879. id: "people",
  6880. name: "Smileys & People",
  6881. code: "1f600",
  6882. emoticons: [{
  6883. code: "1f600",
  6884. desc: "Grinning face"
  6885. }, {
  6886. code: "1f601",
  6887. desc: "Grinning Face with Smiling Eyes"
  6888. }, {
  6889. code: "1f602",
  6890. desc: "Face with Tears of Joy"
  6891. }, {
  6892. code: "1f603",
  6893. desc: "Smiling Face with Open Mouth"
  6894. }, {
  6895. code: "1f604",
  6896. desc: "Smiling Face with Open Mouth and Smiling Eyes"
  6897. }, {
  6898. code: "1f605",
  6899. desc: "Smiling Face with Open Mouth and Cold Sweat"
  6900. }, {
  6901. code: "1f606",
  6902. desc: "Smiling Face with Open Mouth and Tightly-Closed Eyes"
  6903. }, {
  6904. code: "1f609",
  6905. desc: "Winking Face"
  6906. }, {
  6907. code: "1f60a",
  6908. desc: "Smiling Face with Smiling Eyes"
  6909. }, {
  6910. code: "1f608",
  6911. desc: "Face Savouring Delicious Food"
  6912. }, {
  6913. code: "1f60e",
  6914. desc: "Smiling Face with Sunglasses"
  6915. }, {
  6916. code: "1f60d",
  6917. desc: "Smiling Face with Heart-Shaped Eyes"
  6918. }, {
  6919. code: "1f618",
  6920. desc: "Face Throwing a Kiss"
  6921. }, {
  6922. code: "1f617",
  6923. desc: "Kissing Face"
  6924. }, {
  6925. code: "1f619",
  6926. desc: "Kissing Face with Smiling Eyes"
  6927. }, {
  6928. code: "1f61a",
  6929. desc: "Kissing Face with Closed Eyes"
  6930. }, {
  6931. code: "263a",
  6932. desc: "White Smiling Face"
  6933. }, {
  6934. code: "1f642",
  6935. desc: "Slightly Smiling Face"
  6936. }, {
  6937. code: "1f610",
  6938. desc: "Neutral Face"
  6939. }, {
  6940. code: "1f611",
  6941. desc: "Expressionless Face"
  6942. }, {
  6943. code: "1f636",
  6944. desc: "Face Without Mouth"
  6945. }, {
  6946. code: "1f60f",
  6947. desc: "Smirking Face"
  6948. }, {
  6949. code: "1f623",
  6950. desc: "Persevering Face"
  6951. }, {
  6952. code: "1f625",
  6953. desc: "Disappointed but Relieved Face"
  6954. }, {
  6955. code: "1f62e",
  6956. desc: "Face with Open Mouth"
  6957. }, {
  6958. code: "1f62f",
  6959. desc: "Hushed Face"
  6960. }, {
  6961. code: "1f62a",
  6962. desc: "Sleepy Face"
  6963. }, {
  6964. code: "1f62b",
  6965. desc: "Tired Face"
  6966. }, {
  6967. code: "1f634",
  6968. desc: "Sleeping Face"
  6969. }, {
  6970. code: "1f60c",
  6971. desc: "Relieved Face"
  6972. }, {
  6973. code: "1f61b",
  6974. desc: "Face with Stuck-out Tongue"
  6975. }, {
  6976. code: "1f61c",
  6977. desc: "Face with Stuck-out Tongue and Winking Eye"
  6978. }, {
  6979. code: "1f61d",
  6980. desc: "Face with Stuck-out Tongue and Tightly-Closed Eyes"
  6981. }, {
  6982. code: "1f612",
  6983. desc: "Unamused Face"
  6984. }, {
  6985. code: "1f613",
  6986. desc: "Face with Cold Sweat"
  6987. }, {
  6988. code: "1f613",
  6989. desc: "Face with Cold Sweat"
  6990. }, {
  6991. code: "1f614",
  6992. desc: "Pensive Face"
  6993. }, {
  6994. code: "1f615",
  6995. desc: "Confused Face"
  6996. }, {
  6997. code: "1f632",
  6998. desc: "Astonished Face"
  6999. }, {
  7000. code: "1f616",
  7001. desc: "Confounded Face"
  7002. }, {
  7003. code: "1f61e",
  7004. desc: "Disappointed Face"
  7005. }, {
  7006. code: "1f61f",
  7007. desc: "Worried Face"
  7008. }, {
  7009. code: "1f624",
  7010. desc: "Face with Look of Triumph"
  7011. }, {
  7012. code: "1f622",
  7013. desc: "Crying Face"
  7014. }, {
  7015. code: "1f62d",
  7016. desc: "Loudly Crying Face"
  7017. }, {
  7018. code: "1f626",
  7019. desc: "Frowning Face with Open Mouth"
  7020. }, {
  7021. code: "1f627",
  7022. desc: "Anguished Face"
  7023. }, {
  7024. code: "1f628",
  7025. desc: "Fearful Face"
  7026. }, {
  7027. code: "1f629",
  7028. desc: "Weary Face"
  7029. }, {
  7030. code: "1f62c",
  7031. desc: "Grimacing Face"
  7032. }, {
  7033. code: "1f630",
  7034. desc: "Face with Open Mouth and Cold Sweat"
  7035. }, {
  7036. code: "1f631",
  7037. desc: "Face Screaming in Fear"
  7038. }, {
  7039. code: "1f633",
  7040. desc: "Flushed Face"
  7041. }, {
  7042. code: "1f635",
  7043. desc: "Dizzy Face"
  7044. }, {
  7045. code: "1f621",
  7046. desc: "Pouting Face"
  7047. }, {
  7048. code: "1f620",
  7049. desc: "Angry Face"
  7050. }, {
  7051. code: "1f637",
  7052. desc: "Face with Medical Mask"
  7053. }, {
  7054. code: "1f607",
  7055. desc: "Smiling Face with Halo"
  7056. }, {
  7057. code: "1f608",
  7058. desc: "Smiling Face with Horns"
  7059. }, {
  7060. code: "1f47f",
  7061. desc: "Imp"
  7062. }, {
  7063. code: "1f479",
  7064. desc: "Japanese Ogre"
  7065. }, {
  7066. code: "1f47a",
  7067. desc: "Japanese Goblin"
  7068. }, {
  7069. code: "1f480",
  7070. desc: "Skull"
  7071. }, {
  7072. code: "1f47b",
  7073. desc: "Ghost"
  7074. }, {
  7075. code: "1f47d",
  7076. desc: "Extraterrestrial Alien"
  7077. }, {
  7078. code: "1f47e",
  7079. desc: "Alien Monster"
  7080. }, {
  7081. code: "1f4a9",
  7082. desc: "Pile of Poo"
  7083. }, {
  7084. code: "1f63a",
  7085. desc: "Smiling Cat Face with Open Mouth"
  7086. }, {
  7087. code: "1f638",
  7088. desc: "Grinning Cat Face with Smiling Eyes"
  7089. }, {
  7090. code: "1f639",
  7091. desc: "Cat Face with Tears of Joy"
  7092. }, {
  7093. code: "1f63b",
  7094. desc: "Smiling Cat Face with Heart-Shaped Eyes"
  7095. }, {
  7096. code: "1f63c",
  7097. desc: "Cat Face with Wry Smile"
  7098. }, {
  7099. code: "1f63d",
  7100. desc: "Kissing Cat Face with Closed Eyes"
  7101. }, {
  7102. code: "1f640",
  7103. desc: "Weary Cat Face"
  7104. }, {
  7105. code: "1f63f",
  7106. desc: "Crying Cat Face"
  7107. }, {
  7108. code: "1f63e",
  7109. desc: "Pouting Cat Face"
  7110. }, {
  7111. code: "1f648",
  7112. desc: "See-No-Evil Monkey"
  7113. }, {
  7114. code: "1f649",
  7115. desc: "Hear-No-Evil Monkey"
  7116. }, {
  7117. code: "1f64a",
  7118. desc: "Speak-No-Evil Monkey"
  7119. }, {
  7120. code: "1f476",
  7121. desc: "Baby"
  7122. }, {
  7123. code: "1f466",
  7124. desc: "Boy"
  7125. }, {
  7126. code: "1f467",
  7127. desc: "Girl"
  7128. }, {
  7129. code: "1f468",
  7130. desc: "Man"
  7131. }, {
  7132. code: "1f469",
  7133. desc: "Woman"
  7134. }, {
  7135. code: "1f474",
  7136. desc: "Older Man"
  7137. }, {
  7138. code: "1f475",
  7139. desc: "Older Woman"
  7140. }, {
  7141. code: "1f46e",
  7142. desc: "Police Officer"
  7143. }, {
  7144. code: "1f482",
  7145. desc: " Guardsman"
  7146. }, {
  7147. code: "1f477",
  7148. desc: " Construction Worker"
  7149. }, {
  7150. code: "1f478",
  7151. desc: "Princess"
  7152. }, {
  7153. code: "1f473",
  7154. desc: "Man with Turban"
  7155. }, {
  7156. code: "1f472",
  7157. desc: "Man with Gua Pi Mao"
  7158. }, {
  7159. code: "1f471",
  7160. desc: "Person with Blond Hair"
  7161. }, {
  7162. code: "1f470",
  7163. desc: "Bride with Veil"
  7164. }, {
  7165. code: "1f47c",
  7166. desc: "Baby Angel"
  7167. }, {
  7168. code: "1f385",
  7169. desc: "Father Christmas"
  7170. }, {
  7171. code: "1f64e",
  7172. desc: "Person with Pouting Face"
  7173. }, {
  7174. code: "1f645",
  7175. desc: "Face with No Good Gesture"
  7176. }, {
  7177. code: "1f646",
  7178. desc: "Face with Ok Gesture"
  7179. }, {
  7180. code: "1f481",
  7181. desc: "Information Desk Person"
  7182. }, {
  7183. code: "1f64b",
  7184. desc: "Happy Person Raising One Hand"
  7185. }, {
  7186. code: "1f647",
  7187. desc: "Person Bowing Deeply"
  7188. }, {
  7189. code: "1f486",
  7190. desc: "Face Massage"
  7191. }, {
  7192. code: "1f487",
  7193. desc: "Haircut"
  7194. }, {
  7195. code: "1f6b6",
  7196. desc: "Pedestrian"
  7197. }, {
  7198. code: "1f3c3",
  7199. desc: "Runner"
  7200. }, {
  7201. code: "1f483",
  7202. desc: "Dancer"
  7203. }, {
  7204. code: "1f46f",
  7205. desc: "Woman with Bunny Ears"
  7206. }, {
  7207. code: "1f6c0",
  7208. desc: "Bath"
  7209. }, {
  7210. code: "1f464",
  7211. desc: "Bust in Silhouette"
  7212. }, {
  7213. code: "1f465",
  7214. desc: "Busts in Silhouette"
  7215. }, {
  7216. code: "1f3c7",
  7217. desc: "Horse Racing"
  7218. }, {
  7219. code: "1f3c2",
  7220. desc: " Snowboarder"
  7221. }, {
  7222. code: "1f3c4",
  7223. desc: " Surfer"
  7224. }, {
  7225. code: "1f6a3",
  7226. desc: " Rowboat"
  7227. }, {
  7228. code: "1f3ca",
  7229. desc: " Swimmer"
  7230. }, {
  7231. code: "1f6b4",
  7232. desc: " Bicyclist"
  7233. }, {
  7234. code: "1f6b5",
  7235. desc: "Mountain Bicyclist"
  7236. }, {
  7237. code: "1f46b",
  7238. desc: " Man and Woman Holding Hands"
  7239. }, {
  7240. code: "1f46c",
  7241. desc: "Two Men Holding Hands"
  7242. }, {
  7243. code: "1f46d",
  7244. desc: "Two Women Holding Hands"
  7245. }, {
  7246. code: "1f48f",
  7247. desc: "Kiss"
  7248. }, {
  7249. code: "1f468-2764-1f48b-1f468",
  7250. uCode: "\ud83d\udc68\u200d\u2764\ufe0f\u200d\ud83d\udc8b\u200d\ud83d\udc68",
  7251. desc: "Man Kiss Man"
  7252. }, {
  7253. code: "1f469-2764-1f48b-1f469",
  7254. uCode: "\ud83d\udc69\u200d\u2764\ufe0f\u200d\ud83d\udc69",
  7255. desc: "Woman Kiss Woman"
  7256. }, {
  7257. code: "1f491",
  7258. desc: "Couple with Heart"
  7259. }, {
  7260. code: "1f468-2764-1f468",
  7261. uCode: "\ud83d\udc68\u200d\u2764\ufe0f\u200d\ud83d\udc68",
  7262. desc: "Man Heart Man"
  7263. }, {
  7264. code: "1f469-2764-1f469",
  7265. uCode: "\ud83d\udc69\u200d\u2764\ufe0f\u200d\ud83d\udc69",
  7266. desc: "Woman Heart Woman"
  7267. }, {
  7268. code: "1f46a",
  7269. desc: "Family"
  7270. }, {
  7271. code: "1f468",
  7272. desc: "Man Woman Boy"
  7273. }, {
  7274. code: "1f468-1f469-1f467",
  7275. desc: "Man Woman Girl"
  7276. }, {
  7277. code: "1f468-1f469-1f467-1f466",
  7278. desc: "Man Woman Girl Boy"
  7279. }, {
  7280. code: "1f468-1f469-1f466-1f466",
  7281. desc: "Man Woman Boy Boy"
  7282. }, {
  7283. code: "1f468-1f469-1f467-1f467",
  7284. desc: "Man Woman Girl Girl"
  7285. }, {
  7286. code: "1f468-1f468-1f466",
  7287. desc: "Man Man Boy"
  7288. }, {
  7289. code: "1f468-1f468-1f467",
  7290. desc: "Man Man Girl"
  7291. }, {
  7292. code: "1f468-1f468-1f467-1f466",
  7293. desc: "Man Man Girl Boy"
  7294. }, {
  7295. code: "1f468-1f468-1f466-1f466",
  7296. desc: "Man Man Boy Boy"
  7297. }, {
  7298. code: "1f469-1f469-1f466",
  7299. desc: "Woman Woman Boy"
  7300. }, {
  7301. code: "1f469-1f469-1f467",
  7302. desc: "Woman Woman Girl"
  7303. }, {
  7304. code: "1f469-1f469-1f467-1f466",
  7305. desc: "Woman Woman Girl Boy"
  7306. }, {
  7307. code: "1f469-1f469-1f467-1f467",
  7308. desc: "Woman Woman Girl Girl"
  7309. }, {
  7310. code: "1f4aa",
  7311. desc: "Flexed Biceps"
  7312. }, {
  7313. code: "1f448",
  7314. desc: "White Left Pointing Backhand Index"
  7315. }, {
  7316. code: "1f449",
  7317. desc: "White Right Pointing Backhand Index"
  7318. }, {
  7319. code: "1f446",
  7320. desc: "White Up Pointing Backhand Index"
  7321. }, {
  7322. code: "1f447",
  7323. desc: "White Down Pointing Backhand Index"
  7324. }, {
  7325. code: "270c",
  7326. desc: "Victory Hand"
  7327. }, {
  7328. code: "270b",
  7329. desc: "Raised Hand"
  7330. }, {
  7331. code: "1f44c",
  7332. desc: "Ok Hand Sign"
  7333. }, {
  7334. code: "1f44d",
  7335. desc: "Thumbs Up Sign"
  7336. }, {
  7337. code: "1f44e",
  7338. desc: "Thumbs Down Sign"
  7339. }, {
  7340. code: "270a",
  7341. desc: "Raised Fist"
  7342. }, {
  7343. code: "1f44a",
  7344. desc: "Fisted Hand Sign"
  7345. }, {
  7346. code: "1f44b",
  7347. desc: "Waving Hand Sign"
  7348. }, {
  7349. code: "1f44f",
  7350. desc: "Clapping Hands Sign"
  7351. }, {
  7352. code: "1f450",
  7353. desc: "Open Hands Sign"
  7354. }, {
  7355. code: "1f64c",
  7356. desc: "Person Raising Both Hands in Celebration"
  7357. }, {
  7358. code: "1f64f",
  7359. desc: "Person with Folded Hands"
  7360. }, {
  7361. code: "1f485",
  7362. desc: "Nail Polish"
  7363. }, {
  7364. code: "1f442",
  7365. desc: "Ear"
  7366. }, {
  7367. code: "1f443",
  7368. desc: "Nose"
  7369. }, {
  7370. code: "1f463",
  7371. desc: "Footprints"
  7372. }, {
  7373. code: "1f440",
  7374. desc: "Eyes"
  7375. }, {
  7376. code: "1f445",
  7377. desc: "Tongue"
  7378. }, {
  7379. code: "1f444",
  7380. desc: "Mouth"
  7381. }, {
  7382. code: "1f48b",
  7383. desc: "Kiss Mark"
  7384. }, {
  7385. code: "1f498",
  7386. desc: "Heart with Arrow"
  7387. }, {
  7388. code: "2764",
  7389. desc: "Heavy Black Heart"
  7390. }, {
  7391. code: "1f493",
  7392. desc: "Heavy Black Heart"
  7393. }, {
  7394. code: "1f494",
  7395. desc: "Broken Heart"
  7396. }, {
  7397. code: "1f495",
  7398. desc: "Two Hearts"
  7399. }, {
  7400. code: "1f496",
  7401. desc: "Sparkling Hearts"
  7402. }, {
  7403. code: "1f497",
  7404. desc: "Growing Hearts"
  7405. }, {
  7406. code: "1f499",
  7407. desc: "Blue Heart"
  7408. }, {
  7409. code: "1f49a",
  7410. desc: "Green Heart"
  7411. }, {
  7412. code: "1f49b",
  7413. desc: "Yellow Heart"
  7414. }, {
  7415. code: "1f49c",
  7416. desc: "Purple Heart"
  7417. }, {
  7418. code: "1f49d",
  7419. desc: "Heart with Ribbon"
  7420. }, {
  7421. code: "1f49e",
  7422. desc: "Revolving Hearts"
  7423. }, {
  7424. code: "1f49f",
  7425. desc: "Heart Decoration"
  7426. }, {
  7427. code: "1f48c",
  7428. desc: "Love Letter"
  7429. }, {
  7430. code: "1f4a4",
  7431. desc: "Sleeping Symbol"
  7432. }, {
  7433. code: "1f4a2",
  7434. desc: "Anger Symbol"
  7435. }, {
  7436. code: "1f4a3",
  7437. desc: "Bomb"
  7438. }, {
  7439. code: "1f4a5",
  7440. desc: "Collision Symbol"
  7441. }, {
  7442. code: "1f4a6",
  7443. desc: "Splashing Sweat Symbol"
  7444. }, {
  7445. code: "1f4a8",
  7446. desc: "Dash Symbol"
  7447. }, {
  7448. code: "1f4ab",
  7449. desc: "Dizzy Symbol"
  7450. }, {
  7451. code: "1f4ab",
  7452. desc: "Dizzy Symbol"
  7453. }, {
  7454. code: "1f4ac",
  7455. desc: "Speech Balloon"
  7456. }, {
  7457. code: "1f4ad",
  7458. desc: "Thought Balloon"
  7459. }, {
  7460. code: "1f453",
  7461. desc: "Eyeglasses"
  7462. }, {
  7463. code: "1f454",
  7464. desc: "Necktie"
  7465. }, {
  7466. code: "1f455",
  7467. desc: "T-Shirt"
  7468. }, {
  7469. code: "1f456",
  7470. desc: "Jeans"
  7471. }, {
  7472. code: "1f457",
  7473. desc: "Dress"
  7474. }, {
  7475. code: "1f458",
  7476. desc: "Kimono"
  7477. }, {
  7478. code: "1f459",
  7479. desc: "Bikini"
  7480. }, {
  7481. code: "1f45a",
  7482. desc: "Womans Clothes"
  7483. }, {
  7484. code: "1f45b",
  7485. desc: "Purse"
  7486. }, {
  7487. code: "1f45c",
  7488. desc: "Handbag"
  7489. }, {
  7490. code: "1f45d",
  7491. desc: "Pouch"
  7492. }, {
  7493. code: "1f392",
  7494. desc: "School Satchel"
  7495. }, {
  7496. code: "1f45e",
  7497. desc: "Mans Shoe"
  7498. }, {
  7499. code: "1f45f",
  7500. desc: "Athletic Shoe"
  7501. }, {
  7502. code: "1f460",
  7503. desc: "High-Heeled Shoe"
  7504. }, {
  7505. code: "1f461",
  7506. desc: "Womans Sandal"
  7507. }, {
  7508. code: "1f462",
  7509. desc: "Womans Boots"
  7510. }, {
  7511. code: "1f451",
  7512. desc: "Crown"
  7513. }, {
  7514. code: "1f452",
  7515. desc: "Womans Hat"
  7516. }, {
  7517. code: "1f462",
  7518. desc: "Top Hat"
  7519. }, {
  7520. code: "1f393",
  7521. desc: "Graduation Cap"
  7522. }, {
  7523. code: "1f484",
  7524. desc: "Lipstick"
  7525. }, {
  7526. code: "1f48d",
  7527. desc: "Ring"
  7528. }, {
  7529. code: "1f48e",
  7530. desc: "Gem Stone"
  7531. }]
  7532. }, {
  7533. id: "nature",
  7534. name: "Animals & Nature",
  7535. code: "1F435",
  7536. emoticons: [{
  7537. code: "1F435",
  7538. desc: "Monkey Face"
  7539. }, {
  7540. code: "1F412",
  7541. desc: "Monkey"
  7542. }, {
  7543. code: "1F436",
  7544. desc: "Dog Face"
  7545. }, {
  7546. code: "1F415",
  7547. desc: "Dog"
  7548. }, {
  7549. code: "1F429",
  7550. desc: "Poodle"
  7551. }, {
  7552. code: "1F43A",
  7553. desc: "Wolf Face"
  7554. }, {
  7555. code: "1F431",
  7556. desc: "Cat Face"
  7557. }, {
  7558. code: "1F408",
  7559. desc: "Cat"
  7560. }, {
  7561. code: "1F42F",
  7562. desc: "Tiger Face"
  7563. }, {
  7564. code: "1F405",
  7565. desc: "Tiger"
  7566. }, {
  7567. code: "1F406",
  7568. desc: "Leopard"
  7569. }, {
  7570. code: "1F434",
  7571. desc: "Horse Face"
  7572. }, {
  7573. code: "1F40E",
  7574. desc: "Horse"
  7575. }, {
  7576. code: "1F42E",
  7577. desc: "Cow Face"
  7578. }, {
  7579. code: "1F402",
  7580. desc: "Ox"
  7581. }, {
  7582. code: "1F403",
  7583. desc: "Water Buffalo"
  7584. }, {
  7585. code: "1F404",
  7586. desc: "Cow"
  7587. }, {
  7588. code: "1F437",
  7589. desc: "Pig Face"
  7590. }, {
  7591. code: "1F416",
  7592. desc: "Pig"
  7593. }, {
  7594. code: "1F417",
  7595. desc: "Boar"
  7596. }, {
  7597. code: "1F43D",
  7598. desc: "Pig Nose"
  7599. }, {
  7600. code: "1F40F",
  7601. desc: "Ram"
  7602. }, {
  7603. code: "1F411",
  7604. desc: "Sheep"
  7605. }, {
  7606. code: "1F410",
  7607. desc: "Goat"
  7608. }, {
  7609. code: "1F42A",
  7610. desc: "Dromedary Camel"
  7611. }, {
  7612. code: "1F42B",
  7613. desc: "Bactrian Camel"
  7614. }, {
  7615. code: "1F418",
  7616. desc: "Elephant"
  7617. }, {
  7618. code: "1F42D",
  7619. desc: "Mouse Face"
  7620. }, {
  7621. code: "1F401",
  7622. desc: "Mouse"
  7623. }, {
  7624. code: "1F400",
  7625. desc: "Rat"
  7626. }, {
  7627. code: "1F439",
  7628. desc: "Hamster Face"
  7629. }, {
  7630. code: "1F430",
  7631. desc: "Rabbit Face"
  7632. }, {
  7633. code: "1F407",
  7634. desc: "Rabbit"
  7635. }, {
  7636. code: "1F43B",
  7637. desc: "Bear Face"
  7638. }, {
  7639. code: "1F428",
  7640. desc: "Koala"
  7641. }, {
  7642. code: "1F43C",
  7643. desc: "Panda Face"
  7644. }, {
  7645. code: "1F43E",
  7646. desc: "Paw Prints"
  7647. }, {
  7648. code: "1F414",
  7649. desc: "Chicken"
  7650. }, {
  7651. code: "1F413",
  7652. desc: "Rooster"
  7653. }, {
  7654. code: "1F423",
  7655. desc: "Hatching Chick"
  7656. }, {
  7657. code: "1F424",
  7658. desc: "Baby Chick"
  7659. }, {
  7660. code: "1F425",
  7661. desc: "Front-Facing Baby Chick"
  7662. }, {
  7663. code: "1F426",
  7664. desc: "Bird"
  7665. }, {
  7666. code: "1F427",
  7667. desc: "Penguin"
  7668. }, {
  7669. code: "1F438",
  7670. desc: "Frog Face"
  7671. }, {
  7672. code: "1F40A",
  7673. desc: "Crocodile"
  7674. }, {
  7675. code: "1F422",
  7676. desc: "Turtle"
  7677. }, {
  7678. code: "1F40D",
  7679. desc: "Snake"
  7680. }, {
  7681. code: "1F432",
  7682. desc: "Dragon Face"
  7683. }, {
  7684. code: "1F409",
  7685. desc: "Dragon"
  7686. }, {
  7687. code: "1F433",
  7688. desc: "Spouting Whale"
  7689. }, {
  7690. code: "1F40B",
  7691. desc: "Whale"
  7692. }, {
  7693. code: "1F42C",
  7694. desc: "Dolphin"
  7695. }, {
  7696. code: "1F41F",
  7697. desc: "Fish"
  7698. }, {
  7699. code: "1F420",
  7700. desc: "Tropical Fish"
  7701. }, {
  7702. code: "1F421",
  7703. desc: "Blowfish"
  7704. }, {
  7705. code: "1F419",
  7706. desc: "Octopus"
  7707. }, {
  7708. code: "1F41A",
  7709. desc: "Spiral Shell"
  7710. }, {
  7711. code: "1F40C",
  7712. desc: "Snail"
  7713. }, {
  7714. code: "1F41B",
  7715. desc: "Bug"
  7716. }, {
  7717. code: "1F41C",
  7718. desc: "Ant"
  7719. }, {
  7720. code: "1F41D",
  7721. desc: "Honeybee"
  7722. }, {
  7723. code: "1F41E",
  7724. desc: "Lady Beetle"
  7725. }, {
  7726. code: "1F490",
  7727. desc: "Bouquet"
  7728. }, {
  7729. code: "1F338",
  7730. desc: "Cherry Blossom"
  7731. }, {
  7732. code: "1F4AE",
  7733. desc: "White Flower"
  7734. }, {
  7735. code: "1F339",
  7736. desc: "Rose"
  7737. }, {
  7738. code: "1F33A",
  7739. desc: "Hibiscus"
  7740. }, {
  7741. code: "1F33B",
  7742. desc: "Sunflower"
  7743. }, {
  7744. code: "1F33C",
  7745. desc: "Blossom"
  7746. }, {
  7747. code: "1F337",
  7748. desc: "Tulip"
  7749. }, {
  7750. code: "1F331",
  7751. desc: "Seedling"
  7752. }, {
  7753. code: "1F332",
  7754. desc: "Evergreen Tree"
  7755. }, {
  7756. code: "1F333",
  7757. desc: "Deciduous Tree"
  7758. }, {
  7759. code: "1F334",
  7760. desc: "Palm Tree"
  7761. }, {
  7762. code: "1F335",
  7763. desc: "Cactus"
  7764. }, {
  7765. code: "1F33E",
  7766. desc: "Ear of Rice"
  7767. }, {
  7768. code: "1F33F",
  7769. desc: "Herb"
  7770. }, {
  7771. code: "2618",
  7772. desc: "Four Leaf Clover"
  7773. }, {
  7774. code: "1F341",
  7775. desc: "Maple Leaf"
  7776. }, {
  7777. code: "1F342",
  7778. desc: "Fallen Leaf"
  7779. }, {
  7780. code: "1F343",
  7781. desc: "Leaf Fluttering in Wind"
  7782. }]
  7783. }, {
  7784. id: "foods",
  7785. name: "Food & Drink",
  7786. code: "1F347",
  7787. emoticons: [{
  7788. code: "1F347",
  7789. desc: "Grapes"
  7790. }, {
  7791. code: "1F348",
  7792. desc: "Melon"
  7793. }, {
  7794. code: "1F349",
  7795. desc: "Watermelon"
  7796. }, {
  7797. code: "1F34A",
  7798. desc: "Tangerine"
  7799. }, {
  7800. code: "1F34B",
  7801. desc: "Lemon"
  7802. }, {
  7803. code: "1F34C",
  7804. desc: "Banana"
  7805. }, {
  7806. code: "1F34D",
  7807. desc: "Pineapple"
  7808. }, {
  7809. code: "1F34E",
  7810. desc: "Red Apple"
  7811. }, {
  7812. code: "1F34F",
  7813. desc: "Green Apple"
  7814. }, {
  7815. code: "1F350",
  7816. desc: "Pear"
  7817. }, {
  7818. code: "1F351",
  7819. desc: "Peach"
  7820. }, {
  7821. code: "1F352",
  7822. desc: "Cherries"
  7823. }, {
  7824. code: "1F353",
  7825. desc: "Strawberry"
  7826. }, {
  7827. code: "1F345",
  7828. desc: "Tomato"
  7829. }, {
  7830. code: "1F346",
  7831. desc: "Aubergine"
  7832. }, {
  7833. code: "1F33D",
  7834. desc: "Ear of Maize"
  7835. }, {
  7836. code: "1F344",
  7837. desc: "Mushroom"
  7838. }, {
  7839. code: "1F330",
  7840. desc: "Chestnut"
  7841. }, {
  7842. code: "1F35E",
  7843. desc: "Bread"
  7844. }, {
  7845. code: "1F356",
  7846. desc: "Meat on Bone"
  7847. }, {
  7848. code: "1F357",
  7849. desc: "Poultry Leg"
  7850. }, {
  7851. code: "1F354",
  7852. desc: "Hamburger"
  7853. }, {
  7854. code: "1F35F",
  7855. desc: "French Fries"
  7856. }, {
  7857. code: "1F355",
  7858. desc: "Slice of Pizza"
  7859. }, {
  7860. code: "1F373",
  7861. desc: "Cooking"
  7862. }, {
  7863. code: "1F372",
  7864. desc: "Pot of Food"
  7865. }, {
  7866. code: "1F371",
  7867. desc: "Bento Box"
  7868. }, {
  7869. code: "1F358",
  7870. desc: "Rice Cracker"
  7871. }, {
  7872. code: "1F359",
  7873. desc: "Rice Ball"
  7874. }, {
  7875. code: "1F35A",
  7876. desc: "Cooked Rice"
  7877. }, {
  7878. code: "1F35B",
  7879. desc: "Curry and Rice"
  7880. }, {
  7881. code: "1F35C",
  7882. desc: "Steaming Bowl"
  7883. }, {
  7884. code: "1F35D",
  7885. desc: "Spaghetti"
  7886. }, {
  7887. code: "1F360",
  7888. desc: "Roasted Sweet Potato"
  7889. }, {
  7890. code: "1F362",
  7891. desc: "Oden"
  7892. }, {
  7893. code: "1F363",
  7894. desc: "Sushi"
  7895. }, {
  7896. code: "1F364",
  7897. desc: "Fried Shrimp"
  7898. }, {
  7899. code: "1F365",
  7900. desc: "Fish Cake with Swirl Design"
  7901. }, {
  7902. code: "1F361",
  7903. desc: "Dango"
  7904. }, {
  7905. code: "1F366",
  7906. desc: "Soft Ice Cream"
  7907. }, {
  7908. code: "1F367",
  7909. desc: "Shaved Ice"
  7910. }, {
  7911. code: "1F368",
  7912. desc: "Ice Cream"
  7913. }, {
  7914. code: "1F369",
  7915. desc: "Doughnut"
  7916. }, {
  7917. code: "1F36A",
  7918. desc: "Cookie"
  7919. }, {
  7920. code: "1F382",
  7921. desc: "Birthday Cake"
  7922. }, {
  7923. code: "1F370",
  7924. desc: "Shortcake"
  7925. }, {
  7926. code: "1F36B",
  7927. desc: "Chocolate Bar"
  7928. }, {
  7929. code: "1F36C",
  7930. desc: "Candy"
  7931. }, {
  7932. code: "1F36D",
  7933. desc: "Lollipop"
  7934. }, {
  7935. code: "1F36E",
  7936. desc: "Custard"
  7937. }, {
  7938. code: "1F36F",
  7939. desc: "Honey Pot"
  7940. }, {
  7941. code: "1F37C",
  7942. desc: "Baby Bottle"
  7943. }, {
  7944. code: "2615",
  7945. desc: "Hot Beverage"
  7946. }, {
  7947. code: "1F375",
  7948. desc: "Teacup Without Handle"
  7949. }, {
  7950. code: "1F376",
  7951. desc: "Sake Bottle and Cup"
  7952. }, {
  7953. code: "1F377",
  7954. desc: "Wine Glass"
  7955. }, {
  7956. code: "1F378",
  7957. desc: "Cocktail Glass"
  7958. }, {
  7959. code: "1F379",
  7960. desc: "Tropical Drink"
  7961. }, {
  7962. code: "1F37A",
  7963. desc: "Beer Mug"
  7964. }, {
  7965. code: "1F37B",
  7966. desc: "Clinking Beer Mugs"
  7967. }, {
  7968. code: "1F374",
  7969. desc: "Fork and Knife"
  7970. }, {
  7971. code: "1F52A",
  7972. desc: "Hocho"
  7973. }]
  7974. }, {
  7975. id: "activity",
  7976. name: "Activities",
  7977. code: "1f383",
  7978. emoticons: [{
  7979. code: "1f383",
  7980. desc: " Jack-O-Lantern"
  7981. }, {
  7982. code: "1f384",
  7983. desc: "Christmas Tree"
  7984. }, {
  7985. code: "1f386",
  7986. desc: " Fireworks"
  7987. }, {
  7988. code: "1f387",
  7989. desc: "Firework Sparkler"
  7990. }, {
  7991. code: "2728",
  7992. desc: " Sparkles"
  7993. }, {
  7994. code: "1f388",
  7995. desc: "Balloon"
  7996. }, {
  7997. code: "1f389",
  7998. desc: "Party Popper"
  7999. }, {
  8000. code: "1f38a",
  8001. desc: "Confetti Ball"
  8002. }, {
  8003. code: "1f38b",
  8004. desc: "Tanabata Tree"
  8005. }, {
  8006. code: "1f38d",
  8007. desc: "Pine Decoration"
  8008. }, {
  8009. code: "1f38e",
  8010. desc: "Japanese Dolls"
  8011. }, {
  8012. code: "1f38f",
  8013. desc: "Carp Streamer"
  8014. }, {
  8015. code: "1f390",
  8016. desc: "Wind Chime"
  8017. }, {
  8018. code: "1f391",
  8019. desc: "Moon Viewing Ceremony"
  8020. }, {
  8021. code: "1f380",
  8022. desc: "Ribbon"
  8023. }, {
  8024. code: "1f381",
  8025. desc: "Wrapped Present"
  8026. }, {
  8027. code: "1f3ab",
  8028. desc: "Ticket"
  8029. }, {
  8030. code: "1f3c6",
  8031. desc: "Trophy"
  8032. }, {
  8033. code: "1f388",
  8034. desc: "Soccer Ball"
  8035. }, {
  8036. code: "26bd",
  8037. desc: "Balloon"
  8038. }, {
  8039. code: "26be",
  8040. desc: "Baseball"
  8041. }, {
  8042. code: "1f3c0",
  8043. desc: "Basketball and Hoop"
  8044. }, {
  8045. code: "1f3c8",
  8046. desc: "American Football"
  8047. }, {
  8048. code: "1f3c9",
  8049. desc: "Rugby Football"
  8050. }, {
  8051. code: "1f3be",
  8052. desc: "Tennis Racquet and Ball"
  8053. }, {
  8054. code: "1f3b1",
  8055. desc: "Billiards"
  8056. }, {
  8057. code: "1f3b3",
  8058. desc: "Bowling"
  8059. }, {
  8060. code: "1f3af",
  8061. desc: "Direct Hit"
  8062. }, {
  8063. code: "26f3",
  8064. desc: "Flag in Hole"
  8065. }, {
  8066. code: "1f3a3",
  8067. desc: "Fishing Pole and Fish"
  8068. }, {
  8069. code: "1f3bd",
  8070. desc: "Running Shirt with Sash"
  8071. }, {
  8072. code: "1f3bf",
  8073. desc: "Ski and Ski Boot"
  8074. }, {
  8075. code: "1f3ae",
  8076. desc: "Video Game"
  8077. }, {
  8078. code: "1f3b2",
  8079. desc: "Game Die"
  8080. }, {
  8081. code: "2660",
  8082. desc: "Black Spade Suit"
  8083. }, {
  8084. code: "2665",
  8085. desc: "Black Heart SuiT"
  8086. }, {
  8087. code: "2666",
  8088. desc: "Black Diamond Suit"
  8089. }, {
  8090. code: "2663",
  8091. desc: "Black Club Suit"
  8092. }, {
  8093. code: "1f0cf",
  8094. desc: "Playing Card Black Joker"
  8095. }, {
  8096. code: "1f004",
  8097. desc: "Mahjong Tile Red Dragon"
  8098. }, {
  8099. code: "1f3b4",
  8100. desc: "Flower Playing Cards"
  8101. }]
  8102. }, {
  8103. id: "places",
  8104. name: "Travel & Places",
  8105. code: "1f30d",
  8106. emoticons: [{
  8107. code: "1f30d",
  8108. desc: "Earth Globe Europe-Africa"
  8109. }, {
  8110. code: "1f30e",
  8111. desc: "Earth Globe Americas"
  8112. }, {
  8113. code: "1f30f",
  8114. desc: "Earth Globe Asia-Australia"
  8115. }, {
  8116. code: "1f310",
  8117. desc: "Globe with Meridians"
  8118. }, {
  8119. code: "1f5fe",
  8120. desc: "Silhouette of Japan"
  8121. }, {
  8122. code: "1f30b",
  8123. desc: "Volcano"
  8124. }, {
  8125. code: "1f5fb",
  8126. desc: "Mount Fuji"
  8127. }, {
  8128. code: "1f3e0",
  8129. desc: "House Building"
  8130. }, {
  8131. code: "1f3e1",
  8132. desc: "House with Garden"
  8133. }, {
  8134. code: "1f3e2",
  8135. desc: "Office Building"
  8136. }, {
  8137. code: "1f3e3",
  8138. desc: "Japanese Post Office"
  8139. }, {
  8140. code: "1f3e4",
  8141. desc: "European Post Office"
  8142. }, {
  8143. code: "1f3e5",
  8144. desc: "Hospital"
  8145. }, {
  8146. code: "1f3e6",
  8147. desc: "Bank"
  8148. }, {
  8149. code: "1f3e8",
  8150. desc: "Hotel"
  8151. }, {
  8152. code: "1f3e9",
  8153. desc: "Love Hotel"
  8154. }, {
  8155. code: "1f3ea",
  8156. desc: "Convenience Store"
  8157. }, {
  8158. code: "1f3eb",
  8159. desc: "School"
  8160. }, {
  8161. code: "1f3ec",
  8162. desc: "Department Store"
  8163. }, {
  8164. code: "1f3ed",
  8165. desc: "Factory"
  8166. }, {
  8167. code: "1f3ef",
  8168. desc: "Japanese Castle"
  8169. }, {
  8170. code: "1f3f0",
  8171. desc: "European Castle"
  8172. }, {
  8173. code: "1f492",
  8174. desc: "Wedding"
  8175. }, {
  8176. code: "1f5fc",
  8177. desc: "Tokyo Tower"
  8178. }, {
  8179. code: "1f5fd",
  8180. desc: "Statue of Liberty"
  8181. }, {
  8182. code: "26ea",
  8183. desc: "Church"
  8184. }, {
  8185. code: "26f2",
  8186. desc: "Fountain"
  8187. }, {
  8188. code: "26fa",
  8189. desc: "Tent"
  8190. }, {
  8191. code: "1f301",
  8192. desc: "Foggy"
  8193. }, {
  8194. code: "1f303",
  8195. desc: "Night with Stars"
  8196. }, {
  8197. code: "1f304",
  8198. desc: "Sunrise over Mountains"
  8199. }, {
  8200. code: "1f305",
  8201. desc: "Sunrise"
  8202. }, {
  8203. code: "1f306",
  8204. desc: "Cityscape at Dusk"
  8205. }, {
  8206. code: "1f307",
  8207. desc: "Sunset over Buildings"
  8208. }, {
  8209. code: "1f309",
  8210. desc: "Bridge at Night"
  8211. }, {
  8212. code: "2668",
  8213. desc: "Hot Springs"
  8214. }, {
  8215. code: "1f30c",
  8216. desc: "Milky Way"
  8217. }, {
  8218. code: "1f3a0",
  8219. desc: "Carousel Horse"
  8220. }, {
  8221. code: "1f3a1",
  8222. desc: "Ferris Wheel"
  8223. }, {
  8224. code: "1f3a2",
  8225. desc: "Roller Coaster"
  8226. }, {
  8227. code: "1f488",
  8228. desc: "Barber Pole"
  8229. }, {
  8230. code: "1f3aa",
  8231. desc: "Circus Tent"
  8232. }, {
  8233. code: "1f3ad",
  8234. desc: "Performing Arts"
  8235. }, {
  8236. code: "1f3a8",
  8237. desc: "Artist Palette"
  8238. }, {
  8239. code: "1f3b0",
  8240. desc: "Slot Machine"
  8241. }, {
  8242. code: "1f682",
  8243. desc: "Steam Locomotive"
  8244. }, {
  8245. code: "1f683",
  8246. desc: "Railway Car"
  8247. }, {
  8248. code: "1f684",
  8249. desc: "High-Speed Train"
  8250. }, {
  8251. code: "1f685",
  8252. desc: "High-Speed Train with Bullet Nose"
  8253. }, {
  8254. code: "1f686",
  8255. desc: "Train"
  8256. }, {
  8257. code: "1f687",
  8258. desc: "Metro"
  8259. }, {
  8260. code: "1f688",
  8261. desc: "Light Rail"
  8262. }, {
  8263. code: "1f689",
  8264. desc: "Station"
  8265. }, {
  8266. code: "1f68a",
  8267. desc: "Tram"
  8268. }, {
  8269. code: "1f69d",
  8270. desc: "Monorail"
  8271. }, {
  8272. code: "1f69e",
  8273. desc: "Mountain Railway"
  8274. }, {
  8275. code: "1f68b",
  8276. desc: "Tram Car"
  8277. }, {
  8278. code: "1f68c",
  8279. desc: "Bus"
  8280. }, {
  8281. code: "1f68d",
  8282. desc: "Oncoming Bus"
  8283. }, {
  8284. code: "1f68e",
  8285. desc: "Trolleybus"
  8286. }, {
  8287. code: "1f690",
  8288. desc: "Minibus"
  8289. }, {
  8290. code: "1f691",
  8291. desc: "Ambulance"
  8292. }, {
  8293. code: "1f692",
  8294. desc: "Fire Engine"
  8295. }, {
  8296. code: "1f693",
  8297. desc: "Police Car"
  8298. }, {
  8299. code: "1f694",
  8300. desc: "Oncoming Police Car"
  8301. }, {
  8302. code: "1f695",
  8303. desc: "Taxi"
  8304. }, {
  8305. code: "1f695",
  8306. desc: "Oncoming Taxi"
  8307. }, {
  8308. code: "1f697",
  8309. desc: "Automobile"
  8310. }, {
  8311. code: "1f698",
  8312. desc: "Oncoming Automobile"
  8313. }, {
  8314. code: "1f699",
  8315. desc: "Recreational Vehicle"
  8316. }, {
  8317. code: "1f69a",
  8318. desc: "Delivery Truck"
  8319. }, {
  8320. code: "1f69b",
  8321. desc: "Articulated Lorry"
  8322. }, {
  8323. code: "1f69c",
  8324. desc: "Tractor"
  8325. }, {
  8326. code: "1f6b2",
  8327. desc: "Bicycle"
  8328. }, {
  8329. code: "1f68f",
  8330. desc: "Bus Stop"
  8331. }, {
  8332. code: "26fd",
  8333. desc: "Fuel Pump"
  8334. }, {
  8335. code: "1f6a8",
  8336. desc: "Police Cars Revolving Light"
  8337. }, {
  8338. code: "1f6a5",
  8339. desc: "Horizontal Traffic Light"
  8340. }, {
  8341. code: "1f6a6",
  8342. desc: "Vertical Traffic Light"
  8343. }, {
  8344. code: "1f6a7",
  8345. desc: "Construction Sign"
  8346. }, {
  8347. code: "2693",
  8348. desc: "Anchor"
  8349. }, {
  8350. code: "26f5",
  8351. desc: "Sailboat"
  8352. }, {
  8353. code: "1f6a4",
  8354. desc: "Speedboat"
  8355. }, {
  8356. code: "1f6a2",
  8357. desc: "Ship"
  8358. }, {
  8359. code: "2708",
  8360. desc: "Airplane"
  8361. }, {
  8362. code: "1f4ba",
  8363. desc: "Seat"
  8364. }, {
  8365. code: "1f681",
  8366. desc: "Helicopter"
  8367. }, {
  8368. code: "1f69f",
  8369. desc: "Suspension Railway"
  8370. }, {
  8371. code: "1f6a0",
  8372. desc: "Mountain Cableway"
  8373. }, {
  8374. code: "1f6a1",
  8375. desc: "Aerial Tramway"
  8376. }, {
  8377. code: "1f680",
  8378. desc: "Rocket"
  8379. }, {
  8380. code: "1f6aa",
  8381. desc: "Door"
  8382. }, {
  8383. code: "1f6bd",
  8384. desc: "Toilet"
  8385. }, {
  8386. code: "1f6bf",
  8387. desc: "Shower"
  8388. }, {
  8389. code: "1f6c1",
  8390. desc: "Bathtub"
  8391. }, {
  8392. code: "231b",
  8393. desc: "Hourglass"
  8394. }, {
  8395. code: "23f3",
  8396. desc: "Hourglass with Flowing Sand"
  8397. }, {
  8398. code: "231a",
  8399. desc: "Watch"
  8400. }, {
  8401. code: "23f0",
  8402. desc: "Alarm Clock"
  8403. }, {
  8404. code: "1f55b",
  8405. desc: "Clock Face Twelve Oclock"
  8406. }, {
  8407. code: "1f567",
  8408. desc: "Clock Face Twelve-Thirty"
  8409. }, {
  8410. code: "1f550",
  8411. desc: "Clock Face One Oclock"
  8412. }, {
  8413. code: "1f55c",
  8414. desc: "Clock Face One-thirty"
  8415. }, {
  8416. code: "1f551",
  8417. desc: "Clock Face Two Oclock"
  8418. }, {
  8419. code: "1f55d",
  8420. desc: "Clock Face Two-thirty"
  8421. }, {
  8422. code: "1f552",
  8423. desc: "Clock Face Three Oclock"
  8424. }, {
  8425. code: "1f55e",
  8426. desc: "Clock Face Three-thirty"
  8427. }, {
  8428. code: "1f553",
  8429. desc: "Clock Face Four Oclock"
  8430. }, {
  8431. code: "1f55f",
  8432. desc: "Clock Face Four-thirty"
  8433. }, {
  8434. code: "1f554",
  8435. desc: "Clock Face Five Oclock"
  8436. }, {
  8437. code: "1f560",
  8438. desc: "Clock Face Five-thirty"
  8439. }, {
  8440. code: "1f555",
  8441. desc: "Clock Face Six Oclock"
  8442. }, {
  8443. code: "1f561",
  8444. desc: "Clock Face Six-thirty"
  8445. }, {
  8446. code: "1f556",
  8447. desc: "Clock Face Seven Oclock"
  8448. }, {
  8449. code: "1f562",
  8450. desc: "Clock Face Seven-thirty"
  8451. }, {
  8452. code: "1f557",
  8453. desc: "Clock Face Eight Oclock"
  8454. }, {
  8455. code: "1f563",
  8456. desc: "Clock Face Eight-thirty"
  8457. }, {
  8458. code: "1f558",
  8459. desc: "Clock Face Nine Oclock"
  8460. }, {
  8461. code: "1f564",
  8462. desc: "Clock Face Nine-thirty"
  8463. }, {
  8464. code: "1f559",
  8465. desc: "Clock Face Ten Oclock"
  8466. }, {
  8467. code: "1f565",
  8468. desc: "Clock Face Ten-thirty"
  8469. }, {
  8470. code: "1f55a",
  8471. desc: "Clock Face Eleven Oclock"
  8472. }, {
  8473. code: "1f566",
  8474. desc: "Clock Face Eleven-thirty"
  8475. }, {
  8476. code: "1f311",
  8477. desc: "New Moon Symbol"
  8478. }, {
  8479. code: "1f312",
  8480. desc: "Waxing Crescent Moon Symbol"
  8481. }, {
  8482. code: "1f313",
  8483. desc: "First Quarter Moon Symbol"
  8484. }, {
  8485. code: "1f314",
  8486. desc: "Waxing Gibbous Moon Symbol"
  8487. }, {
  8488. code: "1f315",
  8489. desc: "Full Moon Symbol"
  8490. }, {
  8491. code: "1f316",
  8492. desc: "Waning Gibbous Moon Symbol"
  8493. }, {
  8494. code: "1f317",
  8495. desc: "Last Quarter Moon Symbol"
  8496. }, {
  8497. code: "1f318",
  8498. desc: "Waning Crescent Moon Symbol"
  8499. }, {
  8500. code: "1f319",
  8501. desc: "Crescent Moon"
  8502. }, {
  8503. code: "1f31a",
  8504. desc: "New Moon with Face"
  8505. }, {
  8506. code: "1f31b",
  8507. desc: "First Quarter Moon with Face"
  8508. }, {
  8509. code: "1f31c",
  8510. desc: "Last Quarter Moon with Face"
  8511. }, {
  8512. code: "2600",
  8513. desc: "Black Sun with Rays"
  8514. }, {
  8515. code: "1f31d",
  8516. desc: "Full Moon with Face"
  8517. }, {
  8518. code: "1f31e",
  8519. desc: "Sun with Face"
  8520. }, {
  8521. code: "2b50",
  8522. desc: "White Medium Star"
  8523. }, {
  8524. code: "1f31f",
  8525. desc: "Glowing Star"
  8526. }, {
  8527. code: "1f320",
  8528. desc: "Shooting Star"
  8529. }, {
  8530. code: "2601",
  8531. desc: "Cloud"
  8532. }, {
  8533. code: "26c5",
  8534. desc: "Sun Behind Cloud"
  8535. }, {
  8536. code: "1f300",
  8537. desc: "Cyclone"
  8538. }, {
  8539. code: "1f308",
  8540. desc: "Rainbow"
  8541. }, {
  8542. code: "1f302",
  8543. desc: "Closed Umbrella"
  8544. }, {
  8545. code: "2614",
  8546. desc: "Umbrella with Rain Drops"
  8547. }, {
  8548. code: "26a1",
  8549. desc: "High Voltage Sign"
  8550. }, {
  8551. code: "2744",
  8552. desc: "Snowflake"
  8553. }, {
  8554. code: "2603",
  8555. desc: "Snowman Without Snow"
  8556. }, {
  8557. code: "1f525",
  8558. desc: "Fire"
  8559. }, {
  8560. code: "1f4a7",
  8561. desc: "Droplet"
  8562. }, {
  8563. code: "1F30A",
  8564. desc: "Water Wave"
  8565. }]
  8566. }, {
  8567. id: "objects",
  8568. name: "Objects",
  8569. code: "1F507",
  8570. emoticons: [{
  8571. code: "1F507",
  8572. desc: "Speaker with Cancellation Stroke"
  8573. }, {
  8574. code: "1F508",
  8575. desc: "Speaker"
  8576. }, {
  8577. code: "1F509",
  8578. desc: "Speaker with One Sound Wave"
  8579. }, {
  8580. code: "1F50A",
  8581. desc: "Speaker with Three Sound Wave"
  8582. }, {
  8583. code: "1F4E2",
  8584. desc: "Public Address Loudspeaker"
  8585. }, {
  8586. code: "1F4E3",
  8587. desc: "Cheering Megaphone"
  8588. }, {
  8589. code: "1F4EF",
  8590. desc: "Postal Horn"
  8591. }, {
  8592. code: "1F514",
  8593. desc: "Bell"
  8594. }, {
  8595. code: "1F515",
  8596. desc: "Bell with Cancellation Stroke"
  8597. }, {
  8598. code: "1F3BC",
  8599. desc: "Musical Score"
  8600. }, {
  8601. code: "1F3B5",
  8602. desc: "Musical Note"
  8603. }, {
  8604. code: "1F3B6",
  8605. desc: "Multiple Musical Notes"
  8606. }, {
  8607. code: "1F3A4",
  8608. desc: "Microphone"
  8609. }, {
  8610. code: "1F3A7",
  8611. desc: "Headphone"
  8612. }, {
  8613. code: "1F4FB",
  8614. desc: "Radio"
  8615. }, {
  8616. code: "1F3B7",
  8617. desc: "Saxophone"
  8618. }, {
  8619. code: "1F3B8",
  8620. desc: "Guitar"
  8621. }, {
  8622. code: "1F3B9",
  8623. desc: "Musical Keyboard"
  8624. }, {
  8625. code: "1F3BA",
  8626. desc: "Trumpet"
  8627. }, {
  8628. code: "1F3BB",
  8629. desc: "Violin"
  8630. }, {
  8631. code: "1F4F1",
  8632. desc: "Mobile Phone"
  8633. }, {
  8634. code: "1F4F2",
  8635. desc: "Mobile Phone with Rightwards Arrow at Left"
  8636. }, {
  8637. code: "260E",
  8638. desc: "Black Telephone"
  8639. }, {
  8640. code: "1F4DE",
  8641. desc: "Telephone Receiver"
  8642. }, {
  8643. code: "1F4DF",
  8644. desc: "Pager"
  8645. }, {
  8646. code: "1F4E0",
  8647. desc: "Fax Machine"
  8648. }, {
  8649. code: "1F50B",
  8650. desc: "Battery"
  8651. }, {
  8652. code: "1F50C",
  8653. desc: "Electric Plug"
  8654. }, {
  8655. code: "1F4BB",
  8656. desc: "Personal Computer"
  8657. }, {
  8658. code: "1F4BD",
  8659. desc: "Minidisc"
  8660. }, {
  8661. code: "1F4BE",
  8662. desc: "Floppy Disk"
  8663. }, {
  8664. code: "1F4BF",
  8665. desc: "Optical Disk"
  8666. }, {
  8667. code: "1F4C0",
  8668. desc: "Dvd"
  8669. }, {
  8670. code: "1F3A5",
  8671. desc: "Movie Camera"
  8672. }, {
  8673. code: "1F3AC",
  8674. desc: "Clapper Board"
  8675. }, {
  8676. code: "1F4FA",
  8677. desc: "Television"
  8678. }, {
  8679. code: "1F4F7",
  8680. desc: "Camera"
  8681. }, {
  8682. code: "1F4F9",
  8683. desc: "Video Camera"
  8684. }, {
  8685. code: "1F4FC",
  8686. desc: "Videocassette"
  8687. }, {
  8688. code: "1F50D",
  8689. desc: "Left-Pointing Magnifying Glass"
  8690. }, {
  8691. code: "1F50E",
  8692. desc: "Right-Pointing Magnifying Glass"
  8693. }, {
  8694. code: "1F52C",
  8695. desc: "Microscope"
  8696. }, {
  8697. code: "1F52D",
  8698. desc: "Telelscope"
  8699. }, {
  8700. code: "1F4E1",
  8701. desc: "Satellite Antenna"
  8702. }, {
  8703. code: "1F4A1",
  8704. desc: "Electric Light Bulb"
  8705. }, {
  8706. code: "1F526",
  8707. desc: "Electric Torch"
  8708. }, {
  8709. code: "1F3EE",
  8710. desc: "Izakaya Lantern"
  8711. }, {
  8712. code: "1F4D4",
  8713. desc: "Notebook with Decorative Cover"
  8714. }, {
  8715. code: "1F4D5",
  8716. desc: "Closed Book"
  8717. }, {
  8718. code: "1F4D6",
  8719. desc: "Open Book"
  8720. }, {
  8721. code: "1F4D7",
  8722. desc: "Green Book"
  8723. }, {
  8724. code: "1F4D8",
  8725. desc: "Blue Book"
  8726. }, {
  8727. code: "1F4D9",
  8728. desc: "Orange Book"
  8729. }, {
  8730. code: "1F4DA",
  8731. desc: "Books"
  8732. }, {
  8733. code: "1F4D3",
  8734. desc: "Notebook"
  8735. }, {
  8736. code: "1F4D2",
  8737. desc: "Ledger"
  8738. }, {
  8739. code: "1F4C3",
  8740. desc: "Curl"
  8741. }, {
  8742. code: "1F4DC",
  8743. desc: "Scroll"
  8744. }, {
  8745. code: "1F4C4",
  8746. desc: "Page Facing Up"
  8747. }, {
  8748. code: "1F4F0",
  8749. desc: "Newspaper"
  8750. }, {
  8751. code: "1F4D1",
  8752. desc: "Bookmark Tabs"
  8753. }, {
  8754. code: "1F516",
  8755. desc: "Bookmark"
  8756. }, {
  8757. code: "1F4B0",
  8758. desc: "Money Bag"
  8759. }, {
  8760. code: "1F4B4",
  8761. desc: "Banknote with Yen Sign"
  8762. }, {
  8763. code: "1F4B5",
  8764. desc: "Banknote with Dollar Sign"
  8765. }, {
  8766. code: "1F4B6",
  8767. desc: "Banknote with Euro Sign"
  8768. }, {
  8769. code: "1F4B7",
  8770. desc: "Banknote with Pound Sign"
  8771. }, {
  8772. code: "1F4B8",
  8773. desc: "Money with Wings"
  8774. }, {
  8775. code: "1F4B3",
  8776. desc: "Credit Card"
  8777. }, {
  8778. code: "1F4B9",
  8779. desc: "Chart with Upwards Trend and Yen Sign"
  8780. }, {
  8781. code: "1F4B1",
  8782. desc: "Currency Exchange"
  8783. }, {
  8784. code: "1F4B2",
  8785. desc: "Heavy Dollar Sign"
  8786. }, {
  8787. code: "2709",
  8788. desc: "Envelope"
  8789. }, {
  8790. code: "1F4E7",
  8791. desc: "E-Mail Symbol"
  8792. }, {
  8793. code: "1F4E8",
  8794. desc: "Incoming Envelope"
  8795. }, {
  8796. code: "1F4E9",
  8797. desc: "Envelope with Downwards Arrow Above"
  8798. }, {
  8799. code: "1F4E4",
  8800. desc: "Outbox Tray"
  8801. }, {
  8802. code: "1F4E5",
  8803. desc: "Inbox Tray"
  8804. }, {
  8805. code: "1F4E6",
  8806. desc: "Package"
  8807. }, {
  8808. code: "1F4BE",
  8809. desc: "Closed Mailbox with Raised Flag"
  8810. }, {
  8811. code: "1F4EA",
  8812. desc: "Closed Mailbox with Lowered Flag"
  8813. }, {
  8814. code: "1F4EC",
  8815. desc: "Open Mailbox with Raised Flag"
  8816. }, {
  8817. code: "1F4ED",
  8818. desc: "Open Mailbox with Lowered Flag"
  8819. }, {
  8820. code: "1F5F3",
  8821. desc: "Postbox"
  8822. }, {
  8823. code: "270F",
  8824. desc: "Pencil"
  8825. }, {
  8826. code: "2712",
  8827. desc: "Black Nib"
  8828. }, {
  8829. code: "1F4DD",
  8830. desc: "Memo"
  8831. }, {
  8832. code: "1F4BC",
  8833. desc: "Briefcase"
  8834. }, {
  8835. code: "1F4C1",
  8836. desc: "File Folder"
  8837. }, {
  8838. code: "1F4C2",
  8839. desc: "Open File Folder"
  8840. }, {
  8841. code: "1F4C5",
  8842. desc: "Calender"
  8843. }, {
  8844. code: "1F4C6",
  8845. desc: "Tear-off Calender"
  8846. }, {
  8847. code: "1F4C7",
  8848. desc: "Card Index"
  8849. }, {
  8850. code: "1F4C8",
  8851. desc: "Chart with Upwards Trend"
  8852. }, {
  8853. code: "1F4C9",
  8854. desc: "Chart with Downwards Trend"
  8855. }, {
  8856. code: "1F4CA",
  8857. desc: "Bar Chart"
  8858. }, {
  8859. code: "1F4CB",
  8860. desc: "Clipboard"
  8861. }, {
  8862. code: "1F4CC",
  8863. desc: "Pushpin"
  8864. }, {
  8865. code: "1F4CD",
  8866. desc: "Round Pushpin"
  8867. }, {
  8868. code: "1F4CE",
  8869. desc: "Paperclip"
  8870. }, {
  8871. code: "1F4CF",
  8872. desc: "Straight Ruler"
  8873. }, {
  8874. code: "1F4D0",
  8875. desc: "Triangular Ruler"
  8876. }, {
  8877. code: "2702",
  8878. desc: "Black Scissors"
  8879. }, {
  8880. code: "1F512",
  8881. desc: "Lock"
  8882. }, {
  8883. code: "1F513",
  8884. desc: "Open Lock"
  8885. }, {
  8886. code: "1F50F",
  8887. desc: "Lock with Ink Pen"
  8888. }, {
  8889. code: "1F510",
  8890. desc: "Closed Lock with Key"
  8891. }, {
  8892. code: "1F511",
  8893. desc: "Key"
  8894. }, {
  8895. code: "1F528",
  8896. desc: "Hammer"
  8897. }, {
  8898. code: "1F52B",
  8899. desc: "Pistol"
  8900. }, {
  8901. code: "1F527",
  8902. desc: "Wrench"
  8903. }, {
  8904. code: "1F529",
  8905. desc: "Nut and Bolt"
  8906. }, {
  8907. code: "1F517",
  8908. desc: "Link Symbol"
  8909. }, {
  8910. code: "1F489",
  8911. desc: "Syringe"
  8912. }, {
  8913. code: "1F48A",
  8914. desc: "Pill"
  8915. }, {
  8916. code: "1F6AC",
  8917. desc: "Smoking Symbol"
  8918. }, {
  8919. code: "1F5FF",
  8920. desc: "Moyai"
  8921. }, {
  8922. code: "1F52E",
  8923. desc: "Crystal Ball"
  8924. }]
  8925. }, {
  8926. id: "symbols",
  8927. name: "Symbols",
  8928. code: "1F3E7",
  8929. emoticons: [{
  8930. code: "1F3E7",
  8931. desc: "Automated Teller Machine"
  8932. }, {
  8933. code: "1F6AE",
  8934. desc: "Put Litter in Its Place Symbol"
  8935. }, {
  8936. code: "1F6B0",
  8937. desc: "Potable Water Symbol"
  8938. }, {
  8939. code: "267F",
  8940. desc: "Wheelchair Symbol"
  8941. }, {
  8942. code: "1F6B9",
  8943. desc: "Mens Symbol"
  8944. }, {
  8945. code: "1F6BA",
  8946. desc: "Womens Symbol"
  8947. }, {
  8948. code: "1F6BB",
  8949. desc: "Restroom"
  8950. }, {
  8951. code: "1F6BC",
  8952. desc: "Baby Symbol"
  8953. }, {
  8954. code: "1F6BE",
  8955. desc: "Water Closet"
  8956. }, {
  8957. code: "1F6C2",
  8958. desc: "Passport Control"
  8959. }, {
  8960. code: "1F6C3",
  8961. desc: "Customs"
  8962. }, {
  8963. code: "1F6C4",
  8964. desc: "Baggage Claim"
  8965. }, {
  8966. code: "1F6C5",
  8967. desc: "Left Luggage"
  8968. }, {
  8969. code: "26A0",
  8970. desc: "Warning Sign"
  8971. }, {
  8972. code: "1F6B8",
  8973. desc: "Children Crossing"
  8974. }, {
  8975. code: "26D4",
  8976. desc: "No Entry"
  8977. }, {
  8978. code: "1F6AB",
  8979. desc: "No Entry Sign"
  8980. }, {
  8981. code: "1F6B3",
  8982. desc: "No Bicycles"
  8983. }, {
  8984. code: "1F6AD",
  8985. desc: "No Smoking Symbol"
  8986. }, {
  8987. code: "1F6AF",
  8988. desc: "Do Not Litter Symbol"
  8989. }, {
  8990. code: "1F6B1",
  8991. desc: "Non-Potable Water Symbol"
  8992. }, {
  8993. code: "1F6B7",
  8994. desc: "No Pedestrians"
  8995. }, {
  8996. code: "1F4F5",
  8997. desc: "No Mobile Phones"
  8998. }, {
  8999. code: "1F51E",
  9000. desc: "No One Under Eighteen Symbol"
  9001. }, {
  9002. code: "2B06",
  9003. desc: "Upwards Black Arrow"
  9004. }, {
  9005. code: "2197",
  9006. desc: "North East Arrow"
  9007. }, {
  9008. code: "27A1",
  9009. desc: "Black Rightwards Arrow"
  9010. }, {
  9011. code: "2198",
  9012. desc: "South East Arrow"
  9013. }, {
  9014. code: "2B07",
  9015. desc: "Downwards Black Arrow"
  9016. }, {
  9017. code: "2199",
  9018. desc: "South West Arrow"
  9019. }, {
  9020. code: "2B05",
  9021. desc: "Leftwards Black Arrow"
  9022. }, {
  9023. code: "2196",
  9024. desc: "North West Arrow"
  9025. }, {
  9026. code: "2195",
  9027. desc: "Up Down Arrow"
  9028. }, {
  9029. code: "2194",
  9030. desc: "Left Right Arrow"
  9031. }, {
  9032. code: "21A9",
  9033. desc: "Leftwards Arrow with Hook"
  9034. }, {
  9035. code: "21AA",
  9036. desc: "Rightwards Arrow with Hook"
  9037. }, {
  9038. code: "2934",
  9039. desc: "Arrow Pointing Rightwards Then Curving Upwards"
  9040. }, {
  9041. code: "2935",
  9042. desc: "Arrow Pointing Rightwards Then Curving Downwards"
  9043. }, {
  9044. code: "1F503",
  9045. desc: "Clockwise Downwards and Upwards Open Circle Arrows"
  9046. }, {
  9047. code: "1F504",
  9048. desc: "Anticlockwise Downwards and Upwards Open Circle Arrows"
  9049. }, {
  9050. code: "1F519",
  9051. desc: "Back with Leftwards Arrow Above"
  9052. }, {
  9053. code: "1F51A",
  9054. desc: "End with Leftwards Arrow Above"
  9055. }, {
  9056. code: "1F51B",
  9057. desc: "On with Exclamation Mark with Left Right Arrow Above"
  9058. }, {
  9059. code: "1F51C",
  9060. desc: "Soon with Rightwards Arrow Above"
  9061. }, {
  9062. code: "1F51D",
  9063. desc: "Top with Upwards Arrow Above"
  9064. }, {
  9065. code: "1F52F",
  9066. desc: "Six Pointed Star with Middle Dot"
  9067. }, {
  9068. code: "2648",
  9069. desc: "Aries"
  9070. }, {
  9071. code: "2649",
  9072. desc: "Taurus"
  9073. }, {
  9074. code: "264A",
  9075. desc: "Gemini"
  9076. }, {
  9077. code: "264B",
  9078. desc: "Cancer"
  9079. }, {
  9080. code: "264C",
  9081. desc: "Leo"
  9082. }, {
  9083. code: "264D",
  9084. desc: "Virgo"
  9085. }, {
  9086. code: "264E",
  9087. desc: "Libra"
  9088. }, {
  9089. code: "264F",
  9090. desc: "Scorpius"
  9091. }, {
  9092. code: "2650",
  9093. desc: "Sagittarius"
  9094. }, {
  9095. code: "2651",
  9096. desc: "Capricorn"
  9097. }, {
  9098. code: "2652",
  9099. desc: "Aquarius"
  9100. }, {
  9101. code: "2653",
  9102. desc: "Pisces"
  9103. }, {
  9104. code: "26CE",
  9105. desc: "Ophiuchus"
  9106. }, {
  9107. code: "1F500",
  9108. desc: "Twisted Rightwards Arrows"
  9109. }, {
  9110. code: "1F501",
  9111. desc: "Clockwise Rightwards and Leftwards Open Circle Arrows"
  9112. }, {
  9113. code: "1F502",
  9114. desc: "Clockwise Rightwards and Leftwards Open Circle Arrows with Circled One Overlay"
  9115. }, {
  9116. code: "25B6",
  9117. desc: "Black Right-Pointing Triangle"
  9118. }, {
  9119. code: "23E9",
  9120. desc: "Black Right-Pointing Double Triangle"
  9121. }, {
  9122. code: "25C0",
  9123. desc: "Black Left-Pointing Triangle"
  9124. }, {
  9125. code: "23EA",
  9126. desc: "Black Left-Pointing Double Triangle"
  9127. }, {
  9128. code: "1F53C",
  9129. desc: "Up-Pointing Small Red Triangle"
  9130. }, {
  9131. code: "23EB",
  9132. desc: "Black Up-Pointing Double Triangle"
  9133. }, {
  9134. code: "1F53D",
  9135. desc: "Down-Pointing Small Red Triangle"
  9136. }, {
  9137. code: "23EC",
  9138. desc: "Black Down-Pointing Double Triangle"
  9139. }, {
  9140. code: "1F3A6",
  9141. desc: "Cinema"
  9142. }, {
  9143. code: "1F505",
  9144. desc: "Low Brightness Symbol"
  9145. }, {
  9146. code: "1F506",
  9147. desc: "High Brightness Symbol"
  9148. }, {
  9149. code: "1F4F6",
  9150. desc: "Antenna with Bars"
  9151. }, {
  9152. code: "1F4F3",
  9153. desc: "Vibration Mode"
  9154. }, {
  9155. code: "1F4F4",
  9156. desc: "Mobile Phone off"
  9157. }, {
  9158. code: "267B",
  9159. desc: "Black Universal Recycling Symbol"
  9160. }, {
  9161. code: "1F531",
  9162. desc: "Trident Emblem"
  9163. }, {
  9164. code: "1F4DB",
  9165. desc: "Name Badge"
  9166. }, {
  9167. code: "1F530",
  9168. desc: "Japanese Symbol for Beginner"
  9169. }, {
  9170. code: "2B55",
  9171. desc: "Heavy Large Circle"
  9172. }, {
  9173. code: "2705",
  9174. desc: "White Heavy Check Mark"
  9175. }, {
  9176. code: "2611",
  9177. desc: "Ballot Box with Check"
  9178. }, {
  9179. code: "2714",
  9180. desc: "Heavy Check Mark"
  9181. }, {
  9182. code: "2716",
  9183. desc: "Heavy Multiplication X"
  9184. }, {
  9185. code: "274C",
  9186. desc: "Cross Mark"
  9187. }, {
  9188. code: "274E",
  9189. desc: "Negative Squared Cross Mark"
  9190. }, {
  9191. code: "2795",
  9192. desc: "Heavy Plus Sign"
  9193. }, {
  9194. code: "2796",
  9195. desc: "Heavy Minus Sign"
  9196. }, {
  9197. code: "2797",
  9198. desc: "Heavy Division Sign"
  9199. }, {
  9200. code: "27B0",
  9201. desc: "Curly Loop"
  9202. }, {
  9203. code: "27BF",
  9204. desc: "Double Curly Loop"
  9205. }, {
  9206. code: "303D",
  9207. desc: "Part Alternation Mark"
  9208. }, {
  9209. code: "2733",
  9210. desc: "Eight Spoked Asterisk"
  9211. }, {
  9212. code: "2734",
  9213. desc: "Eight Pointed Black Star"
  9214. }, {
  9215. code: "2747",
  9216. desc: "Sparkle"
  9217. }, {
  9218. code: "203C",
  9219. desc: "Double Exclamation Mark"
  9220. }, {
  9221. code: "2049",
  9222. desc: "Exclamation Question Mark"
  9223. }, {
  9224. code: "2753",
  9225. desc: "Black Question Mark Ornament"
  9226. }, {
  9227. code: "2754",
  9228. desc: "White Question Mark Ornament"
  9229. }, {
  9230. code: "2755",
  9231. desc: "White Exclamation Mark Ornament"
  9232. }, {
  9233. code: "2757",
  9234. desc: "Heavy Exclamation Mark Symbol"
  9235. }, {
  9236. code: "3030",
  9237. desc: "Wavy Dash"
  9238. }, {
  9239. code: "2122",
  9240. desc: "Trade Mark Sign"
  9241. }, {
  9242. code: "1F51F",
  9243. desc: "Keycap Ten"
  9244. }, {
  9245. code: "1F4AF",
  9246. desc: "Hundred Points Symbol"
  9247. }, {
  9248. code: "1F520",
  9249. desc: "Input Symbol for Latin Capital Letters"
  9250. }, {
  9251. code: "1F521",
  9252. desc: "Input Symbol for Latin Small Letters"
  9253. }, {
  9254. code: "1F522",
  9255. desc: "Input Symbol for Numbers"
  9256. }, {
  9257. code: "1F523",
  9258. desc: "Input Symbol for Symbols"
  9259. }, {
  9260. code: "1F524",
  9261. desc: "Input Symbol for Latin Letters"
  9262. }, {
  9263. code: "1F170",
  9264. desc: "Negative Squared Latin Capital Letter a"
  9265. }, {
  9266. code: "1F18E",
  9267. desc: "Negative Squared Ab"
  9268. }, {
  9269. code: "1F171",
  9270. desc: "Negative Squared Latin Capital Letter B"
  9271. }, {
  9272. code: "1F191",
  9273. desc: "Squared Cl"
  9274. }, {
  9275. code: "1F192",
  9276. desc: "Squared Cool"
  9277. }, {
  9278. code: "1F193",
  9279. desc: "Squared Free"
  9280. }, {
  9281. code: "2139",
  9282. desc: "Information Source"
  9283. }, {
  9284. code: "1F194",
  9285. desc: "Squared Id"
  9286. }, {
  9287. code: "24C2",
  9288. desc: "Circled Latin Capital Letter M"
  9289. }, {
  9290. code: "1F195",
  9291. desc: "Squared New"
  9292. }, {
  9293. code: "1F196",
  9294. desc: "Squared Ng"
  9295. }, {
  9296. code: "1F17E",
  9297. desc: "Negative Squared Latin Capital Letter O"
  9298. }, {
  9299. code: "1F197",
  9300. desc: "Squared Ok"
  9301. }, {
  9302. code: "1F17F",
  9303. desc: "Negative Squared Latin Capital Letter P"
  9304. }, {
  9305. code: "1F198",
  9306. desc: "Squared Sos"
  9307. }, {
  9308. code: "1F199",
  9309. desc: "Squared Up with Exclamation Mark"
  9310. }, {
  9311. code: "1F19A",
  9312. desc: "Squared Vs"
  9313. }, {
  9314. code: "1F201",
  9315. desc: "Squared Katakana Koko"
  9316. }, {
  9317. code: "1F202",
  9318. desc: "Squared Katakana Sa"
  9319. }, {
  9320. code: "1F237",
  9321. desc: "Squared Cjk Unified Ideograph-6708"
  9322. }, {
  9323. code: "1F236",
  9324. desc: "Squared Cjk Unified Ideograph-6709"
  9325. }, {
  9326. code: "1F22F",
  9327. desc: "Squared Cjk Unified Ideograph-6307"
  9328. }, {
  9329. code: "1F250",
  9330. desc: "Circled Ideograph Advantage"
  9331. }, {
  9332. code: "1F239",
  9333. desc: "Squared Cjk Unified Ideograph-5272"
  9334. }, {
  9335. code: "1F21A",
  9336. desc: "Squared Cjk Unified Ideograph-7121"
  9337. }, {
  9338. code: "1F232",
  9339. desc: "Squared Cjk Unified Ideograph-7981"
  9340. }, {
  9341. code: "1F251",
  9342. desc: "Circled Ideograph Accept"
  9343. }, {
  9344. code: "1F238",
  9345. desc: "Squared Cjk Unified Ideograph-7533"
  9346. }, {
  9347. code: "1F234",
  9348. desc: "Squared Cjk Unified Ideograph-5408"
  9349. }, {
  9350. code: "1F233",
  9351. desc: "Squared Cjk Unified Ideograph-7a7a"
  9352. }, {
  9353. code: "3297",
  9354. desc: "Circled Ideograph Congratulation"
  9355. }, {
  9356. code: "3299",
  9357. desc: "Circled Ideograph Secret"
  9358. }, {
  9359. code: "1F23A",
  9360. desc: "Squared Cjk Unified Ideograph-55b6"
  9361. }, {
  9362. code: "1F235",
  9363. desc: "Squared Cjk Unified Ideograph-6e80"
  9364. }, {
  9365. code: "25AA",
  9366. desc: "Black Small Square"
  9367. }, {
  9368. code: "25AB",
  9369. desc: "White Small Square"
  9370. }, {
  9371. code: "25FB",
  9372. desc: "White Medium Square"
  9373. }, {
  9374. code: "25FC",
  9375. desc: "Black Medium Square"
  9376. }, {
  9377. code: "25FD",
  9378. desc: "White Medium Small Square"
  9379. }, {
  9380. code: "25FE",
  9381. desc: "Black Medium Small Square"
  9382. }, {
  9383. code: "2B1B",
  9384. desc: "Black Large Square"
  9385. }, {
  9386. code: "2B1C",
  9387. desc: "White Large Square"
  9388. }, {
  9389. code: "1F536",
  9390. desc: "Large Orange Diamond"
  9391. }, {
  9392. code: "1F537",
  9393. desc: "Large Blue Diamond"
  9394. }, {
  9395. code: "1F538",
  9396. desc: "Small Orange Diamond"
  9397. }, {
  9398. code: "1F539",
  9399. desc: "Small Blue Diamond"
  9400. }, {
  9401. code: "1F53A",
  9402. desc: "Up-Pointing Red Triangle"
  9403. }, {
  9404. code: "1F53B",
  9405. desc: "Down-Pointing Red Triangle"
  9406. }, {
  9407. code: "1F4A0",
  9408. desc: "Diamond Shape with a Dot Inside"
  9409. }, {
  9410. code: "1F518",
  9411. desc: "Radio Button"
  9412. }, {
  9413. code: "1F532",
  9414. desc: "Black Square Button"
  9415. }, {
  9416. code: "1F533",
  9417. desc: "White Square Button"
  9418. }, {
  9419. code: "26AA",
  9420. desc: "Medium White Circle"
  9421. }, {
  9422. code: "26AB",
  9423. desc: "Medium Black Circle"
  9424. }, {
  9425. code: "1F534",
  9426. desc: "Large Red Circle"
  9427. }, {
  9428. code: "1F535",
  9429. desc: "Large Blue Circle"
  9430. }]
  9431. }, {
  9432. id: "flags",
  9433. name: "Flags",
  9434. code: "1F3C1",
  9435. emoticons: [{
  9436. code: "1f3c1",
  9437. desc: "Chequered Flag"
  9438. }, {
  9439. code: "1f1e8-1f1f3",
  9440. desc: "China Flag"
  9441. }, {
  9442. code: "1f38c",
  9443. desc: "Crossed Flags"
  9444. }, {
  9445. code: "1f1e9-1f1ea",
  9446. desc: "Germany Flag"
  9447. }, {
  9448. code: "1f1ea-1f1f8",
  9449. desc: "Spain Flag"
  9450. }, {
  9451. code: "1f1e6-1f1e8",
  9452. desc: "Ascension Island Flag"
  9453. }, {
  9454. code: "1f1e6-1f1e9",
  9455. desc: "Andorra Flag"
  9456. }, {
  9457. code: "1f1e6-1f1ea",
  9458. desc: "United Arab Emirates Flag"
  9459. }, {
  9460. code: "1f1e6-1f1eb",
  9461. desc: "Afghanistan Flag"
  9462. }, {
  9463. code: "1f1e6-1f1ec",
  9464. desc: "Antigua & Barbuda Flag"
  9465. }, {
  9466. code: "1f1e6-1f1ee",
  9467. desc: "Anguilla Flag"
  9468. }, {
  9469. code: "1f1e6-1f1f1",
  9470. desc: "Albania Flag"
  9471. }, {
  9472. code: "1f1e6-1f1f2",
  9473. desc: "Armenia Flag"
  9474. }, {
  9475. code: "1f1e6-1f1f4",
  9476. desc: "Angola Flag"
  9477. }, {
  9478. code: "1f1e6-1f1f6",
  9479. desc: "Antarctica Flag"
  9480. }, {
  9481. code: "1f1e6-1f1f7",
  9482. desc: "Argentina Flag"
  9483. }, {
  9484. code: "1f1e6-1f1f8",
  9485. desc: "American Samoa Flag"
  9486. }, {
  9487. code: "1f1e6-1f1f9",
  9488. desc: "Austria Flag"
  9489. }, {
  9490. code: "1f1e6-1f1fa",
  9491. desc: "Australia Flag"
  9492. }, {
  9493. code: "1f1e6-1f1fc",
  9494. desc: "Aruba Flag"
  9495. }, {
  9496. code: "1f1e6-1f1fd",
  9497. desc: "\xc5land Islands Flag"
  9498. }, {
  9499. code: "1f1e6-1f1ff",
  9500. desc: "Azerbaijan Flag"
  9501. }, {
  9502. code: "1f1e7-1f1e7",
  9503. desc: "Barbados Flag"
  9504. }, {
  9505. code: "1f1e7-1f1e9",
  9506. desc: "Bangladesh Flag"
  9507. }, {
  9508. code: "1f1e7-1f1ea",
  9509. desc: "Belgium Flag"
  9510. }, {
  9511. code: "1f1e7-1f1eb",
  9512. desc: "Burkina Faso Flag"
  9513. }, {
  9514. code: "1f1e7-1f1ec",
  9515. desc: "Bulgaria Flag"
  9516. }, {
  9517. code: "1f1e7-1f1ed",
  9518. desc: "Bahrain Flag"
  9519. }, {
  9520. code: "1f1e7-1f1ee",
  9521. desc: "Burundi Flag"
  9522. }, {
  9523. code: "1f1e7-1f1ef",
  9524. desc: "Benin Flag"
  9525. }, {
  9526. code: "1f1e7-1f1f1",
  9527. desc: "St. Barth\xe9lemy Flag"
  9528. }, {
  9529. code: "1f1e7-1f1f2",
  9530. desc: "Bermuda Flag"
  9531. }, {
  9532. code: "1f1e7-1f1f4",
  9533. desc: "Bolivia Flag"
  9534. }, {
  9535. code: "1f1e7-1f1f6",
  9536. desc: "Caribbean Netherlands Flag"
  9537. }, {
  9538. code: "1f1e7-1f1f7",
  9539. desc: "Brazil Flag"
  9540. }, {
  9541. code: "1f1e7-1f1f8",
  9542. desc: "Bahamas Flag"
  9543. }, {
  9544. code: "1f1e7-1f1f9",
  9545. desc: "Bhutan Flag"
  9546. }, {
  9547. code: "1f1e7-1f1fb",
  9548. desc: "Bouvet Island Flag"
  9549. }, {
  9550. code: "1f1e7-1f1fc",
  9551. desc: "Botswana Flag"
  9552. }, {
  9553. code: "1f1e7-1f1fe",
  9554. desc: "Belarus Flag"
  9555. }, {
  9556. code: "1f1e7-1f1ff",
  9557. desc: "Belize Flag"
  9558. }, {
  9559. code: "1f1e8-1f1e6",
  9560. desc: "Canada Flag"
  9561. }, {
  9562. code: "1f1e8-1f1e8",
  9563. desc: "Cocos (keeling) Islands Flag"
  9564. }, {
  9565. code: "1f1e8-1f1e9",
  9566. desc: "Congo - Kinshasa Flag"
  9567. }, {
  9568. code: "1f1e8-1f1eb",
  9569. desc: "Central African Republic Flag"
  9570. }, {
  9571. code: "1f1e8-1f1ec",
  9572. desc: "Congo - Brazzaville Flag"
  9573. }, {
  9574. code: "1f1e8-1f1ed",
  9575. desc: "Switzerland Flag"
  9576. }, {
  9577. code: "1f1e8-1f1ee",
  9578. desc: "C\xf4te D\u2019ivoire Flag"
  9579. }, {
  9580. code: "1f1e8-1f1f0",
  9581. desc: "Cook Islands Flag"
  9582. }, {
  9583. code: "1f1e8-1f1f1",
  9584. desc: "Chile Flag"
  9585. }, {
  9586. code: "1f1e8-1f1f2",
  9587. desc: "Cameroon Flag"
  9588. }, {
  9589. code: "1f1e8-1f1f4",
  9590. desc: "Colombia Flag"
  9591. }, {
  9592. code: "1f1e8-1f1f7",
  9593. desc: "Costa Rica Flag"
  9594. }, {
  9595. code: "1f1e8-1f1fa",
  9596. desc: "Cuba Flag"
  9597. }, {
  9598. code: "1f1e8-1f1fb",
  9599. desc: "Cape Verde Flag"
  9600. }, {
  9601. code: "1f1e8-1f1fc",
  9602. desc: "Cura\xe7ao Flag"
  9603. }, {
  9604. code: "1f1e8-1f1fd",
  9605. desc: "Christmas Island Flag"
  9606. }, {
  9607. code: "1f1e8-1f1fe",
  9608. desc: "Cyprus Flag"
  9609. }, {
  9610. code: "1f1e8-1f1ff",
  9611. desc: 'Czechia Flag"'
  9612. }, {
  9613. code: "1f1e9-1f1ec",
  9614. desc: "Diego Garcia Flag"
  9615. }, {
  9616. code: "1f1e9-1f1ef",
  9617. desc: "Djibouti Flag"
  9618. }, {
  9619. code: "1f1e9-1f1f0",
  9620. desc: "Denmark Flag"
  9621. }, {
  9622. code: "1f1e9-1f1f2",
  9623. desc: "Dominica Flag"
  9624. }, {
  9625. code: "1f1e9-1f1f4",
  9626. desc: "Dominican Republic Flag"
  9627. }, {
  9628. code: "1f1e9-1f1ff",
  9629. desc: "Algeria Flag"
  9630. }, {
  9631. code: "1f1ea-1f1e6",
  9632. desc: "Ceuta & Melilla Flag"
  9633. }, {
  9634. code: "1f1ea-1f1e8",
  9635. desc: "Ecuador Flag"
  9636. }, {
  9637. code: "1f1ea-1f1ea",
  9638. desc: "Estonia Flag"
  9639. }, {
  9640. code: "1f1ea-1f1ec",
  9641. desc: "Egypt Flag"
  9642. }, {
  9643. code: "1f1ea-1f1ed",
  9644. desc: "Western Sahara Flag"
  9645. }, {
  9646. code: "1f1ea-1f1f7",
  9647. desc: "Eritrea Flag"
  9648. }, {
  9649. code: "1f1ea-1f1f9",
  9650. desc: "Ethiopia Flag"
  9651. }, {
  9652. code: "1f1ea-1f1fa",
  9653. desc: "European Union Flag"
  9654. }, {
  9655. code: "1f1eb-1f1ee",
  9656. desc: "Finland Flag"
  9657. }, {
  9658. code: "1f1eb-1f1ef",
  9659. desc: "Fiji Flag"
  9660. }, {
  9661. code: "1f1eb-1f1f0",
  9662. desc: "Falkland Islands Flag"
  9663. }, {
  9664. code: "1f1eb-1f1f2",
  9665. desc: "Micronesia Flag"
  9666. }, {
  9667. code: "1f1eb-1f1f4",
  9668. desc: "Faroe Islands Flag"
  9669. }, {
  9670. code: "1f1ec-1f1e6",
  9671. desc: "Gabon Flag"
  9672. }, {
  9673. code: "1f1ec-1f1e9",
  9674. desc: "Grenada Flag"
  9675. }, {
  9676. code: "1f1ec-1f1ea",
  9677. desc: "Georgia Flag"
  9678. }, {
  9679. code: "1f1ec-1f1eb",
  9680. desc: "French Guiana Flag"
  9681. }, {
  9682. code: "1f1ec-1f1ec",
  9683. desc: "Guernsey Flag"
  9684. }, {
  9685. code: "1f1ec-1f1ed",
  9686. desc: "Ghana Flag"
  9687. }, {
  9688. code: "1f1ec-1f1ee",
  9689. desc: "Gibraltar Flag"
  9690. }, {
  9691. code: "1f1ec-1f1f1",
  9692. desc: "Greenland Flag"
  9693. }, {
  9694. code: "1f1ec-1f1f2",
  9695. desc: "Gambia Flag"
  9696. }, {
  9697. code: "1f1ec-1f1f3",
  9698. desc: "Guinea Flag"
  9699. }, {
  9700. code: "1f1ec-1f1f5",
  9701. desc: "Guadeloupe Flag"
  9702. }, {
  9703. code: "1f1ec-1f1f6",
  9704. desc: "Equatorial Guinea Flag"
  9705. }, {
  9706. code: "1f1ec-1f1f7",
  9707. desc: "Greece Flag"
  9708. }, {
  9709. code: "1f1ec-1f1f8",
  9710. desc: "South Georgia & South Sandwich Islands Flag"
  9711. }, {
  9712. code: "1f1ec-1f1f9",
  9713. desc: "Guatemala Flag"
  9714. }, {
  9715. code: "1f1ec-1f1fa",
  9716. desc: "Guam Flag"
  9717. }, {
  9718. code: "1f1ec-1f1fc",
  9719. desc: "Guinea-Bissau Flag"
  9720. }, {
  9721. code: "1f1ec-1f1fe",
  9722. desc: "Guyana Flag"
  9723. }, {
  9724. code: "1f1ed-1f1f0",
  9725. desc: "Hong Kong Sar China Flag"
  9726. }, {
  9727. code: "1f1ed-1f1f2",
  9728. desc: "Heard & Mcdonald Islands Flag"
  9729. }, {
  9730. code: "1f1ed-1f1f3",
  9731. desc: "Honduras Flag"
  9732. }, {
  9733. code: "1f1ed-1f1f7",
  9734. desc: "Croatia Flag"
  9735. }, {
  9736. code: "1f1ed-1f1f9",
  9737. desc: "Haiti Flag"
  9738. }, {
  9739. code: "1f1ed-1f1fa",
  9740. desc: "Hungary Flag"
  9741. }, {
  9742. code: "1f1ee-1f1e8",
  9743. desc: "Canary Islands Flag"
  9744. }, {
  9745. code: "1f1ee-1f1e9",
  9746. desc: "Indonesia Flag"
  9747. }, {
  9748. code: "1f1ee-1f1ea",
  9749. desc: "Ireland Flag"
  9750. }, {
  9751. code: "1f1ee-1f1f1",
  9752. desc: "Israel Flag"
  9753. }, {
  9754. code: "1f1ee-1f1f2",
  9755. desc: "Isle of Man Flag"
  9756. }, {
  9757. code: "1f1ee-1f1f3",
  9758. desc: "India Flag"
  9759. }, {
  9760. code: "1f1ee-1f1f4",
  9761. desc: "British Indian Ocean Territory Flag"
  9762. }, {
  9763. code: "1f1ee-1f1f6",
  9764. desc: "Iraq Flag"
  9765. }, {
  9766. code: "1f1ee-1f1f7",
  9767. desc: "Iran Flag"
  9768. }, {
  9769. code: "1f1ee-1f1f8",
  9770. desc: "Iceland Flag"
  9771. }, {
  9772. code: "1f1ef-1f1ea",
  9773. desc: "Jersey Flag"
  9774. }, {
  9775. code: "1f1ef-1f1f2",
  9776. desc: "Jamaica Flag"
  9777. }, {
  9778. code: "1f1ef-1f1f4",
  9779. desc: "Jordan Flag"
  9780. }, {
  9781. code: "1f1f0-1f1ea",
  9782. desc: "Kenya Flag"
  9783. }, {
  9784. code: "1f1f0-1f1ec",
  9785. desc: "Kyrgyzstan Flag"
  9786. }, {
  9787. code: "1f1f0-1f1ed",
  9788. desc: "Cambodia Flag"
  9789. }, {
  9790. code: "1f1f0-1f1ee",
  9791. desc: "Kiribati Flag"
  9792. }, {
  9793. code: "1f1f0-1f1f2",
  9794. desc: "Comoros Flag"
  9795. }, {
  9796. code: "1f1f0-1f1f3",
  9797. desc: "St. Kitts & Nevis Flag"
  9798. }, {
  9799. code: "1f1f0-1f1f5",
  9800. desc: "North Korea Flag"
  9801. }, {
  9802. code: "1f1f0-1f1fc",
  9803. desc: "Kuwait Flag"
  9804. }, {
  9805. code: "1f1f0-1f1fe",
  9806. desc: "Cayman Islands Flag"
  9807. }, {
  9808. code: "1f1f0-1f1ff",
  9809. desc: "Kazakhstan Flag"
  9810. }, {
  9811. code: "1f1f1-1f1e6",
  9812. desc: "Laos Flag"
  9813. }, {
  9814. code: "1f1f1-1f1e7",
  9815. desc: "Lebanon Flag"
  9816. }, {
  9817. code: "1f1f1-1f1e8",
  9818. desc: "St. Lucia Flag"
  9819. }, {
  9820. code: "1f1f1-1f1ee",
  9821. desc: "Liechtenstein Flag"
  9822. }, {
  9823. code: "1f1f1-1f1f0",
  9824. desc: "Sri Lanka Flag"
  9825. }, {
  9826. code: "1f1f1-1f1f7",
  9827. desc: "Liberia Flag"
  9828. }, {
  9829. code: "1f1f1-1f1f8",
  9830. desc: "Lesotho Flag"
  9831. }, {
  9832. code: "1f1f1-1f1f9",
  9833. desc: "Lithuania Flag"
  9834. }, {
  9835. code: "1f1f1-1f1fa",
  9836. desc: "Luxembourg Flag"
  9837. }, {
  9838. code: "1f1f1-1f1fb",
  9839. desc: "Latvia Flag"
  9840. }, {
  9841. code: "1f1f1-1f1fe",
  9842. desc: "Libya Flag"
  9843. }, {
  9844. code: "1f1f2-1f1e6",
  9845. desc: "Morocco Flag"
  9846. }, {
  9847. code: "1f1f2-1f1e8",
  9848. desc: "Monaco Flag"
  9849. }, {
  9850. code: "1f1f2-1f1e9",
  9851. desc: "Moldova Flag"
  9852. }, {
  9853. code: "1f1f2-1f1ea",
  9854. desc: "Montenegro Flag"
  9855. }, {
  9856. code: "1f1f2-1f1eb",
  9857. desc: "St. Martin Flag"
  9858. }, {
  9859. code: "1f1f2-1f1ec",
  9860. desc: "Madagascar Flag"
  9861. }, {
  9862. code: "1f1f2-1f1ed",
  9863. desc: "Marshall Islands Flag"
  9864. }, {
  9865. code: "1f1f2-1f1f0",
  9866. desc: "Macedonia Flag"
  9867. }, {
  9868. code: "1f1f2-1f1f1",
  9869. desc: "Mali Flag"
  9870. }, {
  9871. code: "1f1f2-1f1f2",
  9872. desc: "Myanmar (burma) Flag"
  9873. }, {
  9874. code: "1f1f2-1f1f3",
  9875. desc: "Mongolia Flag"
  9876. }, {
  9877. code: "1f1f2-1f1f4",
  9878. desc: "Macau Sar China Flag"
  9879. }, {
  9880. code: "1f1f2-1f1f5",
  9881. desc: "Northern Mariana Islands Flag"
  9882. }, {
  9883. code: "1f1f2-1f1f6",
  9884. desc: "Martinique Flag"
  9885. }, {
  9886. code: "1f1f2-1f1f7",
  9887. desc: "Mauritania Flag"
  9888. }, {
  9889. code: "1f1f2-1f1f8",
  9890. desc: "Montserrat Flag"
  9891. }, {
  9892. code: "1f1f2-1f1f9",
  9893. desc: "Malta Flag"
  9894. }, {
  9895. code: "1f1f2-1f1fa",
  9896. desc: "Mauritius Flag"
  9897. }, {
  9898. code: "1f1f2-1f1fb",
  9899. desc: "Maldives Flag"
  9900. }, {
  9901. code: "1f1f2-1f1fc",
  9902. desc: "Malawi Flag"
  9903. }, {
  9904. code: "1f1f2-1f1fd",
  9905. desc: "Mexico Flag"
  9906. }, {
  9907. code: "1f1f2-1f1fe",
  9908. desc: "Malaysia Flag"
  9909. }, {
  9910. code: "1f1f2-1f1ff",
  9911. desc: "Mozambique Flag"
  9912. }, {
  9913. code: "1f1f3-1f1e6",
  9914. desc: "Namibia Flag"
  9915. }, {
  9916. code: "1f1f3-1f1e8",
  9917. desc: "New Caledonia Flag"
  9918. }, {
  9919. code: "1f1f3-1f1ea",
  9920. desc: "Niger Flag"
  9921. }, {
  9922. code: "1f1f3-1f1eb",
  9923. desc: "Norfolk Island Flag"
  9924. }, {
  9925. code: "1f1f3-1f1ec",
  9926. desc: "Nigeria Flag"
  9927. }, {
  9928. code: "1f1f3-1f1ee",
  9929. desc: "Nicaragua Flag"
  9930. }, {
  9931. code: "1f1f3-1f1f1",
  9932. desc: "Netherlands Flag"
  9933. }, {
  9934. code: "1f1f3-1f1f4",
  9935. desc: "Norway Flag"
  9936. }, {
  9937. code: "1f1f3-1f1f5",
  9938. desc: "Nepal Flag"
  9939. }, {
  9940. code: "1f1f3-1f1f7",
  9941. desc: "Nauru Flag"
  9942. }, {
  9943. code: "1f1f3-1f1fa",
  9944. desc: "Niue Flag"
  9945. }, {
  9946. code: "1f1f3-1f1ff",
  9947. desc: "New Zealand Flag"
  9948. }, {
  9949. code: "1f1f4-1f1f2",
  9950. desc: "Oman Flag"
  9951. }, {
  9952. code: "1f1f8-1f1ff",
  9953. desc: "Swaziland Flag"
  9954. }, {
  9955. code: "1f1f5-1f1e6",
  9956. desc: "Panama Flag"
  9957. }, {
  9958. code: "1f1f5-1f1ea",
  9959. desc: "Peru Flag"
  9960. }, {
  9961. code: "1f1f5-1f1eb",
  9962. desc: "French Polynesia Flag"
  9963. }, {
  9964. code: "1f1f5-1f1ec",
  9965. desc: "Papua New Guinea Flag"
  9966. }, {
  9967. code: "1f1f5-1f1ed",
  9968. desc: "Philippines Flag"
  9969. }, {
  9970. code: "1f1f5-1f1f1",
  9971. desc: "Pakistan Flag"
  9972. }, {
  9973. code: "1f1f5-1f1f2",
  9974. desc: "Poland Flag"
  9975. }, {
  9976. code: "1f1f5-1f1f3",
  9977. desc: "St. Pierre & Miquelon Flag"
  9978. }, {
  9979. code: "1f1f5-1f1f9",
  9980. desc: "Pitcairn Islands Flag"
  9981. }, {
  9982. code: "1f1f5-1f1f7",
  9983. desc: "Puerto Rico Flag"
  9984. }, {
  9985. code: "1f1f5-1f1f8",
  9986. desc: "Palestinian Territories Flag"
  9987. }, {
  9988. code: "1f1f5-1f1f9",
  9989. desc: "Portugal Flag"
  9990. }, {
  9991. code: "1f1f5-1f1fc",
  9992. desc: "Palau Flag"
  9993. }, {
  9994. code: "1f1f5-1f1fe",
  9995. desc: "Paraguay Flag"
  9996. }, {
  9997. code: "1f1f6-1f1e6",
  9998. desc: "Qatar Flag"
  9999. }, {
  10000. code: "1f1f7-1f1ea",
  10001. desc: "R\xe9union Flag"
  10002. }, {
  10003. code: "1f1f7-1f1f4",
  10004. desc: "Romania Flag"
  10005. }, {
  10006. code: "1f1f7-1f1f8",
  10007. desc: "Serbia Flag"
  10008. }, {
  10009. code: "1f1f7-1f1fc",
  10010. desc: "Rwanda Flag"
  10011. }, {
  10012. code: "1f1f8-1f1e6",
  10013. desc: "Saudi Arabia Flag"
  10014. }, {
  10015. code: "1f1f8-1f1e7",
  10016. desc: "Solomon Islands Flag"
  10017. }, {
  10018. code: "1f1f8-1f1e8",
  10019. desc: "Seychelles Flag"
  10020. }, {
  10021. code: "1f1f8-1f1e9",
  10022. desc: "Sudan Flag"
  10023. }, {
  10024. code: "1f1f8-1f1ea",
  10025. desc: "Sweden Flag"
  10026. }, {
  10027. code: "1f1f8-1f1ec",
  10028. desc: "Singapore Flag"
  10029. }, {
  10030. code: "1f1f8-1f1ee",
  10031. desc: "Slovenia Flag"
  10032. }, {
  10033. code: "1f1f8-1f1ed",
  10034. desc: "St. Helena Flag"
  10035. }, {
  10036. code: "1f1f8-1f1ef",
  10037. desc: "Svalbard & Jan Mayen Flag"
  10038. }, {
  10039. code: "1f1f8-1f1f1",
  10040. desc: "Sierra Leone Flag"
  10041. }, {
  10042. code: "1f1f8-1f1f2",
  10043. desc: "San Marino Flag"
  10044. }, {
  10045. code: "1f1f8-1f1f3",
  10046. desc: "Senegal Flag"
  10047. }, {
  10048. code: "1f1f8-1f1f4",
  10049. desc: "Somalia Flag"
  10050. }, {
  10051. code: "1f1f8-1f1f7",
  10052. desc: "Suriname Flag"
  10053. }, {
  10054. code: "1f1f8-1f1f8",
  10055. desc: "South Sudan Flag"
  10056. }, {
  10057. code: "1f1f8-1f1f9",
  10058. desc: "S\xe3o Tom\xe9 & Pr\xedncipe Flag"
  10059. }, {
  10060. code: "1f1f8-1f1fb",
  10061. desc: "El Salvador Flag"
  10062. }, {
  10063. code: "1f1f8-1f1fd",
  10064. desc: "Sint Maarten Flag"
  10065. }, {
  10066. code: "1f1f8-1f1fe",
  10067. desc: "Syria Flag"
  10068. }, {
  10069. code: "1f1f9-1f1e6",
  10070. desc: "Tristan Da Cunha Flag"
  10071. }, {
  10072. code: "1f1f9-1f1e8",
  10073. desc: "Turks & Caicos Islands Flag"
  10074. }, {
  10075. code: "1f1f9-1f1eb",
  10076. desc: "French Southern Territories Flag"
  10077. }, {
  10078. code: "1f1f9-1f1ec",
  10079. desc: "Togo Flag"
  10080. }, {
  10081. code: "1f1f9-1f1ed",
  10082. desc: "Thailand Flag"
  10083. }, {
  10084. code: "1f1f9-1f1ef",
  10085. desc: "Tajikistan Flag"
  10086. }, {
  10087. code: "1f1f9-1f1f0",
  10088. desc: "Tokelau Flag"
  10089. }, {
  10090. code: "1f1f9-1f1f1",
  10091. desc: "Timor-Leste Flag"
  10092. }, {
  10093. code: "1f1f9-1f1f2",
  10094. desc: "Turkmenistan Flag"
  10095. }, {
  10096. code: "1f1f9-1f1f3",
  10097. desc: "Tunisia Flag"
  10098. }, {
  10099. code: "1f1f9-1f1f4",
  10100. desc: "Tonga Flag"
  10101. }, {
  10102. code: "1f1f9-1f1f7",
  10103. desc: "Turkey Flag"
  10104. }, {
  10105. code: "1f1f9-1f1f9",
  10106. desc: "Trinidad & Tobago Flag"
  10107. }, {
  10108. code: "1f1f9-1f1fb",
  10109. desc: "Tuvalu Flag"
  10110. }, {
  10111. code: "1f1f9-1f1fc",
  10112. desc: "Taiwan Flag"
  10113. }, {
  10114. code: "1f1f9-1f1ff",
  10115. desc: "Tanzania Flag"
  10116. }, {
  10117. code: "1f1fa-1f1e6",
  10118. desc: "Ukraine City Flag"
  10119. }, {
  10120. code: "1f1fa-1f1ec",
  10121. desc: "Uganda Flag"
  10122. }, {
  10123. code: "1f1fa-1f1f2",
  10124. desc: "U.s. Outlying Islands Flag"
  10125. }, {
  10126. code: "1f1fa-1f1fe",
  10127. desc: "Uruguay Flag"
  10128. }, {
  10129. code: "1f1fa-1f1ff",
  10130. desc: "Uzbekistan Flag"
  10131. }, {
  10132. code: "1f1fb-1f1e6",
  10133. desc: "Vatican City Flag"
  10134. }, {
  10135. code: "1f1fb-1f1e8",
  10136. desc: "St. Vincent & Grenadines Flag"
  10137. }, {
  10138. code: "1f1fb-1f1ea",
  10139. desc: "Venezuela Flag"
  10140. }, {
  10141. code: "1f1fb-1f1ec",
  10142. desc: "British Virgin Islands Flag"
  10143. }, {
  10144. code: "1f1fb-1f1ee",
  10145. desc: "U.s. Virgin Islands Flag"
  10146. }, {
  10147. code: "1f1fb-1f1f3",
  10148. desc: "Vietnam Flag"
  10149. }, {
  10150. code: "1f1e6-1f1f8",
  10151. desc: "Samoa Flag"
  10152. }, {
  10153. code: "1f1fb-1f1fa",
  10154. desc: "Vanuatu Flag"
  10155. }, {
  10156. code: "1f1fc-1f1eb",
  10157. desc: '"Wallis & Futuna Flag'
  10158. }, {
  10159. code: "1f1fd-1f1f0",
  10160. desc: "Kosovo Flag"
  10161. }, {
  10162. code: "1f1fe-1f1ea",
  10163. desc: "Yemen Flag"
  10164. }, {
  10165. code: "1f1fe-1f1f9",
  10166. desc: "Mayotte Flag"
  10167. }, {
  10168. code: "1f1ff-1f1e6",
  10169. desc: "South Africa Flag"
  10170. }, {
  10171. code: "1f1ff-1f1f2",
  10172. desc: "Zambia Flag"
  10173. }, {
  10174. code: "1f1ff-1f1fc",
  10175. desc: "Zimbabwe Flag"
  10176. }, {
  10177. code: "1f1eb-1f1f7",
  10178. desc: "France Flag"
  10179. }, {
  10180. code: "1f1ee-1f1f9",
  10181. desc: "United Kingdom Flag"
  10182. }, {
  10183. code: "1f1ee-1f1f9",
  10184. desc: "Italy Flag"
  10185. }, {
  10186. code: "1f1ef-1f1f5",
  10187. desc: "Japan Flag"
  10188. }, {
  10189. code: "1f1f0-1f1f7",
  10190. desc: "South Korea Flag"
  10191. }, {
  10192. code: "1f1f7-1f1fa",
  10193. desc: "Russia Flag"
  10194. }, {
  10195. code: "1F6A9",
  10196. desc: "Triangular Flag on Post"
  10197. }, {
  10198. code: "1f1fa-1f1f8",
  10199. desc: "United States Flag"
  10200. }]
  10201. }],
  10202. emoticonsButtons: ["emoticonsBack", "|"],
  10203. emoticonsUseImage: !0
  10204. }), $e.PLUGINS.emoticons = function(m) {
  10205. var v = m.$,
  10206. a = m.opts.emoticonsSet,
  10207. o = a && a[0],
  10208. i = "";
  10209. function s() {
  10210. if (!m.selection.isCollapsed()) return !1;
  10211. var e = m.selection.element(),
  10212. t = m.selection.endElement();
  10213. if (e && m.node.hasClass(e, "fr-emoticon")) return e;
  10214. if (t && m.node.hasClass(t, "fr-emoticon")) return t;
  10215. var n = m.selection.ranges(0),
  10216. r = n.startContainer;
  10217. if (r.nodeType == Node.ELEMENT_NODE && 0 < r.childNodes.length && 0 < n.startOffset) {
  10218. var a = r.childNodes[n.startOffset - 1];
  10219. if (m.node.hasClass(a, "fr-emoticon")) return a
  10220. }
  10221. return !1
  10222. }
  10223. function l() {
  10224. return "".concat(function r(e, t) {
  10225. return '<div class="fr-buttons fr-tabs fr-tabs-scroll">\n '.concat(function n(e, r) {
  10226. var a = "";
  10227. return e.forEach(function(e) {
  10228. var t = {
  10229. image: e.code.toLowerCase()
  10230. },
  10231. n = {
  10232. elementClass: e.id === r.id ? "fr-active fr-active-tab" : "",
  10233. emoticonsUnicodeClass: m.opts.emoticonsUseImage ? "" : "fr-tabs-unicode",
  10234. title: m.language.translate(e.name),
  10235. dataCmd: "setEmoticonCategory",
  10236. dataParam1: e.id,
  10237. image: m.opts.emoticonsUseImage ? '<img src="https://cdnjs.cloudflare.com/ajax/libs/emojione/2.0.1/assets/svg/'.concat(t.image, '.svg"/>') : "&#x".concat(t.image, ";")
  10238. };
  10239. a += '<button class="fr-command fr-btn '.concat(n.elementClass, " ").concat(n.emoticonsUnicodeClass, '" \n title="').concat(n.title, '" data-cmd="').concat(n.dataCmd, '" data-param1="').concat(n.dataParam1, '">\n ').concat(n.image, " </button>")
  10240. }), a
  10241. }(e, t), "\n </div>")
  10242. }(a, o), "\n ").concat(function n(e) {
  10243. return '\n <div class="fr-icon-container fr-emoticon-container">\n '.concat(function t(e) {
  10244. var a = "";
  10245. return e.emoticons.forEach(function(e) {
  10246. var t = e.code.split("-").reduce(function(e, t) {
  10247. return e ? e + "&zwj;&#x" + t.toLowerCase() + ";" : "&#x" + t.toLowerCase() + ";"
  10248. }, ""),
  10249. n = {
  10250. image: e.code.toLowerCase(),
  10251. compiledCode: e.uCode ? e.uCode : t
  10252. },
  10253. r = {
  10254. dataParam1: e.code.toLowerCase(),
  10255. dataParam2: n.compiledCode,
  10256. title: m.language.translate(e.desc),
  10257. image: m.opts.emoticonsUseImage ? '<img src="https://cdnjs.cloudflare.com/ajax/libs/emojione/2.0.1/assets/svg/'.concat(n.image, '.svg"/>') : "".concat(n.compiledCode),
  10258. desc: m.language.translate(e.desc)
  10259. };
  10260. a += '<span class="fr-command fr-emoticon fr-icon" role="button" \n data-cmd="insertEmoticon" data-param1="'.concat(r.dataParam1, '" \n data-param2="').concat(r.dataParam2, '" title="').concat(r.title, '" >\n ').concat(r.image, '<span class="fr-sr-only">').concat(r.desc, "&nbsp;&nbsp;&nbsp;</span></span>")
  10261. }), a
  10262. }(e), "\n </div>\n ")
  10263. }(o), "\n ").concat(function e() {
  10264. return m.opts.emoticonsUseImage ? '<p style="font-size: 12px; text-align: center; padding: 0 5px;">Emoji free by <a class="fr-link" tabIndex="-1" href="http://emojione.com/" target="_blank" rel="nofollow noopener noreferrer" role="link" aria-label="Open Emoji One website.">Emoji One</a></p>' : ""
  10265. }())
  10266. }
  10267. return {
  10268. _init: function e() {
  10269. var n = function n() {
  10270. for (var e = m.el.querySelectorAll(".fr-emoticon:not(.fr-deletable)"), t = 0; t < e.length; t++) e[t].className += " fr-deletable"
  10271. };
  10272. n(), m.events.on("html.set", n), m.events.on("keydown", function(e) {
  10273. if (m.keys.isCharacter(e.which) && m.selection.inEditor()) {
  10274. var t = m.selection.ranges(0),
  10275. n = s();
  10276. m.node.hasClass(n, "fr-emoticon-img") && n && (0 === t.startOffset && m.selection.element() === n ? v(n).before($e.MARKERS + $e.INVISIBLE_SPACE) : v(n).after($e.INVISIBLE_SPACE + $e.MARKERS), m.selection.restore())
  10277. }
  10278. }), m.events.on("keyup", function(e) {
  10279. for (var t = m.el.querySelectorAll(".fr-emoticon"), n = 0; n < t.length; n++) "undefined" != typeof t[n].textContent && 0 === t[n].textContent.replace(/\u200B/gi, "").length && v(t[n]).remove();
  10280. if (!(e.which >= $e.KEYCODE.ARROW_LEFT && e.which <= $e.KEYCODE.ARROW_DOWN)) {
  10281. var r = s();
  10282. m.node.hasClass(r, "fr-emoticon-img") && (v(r).append($e.MARKERS), m.selection.restore())
  10283. }
  10284. })
  10285. },
  10286. insert: function c(e, t) {
  10287. var n = s(),
  10288. r = m.selection.ranges(0);
  10289. n ? (0 === r.startOffset && m.selection.element() === n ? v(n).before($e.MARKERS + $e.INVISIBLE_SPACE) : 0 < r.startOffset && m.selection.element() === n && r.commonAncestorContainer.parentNode.classList.contains("fr-emoticon") && v(n).after($e.INVISIBLE_SPACE + $e.MARKERS), m.selection.restore(), m.html.insert('<span class="fr-emoticon fr-deletable'.concat(t ? " fr-emoticon-img" : "", '"').concat(t ? ' style="background: url('.concat(t, ');"') : "", ">").concat(t ? "&nbsp;" : e, "</span>&nbsp;").concat($e.MARKERS), !0)) : m.html.insert('<span class="fr-emoticon fr-deletable'.concat(t ? " fr-emoticon-img" : "", '"').concat(t ? ' style="background: url('.concat(t, ');"') : "", ">").concat(t ? "&nbsp;" : e, "</span>&nbsp;"), !0)
  10290. },
  10291. setEmoticonCategory: function n(t) {
  10292. o = a.filter(function(e) {
  10293. return e.id === t
  10294. })[0],
  10295. function e() {
  10296. m.popups.get("emoticons").html(i + l())
  10297. }()
  10298. },
  10299. showEmoticonsPopup: function d() {
  10300. var e = m.popups.get("emoticons");
  10301. if (e || (e = function o() {
  10302. m.opts.toolbarInline && 0 < m.opts.emoticonsButtons.length && (i = '<div class="fr-buttons fr-emoticons-buttons fr-tabs">'.concat(m.button.buildList(m.opts.emoticonsButtons), "</div>"));
  10303. var e = {
  10304. buttons: i,
  10305. custom_layer: l()
  10306. },
  10307. t = m.popups.create("emoticons", e);
  10308. return function n(g) {
  10309. m.events.on("popup.tab", function(e) {
  10310. var t = v(e.currentTarget);
  10311. if (!m.popups.isVisible("emoticons") || !t.is("span, a")) return !0;
  10312. var n, r, a, o = e.which;
  10313. if ($e.KEYCODE.TAB == o) {
  10314. if (t.is("span.fr-emoticon") && e.shiftKey || t.is("a") && !e.shiftKey) {
  10315. var i = g.find(".fr-buttons");
  10316. n = !m.accessibility.focusToolbar(i, !!e.shiftKey)
  10317. }
  10318. if (!1 !== n) {
  10319. var s = g.find("span.fr-emoticon:focus").first().concat(g.findVisible(" div.fr-tabs").first().concat(g.find("a")));
  10320. t.is("span.fr-emoticon") && (s = s.not("span.fr-emoticon:not(:focus)")), r = s.index(t), r = e.shiftKey ? ((r - 1) % s.length + s.length) % s.length : (r + 1) % s.length, a = s.get(r), m.events.disableBlur(), a.focus(), n = !1
  10321. }
  10322. } else if ($e.KEYCODE.ARROW_UP == o || $e.KEYCODE.ARROW_DOWN == o || $e.KEYCODE.ARROW_LEFT == o || $e.KEYCODE.ARROW_RIGHT == o) {
  10323. if (t.is("span.fr-emoticon")) {
  10324. var l = t.parent().find("span.fr-emoticon");
  10325. r = l.index(t);
  10326. var c = m.opts.emoticonsStep,
  10327. d = Math.floor(l.length / c),
  10328. f = r % c,
  10329. p = Math.floor(r / c),
  10330. u = p * c + f,
  10331. h = d * c;
  10332. $e.KEYCODE.ARROW_UP == o ? u = ((u - c) % h + h) % h : $e.KEYCODE.ARROW_DOWN == o ? u = (u + c) % h : $e.KEYCODE.ARROW_LEFT == o ? u = ((u - 1) % h + h) % h : $e.KEYCODE.ARROW_RIGHT == o && (u = (u + 1) % h), a = v(l.get(u)), m.events.disableBlur(), a.focus(), n = !1
  10333. }
  10334. } else $e.KEYCODE.ENTER == o && (t.is("a") ? t[0].click() : m.button.exec(t), n = !1);
  10335. return !1 === n && (e.preventDefault(), e.stopPropagation()), n
  10336. }, !0)
  10337. }(t), t
  10338. }()), !e.hasClass("fr-active")) {
  10339. m.popups.refresh("emoticons"), m.popups.setContainer("emoticons", m.$tb);
  10340. var t = m.$tb.find('.fr-command[data-cmd="emoticons"]'),
  10341. n = m.button.getPosition(t),
  10342. r = n.left,
  10343. a = n.top;
  10344. m.popups.show("emoticons", r, a, t.outerHeight())
  10345. }
  10346. },
  10347. back: function t() {
  10348. m.popups.hide("emoticons"), m.toolbar.showInline()
  10349. }
  10350. }
  10351. }, $e.DefineIcon("emoticons", {
  10352. NAME: "smile-o",
  10353. FA5NAME: "smile",
  10354. SVG_KEY: "smile"
  10355. }), $e.RegisterCommand("emoticons", {
  10356. title: "Emoticons",
  10357. undo: !1,
  10358. focus: !0,
  10359. refreshAfterCallback: !1,
  10360. popup: !0,
  10361. callback: function() {
  10362. this.popups.isVisible("emoticons") ? (this.$el.find(".fr-marker").length && (this.events.disableBlur(), this.selection.restore()), this.popups.hide("emoticons")) : this.emoticons.showEmoticonsPopup()
  10363. },
  10364. plugin: "emoticons"
  10365. }), $e.RegisterCommand("insertEmoticon", {
  10366. callback: function(e, t, n) {
  10367. this.emoticons.insert(n, this.opts.emoticonsUseImage ? "https://cdnjs.cloudflare.com/ajax/libs/emojione/2.0.1/assets/svg/".concat(t, ".svg") : null), this.popups.hide("emoticons")
  10368. }
  10369. }), $e.RegisterCommand("setEmoticonCategory", {
  10370. undo: !1,
  10371. focus: !1,
  10372. callback: function(e, t) {
  10373. this.emoticons.setEmoticonCategory(t)
  10374. }
  10375. }), $e.DefineIcon("emoticonsBack", {
  10376. NAME: "arrow-left",
  10377. SVG_KEY: "back"
  10378. }), $e.RegisterCommand("emoticonsBack", {
  10379. title: "Back",
  10380. undo: !1,
  10381. focus: !1,
  10382. back: !0,
  10383. refreshAfterCallback: !1,
  10384. callback: function() {
  10385. this.emoticons.back()
  10386. }
  10387. }), Object.assign($e.DEFAULTS, {
  10388. entities: "&quot;&#39;&iexcl;&cent;&pound;&curren;&yen;&brvbar;&sect;&uml;&copy;&ordf;&laquo;&not;&shy;&reg;&macr;&deg;&plusmn;&sup2;&sup3;&acute;&micro;&para;&middot;&cedil;&sup1;&ordm;&raquo;&frac14;&frac12;&frac34;&iquest;&Agrave;&Aacute;&Acirc;&Atilde;&Auml;&Aring;&AElig;&Ccedil;&Egrave;&Eacute;&Ecirc;&Euml;&Igrave;&Iacute;&Icirc;&Iuml;&ETH;&Ntilde;&Ograve;&Oacute;&Ocirc;&Otilde;&Ouml;&times;&Oslash;&Ugrave;&Uacute;&Ucirc;&Uuml;&Yacute;&THORN;&szlig;&agrave;&aacute;&acirc;&atilde;&auml;&aring;&aelig;&ccedil;&egrave;&eacute;&ecirc;&euml;&igrave;&iacute;&icirc;&iuml;&eth;&ntilde;&ograve;&oacute;&ocirc;&otilde;&ouml;&divide;&oslash;&ugrave;&uacute;&ucirc;&uuml;&yacute;&thorn;&yuml;&OElig;&oelig;&Scaron;&scaron;&Yuml;&fnof;&circ;&tilde;&Alpha;&Beta;&Gamma;&Delta;&Epsilon;&Zeta;&Eta;&Theta;&Iota;&Kappa;&Lambda;&Mu;&Nu;&Xi;&Omicron;&Pi;&Rho;&Sigma;&Tau;&Upsilon;&Phi;&Chi;&Psi;&Omega;&alpha;&beta;&gamma;&delta;&epsilon;&zeta;&eta;&theta;&iota;&kappa;&lambda;&mu;&nu;&xi;&omicron;&pi;&rho;&sigmaf;&sigma;&tau;&upsilon;&phi;&chi;&psi;&omega;&thetasym;&upsih;&piv;&ensp;&emsp;&thinsp;&zwnj;&zwj;&lrm;&rlm;&ndash;&mdash;&lsquo;&rsquo;&sbquo;&ldquo;&rdquo;&bdquo;&dagger;&Dagger;&bull;&hellip;&permil;&prime;&Prime;&lsaquo;&rsaquo;&oline;&frasl;&euro;&image;&weierp;&real;&trade;&alefsym;&larr;&uarr;&rarr;&darr;&harr;&crarr;&lArr;&uArr;&rArr;&dArr;&hArr;&forall;&part;&exist;&empty;&nabla;&isin;&notin;&ni;&prod;&sum;&minus;&lowast;&radic;&prop;&infin;&ang;&and;&or;&cap;&cup;&int;&there4;&sim;&cong;&asymp;&ne;&equiv;&le;&ge;&sub;&sup;&nsub;&sube;&supe;&oplus;&otimes;&perp;&sdot;&lceil;&rceil;&lfloor;&rfloor;&lang;&rang;&loz;&spades;&clubs;&hearts;&diams;"
  10389. }), $e.PLUGINS.entities = function(a) {
  10390. var o, i, s = a.$;
  10391. function r(e) {
  10392. var t = e.textContent;
  10393. if (t.match(o)) {
  10394. for (var n = "", r = 0; r < t.length; r++) i[t[r]] ? n += i[t[r]] : n += t[r];
  10395. e.textContent = n
  10396. }
  10397. }
  10398. function l(e) {
  10399. if (e && 0 <= ["STYLE", "SCRIPT", "svg", "IFRAME"].indexOf(e.tagName)) return !0;
  10400. for (var t = a.node.contents(e), n = 0; n < t.length; n++) t[n].nodeType === Node.TEXT_NODE ? r(t[n]) : l(t[n]);
  10401. return e.nodeType === Node.TEXT_NODE && r(e), !1
  10402. }
  10403. function c(e) {
  10404. return 0 === e.length ? "" : a.clean.exec(e, l).replace(/\&amp;/g, "&")
  10405. }
  10406. return {
  10407. _init: function d() {
  10408. a.opts.htmlSimpleAmpersand || (a.opts.entities = a.opts.entities + "&amp;");
  10409. var e = s(document.createElement("div")).html(a.opts.entities).text(),
  10410. t = a.opts.entities.split(";");
  10411. i = {}, o = "";
  10412. for (var n = 0; n < e.length; n++) {
  10413. var r = e.charAt(n);
  10414. i[r] = t[n] + ";", o += "\\" + r + (n < e.length - 1 ? "|" : "")
  10415. }
  10416. o = new RegExp("(" + o + ")", "g"), a.events.on("html.get", c, !0)
  10417. }
  10418. }
  10419. }, Object.assign($e.POPUP_TEMPLATES, {
  10420. "file.insert": "[_BUTTONS_][_UPLOAD_LAYER_][_PROGRESS_BAR_]"
  10421. }), Object.assign($e.DEFAULTS, {
  10422. fileUpload: !0,
  10423. fileUploadURL: null,
  10424. fileUploadParam: "file",
  10425. fileUploadParams: {},
  10426. fileUploadToS3: !1,
  10427. fileUploadMethod: "POST",
  10428. fileMaxSize: 10485760,
  10429. fileAllowedTypes: ["*"],
  10430. fileInsertButtons: ["fileBack", "|"],
  10431. fileUseSelectedText: !1
  10432. }), $e.PLUGINS.file = function(d) {
  10433. var r, f = d.$,
  10434. l = "https://i.froala.com/upload",
  10435. p = 2,
  10436. u = 3,
  10437. h = 4,
  10438. c = 5,
  10439. g = 6,
  10440. n = {};
  10441. function m() {
  10442. var e = d.popups.get("file.insert");
  10443. e || (e = S()), e.find(".fr-layer.fr-active").removeClass("fr-active").addClass("fr-pactive"), e.find(".fr-file-progress-bar-layer").addClass("fr-active"), e.find(".fr-buttons").hide(), a(d.language.translate("Uploading"), 0)
  10444. }
  10445. function o(e) {
  10446. var t = d.popups.get("file.insert");
  10447. t && (t.find(".fr-layer.fr-pactive").addClass("fr-active").removeClass("fr-pactive"), t.find(".fr-file-progress-bar-layer").removeClass("fr-active"), t.find(".fr-buttons").show(), e && (d.events.focus(), d.popups.hide("file.insert")))
  10448. }
  10449. function a(e, t) {
  10450. var n = d.popups.get("file.insert");
  10451. if (n) {
  10452. var r = n.find(".fr-file-progress-bar-layer");
  10453. r.find("h3").text(e + (t ? " " + t + "%" : "")), r.removeClass("fr-error"), t ? (r.find("div").removeClass("fr-indeterminate"), r.find("div > span").css("width", t + "%")) : r.find("div").addClass("fr-indeterminate")
  10454. }
  10455. }
  10456. function v(e, t, n) {
  10457. d.edit.on(), d.events.focus(!0), d.selection.restore(), d.opts.fileUseSelectedText && d.selection.text().length && (t = d.selection.text()), d.html.insert('<a href="' + e + '" target="_blank" id="fr-inserted-file" class="fr-file">' + t + "</a>");
  10458. var r = d.$el.find("#fr-inserted-file");
  10459. r.removeAttr("id"), d.popups.hide("file.insert"), d.undo.saveStep(), R(), d.events.trigger("file.inserted", [r, n])
  10460. }
  10461. function b(e) {
  10462. var t = this.status,
  10463. n = this.response,
  10464. r = this.responseXML,
  10465. a = this.responseText;
  10466. try {
  10467. if (d.opts.fileUploadToS3)
  10468. if (201 === t) {
  10469. var o = function s(e) {
  10470. try {
  10471. var t = f(e).find("Location").text(),
  10472. n = f(e).find("Key").text();
  10473. return !1 === d.events.trigger("file.uploadedToS3", [t, n, e], !0) ? (d.edit.on(), !1) : t
  10474. } catch (r) {
  10475. return A(h, e), !1
  10476. }
  10477. }(r);
  10478. o && v(o, e, n || r)
  10479. } else A(h, n || r);
  10480. else if (200 <= t && t < 300) {
  10481. var i = function l(e) {
  10482. try {
  10483. if (!1 === d.events.trigger("file.uploaded", [e], !0)) return d.edit.on(), !1;
  10484. var t = JSON.parse(e);
  10485. return t.link ? t : (A(p, e), !1)
  10486. } catch (n) {
  10487. return A(h, e), !1
  10488. }
  10489. }(a);
  10490. i && v(i.link, e, n || a)
  10491. } else A(u, n || a)
  10492. } catch (c) {
  10493. A(h, n || a)
  10494. }
  10495. }
  10496. function E() {
  10497. A(h, this.response || this.responseText || this.responseXML)
  10498. }
  10499. function T(e) {
  10500. if (e.lengthComputable) {
  10501. var t = e.loaded / e.total * 100 | 0;
  10502. a(d.language.translate("Uploading"), t)
  10503. }
  10504. }
  10505. function A(e, t) {
  10506. d.edit.on(),
  10507. function r(e) {
  10508. m();
  10509. var t = d.popups.get("file.insert").find(".fr-file-progress-bar-layer");
  10510. t.addClass("fr-error");
  10511. var n = t.find("h3");
  10512. n.text(e), d.events.disableBlur(), n.focus()
  10513. }(d.language.translate("Something went wrong. Please try again.")), d.events.trigger("file.error", [{
  10514. code: e,
  10515. message: n[e]
  10516. },
  10517. t
  10518. ])
  10519. }
  10520. function C() {
  10521. d.edit.on(), o(!0)
  10522. }
  10523. function i(e) {
  10524. if (void 0 !== e && 0 < e.length) {
  10525. if (!1 === d.events.trigger("file.beforeUpload", [e])) return !1;
  10526. var t, n = e[0];
  10527. if ((null === d.opts.fileUploadURL || d.opts.fileUploadURL === l) && !d.opts.fileUploadToS3) return function s(a) {
  10528. var o = new FileReader;
  10529. o.onload = function() {
  10530. for (var e = o.result, t = atob(o.result.split(",")[1]), n = [], r = 0; r < t.length; r++) n.push(t.charCodeAt(r));
  10531. e = window.URL.createObjectURL(new Blob([new Uint8Array(n)], {
  10532. type: a.type
  10533. })), d.file.insert(e, a.name, null)
  10534. }, m(), o.readAsDataURL(a)
  10535. }(n), !1;
  10536. if (n.size > d.opts.fileMaxSize) return A(c), !1;
  10537. if (d.opts.fileAllowedTypes.indexOf("*") < 0 && d.opts.fileAllowedTypes.indexOf(n.type.replace(/file\//g, "")) < 0) return A(g), !1;
  10538. if (d.drag_support.formdata && (t = d.drag_support.formdata ? new FormData : null), t) {
  10539. var r;
  10540. if (!1 !== d.opts.fileUploadToS3)
  10541. for (r in t.append("key", d.opts.fileUploadToS3.keyStart + (new Date).getTime() + "-" + (n.name || "untitled")), t.append("success_action_status", "201"), t.append("X-Requested-With", "xhr"), t.append("Content-Type", n.type), d.opts.fileUploadToS3.params) d.opts.fileUploadToS3.params.hasOwnProperty(r) && t.append(r, d.opts.fileUploadToS3.params[r]);
  10542. for (r in d.opts.fileUploadParams) d.opts.fileUploadParams.hasOwnProperty(r) && t.append(r, d.opts.fileUploadParams[r]);
  10543. t.append(d.opts.fileUploadParam, n);
  10544. var a = d.opts.fileUploadURL;
  10545. d.opts.fileUploadToS3 && (a = d.opts.fileUploadToS3.uploadURL ? d.opts.fileUploadToS3.uploadURL : "https://" + d.opts.fileUploadToS3.region + ".amazonaws.com/" + d.opts.fileUploadToS3.bucket);
  10546. var o = d.core.getXHR(a, d.opts.fileUploadMethod);
  10547. o.onload = function() {
  10548. b.call(o, n.name)
  10549. }, o.onerror = E, o.upload.onprogress = T, o.onabort = C, m();
  10550. var i = d.popups.get("file.insert");
  10551. i && (i.off("abortUpload"), i.on("abortUpload", function() {
  10552. 4 !== o.readyState && o.abort()
  10553. })), o.send(t)
  10554. }
  10555. }
  10556. }
  10557. function s() {
  10558. o()
  10559. }
  10560. function S(e) {
  10561. if (e) return d.popups.onHide("file.insert", s), !0;
  10562. var t;
  10563. d.opts.fileUpload || d.opts.fileInsertButtons.splice(d.opts.fileInsertButtons.indexOf("fileUpload"), 1), t = '<div class="fr-buttons fr-tabs">' + d.button.buildList(d.opts.fileInsertButtons) + "</div>";
  10564. var n = "";
  10565. d.opts.fileUpload && (n = '<div class="fr-file-upload-layer fr-layer fr-active" id="fr-file-upload-layer-' + d.id + '"><strong>' + d.language.translate("Drop file") + "</strong><br>(" + d.language.translate("or click") + ')<div class="fr-form"><input type="file" name="' + d.opts.fileUploadParam + '" accept="' + (0 <= d.opts.fileAllowedTypes.indexOf("*") ? "/" : "") + d.opts.fileAllowedTypes.join(", ").toLowerCase() + '" tabIndex="-1" aria-labelledby="fr-file-upload-layer-' + d.id + '" role="button"></div></div>');
  10566. var r = {
  10567. buttons: t,
  10568. upload_layer: n,
  10569. progress_bar: '<div class="fr-file-progress-bar-layer fr-layer"><h3 tabIndex="-1" class="fr-message">Uploading</h3><div class="fr-loader"><span class="fr-progress"></span></div><div class="fr-action-buttons"><button type="button" class="fr-command fr-dismiss" data-cmd="fileDismissError" tabIndex="2" role="button">OK</button></div></div>'
  10570. },
  10571. a = d.popups.create("file.insert", r);
  10572. return function o(n) {
  10573. d.events.$on(n, "dragover dragenter", ".fr-file-upload-layer", function() {
  10574. return f(this).addClass("fr-drop"), !1
  10575. }, !0), d.events.$on(n, "dragleave dragend", ".fr-file-upload-layer", function() {
  10576. return f(this).removeClass("fr-drop"), !1
  10577. }, !0), d.events.$on(n, "drop", ".fr-file-upload-layer", function(e) {
  10578. e.preventDefault(), e.stopPropagation(), f(this).removeClass("fr-drop");
  10579. var t = e.originalEvent.dataTransfer;
  10580. t && t.files && (n.data("instance") || d).file.upload(t.files)
  10581. }, !0), d.helpers.isIOS() && d.events.$on(n, "touchstart", '.fr-file-upload-layer input[type="file"]', function() {
  10582. f(this).trigger("click")
  10583. }), d.events.$on(n, "change", '.fr-file-upload-layer input[type="file"]', function() {
  10584. if (this.files) {
  10585. var e = n.data("instance") || d;
  10586. e.events.disableBlur(), n.find("input:focus").blur(), e.events.enableBlur(), e.file.upload(this.files)
  10587. }
  10588. f(this).val("")
  10589. }, !0)
  10590. }(a), a
  10591. }
  10592. function t(e) {
  10593. d.node.hasClass(e, "fr-file")
  10594. }
  10595. function y(e) {
  10596. var t = e.originalEvent.dataTransfer;
  10597. if (t && t.files && t.files.length) {
  10598. var n = t.files[0];
  10599. if (n && "undefined" != typeof n.type) {
  10600. if (n.type.indexOf("image") < 0) {
  10601. if (!d.opts.fileUpload) return e.preventDefault(), e.stopPropagation(), !1;
  10602. d.markers.remove(), d.markers.insertAtPoint(e.originalEvent), d.$el.find(".fr-marker").replaceWith($e.MARKERS), d.popups.hideAll();
  10603. var r = d.popups.get("file.insert");
  10604. return r || (r = S()), d.popups.setContainer("file.insert", d.$sc), d.popups.show("file.insert", e.originalEvent.pageX, e.originalEvent.pageY), m(), i(t.files), e.preventDefault(), e.stopPropagation(), !1
  10605. }
  10606. } else n.type.indexOf("image") < 0 && (e.preventDefault(), e.stopPropagation())
  10607. }
  10608. }
  10609. function R() {
  10610. var e, t = Array.prototype.slice.call(d.el.querySelectorAll("a.fr-file")),
  10611. n = [];
  10612. for (e = 0; e < t.length; e++) n.push(t[e].getAttribute("href"));
  10613. if (r)
  10614. for (e = 0; e < r.length; e++) n.indexOf(r[e].getAttribute("href")) < 0 && d.events.trigger("file.unlink", [r[e]]);
  10615. r = t
  10616. }
  10617. return n[1] = "File cannot be loaded from the passed link.", n[p] = "No link in upload response.", n[u] = "Error during file upload.", n[h] = "Parsing response failed.", n[c] = "File is too large.", n[g] = "File file type is invalid.", n[7] = "Files can be uploaded only to same domain in IE 8 and IE 9.", {
  10618. _init: function L() {
  10619. ! function e() {
  10620. d.events.on("drop", y), d.events.$on(d.$win, "keydown", function(e) {
  10621. var t = e.which,
  10622. n = d.popups.get("file.insert");
  10623. n && t === $e.KEYCODE.ESC && n.trigger("abortUpload")
  10624. }), d.events.on("destroy", function() {
  10625. var e = d.popups.get("file.insert");
  10626. e && e.trigger("abortUpload")
  10627. })
  10628. }(), d.events.on("link.beforeRemove", t), d.$wp && (R(), d.events.on("contentChanged", R)), S(!0)
  10629. },
  10630. showInsertPopup: function w() {
  10631. var e = d.$tb.find('.fr-command[data-cmd="insertFile"]'),
  10632. t = d.popups.get("file.insert");
  10633. if (t || (t = S()), o(), !t.hasClass("fr-active"))
  10634. if (d.popups.refresh("file.insert"), d.popups.setContainer("file.insert", d.$tb), e.isVisible) {
  10635. var n = d.button.getPosition(e),
  10636. r = n.left,
  10637. a = n.top;
  10638. d.popups.show("file.insert", r, a, e.outerHeight())
  10639. } else d.position.forSelection(t), d.popups.show("file.insert")
  10640. },
  10641. upload: i,
  10642. insert: v,
  10643. back: function e() {
  10644. d.events.disableBlur(), d.selection.restore(), d.events.enableBlur(), d.popups.hide("file.insert"), d.toolbar.showInline()
  10645. },
  10646. hideProgressBar: o
  10647. }
  10648. }, $e.DefineIcon("insertFile", {
  10649. NAME: "file-o",
  10650. FA5NAME: "file",
  10651. SVG_KEY: "insertFile"
  10652. }), $e.RegisterCommand("insertFile", {
  10653. title: "Upload File",
  10654. undo: !1,
  10655. focus: !0,
  10656. refreshAfterCallback: !1,
  10657. popup: !0,
  10658. callback: function() {
  10659. this.popups.isVisible("file.insert") ? (this.$el.find(".fr-marker").length && (this.events.disableBlur(), this.selection.restore()), this.popups.hide("file.insert")) : this.file.showInsertPopup()
  10660. },
  10661. plugin: "file"
  10662. }), $e.DefineIcon("fileBack", {
  10663. NAME: "arrow-left",
  10664. SVG_KEY: "back"
  10665. }), $e.RegisterCommand("fileBack", {
  10666. title: "Back",
  10667. undo: !1,
  10668. focus: !1,
  10669. back: !0,
  10670. refreshAfterCallback: !1,
  10671. callback: function() {
  10672. this.file.back()
  10673. },
  10674. refresh: function(e) {
  10675. this.opts.toolbarInline ? (e.removeClass("fr-hidden"), e.next(".fr-separator").removeClass("fr-hidden")) : (e.addClass("fr-hidden"), e.next(".fr-separator").addClass("fr-hidden"))
  10676. }
  10677. }), $e.RegisterCommand("fileDismissError", {
  10678. title: "OK",
  10679. callback: function() {
  10680. this.file.hideProgressBar(!0)
  10681. }
  10682. }), Object.assign($e.DEFAULTS, {
  10683. fontFamily: {
  10684. "Arial,Helvetica,sans-serif": "Arial",
  10685. "Georgia,serif": "Georgia",
  10686. "Impact,Charcoal,sans-serif": "Impact",
  10687. "Tahoma,Geneva,sans-serif": "Tahoma",
  10688. "Times New Roman,Times,serif,-webkit-standard": "Times New Roman",
  10689. "Verdana,Geneva,sans-serif": "Verdana"
  10690. },
  10691. fontFamilySelection: !1,
  10692. fontFamilyDefaultSelection: "Font Family"
  10693. }), $e.PLUGINS.fontFamily = function(a) {
  10694. var o = a.$;
  10695. function i(e) {
  10696. var t = e.replace(/(sans-serif|serif|monospace|cursive|fantasy)/gi, "").replace(/"|'| /g, "").split(",");
  10697. return o(this).grep(t, function(e) {
  10698. return 0 < e.length
  10699. })
  10700. }
  10701. function s(e, t) {
  10702. for (var n = 0; n < e.length; n++)
  10703. for (var r = 0; r < t.length; r++)
  10704. if (e[n].toLowerCase() === t[r].toLowerCase()) return [n, r];
  10705. return null
  10706. }
  10707. function n() {
  10708. var e = i(o(a.selection.element()).css("font-family")),
  10709. t = [];
  10710. for (var n in a.opts.fontFamily)
  10711. if (a.opts.fontFamily.hasOwnProperty(n)) {
  10712. var r = s(e, i(n));
  10713. r && t.push([n, r])
  10714. }
  10715. return 0 === t.length ? null : (t.sort(function(e, t) {
  10716. var n = e[1][0] - t[1][0];
  10717. return 0 === n ? e[1][1] - t[1][1] : n
  10718. }), t[0][0])
  10719. }
  10720. return {
  10721. apply: function t(e) {
  10722. a.format.applyStyle("font-family", e)
  10723. },
  10724. refreshOnShow: function r(e, t) {
  10725. t.find(".fr-command.fr-active").removeClass("fr-active").attr("aria-selected", !1), t.find('.fr-command[data-param1="' + n() + '"]').addClass("fr-active").attr("aria-selected", !0)
  10726. },
  10727. refresh: function l(e) {
  10728. if (a.opts.fontFamilySelection) {
  10729. var t = o(a.selection.element()).css("font-family").replace(/(sans-serif|serif|monospace|cursive|fantasy)/gi, "").replace(/"|'|/g, "").split(",");
  10730. e.find("> span").text(a.opts.fontFamily[n()] || t[0] || a.language.translate(a.opts.fontFamilyDefaultSelection))
  10731. }
  10732. }
  10733. }
  10734. }, $e.RegisterCommand("fontFamily", {
  10735. type: "dropdown",
  10736. displaySelection: function(e) {
  10737. return e.opts.fontFamilySelection
  10738. },
  10739. defaultSelection: function(e) {
  10740. return e.opts.fontFamilyDefaultSelection
  10741. },
  10742. displaySelectionWidth: 120,
  10743. html: function() {
  10744. var e = '<ul class="fr-dropdown-list" role="presentation">',
  10745. t = this.opts.fontFamily;
  10746. for (var n in t) t.hasOwnProperty(n) && (e += '<li role="presentation"><a class="fr-command" tabIndex="-1" role="option" data-cmd="fontFamily" data-param1="' + n + '" style="font-family: ' + n + '" title="' + t[n] + '">' + t[n] + "</a></li>");
  10747. return e += "</ul>"
  10748. },
  10749. title: "Font Family",
  10750. callback: function(e, t) {
  10751. this.fontFamily.apply(t)
  10752. },
  10753. refresh: function(e) {
  10754. this.fontFamily.refresh(e)
  10755. },
  10756. refreshOnShow: function(e, t) {
  10757. this.fontFamily.refreshOnShow(e, t)
  10758. },
  10759. plugin: "fontFamily"
  10760. }), $e.DefineIcon("fontFamily", {
  10761. NAME: "font",
  10762. SVG_KEY: "fontFamily"
  10763. }), Object.assign($e.DEFAULTS, {
  10764. fontSize: ["8", "9", "10", "11", "12", "14", "18", "24", "30", "36", "48", "60", "72", "96"],
  10765. fontSizeSelection: !1,
  10766. fontSizeDefaultSelection: "12",
  10767. fontSizeUnit: "px"
  10768. }), $e.PLUGINS.fontSize = function(r) {
  10769. var a = r.$;
  10770. return {
  10771. apply: function t(e) {
  10772. r.format.applyStyle("font-size", e)
  10773. },
  10774. refreshOnShow: function o(e, t) {
  10775. var n = a(r.selection.element()).css("font-size");
  10776. "pt" === r.opts.fontSizeUnit && (n = Math.round(72 * parseFloat(n, 10) / 96) + "pt"), t.find(".fr-command.fr-active").removeClass("fr-active").attr("aria-selected", !1), t.find('.fr-command[data-param1="' + n + '"]').addClass("fr-active").attr("aria-selected", !0)
  10777. },
  10778. refresh: function n(e) {
  10779. if (r.opts.fontSizeSelection) {
  10780. var t = r.helpers.getPX(a(r.selection.element()).css("font-size"));
  10781. "pt" === r.opts.fontSizeUnit && (t = Math.round(72 * parseFloat(t, 10) / 96) + "pt"), e.find("> span").text(t)
  10782. }
  10783. }
  10784. }
  10785. }, $e.RegisterCommand("fontSize", {
  10786. type: "dropdown",
  10787. title: "Font Size",
  10788. displaySelection: function(e) {
  10789. return e.opts.fontSizeSelection
  10790. },
  10791. displaySelectionWidth: 30,
  10792. defaultSelection: function(e) {
  10793. return e.opts.fontSizeDefaultSelection
  10794. },
  10795. html: function() {
  10796. for (var e = '<ul class="fr-dropdown-list" role="presentation">', t = this.opts.fontSize, n = 0; n < t.length; n++) {
  10797. var r = t[n];
  10798. e += '<li role="presentation"><a class="fr-command" tabIndex="-1" role="option" data-cmd="fontSize" data-param1="' + r + this.opts.fontSizeUnit + '" title="' + r + '">' + r + "</a></li>"
  10799. }
  10800. return e += "</ul>"
  10801. },
  10802. callback: function(e, t) {
  10803. this.fontSize.apply(t)
  10804. },
  10805. refresh: function(e) {
  10806. this.fontSize.refresh(e)
  10807. },
  10808. refreshOnShow: function(e, t) {
  10809. this.fontSize.refreshOnShow(e, t)
  10810. },
  10811. plugin: "fontSize"
  10812. }), $e.DefineIcon("fontSize", {
  10813. NAME: "text-height",
  10814. SVG_KEY: "fontSize"
  10815. }), Object.assign($e.POPUP_TEMPLATES, {
  10816. "forms.edit": "[_BUTTONS_]",
  10817. "forms.update": "[_BUTTONS_][_TEXT_LAYER_]"
  10818. }), Object.assign($e.DEFAULTS, {
  10819. formEditButtons: ["inputStyle", "inputEdit"],
  10820. formStyles: {
  10821. "fr-rounded": "Rounded",
  10822. "fr-large": "Large"
  10823. },
  10824. formMultipleStyles: !0,
  10825. formUpdateButtons: ["inputBack", "|"]
  10826. }), $e.PLUGINS.forms = function(i) {
  10827. var s, l = i.$;
  10828. function t(e) {
  10829. e.preventDefault(), i.selection.clear(), l(this).data("mousedown", !0)
  10830. }
  10831. function n(e) {
  10832. l(this).data("mousedown") && (e.stopPropagation(), l(this).removeData("mousedown"), d(s = this)), e.preventDefault()
  10833. }
  10834. function r() {
  10835. i.$el.find("input, textarea, button").removeData("mousedown")
  10836. }
  10837. function a() {
  10838. l(this).removeData("mousedown")
  10839. }
  10840. function c() {
  10841. return s || null
  10842. }
  10843. function d(e) {
  10844. var t = i.popups.get("forms.edit");
  10845. t || (t = function o() {
  10846. var e = "";
  10847. 0 < i.opts.formEditButtons.length && (e = '<div class="fr-buttons">'.concat(i.button.buildList(i.opts.formEditButtons), "</div>"));
  10848. var t = {
  10849. buttons: e
  10850. },
  10851. n = i.popups.create("forms.edit", t);
  10852. return i.$wp && i.events.$on(i.$wp, "scroll.link-edit", function() {
  10853. c() && i.popups.isVisible("forms.edit") && d(c())
  10854. }), n
  10855. }());
  10856. var n = l(s = e);
  10857. i.popups.refresh("forms.edit"), i.popups.setContainer("forms.edit", i.$sc);
  10858. var r = n.offset().left + n.outerWidth() / 2,
  10859. a = n.offset().top + n.outerHeight();
  10860. i.popups.show("forms.edit", r, a, n.outerHeight())
  10861. }
  10862. function o() {
  10863. var e = i.popups.get("forms.update"),
  10864. t = c();
  10865. if (t) {
  10866. var n = l(t);
  10867. n.is("button") ? e.find('input[type="text"][name="text"]').val(n.text()) : e.find('input[type="text"][name="text"]').val(n.attr("placeholder"))
  10868. }
  10869. e.find('input[type="text"][name="text"]').trigger("change")
  10870. }
  10871. function f() {
  10872. s = null
  10873. }
  10874. function p(e) {
  10875. if (e) return i.popups.onRefresh("forms.update", o), i.popups.onHide("forms.update", f), !0;
  10876. var t = "";
  10877. 1 <= i.opts.formUpdateButtons.length && (t = '<div class="fr-buttons">'.concat(i.button.buildList(i.opts.formUpdateButtons), "</div>"));
  10878. var n = 0,
  10879. r = {
  10880. buttons: t,
  10881. text_layer: '<div class="fr-forms-text-layer fr-layer fr-active"> \n <div class="fr-input-line"><input name="text" type="text" placeholder="Text" tabIndex=" '.concat(++n, ' "></div>\n <div class="fr-action-buttons"><button class="fr-command fr-submit" data-cmd="updateInput" href="#" tabIndex="').concat(2, '" type="button">').concat(i.language.translate("Update"), "</button></div></div>")
  10882. };
  10883. return i.popups.create("forms.update", r)
  10884. }
  10885. return {
  10886. _init: function u() {
  10887. ! function e() {
  10888. i.events.$on(i.$el, i._mousedown, "input, textarea, button", t), i.events.$on(i.$el, i._mouseup, "input, textarea, button", n), i.events.$on(i.$el, "touchmove", "input, textarea, button", a), i.events.$on(i.$el, i._mouseup, r), i.events.$on(i.$win, i._mouseup, r), p(!0)
  10889. }(), i.events.$on(i.$el, "submit", "form", function(e) {
  10890. return e.preventDefault(), !1
  10891. })
  10892. },
  10893. updateInput: function h() {
  10894. var e = i.popups.get("forms.update"),
  10895. t = c();
  10896. if (t) {
  10897. var n = l(t),
  10898. r = e.find('input[type="text"][name="text"]').val() || "";
  10899. r.length && (n.is("button") ? n.text(r) : n.attr("placeholder", r)), i.popups.hide("forms.update"), d(t)
  10900. }
  10901. },
  10902. getInput: c,
  10903. applyStyle: function g(e, t, n) {
  10904. void 0 === t && (t = i.opts.formStyles), void 0 === n && (n = i.opts.formMultipleStyles);
  10905. var r = c();
  10906. if (!r) return !1;
  10907. if (!n) {
  10908. var a = Object.keys(t);
  10909. a.splice(a.indexOf(e), 1), l(r).removeClass(a.join(" "))
  10910. }
  10911. l(r).toggleClass(e)
  10912. },
  10913. showUpdatePopup: function m() {
  10914. var e = c();
  10915. if (e) {
  10916. var t = l(e),
  10917. n = i.popups.get("forms.update");
  10918. n || (n = p()), i.popups.isVisible("forms.update") || i.popups.refresh("forms.update"), i.popups.setContainer("forms.update", i.$sc);
  10919. var r = t.offset().left + t.outerWidth() / 2,
  10920. a = t.offset().top + t.outerHeight();
  10921. i.popups.show("forms.update", r, a, t.outerHeight())
  10922. }
  10923. },
  10924. showEditPopup: d,
  10925. back: function v() {
  10926. i.events.disableBlur(), i.selection.restore(), i.events.enableBlur();
  10927. var e = c();
  10928. e && i.$wp && ("BUTTON" === e.tagName && i.selection.restore(), d(e))
  10929. }
  10930. }
  10931. }, $e.RegisterCommand("updateInput", {
  10932. undo: !1,
  10933. focus: !1,
  10934. title: "Update",
  10935. callback: function() {
  10936. this.forms.updateInput()
  10937. }
  10938. }), $e.DefineIcon("inputStyle", {
  10939. NAME: "magic",
  10940. SVG_KEY: "inlineStyle"
  10941. }), $e.RegisterCommand("inputStyle", {
  10942. title: "Style",
  10943. type: "dropdown",
  10944. html: function() {
  10945. var e = '<ul class="fr-dropdown-list">',
  10946. t = this.opts.formStyles;
  10947. for (var n in t) t.hasOwnProperty(n) && (e += '<li><a class="fr-command" tabIndex="-1" data-cmd="inputStyle" data-param1="'.concat(n, '">').concat(this.language.translate(t[n]), "</a></li>"));
  10948. return e += "</ul>"
  10949. },
  10950. callback: function(e, t) {
  10951. var n = this.forms.getInput();
  10952. n && (this.forms.applyStyle(t), this.forms.showEditPopup(n))
  10953. },
  10954. refreshOnShow: function(e, t) {
  10955. var n = this.$,
  10956. r = this.forms.getInput();
  10957. if (r) {
  10958. var a = n(r);
  10959. t.find(".fr-command").each(function() {
  10960. var e = n(this).data("param1");
  10961. n(this).toggleClass("fr-active", a.hasClass(e))
  10962. })
  10963. }
  10964. }
  10965. }), $e.DefineIcon("inputEdit", {
  10966. NAME: "edit"
  10967. }), $e.RegisterCommand("inputEdit", {
  10968. title: "Edit Button",
  10969. undo: !1,
  10970. refreshAfterCallback: !1,
  10971. callback: function() {
  10972. this.forms.showUpdatePopup()
  10973. }
  10974. }), $e.DefineIcon("inputBack", {
  10975. NAME: "arrow-left",
  10976. SVG_KEY: "back"
  10977. }), $e.RegisterCommand("inputBack", {
  10978. title: "Back",
  10979. undo: !1,
  10980. focus: !1,
  10981. back: !0,
  10982. refreshAfterCallback: !1,
  10983. callback: function() {
  10984. this.forms.back()
  10985. }
  10986. }), $e.RegisterCommand("updateInput", {
  10987. undo: !1,
  10988. focus: !1,
  10989. title: "Update",
  10990. callback: function() {
  10991. this.forms.updateInput()
  10992. }
  10993. }), $e.PLUGINS.fullscreen = function(n) {
  10994. var t, r, a, o, i = n.$;
  10995. function s() {
  10996. return n.$box.hasClass("fr-fullscreen")
  10997. }
  10998. function e() {
  10999. if (n.helpers.isIOS() && n.core.hasFocus()) return n.$el.blur(), setTimeout(c, 250), !1;
  11000. t = n.helpers.scrollTop(), n.$box.toggleClass("fr-fullscreen"), i("body").first().toggleClass("fr-fullscreen"), n.helpers.isMobile() && (n.$tb.data("parent", n.$tb.parent()), n.$box.prepend(n.$tb), n.$tb.data("sticky-dummy") && n.$tb.after(n.$tb.data("sticky-dummy"))), r = n.opts.height, a = n.opts.heightMax, o = n.opts.zIndex, n.opts.height = n.o_win.innerHeight - (n.opts.toolbarInline ? 0 : n.$tb.outerHeight() + (n.$second_tb ? n.$second_tb.outerHeight() : 0)), n.opts.zIndex = 2147483641, n.opts.heightMax = null, n.size.refresh(), n.opts.toolbarInline && n.toolbar.showInline();
  11001. for (var e = n.$box.parent(); !e.first().is("body");) e.addClass("fr-fullscreen-wrapper"), e = e.parent();
  11002. n.opts.toolbarContainer && n.$box.prepend(n.$tb), n.events.trigger("charCounter.update"), n.events.trigger("codeView.update"), n.$win.trigger("scroll")
  11003. }
  11004. function l() {
  11005. if (n.helpers.isIOS() && n.core.hasFocus()) return n.$el.blur(), setTimeout(c, 250), !1;
  11006. n.$box.toggleClass("fr-fullscreen"), i("body").first().toggleClass("fr-fullscreen"), n.$tb.data("parent") && n.$tb.data("parent").prepend(n.$tb), n.$tb.data("sticky-dummy") && n.$tb.after(n.$tb.data("sticky-dummy")), n.opts.height = r, n.opts.heightMax = a, n.opts.zIndex = o, n.size.refresh(), i(n.o_win).scrollTop(t), n.opts.toolbarInline && n.toolbar.showInline(), n.events.trigger("charCounter.update"), n.opts.toolbarSticky && n.opts.toolbarStickyOffset && (n.opts.toolbarBottom ? n.$tb.css("bottom", n.opts.toolbarStickyOffset).data("bottom", n.opts.toolbarStickyOffset) : n.$tb.css("top", n.opts.toolbarStickyOffset).data("top", n.opts.toolbarStickyOffset));
  11007. for (var e = n.$box.parent(); !e.first().is("body");) e.removeClass("fr-fullscreen-wrapper"), e = e.parent();
  11008. n.opts.toolbarContainer && i(n.opts.toolbarContainer).append(n.$tb), i(n.o_win).trigger("scroll"), n.events.trigger("codeView.update")
  11009. }
  11010. function c() {
  11011. s() ? l() : e(), d(n.$tb.find('.fr-command[data-cmd="fullscreen"]')), n.refresh.moreText(n.$tb.find('.fr-command[data-cmd="moreText"]')), n.refresh.moreParagraph(n.$tb.find('.fr-command[data-cmd="moreParagraph"]')), n.refresh.moreRich(n.$tb.find('.fr-command[data-cmd="moreRich"]')), n.refresh.moreMisc(n.$tb.find('.fr-command[data-cmd="moreMisc"]'))
  11012. }
  11013. function d(e) {
  11014. var t = s();
  11015. e.toggleClass("fr-active", t).attr("aria-pressed", t), e.find("> *").not(".fr-sr-only").replaceWith(t ? n.icon.create("fullscreenCompress") : n.icon.create("fullscreen"))
  11016. }
  11017. return {
  11018. _init: function f() {
  11019. if (!n.$wp) return !1;
  11020. n.events.$on(i(n.o_win), "resize", function() {
  11021. s() && (l(), e())
  11022. }), n.events.on("toolbar.hide", function() {
  11023. if (s() && n.helpers.isMobile()) return !1
  11024. }), n.events.on("position.refresh", function() {
  11025. if (n.helpers.isIOS()) return !s()
  11026. }), n.events.on("destroy", function() {
  11027. s() && l()
  11028. }, !0)
  11029. },
  11030. toggle: c,
  11031. refresh: d,
  11032. isActive: s
  11033. }
  11034. }, $e.RegisterCommand("fullscreen", {
  11035. title: "Fullscreen",
  11036. undo: !1,
  11037. focus: !1,
  11038. accessibilityFocus: !0,
  11039. forcedRefresh: !0,
  11040. toggle: !0,
  11041. callback: function() {
  11042. this.fullscreen.toggle()
  11043. },
  11044. refresh: function(e) {
  11045. this.fullscreen.refresh(e)
  11046. },
  11047. plugin: "fullscreen"
  11048. }), $e.DefineIcon("fullscreen", {
  11049. NAME: "expand",
  11050. SVG_KEY: "fullscreen"
  11051. }), $e.DefineIcon("fullscreenCompress", {
  11052. NAME: "compress",
  11053. SVG_KEY: "exitFullscreen"
  11054. }), Object.assign($e.DEFAULTS, {
  11055. helpSets: [{
  11056. title: "Inline Editor",
  11057. commands: [{
  11058. val: "OSkeyE",
  11059. desc: "Show the editor"
  11060. }]
  11061. }, {
  11062. title: "Common actions",
  11063. commands: [{
  11064. val: "OSkeyC",
  11065. desc: "Copy"
  11066. }, {
  11067. val: "OSkeyX",
  11068. desc: "Cut"
  11069. }, {
  11070. val: "OSkeyV",
  11071. desc: "Paste"
  11072. }, {
  11073. val: "OSkeyZ",
  11074. desc: "Undo"
  11075. }, {
  11076. val: "OSkeyShift+Z",
  11077. desc: "Redo"
  11078. }, {
  11079. val: "OSkeyK",
  11080. desc: "Insert Link"
  11081. }, {
  11082. val: "OSkeyP",
  11083. desc: "Insert Image"
  11084. }]
  11085. }, {
  11086. title: "Basic Formatting",
  11087. commands: [{
  11088. val: "OSkeyA",
  11089. desc: "Select All"
  11090. }, {
  11091. val: "OSkeyB",
  11092. desc: "Bold"
  11093. }, {
  11094. val: "OSkeyI",
  11095. desc: "Italic"
  11096. }, {
  11097. val: "OSkeyU",
  11098. desc: "Underline"
  11099. }, {
  11100. val: "OSkeyS",
  11101. desc: "Strikethrough"
  11102. }, {
  11103. val: "OSkey]",
  11104. desc: "Increase Indent"
  11105. }, {
  11106. val: "OSkey[",
  11107. desc: "Decrease Indent"
  11108. }]
  11109. }, {
  11110. title: "Quote",
  11111. commands: [{
  11112. val: "OSkey'",
  11113. desc: "Increase quote level"
  11114. }, {
  11115. val: "OSkeyShift+'",
  11116. desc: "Decrease quote level"
  11117. }]
  11118. }, {
  11119. title: "Image / Video",
  11120. commands: [{
  11121. val: "OSkey+",
  11122. desc: "Resize larger"
  11123. }, {
  11124. val: "OSkey-",
  11125. desc: "Resize smaller"
  11126. }]
  11127. }, {
  11128. title: "Table",
  11129. commands: [{
  11130. val: "Alt+Space",
  11131. desc: "Select table cell"
  11132. }, {
  11133. val: "Shift+Left/Right arrow",
  11134. desc: "Extend selection one cell"
  11135. }, {
  11136. val: "Shift+Up/Down arrow",
  11137. desc: "Extend selection one row"
  11138. }]
  11139. }, {
  11140. title: "Navigation",
  11141. commands: [{
  11142. val: "OSkey/",
  11143. desc: "Shortcuts"
  11144. }, {
  11145. val: "Alt+F10",
  11146. desc: "Focus popup / toolbar"
  11147. }, {
  11148. val: "Esc",
  11149. desc: "Return focus to previous position"
  11150. }]
  11151. }]
  11152. }), $e.PLUGINS.help = function(s) {
  11153. var r, a = s.$,
  11154. o = "help";
  11155. return {
  11156. _init: function e() {},
  11157. show: function l() {
  11158. if (!r) {
  11159. var e = "<h4>" + s.language.translate("Shortcuts") + "</h4>",
  11160. t = function i() {
  11161. for (var e = '<div class="fr-help-modal">', t = 0; t < s.opts.helpSets.length; t++) {
  11162. var n = s.opts.helpSets[t],
  11163. r = "<table>";
  11164. r += "<thead><tr><th>" + s.language.translate(n.title) + "</th></tr></thead>", r += "<tbody>";
  11165. for (var a = 0; a < n.commands.length; a++) {
  11166. var o = n.commands[a];
  11167. r += "<tr>", r += "<td>" + s.language.translate(o.desc) + "</td>", r += "<td>" + o.val.replace("OSkey", s.helpers.isMac() ? "&#8984;" : "Ctrl+") + "</td>", r += "</tr>"
  11168. }
  11169. e += r += "</tbody></table>"
  11170. }
  11171. return e += "</div>"
  11172. }(),
  11173. n = s.modals.create(o, e, t);
  11174. r = n.$modal, s.events.$on(a(s.o_win), "resize", function() {
  11175. s.modals.resize(o)
  11176. })
  11177. }
  11178. s.modals.show(o), s.modals.resize(o)
  11179. },
  11180. hide: function t() {
  11181. s.modals.hide(o)
  11182. }
  11183. }
  11184. }, $e.DefineIcon("help", {
  11185. NAME: "question",
  11186. SVG_KEY: "help"
  11187. }), $e.RegisterShortcut($e.KEYCODE.SLASH, "help", null, "/"), $e.RegisterCommand("help", {
  11188. title: "Help",
  11189. icon: "help",
  11190. undo: !1,
  11191. focus: !1,
  11192. modal: !0,
  11193. callback: function() {
  11194. this.help.show()
  11195. },
  11196. plugin: "help",
  11197. showOnMobile: !1
  11198. }), Object.assign($e.POPUP_TEMPLATES, {
  11199. "image.insert": "[_BUTTONS_][_UPLOAD_LAYER_][_BY_URL_LAYER_][_PROGRESS_BAR_]",
  11200. "image.edit": "[_BUTTONS_]",
  11201. "image.alt": "[_BUTTONS_][_ALT_LAYER_]",
  11202. "image.size": "[_BUTTONS_][_SIZE_LAYER_]"
  11203. }), Object.assign($e.DEFAULTS, {
  11204. imageInsertButtons: ["imageBack", "|", "imageUpload", "imageByURL"],
  11205. imageEditButtons: ["imageReplace", "imageAlign", "imageCaption", "imageRemove", "imageLink", "linkOpen", "linkEdit", "linkRemove", "-", "imageDisplay", "imageStyle", "imageAlt", "imageSize"],
  11206. imageAltButtons: ["imageBack", "|"],
  11207. imageSizeButtons: ["imageBack", "|"],
  11208. imageUpload: !0,
  11209. imageUploadURL: null,
  11210. imageCORSProxy: "https://cors-anywhere.froala.com",
  11211. imageUploadRemoteUrls: !0,
  11212. imageUploadParam: "file",
  11213. imageUploadParams: {},
  11214. imageUploadToS3: !1,
  11215. imageUploadMethod: "POST",
  11216. imageMaxSize: 10485760,
  11217. imageAllowedTypes: ["jpeg", "jpg", "png", "gif", "webp"],
  11218. imageResize: !0,
  11219. imageResizeWithPercent: !1,
  11220. imageRoundPercent: !1,
  11221. imageDefaultWidth: 300,
  11222. imageDefaultAlign: "center",
  11223. imageDefaultDisplay: "block",
  11224. imageSplitHTML: !1,
  11225. imageStyles: {
  11226. "fr-rounded": "Rounded",
  11227. "fr-bordered": "Bordered",
  11228. "fr-shadow": "Shadow"
  11229. },
  11230. imageMove: !0,
  11231. imageMultipleStyles: !0,
  11232. imageTextNear: !0,
  11233. imagePaste: !0,
  11234. imagePasteProcess: !1,
  11235. imageMinWidth: 16,
  11236. imageOutputSize: !1,
  11237. imageDefaultMargin: 5,
  11238. imageAddNewLine: !1
  11239. }), $e.PLUGINS.image = function(f) {
  11240. var p, l, c, d, s, n, u = f.$,
  11241. i = "https://i.froala.com/upload",
  11242. t = !1,
  11243. r = 1,
  11244. h = 2,
  11245. g = 3,
  11246. m = 4,
  11247. v = 5,
  11248. b = 6,
  11249. a = {};
  11250. function E() {
  11251. var e = f.popups.get("image.insert").find(".fr-image-by-url-layer input");
  11252. e.val(""), p && e.val(p.attr("src")), e.trigger("change")
  11253. }
  11254. function o() {
  11255. var e = f.popups.get("image.edit");
  11256. if (e || (e = x()), e) {
  11257. var t = Te();
  11258. Ae() && (t = t.find(".fr-img-wrap")), f.popups.setContainer("image.edit", f.$sc), f.popups.refresh("image.edit");
  11259. var n = t.offset().left + t.outerWidth() / 2,
  11260. r = t.offset().top + t.outerHeight();
  11261. p.hasClass("fr-uploading") ? I() : f.popups.show("image.edit", n, r, t.outerHeight(), !0)
  11262. }
  11263. }
  11264. function T() {
  11265. k()
  11266. }
  11267. function A(e) {
  11268. 0 < e.parents(".fr-img-caption").length && (e = e.parents(".fr-img-caption").first());
  11269. var t = e.hasClass("fr-dib") ? "block" : e.hasClass("fr-dii") ? "inline" : null,
  11270. n = e.hasClass("fr-fil") ? "left" : e.hasClass("fr-fir") ? "right" : ge(e);
  11271. he(e, t, n), e.removeClass("fr-dib fr-dii fr-fir fr-fil")
  11272. }
  11273. function C() {
  11274. for (var e, t = "IMG" == f.el.tagName ? [f.el] : f.el.querySelectorAll("img"), n = 0; n < t.length; n++) {
  11275. var r = u(t[n]);
  11276. !f.opts.htmlUntouched && f.opts.useClasses ? ((f.opts.imageDefaultAlign || f.opts.imageDefaultDisplay) && (0 < (e = r).parents(".fr-img-caption").length && (e = e.parents(".fr-img-caption").first()), e.hasClass("fr-dii") || e.hasClass("fr-dib") || (e.addClass("fr-fi" + ge(e)[0]), e.addClass("fr-di" + me(e)[0]), e.css("margin", ""), e.css("float", ""), e.css("display", ""), e.css("z-index", ""), e.css("position", ""), e.css("overflow", ""), e.css("vertical-align", ""))), f.opts.imageTextNear || (0 < r.parents(".fr-img-caption").length ? r.parents(".fr-img-caption").first().removeClass("fr-dii").addClass("fr-dib") : r.removeClass("fr-dii").addClass("fr-dib"))) : f.opts.htmlUntouched || f.opts.useClasses || (f.opts.imageDefaultAlign || f.opts.imageDefaultDisplay) && A(r), f.opts.iframe && r.on("load", f.size.syncIframe)
  11277. }
  11278. }
  11279. function S(e) {
  11280. void 0 === e && (e = !0);
  11281. var t, n = Array.prototype.slice.call(f.el.querySelectorAll("img")),
  11282. r = [];
  11283. for (t = 0; t < n.length; t++)
  11284. if (r.push(n[t].getAttribute("src")), u(n[t]).toggleClass("fr-draggable", f.opts.imageMove), "" === n[t].getAttribute("class") && n[t].removeAttribute("class"), "" === n[t].getAttribute("style") && n[t].removeAttribute("style"), n[t].parentNode && n[t].parentNode.parentNode && f.node.hasClass(n[t].parentNode.parentNode, "fr-img-caption")) {
  11285. var a = n[t].parentNode.parentNode;
  11286. f.browser.mozilla || a.setAttribute("contenteditable", !1), a.setAttribute("draggable", !1), a.classList.add("fr-draggable");
  11287. var o = n[t].nextSibling;
  11288. o && !f.browser.mozilla && o.setAttribute("contenteditable", !0)
  11289. }
  11290. if (s)
  11291. for (t = 0; t < s.length; t++) r.indexOf(s[t].getAttribute("src")) < 0 && f.events.trigger("image.removed", [u(s[t])]);
  11292. if (s && e) {
  11293. var i = [];
  11294. for (t = 0; t < s.length; t++) i.push(s[t].getAttribute("src"));
  11295. for (t = 0; t < n.length; t++) i.indexOf(n[t].getAttribute("src")) < 0 && f.events.trigger("image.loaded", [u(n[t])])
  11296. }
  11297. s = n
  11298. }
  11299. function y() {
  11300. if (l || function i() {
  11301. var e;
  11302. f.shared.$image_resizer ? (l = f.shared.$image_resizer, d = f.shared.$img_overlay, f.events.on("destroy", function() {
  11303. u("body").first().append(l.removeClass("fr-active"))
  11304. }, !0)) : (f.shared.$image_resizer = u(document.createElement("div")).attr("class", "fr-image-resizer"), l = f.shared.$image_resizer, f.events.$on(l, "mousedown", function(e) {
  11305. e.stopPropagation()
  11306. }, !0), f.opts.imageResize && (l.append(R("nw") + R("ne") + R("sw") + R("se")), f.shared.$img_overlay = u(document.createElement("div")).attr("class", "fr-image-overlay"), d = f.shared.$img_overlay, e = l.get(0).ownerDocument, u(e).find("body").first().append(d)));
  11307. f.events.on("shared.destroy", function() {
  11308. l.html("").removeData().remove(), l = null, f.opts.imageResize && (d.remove(), d = null)
  11309. }, !0), f.helpers.isMobile() || f.events.$on(u(f.o_win), "resize", function() {
  11310. p && !p.hasClass("fr-uploading") ? de(!0) : p && (y(), ve(), I(!1))
  11311. });
  11312. if (f.opts.imageResize) {
  11313. e = l.get(0).ownerDocument, f.events.$on(l, f._mousedown, ".fr-handler", w), f.events.$on(u(e), f._mousemove, _), f.events.$on(u(e.defaultView || e.parentWindow), f._mouseup, O), f.events.$on(d, "mouseleave", O);
  11314. var r = 1,
  11315. a = null,
  11316. o = 0;
  11317. f.events.on("keydown", function(e) {
  11318. if (p) {
  11319. var t = -1 != navigator.userAgent.indexOf("Mac OS X") ? e.metaKey : e.ctrlKey,
  11320. n = e.which;
  11321. (n !== a || 200 < e.timeStamp - o) && (r = 1), (n == $e.KEYCODE.EQUALS || f.browser.mozilla && n == $e.KEYCODE.FF_EQUALS) && t && !e.altKey ? r = ee.call(this, e, 1, 1, r) : (n == $e.KEYCODE.HYPHEN || f.browser.mozilla && n == $e.KEYCODE.FF_HYPHEN) && t && !e.altKey ? r = ee.call(this, e, 2, -1, r) : f.keys.ctrlKey(e) || n != $e.KEYCODE.ENTER || (p.before("<br>"), B(p)), a = n, o = e.timeStamp
  11322. }
  11323. }, !0), f.events.on("keyup", function() {
  11324. r = 1
  11325. })
  11326. }
  11327. }(), !p) return !1;
  11328. var e = f.$wp || f.$sc;
  11329. e.append(l), l.data("instance", f);
  11330. var t = e.scrollTop() - ("static" != e.css("position") ? e.offset().top : 0),
  11331. n = e.scrollLeft() - ("static" != e.css("position") ? e.offset().left : 0);
  11332. n -= f.helpers.getPX(e.css("border-left-width")), t -= f.helpers.getPX(e.css("border-top-width")), f.$el.is("img") && f.$sc.is("body") && (n = t = 0);
  11333. var r = Te();
  11334. Ae() && (r = r.find(".fr-img-wrap"));
  11335. var a = 0,
  11336. o = 0;
  11337. f.opts.iframe && (a = f.helpers.getPX(f.$wp.find(".fr-iframe").css("padding-top")), o = f.helpers.getPX(f.$wp.find(".fr-iframe").css("padding-left"))), l.css("top", (f.opts.iframe ? r.offset().top + a : r.offset().top + t) - 1).css("left", (f.opts.iframe ? r.offset().left + o : r.offset().left + n) - 1).css("width", r.get(0).getBoundingClientRect().width).css("height", r.get(0).getBoundingClientRect().height).addClass("fr-active")
  11338. }
  11339. function R(e) {
  11340. return '<div class="fr-handler fr-h' + e + '"></div>'
  11341. }
  11342. function L(e) {
  11343. Ae() ? p.parents(".fr-img-caption").css("width", e) : p.css("width", e)
  11344. }
  11345. function w(e) {
  11346. if (!f.core.sameInstance(l)) return !0;
  11347. if (e.preventDefault(), e.stopPropagation(), f.$el.find("img.fr-error").left) return !1;
  11348. f.undo.canDo() || f.undo.saveStep();
  11349. var t = e.pageX || e.originalEvent.touches[0].pageX;
  11350. if ("mousedown" == e.type) {
  11351. var n = f.$oel.get(0).ownerDocument,
  11352. r = n.defaultView || n.parentWindow,
  11353. a = !1;
  11354. try {
  11355. a = r.location != r.parent.location && !(r.$ && r.$.FE)
  11356. } catch (s) {}
  11357. a && r.frameElement && (t += f.helpers.getPX(u(r.frameElement).offset().left) + r.frameElement.clientLeft)
  11358. }(c = u(this)).data("start-x", t), c.data("start-width", p.width()), c.data("start-height", p.height());
  11359. var o = p.width();
  11360. if (f.opts.imageResizeWithPercent) {
  11361. var i = p.parentsUntil(f.$el, f.html.blockTagsQuery()).get(0) || f.el;
  11362. o = (o / u(i).outerWidth() * 100).toFixed(2) + "%"
  11363. }
  11364. L(o), d.show(), f.popups.hideAll(), ue()
  11365. }
  11366. function _(e) {
  11367. if (!f.core.sameInstance(l)) return !0;
  11368. var t;
  11369. if (c && p) {
  11370. if (e.preventDefault(), f.$el.find("img.fr-error").left) return !1;
  11371. var n = e.pageX || (e.originalEvent.touches ? e.originalEvent.touches[0].pageX : null);
  11372. if (!n) return !1;
  11373. var r = n - c.data("start-x"),
  11374. a = c.data("start-width");
  11375. if ((c.hasClass("fr-hnw") || c.hasClass("fr-hsw")) && (r = 0 - r), f.opts.imageResizeWithPercent) {
  11376. var o = p.parentsUntil(f.$el, f.html.blockTagsQuery()).get(0) || f.el;
  11377. a = ((a + r) / u(o).outerWidth() * 100).toFixed(2), f.opts.imageRoundPercent && (a = Math.round(a)), L(a + "%"), (t = Ae() ? (f.helpers.getPX(p.parents(".fr-img-caption").css("width")) / u(o).outerWidth() * 100).toFixed(2) : (f.helpers.getPX(p.css("width")) / u(o).outerWidth() * 100).toFixed(2)) === a || f.opts.imageRoundPercent || L(t + "%"), p.css("height", "").removeAttr("height")
  11378. } else a + r >= f.opts.imageMinWidth && (L(a + r), t = Ae() ? f.helpers.getPX(p.parents(".fr-img-caption").css("width")) : f.helpers.getPX(p.css("width"))), t !== a + r && L(t), ((p.attr("style") || "").match(/(^height:)|(; *height:)/) || p.attr("height")) && (p.css("height", c.data("start-height") * p.width() / c.data("start-width")), p.removeAttr("height"));
  11379. y(), f.events.trigger("image.resize", [Ee()])
  11380. }
  11381. }
  11382. function O(e) {
  11383. if (!f.core.sameInstance(l)) return !0;
  11384. if (c && p) {
  11385. if (e && e.stopPropagation(), f.$el.find("img.fr-error").left) return !1;
  11386. c = null, d.hide(), y(), o(), f.undo.saveStep(), f.events.trigger("image.resizeEnd", [Ee()])
  11387. }
  11388. }
  11389. function N(e, t, n) {
  11390. f.edit.on(), p && p.addClass("fr-error"), a[e] ? D(a[e]) : D(f.language.translate("Something went wrong. Please try again.")), !p && n && te(n), f.events.trigger("image.error", [{
  11391. code: e,
  11392. message: a[e]
  11393. },
  11394. t, n
  11395. ])
  11396. }
  11397. function x(e) {
  11398. if (e) return f.$wp && f.events.$on(f.$wp, "scroll.image-edit", function() {
  11399. p && f.popups.isVisible("image.edit") && (f.events.disableBlur(), o())
  11400. }), !0;
  11401. var t = "";
  11402. if (0 < f.opts.imageEditButtons.length) {
  11403. var n = {
  11404. buttons: t += '<div class="fr-buttons"> \n '.concat(f.button.buildList(f.opts.imageEditButtons), "\n </div>")
  11405. };
  11406. return f.popups.create("image.edit", n)
  11407. }
  11408. return !1
  11409. }
  11410. function I(e) {
  11411. var t = f.popups.get("image.insert");
  11412. if (t || (t = Y()), t.find(".fr-layer.fr-active").removeClass("fr-active").addClass("fr-pactive"), t.find(".fr-image-progress-bar-layer").addClass("fr-active"), t.find(".fr-buttons").hide(), p) {
  11413. var n = Te();
  11414. f.popups.setContainer("image.insert", f.$sc);
  11415. var r = n.offset().left,
  11416. a = n.offset().top + n.height();
  11417. f.popups.show("image.insert", r, a, n.outerHeight())
  11418. }
  11419. void 0 === e && M(f.language.translate("Uploading"), 0)
  11420. }
  11421. function k(e) {
  11422. var t = f.popups.get("image.insert");
  11423. if (t && (t.find(".fr-layer.fr-pactive").addClass("fr-active").removeClass("fr-pactive"), t.find(".fr-image-progress-bar-layer").removeClass("fr-active"), t.find(".fr-buttons").show(), e || f.$el.find("img.fr-error").length)) {
  11424. if (f.events.focus(), f.$el.find("img.fr-error").length && (f.$el.find("img.fr-error").remove(), f.undo.saveStep(), f.undo.run(), f.undo.dropRedo()), !f.$wp && p) {
  11425. var n = p;
  11426. de(!0), f.selection.setAfter(n.get(0)), f.selection.restore()
  11427. }
  11428. f.popups.hide("image.insert")
  11429. }
  11430. }
  11431. function M(e, t) {
  11432. var n = f.popups.get("image.insert");
  11433. if (n) {
  11434. var r = n.find(".fr-image-progress-bar-layer");
  11435. r.find("h3").text(e + (t ? " " + t + "%" : "")), r.removeClass("fr-error"), t ? (r.find("div").removeClass("fr-indeterminate"), r.find("div > span").css("width", t + "%")) : r.find("div").addClass("fr-indeterminate")
  11436. }
  11437. }
  11438. function D(e) {
  11439. I();
  11440. var t = f.popups.get("image.insert").find(".fr-image-progress-bar-layer");
  11441. t.addClass("fr-error");
  11442. var n = t.find("h3");
  11443. n.text(e), f.events.disableBlur(), n.focus()
  11444. }
  11445. function B(e) {
  11446. ce.call(e.get(0))
  11447. }
  11448. function F() {
  11449. var e = u(this);
  11450. f.popups.hide("image.insert"), e.removeClass("fr-uploading"), e.next().is("br") && e.next().remove(), B(e), f.events.trigger("image.loaded", [e])
  11451. }
  11452. function $(i, e, s, l, c) {
  11453. f.edit.off(), M(f.language.translate("Loading image")), e && (i = f.helpers.sanitizeURL(i));
  11454. var t = new Image;
  11455. t.onload = function() {
  11456. var e, t;
  11457. if (l) {
  11458. f.undo.canDo() || l.hasClass("fr-uploading") || f.undo.saveStep();
  11459. var n = l.data("fr-old-src");
  11460. l.data("fr-image-pasted") && (n = null), f.$wp ? ((e = l.clone().removeData("fr-old-src").removeClass("fr-uploading").removeAttr("data-fr-image-pasted")).off("load"), n && l.attr("src", n), l.replaceWith(e)) : e = l;
  11461. for (var r = e.get(0).attributes, a = 0; a < r.length; a++) {
  11462. var o = r[a];
  11463. 0 === o.nodeName.indexOf("data-") && e.removeAttr(o.nodeName)
  11464. }
  11465. if (void 0 !== s)
  11466. for (t in s) s.hasOwnProperty(t) && "link" != t && e.attr("data-" + t, s[t]);
  11467. e.on("load", F), e.attr("src", i), f.edit.on(), S(!1), f.undo.saveStep(), f.events.disableBlur(), f.$el.blur(), f.events.trigger(n ? "image.replaced" : "image.inserted", [e, c])
  11468. } else e = U(i, s, F), S(!1), f.undo.saveStep(), f.events.disableBlur(), f.$el.blur(), f.events.trigger("image.inserted", [e, c])
  11469. }, t.onerror = function() {
  11470. N(r)
  11471. }, I(f.language.translate("Loading image")), t.src = i
  11472. }
  11473. function P(e) {
  11474. M(f.language.translate("Loading image"));
  11475. var t = this.status,
  11476. n = this.response,
  11477. r = this.responseXML,
  11478. a = this.responseText;
  11479. try {
  11480. if (f.opts.imageUploadToS3)
  11481. if (201 == t) {
  11482. var o = function s(e) {
  11483. try {
  11484. var t = u(e).find("Location").text(),
  11485. n = u(e).find("Key").text();
  11486. return !1 === f.events.trigger("image.uploadedToS3", [t, n, e], !0) ? (f.edit.on(), !1) : t
  11487. } catch (r) {
  11488. return N(m, e), !1
  11489. }
  11490. }(r);
  11491. o && $(o, !1, [], e, n || r)
  11492. } else N(m, n || r, e);
  11493. else if (200 <= t && t < 300) {
  11494. var i = function l(e) {
  11495. try {
  11496. if (!1 === f.events.trigger("image.uploaded", [e], !0)) return f.edit.on(), !1;
  11497. var t = JSON.parse(e);
  11498. return t.link ? t : (N(h, e), !1)
  11499. } catch (n) {
  11500. return N(m, e), !1
  11501. }
  11502. }(a);
  11503. i && $(i.link, !1, i, e, n || a)
  11504. } else N(g, n || a, e)
  11505. } catch (c) {
  11506. N(m, n || a, e)
  11507. }
  11508. }
  11509. function H() {
  11510. N(m, this.response || this.responseText || this.responseXML)
  11511. }
  11512. function K(e) {
  11513. if (e.lengthComputable) {
  11514. var t = e.loaded / e.total * 100 | 0;
  11515. M(f.language.translate("Uploading"), t)
  11516. }
  11517. }
  11518. function U(e, t, n) {
  11519. var r, a = u(document.createElement("img")).attr("src", e);
  11520. if (t && void 0 !== t)
  11521. for (r in t) t.hasOwnProperty(r) && "link" != r && (" data-" + r + '="' + t[r] + '"', a.attr("data-str" + r, t[r]));
  11522. var o = f.opts.imageDefaultWidth;
  11523. o && "auto" != o && (o = f.opts.imageResizeWithPercent ? "100%" : o + "px"), a.attr("style", o ? "width: " + o + ";" : ""), he(a, f.opts.imageDefaultDisplay, f.opts.imageDefaultAlign), a.on("load", n), a.on("error", n), f.edit.on(), f.events.focus(!0), f.selection.restore(), f.undo.saveStep(), f.opts.imageSplitHTML ? f.markers.split() : f.markers.insert(), f.html.wrap();
  11524. var i = f.$el.find(".fr-marker");
  11525. return i.length ? (i.parent().is("hr") && i.parent().after(i), f.node.isLastSibling(i) && i.parent().hasClass("fr-deletable") && i.insertAfter(i.parent()), i.replaceWith(a)) : f.$el.append(a), f.selection.clear(), a
  11526. }
  11527. function W() {
  11528. f.edit.on(), k(!0)
  11529. }
  11530. function V(e, t) {
  11531. if (void 0 !== e && 0 < e.length) {
  11532. if (!1 === f.events.trigger("image.beforeUpload", [e, t])) return !1;
  11533. var n, r = e[0];
  11534. if ((null === f.opts.imageUploadURL || f.opts.imageUploadURL == i) && !f.opts.imageUploadToS3) return function s(a, o) {
  11535. var i = new FileReader;
  11536. i.onload = function() {
  11537. var e = i.result;
  11538. if (i.result.indexOf("svg+xml") < 0) {
  11539. for (var t = atob(i.result.split(",")[1]), n = [], r = 0; r < t.length; r++) n.push(t.charCodeAt(r));
  11540. e = window.URL.createObjectURL(new Blob([new Uint8Array(n)], {
  11541. type: a.type
  11542. })), f.image.insert(e, !1, null, o)
  11543. }
  11544. }, I(), i.readAsDataURL(a)
  11545. }(r, t || p), !1;
  11546. if (r.name || (r.name = (new Date).getTime() + "." + (r.type || "image/jpeg").replace(/image\//g, "")), r.size > f.opts.imageMaxSize) return N(v), !1;
  11547. if (f.opts.imageAllowedTypes.indexOf(r.type.replace(/image\//g, "")) < 0) return N(b), !1;
  11548. if (f.drag_support.formdata && (n = f.drag_support.formdata ? new FormData : null), n) {
  11549. var a;
  11550. if (!1 !== f.opts.imageUploadToS3)
  11551. for (a in n.append("key", f.opts.imageUploadToS3.keyStart + (new Date).getTime() + "-" + (r.name || "untitled")), n.append("success_action_status", "201"), n.append("X-Requested-With", "xhr"), n.append("Content-Type", r.type), f.opts.imageUploadToS3.params) f.opts.imageUploadToS3.params.hasOwnProperty(a) && n.append(a, f.opts.imageUploadToS3.params[a]);
  11552. for (a in f.opts.imageUploadParams) f.opts.imageUploadParams.hasOwnProperty(a) && n.append(a, f.opts.imageUploadParams[a]);
  11553. n.append(f.opts.imageUploadParam, r, r.name);
  11554. var o = f.opts.imageUploadURL;
  11555. f.opts.imageUploadToS3 && (o = f.opts.imageUploadToS3.uploadURL ? f.opts.imageUploadToS3.uploadURL : "https://" + f.opts.imageUploadToS3.region + ".amazonaws.com/" + f.opts.imageUploadToS3.bucket),
  11556. function l(t, n, e, a) {
  11557. function o() {
  11558. var e = u(this);
  11559. e.off("load"), e.addClass("fr-uploading"), e.next().is("br") && e.next().remove(), f.placeholder.refresh(), B(e), y(), I(), f.edit.off(), t.onload = function() {
  11560. P.call(t, e)
  11561. }, t.onerror = H, t.upload.onprogress = K, t.onabort = W, u(e.off("abortUpload")).on("abortUpload", function() {
  11562. 4 != t.readyState && (t.abort(), a ? (a.attr("src", a.data("fr-old-src")), a.removeClass("fr-uploading")) : e.remove(), de(!0))
  11563. }), t.send(n)
  11564. }
  11565. var i = new FileReader;
  11566. i.onload = function() {
  11567. var e = i.result;
  11568. if (i.result.indexOf("svg+xml") < 0) {
  11569. for (var t = atob(i.result.split(",")[1]), n = [], r = 0; r < t.length; r++) n.push(t.charCodeAt(r));
  11570. e = window.URL.createObjectURL(new Blob([new Uint8Array(n)], {
  11571. type: "image/jpeg"
  11572. }))
  11573. }
  11574. a ? (a.on("load", o), a.on("error", function() {
  11575. o(), u(this).off("error")
  11576. }), f.edit.on(), f.undo.saveStep(), a.data("fr-old-src", a.attr("src")), a.attr("src", e)) : U(e, null, o)
  11577. }, i.readAsDataURL(e)
  11578. }(f.core.getXHR(o, f.opts.imageUploadMethod), n, r, t || p)
  11579. }
  11580. }
  11581. }
  11582. function z(e) {
  11583. if (e.is("img") && 0 < e.parents(".fr-img-caption").length) return e.parents(".fr-img-caption")
  11584. }
  11585. function G(e) {
  11586. var t = e.originalEvent.dataTransfer;
  11587. if (t && t.files && t.files.length) {
  11588. var n = t.files[0];
  11589. if (n && n.type && -1 !== n.type.indexOf("image") && 0 <= f.opts.imageAllowedTypes.indexOf(n.type.replace(/image\//g, ""))) {
  11590. if (!f.opts.imageUpload) return e.preventDefault(), e.stopPropagation(), !1;
  11591. f.markers.remove(), f.markers.insertAtPoint(e.originalEvent), f.$el.find(".fr-marker").replaceWith($e.MARKERS), 0 === f.$el.find(".fr-marker").length && f.selection.setAtEnd(f.el), f.popups.hideAll();
  11592. var r = f.popups.get("image.insert");
  11593. r || (r = Y()), f.popups.setContainer("image.insert", f.$sc);
  11594. var a = e.originalEvent.pageX,
  11595. o = e.originalEvent.pageY;
  11596. if (f.opts.iframe) {
  11597. var i = f.helpers.getPX(f.$wp.find(".fr-iframe").css("padding-top")),
  11598. s = f.helpers.getPX(f.$wp.find(".fr-iframe").css("padding-left"));
  11599. o += f.$iframe.offset().top + i, a += f.$iframe.offset().left + s
  11600. }
  11601. return f.popups.show("image.insert", a, o), I(), 0 <= f.opts.imageAllowedTypes.indexOf(n.type.replace(/image\//g, "")) ? (de(!0), V(t.files)) : N(b), e.preventDefault(), e.stopPropagation(), !1
  11602. }
  11603. }
  11604. }
  11605. function Y(e) {
  11606. if (e) return f.popups.onRefresh("image.insert", E), f.popups.onHide("image.insert", T), !0;
  11607. var t, n, r = "";
  11608. f.opts.imageUpload || -1 === f.opts.imageInsertButtons.indexOf("imageUpload") || f.opts.imageInsertButtons.splice(f.opts.imageInsertButtons.indexOf("imageUpload"), 1);
  11609. var a = f.button.buildList(f.opts.imageInsertButtons);
  11610. "" !== a && (r = '<div class="fr-buttons fr-tabs">' + a + "</div>");
  11611. var o = f.opts.imageInsertButtons.indexOf("imageUpload"),
  11612. i = f.opts.imageInsertButtons.indexOf("imageByURL"),
  11613. s = "";
  11614. 0 <= o && (t = " fr-active", 0 <= i && i < o && (t = ""), s = '<div class="fr-image-upload-layer' + t + ' fr-layer" id="fr-image-upload-layer-' + f.id + '"><strong>' + f.language.translate("Drop image") + "</strong><br>(" + f.language.translate("or click") + ')<div class="fr-form"><input type="file" accept="image/' + f.opts.imageAllowedTypes.join(", image/").toLowerCase() + '" tabIndex="-1" aria-labelledby="fr-image-upload-layer-' + f.id + '" role="button"></div></div>');
  11615. var l = "";
  11616. 0 <= i && (t = " fr-active", 0 <= o && o < i && (t = ""), l = '<div class="fr-image-by-url-layer' + t + ' fr-layer" id="fr-image-by-url-layer-' + f.id + '"><div class="fr-input-line"><input id="fr-image-by-url-layer-text-' + f.id + '" type="text" placeholder="http://" tabIndex="1" aria-required="true"></div><div class="fr-action-buttons"><button type="button" class="fr-command fr-submit" data-cmd="imageInsertByURL" tabIndex="2" role="button">' + f.language.translate("Insert") + "</button></div></div>");
  11617. var c = {
  11618. buttons: r,
  11619. upload_layer: s,
  11620. by_url_layer: l,
  11621. progress_bar: '<div class="fr-image-progress-bar-layer fr-layer"><h3 tabIndex="-1" class="fr-message">Uploading</h3><div class="fr-loader"><span class="fr-progress"></span></div><div class="fr-action-buttons"><button type="button" class="fr-command fr-dismiss" data-cmd="imageDismissError" tabIndex="2" role="button">OK</button></div></div>'
  11622. };
  11623. return 1 <= f.opts.imageInsertButtons.length && (n = f.popups.create("image.insert", c)), f.$wp && f.events.$on(f.$wp, "scroll", function() {
  11624. p && f.popups.isVisible("image.insert") && ve()
  11625. }),
  11626. function d(r) {
  11627. f.events.$on(r, "dragover dragenter", ".fr-image-upload-layer", function() {
  11628. return u(this).addClass("fr-drop"), !1
  11629. }, !0), f.events.$on(r, "dragleave dragend", ".fr-image-upload-layer", function() {
  11630. return u(this).removeClass("fr-drop"), !1
  11631. }, !0), f.events.$on(r, "drop", ".fr-image-upload-layer", function(e) {
  11632. e.preventDefault(), e.stopPropagation(), u(this).removeClass("fr-drop");
  11633. var t = e.originalEvent.dataTransfer;
  11634. if (t && t.files) {
  11635. var n = r.data("instance") || f;
  11636. n.events.disableBlur(), n.image.upload(t.files), n.events.enableBlur()
  11637. }
  11638. }, !0), f.helpers.isIOS() && f.events.$on(r, "touchstart", '.fr-image-upload-layer input[type="file"]', function() {
  11639. u(this).trigger("click")
  11640. }, !0), f.events.$on(r, "change", '.fr-image-upload-layer input[type="file"]', function() {
  11641. if (this.files) {
  11642. var e = r.data("instance") || f;
  11643. e.events.disableBlur(), r.find("input:focus").blur(), e.events.enableBlur(), e.image.upload(this.files, p)
  11644. }
  11645. u(this).val("")
  11646. }, !0)
  11647. }(n), n
  11648. }
  11649. function j() {
  11650. p && f.popups.get("image.alt").find("input").val(p.attr("alt") || "").trigger("change")
  11651. }
  11652. function q() {
  11653. var e = f.popups.get("image.alt");
  11654. e || (e = X()), k(), f.popups.refresh("image.alt"), f.popups.setContainer("image.alt", f.$sc);
  11655. var t = Te();
  11656. Ae() && (t = t.find(".fr-img-wrap"));
  11657. var n = t.offset().left + t.outerWidth() / 2,
  11658. r = t.offset().top + t.outerHeight();
  11659. f.popups.show("image.alt", n, r, t.outerHeight(), !0)
  11660. }
  11661. function X(e) {
  11662. if (e) return f.popups.onRefresh("image.alt", j), !0;
  11663. var t = {
  11664. buttons: '<div class="fr-buttons fr-tabs">' + f.button.buildList(f.opts.imageAltButtons) + "</div>",
  11665. alt_layer: '<div class="fr-image-alt-layer fr-layer fr-active" id="fr-image-alt-layer-' + f.id + '"><div class="fr-input-line"><input id="fr-image-alt-layer-text-' + f.id + '" type="text" placeholder="' + f.language.translate("Alternative Text") + '" tabIndex="1"></div><div class="fr-action-buttons"><button type="button" class="fr-command fr-submit" data-cmd="imageSetAlt" tabIndex="2" role="button">' + f.language.translate("Update") + "</button></div></div>"
  11666. },
  11667. n = f.popups.create("image.alt", t);
  11668. return f.$wp && f.events.$on(f.$wp, "scroll.image-alt", function() {
  11669. p && f.popups.isVisible("image.alt") && q()
  11670. }), n
  11671. }
  11672. function Z() {
  11673. var e = f.popups.get("image.size");
  11674. if (p)
  11675. if (Ae()) {
  11676. var t = p.parent();
  11677. t.get(0).style.width || (t = p.parent().parent()), e.find('input[name="width"]').val(t.get(0).style.width).trigger("change"), e.find('input[name="height"]').val(t.get(0).style.height).trigger("change")
  11678. } else e.find('input[name="width"]').val(p.get(0).style.width).trigger("change"), e.find('input[name="height"]').val(p.get(0).style.height).trigger("change")
  11679. }
  11680. function Q() {
  11681. var e = f.popups.get("image.size");
  11682. e || (e = J()), k(), f.popups.refresh("image.size"), f.popups.setContainer("image.size", f.$sc);
  11683. var t = Te();
  11684. Ae() && (t = t.find(".fr-img-wrap"));
  11685. var n = t.offset().left + t.outerWidth() / 2,
  11686. r = t.offset().top + t.outerHeight();
  11687. f.popups.show("image.size", n, r, t.outerHeight(), !0)
  11688. }
  11689. function J(e) {
  11690. if (e) return f.popups.onRefresh("image.size", Z), !0;
  11691. var t = {
  11692. buttons: '<div class="fr-buttons fr-tabs">' + f.button.buildList(f.opts.imageSizeButtons) + "</div>",
  11693. size_layer: '<div class="fr-image-size-layer fr-layer fr-active" id="fr-image-size-layer-' + f.id + '"><div class="fr-image-group"><div class="fr-input-line"><input id="fr-image-size-layer-width-' + f.id + '" type="text" name="width" placeholder="' + f.language.translate("Width") + '" tabIndex="1"></div><div class="fr-input-line"><input id="fr-image-size-layer-height' + f.id + '" type="text" name="height" placeholder="' + f.language.translate("Height") + '" tabIndex="1"></div></div><div class="fr-action-buttons"><button type="button" class="fr-command fr-submit" data-cmd="imageSetSize" tabIndex="2" role="button">' + f.language.translate("Update") + "</button></div></div>"
  11694. },
  11695. n = f.popups.create("image.size", t);
  11696. return f.$wp && f.events.$on(f.$wp, "scroll.image-size", function() {
  11697. p && f.popups.isVisible("image.size") && Q()
  11698. }), n
  11699. }
  11700. function ee(e, t, n, r) {
  11701. return e.pageX = t, w.call(this, e), e.pageX = e.pageX + n * Math.floor(Math.pow(1.1, r)), _.call(this, e), O.call(this, e), ++r
  11702. }
  11703. function te(e) {
  11704. (e = e || Te()) && !1 !== f.events.trigger("image.beforeRemove", [e]) && (f.popups.hideAll(), be(), de(!0), f.undo.canDo() || f.undo.saveStep(), e.get(0) == f.el ? e.removeAttr("src") : (e.get(0).parentNode && "A" == e.get(0).parentNode.tagName ? (f.selection.setBefore(e.get(0).parentNode) || f.selection.setAfter(e.get(0).parentNode) || e.parent().after($e.MARKERS), u(e.get(0).parentNode).remove()) : (f.selection.setBefore(e.get(0)) || f.selection.setAfter(e.get(0)) || e.after($e.MARKERS), e.remove()), f.html.fillEmptyBlocks(), f.selection.restore()), f.undo.saveStep())
  11705. }
  11706. function ne(e) {
  11707. var t = e.which;
  11708. if (p && (t == $e.KEYCODE.BACKSPACE || t == $e.KEYCODE.DELETE)) return e.preventDefault(), e.stopPropagation(), te(), !1;
  11709. if (p && t == $e.KEYCODE.ESC) {
  11710. var n = p;
  11711. return de(!0), f.selection.setAfter(n.get(0)), f.selection.restore(), e.preventDefault(), !1
  11712. }
  11713. if (!p || t != $e.KEYCODE.ARROW_LEFT && t != $e.KEYCODE.ARROW_RIGHT) return p && t === $e.KEYCODE.TAB ? (e.preventDefault(), e.stopPropagation(), de(!0), !1) : p && t != $e.KEYCODE.F10 && !f.keys.isBrowserAction(e) ? (e.preventDefault(), e.stopPropagation(), !1) : void 0;
  11714. var r = p.get(0);
  11715. return de(!0), t == $e.KEYCODE.ARROW_LEFT ? f.selection.setBefore(r) : f.selection.setAfter(r), f.selection.restore(), e.preventDefault(), !1
  11716. }
  11717. function re(e) {
  11718. if (e && "IMG" == e.tagName) {
  11719. if (f.node.hasClass(e, "fr-uploading") || f.node.hasClass(e, "fr-error") ? e.parentNode.removeChild(e) : f.node.hasClass(e, "fr-draggable") && e.classList.remove("fr-draggable"), e.parentNode && e.parentNode.parentNode && f.node.hasClass(e.parentNode.parentNode, "fr-img-caption")) {
  11720. var t = e.parentNode.parentNode;
  11721. t.removeAttribute("contenteditable"), t.removeAttribute("draggable"), t.classList.remove("fr-draggable");
  11722. var n = e.nextSibling;
  11723. n && n.removeAttribute("contenteditable")
  11724. }
  11725. } else if (e && e.nodeType == Node.ELEMENT_NODE)
  11726. for (var r = e.querySelectorAll("img.fr-uploading, img.fr-error, img.fr-draggable"), a = 0; a < r.length; a++) re(r[a])
  11727. }
  11728. function ae(e) {
  11729. if (!1 === f.events.trigger("image.beforePasteUpload", [e])) return !1;
  11730. p = u(e), y(), o(), ve(), I(), p.on("load", function() {
  11731. y(), u(f.popups.get("image.insert").get(0)).find("div.fr-active.fr-error").length < 1 && I(), u(this).off("load")
  11732. });
  11733. for (var t = u(e).attr("src").split(","), n = atob(t[1]), r = [], a = 0; a < n.length; a++) r.push(n.charCodeAt(a));
  11734. V([new Blob([new Uint8Array(r)], {
  11735. type: t[0].replace(/data\:/g, "").replace(/;base64/g, "")
  11736. })], p)
  11737. }
  11738. function oe() {
  11739. f.opts.imagePaste ? f.$el.find("img[data-fr-image-pasted]").each(function(e, r) {
  11740. if (f.opts.imagePasteProcess) {
  11741. var t = f.opts.imageDefaultWidth;
  11742. t && "auto" != t && (t += f.opts.imageResizeWithPercent ? "%" : "px"), u(r).css("width", t).removeClass("fr-dii fr-dib fr-fir fr-fil"), he(u(r), f.opts.imageDefaultDisplay, f.opts.imageDefaultAlign)
  11743. }
  11744. if (0 === r.src.indexOf("data:")) ae(r);
  11745. else if (0 === r.src.indexOf("blob:") || 0 === r.src.indexOf("http") && f.opts.imageUploadRemoteUrls && f.opts.imageCORSProxy) {
  11746. var n = new Image;
  11747. n.crossOrigin = "Anonymous", n.onload = function() {
  11748. var e, t = f.o_doc.createElement("CANVAS"),
  11749. n = t.getContext("2d");
  11750. t.height = this.naturalHeight, t.width = this.naturalWidth, n.drawImage(this, 0, 0), setTimeout(function() {
  11751. ae(r)
  11752. }, 0), e = 2e3 < this.naturalWidth || 1500 < this.naturalHeight ? "jpeg" : "png", r.src = t.toDataURL("image/" + e)
  11753. }, n.src = (0 === r.src.indexOf("blob:") ? "" : f.opts.imageCORSProxy + "/") + r.src
  11754. } else 0 !== r.src.indexOf("http") || 0 === r.src.indexOf("https://mail.google.com/mail") ? (f.selection.save(), u(r).remove(), f.selection.restore()) : u(r).removeAttr("data-fr-image-pasted")
  11755. }) : f.$el.find("img[data-fr-image-pasted]").remove()
  11756. }
  11757. function ie(e) {
  11758. var t = e.target.result,
  11759. n = f.opts.imageDefaultWidth;
  11760. n && "auto" != n && (n += f.opts.imageResizeWithPercent ? "%" : "px"), f.undo.saveStep(), f.html.insert('<img data-fr-image-pasted="true" src="' + t + '"' + (n ? ' style="width: ' + n + ';"' : "") + ">");
  11761. var r = f.$el.find('img[data-fr-image-pasted="true"]');
  11762. r && he(r, f.opts.imageDefaultDisplay, f.opts.imageDefaultAlign), f.events.trigger("paste.after")
  11763. }
  11764. function se(e) {
  11765. if (e && e.clipboardData && e.clipboardData.items) {
  11766. var t = null;
  11767. if (e.clipboardData.types && -1 != [].indexOf.call(e.clipboardData.types, "text/rtf") || e.clipboardData.getData("text/rtf")) t = e.clipboardData.items[0].getAsFile();
  11768. else
  11769. for (var n = 0; n < e.clipboardData.items.length && !(t = e.clipboardData.items[n].getAsFile()); n++); if (t) return function r(e) {
  11770. var t = new FileReader;
  11771. t.onload = ie, t.readAsDataURL(e)
  11772. }(t), !1
  11773. }
  11774. }
  11775. function le(e) {
  11776. return e = e.replace(/<img /gi, '<img data-fr-image-pasted="true" ')
  11777. }
  11778. function ce(e) {
  11779. if ("false" == u(this).parents("[contenteditable]").not(".fr-element").not(".fr-img-caption").not("body").first().attr("contenteditable")) return !0;
  11780. if (e && "touchend" == e.type && n) return !0;
  11781. if (e && f.edit.isDisabled()) return e.stopPropagation(), e.preventDefault(), !1;
  11782. for (var t = 0; t < $e.INSTANCES.length; t++) $e.INSTANCES[t] != f && $e.INSTANCES[t].events.trigger("image.hideResizer");
  11783. f.toolbar.disable(), e && (e.stopPropagation(), e.preventDefault()), f.helpers.isMobile() && (f.events.disableBlur(), f.$el.blur(), f.events.enableBlur()), f.opts.iframe && f.size.syncIframe(), p = u(this), be(), y(), o(), f.browser.msie ? (f.popups.areVisible() && f.events.disableBlur(), f.win.getSelection && (f.win.getSelection().removeAllRanges(), f.win.getSelection().addRange(f.doc.createRange()))) : f.selection.clear(), f.helpers.isIOS() && (f.events.disableBlur(), f.$el.blur()), f.button.bulkRefresh(), f.events.trigger("video.hideResizer")
  11784. }
  11785. function de(e) {
  11786. p && (function t() {
  11787. return fe
  11788. }() || !0 === e) && (f.toolbar.enable(), l.removeClass("fr-active"), f.popups.hide("image.edit"), p = null, ue(), c = null, d && d.hide())
  11789. }
  11790. a[r] = "Image cannot be loaded from the passed link.", a[h] = "No link in upload response.", a[g] = "Error during file upload.", a[m] = "Parsing response failed.", a[v] = "File is too large.", a[b] = "Image file type is invalid.", a[7] = "Files can be uploaded only to same domain in IE 8 and IE 9.";
  11791. var fe = !(a[8] = "Image file is corrupted.");
  11792. function pe() {
  11793. fe = !0
  11794. }
  11795. function ue() {
  11796. fe = !1
  11797. }
  11798. function he(e, t, n) {
  11799. !f.opts.htmlUntouched && f.opts.useClasses ? (e.removeClass("fr-fil fr-fir fr-dib fr-dii"), n && e.addClass("fr-fi" + n[0]), t && e.addClass("fr-di" + t[0])) : "inline" == t ? (e.css({
  11800. display: "inline-block",
  11801. verticalAlign: "bottom",
  11802. margin: f.opts.imageDefaultMargin
  11803. }), "center" == n ? e.css({
  11804. "float": "none",
  11805. marginBottom: "",
  11806. marginTop: "",
  11807. maxWidth: "calc(100% - " + 2 * f.opts.imageDefaultMargin + "px)",
  11808. textAlign: "center"
  11809. }) : "left" == n ? e.css({
  11810. "float": "left",
  11811. marginLeft: 0,
  11812. maxWidth: "calc(100% - " + f.opts.imageDefaultMargin + "px)",
  11813. textAlign: "left"
  11814. }) : e.css({
  11815. "float": "right",
  11816. marginRight: 0,
  11817. maxWidth: "calc(100% - " + f.opts.imageDefaultMargin + "px)",
  11818. textAlign: "right"
  11819. })) : "block" == t && (e.css({
  11820. display: "block",
  11821. "float": "none",
  11822. verticalAlign: "top",
  11823. margin: f.opts.imageDefaultMargin + "px auto",
  11824. textAlign: "center"
  11825. }), "left" == n ? e.css({
  11826. marginLeft: 0,
  11827. textAlign: "left"
  11828. }) : "right" == n && e.css({
  11829. marginRight: 0,
  11830. textAlign: "right"
  11831. }))
  11832. }
  11833. function ge(e) {
  11834. if (void 0 === e && (e = Te()), e) {
  11835. if (e.hasClass("fr-fil")) return "left";
  11836. if (e.hasClass("fr-fir")) return "right";
  11837. if (e.hasClass("fr-dib") || e.hasClass("fr-dii")) return "center";
  11838. var t = e.css("float");
  11839. if (e.css("float", "none"), "block" == e.css("display")) {
  11840. if (e.css("float", ""), e.css("float") != t && e.css("float", t), 0 === parseInt(e.css("margin-left"), 10)) return "left";
  11841. if (0 === parseInt(e.css("margin-right"), 10)) return "right"
  11842. } else {
  11843. if (e.css("float", ""), e.css("float") != t && e.css("float", t), "left" == e.css("float")) return "left";
  11844. if ("right" == e.css("float")) return "right"
  11845. }
  11846. }
  11847. return "center"
  11848. }
  11849. function me(e) {
  11850. void 0 === e && (e = Te());
  11851. var t = e.css("float");
  11852. return e.css("float", "none"), "block" == e.css("display") ? (e.css("float", ""), e.css("float") != t && e.css("float", t), "block") : (e.css("float", ""), e.css("float") != t && e.css("float", t), "inline")
  11853. }
  11854. function ve() {
  11855. var e = f.popups.get("image.insert");
  11856. e || (e = Y()), f.popups.isVisible("image.insert") || (k(), f.popups.refresh("image.insert"), f.popups.setContainer("image.insert", f.$sc));
  11857. var t = Te();
  11858. Ae() && (t = t.find(".fr-img-wrap"));
  11859. var n = t.offset().left + t.outerWidth() / 2,
  11860. r = t.offset().top + t.outerHeight();
  11861. f.popups.show("image.insert", n, r, t.outerHeight(!0), !0)
  11862. }
  11863. function be() {
  11864. if (p) {
  11865. f.events.disableBlur(), f.selection.clear();
  11866. var e = f.doc.createRange();
  11867. e.selectNode(p.get(0)), f.browser.msie && e.collapse(!0), f.selection.get().addRange(e), f.events.enableBlur()
  11868. }
  11869. }
  11870. function Ee() {
  11871. return p
  11872. }
  11873. function Te() {
  11874. return Ae() ? p.parents(".fr-img-caption").first() : p
  11875. }
  11876. function Ae() {
  11877. return !!p && 0 < p.parents(".fr-img-caption").length
  11878. }
  11879. return {
  11880. _init: function Ce() {
  11881. var r;
  11882. (function e() {
  11883. f.events.$on(f.$el, f._mousedown, "IMG" == f.el.tagName ? null : 'img:not([contenteditable="false"])', function(e) {
  11884. if ("false" == u(this).parents("contenteditable").not(".fr-element").not(".fr-img-caption").not("body").first().attr("contenteditable")) return !0;
  11885. f.helpers.isMobile() || f.selection.clear(), t = !0, f.popups.areVisible() && f.events.disableBlur(), f.browser.msie && (f.events.disableBlur(), f.$el.attr("contenteditable", !1)), f.draggable || "touchstart" == e.type || e.preventDefault(), e.stopPropagation()
  11886. }), f.events.$on(f.$el, f._mousedown, ".fr-img-caption .fr-inner", function(e) {
  11887. f.core.hasFocus() || f.events.focus(), e.stopPropagation()
  11888. }), f.events.$on(f.$el, "paste", ".fr-img-caption .fr-inner", function(e) {
  11889. f.toolbar.hide(), e.stopPropagation()
  11890. }), f.events.$on(f.$el, f._mouseup, "IMG" == f.el.tagName ? null : 'img:not([contenteditable="false"])', function(e) {
  11891. if ("false" == u(this).parents("contenteditable").not(".fr-element").not(".fr-img-caption").not("body").first().attr("contenteditable")) return !0;
  11892. t && (t = !1, e.stopPropagation(), f.browser.msie && (f.$el.attr("contenteditable", !0), f.events.enableBlur()))
  11893. }), f.events.on("keyup", function(e) {
  11894. if (e.shiftKey && "" === f.selection.text().replace(/\n/g, "") && f.keys.isArrow(e.which)) {
  11895. var t = f.selection.element(),
  11896. n = f.selection.endElement();
  11897. t && "IMG" == t.tagName ? B(u(t)) : n && "IMG" == n.tagName && B(u(n))
  11898. }
  11899. }, !0), f.events.on("drop", G), f.events.on("element.beforeDrop", z), f.events.on("mousedown window.mousedown", pe), f.events.on("window.touchmove", ue), f.events.on("mouseup window.mouseup", function() {
  11900. if (p) return de(), !1;
  11901. ue()
  11902. }), f.events.on("commands.mousedown", function(e) {
  11903. 0 < e.parents(".fr-toolbar").length && de()
  11904. }), f.events.on("image.resizeEnd", function() {
  11905. f.opts.iframe && f.size.syncIframe()
  11906. }), f.events.on("blur image.hideResizer commands.undo commands.redo element.dropped", function() {
  11907. de(!(t = !1))
  11908. }), f.events.on("modals.hide", function() {
  11909. p && (be(), f.selection.clear())
  11910. }), f.events.on("image.resizeEnd", function() {
  11911. f.win.getSelection && B(p)
  11912. }), f.opts.imageAddNewLine && f.events.on("image.inserted", function(e) {
  11913. var t = e.get(0);
  11914. for (t.nextSibling && "BR" === t.nextSibling.tagName && (t = t.nextSibling); t && !f.node.isElement(t);) t = f.node.isLastSibling(t) ? t.parentNode : null;
  11915. f.node.isElement(t) && (f.opts.enter === $e.ENTER_BR ? e.after("<br>") : u(f.node.blockParent(e.get(0))).after("<" + f.html.defaultTag() + "><br></" + f.html.defaultTag() + ">"))
  11916. })
  11917. })(), "IMG" == f.el.tagName && f.$el.addClass("fr-view"), f.events.$on(f.$el, f.helpers.isMobile() && !f.helpers.isWindowsPhone() ? "touchend" : "click", "IMG" == f.el.tagName ? null : 'img:not([contenteditable="false"])', ce), f.helpers.isMobile() && (f.events.$on(f.$el, "touchstart", "IMG" == f.el.tagName ? null : 'img:not([contenteditable="false"])', function() {
  11918. n = !1
  11919. }), f.events.$on(f.$el, "touchmove", function() {
  11920. n = !0
  11921. })), f.$wp ? (f.events.on("window.keydown keydown", ne, !0), f.events.on("keyup", function(e) {
  11922. if (p && e.which == $e.KEYCODE.ENTER) return !1
  11923. }, !0), f.events.$on(f.$el, "keydown", function() {
  11924. var e = f.selection.element();
  11925. (e.nodeType === Node.TEXT_NODE || "BR" == e.tagName && f.node.isLastSibling(e)) && (e = e.parentNode), f.node.hasClass(e, "fr-inner") || (f.node.hasClass(e, "fr-img-caption") || (e = u(e).parents(".fr-img-caption").get(0)), f.node.hasClass(e, "fr-img-caption") && (u(e).after($e.INVISIBLE_SPACE + $e.MARKERS), f.selection.restore()))
  11926. })) : f.events.$on(f.$win, "keydown", ne), f.events.on("toolbar.esc", function() {
  11927. if (p) {
  11928. if (f.$wp) f.events.disableBlur(), f.events.focus();
  11929. else {
  11930. var e = p;
  11931. de(!0), f.selection.setAfter(e.get(0)), f.selection.restore()
  11932. }
  11933. return !1
  11934. }
  11935. }, !0), f.events.on("toolbar.focusEditor", function() {
  11936. if (p) return !1
  11937. }, !0), f.events.on("window.cut window.copy", function(e) {
  11938. if (p && f.popups.isVisible("image.edit") && !f.popups.get("image.edit").find(":focus").length) {
  11939. var t = Te();
  11940. Ae() ? (t.before($e.START_MARKER), t.after($e.END_MARKER), f.selection.restore(), f.paste.saveCopiedText(t.get(0).outerHTML, t.text())) : (be(), f.paste.saveCopiedText(p.get(0).outerHTML, p.attr("alt"))), "copy" == e.type ? setTimeout(function() {
  11941. B(p)
  11942. }) : (de(!0), f.undo.saveStep(), setTimeout(function() {
  11943. f.undo.saveStep()
  11944. }, 0))
  11945. }
  11946. }, !0), f.browser.msie && f.events.on("keydown", function(e) {
  11947. if (!f.selection.isCollapsed() || !p) return !0;
  11948. var t = e.which;
  11949. t == $e.KEYCODE.C && f.keys.ctrlKey(e) ? f.events.trigger("window.copy") : t == $e.KEYCODE.X && f.keys.ctrlKey(e) && f.events.trigger("window.cut")
  11950. }), f.events.$on(u(f.o_win), "keydown", function(e) {
  11951. var t = e.which;
  11952. if (p && t == $e.KEYCODE.BACKSPACE) return e.preventDefault(), !1
  11953. }), f.events.$on(f.$win, "keydown", function(e) {
  11954. var t = e.which;
  11955. p && p.hasClass("fr-uploading") && t == $e.KEYCODE.ESC && p.trigger("abortUpload")
  11956. }), f.events.on("destroy", function() {
  11957. p && p.hasClass("fr-uploading") && p.trigger("abortUpload")
  11958. }), f.events.on("paste.before", se), f.events.on("paste.beforeCleanup", le), f.events.on("paste.after", oe), f.events.on("html.set", C), f.events.on("html.inserted", C), C(), f.events.on("destroy", function() {
  11959. s = []
  11960. }), f.events.on("html.processGet", re), f.opts.imageOutputSize && f.events.on("html.beforeGet", function() {
  11961. r = f.el.querySelectorAll("img");
  11962. for (var e = 0; e < r.length; e++) {
  11963. var t = r[e].style.width || u(r[e]).width(),
  11964. n = r[e].style.height || u(r[e]).height();
  11965. t && r[e].setAttribute("width", ("" + t).replace(/px/, "")), n && r[e].setAttribute("height", ("" + n).replace(/px/, ""))
  11966. }
  11967. }), f.opts.iframe && f.events.on("image.loaded", f.size.syncIframe), f.$wp && (S(), f.events.on("contentChanged", S)), f.events.$on(u(f.o_win), "orientationchange.image", function() {
  11968. setTimeout(function() {
  11969. p && B(p)
  11970. }, 100)
  11971. }), x(!0), Y(!0), J(!0), X(!0), f.events.on("node.remove", function(e) {
  11972. if ("IMG" == e.get(0).tagName) return te(e), !1
  11973. })
  11974. },
  11975. showInsertPopup: function Se() {
  11976. var e = f.$tb.find('.fr-command[data-cmd="insertImage"]'),
  11977. t = f.popups.get("image.insert");
  11978. if (t || (t = Y()), k(), !t.hasClass("fr-active"))
  11979. if (f.popups.refresh("image.insert"), f.popups.setContainer("image.insert", f.$tb), e.isVisible()) {
  11980. var n = f.button.getPosition(e),
  11981. r = n.left,
  11982. a = n.top;
  11983. f.popups.show("image.insert", r, a, e.outerHeight())
  11984. } else f.position.forSelection(t), f.popups.show("image.insert")
  11985. },
  11986. showLayer: function ye(e) {
  11987. var t, n, r = f.popups.get("image.insert");
  11988. if (p || f.opts.toolbarInline) {
  11989. if (p) {
  11990. var a = Te();
  11991. Ae() && (a = a.find(".fr-img-wrap")), n = a.offset().top + a.outerHeight(), t = a.offset().left
  11992. }
  11993. } else {
  11994. var o = f.$tb.find('.fr-command[data-cmd="insertImage"]');
  11995. t = o.offset().left, n = o.offset().top + (f.opts.toolbarBottom ? 10 : o.outerHeight() - 10)
  11996. }!p && f.opts.toolbarInline && (n = r.offset().top - f.helpers.getPX(r.css("margin-top")), r.hasClass("fr-above") && (n += r.outerHeight())), r.find(".fr-layer").removeClass("fr-active"), r.find(".fr-" + e + "-layer").addClass("fr-active"), f.popups.show("image.insert", t, n, p ? p.outerHeight() : 0), f.accessibility.focusPopup(r)
  11997. },
  11998. refreshUploadButton: function Re(e) {
  11999. var t = f.popups.get("image.insert");
  12000. t && t.find(".fr-image-upload-layer").hasClass("fr-active") && e.addClass("fr-active").attr("aria-pressed", !0)
  12001. },
  12002. refreshByURLButton: function Le(e) {
  12003. var t = f.popups.get("image.insert");
  12004. t && t.find(".fr-image-by-url-layer").hasClass("fr-active") && e.addClass("fr-active").attr("aria-pressed", !0)
  12005. },
  12006. upload: V,
  12007. insertByURL: function we() {
  12008. var e = f.popups.get("image.insert").find(".fr-image-by-url-layer input");
  12009. if (0 < e.val().length) {
  12010. I(), M(f.language.translate("Loading image"));
  12011. var t = e.val().trim();
  12012. if (f.opts.imageUploadRemoteUrls && f.opts.imageCORSProxy && f.opts.imageUpload) {
  12013. var n = new XMLHttpRequest;
  12014. n.onload = function() {
  12015. 200 == this.status ? V([new Blob([this.response], {
  12016. type: this.response.type || "image/png"
  12017. })], p) : N(r)
  12018. }, n.onerror = function() {
  12019. $(t, !0, [], p)
  12020. }, n.open("GET", f.opts.imageCORSProxy + "/" + t, !0), n.responseType = "blob", n.send()
  12021. } else $(t, !0, [], p);
  12022. e.val(""), e.blur()
  12023. }
  12024. },
  12025. align: function _e(e) {
  12026. var t = Te();
  12027. t.removeClass("fr-fir fr-fil"), !f.opts.htmlUntouched && f.opts.useClasses ? "left" == e ? t.addClass("fr-fil") : "right" == e && t.addClass("fr-fir") : he(t, me(), e), be(), y(), o(), f.selection.clear()
  12028. },
  12029. refreshAlign: function Oe(e) {
  12030. p && e.find("> *").first().replaceWith(f.icon.create("image-align-" + ge()))
  12031. },
  12032. refreshAlignOnShow: function Ne(e, t) {
  12033. p && t.find('.fr-command[data-param1="' + ge() + '"]').addClass("fr-active").attr("aria-selected", !0)
  12034. },
  12035. display: function xe(e) {
  12036. var t = Te();
  12037. t.removeClass("fr-dii fr-dib"), !f.opts.htmlUntouched && f.opts.useClasses ? "inline" == e ? t.addClass("fr-dii") : "block" == e && t.addClass("fr-dib") : he(t, e, ge()), be(), y(), o(), f.selection.clear()
  12038. },
  12039. refreshDisplayOnShow: function Ie(e, t) {
  12040. p && t.find('.fr-command[data-param1="' + me() + '"]').addClass("fr-active").attr("aria-selected", !0)
  12041. },
  12042. replace: ve,
  12043. back: function e() {
  12044. p ? (f.events.disableBlur(), u(".fr-popup input:focus").blur(), B(p)) : (f.events.disableBlur(), f.selection.restore(), f.events.enableBlur(), f.popups.hide("image.insert"), f.toolbar.showInline())
  12045. },
  12046. get: Ee,
  12047. getEl: Te,
  12048. insert: $,
  12049. showProgressBar: I,
  12050. remove: te,
  12051. hideProgressBar: k,
  12052. applyStyle: function ke(e, t, n) {
  12053. if (void 0 === t && (t = f.opts.imageStyles), void 0 === n && (n = f.opts.imageMultipleStyles), !p) return !1;
  12054. var r = Te();
  12055. if (!n) {
  12056. var a = Object.keys(t);
  12057. a.splice(a.indexOf(e), 1), r.removeClass(a.join(" "))
  12058. }
  12059. "object" == Fe(t[e]) ? (r.removeAttr("style"), r.css(t[e].style)) : r.toggleClass(e), B(p)
  12060. },
  12061. showAltPopup: q,
  12062. showSizePopup: Q,
  12063. setAlt: function Me(e) {
  12064. if (p) {
  12065. var t = f.popups.get("image.alt");
  12066. p.attr("alt", e || t.find("input").val() || ""), t.find("input:focus").blur(), B(p)
  12067. }
  12068. },
  12069. setSize: function De(e, t) {
  12070. if (p) {
  12071. var n = f.popups.get("image.size");
  12072. e = e || n.find('input[name="width"]').val() || "", t = t || n.find('input[name="height"]').val() || "";
  12073. var r = /^[\d]+((px)|%)*$/g;
  12074. p.removeAttr("width").removeAttr("height"), e.match(r) ? p.css("width", e) : p.css("width", ""), t.match(r) ? p.css("height", t) : p.css("height", ""), Ae() && (p.parents(".fr-img-caption").removeAttr("width").removeAttr("height"), e.match(r) ? p.parents(".fr-img-caption").css("width", e) : p.parents(".fr-img-caption").css("width", ""), t.match(r) ? p.parents(".fr-img-caption").css("height", t) : p.parents(".fr-img-caption").css("height", "")), n && n.find("input:focus").blur(), B(p)
  12075. }
  12076. },
  12077. toggleCaption: function Be() {
  12078. var e;
  12079. if (p && !Ae()) {
  12080. var t, n;
  12081. (e = p).parent().is("a") && (e = p.parent()), e.attr("style") && (n = -1 < (t = e.attr("style").split(":")).indexOf("width") ? t[t.indexOf("width") + 1].replace(";", "") : "");
  12082. var r = f.opts.imageResizeWithPercent ? (-1 < n.indexOf("px") ? null : n) || "100%" : p.width() + "px";
  12083. e.wrap("<span " + (f.browser.mozilla ? "" : 'contenteditable="false"') + 'class="fr-img-caption ' + p.attr("class") + '" style="' + (f.opts.useClasses ? "" : e.attr("style")) + '" draggable="false"></span>'), e.wrap('<span class="fr-img-wrap"></span>'), p.after('<span class="fr-inner"' + (f.browser.mozilla ? "" : ' contenteditable="true"') + ">" + $e.START_MARKER + f.language.translate("Image Caption") + $e.END_MARKER + "</span>"), p.removeAttr("class").removeAttr("style").removeAttr("width"), p.parents(".fr-img-caption").css("width", r), de(!0), f.selection.restore()
  12084. } else e = Te(), p.insertAfter(e), p.attr("class", e.attr("class").replace("fr-img-caption", "")).attr("style", e.attr("style")), e.remove(), B(p)
  12085. },
  12086. hasCaption: Ae,
  12087. exitEdit: de,
  12088. edit: B
  12089. }
  12090. }, $e.DefineIcon("insertImage", {
  12091. NAME: "image",
  12092. SVG_KEY: "insertImage"
  12093. }), $e.RegisterShortcut($e.KEYCODE.P, "insertImage", null, "P"), $e.RegisterCommand("insertImage", {
  12094. title: "Insert Image",
  12095. undo: !1,
  12096. focus: !0,
  12097. refreshAfterCallback: !1,
  12098. popup: !0,
  12099. callback: function() {
  12100. this.popups.isVisible("image.insert") ? (this.$el.find(".fr-marker").length && (this.events.disableBlur(), this.selection.restore()), this.popups.hide("image.insert")) : this.image.showInsertPopup()
  12101. },
  12102. plugin: "image"
  12103. }), $e.DefineIcon("imageUpload", {
  12104. NAME: "upload",
  12105. SVG_KEY: "upload"
  12106. }), $e.RegisterCommand("imageUpload", {
  12107. title: "Upload Image",
  12108. undo: !1,
  12109. focus: !1,
  12110. toggle: !0,
  12111. callback: function() {
  12112. this.image.showLayer("image-upload")
  12113. },
  12114. refresh: function(e) {
  12115. this.image.refreshUploadButton(e)
  12116. }
  12117. }), $e.DefineIcon("imageByURL", {
  12118. NAME: "link",
  12119. SVG_KEY: "insertLink"
  12120. }), $e.RegisterCommand("imageByURL", {
  12121. title: "By URL",
  12122. undo: !1,
  12123. focus: !1,
  12124. toggle: !0,
  12125. callback: function() {
  12126. this.image.showLayer("image-by-url")
  12127. },
  12128. refresh: function(e) {
  12129. this.image.refreshByURLButton(e)
  12130. }
  12131. }), $e.RegisterCommand("imageInsertByURL", {
  12132. title: "Insert Image",
  12133. undo: !0,
  12134. refreshAfterCallback: !1,
  12135. callback: function() {
  12136. this.image.insertByURL()
  12137. },
  12138. refresh: function(e) {
  12139. this.image.get() ? e.text(this.language.translate("Replace")) : e.text(this.language.translate("Insert"))
  12140. }
  12141. }), $e.DefineIcon("imageDisplay", {
  12142. NAME: "star",
  12143. SVG_KEY: "imageDisplay"
  12144. }), $e.RegisterCommand("imageDisplay", {
  12145. title: "Display",
  12146. type: "dropdown",
  12147. options: {
  12148. inline: "Inline",
  12149. block: "Break Text"
  12150. },
  12151. callback: function(e, t) {
  12152. this.image.display(t)
  12153. },
  12154. refresh: function(e) {
  12155. this.opts.imageTextNear || e.addClass("fr-hidden")
  12156. },
  12157. refreshOnShow: function(e, t) {
  12158. this.image.refreshDisplayOnShow(e, t)
  12159. }
  12160. }), $e.DefineIcon("image-align", {
  12161. NAME: "align-left",
  12162. SVG_KEY: "alignLeft"
  12163. }), $e.DefineIcon("image-align-left", {
  12164. NAME: "align-left",
  12165. SVG_KEY: "alignLeft"
  12166. }), $e.DefineIcon("image-align-right", {
  12167. NAME: "align-right",
  12168. SVG_KEY: "alignRight"
  12169. }), $e.DefineIcon("image-align-center", {
  12170. NAME: "align-justify",
  12171. SVG_KEY: "alignCenter"
  12172. }), $e.DefineIcon("imageAlign", {
  12173. NAME: "align-justify",
  12174. SVG_KEY: "alignJustify"
  12175. }), $e.RegisterCommand("imageAlign", {
  12176. type: "dropdown",
  12177. title: "Align",
  12178. options: {
  12179. left: "Align Left",
  12180. center: "None",
  12181. right: "Align Right"
  12182. },
  12183. html: function() {
  12184. var e = '<ul class="fr-dropdown-list" role="presentation">',
  12185. t = $e.COMMANDS.imageAlign.options;
  12186. for (var n in t) t.hasOwnProperty(n) && (e += '<li role="presentation"><a class="fr-command fr-title" tabIndex="-1" role="option" data-cmd="imageAlign" data-param1="' + n + '" title="' + this.language.translate(t[n]) + '">' + this.icon.create("image-align-" + n) + '<span class="fr-sr-only">' + this.language.translate(t[n]) + "</span></a></li>");
  12187. return e += "</ul>"
  12188. },
  12189. callback: function(e, t) {
  12190. this.image.align(t)
  12191. },
  12192. refresh: function(e) {
  12193. this.image.refreshAlign(e)
  12194. },
  12195. refreshOnShow: function(e, t) {
  12196. this.image.refreshAlignOnShow(e, t)
  12197. }
  12198. }), $e.DefineIcon("imageReplace", {
  12199. NAME: "exchange",
  12200. FA5NAME: "exchange-alt",
  12201. SVG_KEY: "replaceImage"
  12202. }), $e.RegisterCommand("imageReplace", {
  12203. title: "Replace",
  12204. undo: !1,
  12205. focus: !1,
  12206. popup: !0,
  12207. refreshAfterCallback: !1,
  12208. callback: function() {
  12209. this.image.replace()
  12210. }
  12211. }), $e.DefineIcon("imageRemove", {
  12212. NAME: "trash",
  12213. SVG_KEY: "remove"
  12214. }), $e.RegisterCommand("imageRemove", {
  12215. title: "Remove",
  12216. callback: function() {
  12217. this.image.remove()
  12218. }
  12219. }), $e.DefineIcon("imageBack", {
  12220. NAME: "arrow-left",
  12221. SVG_KEY: "back"
  12222. }), $e.RegisterCommand("imageBack", {
  12223. title: "Back",
  12224. undo: !1,
  12225. focus: !1,
  12226. back: !0,
  12227. callback: function() {
  12228. this.image.back()
  12229. },
  12230. refresh: function(e) {
  12231. this.$;
  12232. this.image.get() || this.opts.toolbarInline ? (e.removeClass("fr-hidden"), e.next(".fr-separator").removeClass("fr-hidden")) : (e.addClass("fr-hidden"), e.next(".fr-separator").addClass("fr-hidden"))
  12233. }
  12234. }), $e.RegisterCommand("imageDismissError", {
  12235. title: "OK",
  12236. undo: !1,
  12237. callback: function() {
  12238. this.image.hideProgressBar(!0)
  12239. }
  12240. }), $e.DefineIcon("imageStyle", {
  12241. NAME: "magic",
  12242. SVG_KEY: "imageClass"
  12243. }), $e.RegisterCommand("imageStyle", {
  12244. title: "Style",
  12245. type: "dropdown",
  12246. html: function() {
  12247. var e = '<ul class="fr-dropdown-list" role="presentation">',
  12248. t = this.opts.imageStyles;
  12249. for (var n in t)
  12250. if (t.hasOwnProperty(n)) {
  12251. var r = t[n];
  12252. "object" == Fe(r) && (r = r.title), e += '<li role="presentation"><a class="fr-command" tabIndex="-1" role="option" data-cmd="imageStyle" data-param1="' + n + '">' + this.language.translate(r) + "</a></li>"
  12253. }
  12254. return e += "</ul>"
  12255. },
  12256. callback: function(e, t) {
  12257. this.image.applyStyle(t)
  12258. },
  12259. refreshOnShow: function(e, t) {
  12260. var n = this.$,
  12261. r = this.image.getEl();
  12262. r && t.find(".fr-command").each(function() {
  12263. var e = n(this).data("param1"),
  12264. t = r.hasClass(e);
  12265. n(this).toggleClass("fr-active", t).attr("aria-selected", t)
  12266. })
  12267. }
  12268. }), $e.DefineIcon("imageAlt", {
  12269. NAME: "info",
  12270. SVG_KEY: "imageAltText"
  12271. }), $e.RegisterCommand("imageAlt", {
  12272. undo: !1,
  12273. focus: !1,
  12274. popup: !0,
  12275. title: "Alternative Text",
  12276. callback: function() {
  12277. this.image.showAltPopup()
  12278. }
  12279. }), $e.RegisterCommand("imageSetAlt", {
  12280. undo: !0,
  12281. focus: !1,
  12282. title: "Update",
  12283. refreshAfterCallback: !1,
  12284. callback: function() {
  12285. this.image.setAlt()
  12286. }
  12287. }), $e.DefineIcon("imageSize", {
  12288. NAME: "arrows-alt",
  12289. SVG_KEY: "imageSize"
  12290. }), $e.RegisterCommand("imageSize", {
  12291. undo: !1,
  12292. focus: !1,
  12293. popup: !0,
  12294. title: "Change Size",
  12295. callback: function() {
  12296. this.image.showSizePopup()
  12297. }
  12298. }), $e.RegisterCommand("imageSetSize", {
  12299. undo: !0,
  12300. focus: !1,
  12301. title: "Update",
  12302. refreshAfterCallback: !1,
  12303. callback: function() {
  12304. this.image.setSize()
  12305. }
  12306. }), $e.DefineIcon("imageCaption", {
  12307. NAME: "commenting",
  12308. FA5NAME: "comment-alt",
  12309. SVG_KEY: "imageCaption"
  12310. }), $e.RegisterCommand("imageCaption", {
  12311. undo: !0,
  12312. focus: !1,
  12313. title: "Image Caption",
  12314. refreshAfterCallback: !0,
  12315. callback: function() {
  12316. this.image.toggleCaption()
  12317. },
  12318. refresh: function(e) {
  12319. this.image.get() && e.toggleClass("fr-active", this.image.hasCaption())
  12320. }
  12321. }), Object.assign($e.DEFAULTS, {
  12322. imageManagerLoadURL: "https://i.froala.com/load-files",
  12323. imageManagerLoadMethod: "get",
  12324. imageManagerLoadParams: {},
  12325. imageManagerPreloader: null,
  12326. imageManagerDeleteURL: "",
  12327. imageManagerDeleteMethod: "post",
  12328. imageManagerDeleteParams: {},
  12329. imageManagerPageSize: 12,
  12330. imageManagerScrollOffset: 20,
  12331. imageManagerToggleTags: !0
  12332. }), $e.PLUGINS.imageManager = function(s) {
  12333. var l, c, o, i, d, f, p, u, h, g, m, v = s.$,
  12334. b = "image_manager",
  12335. e = 10,
  12336. E = 11,
  12337. T = 12,
  12338. A = 13,
  12339. C = 14,
  12340. S = 15,
  12341. n = 21,
  12342. r = 22,
  12343. a = {};
  12344. function y() {
  12345. var e = v(window).outerWidth();
  12346. return e < 768 ? 2 : e < 1200 ? 3 : 4
  12347. }
  12348. function R() {
  12349. d.empty();
  12350. for (var e = 0; e < m; e++) d.append('<div class="fr-list-column"></div>')
  12351. }
  12352. function L() {
  12353. if (h < p.length && (d.outerHeight() <= o.outerHeight() + s.opts.imageManagerScrollOffset || o.scrollTop() + s.opts.imageManagerScrollOffset > d.outerHeight() - o.outerHeight())) {
  12354. u++;
  12355. for (var e = s.opts.imageManagerPageSize * (u - 1); e < Math.min(p.length, s.opts.imageManagerPageSize * u); e++) t(p[e])
  12356. }
  12357. }
  12358. function t(a) {
  12359. var o = new Image,
  12360. i = v(document.createElement("div")).attr("class", "fr-image-container fr-empty fr-image-" + g++).attr("data-loading", s.language.translate("Loading") + "..").attr("data-deleting", s.language.translate("Deleting") + "..");
  12361. N(!1), o.onload = function() {
  12362. i.height(Math.floor(i.width() / o.width * o.height));
  12363. var n = v(document.createElement("img"));
  12364. if (a.thumb) n.attr("src", a.thumb);
  12365. else {
  12366. if (M(C, a), !a.url) return M(S, a), !1;
  12367. n.attr("src", a.url)
  12368. } if (a.url && n.attr("data-url", a.url), a.tag)
  12369. if (c.find(".fr-modal-more.fr-not-available").removeClass("fr-not-available"), c.find(".fr-modal-tags").show(), 0 <= a.tag.indexOf(",")) {
  12370. for (var e = a.tag.split(","), t = 0; t < e.length; t++) e[t] = e[t].trim(), 0 === f.find('a[title="' + e[t] + '"]').length && f.append('<a role="button" title="' + e[t] + '">' + e[t] + "</a>");
  12371. n.attr("data-tag", e.join())
  12372. } else 0 === f.find('a[title="' + a.tag.trim() + '"]').length && f.append('<a role="button" title="' + a.tag.trim() + '">' + a.tag.trim() + "</a>"), n.attr("data-tag", a.tag.trim());
  12373. for (var r in a.name && n.attr("alt", a.name), a) a.hasOwnProperty(r) && "thumb" !== r && "url" !== r && "tag" !== r && n.attr("data-" + r, a[r]);
  12374. i.append(n).append(v(s.icon.create("imageManagerDelete")).addClass("fr-delete-img").attr("title", s.language.translate("Delete"))).append(v(s.icon.create("imageManagerInsert")).addClass("fr-insert-img").attr("title", s.language.translate("Insert"))), f.find(".fr-selected-tag").each(function(e, t) {
  12375. $(n, t.text) || i.hide()
  12376. }), n.on("load", function() {
  12377. i.removeClass("fr-empty"), i.height("auto"), h++, O(_(parseInt(n.parent().attr("class").match(/fr-image-(\d+)/)[1], 10) + 1)), N(!1), h % s.opts.imageManagerPageSize == 0 && L()
  12378. }), s.events.trigger("imageManager.imageLoaded", [n])
  12379. }, o.onerror = function() {
  12380. h++, i.remove(), O(_(parseInt(i.attr("class").match(/fr-image-(\d+)/)[1], 10) + 1)), M(e, a), h % s.opts.imageManagerPageSize == 0 && L()
  12381. }, o.src = a.thumb || a.url, w().append(i)
  12382. }
  12383. function w() {
  12384. var r, a;
  12385. return d.find(".fr-list-column").each(function(e, t) {
  12386. var n = v(t);
  12387. 0 === e ? (a = n.outerHeight(), r = n) : n.outerHeight() < a && (a = n.outerHeight(), r = n)
  12388. }), r
  12389. }
  12390. function _(e) {
  12391. e === undefined && (e = 0);
  12392. for (var t = [], n = g - 1; e <= n; n--) {
  12393. var r = d.find(".fr-image-" + n);
  12394. r.length && (t.push(r), v(document.createElement("div")).attr("id", "fr-image-hidden-container").append(r), d.find(".fr-image-" + n).remove())
  12395. }
  12396. return t
  12397. }
  12398. function O(e) {
  12399. for (var t = e.length - 1; 0 <= t; t--) w().append(e[t])
  12400. }
  12401. function N(e) {
  12402. if (e === undefined && (e = !0), !l.isVisible()) return !0;
  12403. var t = y();
  12404. if (t !== m) {
  12405. m = t;
  12406. var n = _();
  12407. R(), O(n)
  12408. }
  12409. s.modals.resize(b), e && L()
  12410. }
  12411. function x(e) {
  12412. var t = {},
  12413. n = e.data();
  12414. for (var r in n) n.hasOwnProperty(r) && "url" !== r && "tag" !== r && (t[r] = n[r]);
  12415. return t
  12416. }
  12417. function I(e) {
  12418. var t = v(e.currentTarget).siblings("img"),
  12419. n = l.data("instance") || s,
  12420. r = l.data("current-image");
  12421. if (s.modals.hide(b), n.image.showProgressBar(), r) r.data("fr-old-src", r.attr("src")), r.trigger("click");
  12422. else {
  12423. n.events.focus(!0), n.selection.restore();
  12424. var a = n.position.getBoundingRect(),
  12425. o = a.left + a.width / 2 + v(s.doc).scrollLeft(),
  12426. i = a.top + a.height + v(s.doc).scrollTop();
  12427. n.popups.setContainer("image.insert", s.$sc), n.popups.show("image.insert", o, i)
  12428. }
  12429. n.image.insert(t.data("url"), !1, x(t), r)
  12430. }
  12431. function k(e) {
  12432. var o = v(e.currentTarget).siblings("img"),
  12433. t = s.language.translate("Are you sure? Image will be deleted.");
  12434. confirm(t) && (s.opts.imageManagerDeleteURL ? !1 !== s.events.trigger("imageManager.beforeDeleteImage", [o]) && (o.parent().addClass("fr-image-deleting"), v(this).ajax({
  12435. method: s.opts.imageManagerDeleteMethod,
  12436. url: s.opts.imageManagerDeleteURL,
  12437. data: Object.assign(Object.assign({
  12438. src: o.attr("src")
  12439. }, x(o)), s.opts.imageManagerDeleteParams),
  12440. crossDomain: s.opts.requestWithCORS,
  12441. withCredentials: s.opts.requestWithCredentials,
  12442. headers: s.opts.requestHeaders,
  12443. done: function(e, t, n) {
  12444. s.events.trigger("imageManager.imageDeleted", [e]);
  12445. var r = _(parseInt(o.parent().attr("class").match(/fr-image-(\d+)/)[1], 10) + 1);
  12446. o.parent().remove(), O(r),
  12447. function a() {
  12448. l.find("#fr-modal-tags > a").each(function() {
  12449. 0 === l.find('#fr-image-list [data-tag*="' + v(this).text() + '"]').length && v(this).removeClass("fr-selected-tag").hide()
  12450. }), B()
  12451. }(), N(!0)
  12452. },
  12453. fail: function(e) {
  12454. M(n, e.response || e.responseText)
  12455. }
  12456. })) : M(r))
  12457. }
  12458. function M(e, t) {
  12459. 10 <= e && e < 20 ? i.hide() : 20 <= e && e < 30 && v(".fr-image-deleting").removeClass("fr-image-deleting"), s.events.trigger("imageManager.error", [{
  12460. code: e,
  12461. message: a[e]
  12462. },
  12463. t
  12464. ])
  12465. }
  12466. function D() {
  12467. var e = c.find(".fr-modal-head-line").outerHeight(),
  12468. t = f.outerHeight();
  12469. c.toggleClass("fr-show-tags"), c.hasClass("fr-show-tags") ? (c.css("height", e + t), o.css("marginTop", e + t), f.find("a").css("opacity", 1)) : (c.css("height", e), o.css("marginTop", e), f.find("a").css("opacity", 0))
  12470. }
  12471. function B() {
  12472. var e = f.find(".fr-selected-tag");
  12473. 0 < e.length ? (d.find("img").parents().show(), e.each(function(e, r) {
  12474. d.find("img").each(function(e, t) {
  12475. var n = v(t);
  12476. $(n, r.text) || n.parent().hide()
  12477. })
  12478. })) : d.find("img").parents().show(), O(_()), L()
  12479. }
  12480. function F(e) {
  12481. e.preventDefault();
  12482. var t = v(e.currentTarget);
  12483. t.toggleClass("fr-selected-tag"), s.opts.imageManagerToggleTags && t.siblings("a").removeClass("fr-selected-tag"), B()
  12484. }
  12485. function $(e, t) {
  12486. for (var n = (e.attr("data-tag") || "").split(","), r = 0; r < n.length; r++)
  12487. if (n[r] === t) return !0;
  12488. return !1
  12489. }
  12490. return a[e] = "Image cannot be loaded from the passed link.", a[E] = "Error during load images request.", a[T] = "Missing imageManagerLoadURL option.", a[A] = "Parsing load response failed.", a[C] = "Missing image thumb.", a[S] = "Missing image URL.", a[n] = "Error during delete image request.", a[r] = "Missing imageManagerDeleteURL option.", {
  12491. require: ["image"],
  12492. _init: function P() {
  12493. if (!s.$wp && "IMG" !== s.el.tagName) return !1
  12494. },
  12495. show: function H() {
  12496. if (!l) {
  12497. var e, t = '<button class="fr-command fr-btn fr-modal-more fr-not-available" id="fr-modal-more-'.concat(s.sid, '"><svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24""><path d="').concat($e.SVG.tags, '"/></svg></button><h4 data-text="true">').concat(s.language.translate("Manage Images"), '</h4></div>\n <div class="fr-modal-tags" id="fr-modal-tags">');
  12498. e = s.opts.imageManagerPreloader ? '<img class="fr-preloader" id="fr-preloader" alt="' + s.language.translate("Loading") + '.." src="' + s.opts.imageManagerPreloader + '" style="display: none;">' : '<span class="fr-preloader" id="fr-preloader" style="display: none;">' + s.language.translate("Loading") + "</span>", e += '<div class="fr-image-list" id="fr-image-list"></div>';
  12499. var n = s.modals.create(b, t, e);
  12500. l = n.$modal, c = n.$head, o = n.$body
  12501. }
  12502. l.data("current-image", s.image.get()), s.modals.show(b), i || function r() {
  12503. i = l.find("#fr-preloader"), d = l.find("#fr-image-list"), f = l.find("#fr-modal-tags"), m = y(), R(), c.css("height", c.find(".fr-modal-head-line").outerHeight()), s.events.$on(v(s.o_win), "resize", function() {
  12504. N(!!p)
  12505. }), s.events.bindClick(d, ".fr-insert-img", I), s.events.bindClick(d, ".fr-delete-img", k), s.helpers.isMobile() && (s.events.bindClick(d, "div.fr-image-container", function(e) {
  12506. l.find(".fr-mobile-selected").removeClass("fr-mobile-selected"), v(e.currentTarget).addClass("fr-mobile-selected")
  12507. }), l.on(s._mousedown, function() {
  12508. l.find(".fr-mobile-selected").removeClass("fr-mobile-selected")
  12509. })), l.on(s._mousedown + " " + s._mouseup, function(e) {
  12510. e.stopPropagation()
  12511. }), l.on(s._mousedown, "*", function() {
  12512. s.events.disableBlur()
  12513. }), o.on("scroll", L), s.events.bindClick(l, "button#fr-modal-more-" + s.sid, D), s.events.bindClick(f, "a", F)
  12514. }(),
  12515. function a() {
  12516. i.show(), d.find(".fr-list-column").empty(), s.opts.imageManagerLoadURL ? v(this).ajax({
  12517. url: s.opts.imageManagerLoadURL,
  12518. method: s.opts.imageManagerLoadMethod,
  12519. data: s.opts.imageManagerLoadParams,
  12520. dataType: "json",
  12521. crossDomain: s.opts.requestWithCORS,
  12522. withCredentials: s.opts.requestWithCredentials,
  12523. headers: s.opts.requestHeaders,
  12524. done: function(e, t, n) {
  12525. s.events.trigger("imageManager.imagesLoaded", [e]),
  12526. function r(e, t) {
  12527. try {
  12528. d.find(".fr-list-column").empty(), g = h = u = 0, p = e, L()
  12529. } catch (n) {
  12530. M(A, t)
  12531. }
  12532. }(e, n.response), i.hide()
  12533. },
  12534. fail: function(e) {
  12535. M(E, e.response || e.responseText)
  12536. }
  12537. }) : M(T)
  12538. }()
  12539. },
  12540. hide: function K() {
  12541. s.modals.hide(b)
  12542. }
  12543. }
  12544. }, !$e.PLUGINS.image) throw new Error("Image manager plugin requires image plugin.");
  12545. return $e.DEFAULTS.imageInsertButtons.push("imageManager"), $e.RegisterCommand("imageManager", {
  12546. title: "Browse",
  12547. undo: !1,
  12548. focus: !1,
  12549. modal: !0,
  12550. callback: function() {
  12551. this.imageManager.show()
  12552. },
  12553. plugin: "imageManager"
  12554. }), $e.DefineIcon("imageManager", {
  12555. NAME: "folder",
  12556. SVG_KEY: "imageManager"
  12557. }), $e.DefineIcon("imageManagerInsert", {
  12558. NAME: "plus",
  12559. SVG_KEY: "add"
  12560. }), $e.DefineIcon("imageManagerDelete", {
  12561. NAME: "trash",
  12562. SVG_KEY: "remove"
  12563. }), Object.assign($e.DEFAULTS, {
  12564. inlineClasses: {
  12565. "fr-class-code": "Code",
  12566. "fr-class-highlighted": "Highlighted",
  12567. "fr-class-transparency": "Transparent"
  12568. }
  12569. }), $e.PLUGINS.inlineClass = function(n) {
  12570. var r = n.$;
  12571. return {
  12572. apply: function t(e) {
  12573. n.format.toggle("span", {
  12574. "class": e
  12575. })
  12576. },
  12577. refreshOnShow: function a(e, t) {
  12578. t.find(".fr-command").each(function() {
  12579. var e = r(this).data("param1"),
  12580. t = n.format.is("span", {
  12581. "class": e
  12582. });
  12583. r(this).toggleClass("fr-active", t).attr("aria-selected", t)
  12584. })
  12585. }
  12586. }
  12587. }, $e.RegisterCommand("inlineClass", {
  12588. type: "dropdown",
  12589. title: "Inline Class",
  12590. html: function() {
  12591. var e = '<ul class="fr-dropdown-list" role="presentation">',
  12592. t = this.opts.inlineClasses;
  12593. for (var n in t) t.hasOwnProperty(n) && (e += '<li role="presentation"><a class="fr-command" tabIndex="-1" role="option" data-cmd="inlineClass" data-param1="' + n + '" title="' + t[n] + '">' + t[n] + "</a></li>");
  12594. return e += "</ul>"
  12595. },
  12596. callback: function(e, t) {
  12597. this.inlineClass.apply(t)
  12598. },
  12599. refreshOnShow: function(e, t) {
  12600. this.inlineClass.refreshOnShow(e, t)
  12601. },
  12602. plugin: "inlineClass"
  12603. }), $e.DefineIcon("inlineClass", {
  12604. NAME: "tag",
  12605. SVG_KEY: "inlineClass"
  12606. }), Object.assign($e.DEFAULTS, {
  12607. inlineStyles: {
  12608. "Big Red": "font-size: 20px; color: red;",
  12609. "Small Blue": "font-size: 14px; color: blue;"
  12610. }
  12611. }), $e.PLUGINS.inlineStyle = function(a) {
  12612. return {
  12613. apply: function o(e) {
  12614. if ("" !== a.selection.text())
  12615. for (var t = e.split(";"), n = 0; n < t.length; n++) {
  12616. var r = t[n].split(":");
  12617. t[n].length && 2 == r.length && a.format.applyStyle(r[0].trim(), r[1].trim())
  12618. } else a.html.insert('<span style="' + e + '">' + $e.INVISIBLE_SPACE + $e.MARKERS + "</span>")
  12619. }
  12620. }
  12621. }, $e.RegisterCommand("inlineStyle", {
  12622. type: "dropdown",
  12623. html: function() {
  12624. var e = '<ul class="fr-dropdown-list" role="presentation">',
  12625. t = this.opts.inlineStyles;
  12626. for (var n in t) {
  12627. if (t.hasOwnProperty(n)) e += '<li role="presentation"><span style="' + (t[n] + (-1 === t[n].indexOf("display:block;") ? " display:block;" : "")) + '" role="presentation"><a class="fr-command" tabIndex="-1" role="option" data-cmd="inlineStyle" data-param1="' + t[n] + '" title="' + this.language.translate(n) + '">' + this.language.translate(n) + "</a></span></li>"
  12628. }
  12629. return e += "</ul>"
  12630. },
  12631. title: "Inline Style",
  12632. callback: function(e, t) {
  12633. this.inlineStyle.apply(t)
  12634. },
  12635. plugin: "inlineStyle"
  12636. }), $e.DefineIcon("inlineStyle", {
  12637. NAME: "paint-brush",
  12638. SVG_KEY: "inlineStyle"
  12639. }), Object.assign($e.DEFAULTS, {
  12640. lineBreakerTags: ["table", "hr", "form", "dl", "span.fr-video", ".fr-embedly", "img"],
  12641. lineBreakerOffset: 15,
  12642. lineBreakerHorizontalOffset: 10
  12643. }), $e.PLUGINS.lineBreaker = function(h) {
  12644. var g, t, a, m = h.$;
  12645. function l(e, t) {
  12646. var n, r, a, o, i, s, l, c;
  12647. if (null == e) i = (o = t.parent()).offset().top, n = (l = t.offset().top) - Math.min((l - i) / 2, h.opts.lineBreakerOffset), a = o.outerWidth(), r = o.offset().left;
  12648. else if (null == t)(s = (o = e.parent()).offset().top + o.outerHeight()) < (c = e.offset().top + e.outerHeight()) && (s = (o = m(o).parent()).offset().top + o.outerHeight()), n = c + Math.min(Math.abs(s - c) / 2, h.opts.lineBreakerOffset), a = o.outerWidth(), r = o.offset().left;
  12649. else {
  12650. o = e.parent();
  12651. var d = e.offset().top + e.height(),
  12652. f = t.offset().top;
  12653. if (f < d) return !1;
  12654. n = (d + f) / 2, a = o.outerWidth(), r = o.offset().left
  12655. } if (h.opts.iframe) {
  12656. var p = h.helpers.getPX(h.$wp.find(".fr-iframe").css("padding-top")),
  12657. u = h.helpers.getPX(h.$wp.find(".fr-iframe").css("padding-left"));
  12658. r += h.$iframe.offset().left - h.helpers.scrollLeft() + u, n += h.$iframe.offset().top - h.helpers.scrollTop() + p
  12659. }
  12660. h.$box.append(g), g.css("top", n - h.win.pageYOffset), g.css("left", r - h.win.pageXOffset), g.css("width", a), g.data("tag1", e), g.data("tag2", t), g.addClass("fr-visible").data("instance", h)
  12661. }
  12662. function c(e) {
  12663. if (e) {
  12664. var t = m(e);
  12665. if (0 === h.$el.find(t).length) return null;
  12666. if (e.nodeType != Node.TEXT_NODE && t.is(h.opts.lineBreakerTags.join(","))) return t;
  12667. if (0 < t.parents(h.opts.lineBreakerTags.join(",")).length) return e = t.parents(h.opts.lineBreakerTags.join(",")).get(0), 0 !== h.$el.find(m(e)).length && m(e).is(h.opts.lineBreakerTags.join(",")) ? m(e) : null
  12668. }
  12669. return null
  12670. }
  12671. function o(e, t) {
  12672. var n = h.doc.elementFromPoint(e, t);
  12673. return n && !m(n).closest(".fr-line-breaker").length && !h.node.isElement(n) && n != h.$wp.get(0) && function r(e) {
  12674. if ("undefined" != typeof e.inFroalaWrapper) return e.inFroalaWrapper;
  12675. for (var t = e; e.parentNode && e.parentNode !== h.$wp.get(0);) e = e.parentNode;
  12676. return t.inFroalaWrapper = e.parentNode == h.$wp.get(0), t.inFroalaWrapper
  12677. }(n) ? n : null
  12678. }
  12679. function i(e, t, n) {
  12680. for (var r = n, a = null; r <= h.opts.lineBreakerOffset && !a;)(a = o(e, t - r)) || (a = o(e, t + r)), r += n;
  12681. return a
  12682. }
  12683. function d(e, t, n) {
  12684. for (var r = null, a = 100; !r && e > h.$box.offset().left && e < h.$box.offset().left + h.$box.outerWidth() && 0 < a;)(r = o(e, t)) || (r = i(e, t, 5)), "left" == n ? e -= h.opts.lineBreakerHorizontalOffset : e += h.opts.lineBreakerHorizontalOffset, a -= h.opts.lineBreakerHorizontalOffset;
  12685. return r
  12686. }
  12687. function n(e) {
  12688. var t = a = null,
  12689. n = null,
  12690. r = h.doc.elementFromPoint(e.pageX - h.win.pageXOffset, e.pageY - h.win.pageYOffset);
  12691. (t = r && ("HTML" == r.tagName || "BODY" == r.tagName || h.node.isElement(r) || 0 <= (r.getAttribute("class") || "").indexOf("fr-line-breaker")) ? ((n = i(e.pageX - h.win.pageXOffset, e.pageY - h.win.pageYOffset, 1)) || (n = d(e.pageX - h.win.pageXOffset - h.opts.lineBreakerHorizontalOffset, e.pageY - h.win.pageYOffset, "left")), n || (n = d(e.pageX - h.win.pageXOffset + h.opts.lineBreakerHorizontalOffset, e.pageY - h.win.pageYOffset, "right")), c(n)) : c(r)) ? function s(e, t) {
  12692. var n, r, a = e.offset().top,
  12693. o = e.offset().top + e.outerHeight();
  12694. if (Math.abs(o - t) <= h.opts.lineBreakerOffset || Math.abs(t - a) <= h.opts.lineBreakerOffset)
  12695. if (Math.abs(o - t) < Math.abs(t - a)) {
  12696. for (var i = (r = e.get(0)).nextSibling; i && i.nodeType == Node.TEXT_NODE && 0 === i.textContent.length;) i = i.nextSibling;
  12697. if (!i) return l(e, null), !0;
  12698. if (n = c(i)) return l(e, n), !0
  12699. } else {
  12700. if (!(r = e.get(0)).previousSibling) return l(null, e), !0;
  12701. if (n = c(r.previousSibling)) return l(n, e), !0
  12702. }
  12703. g.removeClass("fr-visible").removeData("instance")
  12704. }(t, e.pageY): h.core.sameInstance(g) && g.removeClass("fr-visible").removeData("instance")
  12705. }
  12706. function r(e) {
  12707. return !(g.hasClass("fr-visible") && !h.core.sameInstance(g)) && (h.popups.areVisible() || h.el.querySelector(".fr-selected-cell") ? (g.removeClass("fr-visible"), !0) : void(!1 !== t || h.edit.isDisabled() || (a && clearTimeout(a), a = setTimeout(n, 30, e))))
  12708. }
  12709. function s() {
  12710. a && clearTimeout(a), g && g.hasClass("fr-visible") && g.removeClass("fr-visible").removeData("instance")
  12711. }
  12712. function f() {
  12713. t = !0, s()
  12714. }
  12715. function p() {
  12716. t = !1
  12717. }
  12718. function u(e) {
  12719. e.preventDefault();
  12720. var t = g.data("instance") || h;
  12721. g.removeClass("fr-visible").removeData("instance");
  12722. var n = g.data("tag1"),
  12723. r = g.data("tag2"),
  12724. a = h.html.defaultTag();
  12725. null == n ? a && "TD" != r.parent().get(0).tagName && 0 === r.parents(a).length ? r.before("<" + a + ">" + $e.MARKERS + "<br></" + a + ">") : r.before($e.MARKERS + "<br>") : a && "TD" != n.parent().get(0).tagName && 0 === n.parents(a).length ? n.after("<" + a + ">" + $e.MARKERS + "<br></" + a + ">") : n.after($e.MARKERS + "<br>"), t.selection.restore(), h.toolbar.enable()
  12726. }
  12727. return {
  12728. _init: function v() {
  12729. if (!h.$wp) return !1;
  12730. ! function e() {
  12731. h.shared.$line_breaker || (h.shared.$line_breaker = m(document.createElement("div")).attr("class", "fr-line-breaker").html('<a class="fr-floating-btn" role="button" tabIndex="-1" title="' + h.language.translate("Break") + '"><svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><rect x="17" y="7" width="2" height="8"/><rect x="10" y="13" width="7" height="2"/><path d="M10.000,10.000 L10.000,18.013 L5.000,14.031 L10.000,10.000 Z"/></svg></a>')), g = h.shared.$line_breaker, h.events.on("shared.destroy", function() {
  12732. g.html("").removeData().remove(), g = null
  12733. }, !0), h.events.on("destroy", function() {
  12734. g.removeData("instance").removeClass("fr-visible"), m("body").first().append(g), clearTimeout(a)
  12735. }, !0), h.events.$on(g, "mousemove", function(e) {
  12736. e.stopPropagation()
  12737. }, !0), h.events.bindClick(g, "a", u)
  12738. }(), t = !1, h.events.$on(h.$win, "mousemove", r), h.events.$on(m(h.win), "scroll", s), h.events.on("popups.show.table.edit", s), h.events.on("commands.after", s), h.events.$on(m(h.win), "mousedown", f), h.events.$on(m(h.win), "mouseup", p)
  12739. }
  12740. }
  12741. }, Object.assign($e.DEFAULTS, {
  12742. lineHeights: {
  12743. Default: "",
  12744. Single: "1",
  12745. 1.15: "1.15",
  12746. 1.5: "1.5",
  12747. Double: "2"
  12748. }
  12749. }), $e.PLUGINS.lineHeight = function(a) {
  12750. var o = a.$;
  12751. return {
  12752. _init: function e() {},
  12753. apply: function r(e) {
  12754. a.selection.save(), a.html.wrap(!0, !0, !0, !0), a.selection.restore();
  12755. var t = a.selection.blocks();
  12756. t.length && o(t[0]).parent().is("td") && a.format.applyStyle("line-height", e.toString()), a.selection.save();
  12757. for (var n = 0; n < t.length; n++) o(t[n]).css("line-height", e), "" === o(t[n]).attr("style") && o(t[n]).removeAttr("style");
  12758. a.html.unwrap(), a.selection.restore()
  12759. },
  12760. refreshOnShow: function i(e, t) {
  12761. var n = a.selection.blocks();
  12762. if (n.length) {
  12763. var r = o(n[0]);
  12764. t.find(".fr-command").each(function() {
  12765. var e = o(this).data("param1"),
  12766. t = 0 <= (r.attr("style") || "").indexOf("line-height: " + e + ";");
  12767. o(this).toggleClass("fr-active", t).attr("aria-selected", t)
  12768. })
  12769. }
  12770. }
  12771. }
  12772. }, $e.RegisterCommand("lineHeight", {
  12773. type: "dropdown",
  12774. html: function() {
  12775. var e = '<ul class="fr-dropdown-list" role="presentation">',
  12776. t = this.opts.lineHeights;
  12777. for (var n in t) t.hasOwnProperty(n) && (e += '<li role="presentation"><a class="fr-command ' + n + '" tabIndex="-1" role="option" data-cmd="lineHeight" data-param1="' + t[n] + '" title="' + this.language.translate(n) + '">' + this.language.translate(n) + "</a></li>");
  12778. return e += "</ul>"
  12779. },
  12780. title: "Line Height",
  12781. callback: function(e, t) {
  12782. this.lineHeight.apply(t)
  12783. },
  12784. refreshOnShow: function(e, t) {
  12785. this.lineHeight.refreshOnShow(e, t)
  12786. },
  12787. plugin: "lineHeight"
  12788. }), $e.DefineIcon("lineHeight", {
  12789. NAME: "arrows-v",
  12790. FA5NAME: "arrows-alt-v",
  12791. SVG_KEY: "lineHeight"
  12792. }), Object.assign($e.POPUP_TEMPLATES, {
  12793. "link.edit": "[_BUTTONS_]",
  12794. "link.insert": "[_BUTTONS_][_INPUT_LAYER_]"
  12795. }), Object.assign($e.DEFAULTS, {
  12796. linkEditButtons: ["linkOpen", "linkStyle", "linkEdit", "linkRemove"],
  12797. linkInsertButtons: ["linkBack", "|", "linkList"],
  12798. linkAttributes: {},
  12799. linkAutoPrefix: "http://",
  12800. linkStyles: {
  12801. "fr-green": "Green",
  12802. "fr-strong": "Thick"
  12803. },
  12804. linkMultipleStyles: !0,
  12805. linkConvertEmailAddress: !0,
  12806. linkAlwaysBlank: !1,
  12807. linkAlwaysNoFollow: !1,
  12808. linkNoOpener: !0,
  12809. linkNoReferrer: !0,
  12810. linkList: [{
  12811. text: "Froala",
  12812. href: "https://froala.com",
  12813. target: "_blank"
  12814. }, {
  12815. text: "Google",
  12816. href: "https://google.com",
  12817. target: "_blank"
  12818. }, {
  12819. displayText: "Facebook",
  12820. href: "https://facebook.com"
  12821. }],
  12822. linkText: !0
  12823. }), $e.PLUGINS.link = function(p) {
  12824. var u = p.$;
  12825. function h() {
  12826. var e = p.image ? p.image.get() : null;
  12827. if (e || !p.$wp) return "A" == p.el.tagName ? p.el : e && e.get(0).parentNode && "A" == e.get(0).parentNode.tagName ? e.get(0).parentNode : void 0;
  12828. var t = p.selection.ranges(0).commonAncestorContainer;
  12829. try {
  12830. t && (t.contains && t.contains(p.el) || !p.el.contains(t) || p.el == t) && (t = null)
  12831. } catch (a) {
  12832. t = null
  12833. }
  12834. if (t && "A" === t.tagName) return t;
  12835. var n = p.selection.element(),
  12836. r = p.selection.endElement();
  12837. "A" == n.tagName || p.node.isElement(n) || (n = u(n).parentsUntil(p.$el, "a").first().get(0)), "A" == r.tagName || p.node.isElement(r) || (r = u(r).parentsUntil(p.$el, "a").first().get(0));
  12838. try {
  12839. r && (r.contains && r.contains(p.el) || !p.el.contains(r) || p.el == r) && (r = null)
  12840. } catch (a) {
  12841. r = null
  12842. }
  12843. try {
  12844. n && (n.contains && n.contains(p.el) || !p.el.contains(n) || p.el == n) && (n = null)
  12845. } catch (a) {
  12846. n = null
  12847. }
  12848. return r && r == n && "A" == r.tagName ? (p.browser.msie || p.helpers.isMobile()) && (p.selection.info(n).atEnd || p.selection.info(n).atStart) ? null : n : null
  12849. }
  12850. function g() {
  12851. var e, t, n, r, a = p.image ? p.image.get() : null,
  12852. o = [];
  12853. if (a) "A" == a.get(0).parentNode.tagName && o.push(a.get(0).parentNode);
  12854. else if (p.win.getSelection) {
  12855. var i = p.win.getSelection();
  12856. if (i.getRangeAt && i.rangeCount) {
  12857. r = p.doc.createRange();
  12858. for (var s = 0; s < i.rangeCount; ++s)
  12859. if ((t = (e = i.getRangeAt(s)).commonAncestorContainer) && 1 != t.nodeType && (t = t.parentNode), t && "a" == t.nodeName.toLowerCase()) o.push(t);
  12860. else {
  12861. n = t.getElementsByTagName("a");
  12862. for (var l = 0; l < n.length; ++l) r.selectNodeContents(n[l]), r.compareBoundaryPoints(e.END_TO_START, e) < 1 && -1 < r.compareBoundaryPoints(e.START_TO_END, e) && o.push(n[l])
  12863. }
  12864. }
  12865. } else if (p.doc.selection && "Control" != p.doc.selection.type)
  12866. if ("a" == (t = (e = p.doc.selection.createRange()).parentElement()).nodeName.toLowerCase()) o.push(t);
  12867. else {
  12868. n = t.getElementsByTagName("a"), r = p.doc.body.createTextRange();
  12869. for (var c = 0; c < n.length; ++c) r.moveToElementText(n[c]), -1 < r.compareEndPoints("StartToEnd", e) && r.compareEndPoints("EndToStart", e) < 1 && o.push(n[c])
  12870. }
  12871. return o
  12872. }
  12873. function m(a) {
  12874. if (p.core.hasFocus()) {
  12875. if (o(), a && "keyup" === a.type && (a.altKey || a.which == $e.KEYCODE.ALT)) return !0;
  12876. setTimeout(function() {
  12877. if (!a || a && (1 == a.which || "mouseup" != a.type)) {
  12878. var e = h(),
  12879. t = p.image ? p.image.get() : null;
  12880. if (e && !t) {
  12881. if (p.image) {
  12882. var n = p.node.contents(e);
  12883. if (1 == n.length && "IMG" == n[0].tagName) {
  12884. var r = p.selection.ranges(0);
  12885. return 0 === r.startOffset && 0 === r.endOffset ? u(e).before($e.MARKERS) : u(e).after($e.MARKERS), p.selection.restore(), !1
  12886. }
  12887. }
  12888. a && a.stopPropagation(), i(e)
  12889. }
  12890. }
  12891. }, p.helpers.isIOS() ? 100 : 0)
  12892. }
  12893. }
  12894. function i(e) {
  12895. var t = p.popups.get("link.edit");
  12896. t || (t = function o() {
  12897. var e = "";
  12898. 1 <= p.opts.linkEditButtons.length && ("A" == p.el.tagName && 0 <= p.opts.linkEditButtons.indexOf("linkRemove") && p.opts.linkEditButtons.splice(p.opts.linkEditButtons.indexOf("linkRemove"), 1), e = '<div class="fr-buttons">'.concat(p.button.buildList(p.opts.linkEditButtons), "</div>"));
  12899. var t = {
  12900. buttons: e
  12901. },
  12902. n = p.popups.create("link.edit", t);
  12903. p.$wp && p.events.$on(p.$wp, "scroll.link-edit", function() {
  12904. h() && p.popups.isVisible("link.edit") && i(h())
  12905. });
  12906. return n
  12907. }());
  12908. var n = u(e);
  12909. p.popups.isVisible("link.edit") || p.popups.refresh("link.edit"), p.popups.setContainer("link.edit", p.$sc);
  12910. var r = n.offset().left + n.outerWidth() / 2,
  12911. a = n.offset().top + n.outerHeight();
  12912. p.popups.show("link.edit", r, a, n.outerHeight(), !0)
  12913. }
  12914. function o() {
  12915. p.popups.hide("link.edit")
  12916. }
  12917. function l() {
  12918. var e = p.popups.get("link.insert"),
  12919. t = h();
  12920. if (t) {
  12921. var n, r, a = u(t),
  12922. o = e.find('input.fr-link-attr[type="text"]'),
  12923. i = e.find('input.fr-link-attr[type="checkbox"]');
  12924. for (n = 0; n < o.length; n++)(r = u(o[n])).val(a.attr(r.attr("name") || ""));
  12925. for (i.attr("checked", !1), n = 0; n < i.length; n++) r = u(i[n]), a.attr(r.attr("name")) == r.data("checked") && r.attr("checked", !0);
  12926. e.find('input.fr-link-attr[type="text"][name="text"]').val(a.text())
  12927. } else e.find('input.fr-link-attr[type="text"]').val(""), e.find('input.fr-link-attr[type="checkbox"]').attr("checked", !1), e.find('input.fr-link-attr[type="text"][name="text"]').val(p.selection.text());
  12928. e.find("input.fr-link-attr").trigger("change"), (p.image ? p.image.get() : null) ? e.find('.fr-link-attr[name="text"]').parent().hide() : e.find('.fr-link-attr[name="text"]').parent().show()
  12929. }
  12930. function s(e) {
  12931. if (e) return p.popups.onRefresh("link.insert", l), !0;
  12932. var t = "";
  12933. 1 <= p.opts.linkInsertButtons.length && (t = '<div class="fr-buttons fr-tabs">' + p.button.buildList(p.opts.linkInsertButtons) + "</div>");
  12934. var n = "",
  12935. r = 0;
  12936. for (var a in n = '<div class="fr-link-insert-layer fr-layer fr-active" id="fr-link-insert-layer-' + p.id + '">', n += '<div class="fr-input-line"><input id="fr-link-insert-layer-url-' + p.id + '" name="href" type="text" class="fr-link-attr" placeholder="' + p.language.translate("URL") + '" tabIndex="' + ++r + '"></div>', p.opts.linkText && (n += '<div class="fr-input-line"><input id="fr-link-insert-layer-text-' + p.id + '" name="text" type="text" class="fr-link-attr" placeholder="' + p.language.translate("Text") + '" tabIndex="' + ++r + '"></div>'), p.opts.linkAttributes)
  12937. if (p.opts.linkAttributes.hasOwnProperty(a)) {
  12938. var o = p.opts.linkAttributes[a];
  12939. n += '<div class="fr-input-line"><input name="' + a + '" type="text" class="fr-link-attr" placeholder="' + p.language.translate(o) + '" tabIndex="' + ++r + '"></div>'
  12940. }
  12941. p.opts.linkAlwaysBlank || (n += '<div class="fr-checkbox-line"><span class="fr-checkbox"><input name="target" class="fr-link-attr" data-checked="_blank" type="checkbox" id="fr-link-target-'.concat(p.id, '" tabIndex="').concat(++r, '"><span>').concat('<svg version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" width="10" height="10" viewBox="0 0 32 32"><path d="M27 4l-15 15-7-7-5 5 12 12 20-20z" fill="#FFF"></path></svg>', '</span></span><label id="fr-label-target-').concat(p.id, '">').concat(p.language.translate("Open in new tab"), "</label></div>"));
  12942. var i = {
  12943. buttons: t,
  12944. input_layer: n += '<div class="fr-action-buttons"><button class="fr-command fr-submit" role="button" data-cmd="linkInsert" href="#" tabIndex="' + ++r + '" type="button">' + p.language.translate("Insert") + "</button></div></div>"
  12945. },
  12946. s = p.popups.create("link.insert", i);
  12947. return p.$wp && p.events.$on(p.$wp, "scroll.link-insert", function() {
  12948. (p.image ? p.image.get() : null) && p.popups.isVisible("link.insert") && f(), p.popups.isVisible("link.insert") && d()
  12949. }), s
  12950. }
  12951. function c(e, t, n) {
  12952. if (void 0 === n && (n = {}), !1 === p.events.trigger("link.beforeInsert", [e, t, n])) return !1;
  12953. var r = p.image ? p.image.get() : null;
  12954. r || "A" == p.el.tagName ? "A" == p.el.tagName && p.$el.focus() : (p.selection.restore(), p.popups.hide("link.insert"));
  12955. var a = e;
  12956. p.opts.linkConvertEmailAddress && p.helpers.isEmail(e) && !/^mailto:.*/i.test(e) && (e = "mailto:" + e);
  12957. if ("" === p.opts.linkAutoPrefix || new RegExp("^(" + $e.LinkProtocols.join("|") + "):.", "i").test(e) || /^data:image.*/i.test(e) || /^(https?:|ftps?:|file:|)\/\//i.test(e) || /^([A-Za-z]:(\\){1,2}|[A-Za-z]:((\\){1,2}[^\\]+)+)(\\)?$/i.test(e) || ["/", "{", "[", "#", "(", "."].indexOf((e || "")[0]) < 0 && (e = p.opts.linkAutoPrefix + p.helpers.sanitizeURL(e)), e = p.helpers.sanitizeURL(e), p.opts.linkAlwaysBlank && (n.target = "_blank"), p.opts.linkAlwaysNoFollow && (n.rel = "nofollow"), p.helpers.isEmail(a) && (n.target = null, n.rel = null), "_blank" == n.target ? (p.opts.linkNoOpener && (n.rel ? n.rel += " noopener" : n.rel = "noopener"), p.opts.linkNoReferrer && (n.rel ? n.rel += " noreferrer" : n.rel = "noreferrer")) : null == n.target && (n.rel ? n.rel = n.rel.replace(/noopener/, "").replace(/noreferrer/, "") : n.rel = null), t = t || "", e === p.opts.linkAutoPrefix) return p.popups.get("link.insert").find('input[name="href"]').addClass("fr-error"), p.events.trigger("link.bad", [a]), !1;
  12958. var o, i = h();
  12959. if (i) {
  12960. if ((o = u(i)).attr("href", e), 0 < t.length && o.text() != t && !r) {
  12961. for (var s = o.get(0); 1 === s.childNodes.length && s.childNodes[0].nodeType == Node.ELEMENT_NODE;) s = s.childNodes[0];
  12962. u(s).text(t)
  12963. }
  12964. r || o.prepend($e.START_MARKER).append($e.END_MARKER), o.attr(n), r || p.selection.restore()
  12965. } else {
  12966. r ? (r.wrap('<a href="' + e + '"></a>'), p.image.hasCaption() && r.parent().append(r.parents(".fr-img-caption").find(".fr-inner"))) : (p.format.remove("a"), p.selection.isCollapsed() ? (t = 0 === t.length ? a : t, p.html.insert('<a href="' + e + '">' + $e.START_MARKER + t.replace(/&/g, "&amp;").replace(/</, "&lt;", ">", "&gt;") + $e.END_MARKER + "</a>"), p.selection.restore()) : 0 < t.length && t != p.selection.text().replace(/\n/g, "") ? (p.selection.remove(), p.html.insert('<a href="' + e + '">' + $e.START_MARKER + t.replace(/&/g, "&amp;") + $e.END_MARKER + "</a>"), p.selection.restore()) : (! function f() {
  12967. if (!p.selection.isCollapsed()) {
  12968. p.selection.save();
  12969. for (var e = p.$el.find(".fr-marker").addClass("fr-unprocessed").toArray(); e.length;) {
  12970. var t = u(e.pop());
  12971. t.removeClass("fr-unprocessed");
  12972. var n = p.node.deepestParent(t.get(0));
  12973. if (n) {
  12974. for (var r = t.get(0), a = "", o = ""; r = r.parentNode, p.node.isBlock(r) || (a += p.node.closeTagString(r), o = p.node.openTagString(r) + o), r != n;);
  12975. var i = p.node.openTagString(t.get(0)) + t.html() + p.node.closeTagString(t.get(0));
  12976. t.replaceWith('<span id="fr-break"></span>');
  12977. var s = n.outerHTML;
  12978. s = (s = s.replace(/<span id="fr-break"><\/span>/g, a + i + o)).replace(o + a, ""), n.outerHTML = s
  12979. }
  12980. e = p.$el.find(".fr-marker.fr-unprocessed").toArray()
  12981. }
  12982. p.html.cleanEmptyTags(), p.selection.restore()
  12983. }
  12984. }(), p.format.apply("a", {
  12985. href: e
  12986. })));
  12987. for (var l = g(), c = 0; c < l.length; c++)(o = u(l[c])).attr(n), o.removeAttr("_moz_dirty");
  12988. 1 == l.length && p.$wp && !r && (u(l[0]).prepend($e.START_MARKER).append($e.END_MARKER), p.selection.restore())
  12989. } if (r) {
  12990. var d = p.popups.get("link.insert");
  12991. d && d.find("input:focus").blur(), p.image.edit(r)
  12992. } else m()
  12993. }
  12994. function d() {
  12995. o();
  12996. var e = h();
  12997. if (e) {
  12998. var t = p.popups.get("link.insert");
  12999. t || (t = s()), p.popups.isVisible("link.insert") || (p.popups.refresh("link.insert"), p.selection.save(), p.helpers.isMobile() && (p.events.disableBlur(), p.$el.blur(), p.events.enableBlur())), p.popups.setContainer("link.insert", p.$sc);
  13000. var n = (p.image ? p.image.get() : null) || u(e),
  13001. r = n.offset().left + n.outerWidth() / 2,
  13002. a = n.offset().top + n.outerHeight();
  13003. p.popups.show("link.insert", r, a, n.outerHeight(), !0)
  13004. }
  13005. }
  13006. function f() {
  13007. var e = p.image ? p.image.getEl() : null;
  13008. if (e) {
  13009. var t = p.popups.get("link.insert");
  13010. p.image.hasCaption() && (e = e.find(".fr-img-wrap")), t || (t = s()), l(), p.popups.setContainer("link.insert", p.$sc);
  13011. var n = e.offset().left + e.outerWidth() / 2,
  13012. r = e.offset().top + e.outerHeight();
  13013. p.popups.show("link.insert", n, r, e.outerHeight(), !0)
  13014. }
  13015. }
  13016. return {
  13017. _init: function e() {
  13018. p.events.on("keyup", function(e) {
  13019. e.which != $e.KEYCODE.ESC && m(e)
  13020. }), p.events.on("window.mouseup", m), p.events.$on(p.$el, "click", "a", function(e) {
  13021. p.edit.isDisabled() && e.preventDefault()
  13022. }), p.helpers.isMobile() && p.events.$on(p.$doc, "selectionchange", m), s(!0), "A" == p.el.tagName && p.$el.addClass("fr-view"), p.events.on("toolbar.esc", function() {
  13023. if (p.popups.isVisible("link.edit")) return p.events.disableBlur(), p.events.focus(), !1
  13024. }, !0)
  13025. },
  13026. remove: function n() {
  13027. var e = h(),
  13028. t = p.image ? p.image.get() : null;
  13029. if (!1 === p.events.trigger("link.beforeRemove", [e])) return !1;
  13030. t && e ? (t.unwrap(), p.image.edit(t)) : e && (p.selection.save(), u(e).replaceWith(u(e).html()), p.selection.restore(), o())
  13031. },
  13032. showInsertPopup: function v() {
  13033. var e = p.$tb.find('.fr-command[data-cmd="insertLink"]'),
  13034. t = p.popups.get("link.insert");
  13035. if (t || (t = s()), !t.hasClass("fr-active"))
  13036. if (p.popups.refresh("link.insert"), p.popups.setContainer("link.insert", p.$tb || p.$sc), e.isVisible()) {
  13037. var n = p.button.getPosition(e),
  13038. r = n.left,
  13039. a = n.top;
  13040. p.popups.show("link.insert", r, a, e.outerHeight())
  13041. } else p.position.forSelection(t), p.popups.show("link.insert")
  13042. },
  13043. usePredefined: function b(e) {
  13044. var t, n, r = p.opts.linkList[e],
  13045. a = p.popups.get("link.insert"),
  13046. o = a.find('input.fr-link-attr[type="text"]'),
  13047. i = a.find('input.fr-link-attr[type="checkbox"]');
  13048. for (r.rel && (a.rel = r.rel), n = 0; n < o.length; n++) r[(t = u(o[n])).attr("name")] ? (t.val(r[t.attr("name")]), t.toggleClass("fr-not-empty", !0)) : "text" != t.attr("name") && t.val("");
  13049. for (n = 0; n < i.length; n++)(t = u(i[n])).attr("checked", t.data("checked") == r[t.attr("name")]);
  13050. p.accessibility.focusPopup(a)
  13051. },
  13052. insertCallback: function E() {
  13053. var e, t, n = p.popups.get("link.insert"),
  13054. r = n.find('input.fr-link-attr[type="text"]'),
  13055. a = n.find('input.fr-link-attr[type="checkbox"]'),
  13056. o = (r.filter('[name="href"]').val() || "").trim(),
  13057. i = r.filter('[name="text"]').val(),
  13058. s = {};
  13059. for (t = 0; t < r.length; t++) e = u(r[t]), ["href", "text"].indexOf(e.attr("name")) < 0 && (s[e.attr("name")] = e.val());
  13060. for (t = 0; t < a.length; t++)(e = u(a[t])).is(":checked") ? s[e.attr("name")] = e.data("checked") : s[e.attr("name")] = e.data("unchecked") || null;
  13061. n.rel && (s.rel = n.rel);
  13062. var l = p.helpers.scrollTop();
  13063. c(o, i, s), u(p.o_win).scrollTop(l)
  13064. },
  13065. insert: c,
  13066. update: d,
  13067. get: h,
  13068. allSelected: g,
  13069. back: function t() {
  13070. p.image && p.image.get() ? p.image.back() : (p.events.disableBlur(), p.selection.restore(), p.events.enableBlur(), h() && p.$wp ? (p.selection.restore(), o(), m()) : "A" == p.el.tagName ? (p.$el.focus(), m()) : (p.popups.hide("link.insert"), p.toolbar.showInline()))
  13071. },
  13072. imageLink: f,
  13073. applyStyle: function T(e, t, n) {
  13074. void 0 === n && (n = p.opts.linkMultipleStyles), void 0 === t && (t = p.opts.linkStyles);
  13075. var r = h();
  13076. if (!r) return !1;
  13077. if (!n) {
  13078. var a = Object.keys(t);
  13079. a.splice(a.indexOf(e), 1), u(r).removeClass(a.join(" "))
  13080. }
  13081. u(r).toggleClass(e), m()
  13082. }
  13083. }
  13084. }, $e.DefineIcon("insertLink", {
  13085. NAME: "link",
  13086. SVG_KEY: "insertLink"
  13087. }), $e.RegisterShortcut($e.KEYCODE.K, "insertLink", null, "K"), $e.RegisterCommand("insertLink", {
  13088. title: "Insert Link",
  13089. undo: !1,
  13090. focus: !0,
  13091. refreshOnCallback: !1,
  13092. popup: !0,
  13093. callback: function() {
  13094. this.popups.isVisible("link.insert") ? (this.$el.find(".fr-marker").length && (this.events.disableBlur(), this.selection.restore()), this.popups.hide("link.insert")) : this.link.showInsertPopup()
  13095. },
  13096. plugin: "link"
  13097. }), $e.DefineIcon("linkOpen", {
  13098. NAME: "external-link",
  13099. FA5NAME: "external-link-alt",
  13100. SVG_KEY: "openLink"
  13101. }), $e.RegisterCommand("linkOpen", {
  13102. title: "Open Link",
  13103. undo: !1,
  13104. refresh: function(e) {
  13105. this.link.get() ? e.removeClass("fr-hidden") : e.addClass("fr-hidden")
  13106. },
  13107. callback: function() {
  13108. var e = this.link.get();
  13109. e && (-1 !== e.href.indexOf("mailto:") ? this.o_win.open(e.href).close() : this.o_win.open(e.href, "_blank", "noopener"), this.popups.hide("link.edit"))
  13110. },
  13111. plugin: "link"
  13112. }), $e.DefineIcon("linkEdit", {
  13113. NAME: "edit",
  13114. SVG_KEY: "editLink"
  13115. }), $e.RegisterCommand("linkEdit", {
  13116. title: "Edit Link",
  13117. undo: !1,
  13118. refreshAfterCallback: !1,
  13119. popup: !0,
  13120. callback: function() {
  13121. this.link.update()
  13122. },
  13123. refresh: function(e) {
  13124. this.link.get() ? e.removeClass("fr-hidden") : e.addClass("fr-hidden")
  13125. },
  13126. plugin: "link"
  13127. }), $e.DefineIcon("linkRemove", {
  13128. NAME: "unlink",
  13129. SVG_KEY: "unlink"
  13130. }), $e.RegisterCommand("linkRemove", {
  13131. title: "Unlink",
  13132. callback: function() {
  13133. this.link.remove()
  13134. },
  13135. refresh: function(e) {
  13136. this.link.get() ? e.removeClass("fr-hidden") : e.addClass("fr-hidden")
  13137. },
  13138. plugin: "link"
  13139. }), $e.DefineIcon("linkBack", {
  13140. NAME: "arrow-left",
  13141. SVG_KEY: "back"
  13142. }), $e.RegisterCommand("linkBack", {
  13143. title: "Back",
  13144. undo: !1,
  13145. focus: !1,
  13146. back: !0,
  13147. refreshAfterCallback: !1,
  13148. callback: function() {
  13149. this.link.back()
  13150. },
  13151. refresh: function(e) {
  13152. var t = this.link.get() && this.doc.hasFocus();
  13153. (this.image ? this.image.get() : null) || t || this.opts.toolbarInline ? (e.removeClass("fr-hidden"), e.next(".fr-separator").removeClass("fr-hidden")) : (e.addClass("fr-hidden"), e.next(".fr-separator").addClass("fr-hidden"))
  13154. },
  13155. plugin: "link"
  13156. }), $e.DefineIcon("linkList", {
  13157. NAME: "search",
  13158. SVG_KEY: "search"
  13159. }), $e.RegisterCommand("linkList", {
  13160. title: "Choose Link",
  13161. type: "dropdown",
  13162. focus: !1,
  13163. undo: !1,
  13164. refreshAfterCallback: !1,
  13165. html: function() {
  13166. for (var e = '<ul class="fr-dropdown-list" role="presentation">', t = this.opts.linkList, n = 0; n < t.length; n++) e += '<li role="presentation"><a class="fr-command" tabIndex="-1" role="option" data-cmd="linkList" data-param1="' + n + '">' + (t[n].displayText || t[n].text) + "</a></li>";
  13167. return e += "</ul>"
  13168. },
  13169. callback: function(e, t) {
  13170. this.link.usePredefined(t)
  13171. },
  13172. plugin: "link"
  13173. }), $e.RegisterCommand("linkInsert", {
  13174. focus: !1,
  13175. refreshAfterCallback: !1,
  13176. callback: function() {
  13177. this.link.insertCallback()
  13178. },
  13179. refresh: function(e) {
  13180. this.link.get() ? e.text(this.language.translate("Update")) : e.text(this.language.translate("Insert"))
  13181. },
  13182. plugin: "link"
  13183. }), $e.DefineIcon("imageLink", {
  13184. NAME: "link",
  13185. SVG_KEY: "insertLink"
  13186. }), $e.RegisterCommand("imageLink", {
  13187. title: "Insert Link",
  13188. undo: !1,
  13189. focus: !1,
  13190. popup: !0,
  13191. callback: function() {
  13192. this.link.imageLink()
  13193. },
  13194. refresh: function(e) {
  13195. var t;
  13196. this.link.get() ? ((t = e.prev()).hasClass("fr-separator") && t.removeClass("fr-hidden"), e.addClass("fr-hidden")) : ((t = e.prev()).hasClass("fr-separator") && t.addClass("fr-hidden"), e.removeClass("fr-hidden"))
  13197. },
  13198. plugin: "link"
  13199. }), $e.DefineIcon("linkStyle", {
  13200. NAME: "magic",
  13201. SVG_KEY: "linkStyles"
  13202. }), $e.RegisterCommand("linkStyle", {
  13203. title: "Style",
  13204. type: "dropdown",
  13205. html: function() {
  13206. var e = '<ul class="fr-dropdown-list" role="presentation">',
  13207. t = this.opts.linkStyles;
  13208. for (var n in t) t.hasOwnProperty(n) && (e += '<li role="presentation"><a class="fr-command" tabIndex="-1" role="option" data-cmd="linkStyle" data-param1="' + n + '">' + this.language.translate(t[n]) + "</a></li>");
  13209. return e += "</ul>"
  13210. },
  13211. callback: function(e, t) {
  13212. this.link.applyStyle(t)
  13213. },
  13214. refreshOnShow: function(e, t) {
  13215. var n = this.$,
  13216. r = this.link.get();
  13217. if (r) {
  13218. var a = n(r);
  13219. t.find(".fr-command").each(function() {
  13220. var e = n(this).data("param1"),
  13221. t = a.hasClass(e);
  13222. n(this).toggleClass("fr-active", t).attr("aria-selected", t)
  13223. })
  13224. }
  13225. },
  13226. refresh: function(e) {
  13227. this.link.get() ? e.removeClass("fr-hidden") : e.addClass("fr-hidden")
  13228. },
  13229. plugin: "link"
  13230. }), Object.assign($e.DEFAULTS, {
  13231. listAdvancedTypes: !0
  13232. }), $e.PLUGINS.lists = function(f) {
  13233. var p = f.$;
  13234. function u(e) {
  13235. return '<span class="fr-open-' + e.toLowerCase() + '"></span>'
  13236. }
  13237. function h(e) {
  13238. return '<span class="fr-close-' + e.toLowerCase() + '"></span>'
  13239. }
  13240. function o(e, t) {
  13241. ! function c(e, t) {
  13242. for (var n = [], r = 0; r < e.length; r++) {
  13243. var a = e[r].parentNode;
  13244. "LI" == e[r].tagName && a.tagName != t && n.indexOf(a) < 0 && n.push(a)
  13245. }
  13246. for (var o = n.length - 1; 0 <= o; o--) {
  13247. var i = p(n[o]);
  13248. i.replaceWith("<" + t.toLowerCase() + " " + f.node.attributes(i.get(0)) + ">" + i.html() + "</" + t.toLowerCase() + ">")
  13249. }
  13250. }(e, t);
  13251. var n, r = f.html.defaultTag(),
  13252. a = null;
  13253. e.length && (n = "rtl" == f.opts.direction || "rtl" == p(e[0]).css("direction") ? "margin-right" : "margin-left");
  13254. for (var o = 0; o < e.length; o++)
  13255. if ("TD" != e[o].tagName && "TH" != e[o].tagName && "LI" != e[o].tagName) {
  13256. var i = f.helpers.getPX(p(e[o]).css(n)) || 0;
  13257. (e[o].style.marginLeft = null) === a && (a = i);
  13258. var s = 0 < a ? "<" + t + ' style="' + n + ": " + a + 'px ">' : "<" + t + ">",
  13259. l = "</" + t + ">";
  13260. for (i -= a; 0 < i / f.opts.indentMargin;) s += "<" + t + ">", l += l, i -= f.opts.indentMargin;
  13261. r && e[o].tagName.toLowerCase() == r ? p(e[o]).replaceWith(s + "<li" + f.node.attributes(e[o]) + ">" + p(e[o]).html() + "</li>" + l) : p(e[o]).wrap(s + "<li></li>" + l)
  13262. }
  13263. f.clean.lists()
  13264. }
  13265. function i(e) {
  13266. var t, n;
  13267. for (t = e.length - 1; 0 <= t; t--)
  13268. for (n = t - 1; 0 <= n; n--)
  13269. if (p(e[n]).find(e[t]).length || e[n] == e[t]) {
  13270. e.splice(t, 1);
  13271. break
  13272. }
  13273. var r = [];
  13274. for (t = 0; t < e.length; t++) {
  13275. var a = p(e[t]),
  13276. o = e[t].parentNode,
  13277. i = a.attr("class");
  13278. if (a.before(h(o.tagName)), "LI" == o.parentNode.tagName) a.before(h("LI")), a.after(u("LI"));
  13279. else {
  13280. var s = "";
  13281. i && (s += ' class="' + i + '"');
  13282. var l = "rtl" == f.opts.direction || "rtl" == a.css("direction") ? "margin-right" : "margin-left";
  13283. f.helpers.getPX(p(o).css(l)) && 0 <= (p(o).attr("style") || "").indexOf(l + ":") && (s += ' style="' + l + ":" + f.helpers.getPX(p(o).css(l)) + 'px;"'), f.html.defaultTag() && 0 === a.find(f.html.blockTagsQuery()).length && a.wrapInner(f.html.defaultTag() + s), f.node.isEmpty(a.get(0), !0) || 0 !== a.find(f.html.blockTagsQuery()).length || a.append("<br>"), a.append(u("LI")), a.prepend(h("LI"))
  13284. }
  13285. a.after(u(o.tagName)), "LI" == o.parentNode.tagName && (o = o.parentNode.parentNode), r.indexOf(o) < 0 && r.push(o)
  13286. }
  13287. for (t = 0; t < r.length; t++) {
  13288. var c = p(r[t]),
  13289. d = c.html();
  13290. d = (d = d.replace(/<span class="fr-close-([a-z]*)"><\/span>/g, "</$1>")).replace(/<span class="fr-open-([a-z]*)"><\/span>/g, "<$1>"), c.replaceWith(f.node.openTagString(c.get(0)) + d + f.node.closeTagString(c.get(0)))
  13291. }
  13292. f.$el.find("li:empty").remove(), f.$el.find("ul:empty, ol:empty").remove(), f.clean.lists(), f.html.wrap()
  13293. }
  13294. function s(e) {
  13295. f.selection.save();
  13296. for (var t = 0; t < e.length; t++) {
  13297. var n = e[t].previousSibling;
  13298. if (n) {
  13299. var r = p(e[t]).find("> ul, ol").last().get(0);
  13300. if (r) {
  13301. var a = p(document.createElement("li"));
  13302. p(r).prepend(a);
  13303. for (var o = f.node.contents(e[t])[0]; o && !f.node.isList(o);) {
  13304. var i = o.nextSibling;
  13305. a.append(o), o = i
  13306. }
  13307. p(n).append(p(r)), p(e[t]).remove()
  13308. } else {
  13309. var s = p(n).find("> ul, ol").last().get(0);
  13310. if (s) p(s).append(p(e[t]));
  13311. else {
  13312. var l = p("<" + e[t].parentNode.tagName + ">");
  13313. p(n).append(l), l.append(p(e[t]))
  13314. }
  13315. }
  13316. }
  13317. }
  13318. f.clean.lists(), f.selection.restore()
  13319. }
  13320. function l(e) {
  13321. f.selection.save(), i(e), f.selection.restore()
  13322. }
  13323. function e(e) {
  13324. if ("indent" == e || "outdent" == e) {
  13325. var t = !1,
  13326. n = f.selection.blocks(),
  13327. r = [],
  13328. a = n[0].previousSibling || n[0].parentElement;
  13329. if ("outdent" == e) {
  13330. if ("LI" == a.tagName || "LI" != a.parentNode.tagName) return
  13331. } else if (!n[0].previousSibling || "LI" != n[0].previousSibling.tagName) return;
  13332. for (var o = 0; o < n.length; o++) "LI" == n[o].tagName ? (t = !0, r.push(n[o])) : "LI" == n[o].parentNode.tagName && (t = !0, r.push(n[o].parentNode));
  13333. t && ("indent" == e ? s(r) : l(r))
  13334. }
  13335. }
  13336. return {
  13337. _init: function t() {
  13338. f.events.on("commands.after", e), f.events.on("keydown", function(e) {
  13339. if (e.which == $e.KEYCODE.TAB) {
  13340. for (var t = f.selection.blocks(), n = [], r = 0; r < t.length; r++) "LI" == t[r].tagName ? n.push(t[r]) : "LI" == t[r].parentNode.tagName && n.push(t[r].parentNode);
  13341. if (1 < n.length || n.length && (f.selection.info(n[0]).atStart || f.node.isEmpty(n[0]))) return e.preventDefault(), e.stopPropagation(), e.shiftKey ? l(n) : s(n), !1
  13342. }
  13343. }, !0)
  13344. },
  13345. format: function c(e, t) {
  13346. var n, r;
  13347. for (f.selection.save(), f.html.wrap(!0, !0, !0, !0), f.selection.restore(), r = f.selection.blocks(), n = 0; n < r.length; n++) "LI" != r[n].tagName && "LI" == r[n].parentNode.tagName && (r[n] = r[n].parentNode);
  13348. if (f.selection.save(), function a(e, t) {
  13349. for (var n = !0, r = 0; r < e.length; r++) {
  13350. if ("LI" != e[r].tagName) return !1;
  13351. e[r].parentNode.tagName != t && (n = !1)
  13352. }
  13353. return n
  13354. }(r, e) ? t || i(r) : o(r, e), f.html.unwrap(), f.selection.restore(), t = t || "default") {
  13355. for (r = f.selection.blocks(), n = 0; n < r.length; n++) "LI" != r[n].tagName && "LI" == r[n].parentNode.tagName && (r[n] = r[n].parentNode);
  13356. for (n = 0; n < r.length; n++) "LI" == r[n].tagName && (p(r[n].parentNode).css("list-style-type", "default" === t ? "" : t), 0 === (p(r[n].parentNode).attr("style") || "").length && p(r[n].parentNode).removeAttr("style"))
  13357. }
  13358. },
  13359. refresh: function a(e, t) {
  13360. var n = p(f.selection.element());
  13361. if (n.get(0) != f.el) {
  13362. var r = n.get(0);
  13363. (r = "LI" != r.tagName && r.firstElementChild && "LI" != r.firstElementChild.tagName ? n.parents("li").get(0) : "LI" == r.tagName || r.firstElementChild ? r.firstElementChild && "LI" == r.firstElementChild.tagName ? n.get(0).firstChild : n.get(0) : n.parents("li").get(0)) && r.parentNode.tagName == t && f.el.contains(r.parentNode) && e.addClass("fr-active")
  13364. }
  13365. }
  13366. }
  13367. }, $e.DefineIcon("formatOLSimple", {
  13368. NAME: "list-ol",
  13369. SVG_KEY: "orderedList"
  13370. }), $e.RegisterCommand("formatOLSimple", {
  13371. title: "Ordered List",
  13372. type: "button",
  13373. options: {
  13374. "default": "Default",
  13375. circle: "Circle",
  13376. disc: "Disc",
  13377. square: "Square"
  13378. },
  13379. refresh: function(e) {
  13380. this.lists.refresh(e, "OL")
  13381. },
  13382. callback: function(e, t) {
  13383. this.lists.format("OL", t)
  13384. },
  13385. plugin: "lists"
  13386. }), $e.RegisterCommand("formatUL", {
  13387. title: "Unordered List",
  13388. type: "button",
  13389. hasOptions: function() {
  13390. return this.opts.listAdvancedTypes
  13391. },
  13392. options: {
  13393. "default": "Default",
  13394. circle: "Circle",
  13395. disc: "Disc",
  13396. square: "Square"
  13397. },
  13398. refresh: function(e) {
  13399. this.lists.refresh(e, "UL")
  13400. },
  13401. callback: function(e, t) {
  13402. this.lists.format("UL", t)
  13403. },
  13404. plugin: "lists"
  13405. }), $e.RegisterCommand("formatOL", {
  13406. title: "Ordered List",
  13407. hasOptions: function() {
  13408. return this.opts.listAdvancedTypes
  13409. },
  13410. options: {
  13411. "default": "Default",
  13412. "lower-alpha": "Lower Alpha",
  13413. "lower-greek": "Lower Greek",
  13414. "lower-roman": "Lower Roman",
  13415. "upper-alpha": "Upper Alpha",
  13416. "upper-roman": "Upper Roman"
  13417. },
  13418. refresh: function(e) {
  13419. this.lists.refresh(e, "OL")
  13420. },
  13421. callback: function(e, t) {
  13422. this.lists.format("OL", t)
  13423. },
  13424. plugin: "lists"
  13425. }), $e.DefineIcon("formatUL", {
  13426. NAME: "list-ul",
  13427. SVG_KEY: "unorderedList"
  13428. }), $e.DefineIcon("formatOL", {
  13429. NAME: "list-ol",
  13430. SVG_KEY: "orderedList"
  13431. }), Object.assign($e.DEFAULTS, {
  13432. paragraphFormat: {
  13433. N: "Normal",
  13434. H1: "Heading 1",
  13435. H2: "Heading 2",
  13436. H3: "Heading 3",
  13437. H4: "Heading 4",
  13438. PRE: "Code"
  13439. },
  13440. paragraphFormatSelection: !1,
  13441. paragraphDefaultSelection: "Paragraph Format"
  13442. }), $e.PLUGINS.paragraphFormat = function(p) {
  13443. var u = p.$;
  13444. function h(e, t) {
  13445. var n = p.html.defaultTag();
  13446. if (t && t.toLowerCase() != n)
  13447. if (0 < e.find("ul, ol").length) {
  13448. var r = u("<" + t + ">");
  13449. e.prepend(r);
  13450. for (var a = p.node.contents(e.get(0))[0]; a && ["UL", "OL"].indexOf(a.tagName) < 0;) {
  13451. var o = a.nextSibling;
  13452. r.append(a), a = o
  13453. }
  13454. } else e.html("<" + t + ">" + e.html() + "</" + t + ">")
  13455. }
  13456. return {
  13457. apply: function g(e) {
  13458. "N" == e && (e = p.html.defaultTag()), p.selection.save(), p.html.wrap(!0, !0, !p.opts.paragraphFormat.BLOCKQUOTE, !0, !0), p.selection.restore();
  13459. var t, n, r, a, o, i, s, l, c = p.selection.blocks();
  13460. p.selection.save(), p.$el.find("pre").attr("skip", !0);
  13461. for (var d = 0; d < c.length; d++)
  13462. if (c[d].tagName != e && !p.node.isList(c[d])) {
  13463. var f = u(c[d]);
  13464. "LI" == c[d].tagName ? h(f, e) : "LI" == c[d].parentNode.tagName && c[d] ? (i = f, s = e, l = p.html.defaultTag(), s && s.toLowerCase() != l || (s = 'div class="fr-temp-div"'), i.replaceWith(u("<" + s + ">").html(i.html()))) : 0 <= ["TD", "TH"].indexOf(c[d].parentNode.tagName) ? (r = f, a = e, o = p.html.defaultTag(), a || (a = 'div class="fr-temp-div"' + (p.node.isEmpty(r.get(0), !0) ? ' data-empty="true"' : "")), a.toLowerCase() == o ? (p.node.isEmpty(r.get(0), !0) || r.append("<br/>"), r.replaceWith(r.html())) : r.replaceWith(u("<" + a + ">").html(r.html()))) : (t = f, (n = e) || (n = 'div class="fr-temp-div"' + (p.node.isEmpty(t.get(0), !0) ? ' data-empty="true"' : "")), t.replaceWith(u("<" + n + " " + p.node.attributes(t.get(0)) + ">").html(t.html()).removeAttr("data-empty")))
  13465. }
  13466. p.$el.find('pre:not([skip="true"]) + pre:not([skip="true"])').each(function() {
  13467. u(this).prev().append("<br>" + u(this).html()), u(this).remove()
  13468. }), p.$el.find("pre").removeAttr("skip"), p.html.unwrap(), p.selection.restore()
  13469. },
  13470. refreshOnShow: function i(e, t) {
  13471. var n = p.selection.blocks();
  13472. if (n.length) {
  13473. var r = n[0],
  13474. a = "N",
  13475. o = p.html.defaultTag();
  13476. r.tagName.toLowerCase() != o && r != p.el && (a = r.tagName), t.find('.fr-command[data-param1="' + a + '"]').addClass("fr-active").attr("aria-selected", !0)
  13477. } else t.find('.fr-command[data-param1="N"]').addClass("fr-active").attr("aria-selected", !0)
  13478. },
  13479. refresh: function o(e) {
  13480. if (p.opts.paragraphFormatSelection) {
  13481. var t = p.selection.blocks();
  13482. if (t.length) {
  13483. var n = t[0],
  13484. r = "N",
  13485. a = p.html.defaultTag();
  13486. n.tagName.toLowerCase() != a && n != p.el && (r = n.tagName), 0 <= ["LI", "TD", "TH"].indexOf(r) && (r = "N"), e.find(">span").text(p.language.translate(p.opts.paragraphFormat[r]))
  13487. } else e.find(">span").text(p.language.translate(p.opts.paragraphFormat.N))
  13488. }
  13489. }
  13490. }
  13491. }, $e.RegisterCommand("paragraphFormat", {
  13492. type: "dropdown",
  13493. displaySelection: function(e) {
  13494. return e.opts.paragraphFormatSelection
  13495. },
  13496. defaultSelection: function(e) {
  13497. return e.language.translate(e.opts.paragraphDefaultSelection)
  13498. },
  13499. displaySelectionWidth: 80,
  13500. html: function() {
  13501. var e = '<ul class="fr-dropdown-list" role="presentation">',
  13502. t = this.opts.paragraphFormat;
  13503. for (var n in t)
  13504. if (t.hasOwnProperty(n)) {
  13505. var r = this.shortcuts.get("paragraphFormat." + n);
  13506. r = r ? '<span class="fr-shortcut">' + r + "</span>" : "", e += '<li role="presentation"><' + ("N" == n ? this.html.defaultTag() || "DIV" : n) + ' style="padding: 0 !important; margin: 0 !important;" role="presentation"><a class="fr-command" tabIndex="-1" role="option" data-cmd="paragraphFormat" data-param1="' + n + '" title="' + this.language.translate(t[n]) + '">' + this.language.translate(t[n]) + "</a></" + ("N" == n ? this.html.defaultTag() || "DIV" : n) + "></li>"
  13507. }
  13508. return e += "</ul>"
  13509. },
  13510. title: "Paragraph Format",
  13511. callback: function(e, t) {
  13512. this.paragraphFormat.apply(t)
  13513. },
  13514. refresh: function(e) {
  13515. this.paragraphFormat.refresh(e)
  13516. },
  13517. refreshOnShow: function(e, t) {
  13518. this.paragraphFormat.refreshOnShow(e, t)
  13519. },
  13520. plugin: "paragraphFormat"
  13521. }), $e.DefineIcon("paragraphFormat", {
  13522. NAME: "paragraph",
  13523. SVG_KEY: "paragraphFormat"
  13524. }), Object.assign($e.DEFAULTS, {
  13525. paragraphStyles: {
  13526. "fr-text-gray": "Gray",
  13527. "fr-text-bordered": "Bordered",
  13528. "fr-text-spaced": "Spaced",
  13529. "fr-text-uppercase": "Uppercase"
  13530. },
  13531. paragraphMultipleStyles: !0
  13532. }), $e.PLUGINS.paragraphStyle = function(s) {
  13533. var l = s.$;
  13534. return {
  13535. _init: function e() {},
  13536. apply: function c(e, t, n) {
  13537. void 0 === t && (t = s.opts.paragraphStyles), void 0 === n && (n = s.opts.paragraphMultipleStyles);
  13538. var r = "";
  13539. n || ((r = Object.keys(t)).splice(r.indexOf(e), 1), r = r.join(" ")), s.selection.save(), s.html.wrap(!0, !0, !0, !0), s.selection.restore();
  13540. var a = s.selection.blocks();
  13541. s.selection.save();
  13542. for (var o = l(a[0]).hasClass(e), i = 0; i < a.length; i++) l(a[i]).removeClass(r).toggleClass(e, !o), l(a[i]).hasClass("fr-temp-div") && l(a[i]).removeClass("fr-temp-div"), "" === l(a[i]).attr("class") && l(a[i]).removeAttr("class");
  13543. s.html.unwrap(), s.selection.restore()
  13544. },
  13545. refreshOnShow: function a(e, t) {
  13546. var n = s.selection.blocks();
  13547. if (n.length) {
  13548. var r = l(n[0]);
  13549. t.find(".fr-command").each(function() {
  13550. var e = l(this).data("param1"),
  13551. t = r.hasClass(e);
  13552. l(this).toggleClass("fr-active", t).attr("aria-selected", t)
  13553. })
  13554. }
  13555. }
  13556. }
  13557. }, $e.RegisterCommand("paragraphStyle", {
  13558. type: "dropdown",
  13559. html: function() {
  13560. var e = '<ul class="fr-dropdown-list" role="presentation">',
  13561. t = this.opts.paragraphStyles;
  13562. for (var n in t) t.hasOwnProperty(n) && (e += '<li role="presentation"><a class="fr-command ' + n + '" tabIndex="-1" role="option" data-cmd="paragraphStyle" data-param1="' + n + '" title="' + this.language.translate(t[n]) + '">' + this.language.translate(t[n]) + "</a></li>");
  13563. return e += "</ul>"
  13564. },
  13565. title: "Paragraph Style",
  13566. callback: function(e, t) {
  13567. this.paragraphStyle.apply(t)
  13568. },
  13569. refreshOnShow: function(e, t) {
  13570. this.paragraphStyle.refreshOnShow(e, t)
  13571. },
  13572. plugin: "paragraphStyle"
  13573. }), $e.DefineIcon("paragraphStyle", {
  13574. NAME: "magic",
  13575. SVG_KEY: "paragraphStyle"
  13576. }), Object.assign($e.DEFAULTS, {
  13577. html2pdf: window.html2pdf
  13578. }), $e.PLUGINS.print = function(l) {
  13579. return {
  13580. run: function e() {
  13581. ! function s(e) {
  13582. var t = l.$el.html(),
  13583. n = null;
  13584. l.shared.print_iframe ? n = l.shared.print_iframe : ((n = document.createElement("iframe")).name = "fr-print", n.style.position = "fixed", n.style.top = "0", n.style.left = "-9999px", n.style.height = "100%", n.style.width = "0", n.style.overflow = "hidden", n.style["z-index"] = "2147483647", n.style.tabIndex = "-1", l.events.on("shared.destroy", function() {
  13585. n.remove()
  13586. }), l.shared.print_iframe = n);
  13587. try {
  13588. document.body.removeChild(n)
  13589. } catch (i) {}
  13590. document.body.appendChild(n);
  13591. var r = function r() {
  13592. e(), n.removeEventListener("load", r)
  13593. };
  13594. n.addEventListener("load", r);
  13595. var a = n.contentWindow;
  13596. a.document.open(), a.document.write("<!DOCTYPE html><html " + (l.opts.documentReady ? 'style="margin: 0; padding: 0;"' : "") + "><head><title>" + document.title + "</title>"), Array.prototype.forEach.call(document.querySelectorAll("style"), function(e) {
  13597. e = e.cloneNode(!0), a.document.write(e.outerHTML)
  13598. });
  13599. var o = document.querySelectorAll("link[rel=stylesheet]");
  13600. Array.prototype.forEach.call(o, function(e) {
  13601. var t = document.createElement("link");
  13602. t.rel = e.rel, t.href = e.href, t.media = "print", t.type = "text/css", t.media = "all", a.document.write(t.outerHTML)
  13603. }), a.document.write('</head><body style="height:auto;text-align: ' + ("rtl" == l.opts.direction ? "right" : "left") + "; direction: " + l.opts.direction + "; " + (l.opts.documentReady ? " padding: 2cm; width: 17cm; margin: 0;" : "") + '"><div class="fr-view">'), a.document.write(t), a.document.write("</div></body></html>"), a.document.close()
  13604. }(function() {
  13605. setTimeout(function() {
  13606. l.events.disableBlur(), window.frames["fr-print"].focus(), window.frames["fr-print"].print(), l.$win.get(0).focus(), l.events.disableBlur(), l.events.focus()
  13607. }, 0)
  13608. })
  13609. },
  13610. toPDF: function t() {
  13611. l.opts.html2pdf && (l.$el.css("text-align", "left"), l.opts.html2pdf().set({
  13612. margin: [10, 20],
  13613. html2canvas: {
  13614. useCORS: !0
  13615. }
  13616. }).from(l.el).save(), setTimeout(function() {
  13617. l.$el.css("text-align", "")
  13618. }, 100))
  13619. }
  13620. }
  13621. }, $e.DefineIcon("print", {
  13622. NAME: "print",
  13623. SVG_KEY: "print"
  13624. }), $e.RegisterCommand("print", {
  13625. title: "Print",
  13626. undo: !1,
  13627. focus: !1,
  13628. plugin: "print",
  13629. callback: function() {
  13630. this.print.run()
  13631. }
  13632. }), $e.DefineIcon("getPDF", {
  13633. NAME: "file-pdf-o",
  13634. FA5NAME: "file-pdf",
  13635. SVG_KEY: "pdfExport"
  13636. }), $e.RegisterCommand("getPDF", {
  13637. title: "Download PDF",
  13638. type: "button",
  13639. focus: !1,
  13640. undo: !1,
  13641. callback: function() {
  13642. this.print.toPDF()
  13643. }
  13644. }), Object.assign($e.DEFAULTS, {
  13645. quickInsertButtons: ["image", "video", "embedly", "table", "ul", "ol", "hr"],
  13646. quickInsertTags: ["p", "div", "h1", "h2", "h3", "h4", "h5", "h6", "pre", "blockquote"],
  13647. quickInsertEnabled: !0
  13648. }), $e.QUICK_INSERT_BUTTONS = {}, $e.DefineIcon("quickInsert", {
  13649. SVG_KEY: "add",
  13650. template: "svg"
  13651. }), $e.RegisterQuickInsertButton = function(e, t) {
  13652. $e.QUICK_INSERT_BUTTONS[e] = Object.assign({
  13653. undo: !0
  13654. }, t)
  13655. }, $e.RegisterQuickInsertButton("image", {
  13656. icon: "insertImage",
  13657. requiredPlugin: "image",
  13658. title: "Insert Image",
  13659. undo: !1,
  13660. callback: function() {
  13661. var e = this,
  13662. t = e.$;
  13663. e.shared.$qi_image_input || (e.shared.$qi_image_input = t(document.createElement("input")).attr("accept", "image/" + e.opts.imageAllowedTypes.join(", image/").toLowerCase()).attr("name", "quickInsertImage" + this.id).attr("style", "display: none;").attr("type", "file"), t("body").first().append(e.shared.$qi_image_input), e.events.$on(e.shared.$qi_image_input, "change", function() {
  13664. var e = t(this).data("inst");
  13665. this.files && (e.quickInsert.hide(), e.image.upload(this.files)), t(this).val("")
  13666. }, !0)), e.$qi_image_input = e.shared.$qi_image_input, e.helpers.isMobile() && e.selection.save(), e.events.disableBlur(), e.$qi_image_input.data("inst", e)[0].click()
  13667. }
  13668. }), $e.RegisterQuickInsertButton("video", {
  13669. icon: "insertVideo",
  13670. requiredPlugin: "video",
  13671. title: "Insert Video",
  13672. undo: !1,
  13673. callback: function() {
  13674. var e = prompt(this.language.translate("Paste the URL of the video you want to insert."));
  13675. e && this.video.insertByURL(e)
  13676. }
  13677. }), $e.RegisterQuickInsertButton("embedly", {
  13678. icon: "embedly",
  13679. requiredPlugin: "embedly",
  13680. title: "Embed URL",
  13681. undo: !1,
  13682. callback: function() {
  13683. var e = prompt(this.language.translate("Paste the URL of any web content you want to insert."));
  13684. e && this.embedly.add(e)
  13685. }
  13686. }), $e.RegisterQuickInsertButton("table", {
  13687. icon: "insertTable",
  13688. requiredPlugin: "table",
  13689. title: "Insert Table",
  13690. callback: function() {
  13691. this.table.insert(2, 2)
  13692. }
  13693. }), $e.RegisterQuickInsertButton("ol", {
  13694. icon: "formatOL",
  13695. requiredPlugin: "lists",
  13696. title: "Ordered List",
  13697. callback: function() {
  13698. this.lists.format("OL")
  13699. }
  13700. }), $e.RegisterQuickInsertButton("ul", {
  13701. icon: "formatUL",
  13702. requiredPlugin: "lists",
  13703. title: "Unordered List",
  13704. callback: function() {
  13705. this.lists.format("UL")
  13706. }
  13707. }), $e.RegisterQuickInsertButton("hr", {
  13708. icon: "insertHR",
  13709. title: "Insert Horizontal Line",
  13710. callback: function() {
  13711. this.commands.insertHR()
  13712. }
  13713. }), $e.PLUGINS.quickInsert = function(i) {
  13714. var s, l, c = i.$;
  13715. function n(e) {
  13716. var t, n, r;
  13717. (t = e.offset().top - i.$box.offset().top, n = (i.$iframe && i.$iframe.offset().left || 0) + e.offset().left < s.outerWidth() ? e.offset().left + s.outerWidth() : 0 - s.outerWidth(), i.opts.enter != $e.ENTER_BR) ? r = (s.outerHeight() - e.outerHeight()) / 2: (c(document.createElement("span")).html($e.INVISIBLE_SPACE).insertAfter(e), r = (s.outerHeight() - e.next().outerHeight()) / 2, e.next().remove());
  13718. if (i.opts.iframe) {
  13719. var a = i.helpers.getPX(i.$wp.find(".fr-iframe").css("padding-top"));
  13720. t += i.$iframe.offset().top + a
  13721. }
  13722. s.hasClass("fr-on") && 0 <= t && l.css("top", t - r), 0 <= t && t - Math.abs(r) <= i.$box.outerHeight() - e.outerHeight() ? (s.hasClass("fr-hidden") && (s.hasClass("fr-on") && d(), s.removeClass("fr-hidden")), s.css("top", t - r)) : s.hasClass("fr-visible") && (s.addClass("fr-hidden"), f()), s.css("left", n)
  13723. }
  13724. function a(e) {
  13725. s || function t() {
  13726. i.shared.$quick_insert || (i.shared.$quick_insert = c(document.createElement("div")).attr("class", "fr-quick-insert").html('<a class="fr-floating-btn" role="button" tabIndex="-1" title="' + i.language.translate("Quick Insert") + '">' + i.icon.create("quickInsert") + "</a>"));
  13727. s = i.shared.$quick_insert, i.tooltip.bind(i.$box, ".fr-quick-insert > a.fr-floating-btn"), i.events.on("destroy", function() {
  13728. c("body").first().append(s.removeClass("fr-on")).css("left", -9999).css("top", -9999), l && (f(), c("body").first().append(l))
  13729. }, !0), i.events.on("shared.destroy", function() {
  13730. s.html("").removeData().remove(), s = null, l && (l.html("").removeData().remove(), l = null)
  13731. }, !0), i.events.on("commands.before", o), i.events.on("commands.after", function() {
  13732. i.popups.areVisible() || r()
  13733. }), i.events.bindClick(i.$box, ".fr-quick-insert > a", d), i.events.bindClick(i.$box, ".fr-qi-helper > a.fr-btn", function(e) {
  13734. var t = c(e.currentTarget).data("cmd");
  13735. if (!1 === i.events.trigger("quickInsert.commands.before", [t])) return !1;
  13736. $e.QUICK_INSERT_BUTTONS[t].callback.apply(i, [e.currentTarget]), $e.QUICK_INSERT_BUTTONS[t].undo && i.undo.saveStep(), i.events.trigger("quickInsert.commands.after", [t]), i.quickInsert.hide()
  13737. }), i.events.$on(i.$wp, "scroll", p), i.events.$on(i.$tb, "transitionend", ".fr-more-toolbar", p)
  13738. }(), s.hasClass("fr-on") && f(), i.$box.append(s), n(e), s.data("tag", e), s.addClass("fr-visible")
  13739. }
  13740. function r() {
  13741. if (i.core.hasFocus()) {
  13742. var e = i.selection.element();
  13743. if (i.opts.enter == $e.ENTER_BR || i.node.isBlock(e) || (e = i.node.blockParent(e)), i.opts.enter == $e.ENTER_BR && !i.node.isBlock(e)) {
  13744. var t = i.node.deepestParent(e);
  13745. t && (e = t)
  13746. }
  13747. var n = function n() {
  13748. return i.opts.enter != $e.ENTER_BR && i.node.isEmpty(e) && 0 <= i.opts.quickInsertTags.indexOf(e.tagName.toLowerCase())
  13749. },
  13750. r = function r() {
  13751. return i.opts.enter == $e.ENTER_BR && ("BR" == e.tagName && (!e.previousSibling || "BR" == e.previousSibling.tagName || i.node.isBlock(e.previousSibling)) || i.node.isEmpty(e) && (!e.previousSibling || "BR" == e.previousSibling.tagName || i.node.isBlock(e.previousSibling)) && (!e.nextSibling || "BR" == e.nextSibling.tagName || i.node.isBlock(e.nextSibling)))
  13752. };
  13753. e && (n() || r()) ? s && s.data("tag").is(c(e)) && s.hasClass("fr-on") ? f() : i.selection.isCollapsed() && a(c(e)) : o()
  13754. }
  13755. }
  13756. function o() {
  13757. s && (s.hasClass("fr-on") && f(), s.removeClass("fr-visible fr-on"), s.css("left", -9999).css("top", -9999))
  13758. }
  13759. function d(e) {
  13760. if (e && e.preventDefault(), s.hasClass("fr-on") && !s.hasClass("fr-hidden")) f();
  13761. else {
  13762. if (!i.shared.$qi_helper) {
  13763. for (var t = i.opts.quickInsertButtons, n = '<div class="fr-qi-helper">', r = 0, a = 0; a < t.length; a++) {
  13764. var o = $e.QUICK_INSERT_BUTTONS[t[a]];
  13765. o && (!o.requiredPlugin || $e.PLUGINS[o.requiredPlugin] && 0 <= i.opts.pluginsEnabled.indexOf(o.requiredPlugin)) && (n += '<a class="fr-btn fr-floating-btn" role="button" title="' + i.language.translate(o.title) + '" tabIndex="-1" data-cmd="' + t[a] + '" style="transition-delay: ' + .025 * r+++'s;">' + i.icon.create(o.icon) + "</a>")
  13766. }
  13767. n += "</div>", i.shared.$qi_helper = c(n), i.tooltip.bind(i.shared.$qi_helper, "a.fr-btn"), i.events.$on(i.shared.$qi_helper, "mousedown", function(e) {
  13768. e.preventDefault()
  13769. }, !0)
  13770. }
  13771. l = i.shared.$qi_helper, i.$box.append(l), setTimeout(function() {
  13772. l.css("top", parseFloat(s.css("top"))), l.css("left", parseFloat(s.css("left")) + s.outerWidth()), l.find("a").addClass("fr-size-1"), s.addClass("fr-on")
  13773. }, 10)
  13774. }
  13775. }
  13776. function f() {
  13777. var n = i.$box.find(".fr-qi-helper");
  13778. n.length && function() {
  13779. for (var t = n.find("a"), e = 0; e < t.length; e++)! function(e) {
  13780. setTimeout(function() {
  13781. n.children().eq(t.length - 1 - e).removeClass("fr-size-1")
  13782. }, 25 * e)
  13783. }(e);
  13784. setTimeout(function() {
  13785. n.css("left", -9999), s.hasClass("fr-hidden") || s.removeClass("fr-on")
  13786. }, 25 * e)
  13787. }()
  13788. }
  13789. function p() {
  13790. s.hasClass("fr-visible") && n(s.data("tag"))
  13791. }
  13792. return {
  13793. _init: function e() {
  13794. if (!i.$wp || !i.opts.quickInsertEnabled) return !1;
  13795. i.popups.onShow("image.edit", o), i.events.on("mouseup", r), i.helpers.isMobile() && i.events.$on(c(i.o_doc), "selectionchange", r), i.events.on("blur", o), i.events.on("keyup", r), i.events.on("keydown", function() {
  13796. setTimeout(function() {
  13797. r()
  13798. }, 0)
  13799. })
  13800. },
  13801. hide: o
  13802. }
  13803. }, $e.PLUGINS.quote = function(a) {
  13804. var o = a.$;
  13805. function i(e) {
  13806. for (; e.parentNode && e.parentNode != a.el;) e = e.parentNode;
  13807. return e
  13808. }
  13809. return {
  13810. apply: function t(e) {
  13811. a.selection.save(), a.html.wrap(!0, !0, !0, !0), a.selection.restore(), "increase" == e ? function r() {
  13812. var e, t = a.selection.blocks();
  13813. for (e = 0; e < t.length; e++) t[e] = i(t[e]);
  13814. a.selection.save();
  13815. var n = o(document.createElement("blockquote"));
  13816. for (n.insertBefore(t[0]), e = 0; e < t.length; e++) n.append(t[e]);
  13817. a.html.unwrap(), a.selection.restore()
  13818. }() : "decrease" == e && function n() {
  13819. var e, t = a.selection.blocks();
  13820. for (e = 0; e < t.length; e++) "BLOCKQUOTE" != t[e].tagName && (t[e] = o(t[e]).parentsUntil(a.$el, "BLOCKQUOTE").get(0));
  13821. for (a.selection.save(), e = 0; e < t.length; e++) t[e] && o(t[e]).replaceWith(t[e].innerHTML);
  13822. a.html.unwrap(), a.selection.restore()
  13823. }()
  13824. }
  13825. }
  13826. }, $e.RegisterShortcut($e.KEYCODE.SINGLE_QUOTE, "quote", "increase", "'"), $e.RegisterShortcut($e.KEYCODE.SINGLE_QUOTE, "quote", "decrease", "'", !0), $e.RegisterCommand("quote", {
  13827. title: "Quote",
  13828. type: "dropdown",
  13829. html: function() {
  13830. var e = '<ul class="fr-dropdown-list" role="presentation">',
  13831. t = {
  13832. increase: "Increase",
  13833. decrease: "Decrease"
  13834. };
  13835. for (var n in t)
  13836. if (t.hasOwnProperty(n)) {
  13837. var r = this.shortcuts.get("quote." + n);
  13838. e += '<li role="presentation"><a class="fr-command fr-active ' + n + '" tabIndex="-1" role="option" data-cmd="quote" data-param1="' + n + '" title="' + t[n] + '">' + this.language.translate(t[n]) + (r ? '<span class="fr-shortcut">' + r + "</span>" : "") + "</a></li>"
  13839. }
  13840. return e += "</ul>"
  13841. },
  13842. callback: function(e, t) {
  13843. this.quote.apply(t)
  13844. },
  13845. plugin: "quote"
  13846. }), $e.DefineIcon("quote", {
  13847. NAME: "quote-left",
  13848. SVG_KEY: "blockquote"
  13849. }), Object.assign($e.DEFAULTS, {
  13850. saveInterval: 1e4,
  13851. saveURL: null,
  13852. saveParams: {},
  13853. saveParam: "body",
  13854. saveMethod: "POST"
  13855. }), $e.PLUGINS.save = function(s) {
  13856. var l = s.$,
  13857. e = null,
  13858. c = null,
  13859. t = !1,
  13860. d = 1,
  13861. f = 2,
  13862. n = {};
  13863. function p(e, t) {
  13864. s.events.trigger("save.error", [{
  13865. code: e,
  13866. message: n[e]
  13867. },
  13868. t
  13869. ])
  13870. }
  13871. function r(e) {
  13872. void 0 === e && (e = s.html.get());
  13873. var r = e,
  13874. t = s.events.trigger("save.before", [e]);
  13875. if (!1 === t) return !1;
  13876. if ("string" == typeof t && (e = t), s.opts.saveURL) {
  13877. var n = {};
  13878. for (var a in s.opts.saveParams)
  13879. if (s.opts.saveParams.hasOwnProperty(a)) {
  13880. var o = s.opts.saveParams[a];
  13881. n[a] = "function" == typeof o ? o.call(this) : o
  13882. }
  13883. var i = {};
  13884. i[s.opts.saveParam] = e, l(this).ajax({
  13885. method: s.opts.saveMethod,
  13886. url: s.opts.saveURL,
  13887. data: Object.assign(i, n),
  13888. crossDomain: s.opts.requestWithCORS,
  13889. withCredentials: s.opts.requestWithCredentials,
  13890. headers: s.opts.requestHeaders,
  13891. done: function(e, t, n) {
  13892. c = r, s.events.trigger("save.after", [e])
  13893. },
  13894. fail: function(e) {
  13895. p(f, e.response || e.responseText)
  13896. }
  13897. })
  13898. } else p(d)
  13899. }
  13900. function a() {
  13901. clearTimeout(e), e = setTimeout(function() {
  13902. var e = s.html.get();
  13903. (c != e || t) && (t = !1, r(c = e))
  13904. }, s.opts.saveInterval)
  13905. }
  13906. return n[d] = "Missing saveURL option.", n[f] = "Something went wrong during save.", {
  13907. _init: function o() {
  13908. s.opts.saveInterval && (c = s.html.get(), s.events.on("contentChanged", a), s.events.on("keydown destroy", function() {
  13909. clearTimeout(e)
  13910. }))
  13911. },
  13912. save: r,
  13913. reset: function i() {
  13914. a(), t = !1
  13915. },
  13916. force: function u() {
  13917. t = !0
  13918. }
  13919. }
  13920. }, $e.DefineIcon("save", {
  13921. NAME: "floppy-o",
  13922. FA5NAME: "save"
  13923. }), $e.RegisterCommand("save", {
  13924. title: "Save",
  13925. undo: !1,
  13926. focus: !1,
  13927. refreshAfterCallback: !1,
  13928. callback: function() {
  13929. this.save.save()
  13930. },
  13931. plugin: "save"
  13932. }), Object.assign($e.DEFAULTS, {
  13933. specialCharactersSets: [{
  13934. title: "Latin",
  13935. "char": "&iexcl;",
  13936. list: [{
  13937. "char": "&iexcl;",
  13938. desc: "INVERTED EXCLAMATION MARK"
  13939. }, {
  13940. "char": "&cent;",
  13941. desc: "CENT SIGN"
  13942. }, {
  13943. "char": "&pound;",
  13944. desc: "POUND SIGN"
  13945. }, {
  13946. "char": "&curren;",
  13947. desc: "CURRENCY SIGN"
  13948. }, {
  13949. "char": "&yen;",
  13950. desc: "YEN SIGN"
  13951. }, {
  13952. "char": "&brvbar;",
  13953. desc: "BROKEN BAR"
  13954. }, {
  13955. "char": "&sect;",
  13956. desc: "SECTION SIGN"
  13957. }, {
  13958. "char": "&uml;",
  13959. desc: "DIAERESIS"
  13960. }, {
  13961. "char": "&copy;",
  13962. desc: "COPYRIGHT SIGN"
  13963. }, {
  13964. "char": "&trade;",
  13965. desc: "TRADEMARK SIGN"
  13966. }, {
  13967. "char": "&ordf;",
  13968. desc: "FEMININE ORDINAL INDICATOR"
  13969. }, {
  13970. "char": "&laquo;",
  13971. desc: "LEFT-POINTING DOUBLE ANGLE QUOTATION MARK"
  13972. }, {
  13973. "char": "&not;",
  13974. desc: "NOT SIGN"
  13975. }, {
  13976. "char": "&reg;",
  13977. desc: "REGISTERED SIGN"
  13978. }, {
  13979. "char": "&macr;",
  13980. desc: "MACRON"
  13981. }, {
  13982. "char": "&deg;",
  13983. desc: "DEGREE SIGN"
  13984. }, {
  13985. "char": "&plusmn;",
  13986. desc: "PLUS-MINUS SIGN"
  13987. }, {
  13988. "char": "&sup2;",
  13989. desc: "SUPERSCRIPT TWO"
  13990. }, {
  13991. "char": "&sup3;",
  13992. desc: "SUPERSCRIPT THREE"
  13993. }, {
  13994. "char": "&acute;",
  13995. desc: "ACUTE ACCENT"
  13996. }, {
  13997. "char": "&micro;",
  13998. desc: "MICRO SIGN"
  13999. }, {
  14000. "char": "&para;",
  14001. desc: "PILCROW SIGN"
  14002. }, {
  14003. "char": "&middot;",
  14004. desc: "MIDDLE DOT"
  14005. }, {
  14006. "char": "&cedil;",
  14007. desc: "CEDILLA"
  14008. }, {
  14009. "char": "&sup1;",
  14010. desc: "SUPERSCRIPT ONE"
  14011. }, {
  14012. "char": "&ordm;",
  14013. desc: "MASCULINE ORDINAL INDICATOR"
  14014. }, {
  14015. "char": "&raquo;",
  14016. desc: "RIGHT-POINTING DOUBLE ANGLE QUOTATION MARK"
  14017. }, {
  14018. "char": "&frac14;",
  14019. desc: "VULGAR FRACTION ONE QUARTER"
  14020. }, {
  14021. "char": "&frac12;",
  14022. desc: "VULGAR FRACTION ONE HALF"
  14023. }, {
  14024. "char": "&frac34;",
  14025. desc: "VULGAR FRACTION THREE QUARTERS"
  14026. }, {
  14027. "char": "&iquest;",
  14028. desc: "INVERTED QUESTION MARK"
  14029. }, {
  14030. "char": "&Agrave;",
  14031. desc: "LATIN CAPITAL LETTER A WITH GRAVE"
  14032. }, {
  14033. "char": "&Aacute;",
  14034. desc: "LATIN CAPITAL LETTER A WITH ACUTE"
  14035. }, {
  14036. "char": "&Acirc;",
  14037. desc: "LATIN CAPITAL LETTER A WITH CIRCUMFLEX"
  14038. }, {
  14039. "char": "&Atilde;",
  14040. desc: "LATIN CAPITAL LETTER A WITH TILDE"
  14041. }, {
  14042. "char": "&Auml;",
  14043. desc: "LATIN CAPITAL LETTER A WITH DIAERESIS "
  14044. }, {
  14045. "char": "&Aring;",
  14046. desc: "LATIN CAPITAL LETTER A WITH RING ABOVE"
  14047. }, {
  14048. "char": "&AElig;",
  14049. desc: "LATIN CAPITAL LETTER AE"
  14050. }, {
  14051. "char": "&Ccedil;",
  14052. desc: "LATIN CAPITAL LETTER C WITH CEDILLA"
  14053. }, {
  14054. "char": "&Egrave;",
  14055. desc: "LATIN CAPITAL LETTER E WITH GRAVE"
  14056. }, {
  14057. "char": "&Eacute;",
  14058. desc: "LATIN CAPITAL LETTER E WITH ACUTE"
  14059. }, {
  14060. "char": "&Ecirc;",
  14061. desc: "LATIN CAPITAL LETTER E WITH CIRCUMFLEX"
  14062. }, {
  14063. "char": "&Euml;",
  14064. desc: "LATIN CAPITAL LETTER E WITH DIAERESIS"
  14065. }, {
  14066. "char": "&Igrave;",
  14067. desc: "LATIN CAPITAL LETTER I WITH GRAVE"
  14068. }, {
  14069. "char": "&Iacute;",
  14070. desc: "LATIN CAPITAL LETTER I WITH ACUTE"
  14071. }, {
  14072. "char": "&Icirc;",
  14073. desc: "LATIN CAPITAL LETTER I WITH CIRCUMFLEX"
  14074. }, {
  14075. "char": "&Iuml;",
  14076. desc: "LATIN CAPITAL LETTER I WITH DIAERESIS"
  14077. }, {
  14078. "char": "&ETH;",
  14079. desc: "LATIN CAPITAL LETTER ETH"
  14080. }, {
  14081. "char": "&Ntilde;",
  14082. desc: "LATIN CAPITAL LETTER N WITH TILDE"
  14083. }, {
  14084. "char": "&Ograve;",
  14085. desc: "LATIN CAPITAL LETTER O WITH GRAVE"
  14086. }, {
  14087. "char": "&Oacute;",
  14088. desc: "LATIN CAPITAL LETTER O WITH ACUTE"
  14089. }, {
  14090. "char": "&Ocirc;",
  14091. desc: "LATIN CAPITAL LETTER O WITH CIRCUMFLEX"
  14092. }, {
  14093. "char": "&Otilde;",
  14094. desc: "LATIN CAPITAL LETTER O WITH TILDE"
  14095. }, {
  14096. "char": "&Ouml;",
  14097. desc: "LATIN CAPITAL LETTER O WITH DIAERESIS"
  14098. }, {
  14099. "char": "&times;",
  14100. desc: "MULTIPLICATION SIGN"
  14101. }, {
  14102. "char": "&Oslash;",
  14103. desc: "LATIN CAPITAL LETTER O WITH STROKE"
  14104. }, {
  14105. "char": "&Ugrave;",
  14106. desc: "LATIN CAPITAL LETTER U WITH GRAVE"
  14107. }, {
  14108. "char": "&Uacute;",
  14109. desc: "LATIN CAPITAL LETTER U WITH ACUTE"
  14110. }, {
  14111. "char": "&Ucirc;",
  14112. desc: "LATIN CAPITAL LETTER U WITH CIRCUMFLEX"
  14113. }, {
  14114. "char": "&Uuml;",
  14115. desc: "LATIN CAPITAL LETTER U WITH DIAERESIS"
  14116. }, {
  14117. "char": "&Yacute;",
  14118. desc: "LATIN CAPITAL LETTER Y WITH ACUTE"
  14119. }, {
  14120. "char": "&THORN;",
  14121. desc: "LATIN CAPITAL LETTER THORN"
  14122. }, {
  14123. "char": "&szlig;",
  14124. desc: "LATIN SMALL LETTER SHARP S"
  14125. }, {
  14126. "char": "&agrave;",
  14127. desc: "LATIN SMALL LETTER A WITH GRAVE"
  14128. }, {
  14129. "char": "&aacute;",
  14130. desc: "LATIN SMALL LETTER A WITH ACUTE "
  14131. }, {
  14132. "char": "&acirc;",
  14133. desc: "LATIN SMALL LETTER A WITH CIRCUMFLEX"
  14134. }, {
  14135. "char": "&atilde;",
  14136. desc: "LATIN SMALL LETTER A WITH TILDE"
  14137. }, {
  14138. "char": "&auml;",
  14139. desc: "LATIN SMALL LETTER A WITH DIAERESIS"
  14140. }, {
  14141. "char": "&aring;",
  14142. desc: "LATIN SMALL LETTER A WITH RING ABOVE"
  14143. }, {
  14144. "char": "&aelig;",
  14145. desc: "LATIN SMALL LETTER AE"
  14146. }, {
  14147. "char": "&ccedil;",
  14148. desc: "LATIN SMALL LETTER C WITH CEDILLA"
  14149. }, {
  14150. "char": "&egrave;",
  14151. desc: "LATIN SMALL LETTER E WITH GRAVE"
  14152. }, {
  14153. "char": "&eacute;",
  14154. desc: "LATIN SMALL LETTER E WITH ACUTE"
  14155. }, {
  14156. "char": "&ecirc;",
  14157. desc: "LATIN SMALL LETTER E WITH CIRCUMFLEX"
  14158. }, {
  14159. "char": "&euml;",
  14160. desc: "LATIN SMALL LETTER E WITH DIAERESIS"
  14161. }, {
  14162. "char": "&igrave;",
  14163. desc: "LATIN SMALL LETTER I WITH GRAVE"
  14164. }, {
  14165. "char": "&iacute;",
  14166. desc: "LATIN SMALL LETTER I WITH ACUTE"
  14167. }, {
  14168. "char": "&icirc;",
  14169. desc: "LATIN SMALL LETTER I WITH CIRCUMFLEX"
  14170. }, {
  14171. "char": "&iuml;",
  14172. desc: "LATIN SMALL LETTER I WITH DIAERESIS"
  14173. }, {
  14174. "char": "&eth;",
  14175. desc: "LATIN SMALL LETTER ETH"
  14176. }, {
  14177. "char": "&ntilde;",
  14178. desc: "LATIN SMALL LETTER N WITH TILDE"
  14179. }, {
  14180. "char": "&ograve;",
  14181. desc: "LATIN SMALL LETTER O WITH GRAVE"
  14182. }, {
  14183. "char": "&oacute;",
  14184. desc: "LATIN SMALL LETTER O WITH ACUTE"
  14185. }, {
  14186. "char": "&ocirc;",
  14187. desc: "LATIN SMALL LETTER O WITH CIRCUMFLEX"
  14188. }, {
  14189. "char": "&otilde;",
  14190. desc: "LATIN SMALL LETTER O WITH TILDE"
  14191. }, {
  14192. "char": "&ouml;",
  14193. desc: "LATIN SMALL LETTER O WITH DIAERESIS"
  14194. }, {
  14195. "char": "&divide;",
  14196. desc: "DIVISION SIGN"
  14197. }, {
  14198. "char": "&oslash;",
  14199. desc: "LATIN SMALL LETTER O WITH STROKE"
  14200. }, {
  14201. "char": "&ugrave;",
  14202. desc: "LATIN SMALL LETTER U WITH GRAVE"
  14203. }, {
  14204. "char": "&uacute;",
  14205. desc: "LATIN SMALL LETTER U WITH ACUTE"
  14206. }, {
  14207. "char": "&ucirc;",
  14208. desc: "LATIN SMALL LETTER U WITH CIRCUMFLEX"
  14209. }, {
  14210. "char": "&uuml;",
  14211. desc: "LATIN SMALL LETTER U WITH DIAERESIS"
  14212. }, {
  14213. "char": "&yacute;",
  14214. desc: "LATIN SMALL LETTER Y WITH ACUTE"
  14215. }, {
  14216. "char": "&thorn;",
  14217. desc: "LATIN SMALL LETTER THORN"
  14218. }, {
  14219. "char": "&yuml;",
  14220. desc: "LATIN SMALL LETTER Y WITH DIAERESIS"
  14221. }]
  14222. }, {
  14223. title: "Greek",
  14224. "char": "&Alpha;",
  14225. list: [{
  14226. "char": "&Alpha;",
  14227. desc: "GREEK CAPITAL LETTER ALPHA"
  14228. }, {
  14229. "char": "&Beta;",
  14230. desc: "GREEK CAPITAL LETTER BETA"
  14231. }, {
  14232. "char": "&Gamma;",
  14233. desc: "GREEK CAPITAL LETTER GAMMA"
  14234. }, {
  14235. "char": "&Delta;",
  14236. desc: "GREEK CAPITAL LETTER DELTA"
  14237. }, {
  14238. "char": "&Epsilon;",
  14239. desc: "GREEK CAPITAL LETTER EPSILON"
  14240. }, {
  14241. "char": "&Zeta;",
  14242. desc: "GREEK CAPITAL LETTER ZETA"
  14243. }, {
  14244. "char": "&Eta;",
  14245. desc: "GREEK CAPITAL LETTER ETA"
  14246. }, {
  14247. "char": "&Theta;",
  14248. desc: "GREEK CAPITAL LETTER THETA"
  14249. }, {
  14250. "char": "&Iota;",
  14251. desc: "GREEK CAPITAL LETTER IOTA"
  14252. }, {
  14253. "char": "&Kappa;",
  14254. desc: "GREEK CAPITAL LETTER KAPPA"
  14255. }, {
  14256. "char": "&Lambda;",
  14257. desc: "GREEK CAPITAL LETTER LAMBDA"
  14258. }, {
  14259. "char": "&Mu;",
  14260. desc: "GREEK CAPITAL LETTER MU"
  14261. }, {
  14262. "char": "&Nu;",
  14263. desc: "GREEK CAPITAL LETTER NU"
  14264. }, {
  14265. "char": "&Xi;",
  14266. desc: "GREEK CAPITAL LETTER XI"
  14267. }, {
  14268. "char": "&Omicron;",
  14269. desc: "GREEK CAPITAL LETTER OMICRON"
  14270. }, {
  14271. "char": "&Pi;",
  14272. desc: "GREEK CAPITAL LETTER PI"
  14273. }, {
  14274. "char": "&Rho;",
  14275. desc: "GREEK CAPITAL LETTER RHO"
  14276. }, {
  14277. "char": "&Sigma;",
  14278. desc: "GREEK CAPITAL LETTER SIGMA"
  14279. }, {
  14280. "char": "&Tau;",
  14281. desc: "GREEK CAPITAL LETTER TAU"
  14282. }, {
  14283. "char": "&Upsilon;",
  14284. desc: "GREEK CAPITAL LETTER UPSILON"
  14285. }, {
  14286. "char": "&Phi;",
  14287. desc: "GREEK CAPITAL LETTER PHI"
  14288. }, {
  14289. "char": "&Chi;",
  14290. desc: "GREEK CAPITAL LETTER CHI"
  14291. }, {
  14292. "char": "&Psi;",
  14293. desc: "GREEK CAPITAL LETTER PSI"
  14294. }, {
  14295. "char": "&Omega;",
  14296. desc: "GREEK CAPITAL LETTER OMEGA"
  14297. }, {
  14298. "char": "&alpha;",
  14299. desc: "GREEK SMALL LETTER ALPHA"
  14300. }, {
  14301. "char": "&beta;",
  14302. desc: "GREEK SMALL LETTER BETA"
  14303. }, {
  14304. "char": "&gamma;",
  14305. desc: "GREEK SMALL LETTER GAMMA"
  14306. }, {
  14307. "char": "&delta;",
  14308. desc: "GREEK SMALL LETTER DELTA"
  14309. }, {
  14310. "char": "&epsilon;",
  14311. desc: "GREEK SMALL LETTER EPSILON"
  14312. }, {
  14313. "char": "&zeta;",
  14314. desc: "GREEK SMALL LETTER ZETA"
  14315. }, {
  14316. "char": "&eta;",
  14317. desc: "GREEK SMALL LETTER ETA"
  14318. }, {
  14319. "char": "&theta;",
  14320. desc: "GREEK SMALL LETTER THETA"
  14321. }, {
  14322. "char": "&iota;",
  14323. desc: "GREEK SMALL LETTER IOTA"
  14324. }, {
  14325. "char": "&kappa;",
  14326. desc: "GREEK SMALL LETTER KAPPA"
  14327. }, {
  14328. "char": "&lambda;",
  14329. desc: "GREEK SMALL LETTER LAMBDA"
  14330. }, {
  14331. "char": "&mu;",
  14332. desc: "GREEK SMALL LETTER MU"
  14333. }, {
  14334. "char": "&nu;",
  14335. desc: "GREEK SMALL LETTER NU"
  14336. }, {
  14337. "char": "&xi;",
  14338. desc: "GREEK SMALL LETTER XI"
  14339. }, {
  14340. "char": "&omicron;",
  14341. desc: "GREEK SMALL LETTER OMICRON"
  14342. }, {
  14343. "char": "&pi;",
  14344. desc: "GREEK SMALL LETTER PI"
  14345. }, {
  14346. "char": "&rho;",
  14347. desc: "GREEK SMALL LETTER RHO"
  14348. }, {
  14349. "char": "&sigmaf;",
  14350. desc: "GREEK SMALL LETTER FINAL SIGMA"
  14351. }, {
  14352. "char": "&sigma;",
  14353. desc: "GREEK SMALL LETTER SIGMA"
  14354. }, {
  14355. "char": "&tau;",
  14356. desc: "GREEK SMALL LETTER TAU"
  14357. }, {
  14358. "char": "&upsilon;",
  14359. desc: "GREEK SMALL LETTER UPSILON"
  14360. }, {
  14361. "char": "&phi;",
  14362. desc: "GREEK SMALL LETTER PHI"
  14363. }, {
  14364. "char": "&chi;",
  14365. desc: "GREEK SMALL LETTER CHI"
  14366. }, {
  14367. "char": "&psi;",
  14368. desc: "GREEK SMALL LETTER PSI"
  14369. }, {
  14370. "char": "&omega;",
  14371. desc: "GREEK SMALL LETTER OMEGA"
  14372. }, {
  14373. "char": "&thetasym;",
  14374. desc: "GREEK THETA SYMBOL"
  14375. }, {
  14376. "char": "&upsih;",
  14377. desc: "GREEK UPSILON WITH HOOK SYMBOL"
  14378. }, {
  14379. "char": "&straightphi;",
  14380. desc: "GREEK PHI SYMBOL"
  14381. }, {
  14382. "char": "&piv;",
  14383. desc: "GREEK PI SYMBOL"
  14384. }, {
  14385. "char": "&Gammad;",
  14386. desc: "GREEK LETTER DIGAMMA"
  14387. }, {
  14388. "char": "&gammad;",
  14389. desc: "GREEK SMALL LETTER DIGAMMA"
  14390. }, {
  14391. "char": "&varkappa;",
  14392. desc: "GREEK KAPPA SYMBOL"
  14393. }, {
  14394. "char": "&varrho;",
  14395. desc: "GREEK RHO SYMBOL"
  14396. }, {
  14397. "char": "&straightepsilon;",
  14398. desc: "GREEK LUNATE EPSILON SYMBOL"
  14399. }, {
  14400. "char": "&backepsilon;",
  14401. desc: "GREEK REVERSED LUNATE EPSILON SYMBOL"
  14402. }]
  14403. }, {
  14404. title: "Cyrillic",
  14405. "char": "&#x400",
  14406. list: [{
  14407. "char": "&#x400",
  14408. desc: "CYRILLIC CAPITAL LETTER IE WITH GRAVE"
  14409. }, {
  14410. "char": "&#x401",
  14411. desc: "CYRILLIC CAPITAL LETTER IO"
  14412. }, {
  14413. "char": "&#x402",
  14414. desc: "CYRILLIC CAPITAL LETTER DJE"
  14415. }, {
  14416. "char": "&#x403",
  14417. desc: "CYRILLIC CAPITAL LETTER GJE"
  14418. }, {
  14419. "char": "&#x404",
  14420. desc: "CYRILLIC CAPITAL LETTER UKRAINIAN IE"
  14421. }, {
  14422. "char": "&#x405",
  14423. desc: "CYRILLIC CAPITAL LETTER DZE"
  14424. }, {
  14425. "char": "&#x406",
  14426. desc: "CYRILLIC CAPITAL LETTER BYELORUSSIAN-UKRAINIAN I"
  14427. }, {
  14428. "char": "&#x407",
  14429. desc: "CYRILLIC CAPITAL LETTER YI"
  14430. }, {
  14431. "char": "&#x408",
  14432. desc: "CYRILLIC CAPITAL LETTER JE"
  14433. }, {
  14434. "char": "&#x409",
  14435. desc: "CYRILLIC CAPITAL LETTER LJE"
  14436. }, {
  14437. "char": "&#x40A",
  14438. desc: "CYRILLIC CAPITAL LETTER NJE"
  14439. }, {
  14440. "char": "&#x40B",
  14441. desc: "CYRILLIC CAPITAL LETTER TSHE"
  14442. }, {
  14443. "char": "&#x40C",
  14444. desc: "CYRILLIC CAPITAL LETTER KJE"
  14445. }, {
  14446. "char": "&#x40D",
  14447. desc: "CYRILLIC CAPITAL LETTER I WITH GRAVE"
  14448. }, {
  14449. "char": "&#x40E",
  14450. desc: "CYRILLIC CAPITAL LETTER SHORT U"
  14451. }, {
  14452. "char": "&#x40F",
  14453. desc: "CYRILLIC CAPITAL LETTER DZHE"
  14454. }, {
  14455. "char": "&#x410",
  14456. desc: "CYRILLIC CAPITAL LETTER A"
  14457. }, {
  14458. "char": "&#x411",
  14459. desc: "CYRILLIC CAPITAL LETTER BE"
  14460. }, {
  14461. "char": "&#x412",
  14462. desc: "CYRILLIC CAPITAL LETTER VE"
  14463. }, {
  14464. "char": "&#x413",
  14465. desc: "CYRILLIC CAPITAL LETTER GHE"
  14466. }, {
  14467. "char": "&#x414",
  14468. desc: "CYRILLIC CAPITAL LETTER DE"
  14469. }, {
  14470. "char": "&#x415",
  14471. desc: "CYRILLIC CAPITAL LETTER IE"
  14472. }, {
  14473. "char": "&#x416",
  14474. desc: "CYRILLIC CAPITAL LETTER ZHE"
  14475. }, {
  14476. "char": "&#x417",
  14477. desc: "CYRILLIC CAPITAL LETTER ZE"
  14478. }, {
  14479. "char": "&#x418",
  14480. desc: "CYRILLIC CAPITAL LETTER I"
  14481. }, {
  14482. "char": "&#x419",
  14483. desc: "CYRILLIC CAPITAL LETTER SHORT I"
  14484. }, {
  14485. "char": "&#x41A",
  14486. desc: "CYRILLIC CAPITAL LETTER KA"
  14487. }, {
  14488. "char": "&#x41B",
  14489. desc: "CYRILLIC CAPITAL LETTER EL"
  14490. }, {
  14491. "char": "&#x41C",
  14492. desc: "CYRILLIC CAPITAL LETTER EM"
  14493. }, {
  14494. "char": "&#x41D",
  14495. desc: "CYRILLIC CAPITAL LETTER EN"
  14496. }, {
  14497. "char": "&#x41E",
  14498. desc: "CYRILLIC CAPITAL LETTER O"
  14499. }, {
  14500. "char": "&#x41F",
  14501. desc: "CYRILLIC CAPITAL LETTER PE"
  14502. }, {
  14503. "char": "&#x420",
  14504. desc: "CYRILLIC CAPITAL LETTER ER"
  14505. }, {
  14506. "char": "&#x421",
  14507. desc: "CYRILLIC CAPITAL LETTER ES"
  14508. }, {
  14509. "char": "&#x422",
  14510. desc: "CYRILLIC CAPITAL LETTER TE"
  14511. }, {
  14512. "char": "&#x423",
  14513. desc: "CYRILLIC CAPITAL LETTER U"
  14514. }, {
  14515. "char": "&#x424",
  14516. desc: "CYRILLIC CAPITAL LETTER EF"
  14517. }, {
  14518. "char": "&#x425",
  14519. desc: "CYRILLIC CAPITAL LETTER HA"
  14520. }, {
  14521. "char": "&#x426",
  14522. desc: "CYRILLIC CAPITAL LETTER TSE"
  14523. }, {
  14524. "char": "&#x427",
  14525. desc: "CYRILLIC CAPITAL LETTER CHE"
  14526. }, {
  14527. "char": "&#x428",
  14528. desc: "CYRILLIC CAPITAL LETTER SHA"
  14529. }, {
  14530. "char": "&#x429",
  14531. desc: "CYRILLIC CAPITAL LETTER SHCHA"
  14532. }, {
  14533. "char": "&#x42A",
  14534. desc: "CYRILLIC CAPITAL LETTER HARD SIGN"
  14535. }, {
  14536. "char": "&#x42B",
  14537. desc: "CYRILLIC CAPITAL LETTER YERU"
  14538. }, {
  14539. "char": "&#x42C",
  14540. desc: "CYRILLIC CAPITAL LETTER SOFT SIGN"
  14541. }, {
  14542. "char": "&#x42D",
  14543. desc: "CYRILLIC CAPITAL LETTER E"
  14544. }, {
  14545. "char": "&#x42E",
  14546. desc: "CYRILLIC CAPITAL LETTER YU"
  14547. }, {
  14548. "char": "&#x42F",
  14549. desc: "CYRILLIC CAPITAL LETTER YA"
  14550. }, {
  14551. "char": "&#x430",
  14552. desc: "CYRILLIC SMALL LETTER A"
  14553. }, {
  14554. "char": "&#x431",
  14555. desc: "CYRILLIC SMALL LETTER BE"
  14556. }, {
  14557. "char": "&#x432",
  14558. desc: "CYRILLIC SMALL LETTER VE"
  14559. }, {
  14560. "char": "&#x433",
  14561. desc: "CYRILLIC SMALL LETTER GHE"
  14562. }, {
  14563. "char": "&#x434",
  14564. desc: "CYRILLIC SMALL LETTER DE"
  14565. }, {
  14566. "char": "&#x435",
  14567. desc: "CYRILLIC SMALL LETTER IE"
  14568. }, {
  14569. "char": "&#x436",
  14570. desc: "CYRILLIC SMALL LETTER ZHE"
  14571. }, {
  14572. "char": "&#x437",
  14573. desc: "CYRILLIC SMALL LETTER ZE"
  14574. }, {
  14575. "char": "&#x438",
  14576. desc: "CYRILLIC SMALL LETTER I"
  14577. }, {
  14578. "char": "&#x439",
  14579. desc: "CYRILLIC SMALL LETTER SHORT I"
  14580. }, {
  14581. "char": "&#x43A",
  14582. desc: "CYRILLIC SMALL LETTER KA"
  14583. }, {
  14584. "char": "&#x43B",
  14585. desc: "CYRILLIC SMALL LETTER EL"
  14586. }, {
  14587. "char": "&#x43C",
  14588. desc: "CYRILLIC SMALL LETTER EM"
  14589. }, {
  14590. "char": "&#x43D",
  14591. desc: "CYRILLIC SMALL LETTER EN"
  14592. }, {
  14593. "char": "&#x43E",
  14594. desc: "CYRILLIC SMALL LETTER O"
  14595. }, {
  14596. "char": "&#x43F",
  14597. desc: "CYRILLIC SMALL LETTER PE"
  14598. }, {
  14599. "char": "&#x440",
  14600. desc: "CYRILLIC SMALL LETTER ER"
  14601. }, {
  14602. "char": "&#x441",
  14603. desc: "CYRILLIC SMALL LETTER ES"
  14604. }, {
  14605. "char": "&#x442",
  14606. desc: "CYRILLIC SMALL LETTER TE"
  14607. }, {
  14608. "char": "&#x443",
  14609. desc: "CYRILLIC SMALL LETTER U"
  14610. }, {
  14611. "char": "&#x444",
  14612. desc: "CYRILLIC SMALL LETTER EF"
  14613. }, {
  14614. "char": "&#x445",
  14615. desc: "CYRILLIC SMALL LETTER HA"
  14616. }, {
  14617. "char": "&#x446",
  14618. desc: "CYRILLIC SMALL LETTER TSE"
  14619. }, {
  14620. "char": "&#x447",
  14621. desc: "CYRILLIC SMALL LETTER CHE"
  14622. }, {
  14623. "char": "&#x448",
  14624. desc: "CYRILLIC SMALL LETTER SHA"
  14625. }, {
  14626. "char": "&#x449",
  14627. desc: "CYRILLIC SMALL LETTER SHCHA"
  14628. }, {
  14629. "char": "&#x44A",
  14630. desc: "CYRILLIC SMALL LETTER HARD SIGN"
  14631. }, {
  14632. "char": "&#x44B",
  14633. desc: "CYRILLIC SMALL LETTER YERU"
  14634. }, {
  14635. "char": "&#x44C",
  14636. desc: "CYRILLIC SMALL LETTER SOFT SIGN"
  14637. }, {
  14638. "char": "&#x44D",
  14639. desc: "CYRILLIC SMALL LETTER E"
  14640. }, {
  14641. "char": "&#x44E",
  14642. desc: "CYRILLIC SMALL LETTER YU"
  14643. }, {
  14644. "char": "&#x44F",
  14645. desc: "CYRILLIC SMALL LETTER YA"
  14646. }, {
  14647. "char": "&#x450",
  14648. desc: "CYRILLIC SMALL LETTER IE WITH GRAVE"
  14649. }, {
  14650. "char": "&#x451",
  14651. desc: "CYRILLIC SMALL LETTER IO"
  14652. }, {
  14653. "char": "&#x452",
  14654. desc: "CYRILLIC SMALL LETTER DJE"
  14655. }, {
  14656. "char": "&#x453",
  14657. desc: "CYRILLIC SMALL LETTER GJE"
  14658. }, {
  14659. "char": "&#x454",
  14660. desc: "CYRILLIC SMALL LETTER UKRAINIAN IE"
  14661. }, {
  14662. "char": "&#x455",
  14663. desc: "CYRILLIC SMALL LETTER DZE"
  14664. }, {
  14665. "char": "&#x456",
  14666. desc: "CYRILLIC SMALL LETTER BYELORUSSIAN-UKRAINIAN I"
  14667. }, {
  14668. "char": "&#x457",
  14669. desc: "CYRILLIC SMALL LETTER YI"
  14670. }, {
  14671. "char": "&#x458",
  14672. desc: "CYRILLIC SMALL LETTER JE"
  14673. }, {
  14674. "char": "&#x459",
  14675. desc: "CYRILLIC SMALL LETTER LJE"
  14676. }, {
  14677. "char": "&#x45A",
  14678. desc: "CYRILLIC SMALL LETTER NJE"
  14679. }, {
  14680. "char": "&#x45B",
  14681. desc: "CYRILLIC SMALL LETTER TSHE"
  14682. }, {
  14683. "char": "&#x45C",
  14684. desc: "CYRILLIC SMALL LETTER KJE"
  14685. }, {
  14686. "char": "&#x45D",
  14687. desc: "CYRILLIC SMALL LETTER I WITH GRAVE"
  14688. }, {
  14689. "char": "&#x45E",
  14690. desc: "CYRILLIC SMALL LETTER SHORT U"
  14691. }, {
  14692. "char": "&#x45F",
  14693. desc: "CYRILLIC SMALL LETTER DZHE"
  14694. }]
  14695. }, {
  14696. title: "Punctuation",
  14697. "char": "&ndash;",
  14698. list: [{
  14699. "char": "&ndash;",
  14700. desc: "EN DASH"
  14701. }, {
  14702. "char": "&mdash;",
  14703. desc: "EM DASH"
  14704. }, {
  14705. "char": "&lsquo;",
  14706. desc: "LEFT SINGLE QUOTATION MARK"
  14707. }, {
  14708. "char": "&rsquo;",
  14709. desc: "RIGHT SINGLE QUOTATION MARK"
  14710. }, {
  14711. "char": "&sbquo;",
  14712. desc: "SINGLE LOW-9 QUOTATION MARK"
  14713. }, {
  14714. "char": "&ldquo;",
  14715. desc: "LEFT DOUBLE QUOTATION MARK"
  14716. }, {
  14717. "char": "&rdquo;",
  14718. desc: "RIGHT DOUBLE QUOTATION MARK"
  14719. }, {
  14720. "char": "&bdquo;",
  14721. desc: "DOUBLE LOW-9 QUOTATION MARK"
  14722. }, {
  14723. "char": "&dagger;",
  14724. desc: "DAGGER"
  14725. }, {
  14726. "char": "&Dagger;",
  14727. desc: "DOUBLE DAGGER"
  14728. }, {
  14729. "char": "&bull;",
  14730. desc: "BULLET"
  14731. }, {
  14732. "char": "&hellip;",
  14733. desc: "HORIZONTAL ELLIPSIS"
  14734. }, {
  14735. "char": "&permil;",
  14736. desc: "PER MILLE SIGN"
  14737. }, {
  14738. "char": "&prime;",
  14739. desc: "PRIME"
  14740. }, {
  14741. "char": "&Prime;",
  14742. desc: "DOUBLE PRIME"
  14743. }, {
  14744. "char": "&lsaquo;",
  14745. desc: "SINGLE LEFT-POINTING ANGLE QUOTATION MARK"
  14746. }, {
  14747. "char": "&rsaquo;",
  14748. desc: "SINGLE RIGHT-POINTING ANGLE QUOTATION MARK"
  14749. }, {
  14750. "char": "&oline;",
  14751. desc: "OVERLINE"
  14752. }, {
  14753. "char": "&frasl;",
  14754. desc: "FRACTION SLASH"
  14755. }]
  14756. }, {
  14757. title: "Currency",
  14758. "char": "&#x20A0",
  14759. list: [{
  14760. "char": "&#x20A0",
  14761. desc: "EURO-CURRENCY SIGN"
  14762. }, {
  14763. "char": "&#x20A1",
  14764. desc: "COLON SIGN"
  14765. }, {
  14766. "char": "&#x20A2",
  14767. desc: "CRUZEIRO SIGN"
  14768. }, {
  14769. "char": "&#x20A3",
  14770. desc: "FRENCH FRANC SIGN"
  14771. }, {
  14772. "char": "&#x20A4",
  14773. desc: "LIRA SIGN"
  14774. }, {
  14775. "char": "&#x20A5",
  14776. desc: "MILL SIGN"
  14777. }, {
  14778. "char": "&#x20A6",
  14779. desc: "NAIRA SIGN"
  14780. }, {
  14781. "char": "&#x20A7",
  14782. desc: "PESETA SIGN"
  14783. }, {
  14784. "char": "&#x20A8",
  14785. desc: "RUPEE SIGN"
  14786. }, {
  14787. "char": "&#x20A9",
  14788. desc: "WON SIGN"
  14789. }, {
  14790. "char": "&#x20AA",
  14791. desc: "NEW SHEQEL SIGN"
  14792. }, {
  14793. "char": "&#x20AB",
  14794. desc: "DONG SIGN"
  14795. }, {
  14796. "char": "&#x20AC",
  14797. desc: "EURO SIGN"
  14798. }, {
  14799. "char": "&#x20AD",
  14800. desc: "KIP SIGN"
  14801. }, {
  14802. "char": "&#x20AE",
  14803. desc: "TUGRIK SIGN"
  14804. }, {
  14805. "char": "&#x20AF",
  14806. desc: "DRACHMA SIGN"
  14807. }, {
  14808. "char": "&#x20B0",
  14809. desc: "GERMAN PENNY SYMBOL"
  14810. }, {
  14811. "char": "&#x20B1",
  14812. desc: "PESO SIGN"
  14813. }, {
  14814. "char": "&#x20B2",
  14815. desc: "GUARANI SIGN"
  14816. }, {
  14817. "char": "&#x20B3",
  14818. desc: "AUSTRAL SIGN"
  14819. }, {
  14820. "char": "&#x20B4",
  14821. desc: "HRYVNIA SIGN"
  14822. }, {
  14823. "char": "&#x20B5",
  14824. desc: "CEDI SIGN"
  14825. }, {
  14826. "char": "&#x20B6",
  14827. desc: "LIVRE TOURNOIS SIGN"
  14828. }, {
  14829. "char": "&#x20B7",
  14830. desc: "SPESMILO SIGN"
  14831. }, {
  14832. "char": "&#x20B8",
  14833. desc: "TENGE SIGN"
  14834. }, {
  14835. "char": "&#x20B9",
  14836. desc: "INDIAN RUPEE SIGN"
  14837. }]
  14838. }, {
  14839. title: "Arrows",
  14840. "char": "&#x2190",
  14841. list: [{
  14842. "char": "&#x2190",
  14843. desc: "LEFTWARDS ARROW"
  14844. }, {
  14845. "char": "&#x2191",
  14846. desc: "UPWARDS ARROW"
  14847. }, {
  14848. "char": "&#x2192",
  14849. desc: "RIGHTWARDS ARROW"
  14850. }, {
  14851. "char": "&#x2193",
  14852. desc: "DOWNWARDS ARROW"
  14853. }, {
  14854. "char": "&#x2194",
  14855. desc: "LEFT RIGHT ARROW"
  14856. }, {
  14857. "char": "&#x2195",
  14858. desc: "UP DOWN ARROW"
  14859. }, {
  14860. "char": "&#x2196",
  14861. desc: "NORTH WEST ARROW"
  14862. }, {
  14863. "char": "&#x2197",
  14864. desc: "NORTH EAST ARROW"
  14865. }, {
  14866. "char": "&#x2198",
  14867. desc: "SOUTH EAST ARROW"
  14868. }, {
  14869. "char": "&#x2199",
  14870. desc: "SOUTH WEST ARROW"
  14871. }, {
  14872. "char": "&#x219A",
  14873. desc: "LEFTWARDS ARROW WITH STROKE"
  14874. }, {
  14875. "char": "&#x219B",
  14876. desc: "RIGHTWARDS ARROW WITH STROKE"
  14877. }, {
  14878. "char": "&#x219C",
  14879. desc: "LEFTWARDS WAVE ARROW"
  14880. }, {
  14881. "char": "&#x219D",
  14882. desc: "RIGHTWARDS WAVE ARROW"
  14883. }, {
  14884. "char": "&#x219E",
  14885. desc: "LEFTWARDS TWO HEADED ARROW"
  14886. }, {
  14887. "char": "&#x219F",
  14888. desc: "UPWARDS TWO HEADED ARROW"
  14889. }, {
  14890. "char": "&#x21A0",
  14891. desc: "RIGHTWARDS TWO HEADED ARROW"
  14892. }, {
  14893. "char": "&#x21A1",
  14894. desc: "DOWNWARDS TWO HEADED ARROW"
  14895. }, {
  14896. "char": "&#x21A2",
  14897. desc: "LEFTWARDS ARROW WITH TAIL"
  14898. }, {
  14899. "char": "&#x21A3",
  14900. desc: "RIGHTWARDS ARROW WITH TAIL"
  14901. }, {
  14902. "char": "&#x21A4",
  14903. desc: "LEFTWARDS ARROW FROM BAR"
  14904. }, {
  14905. "char": "&#x21A5",
  14906. desc: "UPWARDS ARROW FROM BAR"
  14907. }, {
  14908. "char": "&#x21A6",
  14909. desc: "RIGHTWARDS ARROW FROM BAR"
  14910. }, {
  14911. "char": "&#x21A7",
  14912. desc: "DOWNWARDS ARROW FROM BAR"
  14913. }, {
  14914. "char": "&#x21A8",
  14915. desc: "UP DOWN ARROW WITH BASE"
  14916. }, {
  14917. "char": "&#x21A9",
  14918. desc: "LEFTWARDS ARROW WITH HOOK"
  14919. }, {
  14920. "char": "&#x21AA",
  14921. desc: "RIGHTWARDS ARROW WITH HOOK"
  14922. }, {
  14923. "char": "&#x21AB",
  14924. desc: "LEFTWARDS ARROW WITH LOOP"
  14925. }, {
  14926. "char": "&#x21AC",
  14927. desc: "RIGHTWARDS ARROW WITH LOOP"
  14928. }, {
  14929. "char": "&#x21AD",
  14930. desc: "LEFT RIGHT WAVE ARROW"
  14931. }, {
  14932. "char": "&#x21AE",
  14933. desc: "LEFT RIGHT ARROW WITH STROKE"
  14934. }, {
  14935. "char": "&#x21AF",
  14936. desc: "DOWNWARDS ZIGZAG ARROW"
  14937. }, {
  14938. "char": "&#x21B0",
  14939. desc: "UPWARDS ARROW WITH TIP LEFTWARDS"
  14940. }, {
  14941. "char": "&#x21B1",
  14942. desc: "UPWARDS ARROW WITH TIP RIGHTWARDS"
  14943. }, {
  14944. "char": "&#x21B2",
  14945. desc: "DOWNWARDS ARROW WITH TIP LEFTWARDS"
  14946. }, {
  14947. "char": "&#x21B3",
  14948. desc: "DOWNWARDS ARROW WITH TIP RIGHTWARDS"
  14949. }, {
  14950. "char": "&#x21B4",
  14951. desc: "RIGHTWARDS ARROW WITH CORNER DOWNWARDS"
  14952. }, {
  14953. "char": "&#x21B5",
  14954. desc: "DOWNWARDS ARROW WITH CORNER LEFTWARDS"
  14955. }, {
  14956. "char": "&#x21B6",
  14957. desc: "ANTICLOCKWISE TOP SEMICIRCLE ARROW"
  14958. }, {
  14959. "char": "&#x21B7",
  14960. desc: "CLOCKWISE TOP SEMICIRCLE ARROW"
  14961. }, {
  14962. "char": "&#x21B8",
  14963. desc: "NORTH WEST ARROW TO LONG BAR"
  14964. }, {
  14965. "char": "&#x21B9",
  14966. desc: "LEFTWARDS ARROW TO BAR OVER RIGHTWARDS ARROW TO BAR"
  14967. }, {
  14968. "char": "&#x21BA",
  14969. desc: "ANTICLOCKWISE OPEN CIRCLE ARROW"
  14970. }, {
  14971. "char": "&#x21BB",
  14972. desc: "CLOCKWISE OPEN CIRCLE ARROW"
  14973. }, {
  14974. "char": "&#x21BC",
  14975. desc: "LEFTWARDS HARPOON WITH BARB UPWARDS"
  14976. }, {
  14977. "char": "&#x21BD",
  14978. desc: "LEFTWARDS HARPOON WITH BARB DOWNWARDS"
  14979. }, {
  14980. "char": "&#x21BE",
  14981. desc: "UPWARDS HARPOON WITH BARB RIGHTWARDS"
  14982. }, {
  14983. "char": "&#x21BF",
  14984. desc: "UPWARDS HARPOON WITH BARB LEFTWARDS"
  14985. }, {
  14986. "char": "&#x21C0",
  14987. desc: "RIGHTWARDS HARPOON WITH BARB UPWARDS"
  14988. }, {
  14989. "char": "&#x21C1",
  14990. desc: "RIGHTWARDS HARPOON WITH BARB DOWNWARDS"
  14991. }, {
  14992. "char": "&#x21C2",
  14993. desc: "DOWNWARDS HARPOON WITH BARB RIGHTWARDS"
  14994. }, {
  14995. "char": "&#x21C3",
  14996. desc: "DOWNWARDS HARPOON WITH BARB LEFTWARDS"
  14997. }, {
  14998. "char": "&#x21C4",
  14999. desc: "RIGHTWARDS ARROW OVER LEFTWARDS ARROW"
  15000. }, {
  15001. "char": "&#x21C5",
  15002. desc: "UPWARDS ARROW LEFTWARDS OF DOWNWARDS ARROW"
  15003. }, {
  15004. "char": "&#x21C6",
  15005. desc: "LEFTWARDS ARROW OVER RIGHTWARDS ARROW"
  15006. }, {
  15007. "char": "&#x21C7",
  15008. desc: "LEFTWARDS PAIRED ARROWS"
  15009. }, {
  15010. "char": "&#x21C8",
  15011. desc: "UPWARDS PAIRED ARROWS"
  15012. }, {
  15013. "char": "&#x21C9",
  15014. desc: "RIGHTWARDS PAIRED ARROWS"
  15015. }, {
  15016. "char": "&#x21CA",
  15017. desc: "DOWNWARDS PAIRED ARROWS"
  15018. }, {
  15019. "char": "&#x21CB",
  15020. desc: "LEFTWARDS HARPOON OVER RIGHTWARDS HARPOON"
  15021. }, {
  15022. "char": "&#x21CC",
  15023. desc: "RIGHTWARDS HARPOON OVER LEFTWARDS HARPOON"
  15024. }, {
  15025. "char": "&#x21CD",
  15026. desc: "LEFTWARDS DOUBLE ARROW WITH STROKE"
  15027. }, {
  15028. "char": "&#x21CE",
  15029. desc: "LEFT RIGHT DOUBLE ARROW WITH STROKE"
  15030. }, {
  15031. "char": "&#x21CF",
  15032. desc: "RIGHTWARDS DOUBLE ARROW WITH STROKE"
  15033. }, {
  15034. "char": "&#x21D0",
  15035. desc: "LEFTWARDS DOUBLE ARROW"
  15036. }, {
  15037. "char": "&#x21D1",
  15038. desc: "UPWARDS DOUBLE ARROW"
  15039. }, {
  15040. "char": "&#x21D2",
  15041. desc: "RIGHTWARDS DOUBLE ARROW"
  15042. }, {
  15043. "char": "&#x21D3",
  15044. desc: "DOWNWARDS DOUBLE ARROW"
  15045. }, {
  15046. "char": "&#x21D4",
  15047. desc: "LEFT RIGHT DOUBLE ARROW"
  15048. }, {
  15049. "char": "&#x21D5",
  15050. desc: "UP DOWN DOUBLE ARROW"
  15051. }, {
  15052. "char": "&#x21D6",
  15053. desc: "NORTH WEST DOUBLE ARROW"
  15054. }, {
  15055. "char": "&#x21D7",
  15056. desc: "NORTH EAST DOUBLE ARROW"
  15057. }, {
  15058. "char": "&#x21D8",
  15059. desc: "SOUTH EAST DOUBLE ARROW"
  15060. }, {
  15061. "char": "&#x21D9",
  15062. desc: "SOUTH WEST DOUBLE ARROW"
  15063. }, {
  15064. "char": "&#x21DA",
  15065. desc: "LEFTWARDS TRIPLE ARROW"
  15066. }, {
  15067. "char": "&#x21DB",
  15068. desc: "RIGHTWARDS TRIPLE ARROW"
  15069. }, {
  15070. "char": "&#x21DC",
  15071. desc: "LEFTWARDS SQUIGGLE ARROW"
  15072. }, {
  15073. "char": "&#x21DD",
  15074. desc: "RIGHTWARDS SQUIGGLE ARROW"
  15075. }, {
  15076. "char": "&#x21DE",
  15077. desc: "UPWARDS ARROW WITH DOUBLE STROKE"
  15078. }, {
  15079. "char": "&#x21DF",
  15080. desc: "DOWNWARDS ARROW WITH DOUBLE STROKE"
  15081. }, {
  15082. "char": "&#x21E0",
  15083. desc: "LEFTWARDS DASHED ARROW"
  15084. }, {
  15085. "char": "&#x21E1",
  15086. desc: "UPWARDS DASHED ARROW"
  15087. }, {
  15088. "char": "&#x21E2",
  15089. desc: "RIGHTWARDS DASHED ARROW"
  15090. }, {
  15091. "char": "&#x21E3",
  15092. desc: "DOWNWARDS DASHED ARROW"
  15093. }, {
  15094. "char": "&#x21E4",
  15095. desc: "LEFTWARDS ARROW TO BAR"
  15096. }, {
  15097. "char": "&#x21E5",
  15098. desc: "RIGHTWARDS ARROW TO BAR"
  15099. }, {
  15100. "char": "&#x21E6",
  15101. desc: "LEFTWARDS WHITE ARROW"
  15102. }, {
  15103. "char": "&#x21E7",
  15104. desc: "UPWARDS WHITE ARROW"
  15105. }, {
  15106. "char": "&#x21E8",
  15107. desc: "RIGHTWARDS WHITE ARROW"
  15108. }, {
  15109. "char": "&#x21E9",
  15110. desc: "DOWNWARDS WHITE ARROW"
  15111. }, {
  15112. "char": "&#x21EA",
  15113. desc: "UPWARDS WHITE ARROW FROM BAR"
  15114. }, {
  15115. "char": "&#x21EB",
  15116. desc: "UPWARDS WHITE ARROW ON PEDESTAL"
  15117. }, {
  15118. "char": "&#x21EC",
  15119. desc: "UPWARDS WHITE ARROW ON PEDESTAL WITH HORIZONTAL BAR"
  15120. }, {
  15121. "char": "&#x21ED",
  15122. desc: "UPWARDS WHITE ARROW ON PEDESTAL WITH VERTICAL BAR"
  15123. }, {
  15124. "char": "&#x21EE",
  15125. desc: "UPWARDS WHITE DOUBLE ARROW"
  15126. }, {
  15127. "char": "&#x21EF",
  15128. desc: "UPWARDS WHITE DOUBLE ARROW ON PEDESTAL"
  15129. }, {
  15130. "char": "&#x21F0",
  15131. desc: "RIGHTWARDS WHITE ARROW FROM WALL"
  15132. }, {
  15133. "char": "&#x21F1",
  15134. desc: "NORTH WEST ARROW TO CORNER"
  15135. }, {
  15136. "char": "&#x21F2",
  15137. desc: "SOUTH EAST ARROW TO CORNER"
  15138. }, {
  15139. "char": "&#x21F3",
  15140. desc: "UP DOWN WHITE ARROW"
  15141. }, {
  15142. "char": "&#x21F4",
  15143. desc: "RIGHT ARROW WITH SMALL CIRCLE"
  15144. }, {
  15145. "char": "&#x21F5",
  15146. desc: "DOWNWARDS ARROW LEFTWARDS OF UPWARDS ARROW"
  15147. }, {
  15148. "char": "&#x21F6",
  15149. desc: "THREE RIGHTWARDS ARROWS"
  15150. }, {
  15151. "char": "&#x21F7",
  15152. desc: "LEFTWARDS ARROW WITH VERTICAL STROKE"
  15153. }, {
  15154. "char": "&#x21F8",
  15155. desc: "RIGHTWARDS ARROW WITH VERTICAL STROKE"
  15156. }, {
  15157. "char": "&#x21F9",
  15158. desc: "LEFT RIGHT ARROW WITH VERTICAL STROKE"
  15159. }, {
  15160. "char": "&#x21FA",
  15161. desc: "LEFTWARDS ARROW WITH DOUBLE VERTICAL STROKE"
  15162. }, {
  15163. "char": "&#x21FB",
  15164. desc: "RIGHTWARDS ARROW WITH DOUBLE VERTICAL STROKE"
  15165. }, {
  15166. "char": "&#x21FC",
  15167. desc: "LEFT RIGHT ARROW WITH DOUBLE VERTICAL STROKE"
  15168. }, {
  15169. "char": "&#x21FD",
  15170. desc: "LEFTWARDS OPEN-HEADED ARROW"
  15171. }, {
  15172. "char": "&#x21FE",
  15173. desc: "RIGHTWARDS OPEN-HEADED ARROW"
  15174. }, {
  15175. "char": "&#x21FF",
  15176. desc: "LEFT RIGHT OPEN-HEADED ARROW"
  15177. }]
  15178. }, {
  15179. title: "Math",
  15180. "char": "&forall;",
  15181. list: [{
  15182. "char": "&forall;",
  15183. desc: "FOR ALL"
  15184. }, {
  15185. "char": "&part;",
  15186. desc: "PARTIAL DIFFERENTIAL"
  15187. }, {
  15188. "char": "&exist;",
  15189. desc: "THERE EXISTS"
  15190. }, {
  15191. "char": "&empty;",
  15192. desc: "EMPTY SET"
  15193. }, {
  15194. "char": "&nabla;",
  15195. desc: "NABLA"
  15196. }, {
  15197. "char": "&isin;",
  15198. desc: "ELEMENT OF"
  15199. }, {
  15200. "char": "&notin;",
  15201. desc: "NOT AN ELEMENT OF"
  15202. }, {
  15203. "char": "&ni;",
  15204. desc: "CONTAINS AS MEMBER"
  15205. }, {
  15206. "char": "&prod;",
  15207. desc: "N-ARY PRODUCT"
  15208. }, {
  15209. "char": "&sum;",
  15210. desc: "N-ARY SUMMATION"
  15211. }, {
  15212. "char": "&minus;",
  15213. desc: "MINUS SIGN"
  15214. }, {
  15215. "char": "&lowast;",
  15216. desc: "ASTERISK OPERATOR"
  15217. }, {
  15218. "char": "&radic;",
  15219. desc: "SQUARE ROOT"
  15220. }, {
  15221. "char": "&prop;",
  15222. desc: "PROPORTIONAL TO"
  15223. }, {
  15224. "char": "&infin;",
  15225. desc: "INFINITY"
  15226. }, {
  15227. "char": "&ang;",
  15228. desc: "ANGLE"
  15229. }, {
  15230. "char": "&and;",
  15231. desc: "LOGICAL AND"
  15232. }, {
  15233. "char": "&or;",
  15234. desc: "LOGICAL OR"
  15235. }, {
  15236. "char": "&cap;",
  15237. desc: "INTERSECTION"
  15238. }, {
  15239. "char": "&cup;",
  15240. desc: "UNION"
  15241. }, {
  15242. "char": "&int;",
  15243. desc: "INTEGRAL"
  15244. }, {
  15245. "char": "&there4;",
  15246. desc: "THEREFORE"
  15247. }, {
  15248. "char": "&sim;",
  15249. desc: "TILDE OPERATOR"
  15250. }, {
  15251. "char": "&cong;",
  15252. desc: "APPROXIMATELY EQUAL TO"
  15253. }, {
  15254. "char": "&asymp;",
  15255. desc: "ALMOST EQUAL TO"
  15256. }, {
  15257. "char": "&ne;",
  15258. desc: "NOT EQUAL TO"
  15259. }, {
  15260. "char": "&equiv;",
  15261. desc: "IDENTICAL TO"
  15262. }, {
  15263. "char": "&le;",
  15264. desc: "LESS-THAN OR EQUAL TO"
  15265. }, {
  15266. "char": "&ge;",
  15267. desc: "GREATER-THAN OR EQUAL TO"
  15268. }, {
  15269. "char": "&sub;",
  15270. desc: "SUBSET OF"
  15271. }, {
  15272. "char": "&sup;",
  15273. desc: "SUPERSET OF"
  15274. }, {
  15275. "char": "&nsub;",
  15276. desc: "NOT A SUBSET OF"
  15277. }, {
  15278. "char": "&sube;",
  15279. desc: "SUBSET OF OR EQUAL TO"
  15280. }, {
  15281. "char": "&supe;",
  15282. desc: "SUPERSET OF OR EQUAL TO"
  15283. }, {
  15284. "char": "&oplus;",
  15285. desc: "CIRCLED PLUS"
  15286. }, {
  15287. "char": "&otimes;",
  15288. desc: "CIRCLED TIMES"
  15289. }, {
  15290. "char": "&perp;",
  15291. desc: "UP TACK"
  15292. }]
  15293. }, {
  15294. title: "Misc",
  15295. "char": "&spades;",
  15296. list: [{
  15297. "char": "&spades;",
  15298. desc: "BLACK SPADE SUIT"
  15299. }, {
  15300. "char": "&clubs;",
  15301. desc: "BLACK CLUB SUIT"
  15302. }, {
  15303. "char": "&hearts;",
  15304. desc: "BLACK HEART SUIT"
  15305. }, {
  15306. "char": "&diams;",
  15307. desc: "BLACK DIAMOND SUIT"
  15308. }, {
  15309. "char": "&#x2669",
  15310. desc: "QUARTER NOTE"
  15311. }, {
  15312. "char": "&#x266A",
  15313. desc: "EIGHTH NOTE"
  15314. }, {
  15315. "char": "&#x266B",
  15316. desc: "BEAMED EIGHTH NOTES"
  15317. }, {
  15318. "char": "&#x266C",
  15319. desc: "BEAMED SIXTEENTH NOTES"
  15320. }, {
  15321. "char": "&#x266D",
  15322. desc: "MUSIC FLAT SIGN"
  15323. }, {
  15324. "char": "&#x266E",
  15325. desc: "MUSIC NATURAL SIGN"
  15326. }, {
  15327. "char": "&#x2600",
  15328. desc: "BLACK SUN WITH RAYS"
  15329. }, {
  15330. "char": "&#x2601",
  15331. desc: "CLOUD"
  15332. }, {
  15333. "char": "&#x2602",
  15334. desc: "UMBRELLA"
  15335. }, {
  15336. "char": "&#x2603",
  15337. desc: "SNOWMAN"
  15338. }, {
  15339. "char": "&#x2615",
  15340. desc: "HOT BEVERAGE"
  15341. }, {
  15342. "char": "&#x2618",
  15343. desc: "SHAMROCK"
  15344. }, {
  15345. "char": "&#x262F",
  15346. desc: "YIN YANG"
  15347. }, {
  15348. "char": "&#x2714",
  15349. desc: "HEAVY CHECK MARK"
  15350. }, {
  15351. "char": "&#x2716",
  15352. desc: "HEAVY MULTIPLICATION X"
  15353. }, {
  15354. "char": "&#x2744",
  15355. desc: "SNOWFLAKE"
  15356. }, {
  15357. "char": "&#x275B",
  15358. desc: "HEAVY SINGLE TURNED COMMA QUOTATION MARK ORNAMENT"
  15359. }, {
  15360. "char": "&#x275C",
  15361. desc: "HEAVY SINGLE COMMA QUOTATION MARK ORNAMENT"
  15362. }, {
  15363. "char": "&#x275D",
  15364. desc: "HEAVY DOUBLE TURNED COMMA QUOTATION MARK ORNAMENT"
  15365. }, {
  15366. "char": "&#x275E",
  15367. desc: "HEAVY DOUBLE COMMA QUOTATION MARK ORNAMENT"
  15368. }, {
  15369. "char": "&#x2764",
  15370. desc: "HEAVY BLACK HEART"
  15371. }]
  15372. }],
  15373. specialCharButtons: ["specialCharBack", "|"]
  15374. }), Object.assign($e.POPUP_TEMPLATES, {
  15375. specialCharacters: "[_BUTTONS_][_CUSTOM_LAYER_]"
  15376. }), $e.PLUGINS.specialCharacters = function(g) {
  15377. var m = g.$,
  15378. n = g.opts.specialCharactersSets[0],
  15379. a = g.opts.specialCharactersSets,
  15380. i = "";
  15381. function s() {
  15382. return '\n <div class="fr-buttons fr-tabs fr-tabs-scroll">\n '.concat(function t(e, n) {
  15383. var r = "";
  15384. return e.forEach(function(e) {
  15385. var t = {
  15386. elementClass: e.title === n.title ? "fr-active fr-active-tab" : "",
  15387. title: e.title,
  15388. dataParam1: e.title,
  15389. desc: e["char"]
  15390. };
  15391. r += '<button class="fr-command fr-btn fr-special-character-category '.concat(t.elementClass, '" title="').concat(t.title, '" data-cmd="setSpecialCharacterCategory" data-param1="').concat(t.dataParam1, '"><span>').concat(t.desc, "</span></button>")
  15392. }), r
  15393. }(a, n), '\n </div>\n <div class="fr-icon-container fr-sc-container">\n ').concat(function r(e) {
  15394. var n = "";
  15395. return e.list.forEach(function(e) {
  15396. var t = {
  15397. dataParam1: e["char"],
  15398. title: e.desc,
  15399. splCharValue: e["char"]
  15400. };
  15401. n += '<span class="fr-command fr-special-character fr-icon" role="button" \n data-cmd="insertSpecialCharacter" data-param1="'.concat(t.dataParam1, '" \n title="').concat(t.title, '">').concat(t.splCharValue, "</span>")
  15402. }), n
  15403. }(n), "\n </div>")
  15404. }
  15405. return {
  15406. setSpecialCharacterCategory: function r(t) {
  15407. n = a.filter(function(e) {
  15408. return e.title === t
  15409. })[0],
  15410. function e() {
  15411. g.popups.get("specialCharacters").html(i + s())
  15412. }()
  15413. },
  15414. showSpecialCharsPopup: function l() {
  15415. var e = g.popups.get("specialCharacters");
  15416. if (e || (e = function o() {
  15417. g.opts.toolbarInline && 0 < g.opts.specialCharButtons.length && (i = '<div class="fr-buttons fr-tabs">'.concat(g.button.buildList(g.opts.specialCharButtons), "</div>"));
  15418. var e = {
  15419. buttons: i,
  15420. custom_layer: s()
  15421. },
  15422. t = g.popups.create("specialCharacters", e);
  15423. return function n(h) {
  15424. g.events.on("popup.tab", function(e) {
  15425. var t = m(e.currentTarget);
  15426. if (!g.popups.isVisible("specialCharacters") || !t.is("span, a")) return !0;
  15427. var n, r, a, o = e.which;
  15428. if ($e.KEYCODE.TAB == o) {
  15429. if (t.is("span.fr-icon") && e.shiftKey || t.is("a") && !e.shiftKey) {
  15430. var i = h.find(".fr-buttons");
  15431. n = !g.accessibility.focusToolbar(i, !!e.shiftKey)
  15432. }
  15433. if (!1 !== n) {
  15434. var s = h.find("span.fr-icon:focus").first().concat(h.findVisible(" span.fr-icon").first().concat(h.find("a")));
  15435. t.is("span.fr-icon") && (s = s.not("span.fr-icon:not(:focus)")), r = s.index(t), r = e.shiftKey ? ((r - 1) % s.length + s.length) % s.length : (r + 1) % s.length, a = s.get(r), g.events.disableBlur(), a.focus(), n = !1
  15436. }
  15437. } else if ($e.KEYCODE.ARROW_UP == o || $e.KEYCODE.ARROW_DOWN == o || $e.KEYCODE.ARROW_LEFT == o || $e.KEYCODE.ARROW_RIGHT == o) {
  15438. if (t.is("span.fr-icon")) {
  15439. var l = t.parent().find("span.fr-icon");
  15440. r = l.index(t);
  15441. var c = Math.floor(l.length / 11),
  15442. d = r % 11,
  15443. f = Math.floor(r / 11),
  15444. p = 11 * f + d,
  15445. u = 11 * c;
  15446. $e.KEYCODE.ARROW_UP == o ? p = ((p - 11) % u + u) % u : $e.KEYCODE.ARROW_DOWN == o ? p = (p + 11) % u : $e.KEYCODE.ARROW_LEFT == o ? p = ((p - 1) % u + u) % u : $e.KEYCODE.ARROW_RIGHT == o && (p = (p + 1) % u), a = m(l.get(p)), g.events.disableBlur(), a.focus(), n = !1
  15447. }
  15448. } else $e.KEYCODE.ENTER == o && (t.is("a") ? t[0].click() : g.button.exec(t), n = !1);
  15449. return !1 === n && (e.preventDefault(), e.stopPropagation()), n
  15450. }, !0)
  15451. }(t), t
  15452. }()), !e.hasClass("fr-active")) {
  15453. g.popups.refresh("specialCharacters"), g.popups.setContainer("specialCharacters", g.$tb);
  15454. var t = g.$tb.find('.fr-command[data-cmd="specialCharacters"]'),
  15455. n = g.button.getPosition(t),
  15456. r = n.left,
  15457. a = n.top;
  15458. g.popups.show("specialCharacters", r, a, outerHeight)
  15459. }
  15460. },
  15461. back: function e() {
  15462. g.popups.hide("specialCharacters"), g.toolbar.showInline()
  15463. }
  15464. }
  15465. }, $e.DefineIcon("specialCharacters", {
  15466. NAME: "dollar-sign",
  15467. SVG_KEY: "symbols"
  15468. }), $e.RegisterCommand("specialCharacters", {
  15469. title: "Special Characters",
  15470. icon: "specialCharacters",
  15471. undo: !1,
  15472. focus: !1,
  15473. popup: !0,
  15474. refreshAfterCallback: !1,
  15475. plugin: "specialCharacters",
  15476. showOnMobile: !0,
  15477. callback: function() {
  15478. this.popups.isVisible("specialCharacters") ? (this.$el.find(".fr-marker") && (this.events.disableBlur(), this.selection.restore()), this.popups.hide("specialCharacters")) : this.specialCharacters.showSpecialCharsPopup()
  15479. }
  15480. }), $e.RegisterCommand("insertSpecialCharacter", {
  15481. callback: function(e, t) {
  15482. this.undo.saveStep(), this.html.insert(t), this.undo.saveStep(), this.popups.hide("specialCharacters")
  15483. }
  15484. }), $e.RegisterCommand("setSpecialCharacterCategory", {
  15485. undo: !1,
  15486. focus: !1,
  15487. callback: function(e, t) {
  15488. this.specialCharacters.setSpecialCharacterCategory(t)
  15489. }
  15490. }), $e.DefineIcon("specialCharBack", {
  15491. NAME: "arrow-left",
  15492. SVG_KEY: "back"
  15493. }), $e.RegisterCommand("specialCharBack", {
  15494. title: "Back",
  15495. undo: !1,
  15496. focus: !1,
  15497. back: !0,
  15498. refreshAfterCallback: !1,
  15499. callback: function() {
  15500. this.specialCharacters.back()
  15501. }
  15502. }), Object.assign($e.POPUP_TEMPLATES, {
  15503. "table.insert": "[_BUTTONS_][_ROWS_COLUMNS_]",
  15504. "table.edit": "[_BUTTONS_]",
  15505. "table.colors": "[_BUTTONS_][_COLORS_][_CUSTOM_COLOR_]"
  15506. }), Object.assign($e.DEFAULTS, {
  15507. tableInsertMaxSize: 10,
  15508. tableEditButtons: ["tableHeader", "tableRemove", "tableRows", "tableColumns", "tableStyle", "-", "tableCells", "tableCellBackground", "tableCellVerticalAlign", "tableCellHorizontalAlign", "tableCellStyle"],
  15509. tableInsertButtons: ["tableBack", "|"],
  15510. tableResizer: !0,
  15511. tableDefaultWidth: "100%",
  15512. tableResizerOffset: 5,
  15513. tableResizingLimit: 30,
  15514. tableColorsButtons: ["tableBack", "|"],
  15515. tableColors: ["#61BD6D", "#1ABC9C", "#54ACD2", "#2C82C9", "#9365B8", "#475577", "#CCCCCC", "#41A85F", "#00A885", "#3D8EB9", "#2969B0", "#553982", "#28324E", "#000000", "#F7DA64", "#FBA026", "#EB6B56", "#E25041", "#A38F84", "#EFEFEF", "#FFFFFF", "#FAC51C", "#F37934", "#D14841", "#B8312F", "#7C706B", "#D1D5D8", "REMOVE"],
  15516. tableColorsStep: 7,
  15517. tableCellStyles: {
  15518. "fr-highlighted": "Highlighted",
  15519. "fr-thick": "Thick"
  15520. },
  15521. tableStyles: {
  15522. "fr-dashed-borders": "Dashed Borders",
  15523. "fr-alternate-rows": "Alternate Rows"
  15524. },
  15525. tableCellMultipleStyles: !0,
  15526. tableMultipleStyles: !0,
  15527. tableInsertHelper: !0,
  15528. tableInsertHelperOffset: 15
  15529. }), $e.PLUGINS.table = function(C) {
  15530. var S, c, a, o, r, i, y, R = C.$;
  15531. function u() {
  15532. var e = L();
  15533. if (e) {
  15534. var t = C.popups.get("table.edit");
  15535. if (t || (t = p()), t) {
  15536. C.popups.setContainer("table.edit", C.$sc);
  15537. var n = x(e),
  15538. r = n.left + (n.right - n.left) / 2,
  15539. a = n.bottom;
  15540. C.popups.show("table.edit", r, a, n.bottom - n.top, !0), C.edit.isDisabled() && (1 < Q().length && C.toolbar.disable(), C.$el.removeClass("fr-no-selection"), C.edit.on(), C.button.bulkRefresh(), C.selection.setAtEnd(C.$el.find(".fr-selected-cell").last().get(0)), C.selection.restore())
  15541. }
  15542. }
  15543. }
  15544. function s() {
  15545. var e = L();
  15546. if (e) {
  15547. var t = C.popups.get("table.colors");
  15548. t || (t = function i() {
  15549. var e = "";
  15550. 0 < C.opts.tableColorsButtons.length && (e = '<div class="fr-buttons fr-tabs">' + C.button.buildList(C.opts.tableColorsButtons) + "</div>");
  15551. var t = "";
  15552. C.opts.colorsHEXInput && (t = '<div class="fr-color-hex-layer fr-table-colors-hex-layer fr-active fr-layer" id="fr-table-colors-hex-layer-' + C.id + '"><div class="fr-input-line"><input maxlength="7" id="fr-table-colors-hex-layer-text-' + C.id + '" type="text" placeholder="' + C.language.translate("HEX Color") + '" tabIndex="1" aria-required="true"></div><div class="fr-action-buttons"><button type="button" class="fr-command fr-submit" data-cmd="tableCellBackgroundCustomColor" tabIndex="2" role="button">' + C.language.translate("OK") + "</button></div></div>");
  15553. var n = {
  15554. buttons: e,
  15555. colors: function a() {
  15556. for (var e = '<div class="fr-color-set fr-table-colors">', t = 0; t < C.opts.tableColors.length; t++) 0 !== t && t % C.opts.tableColorsStep == 0 && (e += "<br>"), "REMOVE" != C.opts.tableColors[t] ? e += '<span class="fr-command" style="background: ' + C.opts.tableColors[t] + ';" tabIndex="-1" role="button" data-cmd="tableCellBackgroundColor" data-param1="' + C.opts.tableColors[t] + '"><span class="fr-sr-only">' + C.language.translate("Color") + " " + C.opts.tableColors[t] + "&nbsp;&nbsp;&nbsp;</span></span>" : e += '<span class="fr-command" data-cmd="tableCellBackgroundColor" tabIndex="-1" role="button" data-param1="REMOVE" title="' + C.language.translate("Clear Formatting") + '">' + C.icon.create("tableColorRemove") + '<span class="fr-sr-only">' + C.language.translate("Clear Formatting") + "</span></span>";
  15557. return e += "</div>"
  15558. }(),
  15559. custom_color: t
  15560. },
  15561. r = C.popups.create("table.colors", n);
  15562. return C.events.$on(C.$wp, "scroll.table-colors", function() {
  15563. C.popups.isVisible("table.colors") && s()
  15564. }),
  15565. function o(h) {
  15566. C.events.on("popup.tab", function(e) {
  15567. var t = R(e.currentTarget);
  15568. if (!C.popups.isVisible("table.colors") || !t.is("span")) return !0;
  15569. var n = e.which,
  15570. r = !0;
  15571. if ($e.KEYCODE.TAB == n) {
  15572. var a = h.find(".fr-buttons");
  15573. r = !C.accessibility.focusToolbar(a, !!e.shiftKey)
  15574. } else if ($e.KEYCODE.ARROW_UP == n || $e.KEYCODE.ARROW_DOWN == n || $e.KEYCODE.ARROW_LEFT == n || $e.KEYCODE.ARROW_RIGHT == n) {
  15575. var o = t.parent().find("span.fr-command"),
  15576. i = o.index(t),
  15577. s = C.opts.colorsStep,
  15578. l = Math.floor(o.length / s),
  15579. c = i % s,
  15580. d = Math.floor(i / s),
  15581. f = d * s + c,
  15582. p = l * s;
  15583. $e.KEYCODE.ARROW_UP == n ? f = ((f - s) % p + p) % p : $e.KEYCODE.ARROW_DOWN == n ? f = (f + s) % p : $e.KEYCODE.ARROW_LEFT == n ? f = ((f - 1) % p + p) % p : $e.KEYCODE.ARROW_RIGHT == n && (f = (f + 1) % p);
  15584. var u = R(o.get(f));
  15585. C.events.disableBlur(), u.focus(), r = !1
  15586. } else $e.KEYCODE.ENTER == n && (C.button.exec(t), r = !1);
  15587. return !1 === r && (e.preventDefault(), e.stopPropagation()), r
  15588. }, !0)
  15589. }(r), r
  15590. }()), C.popups.setContainer("table.colors", C.$sc);
  15591. var n = x(e),
  15592. r = (n.left + n.right) / 2,
  15593. a = n.bottom;
  15594. ! function o() {
  15595. var e = C.popups.get("table.colors"),
  15596. t = C.$el.find(".fr-selected-cell").first(),
  15597. n = C.helpers.RGBToHex(t.css("background-color")),
  15598. r = e.find(".fr-table-colors-hex-layer input");
  15599. e.find(".fr-selected-color").removeClass("fr-selected-color fr-active-item"), e.find('span[data-param1="' + n + '"]').addClass("fr-selected-color fr-active-item"), r.val(n).trigger("change")
  15600. }(), C.popups.show("table.colors", r, a, n.bottom - n.top, !0)
  15601. }
  15602. }
  15603. function l() {
  15604. 0 === Q().length && C.toolbar.enable()
  15605. }
  15606. function d(e) {
  15607. if (e) return C.popups.onHide("table.insert", function() {
  15608. C.popups.get("table.insert").find('.fr-table-size .fr-select-table-size > span[data-row="1"][data-col="1"]').trigger("mouseover")
  15609. }), !0;
  15610. var t = "";
  15611. 0 < C.opts.tableInsertButtons.length && (t = '<div class="fr-buttons fr-tabs">' + C.button.buildList(C.opts.tableInsertButtons) + "</div>");
  15612. var n = {
  15613. buttons: t,
  15614. rows_columns: function o() {
  15615. for (var e = '<div class="fr-table-size"><div class="fr-table-size-info">1 &times; 1</div><div class="fr-select-table-size">', t = 1; t <= C.opts.tableInsertMaxSize; t++) {
  15616. for (var n = 1; n <= C.opts.tableInsertMaxSize; n++) {
  15617. var r = "inline-block";
  15618. 2 < t && !C.helpers.isMobile() && (r = "none");
  15619. var a = "fr-table-cell ";
  15620. 1 == t && 1 == n && (a += " hover"), e += '<span class="fr-command ' + a + '" tabIndex="-1" data-cmd="tableInsert" data-row="' + t + '" data-col="' + n + '" data-param1="' + t + '" data-param2="' + n + '" style="display: ' + r + ';" role="button"><span></span><span class="fr-sr-only">' + t + " &times; " + n + "&nbsp;&nbsp;&nbsp;</span></span>"
  15621. }
  15622. e += '<div class="new-line"></div>'
  15623. }
  15624. return e += "</div></div>"
  15625. }()
  15626. },
  15627. r = C.popups.create("table.insert", n);
  15628. return C.events.$on(r, "mouseover", ".fr-table-size .fr-select-table-size .fr-table-cell", function(e) {
  15629. f(R(e.currentTarget))
  15630. }, !0),
  15631. function a(e) {
  15632. C.events.$on(e, "focus", "[tabIndex]", function(e) {
  15633. var t = R(e.currentTarget);
  15634. f(t)
  15635. }), C.events.on("popup.tab", function(e) {
  15636. var t = R(e.currentTarget);
  15637. if (!C.popups.isVisible("table.insert") || !t.is("span, a")) return !0;
  15638. var n, r = e.which;
  15639. if ($e.KEYCODE.ARROW_UP == r || $e.KEYCODE.ARROW_DOWN == r || $e.KEYCODE.ARROW_LEFT == r || $e.KEYCODE.ARROW_RIGHT == r) {
  15640. if (t.is("span.fr-table-cell")) {
  15641. var a = t.parent().find("span.fr-table-cell"),
  15642. o = a.index(t),
  15643. i = C.opts.tableInsertMaxSize,
  15644. s = o % i,
  15645. l = Math.floor(o / i);
  15646. $e.KEYCODE.ARROW_UP == r ? l = Math.max(0, l - 1) : $e.KEYCODE.ARROW_DOWN == r ? l = Math.min(C.opts.tableInsertMaxSize - 1, l + 1) : $e.KEYCODE.ARROW_LEFT == r ? s = Math.max(0, s - 1) : $e.KEYCODE.ARROW_RIGHT == r && (s = Math.min(C.opts.tableInsertMaxSize - 1, s + 1));
  15647. var c = l * i + s,
  15648. d = R(a.get(c));
  15649. f(d), C.events.disableBlur(), d.focus(), n = !1
  15650. }
  15651. } else $e.KEYCODE.ENTER == r && (C.button.exec(t), n = !1);
  15652. return !1 === n && (e.preventDefault(), e.stopPropagation()), n
  15653. }, !0)
  15654. }(r), r
  15655. }
  15656. function f(e) {
  15657. var t = e.data("row");
  15658. null !== t && (t = parseInt(t));
  15659. var n = e.data("col");
  15660. null !== n && (n = parseInt(n));
  15661. var r = e.parent();
  15662. r.siblings(".fr-table-size-info").html(t + " &times; " + n), r.find("> span").removeClass("hover fr-active-item");
  15663. for (var a = 1; a <= C.opts.tableInsertMaxSize; a++)
  15664. for (var o = 0; o <= C.opts.tableInsertMaxSize; o++) {
  15665. var i = r.find('> span[data-row="' + a + '"][data-col="' + o + '"]');
  15666. a <= t && o <= n ? i.addClass("hover") : a <= t + 1 || a <= 2 && !C.helpers.isMobile() ? i.css("display", "inline-block") : 2 < a && !C.helpers.isMobile() && i.css("display", "none")
  15667. }
  15668. e.addClass("fr-active-item")
  15669. }
  15670. function p(e) {
  15671. if (e) return C.popups.onHide("table.edit", l), !0;
  15672. if (0 < C.opts.tableEditButtons.length) {
  15673. var t = {
  15674. buttons: '<div class="fr-buttons">'.concat(C.button.buildList(C.opts.tableEditButtons), "</div>")
  15675. },
  15676. n = C.popups.create("table.edit", t);
  15677. return C.events.$on(C.$wp, "scroll.table-edit", function() {
  15678. C.popups.isVisible("table.edit") && u()
  15679. }), n
  15680. }
  15681. return !1
  15682. }
  15683. function h() {
  15684. if (0 < Q().length) {
  15685. var e = J();
  15686. C.selection.setBefore(e.get(0)) || C.selection.setAfter(e.get(0)), C.selection.restore(), C.popups.hide("table.edit"), e.remove(), C.toolbar.enable()
  15687. }
  15688. }
  15689. function g(e) {
  15690. var t = J();
  15691. if (0 < t.length) {
  15692. if (0 < C.$el.find("th.fr-selected-cell").length && "above" == e) return;
  15693. var n, r, a, o = L(),
  15694. i = N(o);
  15695. if (null == i) return;
  15696. r = "above" == e ? i.min_i : i.max_i;
  15697. var s = "<tr>";
  15698. for (n = 0; n < o[r].length; n++) {
  15699. if ("below" == e && r < o.length - 1 && o[r][n] == o[r + 1][n] || "above" == e && 0 < r && o[r][n] == o[r - 1][n]) {
  15700. if (0 === n || 0 < n && o[r][n] != o[r][n - 1]) {
  15701. var l = R(o[r][n]);
  15702. l.attr("rowspan", parseInt(l.attr("rowspan"), 10) + 1)
  15703. }
  15704. } else s += '<td style="' + R(o[r][n]).attr("style") + '" ><br></td>'
  15705. }
  15706. s += "</tr>", a = 0 < C.$el.find("th.fr-selected-cell").length && "below" == e ? R(t.find("tbody").not(t.find("> table tbody"))) : R(t.find("tr").not(t.find("> table tr")).get(r)), "below" == e ? "TBODY" == a.attr("tagName") ? a.prepend(s) : a[0].parentNode && a[0].insertAdjacentHTML("afterend", s) : "above" == e && (a.before(s), C.popups.isVisible("table.edit") && u())
  15707. }
  15708. }
  15709. function m(e, t, n) {
  15710. var r, a, o, i, s, l = 0,
  15711. c = L(n);
  15712. if (e < (t = Math.min(t, c[0].length - 1)))
  15713. for (a = e; a <= t; a++)
  15714. if (!(e < a && c[0][a] == c[0][a - 1]) && 1 < (i = Math.min(parseInt(c[0][a].getAttribute("colspan"), 10) || 1, t - e + 1)) && c[0][a] == c[0][a + 1])
  15715. for (l = i - 1, r = 1; r < c.length; r++)
  15716. if (c[r][a] != c[r - 1][a]) {
  15717. for (o = a; o < a + i; o++)
  15718. if (1 < (s = parseInt(c[r][o].getAttribute("colspan"), 10) || 1) && c[r][o] == c[r][o + 1]) o += l = Math.min(l, s - 1);
  15719. else if (!(l = Math.max(0, l - 1))) break;
  15720. if (!l) break
  15721. }
  15722. l && b(c, l, "colspan", 0, c.length - 1, e, t)
  15723. }
  15724. function v(e, t, n) {
  15725. var r, a, o, i, s, l = 0,
  15726. c = L(n);
  15727. if (e < (t = Math.min(t, c.length - 1)))
  15728. for (r = e; r <= t; r++)
  15729. if (!(e < r && c[r][0] == c[r - 1][0]) && 1 < (i = Math.min(parseInt(c[r][0].getAttribute("rowspan"), 10) || 1, t - e + 1)) && c[r][0] == c[r + 1][0])
  15730. for (l = i - 1, a = 1; a < c[0].length; a++)
  15731. if (c[r][a] != c[r][a - 1]) {
  15732. for (o = r; o < r + i; o++)
  15733. if (1 < (s = parseInt(c[o][a].getAttribute("rowspan"), 10) || 1) && c[o][a] == c[o + 1][a]) o += l = Math.min(l, s - 1);
  15734. else if (!(l = Math.max(0, l - 1))) break;
  15735. if (!l) break
  15736. }
  15737. l && b(c, l, "rowspan", e, t, 0, c[0].length - 1)
  15738. }
  15739. function b(e, t, n, r, a, o, i) {
  15740. var s, l, c;
  15741. for (s = r; s <= a; s++)
  15742. for (l = o; l <= i; l++) r < s && e[s][l] == e[s - 1][l] || o < l && e[s][l] == e[s][l - 1] || 1 < (c = parseInt(e[s][l].getAttribute(n), 10) || 1) && (1 < c - t ? e[s][l].setAttribute(n, c - t) : e[s][l].removeAttribute(n))
  15743. }
  15744. function E(e, t, n, r, a) {
  15745. v(e, t, a), m(n, r, a)
  15746. }
  15747. function t(e) {
  15748. var t = C.$el.find(".fr-selected-cell");
  15749. "REMOVE" != e ? t.css("background-color", C.helpers.HEXtoRGB(e)) : t.css("background-color", ""), u()
  15750. }
  15751. function L(e) {
  15752. var c = [];
  15753. return null == (e = e || null) && 0 < Q().length && (e = J()), e && e.findVisible("tr").not(e.find("> table tr")).each(function(s, e) {
  15754. var t = R(e),
  15755. l = 0;
  15756. t.find("> th, > td").each(function(e, t) {
  15757. for (var n = R(t), r = parseInt(n.attr("colspan"), 10) || 1, a = parseInt(n.attr("rowspan"), 10) || 1, o = s; o < s + a; o++)
  15758. for (var i = l; i < l + r; i++) c[o] || (c[o] = []), c[o][i] ? l++ : c[o][i] = t;
  15759. l += r
  15760. })
  15761. }), c
  15762. }
  15763. function w(e, t) {
  15764. for (var n = 0; n < t.length; n++)
  15765. for (var r = 0; r < t[n].length; r++)
  15766. if (t[n][r] == e) return {
  15767. row: n,
  15768. col: r
  15769. }
  15770. }
  15771. function _(e, t, n) {
  15772. for (var r = e + 1, a = t + 1; r < n.length;) {
  15773. if (n[r][t] != n[e][t]) {
  15774. r--;
  15775. break
  15776. }
  15777. r++
  15778. }
  15779. for (r == n.length && r--; a < n[e].length;) {
  15780. if (n[e][a] != n[e][t]) {
  15781. a--;
  15782. break
  15783. }
  15784. a++
  15785. }
  15786. return a == n[e].length && a--, {
  15787. row: r,
  15788. col: a
  15789. }
  15790. }
  15791. function T() {
  15792. C.el.querySelector(".fr-cell-fixed") && C.el.querySelector(".fr-cell-fixed").classList.remove("fr-cell-fixed"), C.el.querySelector(".fr-cell-handler") && C.el.querySelector(".fr-cell-handler").classList.remove("fr-cell-handler")
  15793. }
  15794. function A() {
  15795. var e = C.$el.find(".fr-selected-cell");
  15796. 0 < e.length && e.each(function() {
  15797. var e = R(this);
  15798. e.removeClass("fr-selected-cell"), "" === e.attr("class") && e.removeAttr("class")
  15799. }), T()
  15800. }
  15801. function O() {
  15802. C.events.disableBlur(), C.selection.clear(), C.$el.addClass("fr-no-selection"), C.$el.blur(), C.events.enableBlur()
  15803. }
  15804. function N(e) {
  15805. var t = C.$el.find(".fr-selected-cell");
  15806. if (0 < t.length) {
  15807. var n, r = e.length,
  15808. a = 0,
  15809. o = e[0].length,
  15810. i = 0;
  15811. for (n = 0; n < t.length; n++) {
  15812. var s = w(t[n], e),
  15813. l = _(s.row, s.col, e);
  15814. r = Math.min(s.row, r), a = Math.max(l.row, a), o = Math.min(s.col, o), i = Math.max(l.col, i)
  15815. }
  15816. return {
  15817. min_i: r,
  15818. max_i: a,
  15819. min_j: o,
  15820. max_j: i
  15821. }
  15822. }
  15823. return null
  15824. }
  15825. function x(e) {
  15826. var t = N(e);
  15827. if (null != t) {
  15828. var n = R(e[t.min_i][t.min_j]),
  15829. r = R(e[t.min_i][t.max_j]),
  15830. a = R(e[t.max_i][t.min_j]);
  15831. return {
  15832. left: n.length && n.offset().left,
  15833. right: r.length && r.offset().left + r.outerWidth(),
  15834. top: n.length && n.offset().top,
  15835. bottom: a.length && a.offset().top + a.outerHeight()
  15836. }
  15837. }
  15838. }
  15839. function I(e, t) {
  15840. if (R(e).is(t)) A(), R(e).addClass("fr-selected-cell");
  15841. else {
  15842. O(), C.edit.off();
  15843. var n = L(),
  15844. r = w(e, n),
  15845. a = w(t, n),
  15846. o = function u(e, t, n, r, a) {
  15847. var o, i, s, l, c = e,
  15848. d = t,
  15849. f = n,
  15850. p = r;
  15851. for (o = c; o <= d; o++)(1 < (parseInt(R(a[o][f]).attr("rowspan"), 10) || 1) || 1 < (parseInt(R(a[o][f]).attr("colspan"), 10) || 1)) && (l = _((s = w(a[o][f], a)).row, s.col, a), c = Math.min(s.row, c), d = Math.max(l.row, d), f = Math.min(s.col, f), p = Math.max(l.col, p)), (1 < (parseInt(R(a[o][p]).attr("rowspan"), 10) || 1) || 1 < (parseInt(R(a[o][p]).attr("colspan"), 10) || 1)) && (l = _((s = w(a[o][p], a)).row, s.col, a), c = Math.min(s.row, c), d = Math.max(l.row, d), f = Math.min(s.col, f), p = Math.max(l.col, p));
  15852. for (i = f; i <= p; i++)(1 < (parseInt(R(a[c][i]).attr("rowspan"), 10) || 1) || 1 < (parseInt(R(a[c][i]).attr("colspan"), 10) || 1)) && (l = _((s = w(a[c][i], a)).row, s.col, a), c = Math.min(s.row, c), d = Math.max(l.row, d), f = Math.min(s.col, f), p = Math.max(l.col, p)), (1 < (parseInt(R(a[d][i]).attr("rowspan"), 10) || 1) || 1 < (parseInt(R(a[d][i]).attr("colspan"), 10) || 1)) && (l = _((s = w(a[d][i], a)).row, s.col, a), c = Math.min(s.row, c), d = Math.max(l.row, d), f = Math.min(s.col, f), p = Math.max(l.col, p));
  15853. return c == e && d == t && f == n && p == r ? {
  15854. min_i: e,
  15855. max_i: t,
  15856. min_j: n,
  15857. max_j: r
  15858. } : u(c, d, f, p, a)
  15859. }(Math.min(r.row, a.row), Math.max(r.row, a.row), Math.min(r.col, a.col), Math.max(r.col, a.col), n);
  15860. A(), e.classList.add("fr-cell-fixed"), t.classList.add("fr-cell-handler");
  15861. for (var i = o.min_i; i <= o.max_i; i++)
  15862. for (var s = o.min_j; s <= o.max_j; s++) R(n[i][s]).addClass("fr-selected-cell")
  15863. }
  15864. }
  15865. function k(e) {
  15866. var t = null,
  15867. n = R(e.target);
  15868. return "TD" == e.target.tagName || "TH" == e.target.tagName ? t = e.target : 0 < n.closest("td", n.closest("tr")[0]).length ? t = n.closest("td", n.closest("tr")[0]).get(0) : 0 < n.closest("th", n.closest("thead")[0]).length && (t = n.closest("th", n.closest("thead")[0]).get(0)), -1 === C.$el.html.toString().search(t) ? null : t
  15869. }
  15870. function M() {
  15871. A(), C.popups.hide("table.edit")
  15872. }
  15873. function e(e) {
  15874. var t = k(e);
  15875. if ("false" == R(t).parents("[contenteditable]").not(".fr-element").not(".fr-img-caption").not("body").first().attr("contenteditable")) return !0;
  15876. if (0 < Q().length && !t && M(), !C.edit.isDisabled() || C.popups.isVisible("table.edit"))
  15877. if (1 != e.which || 1 == e.which && C.helpers.isMac() && e.ctrlKey)(3 == e.which || 1 == e.which && C.helpers.isMac() && e.ctrlKey) && t && M();
  15878. else if (o = !0, t) {
  15879. 0 < Q().length && !e.shiftKey && M(), e.stopPropagation(), C.events.trigger("image.hideResizer"), C.events.trigger("video.hideResizer"), a = !0;
  15880. var n = t.tagName.toLowerCase();
  15881. e.shiftKey && 0 < C.$el.find(n + ".fr-selected-cell").length ? R(C.$el.find(n + ".fr-selected-cell").closest("table")).is(R(t).closest("table")) ? I(r, t) : O() : ((C.keys.ctrlKey(e) || e.shiftKey) && (1 < Q().length || 0 === R(t).find(C.selection.element()).length && !R(t).is(C.selection.element())) && O(), r = t, 0 < C.opts.tableEditButtons.length && I(r, r))
  15882. }
  15883. }
  15884. function n(e) {
  15885. if (C.popups.areVisible()) return !0;
  15886. if (a || C.$tb.is(e.target) || C.$tb.is(R(e.target).closest(".fr-toolbar")) || (0 < Q().length && C.toolbar.enable(), A()), !(1 != e.which || 1 == e.which && C.helpers.isMac() && e.ctrlKey)) {
  15887. if (o = !1, a) a = !1, k(e) || 1 != Q().length ? 0 < Q().length && (C.selection.isCollapsed() ? u() : (A(), C.edit.on())) : A();
  15888. if (y) {
  15889. y = !1, S.removeClass("fr-moving"), C.$el.removeClass("fr-no-selection"), C.edit.on();
  15890. var t = parseFloat(S.css("left")) + C.opts.tableResizerOffset + C.$wp.offset().left;
  15891. C.opts.iframe && (t -= C.$iframe.offset().left), S.data("release-position", t), S.removeData("max-left"), S.removeData("max-right"),
  15892. function T() {
  15893. var e = S.data("origin"),
  15894. t = S.data("release-position");
  15895. if (e !== t) {
  15896. var n = S.data("first"),
  15897. r = S.data("second"),
  15898. a = S.data("table"),
  15899. o = a.outerWidth();
  15900. if (C.undo.canDo() || C.undo.saveStep(), null != n && null != r) {
  15901. var i, s, l, c = L(a),
  15902. d = [],
  15903. f = [],
  15904. p = [],
  15905. u = [];
  15906. for (i = 0; i < c.length; i++) s = R(c[i][n]), l = R(c[i][r]), d[i] = s.outerWidth(), p[i] = l.outerWidth(), f[i] = d[i] / o * 100, u[i] = p[i] / o * 100;
  15907. for (i = 0; i < c.length; i++)
  15908. if (s = R(c[i][n]), l = R(c[i][r]), c[i][n] != c[i][r]) {
  15909. var h = (f[i] * (d[i] + t - e) / d[i]).toFixed(4);
  15910. s.css("width", h + "%"), l.css("width", (f[i] + u[i] - h).toFixed(4) + "%")
  15911. }
  15912. } else {
  15913. var g, m = a.parent(),
  15914. v = o / m.width() * 100,
  15915. b = (parseInt(a.css("margin-left"), 10) || 0) / m.width() * 100,
  15916. E = (parseInt(a.css("margin-right"), 10) || 0) / m.width() * 100;
  15917. "rtl" == C.opts.direction && 0 === r || "rtl" != C.opts.direction && 0 !== r ? (g = (o + t - e) / o * v, a.css("margin-right", "calc(100% - " + Math.round(g).toFixed(4) + "% - " + Math.round(b).toFixed(4) + "%)")) : ("rtl" == C.opts.direction && 0 !== r || "rtl" != C.opts.direction && 0 === r) && (g = (o - t + e) / o * v, a.css("margin-left", "calc(100% - " + Math.round(g).toFixed(4) + "% - " + Math.round(E).toFixed(4) + "%)")), a.css("width", Math.round(g).toFixed(4) + "%")
  15918. }
  15919. C.selection.restore(), C.undo.saveStep(), C.events.trigger("table.resized", [a.get(0)])
  15920. }
  15921. S.removeData("origin"), S.removeData("release-position"), S.removeData("first"), S.removeData("second"), S.removeData("table")
  15922. }(), P()
  15923. }
  15924. }
  15925. }
  15926. function D(e) {
  15927. if (!0 === a && 0 < C.opts.tableEditButtons.length) {
  15928. if (R(e.currentTarget).closest("table").is(J())) {
  15929. if ("TD" == e.currentTarget.tagName && 0 === C.$el.find("th.fr-selected-cell").length) return void I(r, e.currentTarget);
  15930. if ("TH" == e.currentTarget.tagName && 0 === C.$el.find("td.fr-selected-cell").length) return void I(r, e.currentTarget)
  15931. }
  15932. O()
  15933. }
  15934. }
  15935. function B(e, t, n, r) {
  15936. for (var a, o = t; o != C.el && "TD" != o.tagName && "TH" != o.tagName && ("up" == r ? a = o.previousElementSibling : "down" == r && (a = o.nextElementSibling), !a);) o = o.parentNode;
  15937. "TD" == o.tagName || "TH" == o.tagName ? function i(e, t) {
  15938. for (var n = e; n && "TABLE" != n.tagName && n.parentNode != C.el;) n = n.parentNode;
  15939. if (n && "TABLE" == n.tagName) {
  15940. var r = L(R(n));
  15941. "up" == t ? F(w(e, r), n, r) : "down" == t && $(w(e, r), n, r)
  15942. }
  15943. }(o, r) : a && ("up" == r && C.selection.setAtEnd(a), "down" == r && C.selection.setAtStart(a))
  15944. }
  15945. function F(e, t, n) {
  15946. 0 < e.row ? C.selection.setAtEnd(n[e.row - 1][e.col]) : B(0, t, 0, "up")
  15947. }
  15948. function $(e, t, n) {
  15949. var r = parseInt(n[e.row][e.col].getAttribute("rowspan"), 10) || 1;
  15950. e.row < n.length - r ? C.selection.setAtStart(n[e.row + r][e.col]) : B(0, t, 0, "down")
  15951. }
  15952. function P() {
  15953. S && (S.find("div").css("opacity", 0), S.css("top", 0), S.css("left", 0), S.css("height", 0), S.find("div").css("height", 0), S.hide())
  15954. }
  15955. function H() {
  15956. c && c.removeClass("fr-visible").css("left", "-9999px")
  15957. }
  15958. function K(e, t) {
  15959. var n = R(t),
  15960. r = n.closest("table"),
  15961. a = r.parent();
  15962. if (t && "TD" != t.tagName && "TH" != t.tagName && (0 < n.closest("td").length ? t = n.closest("td") : 0 < n.closest("th").length && (t = n.closest("th"))), !t || "TD" != t.tagName && "TH" != t.tagName) S && n.get(0) != S.get(0) && n.parent().get(0) != S.get(0) && C.core.sameInstance(S) && P();
  15963. else {
  15964. if (n = R(t), 0 === C.$el.find(n).length) return !1;
  15965. var o = n.offset().left - 1,
  15966. i = o + n.outerWidth();
  15967. if (Math.abs(e.pageX - o) <= C.opts.tableResizerOffset || Math.abs(i - e.pageX) <= C.opts.tableResizerOffset) {
  15968. var s, l, c, d, f, p = L(r),
  15969. u = w(t, p),
  15970. h = _(u.row, u.col, p),
  15971. g = r.offset().top,
  15972. m = r.outerHeight() - 1;
  15973. "rtl" != C.opts.direction ? e.pageX - o <= C.opts.tableResizerOffset ? (c = o, 0 < u.col ? (d = o - G(u.col - 1, p) + C.opts.tableResizingLimit, f = o + G(u.col, p) - C.opts.tableResizingLimit, s = u.col - 1, l = u.col) : (s = null, l = 0, d = r.offset().left - 1 - parseInt(r.css("margin-left"), 10), f = r.offset().left - 1 + r.width() - p[0].length * C.opts.tableResizingLimit)) : i - e.pageX <= C.opts.tableResizerOffset && (c = i, h.col < p[h.row].length && p[h.row][h.col + 1] ? (d = i - G(h.col, p) + C.opts.tableResizingLimit, f = i + G(h.col + 1, p) - C.opts.tableResizingLimit, s = h.col, l = h.col + 1) : (s = h.col, l = null, d = r.offset().left - 1 + p[0].length * C.opts.tableResizingLimit, f = a.offset().left - 1 + a.width() + parseFloat(a.css("padding-left")))) : i - e.pageX <= C.opts.tableResizerOffset ? (c = i, 0 < u.col ? (d = i - G(u.col, p) + C.opts.tableResizingLimit, f = i + G(u.col - 1, p) - C.opts.tableResizingLimit, s = u.col, l = u.col - 1) : (s = null, l = 0, d = r.offset().left + p[0].length * C.opts.tableResizingLimit, f = a.offset().left - 1 + a.width() + parseFloat(a.css("padding-left")))) : e.pageX - o <= C.opts.tableResizerOffset && (c = o, h.col < p[h.row].length && p[h.row][h.col + 1] ? (d = o - G(h.col + 1, p) + C.opts.tableResizingLimit, f = o + G(h.col, p) - C.opts.tableResizingLimit, s = h.col + 1, l = h.col) : (s = h.col, l = null, d = a.offset().left + parseFloat(a.css("padding-left")), f = r.offset().left - 1 + r.width() - p[0].length * C.opts.tableResizingLimit)), S || function A() {
  15974. C.shared.$table_resizer || (C.shared.$table_resizer = R(document.createElement("div")).attr("class", "fr-table-resizer").html("<div></div>")), S = C.shared.$table_resizer, C.events.$on(S, "mousedown", function(e) {
  15975. return !C.core.sameInstance(S) || (0 < Q().length && M(), 1 == e.which ? (C.selection.save(), y = !0, S.addClass("fr-moving"), O(), C.edit.off(), S.find("div").css("opacity", 1), !1) : void 0)
  15976. }), C.events.$on(S, "mousemove", function(e) {
  15977. if (!C.core.sameInstance(S)) return !0;
  15978. y && (C.opts.iframe && (e.pageX -= C.$iframe.offset().left), j(e))
  15979. }), C.events.on("shared.destroy", function() {
  15980. S.html("").removeData().remove(), S = null
  15981. }, !0), C.events.on("destroy", function() {
  15982. C.$el.find(".fr-selected-cell").removeClass("fr-selected-cell"), R("body").first().append(S.hide())
  15983. }, !0)
  15984. }(), S.data("table", r), S.data("first", s), S.data("second", l), S.data("instance", C), C.$wp.append(S);
  15985. var v = c - C.win.pageXOffset - C.opts.tableResizerOffset - C.$wp.offset().left,
  15986. b = g - C.$wp.offset().top + C.$wp.scrollTop();
  15987. if (C.opts.iframe) {
  15988. var E = C.helpers.getPX(C.$wp.find(".fr-iframe").css("padding-top")),
  15989. T = C.helpers.getPX(C.$wp.find(".fr-iframe").css("padding-left"));
  15990. v += C.$iframe.offset().left + T, b += C.$iframe.offset().top + E, d += C.$iframe.offset().left, f += C.$iframe.offset().left
  15991. }
  15992. S.data("max-left", d), S.data("max-right", f), S.data("origin", c - C.win.pageXOffset), S.css("top", b), S.css("left", v), S.css("height", m), S.find("div").css("height", m), S.css("padding-left", C.opts.tableResizerOffset), S.css("padding-right", C.opts.tableResizerOffset), S.show()
  15993. } else C.core.sameInstance(S) && P()
  15994. }
  15995. }
  15996. function U(e, t) {
  15997. if (C.$box.find(".fr-line-breaker").isVisible()) return !1;
  15998. c || X(), C.$box.append(c), c.data("instance", C);
  15999. var n, r = R(t).find("tr").first(),
  16000. a = e.pageX,
  16001. o = 0,
  16002. i = 0;
  16003. if (C.opts.iframe) {
  16004. var s = C.helpers.getPX(C.$wp.find(".fr-iframe").css("padding-top")),
  16005. l = C.helpers.getPX(C.$wp.find(".fr-iframe").css("padding-left"));
  16006. o += C.$iframe.offset().left - C.helpers.scrollLeft() + l, i += C.$iframe.offset().top - C.helpers.scrollTop() + s
  16007. }
  16008. r.find("th, td").each(function() {
  16009. var e = R(this);
  16010. return e.offset().left <= a && a < e.offset().left + e.outerWidth() / 2 ? (n = parseInt(c.find("a").css("width"), 10), c.css("top", i + e.offset().top - C.$box.offset().top - n - 5), c.css("left", o + e.offset().left - C.$box.offset().left - n / 2), c.data("selected-cell", e), c.data("position", "before"), c.addClass("fr-visible"), !1) : e.offset().left + e.outerWidth() / 2 <= a && a < e.offset().left + e.outerWidth() ? (n = parseInt(c.find("a").css("width"), 10), c.css("top", i + e.offset().top - C.$box.offset().top - n - 5), c.css("left", o + e.offset().left - C.$box.offset().left + e.outerWidth() - n / 2), c.data("selected-cell", e), c.data("position", "after"), c.addClass("fr-visible"), !1) : void 0
  16011. })
  16012. }
  16013. function W(e, t) {
  16014. if (C.$box.find(".fr-line-breaker").isVisible()) return !1;
  16015. c || X(), C.$box.append(c), c.data("instance", C);
  16016. var n, r = R(t),
  16017. a = e.pageY,
  16018. o = 0,
  16019. i = 0;
  16020. if (C.opts.iframe) {
  16021. var s = C.helpers.getPX(C.$wp.find(".fr-iframe").css("padding-top")),
  16022. l = C.helpers.getPX(C.$wp.find(".fr-iframe").css("padding-left"));
  16023. o += C.$iframe.offset().left - C.helpers.scrollLeft() + l, i += C.$iframe.offset().top - C.helpers.scrollTop() + s
  16024. }
  16025. r.find("tr").each(function() {
  16026. var e = R(this);
  16027. return e.offset().top <= a && a < e.offset().top + e.outerHeight() / 2 ? (n = parseInt(c.find("a").css("width"), 10), c.css("top", i + e.offset().top - C.$box.offset().top - n / 2), c.css("left", o + e.offset().left - C.$box.offset().left - n - 5), c.data("selected-cell", e.find("td").first()), c.data("position", "above"), c.addClass("fr-visible"), !1) : e.offset().top + e.outerHeight() / 2 <= a && a < e.offset().top + e.outerHeight() ? (n = parseInt(c.find("a").css("width"), 10), c.css("top", i + e.offset().top - C.$box.offset().top + e.outerHeight() - n / 2), c.css("left", o + e.offset().left - C.$box.offset().left - n - 5), c.data("selected-cell", e.find("td").first()), c.data("position", "below"), c.addClass("fr-visible"), !1) : void 0
  16028. })
  16029. }
  16030. function V(e) {
  16031. i = null;
  16032. var t = C.doc.elementFromPoint(e.pageX - C.win.pageXOffset, e.pageY - C.win.pageYOffset);
  16033. C.opts.tableResizer && (!C.popups.areVisible() || C.popups.areVisible() && C.popups.isVisible("table.edit")) && K(e, t), !C.opts.tableInsertHelper || C.popups.areVisible() || C.$tb.hasClass("fr-inline") && C.$tb.isVisible() || function o(e, t) {
  16034. if (0 === Q().length) {
  16035. var n, r, a;
  16036. if (t && ("HTML" == t.tagName || "BODY" == t.tagName || C.node.isElement(t)))
  16037. for (n = 1; n <= C.opts.tableInsertHelperOffset; n++) {
  16038. if (r = C.doc.elementFromPoint(e.pageX - C.win.pageXOffset, e.pageY - C.win.pageYOffset + n), R(r).hasClass("fr-tooltip")) return !0;
  16039. if (r && ("TH" == r.tagName || "TD" == r.tagName || "TABLE" == r.tagName) && (R(r).parents(".fr-wrapper").length || C.opts.iframe) && "false" != R(r).closest("table").attr("contenteditable")) return U(e, R(r).closest("table")), !0;
  16040. if (a = C.doc.elementFromPoint(e.pageX - C.win.pageXOffset + n, e.pageY - C.win.pageYOffset), R(a).hasClass("fr-tooltip")) return !0;
  16041. if (a && ("TH" == a.tagName || "TD" == a.tagName || "TABLE" == a.tagName) && (R(a).parents(".fr-wrapper").length || C.opts.iframe) && "false" != R(a).closest("table").attr("contenteditable")) return W(e, R(a).closest("table")), !0
  16042. }
  16043. C.core.sameInstance(c) && H()
  16044. }
  16045. }(e, t)
  16046. }
  16047. function z() {
  16048. if (y) {
  16049. var e = S.data("table").offset().top - C.win.pageYOffset;
  16050. if (C.opts.iframe) {
  16051. var t = C.helpers.getPX(C.$wp.find(".fr-iframe").css("padding-top"));
  16052. e += C.$iframe.offset().top - C.helpers.scrollTop() + t
  16053. }
  16054. S.css("top", e)
  16055. }
  16056. }
  16057. function G(e, t) {
  16058. var n, r = R(t[0][e]).outerWidth();
  16059. for (n = 1; n < t.length; n++) r = Math.min(r, R(t[n][e]).outerWidth());
  16060. return r
  16061. }
  16062. function Y(e, t, n) {
  16063. var r, a = 0;
  16064. for (r = e; r <= t; r++) a += G(r, n);
  16065. return a
  16066. }
  16067. function j(e) {
  16068. if (1 < Q().length && o && O(), !1 === o && !1 === a && !1 === y) i && clearTimeout(i), C.edit.isDisabled() && !C.popups.isVisible("table.edit") || (i = setTimeout(V, 30, e));
  16069. else if (y) {
  16070. var t = e.pageX - C.win.pageXOffset;
  16071. C.opts.iframe && (t += C.$iframe.offset().left);
  16072. var n = S.data("max-left"),
  16073. r = S.data("max-right");
  16074. n <= t && t <= r ? S.css("left", t - C.opts.tableResizerOffset - C.$wp.offset().left) : t < n && parseFloat(S.css("left"), 10) > n - C.opts.tableResizerOffset ? S.css("left", n - C.opts.tableResizerOffset - C.$wp.offset().left) : r < t && parseFloat(S.css("left"), 10) < r - C.opts.tableResizerOffset && S.css("left", r - C.opts.tableResizerOffset - C.$wp.offset().left)
  16075. } else o && H()
  16076. }
  16077. function q(e) {
  16078. C.node.isEmpty(e.get(0)) ? e.prepend($e.MARKERS) : e.prepend($e.START_MARKER).append($e.END_MARKER)
  16079. }
  16080. function X() {
  16081. C.shared.$ti_helper || (C.shared.$ti_helper = R(document.createElement("div")).attr("class", "fr-insert-helper").html('<a class="fr-floating-btn" role="button" tabIndex="-1" title="' + C.language.translate("Insert") + '"><svg viewBox="0 0 32 32" xmlns="http://www.w3.org/2000/svg"><path d="M22,16.75 L16.75,16.75 L16.75,22 L15.25,22.000 L15.25,16.75 L10,16.75 L10,15.25 L15.25,15.25 L15.25,10 L16.75,10 L16.75,15.25 L22,15.25 L22,16.75 Z"/></svg></a>'), C.events.bindClick(C.shared.$ti_helper, "a", function() {
  16082. var e = c.data("selected-cell"),
  16083. t = c.data("position"),
  16084. n = c.data("instance") || C;
  16085. "before" == t ? (C.undo.saveStep(), e.addClass("fr-selected-cell"), n.table.insertColumn(t), e.removeClass("fr-selected-cell"), C.undo.saveStep()) : "after" == t ? (C.undo.saveStep(), e.addClass("fr-selected-cell"), n.table.insertColumn(t), e.removeClass("fr-selected-cell"), C.undo.saveStep()) : "above" == t ? (C.undo.saveStep(), e.addClass("fr-selected-cell"), n.table.insertRow(t), e.removeClass("fr-selected-cell"), C.undo.saveStep()) : "below" == t && (C.undo.saveStep(), e.addClass("fr-selected-cell"), n.table.insertRow(t), e.removeClass("fr-selected-cell"), C.undo.saveStep()), H()
  16086. }), C.events.on("shared.destroy", function() {
  16087. C.shared.$ti_helper.html("").removeData().remove(), C.shared.$ti_helper = null
  16088. }, !0), C.events.$on(C.shared.$ti_helper, "mousemove", function(e) {
  16089. e.stopPropagation()
  16090. }, !0), C.events.$on(R(C.o_win), "scroll", function() {
  16091. H()
  16092. }, !0), C.events.$on(C.$wp, "scroll", function() {
  16093. H()
  16094. }, !0)), c = C.shared.$ti_helper, C.events.on("destroy", function() {
  16095. c = null
  16096. }), C.tooltip.bind(C.$box, ".fr-insert-helper > a.fr-floating-btn")
  16097. }
  16098. function Z() {
  16099. r = null, clearTimeout(i)
  16100. }
  16101. function Q() {
  16102. return C.el.querySelectorAll(".fr-selected-cell")
  16103. }
  16104. function J() {
  16105. var e = Q();
  16106. if (e.length) {
  16107. for (var t = e[0]; t && "TABLE" != t.tagName && t.parentNode != C.el;) t = t.parentNode;
  16108. return t && "TABLE" == t.tagName ? R(t) : R([])
  16109. }
  16110. return R([])
  16111. }
  16112. return {
  16113. _init: function ee() {
  16114. if (!C.$wp) return !1;
  16115. if (!C.helpers.isMobile()) {
  16116. y = a = o = !1, C.events.$on(C.$el, "mousedown", e), C.popups.onShow("image.edit", function() {
  16117. A(), a = o = !1
  16118. }), C.popups.onShow("link.edit", function() {
  16119. A(), a = o = !1
  16120. }), C.events.on("commands.mousedown", function(e) {
  16121. 0 < e.parents(".fr-toolbar").length && A()
  16122. }), C.events.$on(C.$el, "mouseover", "th, td", D), C.events.$on(C.$win, "mouseup", n), C.opts.iframe && C.events.$on(R(C.o_win), "mouseup", n), C.events.$on(C.$win, "mousemove", j), C.events.$on(R(C.o_win), "scroll", z), C.events.on("contentChanged", function() {
  16123. 0 < Q().length && (u(), C.$el.find("img").on("load.selected-cells", function() {
  16124. R(this).off("load.selected-cells"), 0 < Q().length && u()
  16125. }))
  16126. }), C.events.$on(R(C.o_win), "resize", function() {
  16127. A()
  16128. }), C.events.on("toolbar.esc", function() {
  16129. if (0 < Q().length) return C.events.disableBlur(), C.events.focus(), !1
  16130. }, !0), C.events.$on(R(C.o_win), "keydown", function() {
  16131. o && a && (a = o = !1, C.$el.removeClass("fr-no-selection"), C.edit.on(), C.selection.setAtEnd(C.$el.find(".fr-selected-cell").last().get(0)), C.selection.restore(), A())
  16132. }), C.events.$on(C.$el, "keydown", function(e) {
  16133. e.shiftKey ? !1 === function i(e) {
  16134. var t = Q();
  16135. if (null != t && 0 < t.length) {
  16136. var n, r = L(),
  16137. a = e.which,
  16138. o = w(1 == t.length ? n = t[0] : (n = C.el.querySelector(".fr-cell-fixed"), C.el.querySelector(".fr-cell-handler")), r);
  16139. if ($e.KEYCODE.ARROW_RIGHT == a) {
  16140. if (o.col < r[0].length - 1) return I(n, r[o.row][o.col + 1]), !1
  16141. } else if ($e.KEYCODE.ARROW_DOWN == a) {
  16142. if (o.row < r.length - 1) return I(n, r[o.row + 1][o.col]), !1
  16143. } else if ($e.KEYCODE.ARROW_LEFT == a) {
  16144. if (0 < o.col) return I(n, r[o.row][o.col - 1]), !1
  16145. } else if ($e.KEYCODE.ARROW_UP == a && 0 < o.row) return I(n, r[o.row - 1][o.col]), !1
  16146. }
  16147. }(e) && setTimeout(function() {
  16148. u()
  16149. }, 0) : function s(e) {
  16150. var t = e.which,
  16151. n = C.selection.blocks();
  16152. if (n.length && ("TD" == (n = n[0]).tagName || "TH" == n.tagName)) {
  16153. for (var r = n; r && "TABLE" != r.tagName && r.parentNode != C.el;) r = r.parentNode;
  16154. if (r && "TABLE" == r.tagName && ($e.KEYCODE.ARROW_LEFT == t || $e.KEYCODE.ARROW_UP == t || $e.KEYCODE.ARROW_RIGHT == t || $e.KEYCODE.ARROW_DOWN == t) && (0 < Q().length && M(), C.browser.webkit && ($e.KEYCODE.ARROW_UP == t || $e.KEYCODE.ARROW_DOWN == t))) {
  16155. var a = C.selection.ranges(0).startContainer;
  16156. if (a.nodeType == Node.TEXT_NODE && ($e.KEYCODE.ARROW_UP == t && (a.previousSibling && "BR" !== a.previousSibling.tagName || a.previousSibling && "BR" === a.previousSibling.tagName && a.previousSibling.previousSibling) || $e.KEYCODE.ARROW_DOWN == t && (a.nextSibling && "BR" !== a.nextSibling.tagName || a.nextSibling && "BR" === a.nextSibling.tagName && a.nextSibling.nextSibling))) return;
  16157. e.preventDefault(), e.stopPropagation();
  16158. var o = L(R(r)),
  16159. i = w(n, o);
  16160. return $e.KEYCODE.ARROW_UP == t ? F(i, r, o) : $e.KEYCODE.ARROW_DOWN == t && $(i, r, o), C.selection.restore(), !1
  16161. }
  16162. }
  16163. }(e)
  16164. }), C.events.on("keydown", function(e) {
  16165. if (!1 === function r(e) {
  16166. if (e.which == $e.KEYCODE.TAB) {
  16167. var t;
  16168. if (0 < Q().length) t = C.$el.find(".fr-selected-cell").last();
  16169. else {
  16170. var n = C.selection.element();
  16171. "TD" == n.tagName || "TH" == n.tagName ? t = R(n) : n != C.el && (0 < R(n).parentsUntil(C.$el, "td").length ? t = R(n).parents("td").first() : 0 < R(n).parentsUntil(C.$el, "th").length && (t = R(n).parents("th").first()))
  16172. } if (t) return e.preventDefault(), !!(0 === C.selection.get().focusOffset && 0 < R(C.selection.element()).parentsUntil(C.$el, "ol, ul").length && (0 < R(C.selection.element()).closest("li").prev().length || R(C.selection.element()).is("li") && 0 < R(C.selection.element()).prev().length)) || (M(), e.shiftKey ? 0 < t.prev().length ? q(t.prev()) : 0 < t.closest("tr").length && 0 < t.closest("tr").prev().length ? q(t.closest("tr").prev().find("td").last()) : 0 < t.closest("tbody").length && 0 < t.closest("table").find("thead tr").length && q(t.closest("table").find("thead tr th").last()) : 0 < t.next().length ? q(t.next()) : 0 < t.closest("tr").length && 0 < t.closest("tr").next().length ? q(t.closest("tr").next().find("td").first()) : 0 < t.closest("thead").length && 0 < t.closest("table").find("tbody tr").length ? q(t.closest("table").find("tbody tr td").first()) : (t.addClass("fr-selected-cell"), g("below"), A(), q(t.closest("tr").next().find("td").first())), C.selection.restore(), !1)
  16173. }
  16174. }(e)) return !1;
  16175. var t = Q();
  16176. if (0 < t.length) {
  16177. if (0 < t.length && C.keys.ctrlKey(e) && e.which == $e.KEYCODE.A) return A(), C.popups.isVisible("table.edit") && C.popups.hide("table.edit"), t = [], !0;
  16178. if (e.which == $e.KEYCODE.ESC && C.popups.isVisible("table.edit")) return A(), C.popups.hide("table.edit"), e.preventDefault(), e.stopPropagation(), e.stopImmediatePropagation(), !(t = []);
  16179. if (1 < t.length && (e.which == $e.KEYCODE.BACKSPACE || e.which == $e.KEYCODE.DELETE)) {
  16180. C.undo.saveStep();
  16181. for (var n = 0; n < t.length; n++) R(t[n]).html("<br>"), n == t.length - 1 && R(t[n]).prepend($e.MARKERS);
  16182. return C.selection.restore(), C.undo.saveStep(), !(t = [])
  16183. }
  16184. if (1 < t.length && e.which != $e.KEYCODE.F10 && !C.keys.isBrowserAction(e)) return e.preventDefault(), !(t = [])
  16185. } else if (!(t = []) === function a(e) {
  16186. if (e.altKey && e.which == $e.KEYCODE.SPACE) {
  16187. var t, n = C.selection.element();
  16188. if ("TD" == n.tagName || "TH" == n.tagName ? t = n : 0 < R(n).closest("td").length ? t = R(n).closest("td").get(0) : 0 < R(n).closest("th").length && (t = R(n).closest("th").get(0)), t) return e.preventDefault(), I(t, t), u(), !1
  16189. }
  16190. }(e)) return !1
  16191. }, !0);
  16192. var t = [];
  16193. C.events.on("html.beforeGet", function() {
  16194. t = Q();
  16195. for (var e = 0; e < t.length; e++) t[e].className = (t[e].className || "").replace(/fr-selected-cell/g, "")
  16196. }), C.events.on("html.afterGet", function() {
  16197. for (var e = 0; e < t.length; e++) t[e].className = (t[e].className ? t[e].className.trim() + " " : "") + "fr-selected-cell";
  16198. t = []
  16199. }), d(!0), p(!0)
  16200. }
  16201. C.events.on("destroy", Z)
  16202. },
  16203. insert: function te(e, t) {
  16204. var n, r, a = "<table " + (C.opts.tableDefaultWidth ? 'style="width: ' + C.opts.tableDefaultWidth + ';" ' : "") + 'class="fr-inserted-table"><tbody>',
  16205. o = 100 / t;
  16206. for (n = 0; n < e; n++) {
  16207. for (a += "<tr>", r = 0; r < t; r++) a += "<td" + (C.opts.tableDefaultWidth ? ' style="width: ' + o.toFixed(4) + '%;"' : "") + ">", 0 === n && 0 === r && (a += $e.MARKERS), a += "<br></td>";
  16208. a += "</tr>"
  16209. }
  16210. a += "</tbody></table>", C.html.insert(a), C.selection.restore();
  16211. var i = C.$el.find(".fr-inserted-table");
  16212. i.removeClass("fr-inserted-table"), C.events.trigger("table.inserted", [i.get(0)])
  16213. },
  16214. remove: h,
  16215. insertRow: g,
  16216. deleteRow: function ne() {
  16217. var e = J();
  16218. if (0 < e.length) {
  16219. var t, n, r, a = L(),
  16220. o = N(a);
  16221. if (null == o) return;
  16222. if (0 === o.min_i && o.max_i == a.length - 1) h();
  16223. else {
  16224. for (t = o.max_i; t >= o.min_i; t--) {
  16225. for (r = R(e.find("tr").not(e.find("> table tr")).get(t)), n = 0; n < a[t].length; n++)
  16226. if (0 === n || a[t][n] != a[t][n - 1]) {
  16227. var i = R(a[t][n]);
  16228. if (1 < parseInt(i.attr("rowspan"), 10)) {
  16229. var s = parseInt(i.attr("rowspan"), 10) - 1;
  16230. 1 == s ? i.removeAttr("rowspan") : i.attr("rowspan", s)
  16231. }
  16232. if (t < a.length - 1 && a[t][n] == a[t + 1][n] && (0 === t || a[t][n] != a[t - 1][n])) {
  16233. for (var l = a[t][n], c = n; 0 < c && a[t][c] == a[t][c - 1];) c--;
  16234. 0 === c ? R(e.find("tr").not(e.find("> table tr")).get(t + 1)).prepend(l) : R(a[t + 1][c - 1])[0].parentNode && R(a[t + 1][c - 1])[0].insertAdjacentElement("afterend", l)
  16235. }
  16236. }
  16237. var d = r.parent();
  16238. r.remove(), 0 === d.find("tr").length && d.remove(), a = L(e)
  16239. }
  16240. E(0, a.length - 1, 0, a[0].length - 1, e), 0 < o.min_i ? C.selection.setAtEnd(a[o.min_i - 1][0]) : C.selection.setAtEnd(a[0][0]), C.selection.restore(), C.popups.hide("table.edit")
  16241. }
  16242. }
  16243. },
  16244. insertColumn: function re(l) {
  16245. var e = J();
  16246. if (0 < e.length) {
  16247. var c, d = L(),
  16248. t = N(d);
  16249. c = "before" == l ? t.min_j : t.max_j;
  16250. var n, f = 100 / d[0].length,
  16251. p = 100 / (d[0].length + 1);
  16252. e.find("th, td").each(function() {
  16253. (n = R(this)).data("old-width", n.outerWidth() / e.outerWidth() * 100)
  16254. }), e.find("tr").not(e.find("> table tr")).each(function(e) {
  16255. for (var t, n = R(this), r = 0, a = 0; r - 1 < c;) {
  16256. if (!(t = n.find("> th, > td").get(a))) {
  16257. t = null;
  16258. break
  16259. }
  16260. t == d[e][r] ? (r += parseInt(R(t).attr("colspan"), 10) || 1, a++) : (r += parseInt(R(d[e][r]).attr("colspan"), 10) || 1, "after" == l && (t = 0 === a ? -1 : n.find("> th, > td").get(a - 1)))
  16261. }
  16262. var o, i = R(t);
  16263. if ("after" == l && c < r - 1 || "before" == l && 0 < c && d[e][c] == d[e][c - 1]) {
  16264. if (0 === e || 0 < e && d[e][c] != d[e - 1][c]) {
  16265. var s = parseInt(i.attr("colspan"), 10) + 1;
  16266. i.attr("colspan", s), i.css("width", (i.data("old-width") * p / f + p).toFixed(4) + "%"), i.removeData("old-width")
  16267. }
  16268. } else o = 0 < n.find("th").length ? '<th style="width: ' + p.toFixed(4) + '%;"><br></th>' : '<td style="width: ' + p.toFixed(4) + '%;"><br></td>', -1 == t ? n.prepend(o) : null == t ? n.append(o) : "before" == l ? i.before(o) : "after" == l && i[0].parentNode && i[0].insertAdjacentHTML("afterend", o)
  16269. }), e.find("th, td").each(function() {
  16270. (n = R(this)).data("old-width") && (n.css("width", (n.data("old-width") * p / f).toFixed(4) + "%"), n.removeData("old-width"))
  16271. }), C.popups.isVisible("table.edit") && u()
  16272. }
  16273. },
  16274. deleteColumn: function ae() {
  16275. var e = J();
  16276. if (0 < e.length) {
  16277. var t, n, r, a = L(),
  16278. o = N(a);
  16279. if (null == o) return;
  16280. if (0 === o.min_j && o.max_j == a[0].length - 1) h();
  16281. else {
  16282. var i = 0;
  16283. for (t = 0; t < a.length; t++)
  16284. for (n = 0; n < a[0].length; n++)(r = R(a[t][n])).hasClass("fr-selected-cell") || (r.data("old-width", r.outerWidth() / e.outerWidth() * 100), (n < o.min_j || n > o.max_j) && (i += r.outerWidth() / e.outerWidth() * 100));
  16285. for (i /= a.length, n = o.max_j; n >= o.min_j; n--)
  16286. for (t = 0; t < a.length; t++)
  16287. if (0 === t || a[t][n] != a[t - 1][n])
  16288. if (r = R(a[t][n]), 1 < (parseInt(r.attr("colspan"), 10) || 1)) {
  16289. var s = parseInt(r.attr("colspan"), 10) - 1;
  16290. 1 == s ? r.removeAttr("colspan") : r.attr("colspan", s), r.css("width", (100 * (r.data("old-width") - G(n, a)) / i).toFixed(4) + "%"), r.removeData("old-width")
  16291. } else {
  16292. var l = R(r.parent().get(0));
  16293. r.remove(), 0 === l.find("> th, > td").length && (0 === l.prev().length || 0 === l.next().length || l.prev().find("> th[rowspan], > td[rowspan]").length < l.prev().find("> th, > td").length) && l.remove()
  16294. }
  16295. E(0, a.length - 1, 0, a[0].length - 1, e), 0 < o.min_j ? C.selection.setAtEnd(a[o.min_i][o.min_j - 1]) : C.selection.setAtEnd(a[o.min_i][0]), C.selection.restore(), C.popups.hide("table.edit"), e.find("th, td").each(function() {
  16296. (r = R(this)).data("old-width") && (r.css("width", (100 * r.data("old-width") / i).toFixed(4) + "%"), r.removeData("old-width"))
  16297. })
  16298. }
  16299. }
  16300. },
  16301. mergeCells: function oe() {
  16302. if (1 < Q().length && (0 === C.$el.find("th.fr-selected-cell").length || 0 === C.$el.find("td.fr-selected-cell").length)) {
  16303. T();
  16304. var e, t, n = N(L());
  16305. if (null == n) return;
  16306. var r = C.$el.find(".fr-selected-cell"),
  16307. a = R(r[0]),
  16308. o = a.parent().find(".fr-selected-cell"),
  16309. i = a.closest("table"),
  16310. s = a.html(),
  16311. l = 0;
  16312. for (e = 0; e < o.length; e++) l += R(o[e]).outerWidth();
  16313. for (a.css("width", Math.min(100, l / i.outerWidth() * 100).toFixed(4) + "%"), n.min_j < n.max_j && a.attr("colspan", n.max_j - n.min_j + 1), n.min_i < n.max_i && a.attr("rowspan", n.max_i - n.min_i + 1), e = 1; e < r.length; e++) "<br>" != (t = R(r[e])).html() && "" !== t.html() && (s += "<br>" + t.html()), t.remove();
  16314. a.html(s), C.selection.setAtEnd(a.get(0)), C.selection.restore(), C.toolbar.enable(), v(n.min_i, n.max_i, i);
  16315. var c = i.find("tr:empty");
  16316. for (e = c.length - 1; 0 <= e; e--) R(c[e]).remove();
  16317. m(n.min_j, n.max_j, i), u()
  16318. }
  16319. },
  16320. splitCellVertically: function ie() {
  16321. if (1 == Q().length) {
  16322. var e = C.$el.find(".fr-selected-cell"),
  16323. t = parseInt(e.attr("colspan"), 10) || 1,
  16324. n = e.parent().outerWidth(),
  16325. r = e.outerWidth(),
  16326. a = e.clone().html("<br>"),
  16327. o = L(),
  16328. i = w(e.get(0), o);
  16329. if (1 < t) {
  16330. var s = Math.ceil(t / 2);
  16331. r = Y(i.col, i.col + s - 1, o) / n * 100;
  16332. var l = Y(i.col + s, i.col + t - 1, o) / n * 100;
  16333. 1 < s ? e.attr("colspan", s) : e.removeAttr("colspan"), 1 < t - s ? a.attr("colspan", t - s) : a.removeAttr("colspan"), e.css("width", r.toFixed(4) + "%"), a.css("width", l.toFixed(4) + "%")
  16334. } else {
  16335. var c;
  16336. for (c = 0; c < o.length; c++)
  16337. if (0 === c || o[c][i.col] != o[c - 1][i.col]) {
  16338. var d = R(o[c][i.col]);
  16339. if (!d.is(e)) {
  16340. var f = (parseInt(d.attr("colspan"), 10) || 1) + 1;
  16341. d.attr("colspan", f)
  16342. }
  16343. }
  16344. r = r / n * 100 / 2, e.css("width", r.toFixed(4) + "%"), a.css("width", r.toFixed(4) + "%")
  16345. }
  16346. e[0].parentNode && e[0].insertAdjacentElement("afterend", a[0]), A(), C.popups.hide("table.edit")
  16347. }
  16348. },
  16349. splitCellHorizontally: function se() {
  16350. if (1 == Q().length) {
  16351. var e = C.$el.find(".fr-selected-cell"),
  16352. t = e.parent(),
  16353. n = e.closest("table"),
  16354. r = parseInt(e.attr("rowspan"), 10),
  16355. a = L(),
  16356. o = w(e.get(0), a),
  16357. i = e.clone().html("<br>");
  16358. if (1 < r) {
  16359. var s = Math.ceil(r / 2);
  16360. 1 < s ? e.attr("rowspan", s) : e.removeAttr("rowspan"), 1 < r - s ? i.attr("rowspan", r - s) : i.removeAttr("rowspan");
  16361. for (var l = o.row + s, c = 0 === o.col ? o.col : o.col - 1; 0 <= c && (a[l][c] == a[l][c - 1] || 0 < l && a[l][c] == a[l - 1][c]);) c--; - 1 == c ? R(n.find("tr").not(n.find("> table tr")).get(l)).prepend(i) : R(a[l][c])[0].parentNode && R(a[l][c])[0].insertAdjacentElement("afterend", i[0])
  16362. } else {
  16363. var d, f = R(document.createElement("tr")).append(i);
  16364. for (d = 0; d < a[0].length; d++)
  16365. if (0 === d || a[o.row][d] != a[o.row][d - 1]) {
  16366. var p = R(a[o.row][d]);
  16367. p.is(e) || p.attr("rowspan", (parseInt(p.attr("rowspan"), 10) || 1) + 1)
  16368. }
  16369. t[0].parentNode && t[0].insertAdjacentElement("afterend", f[0])
  16370. }
  16371. A(), C.popups.hide("table.edit")
  16372. }
  16373. },
  16374. addHeader: function le() {
  16375. var e = J();
  16376. if (0 < e.length && 0 === e.find("th").length) {
  16377. var t, n = "<thead><tr>",
  16378. r = 0;
  16379. for (e.find("tr").first().find("> td").each(function() {
  16380. var e = R(this);
  16381. r += parseInt(e.attr("colspan"), 10) || 1
  16382. }), t = 0; t < r; t++) n += "<th><br></th>";
  16383. n += "</tr></thead>", e.prepend(n), u()
  16384. }
  16385. },
  16386. removeHeader: function ce() {
  16387. var e = J(),
  16388. t = e.find("thead");
  16389. if (0 < t.length)
  16390. if (0 === e.find("tbody tr").length) h();
  16391. else if (t.remove(), 0 < Q().length) u();
  16392. else {
  16393. C.popups.hide("table.edit");
  16394. var n = e.find("tbody tr").first().find("td").first().get(0);
  16395. n && (C.selection.setAtEnd(n), C.selection.restore())
  16396. }
  16397. },
  16398. setBackground: t,
  16399. showInsertPopup: function de() {
  16400. var e = C.$tb.find('.fr-command[data-cmd="insertTable"]'),
  16401. t = C.popups.get("table.insert");
  16402. if (t || (t = d()), !t.hasClass("fr-active")) {
  16403. C.popups.refresh("table.insert"), C.popups.setContainer("table.insert", C.$tb);
  16404. var n = C.button.getPosition(e),
  16405. r = n.left,
  16406. a = n.top;
  16407. C.popups.show("table.insert", r, a, e.outerHeight())
  16408. }
  16409. },
  16410. showEditPopup: u,
  16411. showColorsPopup: s,
  16412. back: function fe() {
  16413. 0 < Q().length ? u() : (C.popups.hide("table.insert"), C.toolbar.showInline())
  16414. },
  16415. verticalAlign: function pe(e) {
  16416. C.$el.find(".fr-selected-cell").css("vertical-align", e)
  16417. },
  16418. horizontalAlign: function ue(e) {
  16419. C.$el.find(".fr-selected-cell").css("text-align", e)
  16420. },
  16421. applyStyle: function he(e, t, n, r) {
  16422. if (0 < t.length) {
  16423. if (!n) {
  16424. var a = Object.keys(r);
  16425. a.splice(a.indexOf(e), 1), t.removeClass(a.join(" "))
  16426. }
  16427. t.toggleClass(e)
  16428. }
  16429. },
  16430. selectedTable: J,
  16431. selectedCells: Q,
  16432. customColor: function ge() {
  16433. var e = C.popups.get("table.colors").find(".fr-table-colors-hex-layer input");
  16434. e.length && t(e.val())
  16435. },
  16436. selectCells: I
  16437. }
  16438. }, $e.DefineIcon("insertTable", {
  16439. NAME: "table",
  16440. SVG_KEY: "insertTable"
  16441. }), $e.RegisterCommand("insertTable", {
  16442. title: "Insert Table",
  16443. undo: !1,
  16444. focus: !0,
  16445. refreshOnCallback: !1,
  16446. popup: !0,
  16447. callback: function() {
  16448. this.popups.isVisible("table.insert") ? (this.$el.find(".fr-marker").length && (this.events.disableBlur(), this.selection.restore()), this.popups.hide("table.insert")) : this.table.showInsertPopup()
  16449. },
  16450. plugin: "table"
  16451. }), $e.RegisterCommand("tableInsert", {
  16452. callback: function(e, t, n) {
  16453. this.table.insert(t, n), this.popups.hide("table.insert")
  16454. }
  16455. }), $e.DefineIcon("tableHeader", {
  16456. NAME: "header",
  16457. FA5NAME: "heading",
  16458. SVG_KEY: "tableHeader"
  16459. }), $e.RegisterCommand("tableHeader", {
  16460. title: "Table Header",
  16461. focus: !1,
  16462. toggle: !0,
  16463. callback: function() {
  16464. this.popups.get("table.edit").find('.fr-command[data-cmd="tableHeader"]').hasClass("fr-active") ? this.table.removeHeader() : this.table.addHeader()
  16465. },
  16466. refresh: function(e) {
  16467. var t = this.table.selectedTable();
  16468. 0 < t.length && (0 === t.find("th").length ? e.removeClass("fr-active").attr("aria-pressed", !1) : e.addClass("fr-active").attr("aria-pressed", !0))
  16469. }
  16470. }), $e.DefineIcon("tableRows", {
  16471. NAME: "bars",
  16472. SVG_KEY: "row"
  16473. }), $e.RegisterCommand("tableRows", {
  16474. type: "dropdown",
  16475. focus: !1,
  16476. title: "Row",
  16477. options: {
  16478. above: "Insert row above",
  16479. below: "Insert row below",
  16480. "delete": "Delete row"
  16481. },
  16482. html: function() {
  16483. var e = '<ul class="fr-dropdown-list" role="presentation">',
  16484. t = $e.COMMANDS.tableRows.options;
  16485. for (var n in t) t.hasOwnProperty(n) && (e += '<li role="presentation"><a class="fr-command" tabIndex="-1" role="option" data-cmd="tableRows" data-param1="' + n + '" title="' + this.language.translate(t[n]) + '">' + this.language.translate(t[n]) + "</a></li>");
  16486. return e += "</ul>"
  16487. },
  16488. callback: function(e, t) {
  16489. "above" == t || "below" == t ? this.table.insertRow(t) : this.table.deleteRow()
  16490. }
  16491. }), $e.DefineIcon("tableColumns", {
  16492. NAME: "bars fa-rotate-90",
  16493. SVG_KEY: "columns"
  16494. }), $e.RegisterCommand("tableColumns", {
  16495. type: "dropdown",
  16496. focus: !1,
  16497. title: "Column",
  16498. options: {
  16499. before: "Insert column before",
  16500. after: "Insert column after",
  16501. "delete": "Delete column"
  16502. },
  16503. html: function() {
  16504. var e = '<ul class="fr-dropdown-list" role="presentation">',
  16505. t = $e.COMMANDS.tableColumns.options;
  16506. for (var n in t) t.hasOwnProperty(n) && (e += '<li role="presentation"><a class="fr-command" tabIndex="-1" role="option" data-cmd="tableColumns" data-param1="' + n + '" title="' + this.language.translate(t[n]) + '">' + this.language.translate(t[n]) + "</a></li>");
  16507. return e += "</ul>"
  16508. },
  16509. callback: function(e, t) {
  16510. "before" == t || "after" == t ? this.table.insertColumn(t) : this.table.deleteColumn()
  16511. }
  16512. }), $e.DefineIcon("tableCells", {
  16513. NAME: "square-o",
  16514. FA5NAME: "square",
  16515. SVG_KEY: "cellOptions"
  16516. }), $e.RegisterCommand("tableCells", {
  16517. type: "dropdown",
  16518. focus: !1,
  16519. title: "Cell",
  16520. options: {
  16521. merge: "Merge cells",
  16522. "vertical-split": "Vertical split",
  16523. "horizontal-split": "Horizontal split"
  16524. },
  16525. html: function() {
  16526. var e = '<ul class="fr-dropdown-list" role="presentation">',
  16527. t = $e.COMMANDS.tableCells.options;
  16528. for (var n in t) t.hasOwnProperty(n) && (e += '<li role="presentation"><a class="fr-command" tabIndex="-1" role="option" data-cmd="tableCells" data-param1="' + n + '" title="' + this.language.translate(t[n]) + '">' + this.language.translate(t[n]) + "</a></li>");
  16529. return e += "</ul>"
  16530. },
  16531. callback: function(e, t) {
  16532. "merge" == t ? this.table.mergeCells() : "vertical-split" == t ? this.table.splitCellVertically() : this.table.splitCellHorizontally()
  16533. },
  16534. refreshOnShow: function(e, t) {
  16535. 1 < this.$el.find(".fr-selected-cell").length ? (t.find('a[data-param1="vertical-split"]').addClass("fr-disabled").attr("aria-disabled", !0), t.find('a[data-param1="horizontal-split"]').addClass("fr-disabled").attr("aria-disabled", !0), t.find('a[data-param1="merge"]').removeClass("fr-disabled").attr("aria-disabled", !1)) : (t.find('a[data-param1="merge"]').addClass("fr-disabled").attr("aria-disabled", !0), t.find('a[data-param1="vertical-split"]').removeClass("fr-disabled").attr("aria-disabled", !1), t.find('a[data-param1="horizontal-split"]').removeClass("fr-disabled").attr("aria-disabled", !1))
  16536. }
  16537. }), $e.DefineIcon("tableRemove", {
  16538. NAME: "trash",
  16539. SVG_KEY: "removeTable"
  16540. }), $e.RegisterCommand("tableRemove", {
  16541. title: "Remove Table",
  16542. focus: !1,
  16543. callback: function() {
  16544. this.table.remove()
  16545. }
  16546. }), $e.DefineIcon("tableStyle", {
  16547. NAME: "paint-brush",
  16548. SVG_KEY: "tableStyle"
  16549. }), $e.RegisterCommand("tableStyle", {
  16550. title: "Table Style",
  16551. type: "dropdown",
  16552. focus: !1,
  16553. html: function() {
  16554. var e = '<ul class="fr-dropdown-list" role="presentation">',
  16555. t = this.opts.tableStyles;
  16556. for (var n in t) t.hasOwnProperty(n) && (e += '<li role="presentation"><a class="fr-command" tabIndex="-1" role="option" data-cmd="tableStyle" data-param1="' + n + '" title="' + this.language.translate(t[n]) + '">' + this.language.translate(t[n]) + "</a></li>");
  16557. return e += "</ul>"
  16558. },
  16559. callback: function(e, t) {
  16560. this.table.applyStyle(t, this.$el.find(".fr-selected-cell").closest("table"), this.opts.tableMultipleStyles, this.opts.tableStyles)
  16561. },
  16562. refreshOnShow: function(e, t) {
  16563. var n = this.$,
  16564. r = this.$el.find(".fr-selected-cell").closest("table");
  16565. r && t.find(".fr-command").each(function() {
  16566. var e = n(this).data("param1"),
  16567. t = r.hasClass(e);
  16568. n(this).toggleClass("fr-active", t).attr("aria-selected", t)
  16569. })
  16570. }
  16571. }), $e.DefineIcon("tableCellBackground", {
  16572. NAME: "tint",
  16573. SVG_KEY: "cellBackground"
  16574. }), $e.RegisterCommand("tableCellBackground", {
  16575. title: "Cell Background",
  16576. focus: !1,
  16577. popup: !0,
  16578. callback: function() {
  16579. this.table.showColorsPopup()
  16580. }
  16581. }), $e.RegisterCommand("tableCellBackgroundColor", {
  16582. undo: !0,
  16583. focus: !1,
  16584. callback: function(e, t) {
  16585. this.table.setBackground(t)
  16586. }
  16587. }), $e.DefineIcon("tableBack", {
  16588. NAME: "arrow-left",
  16589. SVG_KEY: "back"
  16590. }), $e.RegisterCommand("tableBack", {
  16591. title: "Back",
  16592. undo: !1,
  16593. focus: !1,
  16594. back: !0,
  16595. callback: function() {
  16596. this.table.back()
  16597. },
  16598. refresh: function(e) {
  16599. 0 !== this.table.selectedCells().length || this.opts.toolbarInline ? (e.removeClass("fr-hidden"), e.next(".fr-separator").removeClass("fr-hidden")) : (e.addClass("fr-hidden"), e.next(".fr-separator").addClass("fr-hidden"))
  16600. }
  16601. }), $e.DefineIcon("tableCellVerticalAlign", {
  16602. NAME: "arrows-v",
  16603. FA5NAME: "arrows-alt-v",
  16604. SVG_KEY: "verticalAlignMiddle"
  16605. }), $e.RegisterCommand("tableCellVerticalAlign", {
  16606. type: "dropdown",
  16607. focus: !1,
  16608. title: "Vertical Align",
  16609. options: {
  16610. Top: "Align Top",
  16611. Middle: "Align Middle",
  16612. Bottom: "Align Bottom"
  16613. },
  16614. html: function() {
  16615. var e = '<ul class="fr-dropdown-list" role="presentation">',
  16616. t = $e.COMMANDS.tableCellVerticalAlign.options;
  16617. for (var n in t) t.hasOwnProperty(n) && (e += '<li role="presentation"><a class="fr-command" tabIndex="-1" role="option" data-cmd="tableCellVerticalAlign" data-param1="' + n.toLowerCase() + '" title="' + this.language.translate(t[n]) + '">' + this.language.translate(n) + "</a></li>");
  16618. return e += "</ul>"
  16619. },
  16620. callback: function(e, t) {
  16621. this.table.verticalAlign(t)
  16622. },
  16623. refreshOnShow: function(e, t) {
  16624. t.find('.fr-command[data-param1="' + this.$el.find(".fr-selected-cell").css("vertical-align") + '"]').addClass("fr-active").attr("aria-selected", !0)
  16625. }
  16626. }), $e.DefineIcon("tableCellHorizontalAlign", {
  16627. NAME: "align-left",
  16628. SVG_KEY: "alignLeft"
  16629. }), $e.DefineIcon("align-left", {
  16630. NAME: "align-left",
  16631. SVG_KEY: "alignLeft"
  16632. }), $e.DefineIcon("align-right", {
  16633. NAME: "align-right",
  16634. SVG_KEY: "alignRight"
  16635. }), $e.DefineIcon("align-center", {
  16636. NAME: "align-center",
  16637. SVG_KEY: "alignCenter"
  16638. }), $e.DefineIcon("align-justify", {
  16639. NAME: "align-justify",
  16640. SVG_KEY: "alignJustify"
  16641. }), $e.RegisterCommand("tableCellHorizontalAlign", {
  16642. type: "dropdown",
  16643. focus: !1,
  16644. title: "Horizontal Align",
  16645. options: {
  16646. left: "Align Left",
  16647. center: "Align Center",
  16648. right: "Align Right",
  16649. justify: "Align Justify"
  16650. },
  16651. html: function() {
  16652. var e = '<ul class="fr-dropdown-list" role="presentation">',
  16653. t = $e.COMMANDS.tableCellHorizontalAlign.options;
  16654. for (var n in t) t.hasOwnProperty(n) && (e += '<li role="presentation"><a class="fr-command fr-title" tabIndex="-1" role="option" data-cmd="tableCellHorizontalAlign" data-param1="' + n + '" title="' + this.language.translate(t[n]) + '">' + this.icon.create("align-" + n) + '<span class="fr-sr-only">' + this.language.translate(t[n]) + "</span></a></li>");
  16655. return e += "</ul>"
  16656. },
  16657. callback: function(e, t) {
  16658. this.table.horizontalAlign(t)
  16659. },
  16660. refresh: function(e) {
  16661. var t = this.table.selectedCells(),
  16662. n = this.$;
  16663. t.length && e.find("> *").first().replaceWith(this.icon.create("align-" + this.helpers.getAlignment(n(t[0]))))
  16664. },
  16665. refreshOnShow: function(e, t) {
  16666. t.find('.fr-command[data-param1="' + this.helpers.getAlignment(this.$el.find(".fr-selected-cell").first()) + '"]').addClass("fr-active").attr("aria-selected", !0)
  16667. }
  16668. }), $e.DefineIcon("tableCellStyle", {
  16669. NAME: "magic",
  16670. SVG_KEY: "cellStyle"
  16671. }), $e.RegisterCommand("tableCellStyle", {
  16672. title: "Cell Style",
  16673. type: "dropdown",
  16674. focus: !1,
  16675. html: function() {
  16676. var e = '<ul class="fr-dropdown-list" role="presentation">',
  16677. t = this.opts.tableCellStyles;
  16678. for (var n in t) t.hasOwnProperty(n) && (e += '<li role="presentation"><a class="fr-command" tabIndex="-1" role="option" data-cmd="tableCellStyle" data-param1="' + n + '" title="' + this.language.translate(t[n]) + '">' + this.language.translate(t[n]) + "</a></li>");
  16679. return e += "</ul>"
  16680. },
  16681. callback: function(e, t) {
  16682. this.table.applyStyle(t, this.$el.find(".fr-selected-cell"), this.opts.tableCellMultipleStyles, this.opts.tableCellStyles)
  16683. },
  16684. refreshOnShow: function(e, t) {
  16685. var n = this.$,
  16686. r = this.$el.find(".fr-selected-cell").first();
  16687. r && t.find(".fr-command").each(function() {
  16688. var e = n(this).data("param1"),
  16689. t = r.hasClass(e);
  16690. n(this).toggleClass("fr-active", t).attr("aria-selected", t)
  16691. })
  16692. }
  16693. }), $e.RegisterCommand("tableCellBackgroundCustomColor", {
  16694. title: "OK",
  16695. undo: !0,
  16696. callback: function() {
  16697. this.table.customColor()
  16698. }
  16699. }), $e.DefineIcon("tableColorRemove", {
  16700. NAME: "eraser",
  16701. SVG_KEY: "remove"
  16702. }), $e.URLRegEx = "(^| |\\u00A0)(" + $e.LinkRegEx + "|([a-z0-9+-_.]{1,}@[a-z0-9+-_.]{1,}\\.[a-z0-9+-_]{1,}))$", $e.PLUGINS.url = function(o) {
  16703. var i = o.$,
  16704. s = null;
  16705. function t(e, t, n) {
  16706. for (var r = ""; n.length && "." == n[n.length - 1];) r += ".", n = n.substring(0, n.length - 1);
  16707. var a = n;
  16708. if (o.opts.linkConvertEmailAddress) o.helpers.isEmail(a) && !/^mailto:.*/i.test(a) && (a = "mailto:" + a);
  16709. else if (o.helpers.isEmail(a)) return t + n;
  16710. return /^((http|https|ftp|ftps|mailto|tel|sms|notes|data)\:)/i.test(a) || (a = "//" + a), (t || "") + "<a" + (o.opts.linkAlwaysBlank ? ' target="_blank"' : "") + (s ? ' rel="' + s + '"' : "") + ' data-fr-linked="true" href="' + a + '">' + n.replace(/&amp;/g, "&").replace(/&/g, "&amp;").replace(/</g, "&lt;").replace(/>/g, "&gt;") + "</a>" + r
  16711. }
  16712. function l() {
  16713. return new RegExp($e.URLRegEx, "gi")
  16714. }
  16715. function c(e) {
  16716. return o.opts.linkAlwaysNoFollow && (s = "nofollow"), o.opts.linkAlwaysBlank && (o.opts.linkNoOpener && (s ? s += " noopener" : s = "noopener"), o.opts.linkNoReferrer && (s ? s += " noreferrer" : s = "noreferrer")), e.replace(l(), t)
  16717. }
  16718. function d(e) {
  16719. var t = e.split(" ");
  16720. return t[t.length - 1]
  16721. }
  16722. function n() {
  16723. var e = o.selection.ranges(0),
  16724. t = e.startContainer;
  16725. if (!t || t.nodeType !== Node.TEXT_NODE || e.startOffset !== (t.textContent || "").length) return !1;
  16726. if (function a(e) {
  16727. return !!e && ("A" === e.tagName || !(!e.parentNode || e.parentNode == o.el) && a(e.parentNode))
  16728. }(t)) return !1;
  16729. if (l().test(d(t.textContent))) {
  16730. i(t).before(c(t.textContent));
  16731. var n = i(t.parentNode).find("a[data-fr-linked]");
  16732. n.removeAttr("data-fr-linked"), t.parentNode.removeChild(t), o.events.trigger("url.linked", [n.get(0)])
  16733. } else if (t.textContent.split(" ").length <= 2 && t.previousSibling && "A" === t.previousSibling.tagName) {
  16734. var r = t.previousSibling.innerText + t.textContent;
  16735. l().test(d(r)) && (i(t.previousSibling).replaceWith(c(r)), t.parentNode.removeChild(t))
  16736. }
  16737. }
  16738. return {
  16739. _init: function e() {
  16740. o.events.on("keypress", function(e) {
  16741. !o.selection.isCollapsed() || "." != e.key && ")" != e.key && "(" != e.key || n()
  16742. }, !0), o.events.on("keydown", function(e) {
  16743. var t = e.which;
  16744. !o.selection.isCollapsed() || t != $e.KEYCODE.ENTER && t != $e.KEYCODE.SPACE || n()
  16745. }, !0), o.events.on("paste.beforeCleanup", function(e) {
  16746. if (o.helpers.isURL(e)) {
  16747. var t = null;
  16748. return o.opts.linkAlwaysBlank && (o.opts.linkNoOpener && (t ? t += " noopener" : t = "noopener"), o.opts.linkNoReferrer && (t ? t += " noreferrer" : t = "noreferrer")), "<a" + (o.opts.linkAlwaysBlank ? ' target="_blank"' : "") + (t ? ' rel="' + t + '"' : "") + ' href="' + e + '" >' + e + "</a>"
  16749. }
  16750. })
  16751. }
  16752. }
  16753. }, Object.assign($e.POPUP_TEMPLATES, {
  16754. "video.insert": "[_BUTTONS_][_BY_URL_LAYER_][_EMBED_LAYER_][_UPLOAD_LAYER_][_PROGRESS_BAR_]",
  16755. "video.edit": "[_BUTTONS_]",
  16756. "video.size": "[_BUTTONS_][_SIZE_LAYER_]"
  16757. }), Object.assign($e.DEFAULTS, {
  16758. videoAllowedTypes: ["mp4", "webm", "ogg"],
  16759. videoAllowedProviders: [".*"],
  16760. videoDefaultAlign: "center",
  16761. videoDefaultDisplay: "block",
  16762. videoDefaultWidth: 600,
  16763. videoEditButtons: ["videoReplace", "videoRemove", "videoDisplay", "videoAlign", "videoSize"],
  16764. videoInsertButtons: ["videoBack", "|", "videoByURL", "videoEmbed", "videoUpload"],
  16765. videoMaxSize: 52428800,
  16766. videoMove: !0,
  16767. videoResize: !0,
  16768. videoResponsive: !1,
  16769. videoSizeButtons: ["videoBack", "|"],
  16770. videoSplitHTML: !1,
  16771. videoTextNear: !0,
  16772. videoUpload: !0,
  16773. videoUploadMethod: "POST",
  16774. videoUploadParam: "file",
  16775. videoUploadParams: {},
  16776. videoUploadToS3: !1,
  16777. videoUploadURL: null
  16778. }), $e.VIDEO_PROVIDERS = [{
  16779. test_regex: /^.*((youtu.be)|(youtube.com))\/((v\/)|(\/u\/\w\/)|(embed\/)|(watch\?))?\??v?=?([^#\&\?]*).*/,
  16780. url_regex: /(?:https?:\/\/)?(?:www\.)?(?:m\.)?(?:youtube\.com|youtu\.be)\/(?:watch\?v=|embed\/)?([0-9a-zA-Z_\-]+)(.+)?/g,
  16781. url_text: "https://www.youtube.com/embed/$1?$2",
  16782. html: '<iframe width="640" height="360" src="{url}&wmode=opaque" frameborder="0" allowfullscreen></iframe>',
  16783. provider: "youtube"
  16784. }, {
  16785. test_regex: /^.*(?:vimeo.com)\/(?:channels(\/\w+\/)?|groups\/*\/videos\/\u200b\d+\/|video\/|)(\d+)(?:$|\/|\?)/,
  16786. url_regex: /(?:https?:\/\/)?(?:www\.|player\.)?vimeo.com\/(?:channels\/(?:\w+\/)?|groups\/(?:[^\/]*)\/videos\/|album\/(?:\d+)\/video\/|video\/|)(\d+)(?:[a-zA-Z0-9_\-]+)?(\/[a-zA-Z0-9_\-]+)?/i,
  16787. url_text: "https://player.vimeo.com/video/$1",
  16788. html: '<iframe width="640" height="360" src="{url}" frameborder="0" allowfullscreen></iframe>',
  16789. provider: "vimeo"
  16790. }, {
  16791. test_regex: /^.+(dailymotion.com|dai.ly)\/(video|hub)?\/?([^_]+)[^#]*(#video=([^_&]+))?/,
  16792. url_regex: /(?:https?:\/\/)?(?:www\.)?(?:dailymotion\.com|dai\.ly)\/(?:video|hub)?\/?(.+)/g,
  16793. url_text: "https://www.dailymotion.com/embed/video/$1",
  16794. html: '<iframe width="640" height="360" src="{url}" frameborder="0" allowfullscreen></iframe>',
  16795. provider: "dailymotion"
  16796. }, {
  16797. test_regex: /^.+(screen.yahoo.com)\/[^_&]+/,
  16798. url_regex: "",
  16799. url_text: "",
  16800. html: '<iframe width="640" height="360" src="{url}?format=embed" frameborder="0" allowfullscreen="true" mozallowfullscreen="true" webkitallowfullscreen="true" allowtransparency="true"></iframe>',
  16801. provider: "yahoo"
  16802. }, {
  16803. test_regex: /^.+(rutube.ru)\/[^_&]+/,
  16804. url_regex: /(?:https?:\/\/)?(?:www\.)?(?:rutube\.ru)\/(?:video)?\/?(.+)/g,
  16805. url_text: "https://rutube.ru/play/embed/$1",
  16806. html: '<iframe width="640" height="360" src="{url}" frameborder="0" allowfullscreen="true" mozallowfullscreen="true" webkitallowfullscreen="true" allowtransparency="true"></iframe>',
  16807. provider: "rutube"
  16808. }, {
  16809. test_regex: /^(?:.+)vidyard.com\/(?:watch)?\/?([^.&/]+)\/?(?:[^_.&]+)?/,
  16810. url_regex: /^(?:.+)vidyard.com\/(?:watch)?\/?([^.&/]+)\/?(?:[^_.&]+)?/g,
  16811. url_text: "https://play.vidyard.com/$1",
  16812. html: '<iframe width="640" height="360" src="{url}" frameborder="0" allowfullscreen></iframe>',
  16813. provider: "vidyard"
  16814. }], $e.VIDEO_EMBED_REGEX = /^\W*((<iframe(.|\n)*>(\s|\n)*<\/iframe>)|(<embed(.|\n)*>))\W*$/i, $e.PLUGINS.video = function(u) {
  16815. var s, d, f, p, r, n, h = u.$,
  16816. l = "https://i.froala.com/upload",
  16817. g = 2,
  16818. m = 3,
  16819. v = 4,
  16820. c = 5,
  16821. b = 6,
  16822. a = {};
  16823. function E() {
  16824. var e = u.popups.get("video.insert");
  16825. e.find(".fr-video-by-url-layer input").val("").trigger("change");
  16826. var t = e.find(".fr-video-embed-layer textarea");
  16827. t.val("").trigger("change"), (t = e.find(".fr-video-upload-layer input")).val("").trigger("change")
  16828. }
  16829. function o() {
  16830. var e = u.popups.get("video.edit");
  16831. if (e || (e = function a() {
  16832. var e = "";
  16833. if (0 < u.opts.videoEditButtons.length) {
  16834. u.opts.videoResponsive && (-1 < u.opts.videoEditButtons.indexOf("videoSize") && u.opts.videoEditButtons.splice(u.opts.videoEditButtons.indexOf("videoSize"), 1), -1 < u.opts.videoEditButtons.indexOf("videoDisplay") && u.opts.videoEditButtons.splice(u.opts.videoEditButtons.indexOf("videoDisplay"), 1), -1 < u.opts.videoEditButtons.indexOf("videoAlign") && u.opts.videoEditButtons.splice(u.opts.videoEditButtons.indexOf("videoAlign"), 1));
  16835. var t = {
  16836. buttons: e += '<div class="fr-buttons"> \n '.concat(u.button.buildList(u.opts.videoEditButtons), " \n </div>")
  16837. },
  16838. n = u.popups.create("video.edit", t);
  16839. return u.events.$on(u.$wp, "scroll.video-edit", function() {
  16840. p && u.popups.isVisible("video.edit") && (u.events.disableBlur(), w(p))
  16841. }), n
  16842. }
  16843. return !1
  16844. }()), e) {
  16845. u.popups.setContainer("video.edit", u.$sc), u.popups.refresh("video.edit");
  16846. var t = p.find("iframe, embed, video"),
  16847. n = t.offset().left + t.outerWidth() / 2,
  16848. r = t.offset().top + t.outerHeight();
  16849. u.popups.show("video.edit", n, r, t.outerHeight(), !0)
  16850. }
  16851. }
  16852. function i(e) {
  16853. if (e) return u.popups.onRefresh("video.insert", E), u.popups.onHide("video.insert", X), !0;
  16854. var t = "";
  16855. u.opts.videoUpload || -1 === u.opts.videoInsertButtons.indexOf("videoUpload") || u.opts.videoInsertButtons.splice(u.opts.videoInsertButtons.indexOf("videoUpload"), 1);
  16856. var n = u.button.buildList(u.opts.videoInsertButtons);
  16857. "" !== n && (t = '<div class="fr-buttons">' + n + "</div>");
  16858. var r, a = "",
  16859. o = u.opts.videoInsertButtons.indexOf("videoUpload"),
  16860. i = u.opts.videoInsertButtons.indexOf("videoByURL"),
  16861. s = u.opts.videoInsertButtons.indexOf("videoEmbed");
  16862. 0 <= i && (r = " fr-active", (o < i && 0 <= o || s < i && 0 <= s) && (r = ""), a = '<div class="fr-video-by-url-layer fr-layer' + r + '" id="fr-video-by-url-layer-' + u.id + '"><div class="fr-input-line"><input id="fr-video-by-url-layer-text-' + u.id + '" type="text" placeholder="' + u.language.translate("Paste in a video URL") + '" tabIndex="1" aria-required="true"></div><div class="fr-action-buttons"><button type="button" class="fr-command fr-submit" data-cmd="videoInsertByURL" tabIndex="2" role="button">' + u.language.translate("Insert") + "</button></div></div>");
  16863. var l = "";
  16864. 0 <= s && (r = " fr-active", (o < s && 0 <= o || i < s && 0 <= i) && (r = ""), l = '<div class="fr-video-embed-layer fr-layer' + r + '" id="fr-video-embed-layer-' + u.id + '"><div class="fr-input-line"><textarea id="fr-video-embed-layer-text' + u.id + '" type="text" placeholder="' + u.language.translate("Embedded Code") + '" tabIndex="1" aria-required="true" rows="5"></textarea></div><div class="fr-action-buttons"><button type="button" class="fr-command fr-submit" data-cmd="videoInsertEmbed" tabIndex="2" role="button">' + u.language.translate("Insert") + "</button></div></div>");
  16865. var c = "";
  16866. 0 <= o && (r = " fr-active", (s < o && 0 <= s || i < o && 0 <= i) && (r = ""), c = '<div class="fr-video-upload-layer fr-layer' + r + '" id="fr-video-upload-layer-' + u.id + '"><strong>' + u.language.translate("Drop video") + "</strong><br>(" + u.language.translate("or click") + ')<div class="fr-form"><input type="file" accept="video/' + u.opts.videoAllowedTypes.join(", video/").toLowerCase() + '" tabIndex="-1" aria-labelledby="fr-video-upload-layer-' + u.id + '" role="button"></div></div>');
  16867. var d = {
  16868. buttons: t,
  16869. by_url_layer: a,
  16870. embed_layer: l,
  16871. upload_layer: c,
  16872. progress_bar: '<div class="fr-video-progress-bar-layer fr-layer"><h3 tabIndex="-1" class="fr-message">Uploading</h3><div class="fr-loader"><span class="fr-progress"></span></div><div class="fr-action-buttons"><button type="button" class="fr-command fr-dismiss" data-cmd="videoDismissError" tabIndex="2" role="button">OK</button></div></div>'
  16873. },
  16874. f = u.popups.create("video.insert", d);
  16875. return function p(r) {
  16876. u.events.$on(r, "dragover dragenter", ".fr-video-upload-layer", function() {
  16877. return h(this).addClass("fr-drop"), !1
  16878. }, !0), u.events.$on(r, "dragleave dragend", ".fr-video-upload-layer", function() {
  16879. return h(this).removeClass("fr-drop"), !1
  16880. }, !0), u.events.$on(r, "drop", ".fr-video-upload-layer", function(e) {
  16881. e.preventDefault(), e.stopPropagation(), h(this).removeClass("fr-drop");
  16882. var t = e.originalEvent.dataTransfer;
  16883. if (t && t.files) {
  16884. var n = r.data("instance") || u;
  16885. n.events.disableBlur(), n.video.upload(t.files), n.events.enableBlur()
  16886. }
  16887. }, !0), u.helpers.isIOS() && u.events.$on(r, "touchstart", '.fr-video-upload-layer input[type="file"]', function() {
  16888. h(this).trigger("click")
  16889. }, !0);
  16890. u.events.$on(r, "change", '.fr-video-upload-layer input[type="file"]', function() {
  16891. if (this.files) {
  16892. var e = r.data("instance") || u;
  16893. e.events.disableBlur(), r.find("input:focus").blur(), e.events.enableBlur(), e.video.upload(this.files)
  16894. }
  16895. h(this).val("")
  16896. }, !0)
  16897. }(f), f
  16898. }
  16899. function T(e) {
  16900. u.events.focus(!0), u.selection.restore();
  16901. var t = !1;
  16902. p && (q(), t = !0), u.html.insert('<span contenteditable="false" draggable="true" class="fr-jiv fr-video fr-deletable">' + e + "</span>", !1, u.opts.videoSplitHTML), u.popups.hide("video.insert");
  16903. var n = u.$el.find(".fr-jiv");
  16904. n.removeClass("fr-jiv"), n.toggleClass("fr-rv", u.opts.videoResponsive), Z(n, u.opts.videoDefaultDisplay, u.opts.videoDefaultAlign), n.toggleClass("fr-draggable", u.opts.videoMove), u.events.trigger(t ? "video.replaced" : "video.inserted", [n])
  16905. }
  16906. function A() {
  16907. var e = h(this);
  16908. u.popups.hide("video.insert"), e.removeClass("fr-uploading"), e.parent().next().is("br") && e.parent().next().remove(), w(e.parent()), u.events.trigger("video.loaded", [e.parent()])
  16909. }
  16910. function C(s, e, c, d, f) {
  16911. u.edit.off(), R("Loading video"), e && (s = u.helpers.sanitizeURL(s));
  16912. var p = function p() {
  16913. var e, t;
  16914. if (d) {
  16915. u.undo.canDo() || d.find("video").hasClass("fr-uploading") || u.undo.saveStep();
  16916. var n = d.find("video").data("fr-old-src"),
  16917. r = d.data("fr-replaced");
  16918. d.data("fr-replaced", !1), u.$wp ? ((e = d.clone(!0)).find("video").removeData("fr-old-src").removeClass("fr-uploading"), e.find("video").off("canplay"), n && d.find("video").attr("src", n), d.replaceWith(e)) : e = d;
  16919. for (var a = e.find("video").get(0).attributes, o = 0; o < a.length; o++) {
  16920. var i = a[o];
  16921. 0 === i.nodeName.indexOf("data-") && e.find("video").removeAttr(i.nodeName)
  16922. }
  16923. if (void 0 !== c)
  16924. for (t in c) c.hasOwnProperty(t) && "link" != t && e.find("video").attr("data-" + t, c[t]);
  16925. e.find("video").on("canplay", A), e.find("video").attr("src", s), u.edit.on(), F(), u.undo.saveStep(), u.$el.blur(), u.events.trigger(r ? "video.replaced" : "video.inserted", [e, f])
  16926. } else e = function l(e, t, n) {
  16927. var r, a = "";
  16928. if (t && void 0 !== t)
  16929. for (r in t) t.hasOwnProperty(r) && "link" != r && (a += " data-" + r + '="' + t[r] + '"');
  16930. var o = u.opts.videoDefaultWidth;
  16931. o && "auto" != o && (o += "px");
  16932. var i = h(document.createElement("span")).attr("contenteditable", "false").attr("draggable", "true").attr("class", "fr-video fr-dv" + u.opts.videoDefaultDisplay[0] + ("center" != u.opts.videoDefaultAlign ? " fr-fv" + u.opts.videoDefaultAlign[0] : "")).html('<video src="' + e + '" ' + a + (o ? ' style="width: ' + o + ';" ' : "") + " controls>" + u.language.translate("Your browser does not support HTML5 video.") + "</video>");
  16933. i.toggleClass("fr-draggable", u.opts.videoMove), u.edit.on(), u.events.focus(!0), u.selection.restore(), u.undo.saveStep(), u.opts.videoSplitHTML ? u.markers.split() : u.markers.insert();
  16934. u.html.wrap();
  16935. var s = u.$el.find(".fr-marker");
  16936. u.node.isLastSibling(s) && s.parent().hasClass("fr-deletable") && s.insertAfter(s.parent());
  16937. s.replaceWith(i), u.selection.clear(), i.find("video").get(0).readyState > i.find("video").get(0).HAVE_FUTURE_DATA || u.helpers.isIOS() ? n.call(i.find("video").get(0)) : i.find("video").on("canplaythrough load", n);
  16938. return i
  16939. }(s, c, A), F(), u.undo.saveStep(), u.events.trigger("video.inserted", [e, f])
  16940. };
  16941. S("Loading video"), p()
  16942. }
  16943. function S(e) {
  16944. var t = u.popups.get("video.insert");
  16945. if (t || (t = i()), t.find(".fr-layer.fr-active").removeClass("fr-active").addClass("fr-pactive"), t.find(".fr-video-progress-bar-layer").addClass("fr-active"), t.find(".fr-buttons").hide(), p) {
  16946. var n = p.find("video");
  16947. u.popups.setContainer("video.insert", u.$sc);
  16948. var r = n.offset().left,
  16949. a = n.offset().top + n.height();
  16950. u.popups.show("video.insert", r, a, n.outerHeight())
  16951. }
  16952. void 0 === e && R(u.language.translate("Uploading"), 0)
  16953. }
  16954. function y(e) {
  16955. var t = u.popups.get("video.insert");
  16956. if (t && (t.find(".fr-layer.fr-pactive").addClass("fr-active").removeClass("fr-pactive"), t.find(".fr-video-progress-bar-layer").removeClass("fr-active"), t.find(".fr-buttons").show(), e || u.$el.find("video.fr-error").length)) {
  16957. if (u.events.focus(), u.$el.find("video.fr-error").length && (u.$el.find("video.fr-error").parent().remove(), u.undo.saveStep(), u.undo.run(), u.undo.dropRedo()), !u.$wp && p) {
  16958. var n = p;
  16959. P(!0), u.selection.setAfter(n.find("video").get(0)), u.selection.restore()
  16960. }
  16961. u.popups.hide("video.insert")
  16962. }
  16963. }
  16964. function R(e, t) {
  16965. var n = u.popups.get("video.insert");
  16966. if (n) {
  16967. var r = n.find(".fr-video-progress-bar-layer");
  16968. r.find("h3").text(e + (t ? " " + t + "%" : "")), r.removeClass("fr-error"), t ? (r.find("div").removeClass("fr-indeterminate"), r.find("div > span").css("width", t + "%")) : r.find("div").addClass("fr-indeterminate")
  16969. }
  16970. }
  16971. function L(e) {
  16972. S();
  16973. var t = u.popups.get("video.insert").find(".fr-video-progress-bar-layer");
  16974. t.addClass("fr-error");
  16975. var n = t.find("h3");
  16976. n.text(e), u.events.disableBlur(), n.focus()
  16977. }
  16978. function w(e) {
  16979. t.call(e.get(0))
  16980. }
  16981. function _(e) {
  16982. R("Loading video");
  16983. var t = this.status,
  16984. n = this.response,
  16985. r = this.responseXML,
  16986. a = this.responseText;
  16987. try {
  16988. if (u.opts.videoUploadToS3)
  16989. if (201 == t) {
  16990. var o = function s(e) {
  16991. try {
  16992. var t = h(e).find("Location").text(),
  16993. n = h(e).find("Key").text();
  16994. return !1 === u.events.trigger("video.uploadedToS3", [t, n, e], !0) ? (u.edit.on(), !1) : t
  16995. } catch (r) {
  16996. return V(v, e), !1
  16997. }
  16998. }(r);
  16999. o && C(o, !1, [], e, n || r)
  17000. } else V(v, n || r);
  17001. else if (200 <= t && t < 300) {
  17002. var i = function l(e) {
  17003. try {
  17004. if (!1 === u.events.trigger("video.uploaded", [e], !0)) return u.edit.on(), !1;
  17005. var t = JSON.parse(e);
  17006. return t.link ? t : (V(g, e), !1)
  17007. } catch (n) {
  17008. return V(v, e), !1
  17009. }
  17010. }(a);
  17011. i && C(i.link, !1, i, e, n || a)
  17012. } else V(m, n || a)
  17013. } catch (c) {
  17014. V(v, n || a)
  17015. }
  17016. }
  17017. function O() {
  17018. V(v, this.response || this.responseText || this.responseXML)
  17019. }
  17020. function N(e) {
  17021. if (e.lengthComputable) {
  17022. var t = e.loaded / e.total * 100 | 0;
  17023. R(u.language.translate("Uploading"), t)
  17024. }
  17025. }
  17026. function x() {
  17027. u.edit.on(), y(!0)
  17028. }
  17029. function I(e) {
  17030. if (!u.core.sameInstance(f)) return !0;
  17031. e.preventDefault(), e.stopPropagation();
  17032. var t = e.pageX || (e.originalEvent.touches ? e.originalEvent.touches[0].pageX : null),
  17033. n = e.pageY || (e.originalEvent.touches ? e.originalEvent.touches[0].pageY : null);
  17034. if (!t || !n) return !1;
  17035. if ("mousedown" == e.type) {
  17036. var r = u.$oel.get(0).ownerDocument,
  17037. a = r.defaultView || r.parentWindow,
  17038. o = !1;
  17039. try {
  17040. o = a.location != a.parent.location && !(a.$ && a.$.FE)
  17041. } catch (i) {}
  17042. o && a.frameElement && (t += u.helpers.getPX(h(a.frameElement).offset().left) + a.frameElement.clientLeft, n = e.clientY + u.helpers.getPX(h(a.frameElement).offset().top) + a.frameElement.clientTop)
  17043. }
  17044. u.undo.canDo() || u.undo.saveStep(), (d = h(this)).data("start-x", t), d.data("start-y", n), s.show(), u.popups.hideAll(), K()
  17045. }
  17046. function k(e) {
  17047. if (!u.core.sameInstance(f)) return !0;
  17048. if (d) {
  17049. e.preventDefault();
  17050. var t = e.pageX || (e.originalEvent.touches ? e.originalEvent.touches[0].pageX : null),
  17051. n = e.pageY || (e.originalEvent.touches ? e.originalEvent.touches[0].pageY : null);
  17052. if (!t || !n) return !1;
  17053. var r = d.data("start-x"),
  17054. a = d.data("start-y");
  17055. d.data("start-x", t), d.data("start-y", n);
  17056. var o = t - r,
  17057. i = n - a,
  17058. s = p.find("iframe, embed, video"),
  17059. l = s.width(),
  17060. c = s.height();
  17061. (d.hasClass("fr-hnw") || d.hasClass("fr-hsw")) && (o = 0 - o), (d.hasClass("fr-hnw") || d.hasClass("fr-hne")) && (i = 0 - i), s.css("width", l + o), s.css("height", c + i), s.removeAttr("width"), s.removeAttr("height"), $()
  17062. }
  17063. }
  17064. function M(e) {
  17065. if (!u.core.sameInstance(f)) return !0;
  17066. d && p && (e && e.stopPropagation(), d = null, s.hide(), $(), o(), u.undo.saveStep())
  17067. }
  17068. function D(e) {
  17069. return '<div class="fr-handler fr-h' + e + '"></div>'
  17070. }
  17071. function B(e, t, n, r) {
  17072. return e.pageX = t, e.pageY = t, I.call(this, e), e.pageX = e.pageX + n * Math.floor(Math.pow(1.1, r)), e.pageY = e.pageY + n * Math.floor(Math.pow(1.1, r)), k.call(this, e), M.call(this, e), ++r
  17073. }
  17074. function F() {
  17075. var e, t = Array.prototype.slice.call(u.el.querySelectorAll("video, .fr-video > *")),
  17076. n = [];
  17077. for (e = 0; e < t.length; e++) n.push(t[e].getAttribute("src")), h(t[e]).toggleClass("fr-draggable", u.opts.videoMove), "" === t[e].getAttribute("class") && t[e].removeAttribute("class"), "" === t[e].getAttribute("style") && t[e].removeAttribute("style");
  17078. if (r)
  17079. for (e = 0; e < r.length; e++) n.indexOf(r[e].getAttribute("src")) < 0 && u.events.trigger("video.removed", [h(r[e])]);
  17080. r = t
  17081. }
  17082. function $() {
  17083. f || function i() {
  17084. var e;
  17085. if (u.shared.$video_resizer ? (f = u.shared.$video_resizer, s = u.shared.$vid_overlay, u.events.on("destroy", function() {
  17086. h("body").first().append(f.removeClass("fr-active"))
  17087. }, !0)) : (u.shared.$video_resizer = h(document.createElement("div")).attr("class", "fr-video-resizer"), f = u.shared.$video_resizer, u.events.$on(f, "mousedown", function(e) {
  17088. e.stopPropagation()
  17089. }, !0), u.opts.videoResize && (f.append(D("nw") + D("ne") + D("sw") + D("se")), u.shared.$vid_overlay = h(document.createElement("div")).attr("class", "fr-video-overlay"), s = u.shared.$vid_overlay, e = f.get(0).ownerDocument, h(e).find("body").first().append(s))), u.events.on("shared.destroy", function() {
  17090. f.html("").removeData().remove(), f = null, u.opts.videoResize && (s.remove(), s = null)
  17091. }, !0), u.helpers.isMobile() || u.events.$on(h(u.o_win), "resize.video", function() {
  17092. P(!0)
  17093. }), u.opts.videoResize) {
  17094. e = f.get(0).ownerDocument, u.events.$on(f, u._mousedown, ".fr-handler", I), u.events.$on(h(e), u._mousemove, k), u.events.$on(h(e.defaultView || e.parentWindow), u._mouseup, M), u.events.$on(s, "mouseleave", M);
  17095. var r = 1,
  17096. a = null,
  17097. o = 0;
  17098. u.events.on("keydown", function(e) {
  17099. if (p) {
  17100. var t = -1 != navigator.userAgent.indexOf("Mac OS X") ? e.metaKey : e.ctrlKey,
  17101. n = e.which;
  17102. (n !== a || 200 < e.timeStamp - o) && (r = 1), (n == $e.KEYCODE.EQUALS || u.browser.mozilla && n == $e.KEYCODE.FF_EQUALS) && t && !e.altKey ? r = B.call(this, e, 1, 1, r) : (n == $e.KEYCODE.HYPHEN || u.browser.mozilla && n == $e.KEYCODE.FF_HYPHEN) && t && !e.altKey && (r = B.call(this, e, 2, -1, r)), a = n, o = e.timeStamp
  17103. }
  17104. }), u.events.on("keyup", function() {
  17105. r = 1
  17106. })
  17107. }
  17108. }(), (u.$wp || u.$sc).append(f), f.data("instance", u);
  17109. var e = p.find("iframe, embed, video"),
  17110. t = 0,
  17111. n = 0;
  17112. u.opts.iframe && (n = u.helpers.getPX(u.$wp.find(".fr-iframe").css("padding-top")), t = u.helpers.getPX(u.$wp.find(".fr-iframe").css("padding-left"))), f.css("top", (u.opts.iframe ? e.offset().top + n - 1 : e.offset().top - u.$wp.offset().top - 1) + u.$wp.scrollTop()).css("left", (u.opts.iframe ? e.offset().left + t - 1 : e.offset().left - u.$wp.offset().left - 1) + u.$wp.scrollLeft()).css("width", e.get(0).getBoundingClientRect().width).css("height", e.get(0).getBoundingClientRect().height).addClass("fr-active")
  17113. }
  17114. function t(e) {
  17115. if (e && "touchend" == e.type && n) return !0;
  17116. if (e && u.edit.isDisabled()) return e.stopPropagation(), e.preventDefault(), !1;
  17117. if (u.edit.isDisabled()) return !1;
  17118. for (var t = 0; t < $e.INSTANCES.length; t++) $e.INSTANCES[t] != u && $e.INSTANCES[t].events.trigger("video.hideResizer");
  17119. u.toolbar.disable(), u.helpers.isMobile() && (u.events.disableBlur(), u.$el.blur(), u.events.enableBlur()), u.$el.find(".fr-video.fr-active").removeClass("fr-active"), (p = h(this)).addClass("fr-active"), u.opts.iframe && u.size.syncIframe(), J(), $(), o(), u.selection.clear(), u.button.bulkRefresh(), u.events.trigger("image.hideResizer")
  17120. }
  17121. function P(e) {
  17122. p && (function t() {
  17123. return u.shared.vid_exit_flag
  17124. }() || !0 === e) && (f.removeClass("fr-active"), u.toolbar.enable(), p.removeClass("fr-active"), p = null, K())
  17125. }
  17126. function H() {
  17127. u.shared.vid_exit_flag = !0
  17128. }
  17129. function K() {
  17130. u.shared.vid_exit_flag = !1
  17131. }
  17132. function U(e) {
  17133. var t = e.originalEvent.dataTransfer;
  17134. if (t && t.files && t.files.length) {
  17135. var n = t.files[0];
  17136. if (n && n.type && -1 !== n.type.indexOf("video")) {
  17137. if (!u.opts.videoUpload) return e.preventDefault(), e.stopPropagation(), !1;
  17138. u.markers.remove(), u.markers.insertAtPoint(e.originalEvent), u.$el.find(".fr-marker").replaceWith($e.MARKERS), u.popups.hideAll();
  17139. var r = u.popups.get("video.insert");
  17140. return r || (r = i()), u.popups.setContainer("video.insert", u.$sc), u.popups.show("video.insert", e.originalEvent.pageX, e.originalEvent.pageY), S(), 0 <= u.opts.videoAllowedTypes.indexOf(n.type.replace(/video\//g, "")) ? W(t.files) : V(b), e.preventDefault(), e.stopPropagation(), !1
  17141. }
  17142. }
  17143. }
  17144. function W(e) {
  17145. if (void 0 !== e && 0 < e.length) {
  17146. if (!1 === u.events.trigger("video.beforeUpload", [e])) return !1;
  17147. var t, n = e[0];
  17148. if ((null === u.opts.videoUploadURL || u.opts.videoUploadURL == l) && !u.opts.videoUploadToS3) return function s(r) {
  17149. p && p.find("iframe") && p.find("iframe").length && q();
  17150. var a = new FileReader;
  17151. a.onload = function() {
  17152. a.result;
  17153. for (var e = atob(a.result.split(",")[1]), t = [], n = 0; n < e.length; n++) t.push(e.charCodeAt(n));
  17154. C(window.URL.createObjectURL(new Blob([new Uint8Array(t)], {
  17155. type: r.type
  17156. })), !1, null, p)
  17157. }, S(), a.readAsDataURL(r)
  17158. }(n), !1;
  17159. if (n.size > u.opts.videoMaxSize) return V(c), !1;
  17160. if (u.opts.videoAllowedTypes.indexOf(n.type.replace(/video\//g, "")) < 0) return V(b), !1;
  17161. if (u.drag_support.formdata && (t = u.drag_support.formdata ? new FormData : null), t) {
  17162. var r;
  17163. if (!1 !== u.opts.videoUploadToS3)
  17164. for (r in t.append("key", u.opts.videoUploadToS3.keyStart + (new Date).getTime() + "-" + (n.name || "untitled")), t.append("success_action_status", "201"), t.append("X-Requested-With", "xhr"), t.append("Content-Type", n.type), u.opts.videoUploadToS3.params) u.opts.videoUploadToS3.params.hasOwnProperty(r) && t.append(r, u.opts.videoUploadToS3.params[r]);
  17165. for (r in u.opts.videoUploadParams) u.opts.videoUploadParams.hasOwnProperty(r) && t.append(r, u.opts.videoUploadParams[r]);
  17166. t.append(u.opts.videoUploadParam, n);
  17167. var a = u.opts.videoUploadURL;
  17168. u.opts.videoUploadToS3 && (a = u.opts.videoUploadToS3.uploadURL ? u.opts.videoUploadToS3.uploadURL : "https://" + u.opts.videoUploadToS3.region + ".amazonaws.com/" + u.opts.videoUploadToS3.bucket);
  17169. var o = u.core.getXHR(a, u.opts.videoUploadMethod);
  17170. o.onload = function() {
  17171. _.call(o, p)
  17172. }, o.onerror = O, o.upload.onprogress = N, o.onabort = x, S(), u.events.disableBlur(), u.edit.off(), u.events.enableBlur();
  17173. var i = u.popups.get("video.insert");
  17174. i && h(i.off("abortUpload")).on("abortUpload", function() {
  17175. 4 != o.readyState && o.abort()
  17176. }), o.send(t)
  17177. }
  17178. }
  17179. }
  17180. function V(e, t) {
  17181. u.edit.on(), p && p.find("video").addClass("fr-error"), L(u.language.translate("Something went wrong. Please try again.")), u.events.trigger("video.error", [{
  17182. code: e,
  17183. message: a[e]
  17184. },
  17185. t
  17186. ])
  17187. }
  17188. function z() {
  17189. if (p) {
  17190. var e = u.popups.get("video.size"),
  17191. t = p.find("iframe, embed, video");
  17192. e.find('input[name="width"]').val(t.get(0).style.width || t.attr("width")).trigger("change"), e.find('input[name="height"]').val(t.get(0).style.height || t.attr("height")).trigger("change")
  17193. }
  17194. }
  17195. function G(e) {
  17196. if (e) return u.popups.onRefresh("video.size", z), !0;
  17197. var t = {
  17198. buttons: '<div class="fr-buttons fr-tabs">' + u.button.buildList(u.opts.videoSizeButtons) + "</div>",
  17199. size_layer: '<div class="fr-video-size-layer fr-layer fr-active" id="fr-video-size-layer-' + u.id + '"><div class="fr-video-group"><div class="fr-input-line"><input id="fr-video-size-layer-width-' + u.id + '" type="text" name="width" placeholder="' + u.language.translate("Width") + '" tabIndex="1"></div><div class="fr-input-line"><input id="fr-video-size-layer-height-' + u.id + '" type="text" name="height" placeholder="' + u.language.translate("Height") + '" tabIndex="1"></div></div><div class="fr-action-buttons"><button type="button" class="fr-command fr-submit" data-cmd="videoSetSize" tabIndex="2" role="button">' + u.language.translate("Update") + "</button></div></div>"
  17200. },
  17201. n = u.popups.create("video.size", t);
  17202. return u.events.$on(u.$wp, "scroll", function() {
  17203. p && u.popups.isVisible("video.size") && (u.events.disableBlur(), w(p))
  17204. }), n
  17205. }
  17206. function Y(e) {
  17207. if (void 0 === e && (e = p), e) {
  17208. if (e.hasClass("fr-fvl")) return "left";
  17209. if (e.hasClass("fr-fvr")) return "right";
  17210. if (e.hasClass("fr-dvb") || e.hasClass("fr-dvi")) return "center";
  17211. if ("block" == e.css("display")) {
  17212. if ("left" == e.css("text-algin")) return "left";
  17213. if ("right" == e.css("text-align")) return "right"
  17214. } else {
  17215. if ("left" == e.css("float")) return "left";
  17216. if ("right" == e.css("float")) return "right"
  17217. }
  17218. }
  17219. return "center"
  17220. }
  17221. function j(e) {
  17222. void 0 === e && (e = p);
  17223. var t = e.css("float");
  17224. return e.css("float", "none"), "block" == e.css("display") ? (e.css("float", ""), e.css("float") != t && e.css("float", t), "block") : (e.css("float", ""), e.css("float") != t && e.css("float", t), "inline")
  17225. }
  17226. function q() {
  17227. if (p && !1 !== u.events.trigger("video.beforeRemove", [p])) {
  17228. var e = p;
  17229. u.popups.hideAll(), P(!0), u.selection.setBefore(e.get(0)) || u.selection.setAfter(e.get(0)), e.remove(), u.selection.restore(), u.html.fillEmptyBlocks()
  17230. }
  17231. }
  17232. function X() {
  17233. y()
  17234. }
  17235. function Z(e, t, n) {
  17236. !u.opts.htmlUntouched && u.opts.useClasses ? (e.removeClass("fr-fvl fr-fvr fr-dvb fr-dvi"), e.addClass("fr-fv" + n[0] + " fr-dv" + t[0])) : "inline" == t ? (e.css({
  17237. display: "inline-block"
  17238. }), "center" == n ? e.css({
  17239. "float": "none"
  17240. }) : "left" == n ? e.css({
  17241. "float": "left"
  17242. }) : e.css({
  17243. "float": "right"
  17244. })) : (e.css({
  17245. display: "block",
  17246. clear: "both"
  17247. }), "left" == n ? e.css({
  17248. textAlign: "left"
  17249. }) : "right" == n ? e.css({
  17250. textAlign: "right"
  17251. }) : e.css({
  17252. textAlign: "center"
  17253. }))
  17254. }
  17255. function Q() {
  17256. var e = u.$el.find("video").filter(function() {
  17257. return 0 === h(this).parents("span.fr-video").length
  17258. });
  17259. if (0 != e.length) {
  17260. e.wrap(h(document.createElement("span")).attr("class", "fr-video fr-deletable").attr("contenteditable", "false")), u.$el.find("embed, iframe").filter(function() {
  17261. if (u.browser.safari && this.getAttribute("src") && this.setAttribute("src", this.src), 0 < h(this).parents("span.fr-video").length) return !1;
  17262. for (var e = h(this).attr("src"), t = 0; t < $e.VIDEO_PROVIDERS.length; t++) {
  17263. var n = $e.VIDEO_PROVIDERS[t];
  17264. if (n.test_regex.test(e) && new RegExp(u.opts.videoAllowedProviders.join("|")).test(n.provider)) return !0
  17265. }
  17266. return !1
  17267. }).map(function() {
  17268. return 0 === h(this).parents("object").length ? this : h(this).parents("object").get(0)
  17269. }).wrap(h(document.createElement("span")).attr("class", "fr-video").attr("contenteditable", "false"));
  17270. for (var t, n, r, a, o = u.$el.find("span.fr-video, video"), i = 0; i < o.length; i++) {
  17271. var s = h(o[i]);
  17272. !u.opts.htmlUntouched && u.opts.useClasses ? ((a = s).hasClass("fr-dvi") || a.hasClass("fr-dvb") || (a.addClass("fr-fv" + Y(a)[0]), a.addClass("fr-dv" + j(a)[0])), u.opts.videoTextNear || s.removeClass("fr-dvi").addClass("fr-dvb")) : u.opts.htmlUntouched || u.opts.useClasses || (void 0, n = (t = s).hasClass("fr-dvb") ? "block" : t.hasClass("fr-dvi") ? "inline" : null, r = t.hasClass("fr-fvl") ? "left" : t.hasClass("fr-fvr") ? "right" : Y(t), Z(t, n, r), t.removeClass("fr-dvb fr-dvi fr-fvr fr-fvl"))
  17273. }
  17274. o.toggleClass("fr-draggable", u.opts.videoMove)
  17275. }
  17276. }
  17277. function J() {
  17278. if (p) {
  17279. u.selection.clear();
  17280. var e = u.doc.createRange();
  17281. e.selectNode(p.get(0)), u.selection.get().addRange(e)
  17282. }
  17283. }
  17284. return a[1] = "Video cannot be loaded from the passed link.", a[g] = "No link in upload response.", a[m] = "Error during file upload.", a[v] = "Parsing response failed.", a[c] = "File is too large.", a[b] = "Video file type is invalid.", a[7] = "Files can be uploaded only to same domain in IE 8 and IE 9.", u.shared.vid_exit_flag = !1, {
  17285. _init: function ee() {
  17286. u.opts.videoResponsive && (u.opts.videoResize = !1),
  17287. function e() {
  17288. u.events.on("drop", U, !0), u.events.on("mousedown window.mousedown", H), u.events.on("window.touchmove", K), u.events.on("mouseup window.mouseup", P), u.events.on("commands.mousedown", function(e) {
  17289. 0 < e.parents(".fr-toolbar").length && P()
  17290. }), u.events.on("video.hideResizer commands.undo commands.redo element.dropped", function() {
  17291. P(!0)
  17292. })
  17293. }(), u.helpers.isMobile() && (u.events.$on(u.$el, "touchstart", "span.fr-video", function() {
  17294. n = !1
  17295. }), u.events.$on(u.$el, "touchmove", function() {
  17296. n = !0
  17297. })), u.events.on("html.set", Q), Q(), u.events.$on(u.$el, "mousedown", "span.fr-video", function(e) {
  17298. e.stopPropagation(), (u.browser.msie || u.browser.edge) && (e.target.dragDrop(), t.call(this, e))
  17299. }), u.events.$on(u.$el, "click touchend", "span.fr-video", function(e) {
  17300. if ("false" == h(this).parents("[contenteditable]").not(".fr-element").not(".fr-img-caption").not("body").first().attr("contenteditable")) return !0;
  17301. t.call(this, e)
  17302. }), u.events.on("keydown", function(e) {
  17303. var t = e.which;
  17304. return !p || t != $e.KEYCODE.BACKSPACE && t != $e.KEYCODE.DELETE ? p && t == $e.KEYCODE.ESC ? (P(!0), e.preventDefault(), !1) : p && t != $e.KEYCODE.F10 && !u.keys.isBrowserAction(e) ? (e.preventDefault(), !1) : void 0 : (e.preventDefault(), q(), u.undo.saveStep(), !1)
  17305. }, !0), u.events.on("toolbar.esc", function() {
  17306. if (p) return u.events.disableBlur(), u.events.focus(), !1
  17307. }, !0), u.events.on("toolbar.focusEditor", function() {
  17308. if (p) return !1
  17309. }, !0), u.events.on("keydown", function() {
  17310. u.$el.find("span.fr-video:empty").remove()
  17311. }), u.$wp && (F(), u.events.on("contentChanged", F)), i(!0), G(!0)
  17312. },
  17313. showInsertPopup: function te() {
  17314. var e = u.$tb.find('.fr-command[data-cmd="insertVideo"]'),
  17315. t = u.popups.get("video.insert");
  17316. if (t || (t = i()), y(), !t.hasClass("fr-active"))
  17317. if (u.popups.refresh("video.insert"), u.popups.setContainer("video.insert", u.$tb), e.isVisible()) {
  17318. var n = u.button.getPosition(e),
  17319. r = n.left,
  17320. a = n.top;
  17321. u.popups.show("video.insert", r, a, e.outerHeight())
  17322. } else u.position.forSelection(t), u.popups.show("video.insert")
  17323. },
  17324. showLayer: function ne(e) {
  17325. var t, n, r = u.popups.get("video.insert");
  17326. if (!p && !u.opts.toolbarInline) {
  17327. var a = u.$tb.find('.fr-command[data-cmd="insertVideo"]');
  17328. t = a.offset().left, n = a.offset().top + (u.opts.toolbarBottom ? 10 : a.outerHeight() - 10)
  17329. }
  17330. u.opts.toolbarInline && (n = r.offset().top - u.helpers.getPX(r.css("margin-top")), r.hasClass("fr-above") && (n += r.outerHeight())), r.find(".fr-layer").removeClass("fr-active"), r.find(".fr-" + e + "-layer").addClass("fr-active"), u.popups.show("video.insert", t, n, 0), u.accessibility.focusPopup(r)
  17331. },
  17332. refreshByURLButton: function re(e) {
  17333. var t = u.popups.get("video.insert");
  17334. t && t.find(".fr-video-by-url-layer").hasClass("fr-active") && e.addClass("fr-active").attr("aria-pressed", !0)
  17335. },
  17336. refreshEmbedButton: function ae(e) {
  17337. var t = u.popups.get("video.insert");
  17338. t && t.find(".fr-video-embed-layer").hasClass("fr-active") && e.addClass("fr-active").attr("aria-pressed", !0)
  17339. },
  17340. refreshUploadButton: function oe(e) {
  17341. var t = u.popups.get("video.insert");
  17342. t && t.find(".fr-video-upload-layer").hasClass("fr-active") && e.addClass("fr-active").attr("aria-pressed", !0)
  17343. },
  17344. upload: W,
  17345. insertByURL: function ie(e) {
  17346. void 0 === e && (e = (u.popups.get("video.insert").find('.fr-video-by-url-layer input[type="text"]').val() || "").trim());
  17347. var t = null;
  17348. if (/^http/.test(e) || (e = "https://" + e), u.helpers.isURL(e))
  17349. for (var n = 0; n < $e.VIDEO_PROVIDERS.length; n++) {
  17350. var r = $e.VIDEO_PROVIDERS[n];
  17351. if (r.test_regex.test(e) && new RegExp(u.opts.videoAllowedProviders.join("|")).test(r.provider)) {
  17352. t = e.replace(r.url_regex, r.url_text), t = r.html.replace(/\{url\}/, t);
  17353. break
  17354. }
  17355. }
  17356. t ? T(t) : (L(u.language.translate("Something went wrong. Please try again.")), u.events.trigger("video.linkError", [e]))
  17357. },
  17358. insertEmbed: function se(e) {
  17359. void 0 === e && (e = u.popups.get("video.insert").find(".fr-video-embed-layer textarea").val() || ""), 0 !== e.length && $e.VIDEO_EMBED_REGEX.test(e) ? T(e) : (L(u.language.translate("Something went wrong. Please try again.")), u.events.trigger("video.codeError", [e]))
  17360. },
  17361. insert: T,
  17362. align: function le(e) {
  17363. p.removeClass("fr-fvr fr-fvl"), !u.opts.htmlUntouched && u.opts.useClasses ? "left" == e ? p.addClass("fr-fvl") : "right" == e && p.addClass("fr-fvr") : Z(p, j(), e), J(), $(), o(), u.selection.clear()
  17364. },
  17365. refreshAlign: function ce(e) {
  17366. if (!p) return !1;
  17367. e.find(">*").first().replaceWith(u.icon.create("video-align-" + Y()))
  17368. },
  17369. refreshAlignOnShow: function de(e, t) {
  17370. p && t.find('.fr-command[data-param1="' + Y() + '"]').addClass("fr-active").attr("aria-selected", !0)
  17371. },
  17372. display: function fe(e) {
  17373. p.removeClass("fr-dvi fr-dvb"), !u.opts.htmlUntouched && u.opts.useClasses ? "inline" == e ? p.addClass("fr-dvi") : "block" == e && p.addClass("fr-dvb") : Z(p, e, Y()), J(), $(), o(), u.selection.clear()
  17374. },
  17375. refreshDisplayOnShow: function pe(e, t) {
  17376. p && t.find('.fr-command[data-param1="' + j() + '"]').addClass("fr-active").attr("aria-selected", !0)
  17377. },
  17378. remove: q,
  17379. hideProgressBar: y,
  17380. showSizePopup: function ue() {
  17381. var e = u.popups.get("video.size");
  17382. e || (e = G()), y(), u.popups.refresh("video.size"), u.popups.setContainer("video.size", u.$sc);
  17383. var t = p.find("iframe, embed, video"),
  17384. n = t.offset().left + t.outerWidth() / 2,
  17385. r = t.offset().top + t.height();
  17386. u.popups.show("video.size", n, r, t.height(), !0)
  17387. },
  17388. replace: function he() {
  17389. var e = u.popups.get("video.insert");
  17390. e || (e = i()), u.popups.isVisible("video.insert") || (y(), u.popups.refresh("video.insert"), u.popups.setContainer("video.insert", u.$sc));
  17391. var t = p.offset().left + p.outerWidth() / 2,
  17392. n = p.offset().top + p.height();
  17393. u.popups.show("video.insert", t, n, p.outerHeight(), !0)
  17394. },
  17395. back: function e() {
  17396. p ? (u.events.disableBlur(), p[0].click()) : (u.events.disableBlur(), u.selection.restore(), u.events.enableBlur(), u.popups.hide("video.insert"), u.toolbar.showInline())
  17397. },
  17398. setSize: function ge(e, t) {
  17399. if (p) {
  17400. var n = u.popups.get("video.size"),
  17401. r = p.find("iframe, embed, video");
  17402. r.css("width", e || n.find('input[name="width"]').val()), r.css("height", t || n.find('input[name="height"]').val()), r.get(0).style.width && r.removeAttr("width"), r.get(0).style.height && r.removeAttr("height"), n.find("input:focus").blur(), setTimeout(function() {
  17403. p.trigger("click")
  17404. }, u.helpers.isAndroid() ? 50 : 0)
  17405. }
  17406. },
  17407. get: function me() {
  17408. return p
  17409. },
  17410. showProgressBar: S
  17411. }
  17412. }, $e.RegisterCommand("insertVideo", {
  17413. title: "Insert Video",
  17414. undo: !1,
  17415. focus: !0,
  17416. refreshAfterCallback: !1,
  17417. popup: !0,
  17418. callback: function() {
  17419. this.popups.isVisible("video.insert") ? (this.$el.find(".fr-marker").length && (this.events.disableBlur(), this.selection.restore()), this.popups.hide("video.insert")) : this.video.showInsertPopup()
  17420. },
  17421. plugin: "video"
  17422. }), $e.DefineIcon("insertVideo", {
  17423. NAME: "video-camera",
  17424. FA5NAME: "camera",
  17425. SVG_KEY: "insertVideo"
  17426. }), $e.DefineIcon("videoByURL", {
  17427. NAME: "link",
  17428. SVG_KEY: "insertLink"
  17429. }), $e.RegisterCommand("videoByURL", {
  17430. title: "By URL",
  17431. undo: !1,
  17432. focus: !1,
  17433. toggle: !0,
  17434. callback: function() {
  17435. this.video.showLayer("video-by-url")
  17436. },
  17437. refresh: function(e) {
  17438. this.video.refreshByURLButton(e)
  17439. }
  17440. }), $e.DefineIcon("videoEmbed", {
  17441. NAME: "code",
  17442. SVG_KEY: "codeView"
  17443. }), $e.RegisterCommand("videoEmbed", {
  17444. title: "Embedded Code",
  17445. undo: !1,
  17446. focus: !1,
  17447. toggle: !0,
  17448. callback: function() {
  17449. this.video.showLayer("video-embed")
  17450. },
  17451. refresh: function(e) {
  17452. this.video.refreshEmbedButton(e)
  17453. }
  17454. }), $e.DefineIcon("videoUpload", {
  17455. NAME: "upload",
  17456. SVG_KEY: "upload"
  17457. }), $e.RegisterCommand("videoUpload", {
  17458. title: "Upload Video",
  17459. undo: !1,
  17460. focus: !1,
  17461. toggle: !0,
  17462. callback: function() {
  17463. this.video.showLayer("video-upload")
  17464. },
  17465. refresh: function(e) {
  17466. this.video.refreshUploadButton(e)
  17467. }
  17468. }), $e.RegisterCommand("videoInsertByURL", {
  17469. undo: !0,
  17470. focus: !0,
  17471. callback: function() {
  17472. this.video.insertByURL()
  17473. }
  17474. }), $e.RegisterCommand("videoInsertEmbed", {
  17475. undo: !0,
  17476. focus: !0,
  17477. callback: function() {
  17478. this.video.insertEmbed()
  17479. }
  17480. }), $e.DefineIcon("videoDisplay", {
  17481. NAME: "star",
  17482. SVG_KEY: "star"
  17483. }), $e.RegisterCommand("videoDisplay", {
  17484. title: "Display",
  17485. type: "dropdown",
  17486. options: {
  17487. inline: "Inline",
  17488. block: "Break Text"
  17489. },
  17490. callback: function(e, t) {
  17491. this.video.display(t)
  17492. },
  17493. refresh: function(e) {
  17494. this.opts.videoTextNear || e.addClass("fr-hidden")
  17495. },
  17496. refreshOnShow: function(e, t) {
  17497. this.video.refreshDisplayOnShow(e, t)
  17498. }
  17499. }), $e.DefineIcon("video-align", {
  17500. NAME: "align-left",
  17501. SVG_KEY: "align Left"
  17502. }), $e.DefineIcon("video-align-left", {
  17503. NAME: "align-left",
  17504. SVG_KEY: "alignLeft"
  17505. }), $e.DefineIcon("video-align-right", {
  17506. NAME: "align-right",
  17507. SVG_KEY: "alignRight"
  17508. }), $e.DefineIcon("video-align-center", {
  17509. NAME: "align-justify",
  17510. SVG_KEY: "alignJustify"
  17511. }), $e.DefineIcon("videoAlign", {
  17512. NAME: "align-center",
  17513. SVG_KEY: "alignCenter"
  17514. }), $e.RegisterCommand("videoAlign", {
  17515. type: "dropdown",
  17516. title: "Align",
  17517. options: {
  17518. left: "Align Left",
  17519. center: "None",
  17520. right: "Align Right"
  17521. },
  17522. html: function() {
  17523. var e = '<ul class="fr-dropdown-list" role="presentation">',
  17524. t = $e.COMMANDS.videoAlign.options;
  17525. for (var n in t) t.hasOwnProperty(n) && (e += '<li role="presentation"><a class="fr-command fr-title" tabIndex="-1" role="option" data-cmd="videoAlign" data-param1="' + n + '" title="' + this.language.translate(t[n]) + '">' + this.icon.create("video-align-" + n) + '<span class="fr-sr-only">' + this.language.translate(t[n]) + "</span></a></li>");
  17526. return e += "</ul>"
  17527. },
  17528. callback: function(e, t) {
  17529. this.video.align(t)
  17530. },
  17531. refresh: function(e) {
  17532. this.video.refreshAlign(e)
  17533. },
  17534. refreshOnShow: function(e, t) {
  17535. this.video.refreshAlignOnShow(e, t)
  17536. }
  17537. }), $e.DefineIcon("videoReplace", {
  17538. NAME: "exchange",
  17539. FA5NAME: "exchange-alt",
  17540. SVG_KEY: "replaceImage"
  17541. }), $e.RegisterCommand("videoReplace", {
  17542. title: "Replace",
  17543. undo: !1,
  17544. focus: !1,
  17545. popup: !0,
  17546. refreshAfterCallback: !1,
  17547. callback: function() {
  17548. this.video.replace()
  17549. }
  17550. }), $e.DefineIcon("videoRemove", {
  17551. NAME: "trash",
  17552. SVG_KEY: "remove"
  17553. }), $e.RegisterCommand("videoRemove", {
  17554. title: "Remove",
  17555. callback: function() {
  17556. this.video.remove()
  17557. }
  17558. }), $e.DefineIcon("videoSize", {
  17559. NAME: "arrows-alt",
  17560. SVG_KEY: "imageSize"
  17561. }), $e.RegisterCommand("videoSize", {
  17562. undo: !1,
  17563. focus: !1,
  17564. popup: !0,
  17565. title: "Change Size",
  17566. callback: function() {
  17567. this.video.showSizePopup()
  17568. }
  17569. }), $e.DefineIcon("videoBack", {
  17570. NAME: "arrow-left",
  17571. SVG_KEY: "back"
  17572. }), $e.RegisterCommand("videoBack", {
  17573. title: "Back",
  17574. undo: !1,
  17575. focus: !1,
  17576. back: !0,
  17577. callback: function() {
  17578. this.video.back()
  17579. },
  17580. refresh: function(e) {
  17581. this.video.get() || this.opts.toolbarInline ? (e.removeClass("fr-hidden"), e.next(".fr-separator").removeClass("fr-hidden")) : (e.addClass("fr-hidden"), e.next(".fr-separator").addClass("fr-hidden"))
  17582. }
  17583. }), $e.RegisterCommand("videoDismissError", {
  17584. title: "OK",
  17585. undo: !1,
  17586. callback: function() {
  17587. this.video.hideProgressBar(!0)
  17588. }
  17589. }), $e.RegisterCommand("videoSetSize", {
  17590. undo: !0,
  17591. focus: !1,
  17592. title: "Update",
  17593. refreshAfterCallback: !1,
  17594. callback: function() {
  17595. this.video.setSize()
  17596. }
  17597. }), Object.assign($e.DEFAULTS, {
  17598. wordDeniedTags: [],
  17599. wordDeniedAttrs: [],
  17600. wordAllowedStyleProps: ["font-family", "font-size", "background", "color", "width", "text-align", "vertical-align", "background-color", "padding", "margin", "height", "margin-top", "margin-left", "margin-right", "margin-bottom", "text-decoration", "font-weight", "font-style", "text-indent", "border", "border-.*", "line-height", "list-style-type"],
  17601. wordPasteModal: !0,
  17602. wordPasteKeepFormatting: !0
  17603. }), $e.PLUGINS.wordPaste = function(A) {
  17604. var s, a, u = A.$,
  17605. l = "word_paste",
  17606. h = {};
  17607. function t(e) {
  17608. var t = A.opts.wordAllowedStyleProps;
  17609. e || (A.opts.wordAllowedStyleProps = []), 0 === a.indexOf("<colgroup>") && (a = "<table>" + a + "</table>"), a = function p(e, t) {
  17610. 0 <= e.indexOf("<html") && (e = e.replace(/[.\s\S\w\W<>]*(<html[^>]*>[.\s\S\w\W<>]*<\/html>)[.\s\S\w\W<>]*/i, "$1"));
  17611. ! function d(e) {
  17612. for (var t = e.split("v:shape"), n = 1; n < t.length; n++) {
  17613. var r = t[n],
  17614. a = r.split(' id="')[1];
  17615. if (a && 1 < a.length) {
  17616. a = a.split('"')[0];
  17617. var o = r.split(' o:spid="')[1];
  17618. o && 1 < o.length && (o = o.split('"')[0], h[a] = o)
  17619. }
  17620. }
  17621. }(e);
  17622. var n = (new DOMParser).parseFromString(e, "text/html"),
  17623. r = n.head,
  17624. a = n.body,
  17625. i = function f(e) {
  17626. var t = {},
  17627. n = e.getElementsByTagName("style");
  17628. if (n.length) {
  17629. var r = n[0],
  17630. a = r.innerHTML.match(/[\S ]+\s+{[\s\S]+?}/gi);
  17631. if (a)
  17632. for (var o = 0; o < a.length; o++) {
  17633. var i = a[o],
  17634. s = i.replace(/([\S ]+\s+){[\s\S]+?}/gi, "$1"),
  17635. l = i.replace(/[\S ]+\s+{([\s\S]+?)}/gi, "$1");
  17636. s = s.replace(/^[\s]|[\s]$/gm, ""), l = l.replace(/^[\s]|[\s]$/gm, ""), s = s.replace(/\n|\r|\n\r/g, ""), l = l.replace(/\n|\r|\n\r/g, "");
  17637. for (var c = s.split(", "), d = 0; d < c.length; d++) t[c[d]] = l
  17638. }
  17639. }
  17640. return t
  17641. }(r);
  17642. g(a, function(e) {
  17643. if (e.nodeType === Node.TEXT_NODE && /\n|\u00a0|\r/.test(e.data)) {
  17644. if (!/\S| /.test(e.data) && !/[\u00a0]+/.test(e.data)) return e.data === $e.UNICODE_NBSP ? (e.data = "\u200b", !0) : 1 === e.data.length && 10 === e.data.charCodeAt(0) ? (e.data = " ", !0) : (C(e), !1);
  17645. e.data = e.data.replace(/\n|\r/gi, " ")
  17646. }
  17647. return !0
  17648. }), g(a, function(e) {
  17649. return e.nodeType !== Node.ELEMENT_NODE || "V:IMAGEDATA" !== e.tagName && "IMG" !== e.tagName || function c(e, t) {
  17650. if (!t) return;
  17651. var n;
  17652. if ("IMG" === e.tagName) {
  17653. var r = e.getAttribute("src");
  17654. if (!r || -1 === r.indexOf("file://")) return;
  17655. if (0 === r.indexOf("file://") && A.helpers.isURL(e.getAttribute("alt"))) return void e.setAttribute("src", e.getAttribute("alt"));
  17656. (n = h[e.getAttribute("v:shapes")]) || (n = e.getAttribute("v:shapes"), e.parentNode && e.parentNode.parentNode && 0 <= e.parentNode.parentNode.innerHTML.indexOf("msEquation") && (n = null))
  17657. } else n = e.parentNode.getAttribute("o:spid"); if (e.removeAttribute("height"), !n) return;
  17658. ! function s(e) {
  17659. m = {}, v(e, "i", "\\shppict"), v(e, "s", "\\shp{")
  17660. }(t);
  17661. var a = m[n.substring(7)];
  17662. if (a) {
  17663. var o = function l(e) {
  17664. for (var t = e.match(/[0-9a-f]{2}/gi), n = [], r = 0; r < t.length; r++) n.push(String.fromCharCode(parseInt(t[r], 16)));
  17665. var a = n.join("");
  17666. return btoa(a)
  17667. }(a.image_hex),
  17668. i = "data:" + a.image_type + ";base64," + o;
  17669. "IMG" === e.tagName ? (e.src = i, e.setAttribute("data-fr-image-pasted", !0)) : u(e.parentNode).before('<img data-fr-image-pasted="true" src="' + i + '" style="' + e.parentNode.getAttribute("style") + '">').remove()
  17670. }
  17671. }(e, t), !0
  17672. });
  17673. for (var o = a.querySelectorAll("ul > ul, ul > ol, ol > ul, ol > ol"), s = o.length - 1; 0 <= s; s--) o[s].previousElementSibling && "LI" === o[s].previousElementSibling.tagName && o[s].previousElementSibling.appendChild(o[s]);
  17674. g(a, function(e) {
  17675. if (e.nodeType === Node.TEXT_NODE) return e.data = e.data.replace(/<br>(\n|\r)/gi, "<br>"), !1;
  17676. if (e.nodeType === Node.ELEMENT_NODE) {
  17677. if (S(e)) {
  17678. var t = e.parentNode,
  17679. n = e.previousSibling,
  17680. r = function E(e, t, n) {
  17681. var r = /[0-9a-zA-Z]./gi;
  17682. var a = !1;
  17683. var o;
  17684. var i;
  17685. var s;
  17686. var l = e.querySelector('span[style="mso-list:Ignore"]');
  17687. var c;
  17688. var d;
  17689. var f;
  17690. var p;
  17691. l && (a = a || r.test(l.textContent));
  17692. if (1 == a) {
  17693. var u = l.textContent.trim().split(".")[0];
  17694. "a" == u ? p = "lower-alpha;" : "A" == u ? p = "upper-alpha;" : "1" == u ? p = "decimal;" : "i" == u ? p = "lower-roman;" : "I" == u ? p = "upper-roman;" : "o" == u && (p = "circle;"), p = "list-style-type: " + p, f = "ol"
  17695. } else f = "ul";
  17696. var h = p ? "<" + f + ' style = "' + p + '">' : "<" + f + ">";
  17697. for (; e;) {
  17698. if (!S(e)) {
  17699. if (e.outerHTML && 0 < e.outerHTML.indexOf("mso-bookmark") && 0 == (e.textContent || "").length) {
  17700. e = e.nextElementSibling;
  17701. continue
  17702. }
  17703. break
  17704. }
  17705. var g = e.getAttribute("style").replace(/\n/gi, "").replace(/.*level([0-9]+?).*/gi, "$1");
  17706. if ((n = n || g) < g) d = E(e, t, g), h += d.el.outerHTML, e = d.currentNode;
  17707. else {
  17708. if (g < n) break;
  17709. e.firstElementChild && e.firstElementChild.firstElementChild && e.firstElementChild.firstElementChild.firstChild && (r.lastIndex = 0, o = r.test(e.firstElementChild.firstElementChild.firstChild.data || e.firstElementChild.firstElementChild.firstChild.firstChild.data || "")), s && s.firstElementChild && s.firstElementChild.firstElementChild && s.firstElementChild.firstElementChild.firstChild && (r.lastIndex = 0, i = r.test(s.firstElementChild.firstElementChild.firstChild.data || s.firstElementChild.firstElementChild.firstChild.firstChild.data || "")), i === undefined || i === o ? (c = T(e, t), h += "<li>" + c + "</li>") : (d = E(e, t, g), h += d.el.outerHTML, e = d.currentNode);
  17710. var m = e && e.nextElementSibling;
  17711. m && (s = m.previousElementSibling), e && e.parentNode && e.parentNode.removeChild(e), e = m
  17712. }
  17713. }
  17714. h += "</" + f + ">";
  17715. var v = document.createElement("div");
  17716. v.innerHTML = h;
  17717. var b = v.firstElementChild;
  17718. return {
  17719. el: b,
  17720. currentNode: e
  17721. }
  17722. }(e, i).el,
  17723. a = null;
  17724. return (a = n ? n.nextSibling : t.firstChild) ? t.insertBefore(r, a) : t.appendChild(r), !1
  17725. }
  17726. return "FONT" === e.tagName && i["." + e.getAttribute("class")] && (e = y(e, "span")), b(e, i)
  17727. }
  17728. if (e.nodeType !== Node.COMMENT_NODE) return !0;
  17729. if (-1 < e.data.indexOf("[if !supportLineBreakNewLine]"))
  17730. for (var o = e.nextSibling; o;)(o = e.nextSibling) && C(o), o.data && -1 < o.data.indexOf("[endif]") && (o = null);
  17731. return C(e), !1
  17732. }), g(a, function(e) {
  17733. if (e.nodeType === Node.ELEMENT_NODE) {
  17734. var t = e.tagName;
  17735. if (!e.innerHTML && -1 === ["BR", "IMG"].indexOf(t)) {
  17736. for (var n = e.parentNode; n && (C(e), !(e = n).innerHTML);) n = e.parentNode;
  17737. return !1
  17738. }! function f(e) {
  17739. var t = e.getAttribute("style");
  17740. if (!t) return;
  17741. (t = L(t)) && ";" !== t.slice(-1) && (t += ";");
  17742. var n = t.match(/(^|\S+?):.+?;{1,1}/gi);
  17743. if (!n) return;
  17744. for (var r = {}, a = 0; a < n.length; a++) {
  17745. var o = n[a],
  17746. i = o.split(":");
  17747. 2 === i.length && ("text-align" === i[0] && "SPAN" === e.tagName || (r[i[0]] = i[1]))
  17748. }
  17749. var s = "";
  17750. for (var l in r)
  17751. if (r.hasOwnProperty(l)) {
  17752. if ("font-size" === l && "pt;" === r[l].slice(-3)) {
  17753. var c = null;
  17754. try {
  17755. c = parseFloat(r[l].slice(0, -3), 10)
  17756. } catch (d) {
  17757. c = null
  17758. }
  17759. c && (c = Math.round(1.33 * c), r[l] = c + "px;")
  17760. }
  17761. s += l + ":" + r[l]
  17762. }
  17763. s && e.setAttribute("style", s)
  17764. }(e)
  17765. }
  17766. return !0
  17767. }), g(a, function(e) {
  17768. if (e && "A" === e.nodeName && "" === e.href) {
  17769. for (var t = document.createDocumentFragment(); e.firstChild;) t.appendChild(e.firstChild);
  17770. e.parentNode.replaceChild(t, e)
  17771. }
  17772. return !0
  17773. });
  17774. var l = a.outerHTML,
  17775. c = A.opts.htmlAllowedStyleProps;
  17776. return A.opts.htmlAllowedStyleProps = A.opts.wordAllowedStyleProps, l = A.clean.html(l, A.opts.wordDeniedTags, A.opts.wordDeniedAttrs, !1), A.opts.htmlAllowedStyleProps = c, l
  17777. }(a = a.replace(/<span[\n\r ]*style='mso-spacerun:yes'>([\r\n\u00a0 ]*)<\/span>/g, function(e, t) {
  17778. for (var n = "", r = 0; r++ < t.length;) n += "&nbsp;";
  17779. return n
  17780. }), A.paste.getRtfClipboard());
  17781. var n = A.doc.createElement("DIV");
  17782. n.innerHTML = a, A.html.cleanBlankSpaces(n), a = n.innerHTML, a = (a = A.paste.cleanEmptyTagsAndDivs(a)).replace(/\u200b/g, ""),
  17783. function r() {
  17784. A.modals.hide(l)
  17785. }(), A.paste.clean(a, !0, !0), A.opts.wordAllowedStyleProps = t
  17786. }
  17787. function C(e) {
  17788. e.parentNode && e.parentNode.removeChild(e)
  17789. }
  17790. function g(e, t) {
  17791. if (t(e))
  17792. for (var n = e.firstChild; n;) {
  17793. var r = n,
  17794. a = n.previousSibling;
  17795. n = n.nextSibling, g(r, t), r.previousSibling || r.nextSibling || r.parentNode || !n || a === n.previousSibling || !n.parentNode ? r.previousSibling || r.nextSibling || r.parentNode || !n || n.previousSibling || n.nextSibling || n.parentNode || (a ? n = a.nextSibling ? a.nextSibling.nextSibling : null : e.firstChild && (n = e.firstChild.nextSibling)) : n = a ? a.nextSibling : e.firstChild
  17796. }
  17797. }
  17798. function S(e) {
  17799. if (!e.getAttribute("style") || !/mso-list:[\s]*l/gi.test(e.getAttribute("style").replace(/\n/gi, ""))) return !1;
  17800. try {
  17801. if (!e.querySelector('[style="mso-list:Ignore"]')) return !!(e.outerHTML && 0 <= e.outerHTML.indexOf("\x3c!--[if !supportLists]--\x3e"))
  17802. } catch (t) {
  17803. return !1
  17804. }
  17805. return !0
  17806. }
  17807. function T(e, r) {
  17808. var t = e.cloneNode(!0);
  17809. if (-1 !== ["H1", "H2", "H3", "H4", "H5", "H6"].indexOf(e.tagName)) {
  17810. var n = document.createElement(e.tagName.toLowerCase());
  17811. n.setAttribute("style", e.getAttribute("style")), n.innerHTML = t.innerHTML, t.innerHTML = n.outerHTML
  17812. }
  17813. g(t, function(e) {
  17814. if (e.nodeType == Node.COMMENT_NODE && (A.browser.msie || A.browser.safari || A.browser.edge)) try {
  17815. if ("[if !supportLists]" === e.data) {
  17816. for (e = e.nextSibling; e && e.nodeType !== Node.COMMENT_NODE;) {
  17817. var t = e.nextSibling;
  17818. e.parentNode.removeChild(e), e = t
  17819. }
  17820. e && e.nodeType == Node.COMMENT_NODE && e.parentNode.removeChild(e)
  17821. }
  17822. } catch (n) {}
  17823. return e.nodeType === Node.ELEMENT_NODE && ("mso-list:Ignore" === e.getAttribute("style") && e.parentNode.removeChild(e), e.setAttribute("style", function a(e) {
  17824. var n = "",
  17825. r = e.getAttribute("style");
  17826. r && ["line-height", "font-family", "font-size", "color", "background"].forEach(function(e) {
  17827. var t = r.match(new RegExp(e + ":.*;"));
  17828. t && (n += t[0] + ";")
  17829. });
  17830. return n
  17831. }(e)), b(e, r)), !0
  17832. });
  17833. var a = t.innerHTML;
  17834. return a = a.replace(/<!--[\s\S]*?-->/gi, "")
  17835. }
  17836. function y(e, t) {
  17837. for (var n = document.createElement(t), r = 0; r < e.attributes.length; r++) {
  17838. var a = e.attributes[r].name;
  17839. n.setAttribute(a, e.getAttribute(a))
  17840. }
  17841. return n.innerHTML = e.innerHTML, e.parentNode.replaceChild(n, e), n
  17842. }
  17843. function R(e) {
  17844. var t = e.getAttribute("align");
  17845. t && (e.style["text-align"] = t, e.removeAttribute("align"))
  17846. }
  17847. function L(e) {
  17848. return e.replace(/\n|\r|\n\r|&quot;/g, "")
  17849. }
  17850. function w(e, t, n) {
  17851. if (t) {
  17852. var r = e.getAttribute("style");
  17853. r && ";" !== r.slice(-1) && (r += ";"), t && ";" !== t.slice(-1) && (t += ";"), t = t.replace(/\n/gi, "");
  17854. var a = null;
  17855. a = n ? (r || "") + t : t + (r || ""), e.setAttribute("style", a)
  17856. }
  17857. }
  17858. var m = null;
  17859. function v(e, t, n) {
  17860. for (var r = e.split(n), a = 1; a < r.length; a++) {
  17861. var o = r[a];
  17862. if (1 < (o = o.split("shplid")).length) {
  17863. o = o[1];
  17864. for (var i = "", s = 0; s < o.length && "\\" !== o[s] && "{" !== o[s] && " " !== o[s] && "\r" !== o[s] && "\n" !== o[s];) i += o[s], s++;
  17865. var l = o.split("bliptag");
  17866. if (l && l.length < 2) continue;
  17867. var c = null;
  17868. if (-1 !== l[0].indexOf("pngblip") ? c = "image/png" : -1 !== l[0].indexOf("jpegblip") && (c = "image/jpeg"), !c) continue;
  17869. var d = l[1].split("}");
  17870. if (d && d.length < 2) continue;
  17871. var f = void 0;
  17872. if (2 < d.length && -1 !== d[0].indexOf("blipuid")) f = d[1].split(" ");
  17873. else {
  17874. if ((f = d[0].split(" ")) && f.length < 2) continue;
  17875. f.shift()
  17876. }
  17877. var p = f.join("");
  17878. m[t + i] = {
  17879. image_hex: p,
  17880. image_type: c
  17881. }
  17882. }
  17883. }
  17884. }
  17885. function b(e, t) {
  17886. var n = e.tagName,
  17887. r = n.toLowerCase();
  17888. e.firstElementChild && ("I" === e.firstElementChild.tagName ? y(e.firstElementChild, "em") : "B" === e.firstElementChild.tagName && y(e.firstElementChild, "strong"));
  17889. if (-1 !== ["SCRIPT", "APPLET", "EMBED", "NOFRAMES", "NOSCRIPT"].indexOf(n)) return C(e), !1;
  17890. for (var a = ["META", "LINK", "XML", "ST1:", "O:", "W:", "FONT"], o = 0; o < a.length; o++)
  17891. if (-1 !== n.indexOf(a[o])) return e.innerHTML && (e.outerHTML = e.innerHTML), C(e), !1;
  17892. if ("TD" !== n) {
  17893. var s = e.getAttribute("class") || "MsoNormal";
  17894. if (t && s) {
  17895. for (var l = (s = L(s)).split(" "), c = 0; c < l.length; c++) {
  17896. var d = [],
  17897. f = "." + l[c];
  17898. d.push(f), f = r + f, d.push(f);
  17899. for (var p = 0; p < d.length; p++) t[d[p]] && w(e, t[d[p]])
  17900. }
  17901. e.removeAttribute("class")
  17902. }
  17903. t && t[r] && w(e, t[r])
  17904. }
  17905. if (-1 !== ["P", "H1", "H2", "H3", "H4", "H5", "H6", "PRE"].indexOf(n)) {
  17906. var u = e.getAttribute("class");
  17907. if (u && (t && t[n.toLowerCase() + "." + u] && w(e, t[n.toLowerCase() + "." + u]), -1 !== u.toLowerCase().indexOf("mso"))) {
  17908. var h = L(u);
  17909. (h = h.replace(/[0-9a-z-_]*mso[0-9a-z-_]*/gi, "")) ? e.setAttribute("class", h): e.removeAttribute("class")
  17910. }
  17911. var g = e.getAttribute("style");
  17912. if (g) {
  17913. var m = g.match(/text-align:.+?[; "]{1,1}/gi);
  17914. m && m[m.length - 1].replace(/(text-align:.+?[; "]{1,1})/gi, "$1")
  17915. }
  17916. R(e)
  17917. }
  17918. if ("TR" === n && function T(e, t) {
  17919. A.node.clearAttributes(e);
  17920. for (var n = e.firstElementChild, r = 0, a = !1, o = null; n;) {
  17921. n.firstElementChild && -1 !== n.firstElementChild.tagName.indexOf("W:") && (n.innerHTML = n.firstElementChild.innerHTML), (o = n.getAttribute("width")) || a || (a = !0), r += parseInt(o, 10), (!n.firstChild || n.firstChild && n.firstChild.data === $e.UNICODE_NBSP) && (n.firstChild && C(n.firstChild), n.innerHTML = "<br>");
  17922. for (var i = n.firstElementChild, s = 1 === n.children.length; i;) "P" !== i.tagName || S(i) || s && R(i), i = i.nextElementSibling;
  17923. if (t) {
  17924. var l = n.getAttribute("class");
  17925. if (l) {
  17926. var c = (l = L(l)).match(/xl[0-9]+/gi);
  17927. if (c) {
  17928. var d = "." + c[0];
  17929. t[d] && w(n, t[d])
  17930. }
  17931. }
  17932. t.td && w(n, t.td)
  17933. }
  17934. var f = n.getAttribute("style");
  17935. f && (f = L(f)) && ";" !== f.slice(-1) && (f += ";");
  17936. var p = n.getAttribute("valign");
  17937. if (!p && f) {
  17938. var u = f.match(/vertical-align:.+?[; "]{1,1}/gi);
  17939. u && (p = u[u.length - 1].replace(/vertical-align:(.+?)[; "]{1,1}/gi, "$1"))
  17940. }
  17941. var h = null;
  17942. if (f) {
  17943. var g = f.match(/text-align:.+?[; "]{1,1}/gi);
  17944. g && (h = g[g.length - 1].replace(/text-align:(.+?)[; "]{1,1}/gi, "$1")), "general" === h && (h = null)
  17945. }
  17946. var m = null;
  17947. if (f) {
  17948. var v = f.match(/background:.+?[; "]{1,1}/gi);
  17949. v && (m = v[v.length - 1].replace(/background:(.+?)[; "]{1,1}/gi, "$1"))
  17950. }
  17951. var b = n.getAttribute("colspan"),
  17952. E = n.getAttribute("rowspan");
  17953. b && n.setAttribute("colspan", b), E && n.setAttribute("rowspan", E), p && (n.style["vertical-align"] = p), h && (n.style["text-align"] = h), m && (n.style["background-color"] = m), o && n.setAttribute("width", o), n = n.nextElementSibling
  17954. }
  17955. for (n = e.firstElementChild; n;) o = n.getAttribute("width"), a ? n.removeAttribute("width") : n.setAttribute("width", 100 * parseInt(o, 10) / r + "%"), n = n.nextElementSibling
  17956. }(e, t), "A" !== n || e.attributes.getNamedItem("href") || e.attributes.getNamedItem("name") || !e.innerHTML || (e.outerHTML = e.innerHTML), "A" == n && e.getAttribute("href") && e.querySelector("img")) {
  17957. var v = e.querySelectorAll("span");
  17958. for (i = 0; i < v.length; i++) v[i].innerText || (v[i].outerHTML = v[i].innerHTML)
  17959. }
  17960. if ("TD" !== n && "TH" !== n || e.innerHTML || (e.innerHTML = "<br>"), "TABLE" === n && (e.style.width = e.style.width), e.getAttribute("lang") && e.removeAttribute("lang"), e.getAttribute("style") && -1 !== e.getAttribute("style").toLowerCase().indexOf("mso")) {
  17961. var b = L(e.getAttribute("style"));
  17962. (b = b.replace(/[0-9a-z-_]*mso[0-9a-z-_]*:.+?(;{1,1}|$)/gi, "")) ? e.setAttribute("style", b): e.removeAttribute("style")
  17963. }
  17964. return !0
  17965. }
  17966. return {
  17967. _init: function e() {
  17968. A.events.on("paste.wordPaste", function(e) {
  17969. return a = e, A.opts.wordPasteModal ? function o() {
  17970. if (!s) {
  17971. var e = '<h4><svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 74.95 73.23" style="height: 25px; vertical-align: text-bottom; margin-right: 5px; display: inline-block"><defs><style>.a{fill:#2a5699;}.b{fill:#fff;}</style></defs><path class="a" d="M615.15,827.22h5.09V834c9.11.05,18.21-.09,27.32.05a2.93,2.93,0,0,1,3.29,3.25c.14,16.77,0,33.56.09,50.33-.09,1.72.17,3.63-.83,5.15-1.24.89-2.85.78-4.3.84-8.52,0-17,0-25.56,0v6.81h-5.32c-13-2.37-26-4.54-38.94-6.81q0-29.8,0-59.59c13.05-2.28,26.11-4.5,39.17-6.83Z" transform="translate(-575.97 -827.22)"/><path class="b" d="M620.24,836.59h28.1v54.49h-28.1v-6.81h22.14v-3.41H620.24v-4.26h22.14V873.2H620.24v-4.26h22.14v-3.41H620.24v-4.26h22.14v-3.41H620.24v-4.26h22.14v-3.41H620.24V846h22.14v-3.41H620.24Zm-26.67,15c1.62-.09,3.24-.16,4.85-.25,1.13,5.75,2.29,11.49,3.52,17.21,1-5.91,2-11.8,3.06-17.7,1.7-.06,3.41-.15,5.1-.26-1.92,8.25-3.61,16.57-5.71,24.77-1.42.74-3.55,0-5.24.09-1.13-5.64-2.45-11.24-3.47-16.9-1,5.5-2.29,10.95-3.43,16.42q-2.45-.13-4.92-.3c-1.41-7.49-3.07-14.93-4.39-22.44l4.38-.18c.88,5.42,1.87,10.82,2.64,16.25,1.2-5.57,2.43-11.14,3.62-16.71Z" transform="translate(-575.97 -827.22)"/></svg> ' + A.language.translate("Word Paste Detected") + "</h4>",
  17972. t = function a() {
  17973. var e = '<div class="fr-word-paste-modal" style="padding: 20px 20px 10px 20px;">';
  17974. return e += '<p style="text-align: left;">' + A.language.translate("The pasted content is coming from a Microsoft Word document. Do you want to keep the format or clean it up?") + "</p>", e += '<div style="text-align: right; margin-top: 50px;"><button class="fr-remove-word fr-command">' + A.language.translate("Clean") + '</button> <button class="fr-keep-word fr-command">' + A.language.translate("Keep") + "</button></div>", e += "</div>"
  17975. }(),
  17976. n = A.modals.create(l, e, t),
  17977. r = n.$body;
  17978. s = n.$modal, n.$modal.addClass("fr-middle"), A.events.bindClick(r, "button.fr-remove-word", function() {
  17979. var e = s.data("instance") || A;
  17980. e.wordPaste.clean()
  17981. }), A.events.bindClick(r, "button.fr-keep-word", function() {
  17982. var e = s.data("instance") || A;
  17983. e.wordPaste.clean(!0)
  17984. }), A.events.$on(u(A.o_win), "resize", function() {
  17985. A.modals.resize(l)
  17986. })
  17987. }
  17988. A.modals.show(l), A.modals.resize(l)
  17989. }() : t(A.opts.wordPasteKeepFormatting), !1
  17990. })
  17991. },
  17992. clean: t
  17993. }
  17994. }, $e
  17995. });