index.js 842 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926927928929930931932933934935936937938939940941942943944945946947948949950951952953954955956957958959960961962963964965966967968969970971972973974975976977978979980981982983984985986987988989990991992993994995996997998999100010011002100310041005100610071008100910101011101210131014101510161017101810191020102110221023102410251026102710281029103010311032103310341035103610371038103910401041104210431044104510461047104810491050105110521053105410551056105710581059106010611062106310641065106610671068106910701071107210731074107510761077107810791080108110821083108410851086108710881089109010911092109310941095109610971098109911001101110211031104110511061107110811091110111111121113111411151116111711181119112011211122112311241125112611271128112911301131113211331134113511361137113811391140114111421143114411451146114711481149115011511152115311541155115611571158115911601161116211631164116511661167116811691170117111721173117411751176117711781179118011811182118311841185118611871188118911901191119211931194119511961197119811991200120112021203120412051206120712081209121012111212121312141215121612171218121912201221122212231224122512261227122812291230123112321233123412351236123712381239124012411242124312441245124612471248124912501251125212531254125512561257125812591260126112621263126412651266126712681269127012711272127312741275127612771278127912801281128212831284128512861287128812891290129112921293129412951296129712981299130013011302130313041305130613071308130913101311131213131314131513161317131813191320132113221323132413251326132713281329133013311332133313341335133613371338133913401341134213431344134513461347134813491350135113521353135413551356135713581359136013611362136313641365136613671368136913701371137213731374137513761377137813791380138113821383138413851386138713881389139013911392139313941395139613971398139914001401140214031404140514061407140814091410141114121413141414151416141714181419142014211422142314241425142614271428142914301431143214331434143514361437143814391440144114421443144414451446144714481449145014511452145314541455145614571458145914601461146214631464146514661467146814691470147114721473147414751476147714781479148014811482148314841485148614871488148914901491149214931494149514961497149814991500150115021503150415051506150715081509151015111512151315141515151615171518151915201521152215231524152515261527152815291530153115321533153415351536153715381539154015411542154315441545154615471548154915501551155215531554155515561557155815591560156115621563156415651566156715681569157015711572157315741575157615771578157915801581158215831584158515861587158815891590159115921593159415951596159715981599160016011602160316041605160616071608160916101611161216131614161516161617161816191620162116221623162416251626162716281629163016311632163316341635163616371638163916401641164216431644164516461647164816491650165116521653165416551656165716581659166016611662166316641665166616671668166916701671167216731674167516761677167816791680168116821683168416851686168716881689169016911692169316941695169616971698169917001701170217031704170517061707170817091710171117121713171417151716171717181719172017211722172317241725172617271728172917301731173217331734173517361737173817391740174117421743174417451746174717481749175017511752175317541755175617571758175917601761176217631764176517661767176817691770177117721773177417751776177717781779178017811782178317841785178617871788178917901791179217931794179517961797179817991800180118021803180418051806180718081809181018111812181318141815181618171818181918201821182218231824182518261827182818291830183118321833183418351836183718381839184018411842184318441845184618471848184918501851185218531854185518561857185818591860186118621863186418651866186718681869187018711872187318741875187618771878187918801881188218831884188518861887188818891890189118921893189418951896189718981899190019011902190319041905190619071908190919101911191219131914191519161917191819191920192119221923192419251926192719281929193019311932193319341935193619371938193919401941194219431944194519461947194819491950195119521953195419551956195719581959196019611962196319641965196619671968196919701971197219731974197519761977197819791980198119821983198419851986198719881989199019911992199319941995199619971998199920002001200220032004200520062007200820092010201120122013201420152016201720182019202020212022202320242025202620272028202920302031203220332034203520362037203820392040204120422043204420452046204720482049205020512052205320542055205620572058205920602061206220632064206520662067206820692070207120722073207420752076207720782079208020812082208320842085208620872088208920902091209220932094209520962097209820992100210121022103210421052106210721082109211021112112211321142115211621172118211921202121212221232124212521262127212821292130213121322133213421352136213721382139214021412142214321442145214621472148214921502151215221532154215521562157215821592160216121622163216421652166216721682169217021712172217321742175217621772178217921802181218221832184218521862187218821892190219121922193219421952196219721982199220022012202220322042205220622072208220922102211221222132214221522162217221822192220222122222223222422252226222722282229223022312232223322342235223622372238223922402241224222432244224522462247224822492250225122522253225422552256225722582259226022612262226322642265226622672268226922702271227222732274227522762277227822792280228122822283228422852286228722882289229022912292229322942295229622972298229923002301230223032304230523062307230823092310231123122313231423152316231723182319232023212322232323242325232623272328232923302331233223332334233523362337233823392340234123422343234423452346234723482349235023512352235323542355235623572358235923602361236223632364236523662367236823692370237123722373237423752376237723782379238023812382238323842385238623872388238923902391239223932394239523962397239823992400240124022403240424052406240724082409241024112412241324142415241624172418241924202421242224232424242524262427242824292430243124322433243424352436243724382439244024412442244324442445244624472448244924502451245224532454245524562457245824592460246124622463246424652466246724682469247024712472247324742475247624772478247924802481248224832484248524862487248824892490249124922493249424952496249724982499250025012502250325042505250625072508250925102511251225132514251525162517251825192520252125222523252425252526252725282529253025312532253325342535253625372538253925402541254225432544254525462547254825492550255125522553255425552556255725582559256025612562256325642565256625672568256925702571257225732574257525762577257825792580258125822583258425852586258725882589259025912592259325942595259625972598259926002601260226032604260526062607260826092610261126122613261426152616261726182619262026212622262326242625262626272628262926302631263226332634263526362637263826392640264126422643264426452646264726482649265026512652265326542655265626572658265926602661266226632664266526662667266826692670267126722673267426752676267726782679268026812682268326842685268626872688268926902691269226932694269526962697269826992700270127022703270427052706270727082709271027112712271327142715271627172718271927202721272227232724272527262727272827292730273127322733273427352736273727382739274027412742274327442745274627472748274927502751275227532754275527562757275827592760276127622763276427652766276727682769277027712772277327742775277627772778277927802781278227832784278527862787278827892790279127922793279427952796279727982799280028012802280328042805280628072808280928102811281228132814281528162817281828192820282128222823282428252826282728282829283028312832283328342835283628372838283928402841284228432844284528462847284828492850285128522853285428552856285728582859286028612862286328642865286628672868286928702871287228732874287528762877287828792880288128822883288428852886288728882889289028912892289328942895289628972898289929002901290229032904290529062907290829092910291129122913291429152916291729182919292029212922292329242925292629272928292929302931293229332934293529362937293829392940294129422943294429452946294729482949295029512952295329542955295629572958295929602961296229632964296529662967296829692970297129722973297429752976297729782979298029812982298329842985298629872988298929902991299229932994299529962997299829993000300130023003300430053006300730083009301030113012301330143015301630173018301930203021302230233024302530263027302830293030303130323033303430353036303730383039304030413042304330443045304630473048304930503051305230533054305530563057305830593060306130623063306430653066306730683069307030713072307330743075307630773078307930803081308230833084308530863087308830893090309130923093309430953096309730983099310031013102310331043105310631073108310931103111311231133114311531163117311831193120312131223123312431253126312731283129313031313132313331343135313631373138313931403141314231433144314531463147314831493150315131523153315431553156315731583159316031613162316331643165316631673168316931703171317231733174317531763177317831793180318131823183318431853186318731883189319031913192319331943195319631973198319932003201320232033204320532063207320832093210321132123213321432153216321732183219322032213222322332243225322632273228322932303231323232333234323532363237323832393240324132423243324432453246324732483249325032513252325332543255325632573258325932603261326232633264326532663267326832693270327132723273327432753276327732783279328032813282328332843285328632873288328932903291329232933294329532963297329832993300330133023303330433053306330733083309331033113312331333143315331633173318331933203321332233233324332533263327332833293330333133323333333433353336333733383339334033413342334333443345334633473348334933503351335233533354335533563357335833593360336133623363336433653366336733683369337033713372337333743375337633773378337933803381338233833384338533863387338833893390339133923393339433953396339733983399340034013402340334043405340634073408340934103411341234133414341534163417341834193420342134223423342434253426342734283429343034313432343334343435343634373438343934403441344234433444344534463447344834493450345134523453345434553456345734583459346034613462346334643465346634673468346934703471347234733474347534763477347834793480348134823483348434853486348734883489349034913492349334943495349634973498349935003501350235033504350535063507350835093510351135123513351435153516351735183519352035213522352335243525352635273528352935303531353235333534353535363537353835393540354135423543354435453546354735483549355035513552355335543555355635573558355935603561356235633564356535663567356835693570357135723573357435753576357735783579358035813582358335843585358635873588358935903591359235933594359535963597359835993600360136023603360436053606360736083609361036113612361336143615361636173618361936203621362236233624362536263627362836293630363136323633363436353636363736383639364036413642364336443645364636473648364936503651365236533654365536563657365836593660366136623663366436653666366736683669367036713672367336743675367636773678367936803681368236833684368536863687368836893690369136923693369436953696369736983699370037013702370337043705370637073708370937103711371237133714371537163717371837193720372137223723372437253726372737283729373037313732373337343735373637373738373937403741374237433744374537463747374837493750375137523753375437553756375737583759376037613762376337643765376637673768376937703771377237733774377537763777377837793780378137823783378437853786378737883789379037913792379337943795379637973798379938003801380238033804380538063807380838093810381138123813381438153816381738183819382038213822382338243825382638273828382938303831383238333834383538363837383838393840384138423843384438453846384738483849385038513852385338543855385638573858385938603861386238633864386538663867386838693870387138723873387438753876387738783879388038813882388338843885388638873888388938903891389238933894389538963897389838993900390139023903390439053906390739083909391039113912391339143915391639173918391939203921392239233924392539263927392839293930393139323933393439353936393739383939394039413942394339443945394639473948394939503951395239533954395539563957395839593960396139623963396439653966396739683969397039713972397339743975397639773978397939803981398239833984398539863987398839893990399139923993399439953996399739983999400040014002400340044005400640074008400940104011401240134014401540164017401840194020402140224023402440254026402740284029403040314032403340344035403640374038403940404041404240434044404540464047404840494050405140524053405440554056405740584059406040614062406340644065406640674068406940704071407240734074407540764077407840794080408140824083408440854086408740884089409040914092409340944095409640974098409941004101410241034104410541064107410841094110411141124113411441154116411741184119412041214122412341244125412641274128412941304131413241334134413541364137413841394140414141424143414441454146414741484149415041514152415341544155415641574158415941604161416241634164416541664167416841694170417141724173417441754176417741784179418041814182418341844185418641874188418941904191419241934194419541964197419841994200420142024203420442054206420742084209421042114212421342144215421642174218421942204221422242234224422542264227422842294230423142324233423442354236423742384239424042414242424342444245424642474248424942504251425242534254425542564257425842594260426142624263426442654266426742684269427042714272427342744275427642774278427942804281428242834284428542864287428842894290429142924293429442954296429742984299430043014302430343044305430643074308430943104311431243134314431543164317431843194320432143224323432443254326432743284329433043314332433343344335433643374338433943404341434243434344434543464347434843494350435143524353435443554356435743584359436043614362436343644365436643674368436943704371437243734374437543764377437843794380438143824383438443854386438743884389439043914392439343944395439643974398439944004401440244034404440544064407440844094410441144124413441444154416441744184419442044214422442344244425442644274428442944304431443244334434443544364437443844394440444144424443444444454446444744484449445044514452445344544455445644574458445944604461446244634464446544664467446844694470447144724473447444754476447744784479448044814482448344844485448644874488448944904491449244934494449544964497449844994500450145024503450445054506450745084509451045114512451345144515451645174518451945204521452245234524452545264527452845294530453145324533453445354536453745384539454045414542454345444545454645474548454945504551455245534554455545564557455845594560456145624563456445654566456745684569457045714572457345744575457645774578457945804581458245834584458545864587458845894590459145924593459445954596459745984599460046014602460346044605460646074608460946104611461246134614461546164617461846194620462146224623462446254626462746284629463046314632463346344635463646374638463946404641464246434644464546464647464846494650465146524653465446554656465746584659466046614662466346644665466646674668466946704671467246734674467546764677467846794680468146824683468446854686468746884689469046914692469346944695469646974698469947004701470247034704470547064707470847094710471147124713471447154716471747184719472047214722472347244725472647274728472947304731473247334734473547364737473847394740474147424743474447454746474747484749475047514752475347544755475647574758475947604761476247634764476547664767476847694770477147724773477447754776477747784779478047814782478347844785478647874788478947904791479247934794479547964797479847994800480148024803480448054806480748084809481048114812481348144815481648174818481948204821482248234824482548264827482848294830483148324833483448354836483748384839484048414842484348444845484648474848484948504851485248534854485548564857485848594860486148624863486448654866486748684869487048714872487348744875487648774878487948804881488248834884488548864887488848894890489148924893489448954896489748984899490049014902490349044905490649074908490949104911491249134914491549164917491849194920492149224923492449254926492749284929493049314932493349344935493649374938493949404941494249434944494549464947494849494950495149524953495449554956495749584959496049614962496349644965496649674968496949704971497249734974497549764977497849794980498149824983498449854986498749884989499049914992499349944995499649974998499950005001500250035004500550065007500850095010501150125013501450155016501750185019502050215022502350245025502650275028502950305031503250335034503550365037503850395040504150425043504450455046504750485049505050515052505350545055505650575058505950605061506250635064506550665067506850695070507150725073507450755076507750785079508050815082508350845085508650875088508950905091509250935094509550965097509850995100510151025103510451055106510751085109511051115112511351145115511651175118511951205121512251235124512551265127512851295130513151325133513451355136513751385139514051415142514351445145514651475148514951505151515251535154515551565157515851595160516151625163516451655166516751685169517051715172517351745175517651775178517951805181518251835184518551865187518851895190519151925193519451955196519751985199520052015202520352045205520652075208520952105211521252135214521552165217521852195220522152225223522452255226522752285229523052315232523352345235523652375238523952405241524252435244524552465247524852495250525152525253525452555256525752585259526052615262526352645265526652675268526952705271527252735274527552765277527852795280528152825283528452855286528752885289529052915292529352945295529652975298529953005301530253035304530553065307530853095310531153125313531453155316531753185319532053215322532353245325532653275328532953305331533253335334533553365337533853395340534153425343534453455346534753485349535053515352535353545355535653575358535953605361536253635364536553665367536853695370537153725373537453755376537753785379538053815382538353845385538653875388538953905391539253935394539553965397539853995400540154025403540454055406540754085409541054115412541354145415541654175418541954205421542254235424542554265427542854295430543154325433543454355436543754385439544054415442544354445445544654475448544954505451545254535454545554565457545854595460546154625463546454655466546754685469547054715472547354745475547654775478547954805481548254835484548554865487548854895490549154925493549454955496549754985499550055015502550355045505550655075508550955105511551255135514551555165517551855195520552155225523552455255526552755285529553055315532553355345535553655375538553955405541554255435544554555465547554855495550555155525553555455555556555755585559556055615562556355645565556655675568556955705571557255735574557555765577557855795580558155825583558455855586558755885589559055915592559355945595559655975598559956005601560256035604560556065607560856095610561156125613561456155616561756185619562056215622562356245625562656275628562956305631563256335634563556365637563856395640564156425643564456455646564756485649565056515652565356545655565656575658565956605661566256635664566556665667566856695670567156725673567456755676567756785679568056815682568356845685568656875688568956905691569256935694569556965697569856995700570157025703570457055706570757085709571057115712571357145715571657175718571957205721572257235724572557265727572857295730573157325733573457355736573757385739574057415742574357445745574657475748574957505751575257535754575557565757575857595760576157625763576457655766576757685769577057715772577357745775577657775778577957805781578257835784578557865787578857895790579157925793579457955796579757985799580058015802580358045805580658075808580958105811581258135814581558165817581858195820582158225823582458255826582758285829583058315832583358345835583658375838583958405841584258435844584558465847584858495850585158525853585458555856585758585859586058615862586358645865586658675868586958705871587258735874587558765877587858795880588158825883588458855886588758885889589058915892589358945895589658975898589959005901590259035904590559065907590859095910591159125913591459155916591759185919592059215922592359245925592659275928592959305931593259335934593559365937593859395940594159425943594459455946594759485949595059515952595359545955595659575958595959605961596259635964596559665967596859695970597159725973597459755976597759785979598059815982598359845985598659875988598959905991599259935994599559965997599859996000600160026003600460056006600760086009601060116012601360146015601660176018601960206021602260236024602560266027602860296030603160326033603460356036603760386039604060416042604360446045604660476048604960506051605260536054605560566057605860596060606160626063606460656066606760686069607060716072607360746075607660776078607960806081608260836084608560866087608860896090609160926093609460956096609760986099610061016102610361046105610661076108610961106111611261136114611561166117611861196120612161226123612461256126612761286129613061316132613361346135613661376138613961406141614261436144614561466147614861496150615161526153615461556156615761586159616061616162616361646165616661676168616961706171617261736174617561766177617861796180618161826183618461856186618761886189619061916192619361946195619661976198619962006201620262036204620562066207620862096210621162126213621462156216621762186219622062216222622362246225622662276228622962306231623262336234623562366237623862396240624162426243624462456246624762486249625062516252625362546255625662576258625962606261626262636264626562666267626862696270627162726273627462756276627762786279628062816282628362846285628662876288628962906291629262936294629562966297629862996300630163026303630463056306630763086309631063116312631363146315631663176318631963206321632263236324632563266327632863296330633163326333633463356336633763386339634063416342634363446345634663476348634963506351635263536354635563566357635863596360636163626363636463656366636763686369637063716372637363746375637663776378637963806381638263836384638563866387638863896390639163926393639463956396639763986399640064016402640364046405640664076408640964106411641264136414641564166417641864196420642164226423642464256426642764286429643064316432643364346435643664376438643964406441644264436444644564466447644864496450645164526453645464556456645764586459646064616462646364646465646664676468646964706471647264736474647564766477647864796480648164826483648464856486648764886489649064916492649364946495649664976498649965006501650265036504650565066507650865096510651165126513651465156516651765186519652065216522652365246525652665276528652965306531653265336534653565366537653865396540654165426543654465456546654765486549655065516552655365546555655665576558655965606561656265636564656565666567656865696570657165726573657465756576657765786579658065816582658365846585658665876588658965906591659265936594659565966597659865996600660166026603660466056606660766086609661066116612661366146615661666176618661966206621662266236624662566266627662866296630663166326633663466356636663766386639664066416642664366446645664666476648664966506651665266536654665566566657665866596660666166626663666466656666666766686669667066716672667366746675667666776678667966806681668266836684668566866687668866896690669166926693669466956696669766986699670067016702670367046705670667076708670967106711671267136714671567166717671867196720672167226723672467256726672767286729673067316732673367346735673667376738673967406741674267436744674567466747674867496750675167526753675467556756675767586759676067616762676367646765676667676768676967706771677267736774677567766777677867796780678167826783678467856786678767886789679067916792679367946795679667976798679968006801680268036804680568066807680868096810681168126813681468156816681768186819682068216822682368246825682668276828682968306831683268336834683568366837683868396840684168426843684468456846684768486849685068516852685368546855685668576858685968606861686268636864686568666867686868696870687168726873687468756876687768786879688068816882688368846885688668876888688968906891689268936894689568966897689868996900690169026903690469056906690769086909691069116912691369146915691669176918691969206921692269236924692569266927692869296930693169326933693469356936693769386939694069416942694369446945694669476948694969506951695269536954695569566957695869596960696169626963696469656966696769686969697069716972697369746975697669776978697969806981698269836984698569866987698869896990699169926993699469956996699769986999700070017002700370047005700670077008700970107011701270137014701570167017701870197020702170227023702470257026702770287029703070317032703370347035703670377038703970407041704270437044704570467047704870497050705170527053705470557056705770587059706070617062706370647065706670677068706970707071707270737074707570767077707870797080708170827083708470857086708770887089709070917092709370947095709670977098709971007101710271037104710571067107710871097110711171127113711471157116711771187119712071217122712371247125712671277128712971307131713271337134713571367137713871397140714171427143714471457146714771487149715071517152715371547155715671577158715971607161716271637164716571667167716871697170717171727173717471757176717771787179718071817182718371847185718671877188718971907191719271937194719571967197719871997200720172027203720472057206720772087209721072117212721372147215721672177218721972207221722272237224722572267227722872297230723172327233723472357236723772387239724072417242724372447245724672477248724972507251725272537254725572567257725872597260726172627263726472657266726772687269727072717272727372747275727672777278727972807281728272837284728572867287728872897290729172927293729472957296729772987299730073017302730373047305730673077308730973107311731273137314731573167317731873197320732173227323732473257326732773287329733073317332733373347335733673377338733973407341734273437344734573467347734873497350735173527353735473557356735773587359736073617362736373647365736673677368736973707371737273737374737573767377737873797380738173827383738473857386738773887389739073917392739373947395739673977398739974007401740274037404740574067407740874097410741174127413741474157416741774187419742074217422742374247425742674277428742974307431743274337434743574367437743874397440744174427443744474457446744774487449745074517452745374547455745674577458745974607461746274637464746574667467746874697470747174727473747474757476747774787479748074817482748374847485748674877488748974907491749274937494749574967497749874997500750175027503750475057506750775087509751075117512751375147515751675177518751975207521752275237524752575267527752875297530753175327533753475357536753775387539754075417542754375447545754675477548754975507551755275537554755575567557755875597560756175627563756475657566756775687569757075717572757375747575757675777578757975807581758275837584758575867587758875897590759175927593759475957596759775987599760076017602760376047605760676077608760976107611761276137614761576167617761876197620762176227623762476257626762776287629763076317632763376347635763676377638763976407641764276437644764576467647764876497650765176527653765476557656765776587659766076617662766376647665766676677668766976707671767276737674767576767677767876797680768176827683768476857686768776887689769076917692769376947695769676977698769977007701770277037704770577067707770877097710771177127713771477157716771777187719772077217722772377247725772677277728772977307731773277337734773577367737773877397740774177427743774477457746774777487749775077517752775377547755775677577758775977607761776277637764776577667767776877697770777177727773777477757776777777787779778077817782778377847785778677877788778977907791779277937794779577967797779877997800780178027803780478057806780778087809781078117812781378147815781678177818781978207821782278237824782578267827782878297830783178327833783478357836783778387839784078417842784378447845784678477848784978507851785278537854785578567857785878597860786178627863786478657866786778687869787078717872787378747875787678777878787978807881788278837884788578867887788878897890789178927893789478957896789778987899790079017902790379047905790679077908790979107911791279137914791579167917791879197920792179227923792479257926792779287929793079317932793379347935793679377938793979407941794279437944794579467947794879497950795179527953795479557956795779587959796079617962796379647965796679677968796979707971797279737974797579767977797879797980798179827983798479857986798779887989799079917992799379947995799679977998799980008001800280038004800580068007800880098010801180128013801480158016801780188019802080218022802380248025802680278028802980308031803280338034803580368037803880398040804180428043804480458046804780488049805080518052805380548055805680578058805980608061806280638064806580668067806880698070807180728073807480758076807780788079808080818082808380848085808680878088808980908091809280938094809580968097809880998100810181028103810481058106810781088109811081118112811381148115811681178118811981208121812281238124812581268127812881298130813181328133813481358136813781388139814081418142814381448145814681478148814981508151815281538154815581568157815881598160816181628163816481658166816781688169817081718172817381748175817681778178817981808181818281838184818581868187818881898190819181928193819481958196819781988199820082018202820382048205820682078208820982108211821282138214821582168217821882198220822182228223822482258226822782288229823082318232823382348235823682378238823982408241824282438244824582468247824882498250825182528253825482558256825782588259826082618262826382648265826682678268826982708271827282738274827582768277827882798280828182828283828482858286828782888289829082918292829382948295829682978298829983008301830283038304830583068307830883098310831183128313831483158316831783188319832083218322832383248325832683278328832983308331833283338334833583368337833883398340834183428343834483458346834783488349835083518352835383548355835683578358835983608361836283638364836583668367836883698370837183728373837483758376837783788379838083818382838383848385838683878388838983908391839283938394839583968397839883998400840184028403840484058406840784088409841084118412841384148415841684178418841984208421842284238424842584268427842884298430843184328433843484358436843784388439844084418442844384448445844684478448844984508451845284538454845584568457845884598460846184628463846484658466846784688469847084718472847384748475847684778478847984808481848284838484848584868487848884898490849184928493849484958496849784988499850085018502850385048505850685078508850985108511851285138514851585168517851885198520852185228523852485258526852785288529853085318532853385348535853685378538853985408541854285438544854585468547854885498550855185528553855485558556855785588559856085618562856385648565856685678568856985708571857285738574857585768577857885798580858185828583858485858586858785888589859085918592859385948595859685978598859986008601860286038604860586068607860886098610861186128613861486158616861786188619862086218622862386248625862686278628862986308631863286338634863586368637863886398640864186428643864486458646864786488649865086518652865386548655865686578658865986608661866286638664866586668667866886698670867186728673867486758676867786788679868086818682868386848685868686878688868986908691869286938694869586968697869886998700870187028703870487058706870787088709871087118712871387148715871687178718871987208721872287238724872587268727872887298730873187328733873487358736873787388739874087418742874387448745874687478748874987508751875287538754875587568757875887598760876187628763876487658766876787688769877087718772877387748775877687778778877987808781878287838784878587868787878887898790879187928793879487958796879787988799880088018802880388048805880688078808880988108811881288138814881588168817881888198820882188228823882488258826882788288829883088318832883388348835883688378838883988408841884288438844884588468847884888498850885188528853885488558856885788588859886088618862886388648865886688678868886988708871887288738874887588768877887888798880888188828883888488858886888788888889889088918892889388948895889688978898889989008901890289038904890589068907890889098910891189128913891489158916891789188919892089218922892389248925892689278928892989308931893289338934893589368937893889398940894189428943894489458946894789488949895089518952895389548955895689578958895989608961896289638964896589668967896889698970897189728973897489758976897789788979898089818982898389848985898689878988898989908991899289938994899589968997899889999000900190029003900490059006900790089009901090119012901390149015901690179018901990209021902290239024902590269027902890299030903190329033903490359036903790389039904090419042904390449045904690479048904990509051905290539054905590569057905890599060906190629063906490659066906790689069907090719072907390749075907690779078907990809081908290839084908590869087908890899090909190929093909490959096909790989099910091019102910391049105910691079108910991109111911291139114911591169117911891199120912191229123912491259126912791289129913091319132913391349135913691379138913991409141914291439144914591469147914891499150915191529153915491559156915791589159916091619162916391649165916691679168916991709171917291739174917591769177917891799180918191829183918491859186918791889189919091919192919391949195919691979198919992009201920292039204920592069207920892099210921192129213921492159216921792189219922092219222922392249225922692279228922992309231923292339234923592369237923892399240924192429243924492459246924792489249925092519252925392549255925692579258925992609261926292639264926592669267926892699270927192729273927492759276927792789279928092819282928392849285928692879288928992909291929292939294929592969297929892999300930193029303930493059306930793089309931093119312931393149315931693179318931993209321932293239324932593269327932893299330933193329333933493359336933793389339934093419342934393449345934693479348934993509351935293539354935593569357935893599360936193629363936493659366936793689369937093719372937393749375937693779378937993809381938293839384938593869387938893899390939193929393939493959396939793989399940094019402940394049405940694079408940994109411941294139414941594169417941894199420942194229423942494259426942794289429943094319432943394349435943694379438943994409441944294439444944594469447944894499450945194529453945494559456945794589459946094619462946394649465946694679468946994709471947294739474947594769477947894799480948194829483948494859486948794889489949094919492949394949495949694979498949995009501950295039504950595069507950895099510951195129513951495159516951795189519952095219522952395249525952695279528952995309531953295339534953595369537953895399540954195429543954495459546954795489549955095519552955395549555955695579558955995609561956295639564956595669567956895699570957195729573957495759576957795789579958095819582958395849585958695879588958995909591959295939594959595969597959895999600960196029603960496059606960796089609961096119612961396149615961696179618961996209621962296239624962596269627962896299630963196329633963496359636963796389639964096419642964396449645964696479648964996509651965296539654965596569657965896599660966196629663966496659666966796689669967096719672967396749675967696779678967996809681968296839684968596869687968896899690969196929693969496959696969796989699970097019702970397049705970697079708970997109711971297139714971597169717971897199720972197229723972497259726972797289729973097319732973397349735973697379738973997409741974297439744974597469747974897499750975197529753975497559756975797589759976097619762976397649765976697679768976997709771977297739774977597769777977897799780978197829783978497859786978797889789979097919792979397949795979697979798979998009801980298039804980598069807980898099810981198129813981498159816981798189819982098219822982398249825982698279828982998309831983298339834983598369837983898399840984198429843984498459846984798489849985098519852985398549855985698579858985998609861986298639864986598669867986898699870987198729873987498759876987798789879988098819882988398849885988698879888988998909891989298939894989598969897989898999900990199029903990499059906990799089909991099119912991399149915991699179918991999209921992299239924992599269927992899299930993199329933993499359936993799389939994099419942994399449945994699479948994999509951995299539954995599569957995899599960996199629963996499659966996799689969997099719972997399749975997699779978997999809981998299839984998599869987998899899990999199929993999499959996999799989999100001000110002100031000410005100061000710008100091001010011100121001310014100151001610017100181001910020100211002210023100241002510026100271002810029100301003110032100331003410035100361003710038100391004010041100421004310044100451004610047100481004910050100511005210053100541005510056100571005810059100601006110062100631006410065100661006710068100691007010071100721007310074100751007610077100781007910080100811008210083100841008510086100871008810089100901009110092100931009410095100961009710098100991010010101101021010310104101051010610107101081010910110101111011210113101141011510116101171011810119101201012110122101231012410125101261012710128101291013010131101321013310134101351013610137101381013910140101411014210143101441014510146101471014810149101501015110152101531015410155101561015710158101591016010161101621016310164101651016610167101681016910170101711017210173101741017510176101771017810179101801018110182101831018410185101861018710188101891019010191101921019310194101951019610197101981019910200102011020210203102041020510206102071020810209102101021110212102131021410215102161021710218102191022010221102221022310224102251022610227102281022910230102311023210233102341023510236102371023810239102401024110242102431024410245102461024710248102491025010251102521025310254102551025610257102581025910260102611026210263102641026510266102671026810269102701027110272102731027410275102761027710278102791028010281102821028310284102851028610287102881028910290102911029210293102941029510296102971029810299103001030110302103031030410305103061030710308103091031010311103121031310314103151031610317103181031910320103211032210323103241032510326103271032810329103301033110332103331033410335103361033710338103391034010341103421034310344103451034610347103481034910350103511035210353103541035510356103571035810359103601036110362103631036410365103661036710368103691037010371103721037310374103751037610377103781037910380103811038210383103841038510386103871038810389103901039110392103931039410395103961039710398103991040010401104021040310404104051040610407104081040910410104111041210413104141041510416104171041810419104201042110422104231042410425104261042710428104291043010431104321043310434104351043610437104381043910440104411044210443104441044510446104471044810449104501045110452104531045410455104561045710458104591046010461104621046310464104651046610467104681046910470104711047210473104741047510476104771047810479104801048110482104831048410485104861048710488104891049010491104921049310494104951049610497104981049910500105011050210503105041050510506105071050810509105101051110512105131051410515105161051710518105191052010521105221052310524105251052610527105281052910530105311053210533105341053510536105371053810539105401054110542105431054410545105461054710548105491055010551105521055310554105551055610557105581055910560105611056210563105641056510566105671056810569105701057110572105731057410575105761057710578105791058010581105821058310584105851058610587105881058910590105911059210593105941059510596105971059810599106001060110602106031060410605106061060710608106091061010611106121061310614106151061610617106181061910620106211062210623106241062510626106271062810629106301063110632106331063410635106361063710638106391064010641106421064310644106451064610647106481064910650106511065210653106541065510656106571065810659106601066110662106631066410665106661066710668106691067010671106721067310674106751067610677106781067910680106811068210683106841068510686106871068810689106901069110692106931069410695106961069710698106991070010701107021070310704107051070610707107081070910710107111071210713107141071510716107171071810719107201072110722107231072410725107261072710728107291073010731107321073310734107351073610737107381073910740107411074210743107441074510746107471074810749107501075110752107531075410755107561075710758107591076010761107621076310764107651076610767107681076910770107711077210773107741077510776107771077810779107801078110782107831078410785107861078710788107891079010791107921079310794107951079610797107981079910800108011080210803108041080510806108071080810809108101081110812108131081410815108161081710818108191082010821108221082310824108251082610827108281082910830108311083210833108341083510836108371083810839108401084110842108431084410845108461084710848108491085010851108521085310854108551085610857108581085910860108611086210863108641086510866108671086810869108701087110872108731087410875108761087710878108791088010881108821088310884108851088610887108881088910890108911089210893108941089510896108971089810899109001090110902109031090410905109061090710908109091091010911109121091310914109151091610917109181091910920109211092210923109241092510926109271092810929109301093110932109331093410935109361093710938109391094010941109421094310944109451094610947109481094910950109511095210953109541095510956109571095810959109601096110962109631096410965109661096710968109691097010971109721097310974109751097610977109781097910980109811098210983109841098510986109871098810989109901099110992109931099410995109961099710998109991100011001110021100311004110051100611007110081100911010110111101211013110141101511016110171101811019110201102111022110231102411025110261102711028110291103011031110321103311034110351103611037110381103911040110411104211043110441104511046110471104811049110501105111052110531105411055110561105711058110591106011061110621106311064110651106611067110681106911070110711107211073110741107511076110771107811079110801108111082110831108411085110861108711088110891109011091110921109311094110951109611097110981109911100111011110211103111041110511106111071110811109111101111111112111131111411115111161111711118111191112011121111221112311124111251112611127111281112911130111311113211133111341113511136111371113811139111401114111142111431114411145111461114711148111491115011151111521115311154111551115611157111581115911160111611116211163111641116511166111671116811169111701117111172111731117411175111761117711178111791118011181111821118311184111851118611187111881118911190111911119211193111941119511196111971119811199112001120111202112031120411205112061120711208112091121011211112121121311214112151121611217112181121911220112211122211223112241122511226112271122811229112301123111232112331123411235112361123711238112391124011241112421124311244112451124611247112481124911250112511125211253112541125511256112571125811259112601126111262112631126411265112661126711268112691127011271112721127311274112751127611277112781127911280112811128211283112841128511286112871128811289112901129111292112931129411295112961129711298112991130011301113021130311304113051130611307113081130911310113111131211313113141131511316113171131811319113201132111322113231132411325113261132711328113291133011331113321133311334113351133611337113381133911340113411134211343113441134511346113471134811349113501135111352113531135411355113561135711358113591136011361113621136311364113651136611367113681136911370113711137211373113741137511376113771137811379113801138111382113831138411385113861138711388113891139011391113921139311394113951139611397113981139911400114011140211403114041140511406114071140811409114101141111412114131141411415114161141711418114191142011421114221142311424114251142611427114281142911430114311143211433114341143511436114371143811439114401144111442114431144411445114461144711448114491145011451114521145311454114551145611457114581145911460114611146211463114641146511466114671146811469114701147111472114731147411475114761147711478114791148011481114821148311484114851148611487114881148911490114911149211493114941149511496114971149811499115001150111502115031150411505115061150711508115091151011511115121151311514115151151611517115181151911520115211152211523115241152511526115271152811529115301153111532115331153411535115361153711538115391154011541115421154311544115451154611547115481154911550115511155211553115541155511556115571155811559115601156111562115631156411565115661156711568115691157011571115721157311574115751157611577115781157911580115811158211583115841158511586115871158811589115901159111592115931159411595115961159711598115991160011601116021160311604116051160611607116081160911610116111161211613116141161511616116171161811619116201162111622116231162411625116261162711628116291163011631116321163311634116351163611637116381163911640116411164211643116441164511646116471164811649116501165111652116531165411655116561165711658116591166011661116621166311664116651166611667116681166911670116711167211673116741167511676116771167811679116801168111682116831168411685116861168711688116891169011691116921169311694116951169611697116981169911700117011170211703117041170511706117071170811709117101171111712117131171411715117161171711718117191172011721117221172311724117251172611727117281172911730117311173211733117341173511736117371173811739117401174111742117431174411745117461174711748117491175011751117521175311754117551175611757117581175911760117611176211763117641176511766117671176811769117701177111772117731177411775117761177711778117791178011781117821178311784117851178611787117881178911790117911179211793117941179511796117971179811799118001180111802118031180411805118061180711808118091181011811118121181311814118151181611817118181181911820118211182211823118241182511826118271182811829118301183111832118331183411835118361183711838118391184011841118421184311844118451184611847118481184911850118511185211853118541185511856118571185811859118601186111862118631186411865118661186711868118691187011871118721187311874118751187611877118781187911880118811188211883118841188511886118871188811889118901189111892118931189411895118961189711898118991190011901119021190311904119051190611907119081190911910119111191211913119141191511916119171191811919119201192111922119231192411925119261192711928119291193011931119321193311934119351193611937119381193911940119411194211943119441194511946119471194811949119501195111952119531195411955119561195711958119591196011961119621196311964119651196611967119681196911970119711197211973119741197511976119771197811979119801198111982119831198411985119861198711988119891199011991119921199311994119951199611997119981199912000120011200212003120041200512006120071200812009120101201112012120131201412015120161201712018120191202012021120221202312024120251202612027120281202912030120311203212033120341203512036120371203812039120401204112042120431204412045120461204712048120491205012051120521205312054120551205612057120581205912060120611206212063120641206512066120671206812069120701207112072120731207412075120761207712078120791208012081120821208312084120851208612087120881208912090120911209212093120941209512096120971209812099121001210112102121031210412105121061210712108121091211012111121121211312114121151211612117121181211912120121211212212123121241212512126121271212812129121301213112132121331213412135121361213712138121391214012141121421214312144121451214612147121481214912150121511215212153121541215512156121571215812159121601216112162121631216412165121661216712168121691217012171121721217312174121751217612177121781217912180121811218212183121841218512186121871218812189121901219112192121931219412195121961219712198121991220012201122021220312204122051220612207122081220912210122111221212213122141221512216122171221812219122201222112222122231222412225122261222712228122291223012231122321223312234122351223612237122381223912240122411224212243122441224512246122471224812249122501225112252122531225412255122561225712258122591226012261122621226312264122651226612267122681226912270122711227212273122741227512276122771227812279122801228112282122831228412285122861228712288122891229012291122921229312294122951229612297122981229912300123011230212303123041230512306123071230812309123101231112312123131231412315123161231712318123191232012321123221232312324123251232612327123281232912330123311233212333123341233512336123371233812339123401234112342123431234412345123461234712348123491235012351123521235312354123551235612357123581235912360123611236212363123641236512366123671236812369123701237112372123731237412375123761237712378123791238012381123821238312384123851238612387123881238912390123911239212393123941239512396123971239812399124001240112402124031240412405124061240712408124091241012411124121241312414124151241612417124181241912420124211242212423124241242512426124271242812429124301243112432124331243412435124361243712438124391244012441124421244312444124451244612447124481244912450124511245212453124541245512456124571245812459124601246112462124631246412465124661246712468124691247012471124721247312474124751247612477124781247912480124811248212483124841248512486124871248812489124901249112492124931249412495124961249712498124991250012501125021250312504125051250612507125081250912510125111251212513125141251512516125171251812519125201252112522125231252412525125261252712528125291253012531125321253312534125351253612537125381253912540125411254212543125441254512546125471254812549125501255112552125531255412555125561255712558125591256012561125621256312564125651256612567125681256912570125711257212573125741257512576125771257812579125801258112582125831258412585125861258712588125891259012591125921259312594125951259612597125981259912600126011260212603126041260512606126071260812609126101261112612126131261412615126161261712618126191262012621126221262312624126251262612627126281262912630126311263212633126341263512636126371263812639126401264112642126431264412645126461264712648126491265012651126521265312654126551265612657126581265912660126611266212663126641266512666126671266812669126701267112672126731267412675126761267712678126791268012681126821268312684126851268612687126881268912690126911269212693126941269512696126971269812699127001270112702127031270412705127061270712708127091271012711127121271312714127151271612717127181271912720127211272212723127241272512726127271272812729127301273112732127331273412735127361273712738127391274012741127421274312744127451274612747127481274912750127511275212753127541275512756127571275812759127601276112762127631276412765127661276712768127691277012771127721277312774127751277612777127781277912780127811278212783127841278512786127871278812789127901279112792127931279412795127961279712798127991280012801128021280312804128051280612807128081280912810128111281212813128141281512816128171281812819128201282112822128231282412825128261282712828128291283012831128321283312834128351283612837128381283912840128411284212843128441284512846128471284812849128501285112852128531285412855128561285712858128591286012861128621286312864128651286612867128681286912870128711287212873128741287512876128771287812879128801288112882128831288412885128861288712888128891289012891128921289312894128951289612897128981289912900129011290212903129041290512906129071290812909129101291112912129131291412915129161291712918129191292012921129221292312924129251292612927129281292912930129311293212933129341293512936129371293812939129401294112942129431294412945129461294712948129491295012951129521295312954129551295612957129581295912960129611296212963129641296512966129671296812969129701297112972129731297412975129761297712978129791298012981129821298312984129851298612987129881298912990129911299212993129941299512996129971299812999130001300113002130031300413005130061300713008130091301013011130121301313014130151301613017130181301913020130211302213023130241302513026130271302813029130301303113032130331303413035130361303713038130391304013041130421304313044130451304613047130481304913050130511305213053130541305513056130571305813059130601306113062130631306413065130661306713068130691307013071130721307313074130751307613077130781307913080130811308213083130841308513086130871308813089130901309113092130931309413095130961309713098130991310013101131021310313104131051310613107131081310913110131111311213113131141311513116131171311813119131201312113122131231312413125131261312713128131291313013131131321313313134131351313613137131381313913140131411314213143131441314513146131471314813149131501315113152131531315413155131561315713158131591316013161131621316313164131651316613167131681316913170131711317213173131741317513176131771317813179131801318113182131831318413185131861318713188131891319013191131921319313194131951319613197131981319913200132011320213203132041320513206132071320813209132101321113212132131321413215132161321713218132191322013221132221322313224132251322613227132281322913230132311323213233132341323513236132371323813239132401324113242132431324413245132461324713248132491325013251132521325313254132551325613257132581325913260132611326213263132641326513266132671326813269132701327113272132731327413275132761327713278132791328013281132821328313284132851328613287132881328913290132911329213293132941329513296132971329813299133001330113302133031330413305133061330713308133091331013311133121331313314133151331613317133181331913320133211332213323133241332513326133271332813329133301333113332133331333413335133361333713338133391334013341133421334313344133451334613347133481334913350133511335213353133541335513356133571335813359133601336113362133631336413365133661336713368133691337013371133721337313374133751337613377133781337913380133811338213383133841338513386133871338813389133901339113392133931339413395133961339713398133991340013401134021340313404134051340613407134081340913410134111341213413134141341513416134171341813419134201342113422134231342413425134261342713428134291343013431134321343313434134351343613437134381343913440134411344213443134441344513446134471344813449134501345113452134531345413455134561345713458134591346013461134621346313464134651346613467134681346913470134711347213473134741347513476134771347813479134801348113482134831348413485134861348713488134891349013491134921349313494134951349613497134981349913500135011350213503135041350513506135071350813509135101351113512135131351413515135161351713518135191352013521135221352313524135251352613527135281352913530135311353213533135341353513536135371353813539135401354113542135431354413545135461354713548135491355013551135521355313554135551355613557135581355913560135611356213563135641356513566135671356813569135701357113572135731357413575135761357713578135791358013581135821358313584135851358613587135881358913590135911359213593135941359513596135971359813599136001360113602136031360413605136061360713608136091361013611136121361313614136151361613617136181361913620136211362213623136241362513626136271362813629136301363113632136331363413635136361363713638136391364013641136421364313644136451364613647136481364913650136511365213653136541365513656136571365813659136601366113662136631366413665136661366713668136691367013671136721367313674136751367613677136781367913680136811368213683136841368513686136871368813689136901369113692136931369413695136961369713698136991370013701137021370313704137051370613707137081370913710137111371213713137141371513716137171371813719137201372113722137231372413725137261372713728137291373013731137321373313734137351373613737137381373913740137411374213743137441374513746137471374813749137501375113752137531375413755137561375713758137591376013761137621376313764137651376613767137681376913770137711377213773137741377513776137771377813779137801378113782137831378413785137861378713788137891379013791137921379313794137951379613797137981379913800138011380213803138041380513806138071380813809138101381113812138131381413815138161381713818138191382013821138221382313824138251382613827138281382913830138311383213833138341383513836138371383813839138401384113842138431384413845138461384713848138491385013851138521385313854138551385613857138581385913860138611386213863138641386513866138671386813869138701387113872138731387413875138761387713878138791388013881138821388313884138851388613887138881388913890138911389213893138941389513896138971389813899139001390113902139031390413905139061390713908139091391013911139121391313914139151391613917139181391913920139211392213923139241392513926139271392813929139301393113932139331393413935139361393713938139391394013941139421394313944139451394613947139481394913950139511395213953139541395513956139571395813959139601396113962139631396413965139661396713968139691397013971139721397313974139751397613977139781397913980139811398213983139841398513986139871398813989139901399113992139931399413995139961399713998139991400014001140021400314004140051400614007140081400914010140111401214013140141401514016140171401814019140201402114022140231402414025140261402714028140291403014031140321403314034140351403614037140381403914040140411404214043140441404514046140471404814049140501405114052140531405414055140561405714058140591406014061140621406314064140651406614067140681406914070140711407214073140741407514076140771407814079140801408114082140831408414085140861408714088140891409014091140921409314094140951409614097140981409914100141011410214103141041410514106141071410814109141101411114112141131411414115141161411714118141191412014121141221412314124141251412614127141281412914130141311413214133141341413514136141371413814139141401414114142141431414414145141461414714148141491415014151141521415314154141551415614157141581415914160141611416214163141641416514166141671416814169141701417114172141731417414175141761417714178141791418014181141821418314184141851418614187141881418914190141911419214193141941419514196141971419814199142001420114202142031420414205142061420714208142091421014211142121421314214142151421614217142181421914220142211422214223142241422514226142271422814229142301423114232142331423414235142361423714238142391424014241142421424314244142451424614247142481424914250142511425214253142541425514256142571425814259142601426114262142631426414265142661426714268142691427014271142721427314274142751427614277142781427914280142811428214283142841428514286142871428814289142901429114292142931429414295142961429714298142991430014301143021430314304143051430614307143081430914310143111431214313143141431514316143171431814319143201432114322143231432414325143261432714328143291433014331143321433314334143351433614337143381433914340143411434214343143441434514346143471434814349143501435114352143531435414355143561435714358143591436014361143621436314364143651436614367143681436914370143711437214373143741437514376143771437814379143801438114382143831438414385143861438714388143891439014391143921439314394143951439614397143981439914400144011440214403144041440514406144071440814409144101441114412144131441414415144161441714418144191442014421144221442314424144251442614427144281442914430144311443214433144341443514436144371443814439144401444114442144431444414445144461444714448144491445014451144521445314454144551445614457144581445914460144611446214463144641446514466144671446814469144701447114472144731447414475144761447714478144791448014481144821448314484144851448614487144881448914490144911449214493144941449514496144971449814499145001450114502145031450414505145061450714508145091451014511145121451314514145151451614517145181451914520145211452214523145241452514526145271452814529145301453114532145331453414535145361453714538145391454014541145421454314544145451454614547145481454914550145511455214553145541455514556145571455814559145601456114562145631456414565145661456714568145691457014571145721457314574145751457614577145781457914580145811458214583145841458514586145871458814589145901459114592145931459414595145961459714598145991460014601146021460314604146051460614607146081460914610146111461214613146141461514616146171461814619146201462114622146231462414625146261462714628146291463014631146321463314634146351463614637146381463914640146411464214643146441464514646146471464814649146501465114652146531465414655146561465714658146591466014661146621466314664146651466614667146681466914670146711467214673146741467514676146771467814679146801468114682146831468414685146861468714688146891469014691146921469314694146951469614697146981469914700147011470214703147041470514706147071470814709147101471114712147131471414715147161471714718147191472014721147221472314724147251472614727147281472914730147311473214733147341473514736147371473814739147401474114742147431474414745147461474714748147491475014751147521475314754147551475614757147581475914760147611476214763147641476514766147671476814769147701477114772147731477414775147761477714778147791478014781147821478314784147851478614787147881478914790147911479214793147941479514796147971479814799148001480114802148031480414805148061480714808148091481014811148121481314814148151481614817148181481914820148211482214823148241482514826148271482814829148301483114832148331483414835148361483714838148391484014841148421484314844148451484614847148481484914850148511485214853148541485514856148571485814859148601486114862148631486414865148661486714868148691487014871148721487314874148751487614877148781487914880148811488214883148841488514886148871488814889148901489114892148931489414895148961489714898148991490014901149021490314904149051490614907149081490914910149111491214913149141491514916149171491814919149201492114922149231492414925149261492714928149291493014931149321493314934149351493614937149381493914940149411494214943149441494514946149471494814949149501495114952149531495414955149561495714958149591496014961149621496314964149651496614967149681496914970149711497214973149741497514976149771497814979149801498114982149831498414985149861498714988149891499014991149921499314994149951499614997149981499915000150011500215003150041500515006150071500815009150101501115012150131501415015150161501715018150191502015021150221502315024150251502615027150281502915030150311503215033150341503515036150371503815039150401504115042150431504415045150461504715048150491505015051150521505315054150551505615057150581505915060150611506215063150641506515066150671506815069150701507115072150731507415075150761507715078150791508015081150821508315084150851508615087150881508915090150911509215093150941509515096150971509815099151001510115102151031510415105151061510715108151091511015111151121511315114151151511615117151181511915120151211512215123151241512515126151271512815129151301513115132151331513415135151361513715138151391514015141151421514315144151451514615147151481514915150151511515215153151541515515156151571515815159151601516115162151631516415165151661516715168151691517015171151721517315174151751517615177151781517915180151811518215183151841518515186151871518815189151901519115192151931519415195151961519715198151991520015201152021520315204152051520615207152081520915210152111521215213152141521515216152171521815219152201522115222152231522415225152261522715228152291523015231152321523315234152351523615237152381523915240152411524215243152441524515246152471524815249152501525115252152531525415255152561525715258152591526015261152621526315264152651526615267152681526915270152711527215273152741527515276152771527815279152801528115282152831528415285152861528715288152891529015291152921529315294152951529615297152981529915300153011530215303153041530515306153071530815309153101531115312153131531415315153161531715318153191532015321153221532315324153251532615327153281532915330153311533215333153341533515336153371533815339153401534115342153431534415345153461534715348153491535015351153521535315354153551535615357153581535915360153611536215363153641536515366153671536815369153701537115372153731537415375153761537715378153791538015381153821538315384153851538615387153881538915390153911539215393153941539515396153971539815399154001540115402154031540415405154061540715408154091541015411154121541315414154151541615417154181541915420154211542215423154241542515426154271542815429154301543115432154331543415435154361543715438154391544015441154421544315444154451544615447154481544915450154511545215453154541545515456154571545815459154601546115462154631546415465154661546715468154691547015471154721547315474154751547615477154781547915480154811548215483154841548515486154871548815489154901549115492154931549415495154961549715498154991550015501155021550315504155051550615507155081550915510155111551215513155141551515516155171551815519155201552115522155231552415525155261552715528155291553015531155321553315534155351553615537155381553915540155411554215543155441554515546155471554815549155501555115552155531555415555155561555715558155591556015561155621556315564155651556615567155681556915570155711557215573155741557515576155771557815579155801558115582155831558415585155861558715588155891559015591155921559315594155951559615597155981559915600156011560215603156041560515606156071560815609156101561115612156131561415615156161561715618156191562015621156221562315624156251562615627156281562915630156311563215633156341563515636156371563815639156401564115642156431564415645156461564715648156491565015651156521565315654156551565615657156581565915660156611566215663156641566515666156671566815669156701567115672156731567415675156761567715678156791568015681156821568315684156851568615687156881568915690156911569215693156941569515696156971569815699157001570115702157031570415705157061570715708157091571015711157121571315714157151571615717157181571915720157211572215723157241572515726157271572815729157301573115732157331573415735157361573715738157391574015741157421574315744157451574615747157481574915750157511575215753157541575515756157571575815759157601576115762157631576415765157661576715768157691577015771157721577315774157751577615777157781577915780157811578215783157841578515786157871578815789157901579115792157931579415795157961579715798157991580015801158021580315804158051580615807158081580915810158111581215813158141581515816158171581815819158201582115822158231582415825158261582715828158291583015831158321583315834158351583615837158381583915840158411584215843158441584515846158471584815849158501585115852158531585415855158561585715858158591586015861158621586315864158651586615867158681586915870158711587215873158741587515876158771587815879158801588115882158831588415885158861588715888158891589015891158921589315894158951589615897158981589915900159011590215903159041590515906159071590815909159101591115912159131591415915159161591715918159191592015921159221592315924159251592615927159281592915930159311593215933159341593515936159371593815939159401594115942159431594415945159461594715948159491595015951159521595315954159551595615957159581595915960159611596215963159641596515966159671596815969159701597115972159731597415975159761597715978159791598015981159821598315984159851598615987159881598915990159911599215993159941599515996159971599815999160001600116002160031600416005160061600716008160091601016011160121601316014160151601616017160181601916020160211602216023160241602516026160271602816029160301603116032160331603416035160361603716038160391604016041160421604316044160451604616047160481604916050160511605216053160541605516056160571605816059160601606116062160631606416065160661606716068160691607016071160721607316074160751607616077160781607916080160811608216083160841608516086160871608816089160901609116092160931609416095160961609716098160991610016101161021610316104161051610616107161081610916110161111611216113161141611516116161171611816119161201612116122161231612416125161261612716128161291613016131161321613316134161351613616137161381613916140161411614216143161441614516146161471614816149161501615116152161531615416155161561615716158161591616016161161621616316164161651616616167161681616916170161711617216173161741617516176161771617816179161801618116182161831618416185161861618716188161891619016191161921619316194161951619616197161981619916200162011620216203162041620516206162071620816209162101621116212162131621416215162161621716218162191622016221162221622316224162251622616227162281622916230162311623216233162341623516236162371623816239162401624116242162431624416245162461624716248162491625016251162521625316254162551625616257162581625916260162611626216263162641626516266162671626816269162701627116272162731627416275162761627716278162791628016281162821628316284162851628616287162881628916290162911629216293162941629516296162971629816299163001630116302163031630416305163061630716308163091631016311163121631316314163151631616317163181631916320163211632216323163241632516326163271632816329163301633116332163331633416335163361633716338163391634016341163421634316344163451634616347163481634916350163511635216353163541635516356163571635816359163601636116362163631636416365163661636716368163691637016371163721637316374163751637616377163781637916380163811638216383163841638516386163871638816389163901639116392163931639416395163961639716398163991640016401164021640316404164051640616407164081640916410164111641216413164141641516416164171641816419164201642116422164231642416425164261642716428164291643016431164321643316434164351643616437164381643916440164411644216443164441644516446164471644816449164501645116452164531645416455164561645716458164591646016461164621646316464164651646616467164681646916470164711647216473164741647516476164771647816479164801648116482164831648416485164861648716488164891649016491164921649316494164951649616497164981649916500165011650216503165041650516506165071650816509165101651116512165131651416515165161651716518165191652016521165221652316524165251652616527165281652916530165311653216533165341653516536165371653816539165401654116542165431654416545165461654716548165491655016551165521655316554165551655616557165581655916560165611656216563165641656516566165671656816569165701657116572165731657416575165761657716578165791658016581165821658316584165851658616587165881658916590165911659216593165941659516596165971659816599166001660116602166031660416605166061660716608166091661016611166121661316614166151661616617166181661916620166211662216623166241662516626166271662816629166301663116632166331663416635166361663716638166391664016641166421664316644166451664616647166481664916650166511665216653166541665516656166571665816659166601666116662166631666416665166661666716668166691667016671166721667316674166751667616677166781667916680166811668216683166841668516686166871668816689166901669116692166931669416695166961669716698166991670016701167021670316704167051670616707167081670916710167111671216713167141671516716167171671816719167201672116722167231672416725167261672716728167291673016731167321673316734167351673616737167381673916740167411674216743167441674516746167471674816749167501675116752167531675416755167561675716758167591676016761167621676316764167651676616767167681676916770167711677216773167741677516776167771677816779167801678116782167831678416785167861678716788167891679016791167921679316794167951679616797167981679916800168011680216803168041680516806168071680816809168101681116812168131681416815168161681716818168191682016821168221682316824168251682616827168281682916830168311683216833168341683516836168371683816839168401684116842168431684416845168461684716848168491685016851168521685316854168551685616857168581685916860168611686216863168641686516866168671686816869168701687116872168731687416875168761687716878168791688016881168821688316884168851688616887168881688916890168911689216893168941689516896168971689816899169001690116902169031690416905169061690716908169091691016911169121691316914169151691616917169181691916920169211692216923169241692516926169271692816929169301693116932169331693416935169361693716938169391694016941169421694316944169451694616947169481694916950169511695216953169541695516956169571695816959169601696116962169631696416965169661696716968169691697016971169721697316974169751697616977169781697916980169811698216983169841698516986169871698816989169901699116992169931699416995169961699716998169991700017001170021700317004170051700617007170081700917010170111701217013170141701517016170171701817019170201702117022170231702417025170261702717028170291703017031170321703317034170351703617037170381703917040170411704217043170441704517046170471704817049170501705117052170531705417055170561705717058170591706017061170621706317064170651706617067170681706917070170711707217073170741707517076170771707817079170801708117082170831708417085170861708717088170891709017091170921709317094170951709617097170981709917100171011710217103171041710517106171071710817109171101711117112171131711417115171161711717118171191712017121171221712317124171251712617127171281712917130171311713217133171341713517136171371713817139171401714117142171431714417145171461714717148171491715017151171521715317154171551715617157171581715917160171611716217163171641716517166171671716817169171701717117172171731717417175171761717717178171791718017181171821718317184171851718617187171881718917190171911719217193171941719517196171971719817199172001720117202172031720417205172061720717208172091721017211172121721317214172151721617217172181721917220172211722217223172241722517226172271722817229172301723117232172331723417235172361723717238172391724017241172421724317244172451724617247172481724917250172511725217253172541725517256172571725817259172601726117262172631726417265172661726717268172691727017271172721727317274172751727617277172781727917280172811728217283172841728517286172871728817289172901729117292172931729417295172961729717298172991730017301173021730317304173051730617307173081730917310173111731217313173141731517316173171731817319173201732117322173231732417325173261732717328173291733017331173321733317334173351733617337173381733917340173411734217343173441734517346173471734817349173501735117352173531735417355173561735717358173591736017361173621736317364173651736617367173681736917370173711737217373173741737517376173771737817379173801738117382173831738417385173861738717388173891739017391173921739317394173951739617397173981739917400174011740217403174041740517406174071740817409174101741117412174131741417415174161741717418174191742017421174221742317424174251742617427174281742917430174311743217433174341743517436174371743817439174401744117442174431744417445174461744717448174491745017451174521745317454174551745617457174581745917460174611746217463174641746517466174671746817469174701747117472174731747417475174761747717478174791748017481174821748317484174851748617487174881748917490174911749217493174941749517496174971749817499175001750117502175031750417505175061750717508175091751017511175121751317514175151751617517175181751917520175211752217523175241752517526175271752817529175301753117532175331753417535175361753717538175391754017541175421754317544175451754617547175481754917550175511755217553175541755517556175571755817559175601756117562175631756417565175661756717568175691757017571175721757317574175751757617577175781757917580175811758217583175841758517586175871758817589175901759117592175931759417595175961759717598175991760017601176021760317604176051760617607176081760917610176111761217613176141761517616176171761817619176201762117622176231762417625176261762717628176291763017631176321763317634176351763617637176381763917640176411764217643176441764517646176471764817649176501765117652176531765417655176561765717658176591766017661176621766317664176651766617667176681766917670176711767217673176741767517676176771767817679176801768117682176831768417685176861768717688176891769017691176921769317694176951769617697176981769917700177011770217703177041770517706177071770817709177101771117712177131771417715177161771717718177191772017721177221772317724177251772617727177281772917730177311773217733177341773517736177371773817739177401774117742177431774417745177461774717748177491775017751177521775317754177551775617757177581775917760177611776217763177641776517766177671776817769177701777117772177731777417775177761777717778177791778017781177821778317784177851778617787177881778917790177911779217793177941779517796177971779817799178001780117802178031780417805178061780717808178091781017811178121781317814178151781617817178181781917820178211782217823178241782517826178271782817829178301783117832178331783417835178361783717838178391784017841178421784317844178451784617847178481784917850178511785217853178541785517856178571785817859178601786117862178631786417865178661786717868178691787017871178721787317874178751787617877178781787917880178811788217883178841788517886178871788817889178901789117892178931789417895178961789717898178991790017901179021790317904179051790617907179081790917910179111791217913179141791517916179171791817919179201792117922179231792417925179261792717928179291793017931179321793317934179351793617937179381793917940179411794217943179441794517946179471794817949179501795117952179531795417955179561795717958179591796017961179621796317964179651796617967179681796917970179711797217973179741797517976179771797817979179801798117982179831798417985179861798717988179891799017991179921799317994179951799617997179981799918000180011800218003180041800518006180071800818009180101801118012180131801418015180161801718018180191802018021180221802318024180251802618027180281802918030180311803218033180341803518036180371803818039180401804118042180431804418045180461804718048180491805018051180521805318054180551805618057180581805918060180611806218063180641806518066180671806818069180701807118072180731807418075180761807718078180791808018081180821808318084180851808618087180881808918090180911809218093180941809518096180971809818099181001810118102181031810418105181061810718108181091811018111181121811318114181151811618117181181811918120181211812218123181241812518126181271812818129181301813118132181331813418135181361813718138181391814018141181421814318144181451814618147181481814918150181511815218153181541815518156181571815818159181601816118162181631816418165181661816718168181691817018171181721817318174181751817618177181781817918180181811818218183181841818518186181871818818189181901819118192181931819418195181961819718198181991820018201182021820318204182051820618207182081820918210182111821218213182141821518216182171821818219182201822118222182231822418225182261822718228182291823018231182321823318234182351823618237182381823918240182411824218243182441824518246182471824818249182501825118252182531825418255182561825718258182591826018261182621826318264182651826618267182681826918270182711827218273182741827518276182771827818279182801828118282182831828418285182861828718288182891829018291182921829318294182951829618297182981829918300183011830218303183041830518306183071830818309183101831118312183131831418315183161831718318183191832018321183221832318324183251832618327183281832918330183311833218333183341833518336183371833818339183401834118342183431834418345183461834718348183491835018351183521835318354183551835618357183581835918360183611836218363183641836518366183671836818369183701837118372183731837418375183761837718378183791838018381183821838318384183851838618387183881838918390183911839218393183941839518396183971839818399184001840118402184031840418405184061840718408184091841018411184121841318414184151841618417184181841918420184211842218423184241842518426184271842818429184301843118432184331843418435184361843718438184391844018441184421844318444184451844618447184481844918450184511845218453184541845518456184571845818459184601846118462184631846418465184661846718468184691847018471184721847318474184751847618477184781847918480184811848218483184841848518486184871848818489184901849118492184931849418495184961849718498184991850018501185021850318504185051850618507185081850918510185111851218513185141851518516185171851818519185201852118522185231852418525185261852718528185291853018531185321853318534185351853618537185381853918540185411854218543185441854518546185471854818549185501855118552185531855418555185561855718558185591856018561185621856318564185651856618567185681856918570185711857218573185741857518576185771857818579185801858118582185831858418585185861858718588185891859018591185921859318594185951859618597185981859918600186011860218603186041860518606186071860818609186101861118612186131861418615186161861718618186191862018621186221862318624186251862618627186281862918630186311863218633186341863518636186371863818639186401864118642186431864418645186461864718648186491865018651186521865318654186551865618657186581865918660186611866218663186641866518666186671866818669186701867118672186731867418675186761867718678186791868018681186821868318684186851868618687186881868918690186911869218693186941869518696186971869818699187001870118702187031870418705187061870718708187091871018711187121871318714187151871618717187181871918720187211872218723187241872518726187271872818729187301873118732187331873418735187361873718738187391874018741187421874318744187451874618747187481874918750187511875218753187541875518756187571875818759187601876118762187631876418765187661876718768187691877018771187721877318774187751877618777187781877918780187811878218783187841878518786187871878818789187901879118792187931879418795187961879718798187991880018801188021880318804188051880618807188081880918810188111881218813188141881518816188171881818819188201882118822188231882418825188261882718828188291883018831188321883318834188351883618837188381883918840188411884218843188441884518846188471884818849188501885118852188531885418855188561885718858188591886018861188621886318864188651886618867188681886918870188711887218873188741887518876188771887818879188801888118882188831888418885188861888718888188891889018891188921889318894188951889618897188981889918900189011890218903189041890518906189071890818909189101891118912189131891418915189161891718918189191892018921189221892318924189251892618927189281892918930189311893218933189341893518936189371893818939189401894118942189431894418945189461894718948189491895018951189521895318954189551895618957189581895918960189611896218963189641896518966189671896818969189701897118972189731897418975189761897718978189791898018981189821898318984189851898618987189881898918990189911899218993189941899518996189971899818999190001900119002190031900419005190061900719008190091901019011190121901319014190151901619017190181901919020190211902219023190241902519026190271902819029190301903119032190331903419035190361903719038190391904019041190421904319044190451904619047190481904919050190511905219053190541905519056190571905819059190601906119062190631906419065190661906719068190691907019071190721907319074190751907619077190781907919080190811908219083190841908519086190871908819089190901909119092190931909419095190961909719098190991910019101191021910319104191051910619107191081910919110191111911219113191141911519116191171911819119191201912119122191231912419125191261912719128191291913019131191321913319134191351913619137191381913919140191411914219143191441914519146191471914819149191501915119152191531915419155191561915719158191591916019161191621916319164191651916619167191681916919170191711917219173191741917519176191771917819179191801918119182191831918419185191861918719188191891919019191191921919319194191951919619197191981919919200192011920219203192041920519206192071920819209192101921119212192131921419215192161921719218192191922019221192221922319224192251922619227192281922919230192311923219233192341923519236192371923819239192401924119242192431924419245192461924719248192491925019251192521925319254192551925619257192581925919260192611926219263192641926519266192671926819269192701927119272192731927419275192761927719278192791928019281192821928319284192851928619287192881928919290192911929219293192941929519296192971929819299193001930119302193031930419305193061930719308193091931019311193121931319314193151931619317193181931919320193211932219323193241932519326193271932819329193301933119332193331933419335193361933719338193391934019341193421934319344193451934619347193481934919350193511935219353193541935519356193571935819359193601936119362193631936419365193661936719368193691937019371193721937319374193751937619377193781937919380193811938219383193841938519386193871938819389193901939119392193931939419395193961939719398193991940019401194021940319404194051940619407194081940919410194111941219413194141941519416194171941819419194201942119422194231942419425194261942719428194291943019431194321943319434194351943619437194381943919440194411944219443194441944519446194471944819449194501945119452194531945419455194561945719458194591946019461194621946319464194651946619467194681946919470194711947219473194741947519476194771947819479194801948119482194831948419485194861948719488194891949019491194921949319494194951949619497194981949919500195011950219503195041950519506195071950819509195101951119512195131951419515195161951719518195191952019521195221952319524195251952619527195281952919530195311953219533195341953519536195371953819539195401954119542195431954419545195461954719548195491955019551195521955319554195551955619557195581955919560195611956219563195641956519566195671956819569195701957119572195731957419575195761957719578195791958019581195821958319584195851958619587195881958919590195911959219593195941959519596195971959819599196001960119602196031960419605196061960719608196091961019611196121961319614196151961619617196181961919620196211962219623196241962519626196271962819629196301963119632196331963419635196361963719638196391964019641196421964319644196451964619647196481964919650196511965219653196541965519656196571965819659196601966119662196631966419665196661966719668196691967019671196721967319674196751967619677196781967919680196811968219683196841968519686196871968819689196901969119692196931969419695196961969719698196991970019701197021970319704197051970619707197081970919710197111971219713197141971519716197171971819719197201972119722197231972419725197261972719728197291973019731197321973319734197351973619737197381973919740197411974219743197441974519746197471974819749197501975119752197531975419755197561975719758197591976019761197621976319764197651976619767197681976919770197711977219773197741977519776197771977819779197801978119782197831978419785197861978719788197891979019791197921979319794197951979619797197981979919800198011980219803198041980519806198071980819809198101981119812198131981419815198161981719818198191982019821198221982319824198251982619827198281982919830198311983219833198341983519836198371983819839198401984119842198431984419845198461984719848198491985019851198521985319854198551985619857198581985919860198611986219863198641986519866198671986819869198701987119872198731987419875198761987719878198791988019881198821988319884198851988619887198881988919890198911989219893198941989519896198971989819899199001990119902199031990419905199061990719908199091991019911199121991319914199151991619917199181991919920199211992219923199241992519926199271992819929199301993119932199331993419935199361993719938199391994019941199421994319944199451994619947199481994919950199511995219953199541995519956199571995819959199601996119962199631996419965199661996719968199691997019971199721997319974199751997619977199781997919980199811998219983199841998519986199871998819989199901999119992199931999419995199961999719998199992000020001200022000320004200052000620007200082000920010200112001220013200142001520016200172001820019200202002120022200232002420025200262002720028200292003020031200322003320034200352003620037200382003920040200412004220043200442004520046200472004820049200502005120052200532005420055200562005720058200592006020061200622006320064200652006620067200682006920070200712007220073200742007520076200772007820079200802008120082200832008420085200862008720088200892009020091200922009320094200952009620097200982009920100201012010220103201042010520106201072010820109201102011120112201132011420115201162011720118201192012020121201222012320124201252012620127201282012920130201312013220133201342013520136201372013820139201402014120142201432014420145201462014720148201492015020151201522015320154201552015620157201582015920160201612016220163201642016520166201672016820169201702017120172201732017420175201762017720178201792018020181201822018320184201852018620187201882018920190201912019220193201942019520196201972019820199202002020120202202032020420205202062020720208202092021020211202122021320214202152021620217202182021920220202212022220223202242022520226202272022820229202302023120232202332023420235202362023720238202392024020241202422024320244202452024620247202482024920250202512025220253202542025520256202572025820259202602026120262202632026420265202662026720268202692027020271202722027320274202752027620277202782027920280202812028220283202842028520286202872028820289202902029120292202932029420295202962029720298202992030020301203022030320304203052030620307203082030920310203112031220313203142031520316203172031820319203202032120322203232032420325203262032720328203292033020331203322033320334203352033620337203382033920340203412034220343203442034520346203472034820349203502035120352203532035420355203562035720358203592036020361203622036320364203652036620367203682036920370203712037220373203742037520376203772037820379203802038120382203832038420385203862038720388203892039020391203922039320394203952039620397203982039920400204012040220403204042040520406204072040820409204102041120412204132041420415204162041720418204192042020421204222042320424204252042620427204282042920430204312043220433204342043520436204372043820439204402044120442204432044420445204462044720448204492045020451204522045320454204552045620457204582045920460204612046220463204642046520466204672046820469204702047120472204732047420475204762047720478204792048020481204822048320484204852048620487204882048920490204912049220493204942049520496204972049820499205002050120502205032050420505205062050720508205092051020511205122051320514205152051620517205182051920520205212052220523205242052520526205272052820529205302053120532205332053420535205362053720538205392054020541205422054320544205452054620547205482054920550205512055220553205542055520556205572055820559205602056120562205632056420565205662056720568205692057020571205722057320574205752057620577205782057920580205812058220583205842058520586205872058820589205902059120592205932059420595205962059720598205992060020601206022060320604206052060620607206082060920610206112061220613206142061520616206172061820619206202062120622206232062420625206262062720628206292063020631206322063320634206352063620637206382063920640206412064220643206442064520646206472064820649206502065120652206532065420655206562065720658206592066020661206622066320664206652066620667206682066920670206712067220673206742067520676206772067820679206802068120682206832068420685206862068720688206892069020691206922069320694206952069620697206982069920700207012070220703207042070520706207072070820709207102071120712207132071420715207162071720718207192072020721207222072320724207252072620727207282072920730207312073220733207342073520736207372073820739207402074120742207432074420745207462074720748207492075020751207522075320754207552075620757207582075920760207612076220763207642076520766207672076820769207702077120772207732077420775207762077720778207792078020781207822078320784207852078620787207882078920790207912079220793207942079520796207972079820799208002080120802208032080420805208062080720808208092081020811208122081320814208152081620817208182081920820208212082220823208242082520826208272082820829208302083120832208332083420835208362083720838208392084020841208422084320844208452084620847208482084920850208512085220853208542085520856208572085820859208602086120862208632086420865208662086720868208692087020871208722087320874208752087620877208782087920880208812088220883208842088520886208872088820889208902089120892208932089420895208962089720898208992090020901209022090320904209052090620907209082090920910209112091220913209142091520916209172091820919209202092120922209232092420925209262092720928209292093020931209322093320934209352093620937209382093920940209412094220943209442094520946209472094820949209502095120952209532095420955209562095720958209592096020961209622096320964209652096620967209682096920970209712097220973209742097520976209772097820979209802098120982209832098420985209862098720988209892099020991209922099320994209952099620997209982099921000210012100221003210042100521006210072100821009210102101121012210132101421015210162101721018210192102021021210222102321024210252102621027210282102921030210312103221033210342103521036210372103821039210402104121042210432104421045210462104721048210492105021051210522105321054210552105621057210582105921060210612106221063210642106521066210672106821069210702107121072210732107421075210762107721078210792108021081210822108321084210852108621087210882108921090210912109221093210942109521096210972109821099211002110121102211032110421105211062110721108211092111021111211122111321114211152111621117211182111921120211212112221123211242112521126211272112821129211302113121132211332113421135211362113721138211392114021141211422114321144211452114621147211482114921150211512115221153211542115521156211572115821159211602116121162211632116421165211662116721168211692117021171211722117321174211752117621177211782117921180211812118221183211842118521186211872118821189211902119121192211932119421195211962119721198211992120021201212022120321204212052120621207212082120921210212112121221213212142121521216212172121821219212202122121222212232122421225212262122721228212292123021231212322123321234212352123621237212382123921240212412124221243212442124521246212472124821249212502125121252212532125421255212562125721258212592126021261212622126321264212652126621267212682126921270212712127221273212742127521276212772127821279212802128121282212832128421285212862128721288212892129021291212922129321294212952129621297212982129921300213012130221303213042130521306213072130821309213102131121312213132131421315213162131721318213192132021321213222132321324213252132621327213282132921330213312133221333213342133521336213372133821339213402134121342213432134421345213462134721348213492135021351213522135321354213552135621357213582135921360213612136221363213642136521366213672136821369213702137121372213732137421375213762137721378213792138021381213822138321384213852138621387213882138921390213912139221393213942139521396213972139821399214002140121402214032140421405214062140721408214092141021411214122141321414214152141621417214182141921420214212142221423214242142521426214272142821429214302143121432214332143421435214362143721438214392144021441214422144321444214452144621447214482144921450214512145221453214542145521456214572145821459214602146121462214632146421465214662146721468214692147021471214722147321474214752147621477214782147921480214812148221483214842148521486214872148821489214902149121492214932149421495214962149721498214992150021501215022150321504215052150621507215082150921510215112151221513215142151521516215172151821519215202152121522215232152421525215262152721528215292153021531215322153321534215352153621537215382153921540215412154221543215442154521546215472154821549215502155121552215532155421555215562155721558215592156021561215622156321564215652156621567215682156921570215712157221573215742157521576215772157821579215802158121582215832158421585215862158721588215892159021591215922159321594215952159621597215982159921600216012160221603216042160521606216072160821609216102161121612216132161421615216162161721618216192162021621216222162321624216252162621627216282162921630216312163221633216342163521636216372163821639216402164121642216432164421645216462164721648216492165021651216522165321654216552165621657216582165921660216612166221663216642166521666216672166821669216702167121672216732167421675216762167721678216792168021681216822168321684216852168621687216882168921690216912169221693216942169521696216972169821699217002170121702217032170421705217062170721708217092171021711217122171321714217152171621717217182171921720217212172221723217242172521726217272172821729217302173121732217332173421735217362173721738217392174021741217422174321744217452174621747217482174921750217512175221753217542175521756217572175821759217602176121762217632176421765217662176721768217692177021771217722177321774217752177621777217782177921780217812178221783217842178521786217872178821789217902179121792217932179421795217962179721798217992180021801218022180321804218052180621807218082180921810218112181221813218142181521816218172181821819218202182121822218232182421825218262182721828218292183021831218322183321834218352183621837218382183921840218412184221843218442184521846218472184821849218502185121852218532185421855218562185721858218592186021861218622186321864218652186621867218682186921870218712187221873218742187521876218772187821879218802188121882218832188421885218862188721888218892189021891218922189321894218952189621897218982189921900219012190221903219042190521906219072190821909219102191121912219132191421915219162191721918219192192021921219222192321924219252192621927219282192921930219312193221933219342193521936219372193821939219402194121942219432194421945219462194721948219492195021951219522195321954219552195621957219582195921960219612196221963219642196521966219672196821969219702197121972219732197421975219762197721978219792198021981219822198321984219852198621987219882198921990219912199221993219942199521996219972199821999220002200122002220032200422005220062200722008220092201022011220122201322014220152201622017220182201922020220212202222023220242202522026220272202822029220302203122032220332203422035220362203722038220392204022041220422204322044220452204622047220482204922050220512205222053220542205522056220572205822059220602206122062220632206422065220662206722068220692207022071220722207322074220752207622077220782207922080220812208222083220842208522086220872208822089220902209122092220932209422095220962209722098220992210022101221022210322104221052210622107221082210922110221112211222113221142211522116221172211822119221202212122122221232212422125221262212722128221292213022131221322213322134221352213622137221382213922140221412214222143221442214522146221472214822149221502215122152221532215422155221562215722158221592216022161221622216322164221652216622167221682216922170221712217222173221742217522176221772217822179221802218122182221832218422185221862218722188221892219022191221922219322194221952219622197221982219922200222012220222203222042220522206222072220822209222102221122212222132221422215222162221722218222192222022221222222222322224222252222622227222282222922230222312223222233222342223522236222372223822239222402224122242222432224422245222462224722248222492225022251222522225322254222552225622257222582225922260222612226222263222642226522266222672226822269222702227122272222732227422275222762227722278222792228022281222822228322284222852228622287222882228922290222912229222293222942229522296222972229822299223002230122302223032230422305223062230722308223092231022311223122231322314223152231622317223182231922320223212232222323223242232522326223272232822329223302233122332223332233422335223362233722338223392234022341223422234322344223452234622347223482234922350223512235222353223542235522356223572235822359223602236122362223632236422365223662236722368223692237022371223722237322374223752237622377223782237922380223812238222383223842238522386223872238822389223902239122392223932239422395223962239722398223992240022401224022240322404224052240622407224082240922410224112241222413224142241522416224172241822419224202242122422224232242422425224262242722428224292243022431224322243322434224352243622437224382243922440224412244222443224442244522446224472244822449224502245122452224532245422455224562245722458224592246022461224622246322464224652246622467224682246922470224712247222473224742247522476224772247822479224802248122482224832248422485224862248722488224892249022491224922249322494224952249622497224982249922500225012250222503225042250522506225072250822509225102251122512225132251422515225162251722518225192252022521225222252322524225252252622527225282252922530225312253222533225342253522536225372253822539225402254122542225432254422545225462254722548225492255022551225522255322554225552255622557225582255922560225612256222563225642256522566225672256822569225702257122572225732257422575225762257722578225792258022581225822258322584225852258622587225882258922590225912259222593225942259522596225972259822599226002260122602226032260422605226062260722608226092261022611226122261322614226152261622617226182261922620226212262222623226242262522626226272262822629226302263122632226332263422635226362263722638226392264022641226422264322644226452264622647226482264922650226512265222653226542265522656226572265822659226602266122662226632266422665226662266722668226692267022671226722267322674226752267622677226782267922680226812268222683226842268522686226872268822689226902269122692226932269422695226962269722698226992270022701227022270322704227052270622707227082270922710227112271222713227142271522716227172271822719227202272122722227232272422725227262272722728227292273022731227322273322734227352273622737227382273922740227412274222743227442274522746227472274822749227502275122752227532275422755227562275722758227592276022761227622276322764227652276622767227682276922770227712277222773227742277522776227772277822779227802278122782227832278422785227862278722788227892279022791227922279322794227952279622797227982279922800228012280222803228042280522806228072280822809228102281122812228132281422815228162281722818228192282022821228222282322824228252282622827228282282922830228312283222833228342283522836228372283822839228402284122842228432284422845228462284722848228492285022851228522285322854228552285622857228582285922860228612286222863228642286522866228672286822869228702287122872228732287422875228762287722878228792288022881228822288322884228852288622887228882288922890228912289222893228942289522896228972289822899229002290122902229032290422905229062290722908229092291022911229122291322914229152291622917229182291922920229212292222923229242292522926229272292822929229302293122932229332293422935229362293722938229392294022941229422294322944229452294622947229482294922950229512295222953229542295522956229572295822959229602296122962229632296422965229662296722968229692297022971229722297322974229752297622977229782297922980229812298222983229842298522986229872298822989229902299122992229932299422995229962299722998229992300023001230022300323004230052300623007230082300923010230112301223013230142301523016230172301823019230202302123022230232302423025230262302723028230292303023031230322303323034230352303623037230382303923040230412304223043230442304523046230472304823049230502305123052230532305423055230562305723058230592306023061230622306323064230652306623067230682306923070230712307223073230742307523076230772307823079230802308123082230832308423085230862308723088230892309023091230922309323094230952309623097230982309923100231012310223103231042310523106231072310823109231102311123112231132311423115231162311723118231192312023121231222312323124231252312623127231282312923130231312313223133231342313523136231372313823139231402314123142231432314423145231462314723148231492315023151231522315323154231552315623157231582315923160231612316223163231642316523166231672316823169231702317123172231732317423175231762317723178231792318023181231822318323184231852318623187231882318923190231912319223193231942319523196231972319823199232002320123202232032320423205232062320723208232092321023211232122321323214232152321623217232182321923220232212322223223232242322523226232272322823229232302323123232232332323423235232362323723238232392324023241232422324323244232452324623247232482324923250232512325223253232542325523256232572325823259232602326123262232632326423265232662326723268232692327023271232722327323274232752327623277232782327923280232812328223283232842328523286232872328823289232902329123292232932329423295232962329723298232992330023301233022330323304233052330623307233082330923310233112331223313233142331523316233172331823319233202332123322233232332423325233262332723328233292333023331233322333323334233352333623337233382333923340233412334223343233442334523346233472334823349233502335123352233532335423355233562335723358233592336023361233622336323364233652336623367233682336923370233712337223373233742337523376233772337823379233802338123382233832338423385233862338723388233892339023391233922339323394233952339623397233982339923400234012340223403234042340523406234072340823409234102341123412234132341423415234162341723418234192342023421234222342323424234252342623427234282342923430234312343223433234342343523436234372343823439234402344123442234432344423445234462344723448234492345023451234522345323454234552345623457234582345923460234612346223463234642346523466234672346823469234702347123472234732347423475234762347723478234792348023481234822348323484234852348623487234882348923490234912349223493234942349523496234972349823499235002350123502235032350423505235062350723508235092351023511235122351323514235152351623517235182351923520235212352223523235242352523526235272352823529235302353123532235332353423535235362353723538235392354023541235422354323544235452354623547235482354923550235512355223553235542355523556235572355823559235602356123562235632356423565235662356723568235692357023571235722357323574235752357623577235782357923580235812358223583235842358523586235872358823589235902359123592235932359423595235962359723598235992360023601236022360323604236052360623607236082360923610236112361223613236142361523616236172361823619236202362123622236232362423625236262362723628236292363023631236322363323634236352363623637236382363923640236412364223643236442364523646236472364823649236502365123652236532365423655236562365723658236592366023661236622366323664236652366623667236682366923670236712367223673236742367523676236772367823679236802368123682236832368423685236862368723688236892369023691236922369323694236952369623697236982369923700237012370223703237042370523706237072370823709237102371123712237132371423715237162371723718237192372023721237222372323724237252372623727237282372923730237312373223733237342373523736237372373823739237402374123742237432374423745237462374723748237492375023751237522375323754237552375623757237582375923760237612376223763237642376523766237672376823769237702377123772237732377423775237762377723778237792378023781237822378323784237852378623787237882378923790237912379223793237942379523796237972379823799238002380123802238032380423805238062380723808238092381023811238122381323814238152381623817238182381923820238212382223823238242382523826238272382823829238302383123832238332383423835238362383723838238392384023841238422384323844238452384623847238482384923850238512385223853238542385523856238572385823859238602386123862238632386423865238662386723868238692387023871238722387323874238752387623877238782387923880238812388223883238842388523886238872388823889238902389123892238932389423895238962389723898238992390023901239022390323904239052390623907239082390923910239112391223913239142391523916239172391823919239202392123922239232392423925239262392723928239292393023931239322393323934239352393623937239382393923940239412394223943239442394523946239472394823949239502395123952239532395423955239562395723958239592396023961239622396323964239652396623967239682396923970239712397223973239742397523976239772397823979239802398123982239832398423985239862398723988239892399023991239922399323994239952399623997239982399924000240012400224003240042400524006240072400824009240102401124012240132401424015240162401724018240192402024021240222402324024240252402624027240282402924030240312403224033240342403524036240372403824039240402404124042240432404424045240462404724048240492405024051240522405324054240552405624057240582405924060240612406224063240642406524066240672406824069240702407124072240732407424075240762407724078240792408024081240822408324084240852408624087240882408924090240912409224093240942409524096240972409824099241002410124102241032410424105241062410724108241092411024111241122411324114241152411624117241182411924120241212412224123241242412524126241272412824129241302413124132241332413424135241362413724138241392414024141241422414324144241452414624147241482414924150241512415224153241542415524156241572415824159241602416124162241632416424165241662416724168241692417024171241722417324174241752417624177241782417924180241812418224183241842418524186241872418824189241902419124192241932419424195241962419724198241992420024201242022420324204242052420624207242082420924210242112421224213242142421524216242172421824219242202422124222242232422424225242262422724228242292423024231242322423324234242352423624237242382423924240242412424224243242442424524246242472424824249242502425124252242532425424255242562425724258242592426024261242622426324264242652426624267242682426924270
  1. 'use strict';
  2. Object.defineProperty(exports, '__esModule', { value: true });
  3. var hooks = require('@bpmn-io/properties-panel/preact/hooks');
  4. var minDash = require('min-dash');
  5. var propertiesPanel = require('@bpmn-io/properties-panel');
  6. var preact = require('@bpmn-io/properties-panel/preact');
  7. var LabelUtil = require('bpmn-js/lib/features/label-editing/LabelUtil');
  8. var ModelUtil = require('bpmn-js/lib/util/ModelUtil');
  9. var DiUtil = require('bpmn-js/lib/util/DiUtil');
  10. var React = require('@bpmn-io/properties-panel/preact/compat');
  11. var jsxRuntime = require('@bpmn-io/properties-panel/preact/jsx-runtime');
  12. var minDom = require('min-dom');
  13. var ModelingUtil = require('bpmn-js/lib/features/modeling/util/ModelingUtil');
  14. var Ids = require('ids');
  15. var Collections = require('diagram-js/lib/util/Collections');
  16. var zeebe = require('@bpmn-io/extract-process-variables/zeebe');
  17. var arrayMove = require('array-move');
  18. var extractProcessVariables = require('@bpmn-io/extract-process-variables');
  19. var translateModule = require('diagram-js/lib/i18n/translate');
  20. var CommandInterceptor = require('diagram-js/lib/command/CommandInterceptor');
  21. var semverCompare = require('semver-compare');
  22. var elementTemplatesValidator = require('@bpmn-io/element-templates-validator');
  23. var CategoryUtil = require('bpmn-js/lib/features/modeling/behavior/util/CategoryUtil');
  24. var classnames = require('classnames');
  25. function _interopDefaultLegacy (e) { return e && typeof e === 'object' && 'default' in e ? e : { 'default': e }; }
  26. var React__default = /*#__PURE__*/_interopDefaultLegacy(React);
  27. var Ids__default = /*#__PURE__*/_interopDefaultLegacy(Ids);
  28. var translateModule__default = /*#__PURE__*/_interopDefaultLegacy(translateModule);
  29. var CommandInterceptor__default = /*#__PURE__*/_interopDefaultLegacy(CommandInterceptor);
  30. var semverCompare__default = /*#__PURE__*/_interopDefaultLegacy(semverCompare);
  31. var classnames__default = /*#__PURE__*/_interopDefaultLegacy(classnames);
  32. const BpmnPropertiesPanelContext = preact.createContext({
  33. selectedElement: null,
  34. injector: null,
  35. getService() {
  36. return null;
  37. }
  38. });
  39. function useService(type, strict) {
  40. const {
  41. getService
  42. } = hooks.useContext(BpmnPropertiesPanelContext);
  43. return getService(type, strict);
  44. }
  45. function _extends$1o() { _extends$1o = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends$1o.apply(this, arguments); }
  46. var AssociationIcon = (({
  47. styles = {},
  48. ...props
  49. }) => /*#__PURE__*/React__default["default"].createElement("svg", _extends$1o({
  50. width: "32",
  51. height: "32",
  52. xmlns: "http://www.w3.org/2000/svg"
  53. }, props), /*#__PURE__*/React__default["default"].createElement("path", {
  54. stroke: "#000",
  55. strokeWidth: "2",
  56. fill: "none",
  57. strokeDasharray: "3.3,6",
  58. strokeLinecap: "square",
  59. d: "M1.5 30.5l29-29"
  60. })));
  61. function _extends$1n() { _extends$1n = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends$1n.apply(this, arguments); }
  62. var BusinessRuleTaskIcon = (({
  63. styles = {},
  64. ...props
  65. }) => /*#__PURE__*/React__default["default"].createElement("svg", _extends$1n({
  66. xmlns: "http://www.w3.org/2000/svg",
  67. width: "32",
  68. height: "32"
  69. }, props), /*#__PURE__*/React__default["default"].createElement("path", {
  70. d: "M6.494 3C2.916 3 0 5.903 0 9.475v13.383c0 3.572 2.916 6.475 6.494 6.475h19.012c3.578 0 6.494-2.903 6.494-6.475V9.475C32 5.903 29.084 3 25.506 3H6.494zm0 2h19.012C28.015 5 30 6.98 30 9.475v13.383c0 2.495-1.985 4.475-4.494 4.475H6.494C3.985 27.333 2 25.353 2 22.858V9.475C2 6.98 3.985 5 6.494 5zM5.296 7.398v12.665h16.87V7.398H5.296zm.718 4.386h15.433v3.44H9.985v-3.432h-.719v3.431H6.014v-3.44zm0 4.158h3.252v3.403H6.014v-3.403zm3.97 0h11.463v3.403H9.985v-3.403z"
  71. }), /*#__PURE__*/React__default["default"].createElement("path", {
  72. d: "M6.079 8.209v3.587H21.44V8.209z"
  73. })));
  74. function _extends$1m() { _extends$1m = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends$1m.apply(this, arguments); }
  75. var CallActivityIcon = (({
  76. styles = {},
  77. ...props
  78. }) => /*#__PURE__*/React__default["default"].createElement("svg", _extends$1m({
  79. xmlns: "http://www.w3.org/2000/svg",
  80. width: "32",
  81. height: "32"
  82. }, props), /*#__PURE__*/React__default["default"].createElement("path", {
  83. d: "M24.978 3c3.761 0 6.89 2.979 7.018 6.695l.004.238V22.4c0 3.747-3.05 6.804-6.783 6.93l-.24.003H7.023c-3.761 0-6.89-2.978-7.018-6.695L0 22.4V9.933C0 6.187 3.05 3.13 6.783 3.004L7.023 3h17.955zm0 3.667H7.022c-1.842 0-3.255 1.344-3.35 3.079l-.005.187V22.4c0 1.761 1.35 3.167 3.16 3.262l.195.005L10 25.666V15h12v10.666h2.978c1.842 0 3.255-1.344 3.35-3.079l.005-.187V9.933c0-1.761-1.35-3.166-3.16-3.261l-.195-.005zm-3.732 9.087H10.754v9.912h10.491v-9.912zm-4.475 1.817v2.658h2.658v1.542H16.77v2.658H15.23V21.77H12.57V20.23h2.658V17.57h1.542z"
  84. })));
  85. function _extends$1l() { _extends$1l = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends$1l.apply(this, arguments); }
  86. var CollaborationIcon = (({
  87. styles = {},
  88. ...props
  89. }) => /*#__PURE__*/React__default["default"].createElement("svg", _extends$1l({
  90. xmlns: "http://www.w3.org/2000/svg",
  91. width: "32",
  92. height: "32"
  93. }, props), /*#__PURE__*/React__default["default"].createElement("g", {
  94. fillRule: "evenodd"
  95. }, /*#__PURE__*/React__default["default"].createElement("path", {
  96. fillRule: "nonzero",
  97. d: "M0 0v8.62h32V0H0zm1.655 7.054v-5.37h28.62v5.37H1.656zM0 23.38V32h32v-8.62H0zm1.655 7.054v-5.37h28.62v5.37H1.656z"
  98. }), /*#__PURE__*/React__default["default"].createElement("path", {
  99. d: "M24 8l4 7h-8l4-7zm0 2l-2.28 4h4.56L24 10zM23.5 21h1v3h-1zM23.5 15h1v3h-1zM8 24l-4-7h8l-4 7zm0-2l2.28-4H5.72L8 22zM7.5 8h1v3h-1zM7.5 14h1v3h-1z"
  100. }))));
  101. function _extends$1k() { _extends$1k = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends$1k.apply(this, arguments); }
  102. var ConditionalFlowIcon = (({
  103. styles = {},
  104. ...props
  105. }) => /*#__PURE__*/React__default["default"].createElement("svg", _extends$1k({
  106. xmlns: "http://www.w3.org/2000/svg",
  107. width: "32",
  108. height: "32"
  109. }, props), /*#__PURE__*/React__default["default"].createElement("path", {
  110. d: "M32 .041S20.42 5.95 14.537 8.713c1.26 1.15 2.432 2.392 3.648 3.588-5.703 5.78-3.15 3.303-8.087 8.316l-8.472 1.377L0 32l10.006-1.626.098-.598 1.279-7.873c4.975-5.052 2.403-2.555 8.118-8.346 1.218 1.214 2.43 2.435 3.648 3.648C26.29 11.018 32 .041 32 .041zM9.603 22.397L8.54 28.91 2.03 29.97l1.061-6.515 6.512-1.058z"
  111. })));
  112. function _extends$1j() { _extends$1j = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends$1j.apply(this, arguments); }
  113. var ConnectionIcon = (({
  114. styles = {},
  115. ...props
  116. }) => /*#__PURE__*/React__default["default"].createElement("svg", _extends$1j({
  117. xmlns: "http://www.w3.org/2000/svg",
  118. width: "32",
  119. height: "32"
  120. }, props), /*#__PURE__*/React__default["default"].createElement("path", {
  121. d: "M32 .06S20.33 6.014 14.403 8.798c1.27 1.16 2.451 2.41 3.676 3.616L0 30.734 1.325 32l18.08-18.32c1.227 1.223 2.448 2.453 3.676 3.676C26.247 11.12 32 .06 32 .06z"
  122. })));
  123. function _extends$1i() { _extends$1i = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends$1i.apply(this, arguments); }
  124. var DataInputOutputAssociationIcon = (({
  125. styles = {},
  126. ...props
  127. }) => /*#__PURE__*/React__default["default"].createElement("svg", _extends$1i({
  128. width: "32",
  129. height: "32",
  130. xmlns: "http://www.w3.org/2000/svg"
  131. }, props), /*#__PURE__*/React__default["default"].createElement("path", {
  132. stroke: "#000",
  133. strokeWidth: "2",
  134. strokeLinecap: "round",
  135. strokeDasharray: "1.1,4.3",
  136. d: "M1.5 30.5L27 5"
  137. }), /*#__PURE__*/React__default["default"].createElement("path", {
  138. d: "M31.803.197L26.5 16.107l-1.52-1.52 3.783-11.35-11.35 3.783-1.52-1.52z"
  139. })));
  140. function _extends$1h() { _extends$1h = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends$1h.apply(this, arguments); }
  141. var DataInputIcon = (({
  142. styles = {},
  143. ...props
  144. }) => /*#__PURE__*/React__default["default"].createElement("svg", _extends$1h({
  145. xmlns: "http://www.w3.org/2000/svg",
  146. width: "32",
  147. height: "32"
  148. }, props), /*#__PURE__*/React__default["default"].createElement("path", {
  149. d: "M20.833 0H3.488v32H28V7.36L20.833 0zm-2.105 1.818v7.507h7.454v20.857H5.306V1.818h13.422zm1.818.493l5.06 5.196h-5.06V2.311zm-9.182.86v3.744H7.081v3.222h4.283v3.743l5.7-5.354-5.7-5.354zm.808 1.868l3.711 3.487-3.71 3.487V9.329H7.888V7.723h4.283V5.039z"
  150. })));
  151. function _extends$1g() { _extends$1g = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends$1g.apply(this, arguments); }
  152. var DataObjectIcon = (({
  153. styles = {},
  154. ...props
  155. }) => /*#__PURE__*/React__default["default"].createElement("svg", _extends$1g({
  156. xmlns: "http://www.w3.org/2000/svg",
  157. width: "32",
  158. height: "32"
  159. }, props), /*#__PURE__*/React__default["default"].createElement("path", {
  160. d: "M21.345 0H4v32h24.512V7.36L21.345 0zM19.24 1.818v7.507h7.454v20.857H5.818V1.818H19.24zm1.818.493l5.06 5.196h-5.06V2.311z"
  161. })));
  162. function _extends$1f() { _extends$1f = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends$1f.apply(this, arguments); }
  163. var DataOutputIcon = (({
  164. styles = {},
  165. ...props
  166. }) => /*#__PURE__*/React__default["default"].createElement("svg", _extends$1f({
  167. xmlns: "http://www.w3.org/2000/svg",
  168. width: "32",
  169. height: "32"
  170. }, props), /*#__PURE__*/React__default["default"].createElement("path", {
  171. d: "M20.833 0H3.488v32H28V7.36L20.833 0zm-2.105 1.818v7.507h7.454v20.857H5.306V1.818h13.422zm1.818.493l5.06 5.196h-5.06V2.311zm-9.182.86v3.744H7.081v3.222h4.283v3.743l5.7-5.354-5.7-5.354z"
  172. })));
  173. function _extends$1e() { _extends$1e = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends$1e.apply(this, arguments); }
  174. var DataStoreIcon = (({
  175. styles = {},
  176. ...props
  177. }) => /*#__PURE__*/React__default["default"].createElement("svg", _extends$1e({
  178. xmlns: "http://www.w3.org/2000/svg",
  179. width: "32",
  180. height: "32"
  181. }, props), /*#__PURE__*/React__default["default"].createElement("path", {
  182. d: "M16.008 1c-3.712 0-7.417.306-10.319.939-1.45.316-2.7.71-3.68 1.226C1.065 3.662.297 4.304.061 5.23a.823.823 0 00-.035.15L0 5.502l.017.084c-.012 7.41 0 14.46 0 22.08l.017.082c.203.985.995 1.656 1.975 2.172.98.517 2.23.91 3.68 1.226 2.902.633 6.607.94 10.319.94 3.711 0 7.416-.307 10.318-.94 1.451-.316 2.701-.71 3.68-1.226.98-.516 1.772-1.187 1.975-2.172l.017-.082V5.541a.825.825 0 000-.106v-.016l-.002-.013a.823.823 0 00-.046-.197c-.244-.916-1.007-1.55-1.943-2.044-.98-.516-2.23-.91-3.68-1.226C23.423 1.306 19.718 1 16.006 1zm0 1.646c3.62 0 7.245.308 9.968.901 1.36.297 2.497.67 3.263 1.074.612.323.932.643 1.063.882-.131.24-.451.56-1.063.882-.766.404-1.902.777-3.263 1.074-2.723.594-6.349.901-9.968.901-3.62 0-7.245-.307-9.968-.901-1.361-.297-2.497-.67-3.264-1.074-.611-.322-.931-.642-1.062-.882.13-.24.451-.56 1.062-.882.767-.403 1.903-.777 3.264-1.074 2.723-.593 6.348-.9 9.968-.9zM1.664 7.647c.112.067.227.132.345.194.98.517 2.23.91 3.68 1.226 2.902.633 6.607.94 10.319.94 3.711 0 7.416-.307 10.318-.94 1.451-.316 2.701-.71 3.68-1.226.119-.062.234-.127.346-.194v1.93c-.08.245-.398.619-1.113.995-.766.404-1.902.777-3.263 1.074-2.723.594-6.349.901-9.968.901-3.62 0-7.245-.307-9.968-.9-1.361-.298-2.497-.671-3.264-1.075-.714-.376-1.032-.75-1.112-.995v-1.93zm0 4.187c.112.067.227.132.345.195.98.516 2.23.91 3.68 1.226 2.902.632 6.607.938 10.319.938 3.711 0 7.416-.306 10.318-.938 1.451-.317 2.701-.71 3.68-1.226.119-.063.234-.128.346-.195v1.93c-.08.245-.398.619-1.113.995-.766.404-1.902.777-3.263 1.074-2.723.594-6.349.901-9.968.901-3.62 0-7.245-.307-9.968-.9-1.361-.298-2.497-.67-3.264-1.075-.714-.376-1.032-.75-1.112-.995v-1.93zm0 4.188c.112.067.227.131.345.194.98.516 2.23.91 3.68 1.226 2.902.633 6.607.939 10.319.939 3.711 0 7.416-.306 10.318-.94 1.451-.316 2.701-.709 3.68-1.225.119-.063.234-.127.346-.194V27.47c-.08.245-.398.618-1.113.995-.766.404-1.902.777-3.263 1.074-2.723.594-6.349.9-9.968.9-3.62 0-7.245-.306-9.968-.9-1.361-.297-2.497-.67-3.264-1.074-.714-.377-1.032-.75-1.112-.995V16.022z"
  183. })));
  184. function _extends$1d() { _extends$1d = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends$1d.apply(this, arguments); }
  185. var DefaultFlowIcon = (({
  186. styles = {},
  187. ...props
  188. }) => /*#__PURE__*/React__default["default"].createElement("svg", _extends$1d({
  189. xmlns: "http://www.w3.org/2000/svg",
  190. width: "32",
  191. height: "32"
  192. }, props), /*#__PURE__*/React__default["default"].createElement("path", {
  193. d: "M32 .06S20.33 6.014 14.403 8.798c1.27 1.16 2.451 2.41 3.676 3.616L6.84 23.804H.046v1.755h5.063L0 30.735 1.325 32l6.357-6.441h7.145v-1.756H9.414l9.99-10.123c1.228 1.223 2.45 2.453 3.677 3.676C26.247 11.12 32 .06 32 .06z"
  194. })));
  195. function _extends$1c() { _extends$1c = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends$1c.apply(this, arguments); }
  196. var EndEventCancelIcon = (({
  197. styles = {},
  198. ...props
  199. }) => /*#__PURE__*/React__default["default"].createElement("svg", _extends$1c({
  200. xmlns: "http://www.w3.org/2000/svg",
  201. width: "32",
  202. height: "32"
  203. }, props), /*#__PURE__*/React__default["default"].createElement("path", {
  204. d: "M15.676.051C7.943.058.834 6.501.104 14.21c-.783 6.565 2.912 13.427 8.942 16.216 5.6 2.737 12.789 1.87 17.434-2.344 4.725-4.09 6.79-11.06 4.714-17.006C29.22 5.009 23.394.364 16.978.083A18.532 18.532 0 0015.676.05zm.317 5.006c5.695-.165 10.916 4.858 10.983 10.555.246 5.212-3.67 10.33-8.864 11.204-5.026 1.007-10.6-1.898-12.36-6.777-1.894-4.826.039-10.928 4.649-13.46a11.082 11.082 0 015.592-1.522zm-3.955 3.918L8.94 12.072l3.985 3.985-3.913 3.913 3.048 3.047 3.913-3.913 3.987 3.987 3.096-3.096-3.987-3.987 3.913-3.913-3.047-3.048-3.913 3.913-3.985-3.985z"
  205. })));
  206. function _extends$1b() { _extends$1b = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends$1b.apply(this, arguments); }
  207. var EndEventCompensationIcon = (({
  208. styles = {},
  209. ...props
  210. }) => /*#__PURE__*/React__default["default"].createElement("svg", _extends$1b({
  211. xmlns: "http://www.w3.org/2000/svg",
  212. width: "32",
  213. height: "32"
  214. }, props), /*#__PURE__*/React__default["default"].createElement("path", {
  215. d: "M15.676.051C7.943.058.834 6.501.104 14.21c-.783 6.565 2.912 13.427 8.942 16.216 5.6 2.737 12.789 1.87 17.434-2.344 4.725-4.09 6.79-11.06 4.714-17.006C29.22 5.009 23.394.364 16.978.083A18.532 18.532 0 0015.676.05zm.317 5.006c5.695-.165 10.916 4.858 10.983 10.555.246 5.212-3.67 10.33-8.864 11.204-5.026 1.007-10.6-1.898-12.36-6.777-1.894-4.826.039-10.928 4.649-13.46a11.082 11.082 0 015.592-1.522zm-.56 5.744l-7.407 5.23 7.408 5.234v-5.057c2.384 1.687 4.771 3.371 7.157 5.057V10.801l-7.157 5.054v-5.054z"
  216. })));
  217. function _extends$1a() { _extends$1a = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends$1a.apply(this, arguments); }
  218. var EndEventErrorIcon = (({
  219. styles = {},
  220. ...props
  221. }) => /*#__PURE__*/React__default["default"].createElement("svg", _extends$1a({
  222. xmlns: "http://www.w3.org/2000/svg",
  223. width: "32",
  224. height: "32"
  225. }, props), /*#__PURE__*/React__default["default"].createElement("path", {
  226. d: "M15.676.051C7.943.058.834 6.501.104 14.21c-.783 6.565 2.912 13.427 8.942 16.216 5.6 2.737 12.789 1.87 17.434-2.344 4.725-4.09 6.79-11.06 4.714-17.006C29.22 5.009 23.394.364 16.978.083A18.532 18.532 0 0015.676.05zm.317 5.006c5.695-.165 10.916 4.858 10.983 10.555.246 5.212-3.67 10.33-8.864 11.204-5.026 1.007-10.6-1.898-12.36-6.777-1.894-4.826.039-10.928 4.649-13.46a11.082 11.082 0 015.592-1.522zm6.132 4.166l-3.633 7.363-4.516-5.874-4.102 12.131 4.599-5.91 4.743 5.427 2.909-13.137z"
  227. })));
  228. function _extends$19() { _extends$19 = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends$19.apply(this, arguments); }
  229. var EndEventEscalationIcon = (({
  230. styles = {},
  231. ...props
  232. }) => /*#__PURE__*/React__default["default"].createElement("svg", _extends$19({
  233. xmlns: "http://www.w3.org/2000/svg",
  234. width: "32",
  235. height: "32"
  236. }, props), /*#__PURE__*/React__default["default"].createElement("path", {
  237. d: "M15.676.051C7.943.058.834 6.501.104 14.21c-.783 6.565 2.912 13.427 8.942 16.216 5.6 2.737 12.789 1.87 17.434-2.344 4.725-4.09 6.79-11.06 4.714-17.006C29.22 5.009 23.394.364 16.978.083A18.532 18.532 0 0015.676.05zm.317 5.006c5.695-.165 10.916 4.858 10.983 10.555.246 5.212-3.67 10.33-8.864 11.204-5.026 1.007-10.6-1.898-12.36-6.777-1.894-4.826.039-10.928 4.649-13.46a11.082 11.082 0 015.592-1.522zm.006 3.9c-1.672 4.653-2.733 9.5-4.406 14.153 1.535-1.525 2.872-3.234 4.406-4.759l4.406 4.76c-1.497-4.71-2.91-9.445-4.406-14.155z"
  238. })));
  239. function _extends$18() { _extends$18 = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends$18.apply(this, arguments); }
  240. var EndEventLinkIcon = (({
  241. styles = {},
  242. ...props
  243. }) => /*#__PURE__*/React__default["default"].createElement("svg", _extends$18({
  244. xmlns: "http://www.w3.org/2000/svg",
  245. width: "32",
  246. height: "32"
  247. }, props), /*#__PURE__*/React__default["default"].createElement("path", {
  248. d: "M15.676 0C7.943.007.834 6.45.104 14.16c-.783 6.565 2.912 13.427 8.942 16.216 5.6 2.737 12.789 1.87 17.434-2.344 4.725-4.09 6.79-11.06 4.714-17.006C29.22 4.958 23.394.313 16.978.032A18.532 18.532 0 0015.676 0zm.317 5.006c5.695-.165 10.916 4.858 10.983 10.555.246 5.212-3.67 10.33-8.864 11.204-5.026 1.007-10.6-1.898-12.36-6.777-1.894-4.826.039-10.928 4.649-13.46a11.082 11.082 0 015.592-1.522zm1.78 4.065v3.555H9.779v6.713h7.994v3.554l5.828-6.91-5.828-6.912z"
  249. })));
  250. function _extends$17() { _extends$17 = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends$17.apply(this, arguments); }
  251. var EndEventMessageIcon = (({
  252. styles = {},
  253. ...props
  254. }) => /*#__PURE__*/React__default["default"].createElement("svg", _extends$17({
  255. xmlns: "http://www.w3.org/2000/svg",
  256. width: "32",
  257. height: "32"
  258. }, props), /*#__PURE__*/React__default["default"].createElement("path", {
  259. d: "M15.676 0C7.943.007.834 6.45.104 14.16c-.783 6.565 2.912 13.427 8.942 16.216 5.6 2.737 12.789 1.87 17.434-2.344 4.725-4.09 6.79-11.06 4.714-17.006C29.22 4.958 23.394.313 16.978.032A18.532 18.532 0 0015.676 0zm.317 5.006c5.695-.165 10.916 4.858 10.983 10.555.246 5.212-3.67 10.33-8.864 11.204-5.026 1.007-10.6-1.898-12.36-6.777-1.894-4.826.039-10.928 4.649-13.46a11.082 11.082 0 015.592-1.522zm-5.91 5.448l6.041 4.9 6.04-4.9H10.084zm-1.34 1.137v9.92h14.513v-9.718l-7.132 5.786-7.381-5.988z"
  260. })));
  261. function _extends$16() { _extends$16 = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends$16.apply(this, arguments); }
  262. var EndEventMultipleIcon = (({
  263. styles = {},
  264. ...props
  265. }) => /*#__PURE__*/React__default["default"].createElement("svg", _extends$16({
  266. xmlns: "http://www.w3.org/2000/svg",
  267. width: "32",
  268. height: "32"
  269. }, props), /*#__PURE__*/React__default["default"].createElement("path", {
  270. d: "M15.676 0C7.943.007.834 6.45.104 14.16c-.783 6.565 2.912 13.427 8.942 16.216 5.6 2.737 12.789 1.87 17.434-2.344 4.725-4.09 6.79-11.06 4.714-17.006C29.22 4.958 23.394.313 16.978.032A18.529 18.529 0 0015.676 0zm.317 5.006c5.695-.165 10.916 4.858 10.983 10.555.246 5.212-3.67 10.33-8.864 11.204-5.026 1.007-10.6-1.898-12.36-6.777-1.894-4.826.039-10.928 4.649-13.46a11.082 11.082 0 015.592-1.522zm.011 3.039l-7.619 5.53 2.91 8.95h9.418l2.91-8.95-7.619-5.53z"
  271. })));
  272. function _extends$15() { _extends$15 = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends$15.apply(this, arguments); }
  273. var EndEventNoneIcon = (({
  274. styles = {},
  275. ...props
  276. }) => /*#__PURE__*/React__default["default"].createElement("svg", _extends$15({
  277. xmlns: "http://www.w3.org/2000/svg",
  278. width: "32",
  279. height: "32"
  280. }, props), /*#__PURE__*/React__default["default"].createElement("path", {
  281. d: "M15.84.042C8.654-.01 1.913 5.437.4 12.454-1.057 18.62 1.554 25.495 6.784 29.09c5.076 3.636 12.31 3.92 17.59.544 5.309-3.251 8.435-9.744 7.445-15.921C30.91 7.307 25.795 1.738 19.442.422a16.064 16.064 0 00-3.602-.38zm.382 5.01c5.28-.017 10.13 4.353 10.669 9.61.687 5.025-2.552 10.281-7.423 11.792-4.754 1.617-10.486-.447-12.962-4.856-2.74-4.575-1.574-11.094 2.768-14.27a11.05 11.05 0 016.948-2.276z"
  282. })));
  283. function _extends$14() { _extends$14 = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends$14.apply(this, arguments); }
  284. var EndEventSignalIcon = (({
  285. styles = {},
  286. ...props
  287. }) => /*#__PURE__*/React__default["default"].createElement("svg", _extends$14({
  288. xmlns: "http://www.w3.org/2000/svg",
  289. width: "32",
  290. height: "32"
  291. }, props), /*#__PURE__*/React__default["default"].createElement("path", {
  292. d: "M15.676.051C7.943.058.834 6.501.104 14.21c-.783 6.565 2.912 13.427 8.942 16.216 5.6 2.737 12.789 1.87 17.434-2.344 4.725-4.09 6.79-11.06 4.714-17.006C29.22 5.009 23.394.364 16.978.083A18.532 18.532 0 0015.676.05zm.317 5.006c5.695-.165 10.916 4.858 10.983 10.555.246 5.212-3.67 10.33-8.864 11.204-5.026 1.007-10.6-1.898-12.36-6.777-1.894-4.826.039-10.928 4.649-13.46a11.082 11.082 0 015.592-1.522zm.006 3.492c-2.261 4.07-4.532 8.136-6.797 12.204h13.595L15.999 8.55z"
  293. })));
  294. function _extends$13() { _extends$13 = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends$13.apply(this, arguments); }
  295. var EndEventTerminateIcon = (({
  296. styles = {},
  297. ...props
  298. }) => /*#__PURE__*/React__default["default"].createElement("svg", _extends$13({
  299. xmlns: "http://www.w3.org/2000/svg",
  300. width: "32",
  301. height: "32"
  302. }, props), /*#__PURE__*/React__default["default"].createElement("path", {
  303. d: "M15.676.051C7.943.058.834 6.501.104 14.21c-.783 6.565 2.912 13.427 8.942 16.216 5.6 2.737 12.789 1.87 17.434-2.344 4.725-4.09 6.79-11.06 4.714-17.006C29.22 5.009 23.394.364 16.978.083A18.532 18.532 0 0015.676.05zm.317 5.006c5.695-.165 10.916 4.858 10.983 10.555.246 5.212-3.67 10.33-8.864 11.204-5.026 1.007-10.6-1.898-12.36-6.777-1.894-4.826.039-10.928 4.649-13.46a11.082 11.082 0 015.592-1.522zm.006 2.859c-5.264-.2-9.495 5.551-7.755 10.516 1.366 5.085 8.108 7.436 12.339 4.301 4.455-2.807 4.708-9.943.462-13.058A8.128 8.128 0 0016 7.915z"
  304. })));
  305. function _extends$12() { _extends$12 = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends$12.apply(this, arguments); }
  306. var EventSubProcessExpandedIcon = (({
  307. styles = {},
  308. ...props
  309. }) => /*#__PURE__*/React__default["default"].createElement("svg", _extends$12({
  310. xmlns: "http://www.w3.org/2000/svg",
  311. width: "32",
  312. height: "32"
  313. }, props), /*#__PURE__*/React__default["default"].createElement("path", {
  314. d: "M7.295 4.78h1.779V3.003h-1.78V4.78zm3.558 0h1.779V3.003h-1.78V4.78zm3.557 0h1.78V3.003h-1.78V4.78zm3.558 0h1.78V3.003h-1.78V4.78zm3.558 0h1.779V3.003h-1.779V4.78zm3.558 0c.55.014 1.106-.034 1.654.045l.245-1.762c-.629-.096-1.266-.05-1.9-.061V4.78zM5.732 3.004a5.933 5.933 0 00-.915.093c.111.582.226 1.164.315 1.75.358-.101.947.098.746-.483-.096-.382.164-1.208-.146-1.36zm22.372 2.281c.427.234.812.547 1.13.915.42-.4 1.002-.777 1.33-1.18a5.863 5.863 0 00-1.593-1.289l-.867 1.554zm-25.27-1.44c-.587.354-1.11.811-1.539 1.345.47.333.96.86 1.417 1.077.299-.362.66-.673 1.065-.913-.328-.493-.55-1.055-.944-1.509zM30.515 7.26c-.563.046-.557.342-.378.784.154.25-.097.862.25.85.525-.023 1.14.043 1.612-.032a5.891 5.891 0 00-.362-2.027l-1.122.425zM.268 7.114A6.042 6.042 0 000 9.052h1.78c-.013-.5.047-1.003.208-1.478L.296 7.027l-.026.079-.002.008zM30.22 12.45H32v-1.779h-1.779v1.779zm-30.22.16h1.78v-1.779H0v1.78zm30.22 3.398H32v-1.78h-1.779v1.78zm-30.22.16h1.78v-1.779H0v1.779zm30.22 3.398H32v-1.78h-1.779v1.78zm-30.22.16h1.78v-1.78H0v1.78zm30.22 3.397H32v-1.779h-1.779v1.78zm-30.22.16h1.78v-1.778H0v1.778zm30.137 1.47a4.059 4.059 0 01-.522 1.32c.506.283 1.046.715 1.53.908a5.836 5.836 0 00.744-1.918c-.576-.094-1.209-.264-1.752-.31zm-29.984.51c.157.676.435 1.325.82 1.904l1.486-.977a4.065 4.065 0 01-.577-1.347l-1.73.42zm28.427 1.943c-.371.277-.79.49-1.234.627l.548 1.693a5.84 5.84 0 001.835-.96l-1.082-1.412-.066.05-.001.002zm-26.164 1.47c.567.413 1.21.722 1.886.907.14-.569.343-1.175.444-1.722a4.062 4.062 0 01-1.283-.624l-1.047 1.438zm3.88 1.119h1.779v-1.78h-1.78v1.78zm3.55 0h1.787v-1.78H9.846v1.78zm3.565 0h1.78v-1.78h-1.78v1.78zm3.558 0h1.78v-1.78h-1.78v1.78zm3.451 0h1.743v-1.78h-1.743v1.78zm3.665 0h1.779v-1.78h-1.78v1.78zm-1.922-.545V16.776H9.846V29.25h12.318zM10.967 17.905h10.068V27.97H10.967V17.905zm1.336 3.998v1.711h7.396v-1.711h-7.396z",
  315. opacity: ".97"
  316. })));
  317. function _extends$11() { _extends$11 = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends$11.apply(this, arguments); }
  318. var GatewayComplexIcon = (({
  319. styles = {},
  320. ...props
  321. }) => /*#__PURE__*/React__default["default"].createElement("svg", _extends$11({
  322. xmlns: "http://www.w3.org/2000/svg",
  323. width: "32",
  324. height: "32"
  325. }, props), /*#__PURE__*/React__default["default"].createElement("path", {
  326. d: "M16.001 0a1.29 1.29 0 00-.917.373L.373 15.084a1.316 1.316 0 00.002 1.834l14.71 14.709a1.313 1.313 0 001.833 0l14.711-14.711a1.316 1.316 0 00-.002-1.834L16.917.372A1.294 1.294 0 0016.002 0zM16 2.181l13.821 13.821L16 29.823 2.179 16.003 16 2.18zm-.327 6.79v.007l-.145.027-.118.08-.083.123-.028.145v4.954L11.793 10.8l-.125-.08-.14-.029-.144.027-.122.082-.46.46-.085.125-.026.142.028.14.08.125 3.505 3.505H9.347l-.001-.002-.145.032-.118.08-.083.122-.028.146v.652l.029.147.082.119.12.08.144.032h4.956L10.8 20.207v-.001l-.084.124-.026.142.028.14.08.124.46.461.126.082.14.029.143-.027.124-.084L15.3 17.69v4.964-.001l.028.147.082.12.12.08.144.031h.652l.148-.03.118-.08.083-.12.028-.146v-4.962l3.505 3.505.126.082.14.027.142-.027.124-.084.461-.46.083-.123s.028-.144.027-.146l-.028-.14-.082-.126-3.496-3.496h4.948l.148-.03.119-.08.082-.12.028-.147v-.652l-.028-.145-.083-.122-.119-.08s-.147-.033-.147-.031h-4.964l3.512-3.512.082-.122.029-.144-.028-.14-.084-.124-.46-.461-.123-.082-.14-.027-.145.027-.122.082-3.507 3.507V9.348l-.028-.146-.082-.122-.12-.08-.147-.029h-.652z"
  327. })));
  328. function _extends$10() { _extends$10 = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends$10.apply(this, arguments); }
  329. var GatewayEventBasedIcon = (({
  330. styles = {},
  331. ...props
  332. }) => /*#__PURE__*/React__default["default"].createElement("svg", _extends$10({
  333. xmlns: "http://www.w3.org/2000/svg",
  334. width: "32",
  335. height: "32"
  336. }, props), /*#__PURE__*/React__default["default"].createElement("path", {
  337. d: "M16 0a1.29 1.29 0 00-.918.373L.371 15.084a1.316 1.316 0 00.002 1.834l14.71 14.709a1.313 1.313 0 001.833 0l14.711-14.711a1.316 1.316 0 00-.002-1.834L16.915.372A1.294 1.294 0 0016 0zm-.002 2.181l13.821 13.821-13.821 13.821-13.821-13.82L15.998 2.18zm0 5.876l-.254.185-7.377 5.355 2.915 8.964h9.433l2.915-8.964-7.631-5.54zm0 1.07l6.614 4.8-2.526 7.769h-8.175l-2.526-7.768 6.614-4.802z"
  338. })));
  339. function _extends$$() { _extends$$ = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends$$.apply(this, arguments); }
  340. var GatewayNoneIcon = (({
  341. styles = {},
  342. ...props
  343. }) => /*#__PURE__*/React__default["default"].createElement("svg", _extends$$({
  344. xmlns: "http://www.w3.org/2000/svg",
  345. width: "32",
  346. height: "32"
  347. }, props), /*#__PURE__*/React__default["default"].createElement("path", {
  348. d: "M.373 15.084a1.316 1.316 0 00.002 1.834l14.71 14.709a1.313 1.313 0 001.833 0l14.711-14.711a1.316 1.316 0 00-.002-1.834L16.917.373a1.313 1.313 0 00-1.833 0L.373 15.084zm1.806.918L16 2.182l13.821 13.82L16 29.823 2.179 16.003z"
  349. })));
  350. function _extends$_() { _extends$_ = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends$_.apply(this, arguments); }
  351. var GatewayOrIcon = (({
  352. styles = {},
  353. ...props
  354. }) => /*#__PURE__*/React__default["default"].createElement("svg", _extends$_({
  355. xmlns: "http://www.w3.org/2000/svg",
  356. width: "32",
  357. height: "32"
  358. }, props), /*#__PURE__*/React__default["default"].createElement("path", {
  359. d: "M16.001 0a1.29 1.29 0 00-.917.373L.373 15.084a1.316 1.316 0 00.002 1.834l14.71 14.709a1.313 1.313 0 001.833 0l14.711-14.711a1.316 1.316 0 00-.002-1.834L16.917.372A1.294 1.294 0 0016.002 0zM16 2.181l13.821 13.821L16 29.823 2.179 16.003 16 2.18zm0 6.379a7.447 7.447 0 00-7.44 7.441A7.447 7.447 0 0016 23.443 7.447 7.447 0 0023.443 16a7.447 7.447 0 00-7.441-7.441zm0 .825a6.61 6.61 0 016.617 6.616A6.61 6.61 0 0116 22.618 6.61 6.61 0 019.385 16 6.61 6.61 0 0116 9.385z"
  360. })));
  361. function _extends$Z() { _extends$Z = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends$Z.apply(this, arguments); }
  362. var GatewayParallelIcon = (({
  363. styles = {},
  364. ...props
  365. }) => /*#__PURE__*/React__default["default"].createElement("svg", _extends$Z({
  366. xmlns: "http://www.w3.org/2000/svg",
  367. width: "32",
  368. height: "32"
  369. }, props), /*#__PURE__*/React__default["default"].createElement("path", {
  370. d: "M16.001 0a1.29 1.29 0 00-.917.373L.373 15.084a1.316 1.316 0 00.002 1.834l14.71 14.709a1.313 1.313 0 001.833 0l14.711-14.711a1.316 1.316 0 00-.002-1.834L16.917.372A1.294 1.294 0 0016.002 0zM16 2.181l13.821 13.821L16 29.823 2.179 16.003 16 2.18zm-.377 5.708l-.168.032-.136.092-.096.14-.032.168v6.868h-6.87l-.002-.002-.166.037-.137.092v-.002l-.095.141-.033.167v.753s.032.169.034.17l.094.138.138.092.167.036h6.87v6.867l-.001-.001.033.17.095.138.138.092s.166.035.167.037h.752l.17-.036.137-.092.095-.137.033-.17v-6.867h6.868l.17-.035.137-.092.095-.137.033-.17v-.753s-.033-.165-.032-.167l-.096-.14-.138-.093s-.17-.037-.17-.035H16.81V8.323l-.033-.168-.094-.14-.138-.092-.17-.034h-.752z"
  371. })));
  372. function _extends$Y() { _extends$Y = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends$Y.apply(this, arguments); }
  373. var GatewayXorIcon = (({
  374. styles = {},
  375. ...props
  376. }) => /*#__PURE__*/React__default["default"].createElement("svg", _extends$Y({
  377. xmlns: "http://www.w3.org/2000/svg",
  378. width: "32",
  379. height: "32"
  380. }, props), /*#__PURE__*/React__default["default"].createElement("path", {
  381. d: "M16 0a1.29 1.29 0 00-.918.373L.371 15.084a1.316 1.316 0 00.002 1.834l14.71 14.709a1.313 1.313 0 001.833 0l14.711-14.711a1.316 1.316 0 00-.002-1.834L16.915.372A1.294 1.294 0 0016 0zm-.002 2.181l13.821 13.821-13.821 13.821-13.821-13.82L15.998 2.18zm-5.162 7.69l-.166.032-.141.096-.532.532s-.097.142-.097.144l-.03.164.032.162.093.144 4.857 4.858-4.855 4.855v-.001L9.9 21l-.03.164.032.162s.093.142.093.144l.531.532.146.095.162.032.164-.03.144-.097 4.855-4.856 4.857 4.857.145.095.162.032.164-.03.144-.097.531-.532.095-.14.033-.168-.033-.162-.095-.146L17.144 16 22 11.144l.095-.14.033-.166-.033-.163-.097-.144-.532-.532-.14-.095-.163-.032-.166.032-.141.095L16 14.855l-4.858-4.858v-.002l-.144-.092-.162-.032z"
  382. })));
  383. function _extends$X() { _extends$X = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends$X.apply(this, arguments); }
  384. var GroupIcon = (({
  385. styles = {},
  386. ...props
  387. }) => /*#__PURE__*/React__default["default"].createElement("svg", _extends$X({
  388. xmlns: "http://www.w3.org/2000/svg",
  389. width: "32",
  390. height: "32"
  391. }, props), /*#__PURE__*/React__default["default"].createElement("path", {
  392. d: "M6.34.016c-2.333.025-4.684 1.77-5.29 4.17C.608 5.848.88 7.608.804 9.314v2.922h2.041c.038-2.332-.076-4.673.062-7C3.14 3.355 4.869 1.938 6.643 2.04h8.956V.009c-3.086 0-6.173-.02-9.258 0v.007zm13.094 2.023h1.92V.009h-1.92v2.03zm5.756 0c1.265-.069 2.66.045 3.602 1.055 1.036.983 1.201 2.523 1.122 3.91v6.313h2.078c-.03-2.677.062-5.36-.047-8.032-.17-2.743-2.62-5.111-5.215-5.236-.511-.064-1.027-.02-1.54-.033v2.023zM.803 18.319h2.041v-2.026H.804v2.026zm29.11 1.084h2.08v-2.03h-2.08v2.03zM.804 26.148c.004 2.218 1.393 4.366 3.313 5.28 1.728.853 3.681.448 5.521.544.43-.112 1.29.231 1.435-.183v-1.847c-1.788-.043-3.584.094-5.365-.082-1.67-.354-2.919-2.048-2.863-3.844v-3.644H.804v3.777zm29.11-.068c.04 1.961-1.508 3.787-3.381 3.842-1.954.06-3.914.02-5.87.026v2.03c2.118-.042 4.242.08 6.355-.063 2.524-.264 4.818-2.644 4.94-5.323.08-1.039.014-2.085.035-3.126h-2.078v2.613zm-15.006 5.898h1.92v-2.03h-1.92v2.03z"
  393. })));
  394. function _extends$W() { _extends$W = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends$W.apply(this, arguments); }
  395. var IntermediateEventCatchCancelIcon = (({
  396. styles = {},
  397. ...props
  398. }) => /*#__PURE__*/React__default["default"].createElement("svg", _extends$W({
  399. xmlns: "http://www.w3.org/2000/svg",
  400. width: "32",
  401. height: "32"
  402. }, props), /*#__PURE__*/React__default["default"].createElement("path", {
  403. d: "M15.975.049C8.195-.111.935 6.286.125 14.03c-.855 6.55 2.741 13.46 8.74 16.314 5.666 2.847 13.012 1.99 17.71-2.33 4.745-4.162 6.727-11.243 4.532-17.206C29.09 4.93 23.445.454 17.201.095c-.408-.03-.817-.046-1.226-.046zm-.181 1.724c7.134-.269 13.84 5.68 14.399 12.804.686 6.283-3.267 12.792-9.283 14.862-5.847 2.162-13.025.06-16.557-5.141C.728 19.22.872 11.725 4.985 6.962c2.632-3.171 6.671-5.174 10.809-5.19zm.283 1.553c-6.6-.21-12.671 5.585-12.79 12.185-.292 5.964 4.129 11.817 10.034 12.953 5.47 1.198 11.584-1.613 14.025-6.702 2.525-4.97 1.396-11.585-2.912-15.215-2.282-2.022-5.3-3.217-8.357-3.22zM16 5.021c5.818-.154 11.117 5.082 11.024 10.905.103 5.384-4.23 10.5-9.636 11.043-5.075.667-10.426-2.587-11.885-7.552-1.53-4.73.48-10.428 4.888-12.864A11.082 11.082 0 0116 5.021zm-3.956 3.946l-3.096 3.097 3.985 3.985-3.913 3.913 3.047 3.048 3.913-3.913 3.988 3.987 3.097-3.096L19.076 16l3.914-3.913-3.048-3.048-3.913 3.913-3.986-3.985zm-.002 1.222l3.988 3.987 3.913-3.913 1.826 1.826-3.913 3.913 3.985 3.986-1.873 1.873-3.985-3.985-3.913 3.913-1.827-1.827 3.914-3.913-3.988-3.987 1.873-1.873z"
  404. })));
  405. function _extends$V() { _extends$V = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends$V.apply(this, arguments); }
  406. var IntermediateEventCatchCompensationIcon = (({
  407. styles = {},
  408. ...props
  409. }) => /*#__PURE__*/React__default["default"].createElement("svg", _extends$V({
  410. xmlns: "http://www.w3.org/2000/svg",
  411. width: "32",
  412. height: "32"
  413. }, props), /*#__PURE__*/React__default["default"].createElement("path", {
  414. d: "M15.975.049C8.195-.11.935 6.286.125 14.03c-.855 6.55 2.741 13.46 8.74 16.314 5.666 2.847 13.012 1.99 17.71-2.33 4.745-4.162 6.727-11.243 4.532-17.206C29.09 4.93 23.445.453 17.201.095c-.408-.03-.817-.046-1.226-.046zm-.181 1.724c7.134-.269 13.84 5.68 14.399 12.804.686 6.283-3.267 12.792-9.283 14.862-5.847 2.162-13.025.06-16.557-5.141C.728 19.22.872 11.725 4.985 6.962c2.632-3.171 6.671-5.174 10.809-5.19zm.283 1.553c-6.6-.21-12.671 5.585-12.79 12.185-.292 5.964 4.129 11.817 10.034 12.953 5.47 1.198 11.584-1.613 14.025-6.702 2.525-4.97 1.396-11.585-2.912-15.216-2.282-2.021-5.3-3.216-8.357-3.22zM16 5.021c5.818-.154 11.117 5.082 11.024 10.905.103 5.384-4.23 10.5-9.636 11.043-5.075.667-10.426-2.587-11.885-7.552-1.53-4.73.48-10.428 4.888-12.864A11.083 11.083 0 0116 5.021zm-.56 5.772l-7.408 5.231 7.409 5.234v-5.057c2.385 1.687 4.771 3.371 7.157 5.057V10.793l-7.157 5.055v-5.055zm-.865 1.665v7.125l-5.048-3.562 5.048-3.563zm7.161 0v7.132l-5.048-3.566 5.048-3.566z"
  415. })));
  416. function _extends$U() { _extends$U = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends$U.apply(this, arguments); }
  417. var IntermediateEventCatchConditionIcon = (({
  418. styles = {},
  419. ...props
  420. }) => /*#__PURE__*/React__default["default"].createElement("svg", _extends$U({
  421. xmlns: "http://www.w3.org/2000/svg",
  422. width: "32",
  423. height: "32"
  424. }, props), /*#__PURE__*/React__default["default"].createElement("path", {
  425. d: "M15.97.04h-.127C8.713-.018 2.003 5.334.437 12.286c-1.51 6.123.98 13.005 6.136 16.665 5.125 3.788 12.546 4.105 17.912.623 5.272-3.276 8.33-9.766 7.325-15.916-.904-6.241-5.79-11.7-11.95-13.143A16.082 16.082 0 0015.97.04zm-.181 1.724c.115 0 .23 0 .347.003 6.625-.066 12.823 5.149 13.89 11.69 1.13 5.91-1.908 12.349-7.262 15.138-5.473 3.013-12.866 1.884-17.116-2.726C1.291 21.372.444 13.914 3.802 8.602c2.493-4.112 7.169-6.819 11.987-6.838zm.283 1.554c-.117 0-.234.002-.351.005-6.1 0-11.691 5.049-12.346 11.114-.78 5.684 2.795 11.612 8.218 13.52 5.139 1.943 11.416.101 14.624-4.38 3.461-4.583 3.262-11.538-.596-15.831-2.36-2.747-5.924-4.423-9.549-4.428zm-.078 1.695c.078 0 .156 0 .234.003 5.4 0 10.321 4.556 10.734 9.942.563 5.13-2.958 10.364-7.971 11.678-4.832 1.41-10.457-.935-12.746-5.446-2.463-4.559-1.2-10.795 3.014-13.883a11.072 11.072 0 016.735-2.294zm-5.352 4.266V22.761h10.716V9.279H10.642zm.863.866h8.987v11.75h-8.987v-11.75zm.927 1.323v.862h7.133v-.862h-7.133zm0 2.602v.866h7.133v-.866h-7.133zm0 3.008v.862h7.133v-.862h-7.133zm0 2.717v.863h7.133v-.863h-7.133z"
  426. })));
  427. function _extends$T() { _extends$T = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends$T.apply(this, arguments); }
  428. var IntermediateEventCatchErrorIcon = (({
  429. styles = {},
  430. ...props
  431. }) => /*#__PURE__*/React__default["default"].createElement("svg", _extends$T({
  432. xmlns: "http://www.w3.org/2000/svg",
  433. width: "32",
  434. height: "32"
  435. }, props), /*#__PURE__*/React__default["default"].createElement("path", {
  436. d: "M15.975.049C8.195-.11.935 6.286.125 14.03c-.855 6.55 2.741 13.46 8.74 16.314 5.666 2.847 13.012 1.99 17.71-2.33 4.745-4.162 6.727-11.243 4.532-17.206C29.09 4.93 23.445.453 17.201.095c-.408-.03-.817-.046-1.226-.046zm-.181 1.724c7.134-.269 13.84 5.68 14.399 12.804.686 6.283-3.267 12.792-9.283 14.862-5.847 2.162-13.025.06-16.557-5.141C.728 19.22.872 11.725 4.985 6.962c2.632-3.171 6.671-5.174 10.809-5.19zm.283 1.553c-6.6-.21-12.671 5.585-12.79 12.185-.292 5.964 4.129 11.817 10.034 12.953 5.47 1.198 11.584-1.613 14.025-6.702 2.525-4.97 1.396-11.585-2.912-15.216-2.282-2.021-5.3-3.216-8.357-3.22zM16 5.021c5.818-.154 11.117 5.082 11.024 10.905.103 5.384-4.23 10.5-9.636 11.043-5.075.667-10.426-2.587-11.885-7.552-1.53-4.73.48-10.428 4.888-12.864A11.083 11.083 0 0116 5.021zm6.132 4.194c-1.21 2.455-2.422 4.91-3.633 7.364l-4.516-5.875-4.103 12.133 4.6-5.912c1.58 1.81 3.162 3.619 4.744 5.429L22.13 9.215zM14.383 13.1l4.295 5.445 1.073-2.387-1.027 4.131-4.384-5.157-1.778 2.75 1.821-4.782z"
  437. })));
  438. function _extends$S() { _extends$S = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends$S.apply(this, arguments); }
  439. var IntermediateEventCatchEscalationIcon = (({
  440. styles = {},
  441. ...props
  442. }) => /*#__PURE__*/React__default["default"].createElement("svg", _extends$S({
  443. xmlns: "http://www.w3.org/2000/svg",
  444. width: "32",
  445. height: "32"
  446. }, props), /*#__PURE__*/React__default["default"].createElement("path", {
  447. d: "M15.975.049C8.195-.11.935 6.286.125 14.03c-.855 6.55 2.741 13.46 8.74 16.314 5.666 2.847 13.012 1.99 17.71-2.33 4.745-4.162 6.727-11.243 4.532-17.206C29.09 4.93 23.445.453 17.201.095c-.408-.03-.817-.046-1.226-.046zm-.181 1.724c7.134-.269 13.84 5.68 14.399 12.804.686 6.283-3.267 12.792-9.283 14.862-5.847 2.162-13.025.06-16.557-5.141C.728 19.22.872 11.725 4.985 6.962c2.632-3.171 6.671-5.174 10.809-5.19zm.283 1.553c-6.6-.21-12.671 5.585-12.79 12.185-.292 5.964 4.129 11.817 10.034 12.953 5.47 1.198 11.584-1.613 14.025-6.702 2.525-4.97 1.396-11.585-2.912-15.216-2.282-2.021-5.3-3.216-8.357-3.22zM16 5.021c5.818-.154 11.117 5.082 11.024 10.905.103 5.384-4.23 10.5-9.636 11.043-5.075.667-10.426-2.587-11.885-7.552-1.53-4.73.48-10.428 4.888-12.864A11.083 11.083 0 0116 5.021zm.006 3.927c-1.672 4.654-2.734 9.502-4.406 14.155 1.534-1.525 2.872-3.234 4.406-4.759l4.406 4.76c-1.496-4.71-2.91-9.446-4.406-14.156zm.032 2.929c.822 2.586 1.598 5.186 2.42 7.771l-2.42-2.612c-.682.597-2.452 2.884-2.338 2.388.87-2.487 1.447-5.067 2.338-7.547z"
  448. })));
  449. function _extends$R() { _extends$R = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends$R.apply(this, arguments); }
  450. var IntermediateEventCatchLinkIcon = (({
  451. styles = {},
  452. ...props
  453. }) => /*#__PURE__*/React__default["default"].createElement("svg", _extends$R({
  454. xmlns: "http://www.w3.org/2000/svg",
  455. width: "32",
  456. height: "32"
  457. }, props), /*#__PURE__*/React__default["default"].createElement("path", {
  458. d: "M15.975.049C8.195-.11.935 6.286.125 14.03c-.855 6.55 2.741 13.46 8.74 16.314 5.666 2.847 13.012 1.99 17.71-2.33 4.745-4.162 6.727-11.243 4.532-17.206C29.09 4.93 23.445.453 17.201.095c-.408-.03-.817-.046-1.226-.046zm-.181 1.724c7.134-.269 13.84 5.68 14.399 12.804.686 6.283-3.267 12.792-9.283 14.862-5.847 2.162-13.025.06-16.557-5.141C.728 19.22.872 11.725 4.985 6.962c2.632-3.171 6.671-5.174 10.809-5.19zm.283 1.553c-6.6-.21-12.671 5.585-12.79 12.185-.292 5.964 4.129 11.817 10.034 12.953 5.47 1.198 11.584-1.613 14.025-6.702 2.525-4.97 1.396-11.585-2.912-15.216-2.282-2.021-5.3-3.216-8.357-3.22zM16 5.021c5.818-.154 11.117 5.082 11.024 10.905.103 5.384-4.23 10.5-9.636 11.043-5.075.667-10.426-2.587-11.885-7.552-1.53-4.73.48-10.428 4.888-12.864A11.083 11.083 0 0116 5.021zm1.78 4.093v3.555H9.785v6.714h7.994v3.554l5.829-6.911-5.83-6.912zm.974 2.584l3.61 4.295-3.61 4.294v-1.933h-7.88v-4.688h7.88v-1.968z"
  459. })));
  460. function _extends$Q() { _extends$Q = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends$Q.apply(this, arguments); }
  461. var IntermediateEventCatchMessageIcon = (({
  462. styles = {},
  463. ...props
  464. }) => /*#__PURE__*/React__default["default"].createElement("svg", _extends$Q({
  465. xmlns: "http://www.w3.org/2000/svg",
  466. width: "32",
  467. height: "32"
  468. }, props), /*#__PURE__*/React__default["default"].createElement("path", {
  469. d: "M15.975.049C8.195-.11.935 6.286.125 14.03c-.855 6.55 2.741 13.46 8.74 16.314 5.666 2.847 13.012 1.99 17.71-2.33 4.745-4.162 6.727-11.243 4.532-17.206C29.09 4.93 23.445.453 17.201.095c-.408-.03-.817-.046-1.226-.046zm-.181 1.724c7.134-.269 13.84 5.68 14.399 12.804.686 6.283-3.267 12.792-9.283 14.862-5.847 2.162-13.025.06-16.557-5.141C.728 19.22.872 11.725 4.985 6.962c2.632-3.171 6.671-5.174 10.809-5.19zm.283 1.553c-6.6-.21-12.671 5.585-12.79 12.185-.292 5.964 4.129 11.817 10.034 12.953 5.47 1.198 11.584-1.613 14.025-6.702 2.525-4.97 1.396-11.585-2.912-15.216-2.282-2.021-5.3-3.216-8.357-3.22zM16 5.021c5.818-.154 11.117 5.082 11.024 10.905.103 5.384-4.23 10.5-9.636 11.043-5.075.667-10.426-2.587-11.885-7.552-1.53-4.73.48-10.428 4.888-12.864A11.083 11.083 0 0116 5.021zm-7.245 5.475v11.06h14.502v-11.06H8.754zm3.222 1.728h8.057c-1.427.878-2.854 2.806-4.281 3.016l-3.776-3.016zm9.554 1.017v6.587H10.48V13.24l5.524 4.414 5.526-4.414z"
  470. })));
  471. function _extends$P() { _extends$P = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends$P.apply(this, arguments); }
  472. var IntermediateEventCatchMultipleIcon = (({
  473. styles = {},
  474. ...props
  475. }) => /*#__PURE__*/React__default["default"].createElement("svg", _extends$P({
  476. xmlns: "http://www.w3.org/2000/svg",
  477. width: "32",
  478. height: "32"
  479. }, props), /*#__PURE__*/React__default["default"].createElement("path", {
  480. d: "M15.975.003C8.195-.156.935 6.24.125 13.985c-.855 6.55 2.741 13.46 8.74 16.314 5.666 2.847 13.012 1.99 17.71-2.33 4.745-4.162 6.727-11.243 4.532-17.206C29.09 4.884 23.445.407 17.201.049c-.408-.03-.817-.046-1.226-.046zm-.181 1.724c7.134-.269 13.84 5.68 14.399 12.804.686 6.283-3.267 12.792-9.283 14.862-5.847 2.162-13.025.06-16.557-5.141C.728 19.174.872 11.679 4.985 6.916c2.632-3.171 6.671-5.174 10.809-5.19zm.283 1.553c-6.6-.21-12.671 5.585-12.79 12.185-.292 5.964 4.129 11.817 10.034 12.953 5.47 1.198 11.584-1.613 14.025-6.702 2.525-4.97 1.396-11.585-2.912-15.216-2.282-2.021-5.3-3.216-8.357-3.22zM16 4.975c5.818-.154 11.117 5.082 11.024 10.905.103 5.384-4.23 10.5-9.636 11.043-5.075.667-10.426-2.587-11.885-7.552-1.53-4.73.48-10.428 4.888-12.864A11.083 11.083 0 0116 4.975zm.006 3.073l-7.62 5.531 2.91 8.95h9.42l2.91-8.95-7.62-5.53zm0 1.067l6.604 4.794-2.523 7.757h-8.162l-2.522-7.757 6.603-4.794z"
  481. })));
  482. function _extends$O() { _extends$O = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends$O.apply(this, arguments); }
  483. var IntermediateEventCatchNonInterruptingConditionIcon = (({
  484. styles = {},
  485. ...props
  486. }) => /*#__PURE__*/React__default["default"].createElement("svg", _extends$O({
  487. xmlns: "http://www.w3.org/2000/svg",
  488. width: "32",
  489. height: "32"
  490. }, props), /*#__PURE__*/React__default["default"].createElement("path", {
  491. d: "M10.638 9.563V23.056h10.724V9.563H10.638zm.863.866h8.995v11.76H11.5V10.43zm.928 1.324v.862h7.139v-.862h-7.14zm0 2.605v.866h7.139v-.866h-7.14zm0 3.01v.863h7.139v-.863h-7.14zm0 2.72v.863h7.139v-.864h-7.14zM15.999.308h-.004l-.188.001h-.011l-.188.004h-.011L15.41.32h-.011l-.187.008h-.005L15.2.33l-.187.01h-.005l-.005.001-.187.013h-.011L14.62.37h-.01l-.186.018h-.011l-.185.02-.005.001h-.006l-.185.022-.005.001h-.005l-.185.025h-.005l-.005.001-.185.027h-.005l-.005.001-.184.029h-.005l-.005.001-.183.031-.006.001-.005.001-.182.033-.006.001-.005.001-.182.035-.005.001-.005.001-.182.038h-.005l-.005.002-.181.04h-.005l-.005.002-.18.042-.006.001-.005.001-.18.044-.005.002h-.005l-.17.045-.152.054-.139.082-.121.106-.1.127-.074.143-.046.155-.017.16.013.16.043.156.07.145.097.13.119.108.137.085.15.058.159.03.16-.001.133-.023.165-.043.168-.041.171-.04.171-.037.172-.036.17-.033.173-.03.17-.03.177-.027.171-.025.175-.022.175-.02.175-.02.176-.016.175-.014.177-.012.176-.01.177-.007.174-.006.177-.003.178-.001h.177l.178.004.174.006.177.007.176.01.177.012.175.014.176.017.175.018.175.02.175.023.171.025.176.027.17.03.174.03.17.033.171.036.154.033.16.02.161-.01.156-.04.146-.069.131-.094.111-.117.087-.135.061-.15.032-.158.002-.16-.027-.16-.057-.15L20 1.023l-.108-.12-.128-.097-.145-.073-.128-.038-.158-.035-.005-.001-.005-.001L19.14.62h-.005l-.005-.002-.182-.035h-.006L18.938.58l-.182-.033h-.006l-.005-.002-.183-.03-.005-.001-.006-.001-.183-.029h-.005l-.006-.001-.184-.027h-.005l-.005-.001-.185-.024h-.005L17.968.43 17.783.41l-.006-.001h-.005l-.185-.02h-.006l-.005-.001L17.39.37h-.005L17.38.368l-.187-.015h-.005l-.005-.001-.187-.013h-.011L16.8.328h-.011L16.6.32h-.011l-.187-.006h-.011L16.204.31h-.011L16.005.31H16zm9.016 2.935l-.16.004-.158.033-.15.062-.134.09-.116.111-.093.132-.067.147-.038.156-.01.161.022.16.05.153.078.141.103.124.102.087.045.034.142.106.137.105.14.11.136.11.135.112.134.115.134.117.13.115.132.122.128.12.127.122.126.125.124.126.124.128.121.13.118.128.118.132.117.133.113.134.113.136.11.136.109.137.109.142.104.14.103.14.101.142.1.144.099.146.095.145.094.147.093.15.092.15.087.149.087.15.084.152.084.155.08.152.08.155.04.081.084.138.11.119.128.096.145.072.155.043.16.013.16-.016.155-.046.144-.074.127-.099.106-.12.083-.14.055-.151.026-.16-.004-.16-.034-.158-.05-.124-.042-.085-.002-.004-.003-.005-.084-.165-.002-.004-.003-.005-.086-.164-.002-.004-.003-.005-.088-.162-.002-.005-.003-.005-.09-.161-.002-.005-.003-.004-.092-.16-.003-.005-.002-.005-.094-.16-.003-.004-.003-.004-.096-.159-.002-.004-.003-.005-.098-.157-.003-.004-.003-.005-.1-.156-.003-.004-.003-.005-.101-.154-.003-.005-.003-.004-.104-.154-.003-.004-.003-.005-.106-.152-.003-.005-.003-.004-.108-.151-.003-.004-.003-.005-.11-.15-.003-.004-.003-.004-.111-.15-.004-.003-.003-.005-.113-.147-.004-.004-.003-.005-.115-.146-.004-.004-.003-.004-.117-.145-.004-.004-.003-.004-.12-.144-.003-.004-.003-.004-.121-.142-.004-.004-.003-.004-.123-.141-.003-.004-.004-.004-.125-.14-.003-.004-.004-.004-.127-.138-.003-.004-.004-.004-.128-.136-.004-.004-.004-.004-.13-.135-.004-.004-.004-.004-.132-.134-.003-.004-.004-.003-.134-.133-.004-.003-.004-.004-.135-.13-.004-.004-.004-.004-.136-.128-.004-.004-.004-.004-.138-.126-.004-.004-.004-.003-.14-.125-.004-.004-.004-.003-.14-.123-.005-.004-.004-.003-.142-.121-.004-.004-.004-.003-.144-.12-.004-.003-.004-.003-.145-.117-.004-.004-.004-.003-.147-.115-.004-.004-.004-.003-.148-.113-.004-.003-.004-.004-.149-.111-.004-.003-.004-.004-.05-.036-.14-.083-.15-.055-.16-.027zm-18.381.344l-.161.008-.157.037-.147.066-.111.074-.04.032-.005.003-.004.004-.145.117-.004.003-.004.004-.144.119-.004.003-.004.004-.142.12-.004.004-.004.004-.141.123-.004.003-.004.004-.14.125-.004.003-.004.004-.138.126-.004.004-.004.004-.136.128-.004.004-.004.004-.135.13-.004.004-.004.003-.134.133-.004.003L4.682 5l-.132.134-.003.004-.004.004-.13.135-.004.004-.004.004-.128.136-.004.004-.004.004-.126.138-.004.004-.003.004-.125.14-.004.004-.003.004-.123.14-.004.005-.003.004-.121.142-.004.004-.003.004-.12.144-.003.004-.003.004-.117.145-.004.004-.003.004-.115.146-.004.005-.003.004-.113.147-.003.005-.004.004-.111.149-.003.004-.004.004-.11.15-.002.005-.003.004-.108.151-.003.004-.003.005-.106.152-.003.005-.003.004-.104.154-.003.004-.003.005-.102.154-.003.005-.002.004-.1.156-.003.005-.003.004-.098.157-.003.005-.003.004-.096.159-.002.004-.003.005-.094.16-.003.004-.002.004-.092.16-.003.005-.003.005-.09.161-.002.005-.003.005-.088.162-.002.005-.003.004-.086.164-.002.005-.002.004-.084.165-.003.005-.002.004-.082.166-.002.004-.003.005-.08.167-.002.004-.002.005-.078.168-.002.004-.002.005-.045.1-.053.153-.023.16.007.16.037.157.065.148.092.132.114.114.134.09.148.064.157.035.161.006.16-.025.152-.054.14-.08.121-.106.1-.126.065-.118.043-.095.074-.16.075-.155.077-.157.08-.155.08-.152.083-.155.085-.152.086-.15.088-.149.091-.15.094-.15.094-.147.095-.145.099-.146.1-.144.1-.142.104-.14.104-.14.11-.142.107-.137.11-.136.114-.136.113-.134.117-.133.118-.132.117-.129.122-.13.124-.127.123-.126.127-.125.127-.122.128-.12.132-.122.13-.115.133-.117.135-.115.135-.111.136-.11.037-.03.117-.11.094-.132.068-.146.04-.156.01-.161-.02-.16-.05-.154-.076-.141-.102-.125-.123-.104-.14-.08-.153-.051-.16-.023zM16 3.595h-.005l-.148.001h-.01l-.147.003h-.011l-.147.005h-.011l-.146.007h-.011l-.146.009h-.011l-.146.01h-.005l-.005.001-.146.012h-.011l-.145.014h-.006l-.005.001-.05.006-.158.031-.15.06-.135.088-.117.111-.094.13-.069.147-.04.156-.01.16.019.16.049.154.076.142.102.125.123.105.14.08.152.051.16.023.134-.003.045-.005.135-.013.133-.01.136-.01.135-.007.137-.006.136-.004.136-.003h.274l.136.003.136.004.136.006.136.007.136.01.133.01.135.013.135.014.135.016.134.018.132.018.134.021.133.023.133.024.133.025.13.027.132.03.132.03.129.031.13.034.129.035.129.036.13.04.126.038.128.042.126.042.128.045.127.047.126.047.12.048.127.051.123.052.006.002.147.048.16.021.16-.009.157-.038.147-.067.131-.093.112-.116.089-.135.062-.149.033-.158.004-.16-.027-.16-.055-.151-.083-.139-.107-.12-.127-.099-.118-.063-.004-.001-.005-.003-.005-.002-.133-.056-.005-.002-.005-.002-.134-.054-.004-.002-.005-.002-.135-.053-.005-.002-.005-.002-.135-.051-.005-.002-.005-.002-.135-.05-.005-.001-.005-.002-.137-.048-.005-.001-.005-.002-.137-.046-.005-.002-.005-.002-.137-.044-.005-.002-.005-.001-.138-.043-.006-.002-.005-.001-.138-.042-.005-.001-.005-.002-.14-.04H19.4l-.005-.002-.14-.038-.005-.001-.005-.002-.14-.036-.005-.001-.005-.001-.141-.035-.005-.001-.005-.001-.142-.033-.005-.001-.005-.001-.142-.031-.005-.002h-.005l-.142-.03-.005-.001-.005-.001-.143-.028h-.005l-.005-.002-.143-.025-.006-.001-.005-.001-.143-.024-.005-.001-.006-.001-.143-.022-.006-.001h-.005l-.144-.022h-.005l-.006-.001-.144-.019h-.005l-.006-.001-.144-.017h-.006l-.005-.001-.145-.016h-.011l-.145-.014H17.1l-.005-.001-.146-.012h-.01l-.146-.01-.006-.001h-.005l-.146-.009h-.011l-.147-.006h-.01L16.32 3.6h-.011l-.147-.003h-.011l-.147-.001H16zm-5.482 1.366l-.16.008-.157.037-.123.053-.06.032-.005.002-.004.003-.128.069-.004.002-.005.003-.126.07-.005.003-.004.002-.126.072-.005.003-.004.003-.125.073-.004.003-.005.003-.124.075-.004.003-.005.002-.123.077-.004.003-.005.003-.122.078-.004.003-.005.003-.121.08-.004.002-.005.003-.12.082-.005.003-.004.003-.12.083-.004.003-.004.003-.118.084-.005.003-.004.003-.118.086-.004.003-.004.003-.117.088-.004.003-.004.003-.116.089-.004.003-.004.004-.114.09-.005.003-.004.003-.113.092-.004.004-.004.003-.113.093-.004.004-.004.003-.111.095-.005.003-.004.004-.11.096-.004.004-.004.003-.11.098-.003.003-.004.004-.108.1-.004.003-.004.003-.107.101-.004.004-.004.003-.106.102-.004.004-.003.004-.105.103-.004.004-.004.004-.103.105-.004.004-.004.003-.102.106-.003.004-.004.004-.1.107-.004.004-.004.004-.099.108-.004.004-.003.004-.098.11-.003.003-.004.004-.096.11-.004.005-.003.004-.095.111-.003.004-.004.004-.093.113-.003.004-.004.004-.092.113-.003.004-.003.005-.09.114-.004.004-.003.004-.089.116-.003.004-.003.004-.088.117-.003.004-.003.004-.086.118-.003.004-.003.005-.084.118-.003.004-.003.005-.083.12-.003.003-.003.005-.082.12-.003.005-.002.004-.068.103-.076.142-.048.154-.018.16.011.161.041.156.07.146.095.13.117.11.136.086.15.06.158.03.162.002.158-.03.15-.057.138-.085.119-.109.082-.105.065-.099.075-.11.077-.113.077-.107.08-.11.08-.108.084-.108.083-.105.086-.106.086-.104.088-.104.089-.101.09-.102.093-.101.093-.099.094-.097.095-.096.098-.097.098-.095.099-.093.1-.092.103-.091.101-.089.104-.088.104-.086.106-.086.106-.083.106-.082.109-.082.108-.079.11-.078.11-.076.112-.076.112-.074.113-.072.113-.071.115-.07.115-.068.118-.067.117-.065.12-.065.054-.029.135-.088.116-.111.094-.132.068-.146.04-.156.009-.161-.02-.16-.05-.153-.078-.142-.102-.125-.123-.103-.141-.079-.153-.051-.16-.022zm13.91 2.116l-.162.008-.157.037-.147.066-.132.092-.113.116-.09.134-.063.148-.034.157-.005.162.025.159.055.152.082.138.086.103.09.09.094.098.092.099.093.1.091.103.089.101.088.104.086.104.086.106.083.105.083.108.08.108.081.11.077.107.077.112.075.111.075.114.072.113.071.113.07.114.068.118.067.115.065.118.064.117.062.117.061.121.059.119.059.122.056.121.054.12.055.125.051.123.051.125.048.123.048.127.047.126.044.125.043.128.042.129.039.126.038.13.022.076.058.15.085.137.11.119.129.096.145.07.155.043.16.013.161-.017.154-.046.144-.075.126-.1.106-.12.082-.14.055-.151.025-.16-.005-.16-.026-.132-.023-.082-.002-.005-.001-.005-.042-.139-.001-.005-.002-.005-.043-.138-.001-.005-.002-.005-.044-.137-.002-.005-.002-.005-.046-.137-.002-.005-.001-.005-.048-.137-.002-.005-.002-.005-.05-.135-.001-.005-.002-.005-.051-.135-.002-.005-.002-.005-.053-.135-.002-.005-.002-.005-.054-.133-.002-.005-.002-.005-.057-.133-.002-.005-.002-.005-.057-.132-.003-.005-.002-.005-.06-.132-.001-.005-.002-.004-.061-.132-.003-.004-.002-.005-.063-.13-.002-.005-.002-.005-.064-.13-.003-.004-.002-.005-.066-.129-.002-.004-.003-.005-.067-.128-.002-.005-.003-.004-.069-.128-.002-.004-.003-.005-.07-.126-.003-.005-.003-.004-.072-.126-.002-.005-.003-.004-.074-.125-.002-.004-.003-.005-.075-.124-.003-.004-.003-.005-.076-.123-.003-.004-.003-.005-.078-.122-.003-.004-.003-.005-.08-.121-.003-.004-.003-.005-.081-.12-.003-.005-.003-.004-.083-.12-.003-.004-.003-.004-.084-.118-.003-.005-.003-.004-.086-.118-.003-.004-.004-.004-.087-.117-.003-.004-.003-.004-.09-.116-.002-.004-.004-.004-.09-.114-.003-.005-.004-.004-.091-.113-.004-.004-.003-.004-.094-.113-.003-.004-.003-.004-.095-.111-.004-.004-.003-.004-.096-.11-.004-.005-.003-.004-.098-.11-.004-.003-.003-.004-.1-.108-.003-.004-.004-.004-.1-.107-.004-.004-.004-.004-.102-.106-.003-.003-.004-.004-.093-.095-.124-.103-.14-.08-.153-.05-.16-.023zM4.45 13.135l-.161.002-.158.032-.15.06-.135.088-.118.11-.094.131-.069.146-.035.129-.026.132v.005l-.002.005-.025.143-.001.005-.001.006-.024.143-.001.005-.001.006-.022.143-.001.006-.001.005-.02.144-.001.005-.001.005-.019.145v.005l-.001.006-.017.144v.006l-.001.005-.016.145v.011l-.014.145v.005l-.001.006-.012.146v.01l-.01.146-.001.006v.005l-.009.146v.011l-.007.146v.011l-.004.147v.011l-.003.147v.01l-.002.148v.01l.001.148v.01l.003.147v.011l.005.147v.01l.007.147v.011l.009.146v.011l.01.146v.01l.013.146v.011l.014.145v.005l.001.006.016.145v.011l.018.144v.006l.001.005.019.144v.006l.001.005.021.144v.005l.002.006.022.143v.006l.002.005.024.143v.005l.002.006.025.143.001.005.001.005.028.143.001.005.001.005.03.142v.005l.002.006.03.141.002.005.001.005.033.142v.005l.002.005.035.14v.006l.002.005.036.14.002.005.001.005.038.14.001.005.002.005.04.14v.005l.002.005.042.138.001.006.002.005.042.138.002.005.002.005.017.054.064.148.09.134.114.114.132.092.148.065.157.037.16.007.16-.023.153-.052.14-.08.123-.104.102-.125.076-.142.049-.153.02-.16-.011-.161-.031-.13-.017-.051-.039-.126-.038-.13-.037-.128-.035-.13-.033-.128-.033-.134-.03-.13-.029-.131-.026-.13-.026-.133-.024-.133-.023-.133-.02-.132-.02-.136-.017-.132-.016-.135-.014-.135-.012-.133-.012-.138-.009-.133-.007-.136-.006-.138-.004-.134-.003-.136v-.274l.003-.136.004-.134.006-.139.007-.136.01-.133.01-.138.013-.132.014-.135.016-.135.017-.132.02-.137.02-.13.023-.134.024-.133.024-.126.016-.16-.014-.161-.044-.155-.072-.145-.098-.128-.12-.108-.137-.084-.15-.057-.16-.029zm26.698 1.601l-.161.01-.157.04-.146.067-.131.093-.112.117-.088.135-.061.149-.033.157-.005.134.006.14.006.176.003.177.001.178-.001.177-.003.178-.006.177-.007.176-.01.177-.012.176-.015.176-.016.173-.018.175-.02.175-.024.174-.025.175-.026.17-.03.174-.03.173-.033.17-.036.172-.037.17-.04.17-.042.172-.043.168-.045.166-.048.169-.05.167-.052.168-.053.164-.056.166-.058.166-.06.16-.062.165-.062.158-.066.165-.068.16-.07.16-.07.158-.075.159-.074.155-.079.158-.08.158-.06.15-.03.158-.001.161.029.159.058.15.085.137.108.119.13.097.144.07.156.044.16.013.16-.017.155-.046.143-.074.127-.1.107-.12.07-.115.083-.164.003-.005.002-.004.082-.166.002-.005.003-.004.08-.167.002-.005.002-.004.078-.168.002-.005.002-.004.076-.169.002-.004.002-.005.074-.17.002-.004.002-.005.072-.17.002-.005.002-.005.07-.171.001-.005.002-.005.068-.172.002-.004.002-.005.065-.173.002-.005.002-.005.063-.173.002-.005.002-.005.06-.174.003-.005.001-.005.06-.175.001-.005.002-.005.057-.176.001-.005.002-.005.055-.177.001-.005.002-.005.052-.177.002-.005.001-.005.051-.178.001-.005.002-.005.048-.179.002-.005v-.005l.047-.179.001-.005.002-.005.044-.18v-.005l.002-.005.042-.18.001-.006.001-.005.04-.181.001-.005.001-.005.037-.182.002-.005v-.005l.036-.182v-.006l.002-.005.033-.182v-.006l.002-.005.03-.183.001-.005.001-.005.029-.184v-.005l.001-.006.027-.184v-.005l.001-.005.024-.185v-.005l.001-.005.022-.185v-.006l.001-.005.02-.185v-.006l.001-.005.017-.186v-.005l.001-.005.015-.187v-.005l.001-.005.013-.187v-.01l.01-.187.001-.006v-.005l.009-.187v-.011l.006-.187V16.7l.004-.188v-.011l.001-.188v-.01l-.001-.188v-.011l-.004-.188v-.011l-.006-.187v-.011l-.007-.145-.022-.16-.05-.152-.08-.141-.103-.124-.125-.102-.141-.077-.153-.05-.16-.02zm-30.21.572l-.161.001-.158.032-.15.06-.136.087-.117.11-.095.131-.068.146-.04.156-.012.133-.001.14v.01l.001.188v.011l.004.188v.011l.006.187v.011l.008.187v.011l.011.187v.005l.001.005.013.187v.01l.016.187v.01l.018.186v.011l.02.185.001.005v.006l.022.185.001.005v.005l.025.185v.005l.001.005.027.184v.006l.001.005.029.184v.005l.001.005.031.183.001.005.001.006.033.182.001.005.001.006.035.182.001.005.001.005.038.182v.005l.002.005.04.181v.005l.002.005.042.18.001.006.001.005.044.18.002.005v.005l.047.18.001.004.002.005.048.179.002.005.001.005.05.178.002.005.001.005.053.177.002.005.001.005.055.177.002.005.001.005.057.176.002.005.001.005.06.175.001.005.002.005.061.174.002.005.002.005.063.173.002.005.002.005.065.173.002.005.002.004.067.172.002.005.002.005.07.171.002.005.002.005.072.17.002.005.002.004.074.17.002.005.002.004.076.169.002.004.002.005.078.168.002.004.002.005.08.167.003.004.002.005.082.166.002.004.003.005.02.04.086.136.11.118.13.095.146.07.156.041.16.012.16-.019.155-.048.142-.075.126-.1.105-.123.08-.14.054-.152.024-.16-.006-.16-.036-.158-.051-.123-.018-.034-.078-.158-.074-.155-.074-.16-.071-.157-.07-.16-.068-.16-.067-.165-.062-.158-.062-.164-.059-.161-.058-.166-.056-.166-.053-.164-.052-.168-.05-.167-.048-.17-.045-.165-.043-.168-.043-.172-.039-.17-.037-.17-.036-.172-.033-.17-.03-.173-.03-.174-.027-.17-.025-.175-.022-.174-.021-.175-.018-.175-.017-.173-.014-.176-.012-.176-.01-.177-.007-.176-.006-.177-.003-.178-.001-.177v-.134l-.013-.16-.044-.156-.072-.144-.097-.129-.12-.108-.137-.085-.15-.057-.159-.028zm26.798 2.024l-.16.007-.157.038-.148.066-.132.092-.113.115-.09.134-.062.148-.03.127-.001.004-.023.134-.024.133-.026.133-.026.13-.03.132-.03.129-.032.134-.033.128-.035.13-.037.128-.038.13-.04.126-.04.128-.044.128-.044.126-.046.126-.048.126-.05.125-.05.125-.051.122-.054.123-.055.122-.056.12-.058.122-.06.12-.061.12-.063.119-.062.116-.067.119-.066.116-.069.115-.069.115-.07.113-.073.113-.074.112-.076.113-.077.112-.077.107-.08.11-.08.107-.085.11-.044.056-.088.135-.06.15-.033.158-.002.16.027.16.057.15.083.138.108.12.128.098.144.072.155.045.16.015.161-.016.155-.044.144-.073.128-.098.09-.099.05-.061.003-.004.003-.005.089-.115.003-.004.003-.005.088-.116.003-.004.003-.005.086-.117.003-.004.003-.005.084-.118.003-.004.003-.005.083-.12.003-.004.003-.004.081-.12.003-.005.003-.004.08-.121.003-.005.003-.004.078-.122.003-.005.003-.004.077-.123.002-.005.003-.004.075-.124.003-.005.003-.004.073-.125.003-.005.003-.004.072-.126.002-.004.003-.005.07-.126.003-.005.002-.005.07-.127.002-.004.002-.005.068-.128.002-.005.002-.004.066-.13.003-.004.002-.005.064-.13.002-.004.003-.005.062-.13.002-.005.003-.005.06-.13.003-.005.002-.005.06-.132.002-.005.002-.005.057-.132.003-.005.002-.005.056-.133.002-.005.002-.005.054-.134.002-.004.002-.005.053-.135.002-.005.002-.005.051-.135.002-.005.002-.005.05-.135.001-.005.002-.005.048-.137.001-.005.002-.005.046-.137.002-.005.002-.005.044-.137.002-.005.002-.005.042-.138.002-.005.001-.006.042-.138.001-.005.002-.005.04-.14v-.005l.002-.005.038-.14.001-.005.002-.005.036-.14.001-.005.001-.005.035-.141.001-.005.001-.005.033-.142.001-.005.001-.005.031-.141.001-.006.002-.005.029-.142v-.005l.002-.005.028-.143v-.005l.002-.005.025-.143.001-.006.001-.005.024-.143.001-.005.001-.006.001-.006.01-.161-.02-.16-.05-.154-.077-.141-.102-.125-.123-.104-.141-.079-.153-.051-.16-.022zM6.841 23.019l-.16.024-.152.053-.14.08-.122.105-.101.126-.076.142-.048.154-.018.16.011.161.041.156.07.146.077.109.04.048.003.004.003.004.095.111.003.004.004.004.096.11.004.005.003.004.098.109.003.004.004.004.1.108.003.004.003.004.101.107.004.004.003.004.102.105.004.004.004.004.103.105.004.004.004.003.105.104.003.004.004.003.106.102.004.004.004.004.107.1.004.004.004.004.108.099.004.003.004.004.11.098.003.003.004.004.11.096.004.003.005.004.11.095.005.003.004.004.113.093.004.003.004.004.113.091.004.004.005.003.114.09.004.004.004.003.116.089.004.003.004.003.117.088.004.003.004.003.118.086.004.003.005.003.118.084.004.003.005.003.119.083.004.003.005.003.12.081.005.003.004.003.121.08.005.003.004.003.122.078.005.003.004.003.123.076.005.003.004.003.124.075.005.003.004.003.125.073.004.003.005.002.126.073.004.002.005.003.126.07.005.003.004.002.128.07.004.002.005.002.128.067.005.003.004.002.13.066.004.002.005.003.13.064.004.002.005.003.13.062.005.002.004.003.132.06.004.003.005.002.132.06.005.002.005.002.132.057.005.002.005.002.133.057.005.002.005.002.133.054.005.002.005.002.13.05.154.045.16.016.16-.015.156-.045.144-.072.128-.098.108-.12.083-.138.057-.15.028-.16-.003-.16-.032-.159-.061-.149-.088-.135-.11-.117-.132-.094-.12-.058-.124-.049-.126-.051-.122-.051-.122-.054-.12-.054-.126-.058-.119-.057-.12-.06-.12-.06-.118-.063-.117-.064-.119-.066-.116-.066-.115-.068-.115-.07-.113-.07-.115-.074-.112-.074-.11-.075-.11-.076-.112-.08-.11-.08-.109-.081-.106-.082-.104-.082-.106-.086-.105-.087-.101-.086-.105-.091-.1-.09-.1-.091-.1-.094-.097-.094-.1-.098-.093-.095-.096-.1-.093-.098-.092-.101-.089-.1-.09-.102-.088-.104-.036-.043-.114-.114-.133-.091-.148-.065-.157-.036-.161-.006zm15.063 2.701l-.16.014-.156.044-.12.057-.06.034-.12.066-.117.064-.118.062-.12.061-.12.06-.118.057-.126.058-.12.054-.122.054-.122.05-.126.052-.125.05-.124.046-.127.047-.125.044-.129.043-.126.04-.13.042-.128.038-.127.035-.13.036-.131.034-.129.031-.132.03-.13.03-.135.027-.133.026-.13.023-.13.022-.137.021-.132.02-.134.017-.132.015-.138.015-.135.013-.133.01-.138.01-.136.007-.134.006-.136.004-.14.003-.16.018-.155.047-.142.076-.127.1-.105.122-.08.14-.054.151-.025.16.006.16.035.158.064.148.09.134.114.114.133.092.147.065.157.036.134.008.145-.002h.011l.147-.005h.01l.147-.007h.011l.146-.009h.011l.146-.01h.005l.005-.001.146-.012h.011l.145-.014h.005l.006-.001.145-.016h.011l.144-.018h.006l.005-.001.144-.02h.011l.144-.021.005-.001h.006l.143-.023.006-.001h.005l.143-.025h.005l.006-.002.143-.026h.005l.005-.002.143-.027.005-.001.005-.001.142-.03h.005l.005-.002.142-.03.005-.002.005-.001.142-.033.005-.001.005-.001.14-.035.006-.001.005-.001.14-.037h.005l.005-.002.14-.038.005-.002h.005l.14-.04.005-.002.005-.001.138-.042.005-.001.006-.002.138-.043.005-.001.005-.002.137-.044.005-.002.005-.002.137-.046.005-.002.005-.001.137-.048.005-.002.005-.002.135-.05.005-.001.005-.002.135-.051.005-.002.005-.002.135-.053.005-.002.004-.002.134-.054.005-.002.005-.002.133-.057.005-.002.005-.002.132-.057.005-.003.005-.002.132-.06.005-.001.004-.002.131-.061.005-.003.005-.002.13-.062.005-.003.005-.002.13-.064.004-.003.005-.002.128-.066.005-.002.005-.003.128-.067.005-.002.004-.003.127-.069.005-.002.005-.003.126-.07.005-.003.004-.003.065-.037.132-.093.112-.115.089-.135.062-.149.034-.157.003-.161-.026-.16-.055-.15-.082-.14-.107-.12-.127-.1-.144-.073-.154-.046-.16-.016zM6.33 27.127l-.16.023-.152.053-.14.08-.122.105-.101.126-.076.142-.048.154-.02.16.012.161.041.156.07.146.094.13.096.093.032.026.004.003.004.004.145.117.004.003.004.004.146.115.005.003.004.004.147.113.005.003.004.004.149.111.004.003.004.003.15.11.005.003.004.003.151.108.004.003.005.003.152.106.005.003.004.003.154.104.004.003.005.003.154.102.005.002.004.003.156.1.005.003.004.003.157.098.005.003.004.002.159.096.004.003.005.003.16.094.004.003.004.002.16.092.005.003.005.002.161.09.005.003.005.002.162.088.005.003.004.002.164.086.005.003.004.002.165.084.005.003.004.002.166.082.004.002.005.003.167.08.004.002.005.002.168.078.004.002.005.002.168.076.005.002.005.002.17.074.004.002.005.002.17.072.005.002.005.002.17.07.006.002.005.001.171.068.005.002.005.002.173.065.005.002.005.002.173.063.005.002.005.002.174.06.005.003.005.001.175.06.005.001.005.002.176.057.005.001.005.002.176.055.006.001.005.002.177.052.005.002.005.001.178.05.005.002.005.002.178.048.006.001.005.002.179.046.005.001.005.002.18.044h.005l.005.002.18.042.006.001.005.001.159.035.16.02.16-.01.157-.04.146-.069.13-.094.112-.117.087-.136.06-.149.033-.158.002-.161-.028-.159-.057-.15-.084-.138-.108-.12-.128-.098-.144-.072-.128-.039-.154-.033-.168-.04-.171-.041-.17-.044-.168-.046-.167-.047-.168-.05-.165-.051-.166-.054-.166-.056-.163-.057-.165-.06-.161-.062-.164-.064-.16-.065-.16-.068-.162-.07-.157-.07-.157-.074-.157-.075-.156-.077-.153-.079-.156-.082-.153-.082-.154-.086-.15-.086-.152-.09-.148-.09-.147-.092-.149-.095-.145-.095-.144-.098-.145-.1-.143-.102-.14-.103-.14-.104-.14-.108-.139-.11-.136-.11-.027-.022-.133-.091-.148-.065-.157-.036-.161-.006zm19.215.087l-.16.01-.157.039-.146.067-.11.076-.064.051-.139.11-.14.108-.14.104-.14.103-.143.101-.145.101-.144.098-.145.095-.149.095-.148.093-.147.089-.152.09-.15.086-.154.086-.153.082-.156.082-.153.079-.156.077-.157.075-.158.073-.157.071-.16.07-.16.068-.161.065-.164.064-.161.061-.165.06-.163.058-.166.056-.166.054-.166.051-.167.05-.167.047-.17.046-.168.044-.171.042-.168.039-.17.037-.11.023-.154.047-.143.075-.126.1-.106.122-.081.139-.054.152-.025.16.006.16.035.158.063.148.09.133.114.115.132.092.148.065.157.037.16.007.133-.016.115-.024.005-.001.005-.001.181-.04h.005l.005-.002.18-.042.006-.001.005-.001.18-.044.005-.002.005-.001.18-.046.004-.002h.005l.179-.05h.005l.005-.002.178-.05.005-.002.005-.002.177-.052.005-.002.005-.001.177-.055.005-.002.005-.001.176-.057.005-.002.005-.002.175-.059.005-.001.005-.002.174-.061.005-.002.005-.002.173-.063.005-.002.005-.002.173-.065.004-.002.005-.002.172-.068.005-.002.005-.002.171-.07.005-.001.005-.002.17-.072.005-.002.004-.002.17-.074.005-.002.004-.002.169-.076.004-.002.005-.002.168-.078.004-.002.005-.003.167-.08.004-.002.005-.002.166-.082.004-.002.005-.003.165-.084.004-.002.005-.003.163-.086.005-.002.005-.003.162-.088.005-.002.005-.003.161-.09.005-.002.004-.003.16-.092.005-.003.005-.002.16-.094.004-.003.004-.003.158-.096.005-.002.004-.003.158-.098.004-.003.005-.003.156-.1.004-.003.004-.003.155-.101.005-.003.004-.003.154-.104.004-.003.004-.003.153-.106.004-.003.005-.003.151-.108.004-.003.005-.003.15-.11.004-.003.004-.003.149-.112.004-.003.004-.003.148-.113.004-.004.004-.003.147-.115.004-.004.004-.003.068-.055.116-.113.092-.132.066-.147.038-.157.008-.16-.022-.16-.05-.153-.08-.14-.103-.125-.124-.102-.142-.077-.153-.05-.16-.02z"
  492. })));
  493. function _extends$N() { _extends$N = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends$N.apply(this, arguments); }
  494. var IntermediateEventCatchNonInterruptingEscalationIcon = (({
  495. styles = {},
  496. ...props
  497. }) => /*#__PURE__*/React__default["default"].createElement("svg", _extends$N({
  498. xmlns: "http://www.w3.org/2000/svg",
  499. width: "32",
  500. height: "32"
  501. }, props), /*#__PURE__*/React__default["default"].createElement("path", {
  502. d: "M16.012 9.222c-1.673 4.657-2.735 9.508-4.409 14.164 1.536-1.526 2.874-3.236 4.41-4.762l4.408 4.762c-1.497-4.712-2.911-9.451-4.409-14.164zm.032 2.93c.823 2.588 1.599 5.19 2.421 7.777l-2.42-2.614c-.683.598-2.454 2.886-2.34 2.39.871-2.489 1.448-5.07 2.34-7.552zM16.012.312c-1.448.02-2.93.157-4.302.628-.852.447-.255 1.863.66 1.574 2.255-.608 4.648-.607 6.922-.108.934.075 1.228-1.376.338-1.67C18.451.44 17.227.317 16.012.311zm9.012 2.934c-.913-.104-1.272 1.258-.454 1.648 1.834 1.36 3.293 3.185 4.31 5.22.526.776 1.842.098 1.515-.78a15.522 15.522 0 00-5.06-6.006c-.1-.044-.203-.07-.31-.082zM6.65 3.59c-.762.089-1.24.809-1.805 1.267C3.38 6.295 2.163 8.007 1.37 9.905c-.266.898 1.094 1.484 1.564.675a14.825 14.825 0 014.327-5.56c.476-.515.09-1.419-.612-1.431zm9.362.007c-.698.066-1.689-.16-2.033.635-.282.733.535 1.358 1.217 1.125 1.806-.147 3.63.203 5.293.907.902.255 1.472-1.112.656-1.573-1.6-.735-3.374-1.089-5.133-1.094zm-5.479 1.365c-.835.15-1.517.76-2.21 1.226-1.203.94-2.318 2.061-3.057 3.402-.33.904 1.063 1.552 1.547.723 1.045-1.656 2.596-2.925 4.285-3.873.545-.499.171-1.463-.565-1.478zm13.903 2.115c-.875-.07-1.22 1.173-.501 1.627 1.325 1.34 2.188 3.062 2.748 4.84.468.84 1.869.21 1.557-.699-.604-2.118-1.751-4.097-3.351-5.615a.93.93 0 00-.453-.153zM4.467 13.132c-.822-.07-.996.826-1.046 1.455-.256 1.93-.094 3.933.562 5.769.406.844 1.807.365 1.612-.551a11.498 11.498 0 01-.334-5.808.874.874 0 00-.794-.865zm26.687 1.6c-.746-.037-1.014.785-.879 1.395.043 2.393-.57 4.771-1.66 6.894-.31.884 1.02 1.536 1.53.75a15.632 15.632 0 001.821-8.372.876.876 0 00-.812-.667zm-30.197.571c-.782-.073-1.044.775-.933 1.404.068 2.414.661 4.833 1.809 6.962.534.77 1.842.076 1.505-.798a14.833 14.833 0 01-1.603-6.861.876.876 0 00-.778-.707zm26.787 2.024c-.777-.048-.952.797-1.021 1.392-.354 1.692-1.202 3.231-2.216 4.608-.407.872.925 1.638 1.48.852 1.361-1.733 2.296-3.827 2.582-6.017a.874.874 0 00-.825-.835zM6.857 23.012c-.808.018-1.082 1.122-.47 1.59 1.393 1.607 3.187 2.886 5.194 3.599.91.222 1.43-1.165.598-1.596a11.495 11.495 0 01-4.723-3.396.899.899 0 00-.599-.197zm15.057 2.7c-.81.194-1.504.76-2.325.972-1.203.458-2.5.536-3.758.664-.869.307-.573 1.728.346 1.663 2.201-.034 4.412-.626 6.293-1.778.604-.495.227-1.532-.556-1.521zM6.346 27.118c-.833.008-1.11 1.218-.395 1.617 1.986 1.602 4.358 2.749 6.868 3.226.933.076 1.227-1.376.338-1.67a14.838 14.838 0 01-6.345-3.066.929.929 0 00-.466-.107zm19.208.087c-.766.09-1.241.841-1.922 1.158-1.516.991-3.251 1.58-4.996 2.005-.872.405-.346 1.849.584 1.604 2.543-.526 4.98-1.66 6.963-3.344.47-.52.072-1.42-.63-1.423z"
  503. })));
  504. function _extends$M() { _extends$M = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends$M.apply(this, arguments); }
  505. var IntermediateEventCatchNonInterruptingMessageIcon = (({
  506. styles = {},
  507. ...props
  508. }) => /*#__PURE__*/React__default["default"].createElement("svg", _extends$M({
  509. xmlns: "http://www.w3.org/2000/svg",
  510. width: "32",
  511. height: "32"
  512. }, props), /*#__PURE__*/React__default["default"].createElement("path", {
  513. d: "M8.742 10.464v11.072h14.516V10.464H8.742zm3.224 1.73h8.066a69569 69569 0 00-4.034 3.22l-4.032-3.22zm9.565 1.018v6.594H10.469v-6.593L16 17.63l5.532-4.419zM16 0h-.005l-.188.001h-.011l-.188.004h-.011l-.187.006h-.011l-.187.008h-.005L15.2.02l-.187.01h-.005l-.005.001-.187.013h-.011L14.62.06h-.01l-.186.018h-.011l-.185.02-.005.001h-.006l-.185.022-.005.001h-.005l-.185.025h-.005l-.005.001-.185.027h-.005l-.005.001-.184.029h-.005l-.005.001-.183.031-.006.001-.005.001-.182.033-.006.001-.005.001-.182.035-.005.001-.005.001-.182.038h-.005l-.005.002-.181.04h-.005l-.005.002-.18.042-.006.001-.005.001-.18.044-.005.002h-.005l-.17.045-.152.054-.139.082-.121.106-.1.127-.074.143-.046.155-.017.16.013.16.043.156.07.145.097.13.119.108.137.085.15.058.159.03.16-.001.133-.023.165-.043.168-.041.171-.04.171-.037.172-.036.17-.033.173-.03.17-.03.177-.027.171-.025.175-.022.175-.02.175-.02.176-.016.175-.014.177-.012.176-.01.177-.007.174-.006.177-.003L16 1.73h.177l.178.004.174.006.177.007.176.01.177.012.175.014.176.017.175.018.175.02.175.023.171.025.176.027.17.03.174.03.17.033.171.036.154.033.16.02.161-.01.156-.04.146-.069.131-.094.111-.117.087-.135.061-.15.032-.158.002-.16-.027-.16-.057-.15L20 .714l-.108-.12-.128-.097-.145-.073-.128-.038-.158-.035-.005-.001-.005-.001L19.14.31h-.005l-.005-.002-.182-.035h-.006l-.005-.002-.182-.033h-.006l-.005-.002-.183-.03-.005-.001-.006-.001-.183-.029h-.005l-.006-.001-.184-.027h-.005l-.005-.001-.185-.024h-.005L17.968.12 17.783.1l-.006-.001h-.005l-.185-.02h-.006l-.005-.001L17.39.06h-.005L17.38.06l-.187-.015h-.005l-.005-.001-.187-.013h-.011L16.8.02h-.011L16.6.01h-.011l-.187-.006h-.011L16.204 0h-.011L16.005 0H16zm9.015 2.935l-.16.004-.158.033-.15.062-.134.09-.116.111-.093.132-.067.147-.038.156-.01.161.022.16.05.153.078.141.103.124.102.087.045.034.142.106.137.105.14.11.136.11.135.112.134.115.134.117.13.115.132.122.128.12.127.122.126.125.124.126.124.128.121.13.118.128.118.132.117.133.113.134.113.136.11.136.109.137.109.142.104.14.103.14.101.142.1.144.099.146.095.145.094.147.093.15.092.15.087.149.087.15.084.152.084.155.08.152.08.155.04.081.084.138.11.119.128.096.145.072.155.043.16.013.16-.016.155-.046.144-.074.127-.099.106-.12.083-.14.055-.151.026-.16-.004-.16-.034-.158-.05-.124-.042-.085-.002-.004-.003-.005-.084-.165-.002-.004-.003-.005-.086-.164-.002-.004-.003-.005-.088-.162-.002-.005-.003-.005-.09-.161-.002-.005-.003-.004-.092-.16-.003-.005-.002-.005-.094-.16-.003-.004-.003-.004-.096-.159-.002-.004-.003-.005-.098-.157-.003-.004-.003-.005-.1-.156-.003-.004-.003-.005-.101-.154-.003-.005-.003-.004-.104-.154-.003-.004-.003-.005-.106-.152-.003-.005-.003-.004-.108-.151-.003-.004-.003-.005-.11-.15-.003-.004-.003-.004-.111-.15-.004-.003-.003-.005-.113-.147-.004-.004-.003-.005-.115-.146-.004-.004-.003-.004-.117-.145-.004-.004-.003-.004-.12-.144-.003-.004-.003-.004-.121-.142-.004-.004-.003-.004-.123-.141-.003-.004-.004-.004-.125-.14-.003-.004-.004-.004-.127-.138-.003-.004-.004-.004-.128-.136-.004-.004-.004-.004-.13-.135-.004-.004-.004-.004-.132-.134-.003-.004-.004-.003-.134-.133-.004-.003-.004-.004-.135-.13-.004-.004-.004-.004-.136-.128-.004-.004-.004-.004-.138-.126-.004-.004-.004-.003-.14-.125-.004-.004-.004-.003-.14-.123-.005-.004-.004-.003-.142-.121-.004-.004-.004-.003-.144-.12-.004-.003-.004-.003-.145-.117-.004-.004-.004-.003-.147-.115-.004-.004-.004-.003-.148-.113-.004-.003-.004-.004-.149-.111-.004-.003-.004-.004-.05-.036-.14-.083-.15-.055-.16-.027zM6.634 3.28l-.161.008-.157.037-.147.066-.111.074-.04.032-.005.003-.004.004-.145.117-.004.003-.004.004-.144.119-.004.003-.004.004-.142.12-.004.004-.004.004-.141.123-.004.003-.004.004-.14.125-.004.003-.004.004-.138.126-.004.004-.004.004-.136.128-.004.004-.004.004-.135.13-.004.004-.004.003-.134.133-.004.003-.004.004-.132.134-.003.004-.004.004-.13.135-.004.004-.004.004-.128.136-.004.004-.004.004-.126.138-.004.004-.003.004-.125.14-.004.004-.003.004-.123.14-.004.005-.003.004-.121.142-.004.004-.003.004-.12.144-.003.004-.003.004-.117.145-.004.004-.003.004-.115.146-.004.005-.003.004-.113.147-.003.005-.004.004-.111.149-.003.004-.004.004-.11.15-.002.005-.003.004-.108.151-.003.004-.003.005-.106.152-.003.005-.003.004-.104.154-.003.004-.003.005-.102.154-.003.005-.002.004-.1.156-.003.005-.003.004-.098.157-.003.005-.003.004-.096.159-.002.004-.003.005-.094.16-.003.004-.002.004-.092.16-.003.005-.003.005-.09.161-.002.005-.003.005-.088.162-.002.005-.003.004-.086.164-.002.005-.002.004-.084.165-.003.005-.002.004-.082.166-.002.004-.003.005-.08.167-.002.004-.002.005-.078.168-.002.004-.002.005-.045.1-.053.153-.023.16.007.16.037.157.065.148.092.132.114.114.134.09.148.064.157.035.161.006.16-.025.152-.054.14-.08.121-.106.1-.126.065-.118.043-.095.074-.16.075-.155.077-.157.08-.155.08-.152.083-.155.085-.152.086-.15.088-.149.091-.15.094-.15.094-.147.095-.145.099-.146.1-.144.1-.142.104-.14.104-.14.11-.142.107-.137.11-.136.114-.136.113-.134.117-.133.118-.132.117-.129.122-.13.124-.127.123-.126.127-.125.127-.122.128-.12.132-.122.13-.115.133-.117.135-.115.135-.111.136-.11.037-.03.117-.11.094-.132.068-.146.04-.156.01-.161-.02-.16-.05-.154-.076-.141-.102-.125-.123-.104-.14-.08-.153-.051-.16-.023zM16 3.286h-.005l-.148.001h-.01l-.147.003h-.011l-.147.005h-.011l-.146.007h-.011l-.146.009h-.011l-.146.01h-.005l-.005.001-.146.012h-.011l-.145.014h-.006l-.005.001-.05.006-.158.031-.15.06-.135.088-.117.111-.094.13-.069.147-.04.156-.01.16.019.16.049.154.076.142.102.125.123.105.14.08.152.051.16.023.134-.003.045-.005.135-.013.133-.01.136-.01.135-.007.137-.006.136-.004.136-.003h.274l.136.003.136.004.136.006.136.007.136.01.133.01.135.013.135.014.135.016.134.018.132.018.134.021.133.023.133.024.133.025.13.027.132.03.132.03.129.031.13.034.129.035.129.036.13.04.126.038.128.042.126.042.128.045.127.047.126.047.12.048.127.051.123.052.006.002.147.048.16.021.16-.009.157-.038.147-.067.131-.093.112-.116.089-.135.062-.149.033-.158.004-.16-.027-.16-.055-.151-.083-.139-.107-.12-.127-.099-.118-.063-.004-.001-.005-.003-.005-.002-.133-.056-.005-.002-.005-.002-.134-.054-.004-.002-.005-.002-.135-.053-.005-.002-.005-.002-.135-.051-.005-.002-.005-.002-.135-.05-.005-.001-.005-.002-.137-.048-.005-.001-.005-.002-.137-.046-.005-.002-.005-.002-.137-.044-.005-.002-.005-.001-.138-.043-.006-.002-.005-.001-.138-.042-.005-.001-.005-.002-.14-.04H19.4l-.005-.002-.14-.038-.005-.001-.005-.002-.14-.036-.005-.001-.005-.001-.141-.035-.005-.001-.005-.001-.142-.033-.005-.001-.005-.001-.142-.031-.005-.002h-.005l-.142-.03-.005-.001-.005-.001-.143-.028h-.005l-.005-.002-.143-.025-.006-.001-.005-.001-.143-.024-.005-.001-.006-.001-.143-.022-.006-.001h-.005l-.144-.022h-.005l-.006-.001-.144-.019h-.005l-.006-.001-.144-.017h-.006l-.005-.001-.145-.016h-.011l-.145-.014H17.1l-.005-.001-.146-.012h-.01l-.146-.01-.006-.001h-.005l-.146-.009h-.011l-.147-.006h-.01l-.147-.005h-.011l-.147-.003h-.011l-.147-.001H16zm-5.482 1.366l-.16.008-.157.037-.123.053-.06.032-.005.002-.004.003-.128.069-.004.002-.005.003-.126.07-.005.003-.004.002-.126.072-.005.003-.004.003-.125.073-.004.003-.005.003-.124.075-.004.003-.005.002-.123.077-.004.003-.005.003-.122.078-.004.003-.005.003-.121.08-.004.002-.005.003-.12.082-.005.003-.004.003-.12.083-.004.003-.004.003-.118.084-.005.003-.004.003-.118.086-.004.003-.004.003-.117.088-.004.003-.004.003-.116.089-.004.003-.004.004-.114.09-.005.003-.004.003-.113.092-.004.004-.004.003-.113.093-.004.004-.004.003-.111.095-.005.003-.004.004-.11.096-.004.004-.004.003-.11.098-.003.003-.004.004-.108.1-.004.003-.004.003-.107.101-.004.004-.004.003-.106.102-.004.004-.003.004-.105.103-.004.004-.004.004-.103.105-.004.004-.004.003-.102.106-.003.004-.004.004-.1.107-.004.004-.004.004-.099.108-.004.004-.003.004-.098.11-.003.003-.004.004-.096.11-.004.005-.003.004-.095.111-.003.004-.004.004-.093.113-.003.004-.004.004-.092.113-.003.004-.003.005-.09.114-.004.004-.003.004-.089.116-.003.004-.003.004-.088.117-.003.004-.003.004-.086.118-.003.004-.003.005-.084.118-.003.004-.003.005-.083.12-.003.003-.003.005-.082.12-.003.005-.002.004-.068.103-.076.142-.048.154-.018.16.011.161.041.156.07.146.095.13.117.11.136.086.15.06.158.03.162.002.158-.03.15-.057.138-.085.119-.109.082-.105.065-.099.075-.11.077-.113.077-.107.08-.11.08-.108.084-.108.083-.105.086-.106.086-.104.088-.104.089-.101.09-.102.093-.101.093-.099.094-.097.095-.096.098-.097.098-.095.099-.093.1-.092.103-.091.101-.089.104-.088.104-.086.106-.086.106-.083.106-.082.109-.082.108-.079.11-.078.11-.076.112-.076.112-.074.113-.072.113-.071.115-.07.115-.068.118-.067.117-.065.12-.065.054-.029.135-.088.116-.111.094-.132.068-.146.04-.156.009-.161-.02-.16-.05-.153-.078-.142-.102-.125-.123-.103-.141-.079-.153-.051-.16-.022zm13.91 2.116l-.162.008-.157.037-.147.066-.132.092-.113.116-.09.134-.063.148-.034.157-.005.162.025.159.055.152.082.138.086.103.09.09.094.098.092.099.093.1.091.103.089.101.088.104.086.104.086.106.083.105.083.108.08.108.081.11.077.107.077.112.075.111.075.114.072.113.071.113.07.114.068.118.067.115.065.118.064.117.062.117.061.121.059.119.059.122.056.121.054.12.055.125.051.123.051.125.048.123.048.127.047.126.044.125.043.128.042.129.039.126.038.13.022.076.058.15.085.137.11.119.129.096.145.07.155.043.16.013.161-.017.154-.046.144-.075.126-.1.106-.12.082-.14.055-.151.025-.16-.005-.16-.026-.132-.023-.082-.002-.005-.001-.005-.042-.139-.001-.005-.002-.005-.043-.138-.001-.005-.002-.005-.044-.137-.002-.005-.002-.005-.046-.137-.002-.005-.001-.005-.048-.137-.002-.005-.002-.005-.05-.135-.001-.005-.002-.005-.051-.135-.002-.005-.002-.005-.053-.135-.002-.005-.002-.005-.054-.133-.002-.005-.002-.005-.057-.133-.002-.005-.002-.005-.057-.132-.003-.005-.002-.005-.06-.132-.001-.005-.002-.004-.061-.132-.003-.004-.002-.005-.063-.13-.002-.005-.002-.005-.064-.13-.003-.004-.002-.005-.066-.129-.002-.004-.003-.005-.067-.128-.002-.005-.003-.004-.069-.128-.002-.004-.003-.005-.07-.126-.003-.005-.003-.004-.072-.126-.002-.005-.003-.004-.074-.125-.002-.004-.003-.005-.075-.124-.003-.004-.003-.005-.076-.123-.003-.004-.003-.005-.078-.122-.003-.004-.003-.005-.08-.121-.003-.004-.003-.005-.081-.12-.003-.005-.003-.004-.083-.12-.003-.004-.003-.004-.084-.118-.003-.005-.003-.004-.086-.118-.003-.004-.004-.004-.087-.117-.003-.004-.003-.004-.09-.116-.002-.004-.004-.004-.09-.114-.003-.005-.004-.004-.091-.113-.004-.004-.003-.004-.094-.113-.003-.004-.003-.004-.095-.111-.004-.004-.003-.004-.096-.11-.004-.005-.003-.004-.098-.11-.004-.003-.003-.004-.1-.108-.003-.004-.004-.004-.1-.107-.004-.004-.004-.004-.102-.106-.003-.003-.004-.004-.093-.095-.124-.103-.14-.08-.153-.05-.16-.023zM4.45 12.826l-.161.002-.158.032-.15.06-.135.088-.118.11-.094.131-.069.146-.035.129-.026.132v.005l-.002.005-.025.143-.001.005-.001.006-.024.143-.001.005-.001.006-.022.143-.001.006-.001.005-.02.144-.001.005-.001.005-.019.145v.005l-.001.006-.017.144v.006l-.001.005-.016.145v.011l-.014.145v.005l-.001.006-.012.146v.01l-.01.146-.001.006v.005l-.009.146v.011l-.007.146v.011l-.004.147v.011l-.003.147v.01l-.002.148v.01l.001.148v.01l.003.147v.011l.005.147v.01l.007.147v.011l.009.146v.011l.01.146v.01l.013.146v.011l.014.145v.005l.001.006.016.145v.011l.018.144v.006l.001.005.019.144v.006l.001.005.021.144v.005l.002.006.022.143v.006l.002.005.024.143v.005l.002.006.025.143.001.005.001.005.028.143.001.005.001.005.03.142v.005l.002.006.03.141.002.005.001.005.033.142v.005l.002.005.035.14v.006l.002.005.036.14.002.005.001.005.038.14.001.005.002.005.04.14v.005l.002.005.042.138.001.006.002.005.042.138.002.005.002.005.017.054.064.148.09.134.114.114.132.092.148.065.157.037.16.007.16-.023.153-.052.14-.08.123-.104.102-.125.076-.142.049-.153.02-.16-.011-.161-.031-.13-.017-.051-.039-.126-.038-.13-.037-.128-.035-.13-.033-.128-.033-.134-.03-.13-.029-.131-.026-.13-.026-.133-.024-.133-.023-.133-.02-.132-.02-.136-.017-.132-.016-.135-.014-.135-.012-.133-.012-.138-.009-.133-.007-.136-.006-.138-.004-.134-.003-.136v-.274l.003-.136.004-.134.006-.139.007-.136.01-.133.01-.138.013-.132.014-.135.016-.135.017-.132.02-.137.02-.13.023-.134.024-.133.024-.126.016-.16-.014-.161-.044-.155-.072-.145-.098-.128-.12-.108-.137-.084-.15-.057-.16-.029zm26.698 1.601l-.161.01-.157.04-.146.067-.131.093-.112.117-.088.135-.061.149-.033.157-.005.134.006.14.006.176.003.177.001.178-.001.177-.003.178-.006.177-.007.176-.01.177-.012.176-.015.176-.016.173-.018.175-.02.175-.024.174-.025.175-.026.17-.03.174-.03.173-.033.17-.036.172-.037.17-.04.17-.042.172-.043.168-.045.166-.048.169-.05.167-.052.168-.053.164-.056.166-.058.166-.06.16-.062.165-.062.158-.066.165-.068.16-.07.16-.07.158-.075.159-.074.155-.079.158-.08.158-.06.15-.03.158-.001.161.029.159.058.15.085.137.108.119.13.097.144.07.156.044.16.013.16-.017.155-.046.143-.074.127-.1.107-.12.07-.115.083-.164.003-.005.002-.004.082-.166.002-.005.003-.004.08-.167.002-.005.002-.004.078-.168.002-.005.002-.004.076-.169.002-.004.002-.005.074-.17.002-.004.002-.005.072-.17.002-.005.002-.005.07-.171.001-.005.002-.005.068-.172.002-.004.002-.005.065-.173.002-.005.002-.005.063-.173.002-.005.002-.005.06-.174.003-.005.001-.005.06-.175.001-.005.002-.005.057-.176.001-.005.002-.005.055-.177.001-.005.002-.005.052-.177.002-.005.001-.005.051-.178.001-.005.002-.005.048-.179.002-.005v-.005l.047-.179.001-.005.002-.005.044-.18v-.005l.002-.005.042-.18.001-.006.001-.005.04-.181.001-.005.001-.005.037-.182.002-.005v-.005l.036-.182v-.006l.002-.005.033-.182v-.006l.002-.005.03-.183.001-.005.001-.005.029-.184v-.005l.001-.006.027-.184v-.005l.001-.005.024-.185v-.005l.001-.005.022-.185v-.006l.001-.005.02-.185v-.006l.001-.005.017-.186v-.005l.001-.005.015-.187v-.005l.001-.005.013-.187v-.01l.01-.187.001-.006v-.005l.009-.187v-.011l.006-.187v-.011l.004-.188v-.011l.001-.188v-.01l-.001-.188v-.011l-.004-.188v-.011l-.006-.187v-.011l-.007-.145-.022-.16-.05-.152-.08-.141-.103-.124-.125-.102-.141-.077-.153-.05-.16-.02zM.938 15L.777 15l-.158.032-.15.06-.136.087-.117.11-.095.131-.068.146-.04.156-.012.133-.001.14v.01l.001.188v.011l.004.188v.011l.006.187v.011l.008.187v.011l.011.187v.005l.001.005.013.187v.01l.016.187v.01l.018.186v.011l.02.185.001.005v.006l.022.185.001.005v.005l.025.185v.005l.001.005.027.184v.006l.001.005.029.184v.005l.001.005.031.183.001.005.001.006.033.182.001.005.001.006.035.182.001.005.001.005.038.182v.005l.002.005.04.181v.005l.002.005.042.18.001.006.001.005.044.18.002.005v.005l.047.18.001.004.002.005.048.179.002.005.001.005.05.178.002.005.001.005.053.177.002.005.001.005.055.177.002.005.001.005.057.176.002.005.001.005.06.175.001.005.002.005.061.174.002.005.002.005.063.173.002.005.002.005.065.173.002.005.002.004.067.172.002.005.002.005.07.171.002.005.002.005.072.17.002.005.002.004.074.17.002.005.002.004.076.169.002.004.002.005.078.168.002.004.002.005.08.167.003.004.002.005.082.166.002.004.003.005.02.04.086.136.11.118.13.095.146.07.156.041.16.012.16-.019.155-.048.142-.075.126-.1.105-.123.08-.14.054-.152.024-.16-.006-.16-.036-.158-.051-.123-.018-.034-.078-.158L3.1 22.1l-.074-.16-.071-.157-.07-.16-.068-.16-.067-.165-.062-.158-.062-.164-.059-.161-.058-.166-.056-.166-.053-.164-.052-.168-.05-.167-.048-.17-.045-.165-.043-.168-.043-.172-.039-.17-.037-.17-.036-.172-.033-.17-.03-.173-.03-.174-.027-.17-.025-.175-.022-.174-.021-.175-.018-.175-.017-.173-.014-.176-.012-.176-.01-.177-.007-.176-.006-.177-.003-.178L1.73 16v-.134l-.013-.16-.044-.156-.072-.144-.097-.129-.12-.108-.137-.085-.15-.057L.938 15zm26.798 2.024l-.16.007-.157.038-.148.066-.132.092-.113.115-.09.134-.062.148-.03.127-.001.004-.023.134-.024.133-.026.133-.026.13-.03.132-.03.129-.032.134-.033.128-.035.13-.037.128-.038.13-.04.126-.04.128-.044.128-.044.126-.046.126-.048.126-.05.125-.05.125-.051.122-.054.123-.055.122-.056.12-.058.122-.06.12-.061.12-.063.119-.062.116-.067.119-.066.116-.069.115-.069.115-.07.113-.073.113-.074.112-.076.113-.077.112-.077.107-.08.11-.08.107-.085.11-.044.056-.088.135-.06.15-.033.158-.002.16.027.16.057.15.083.138.108.12.128.098.144.072.155.045.16.015.161-.016.155-.044.144-.073.128-.098.09-.099.05-.061.003-.004.003-.005.089-.115.003-.004.003-.005.088-.116.003-.004.003-.005.086-.117.003-.004.003-.005.084-.118.003-.004.003-.005.083-.12.003-.004.003-.004.081-.12.003-.005.003-.004.08-.121.003-.005.003-.004.078-.122.003-.005.003-.004.077-.123.002-.005.003-.004.075-.124.003-.005.003-.004.073-.125.003-.005.003-.004.072-.126.002-.004.003-.005.07-.126.003-.005.002-.005.07-.127.002-.004.002-.005.068-.128.002-.005.002-.004.066-.13.003-.004.002-.005.064-.13.002-.004.003-.005.062-.13.002-.005.003-.005.06-.13.003-.005.002-.005.06-.132.002-.005.002-.005.057-.132.003-.005.002-.005.056-.133.002-.005.002-.005.054-.134.002-.004.002-.005.053-.135.002-.005.002-.005.051-.135.002-.005.002-.005.05-.135.001-.005.002-.005.048-.137.001-.005.002-.005.046-.137.002-.005.002-.005.044-.137.002-.005.002-.005.042-.138.002-.005.001-.006.042-.138.001-.005.002-.005.04-.14V19.4l.002-.005.038-.14.001-.005.002-.005.036-.14.001-.005.001-.005.035-.141.001-.005.001-.005.033-.142.001-.005.001-.005.031-.141.001-.006.002-.005.029-.142v-.005l.002-.005.028-.143v-.005l.002-.005.025-.143.001-.006.001-.005.024-.143.001-.005.001-.006.001-.006.01-.161-.02-.16-.05-.154-.077-.141-.102-.125-.123-.104-.141-.079-.153-.051-.16-.022zM6.841 22.71l-.16.024-.152.053-.14.08-.122.105-.101.126-.076.142-.048.154-.018.16.011.161.041.156.07.146.077.109.04.048.003.004.003.004.095.111.003.004.004.004.096.11.004.005.003.004.098.109.003.004.004.004.1.108.003.004.003.004.101.107.004.004.003.004.102.105.004.004.004.004.103.105.004.004.004.003.105.104.003.004.004.003.106.102.004.004.004.004.107.1.004.004.004.004.108.099.004.003.004.004.11.098.003.003.004.004.11.096.004.003.005.004.11.095.005.003.004.004.113.093.004.003.004.004.113.091.004.004.005.003.114.09.004.004.004.003.116.089.004.003.004.003.117.088.004.003.004.003.118.086.004.003.005.003.118.084.004.003.005.003.119.083.004.003.005.003.12.081.005.003.004.003.121.08.005.003.004.003.122.078.005.003.004.003.123.076.005.003.004.003.124.075.005.003.004.003.125.073.004.003.005.002.126.073.004.002.005.003.126.07.005.003.004.002.128.07.004.002.005.002.128.067.005.003.004.002.13.066.004.002.005.003.13.064.004.002.005.003.13.062.005.002.004.003.132.06.004.003.005.002.132.06.005.002.005.002.132.057.005.002.005.002.133.057.005.002.005.002.133.054.005.002.005.002.13.05.154.045.16.016.16-.015.156-.045.144-.072.128-.098.108-.12.083-.138.057-.15.028-.16-.003-.16-.032-.159-.061-.149-.088-.135-.11-.117-.132-.094-.12-.058-.124-.049-.126-.051-.122-.051-.122-.054-.12-.054-.126-.058-.119-.057-.12-.06-.12-.06-.118-.063-.117-.064-.119-.066-.116-.066-.115-.068-.115-.07-.113-.07-.115-.074-.112-.074-.11-.075-.11-.076-.112-.08-.11-.08-.109-.081-.106-.082-.104-.082-.106-.086-.105-.087-.101-.086-.105-.091-.1-.09-.1-.091-.1-.094-.097-.094-.1-.098-.093-.095-.096-.1-.093-.098-.092-.101-.089-.1-.09-.102-.088-.104-.036-.043-.114-.114-.133-.091-.148-.065-.157-.036-.161-.006zm15.063 2.701l-.16.014-.156.044-.12.057-.06.034-.12.066-.117.064-.118.062-.12.061-.12.06-.118.057-.126.058-.12.054-.122.054-.122.05-.126.052-.125.05-.124.046-.127.047-.125.044-.129.043-.126.04-.13.042-.128.038-.127.035-.13.036-.131.034-.129.031-.132.03-.13.03-.135.027-.133.026-.13.023-.13.022-.137.021-.132.02-.134.017-.132.015-.138.015-.135.013-.133.01-.138.01-.136.007-.134.006-.136.004-.14.003-.16.018-.155.047-.142.076-.127.1-.105.122-.08.14-.054.151-.025.16.006.16.035.158.064.148.09.134.114.114.133.092.147.065.157.036.134.008.145-.002h.011l.147-.005h.01l.147-.007h.011l.146-.009h.011l.146-.01h.005l.005-.001.146-.012h.011l.145-.014h.005l.006-.001.145-.016h.011l.144-.018h.006l.005-.001.144-.02h.011l.144-.021.005-.001h.006l.143-.023.006-.001h.005l.143-.025h.005l.006-.002.143-.026h.005l.005-.002.143-.027.005-.001.005-.001.142-.03h.005l.005-.002.142-.03.005-.002.005-.001.142-.033.005-.001.005-.001.14-.035.006-.001.005-.001.14-.037h.005l.005-.002.14-.038.005-.002h.005l.14-.04.005-.002.005-.001.138-.042.005-.001.006-.002.138-.043.005-.001.005-.002.137-.044.005-.002.005-.002.137-.046.005-.002.005-.001.137-.048.005-.002.005-.002.135-.05.005-.001.005-.002.135-.051.005-.002.005-.002.135-.053.005-.002.004-.002.134-.054.005-.002.005-.002.133-.057.005-.002.005-.002.132-.057.005-.003.005-.002.132-.06.005-.001.004-.002.131-.061.005-.003.005-.002.13-.062.005-.003.005-.002.13-.064.004-.003.005-.002.128-.066.005-.002.005-.003.128-.067.005-.002.004-.003.127-.069.005-.002.005-.003.126-.07.005-.003.004-.003.065-.037.132-.093.112-.115.089-.135.062-.149.034-.157.003-.161-.026-.16-.055-.15-.082-.14-.107-.12-.127-.1-.144-.073-.154-.046-.16-.016zM6.33 26.818l-.16.023-.152.053-.14.08-.122.105-.101.126-.076.142-.048.154-.02.16.012.161.041.156.07.146.094.13.096.093.032.026.004.003.004.004.145.117.004.003.004.004.146.115.005.003.004.004.147.113.005.003.004.004.149.111.004.003.004.003.15.11.005.003.004.003.151.108.004.003.005.003.152.106.005.003.004.003.154.104.004.003.005.003.154.102.005.002.004.003.156.1.005.003.004.003.157.098.005.003.004.002.159.096.004.003.005.003.16.094.004.003.004.002.16.092.005.003.005.002.161.09.005.003.005.002.162.088.005.003.004.002.164.086.005.003.004.002.165.084.005.003.004.002.166.082.004.002.005.003.167.08.004.002.005.002.168.078.004.002.005.002.168.076.005.002.005.002.17.074.004.002.005.002.17.072.005.002.005.002.17.07.006.002.005.001.171.068.005.002.005.002.173.065.005.002.005.002.173.063.005.002.005.002.174.06.005.003.005.001.175.06.005.001.005.002.176.057.005.001.005.002.176.055.006.001.005.002.177.052.005.002.005.001.178.05.005.002.005.002.178.048.006.001.005.002.179.046.005.001.005.002.18.044h.005l.005.002.18.042.006.001.005.001.159.035.16.02.16-.01.157-.04.146-.069.13-.094.112-.117.087-.136.06-.149.033-.158.002-.161-.028-.159-.057-.15-.084-.138-.108-.12-.128-.098-.144-.072-.128-.039-.154-.033-.168-.04-.171-.041-.17-.044-.168-.046-.167-.047-.168-.05-.165-.051-.166-.054-.166-.056-.163-.057-.165-.06-.161-.062-.164-.064-.16-.065-.16-.068-.162-.07-.157-.07-.157-.074-.157-.075-.156-.077-.153-.079-.156-.082-.153-.082-.154-.086-.15-.086-.152-.09-.148-.09-.147-.092-.149-.095-.145-.095-.144-.098-.145-.1-.143-.102-.14-.103-.14-.104-.14-.108-.139-.11-.136-.11-.027-.022-.133-.091-.148-.065-.157-.036-.161-.006zm19.215.087l-.16.01-.157.039-.146.067-.11.076-.064.051-.139.11-.14.108-.14.104-.14.103-.143.101-.145.101-.144.098-.145.095-.149.095-.148.093-.147.089-.152.09-.15.086-.154.086-.153.082-.156.082-.153.079-.156.077-.157.075-.158.073-.157.071-.16.07-.16.068-.161.065-.164.064-.161.061-.165.06-.163.058-.166.056-.166.054-.166.051-.167.05-.167.047-.17.046-.168.044-.171.042-.168.039-.17.037-.11.023-.154.047-.143.075-.126.1-.106.122-.081.139-.054.152-.025.16.006.16.035.158.063.148.09.133.114.115.132.092.148.065.157.037.16.007.133-.016.115-.024.005-.001.005-.001.181-.04h.005l.005-.002.18-.042.006-.001.005-.001.18-.044.005-.002.005-.001.18-.046.004-.002h.005l.179-.05h.005l.005-.002.178-.05.005-.002.005-.002.177-.052.005-.002.005-.001.177-.055.005-.002.005-.001.176-.057.005-.002.005-.002.175-.059.005-.001.005-.002.174-.061.005-.002.005-.002.173-.063.005-.002.005-.002.173-.065.004-.002.005-.002.172-.068.005-.002.005-.002.171-.07.005-.001.005-.002.17-.072.005-.002.004-.002.17-.074.005-.002.004-.002.169-.076.004-.002.005-.002.168-.078.004-.002.005-.003.167-.08.004-.002.005-.002.166-.082.004-.002.005-.003.165-.084.004-.002.005-.003.163-.086.005-.002.005-.003.162-.088.005-.002.005-.003.161-.09.005-.002.004-.003.16-.092.005-.003.005-.002.16-.094.004-.003.004-.003.158-.096.005-.002.004-.003.158-.098.004-.003.005-.003.156-.1.004-.003.004-.003.155-.101.005-.003.004-.003.154-.104.004-.003.004-.003.153-.106.004-.003.005-.003.151-.108.004-.003.005-.003.15-.11.004-.003.004-.003.149-.112.004-.003.004-.003.148-.113.004-.004.004-.003.147-.115.004-.004.004-.003.068-.055.116-.113.092-.132.066-.147.038-.157.008-.16-.022-.16-.05-.153-.08-.14-.103-.125-.124-.102-.142-.077-.153-.05-.16-.02z"
  514. })));
  515. function _extends$L() { _extends$L = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends$L.apply(this, arguments); }
  516. var IntermediateEventCatchNonInterruptingMultipleIcon = (({
  517. styles = {},
  518. ...props
  519. }) => /*#__PURE__*/React__default["default"].createElement("svg", _extends$L({
  520. xmlns: "http://www.w3.org/2000/svg",
  521. width: "32",
  522. height: "32"
  523. }, props), /*#__PURE__*/React__default["default"].createElement("path", {
  524. d: "M23.637 13.902l-7.625-5.535-7.624 5.535 2.912 8.956h9.425l2.912-8.956zm-1.017.33l-2.524 7.762H11.93l-2.524-7.762 6.607-4.796 6.608 4.796zM16.012.311c-1.448.02-2.93.157-4.302.628-.852.447-.255 1.863.66 1.574 2.255-.608 4.648-.607 6.922-.108.934.075 1.228-1.376.338-1.67C18.451.44 17.227.317 16.012.311zm9.012 2.934c-.913-.104-1.272 1.258-.454 1.648 1.834 1.36 3.293 3.185 4.31 5.22.526.776 1.842.098 1.515-.78a15.522 15.522 0 00-5.06-6.006c-.1-.044-.203-.07-.31-.082zM6.65 3.59c-.762.089-1.24.809-1.805 1.267C3.38 6.295 2.163 8.007 1.37 9.905c-.266.898 1.094 1.484 1.564.675a14.825 14.825 0 014.327-5.56c.476-.515.09-1.419-.612-1.431zm9.362.007c-.698.066-1.689-.16-2.033.635-.282.733.535 1.358 1.217 1.125 1.806-.147 3.63.203 5.293.907.902.255 1.472-1.112.656-1.573-1.6-.735-3.374-1.089-5.133-1.094zm-5.479 1.365c-.835.15-1.517.76-2.21 1.226-1.203.94-2.318 2.061-3.057 3.402-.33.904 1.063 1.552 1.547.723 1.045-1.656 2.596-2.925 4.285-3.873.545-.499.171-1.463-.565-1.478zm13.903 2.115c-.875-.07-1.22 1.173-.501 1.627 1.325 1.34 2.188 3.062 2.748 4.84.468.84 1.869.21 1.557-.699-.604-2.118-1.751-4.097-3.351-5.615a.93.93 0 00-.453-.153zM4.467 13.132c-.822-.07-.996.826-1.046 1.455-.256 1.93-.094 3.933.562 5.769.406.844 1.807.365 1.612-.551a11.498 11.498 0 01-.334-5.808.874.874 0 00-.794-.865zm26.687 1.6c-.746-.037-1.014.785-.879 1.395.043 2.393-.57 4.771-1.66 6.894-.31.884 1.02 1.536 1.53.75a15.632 15.632 0 001.821-8.372.876.876 0 00-.812-.667zm-30.197.571c-.782-.073-1.044.775-.933 1.404.068 2.414.661 4.833 1.809 6.962.534.77 1.842.076 1.505-.798a14.833 14.833 0 01-1.603-6.861.876.876 0 00-.778-.707zm26.787 2.024c-.777-.048-.952.797-1.021 1.392-.354 1.692-1.202 3.231-2.216 4.608-.407.872.925 1.638 1.48.852 1.361-1.733 2.296-3.827 2.582-6.017a.874.874 0 00-.825-.835zM6.857 23.012c-.808.018-1.082 1.122-.47 1.59 1.393 1.607 3.187 2.886 5.194 3.599.91.222 1.43-1.165.598-1.596a11.495 11.495 0 01-4.723-3.396.899.899 0 00-.599-.197zm15.057 2.7c-.81.194-1.504.76-2.325.972-1.203.458-2.5.536-3.758.664-.869.307-.573 1.728.346 1.663 2.201-.034 4.412-.626 6.293-1.778.604-.495.227-1.532-.556-1.521zM6.346 27.118c-.833.008-1.11 1.218-.395 1.617 1.986 1.602 4.358 2.749 6.868 3.226.933.076 1.227-1.376.338-1.67a14.838 14.838 0 01-6.345-3.066.929.929 0 00-.466-.107zm19.208.087c-.766.09-1.241.841-1.922 1.158-1.516.991-3.251 1.58-4.996 2.005-.872.405-.346 1.849.584 1.604 2.543-.526 4.98-1.66 6.963-3.344.47-.52.072-1.42-.63-1.423z"
  525. })));
  526. function _extends$K() { _extends$K = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends$K.apply(this, arguments); }
  527. var IntermediateEventCatchNonInterruptingParallelIcon = (({
  528. styles = {},
  529. ...props
  530. }) => /*#__PURE__*/React__default["default"].createElement("svg", _extends$K({
  531. xmlns: "http://www.w3.org/2000/svg",
  532. width: "32",
  533. height: "32"
  534. }, props), /*#__PURE__*/React__default["default"].createElement("path", {
  535. d: "M13.51 9.081v4.428H9.08v4.982h4.428v4.428h4.982V18.49h4.428v-4.982H18.49V9.081h-4.982zm.83.83h3.32v4.428h4.429v3.322H17.66v4.428h-3.32v-4.454H9.91v-3.296h4.428V9.911zM16 0h-.005l-.188.001h-.011l-.188.004h-.011l-.187.006h-.011l-.187.008h-.005L15.2.02l-.187.01h-.005l-.005.001-.187.013h-.011L14.62.06h-.01l-.186.018h-.011l-.185.02-.005.001h-.006l-.185.022-.005.001h-.005l-.185.025h-.005l-.005.001-.185.027h-.005l-.005.001-.184.029h-.005l-.005.001-.183.031-.006.001-.005.001-.182.033-.006.001-.005.001-.182.035-.005.001-.005.001-.182.038h-.005l-.005.002-.181.04h-.005l-.005.002-.18.042-.006.001-.005.001-.18.044-.005.002h-.005l-.17.045-.152.054-.139.082-.121.106-.1.127-.074.143-.046.155-.017.16.013.16.043.156.07.145.097.13.119.108.137.085.15.058.159.03.16-.001.133-.023.165-.043.168-.041.171-.04.171-.037.172-.036.17-.033.173-.03.17-.03.177-.027.171-.025.175-.022.175-.02.175-.02.176-.016.175-.014.177-.012.176-.01.177-.007.174-.006.177-.003L16 1.73h.177l.178.004.174.006.177.007.176.01.177.012.175.014.176.017.175.018.175.02.175.023.171.025.176.027.17.03.174.03.17.033.171.036.154.033.16.02.161-.01.156-.04.146-.069.131-.094.111-.117.087-.135.061-.15.032-.158.002-.16-.027-.16-.057-.15L20 .714l-.108-.12-.128-.097-.145-.073-.128-.038-.158-.035-.005-.001-.005-.001L19.14.31h-.005l-.005-.002-.182-.035h-.006l-.005-.002-.182-.033h-.006l-.005-.002-.183-.03-.005-.001-.006-.001-.183-.029h-.005l-.006-.001-.184-.027h-.005l-.005-.001-.185-.024h-.005L17.968.12 17.783.1l-.006-.001h-.005l-.185-.02h-.006l-.005-.001L17.39.06h-.005L17.38.06l-.187-.015h-.005l-.005-.001-.187-.013h-.011L16.8.02h-.011L16.6.01h-.011l-.187-.006h-.011L16.204 0h-.011L16.005 0H16zm9.015 2.935l-.16.004-.158.033-.15.062-.134.09-.116.111-.093.132-.067.147-.038.156-.01.161.022.16.05.153.078.141.103.124.102.087.045.034.142.106.137.105.14.11.136.11.135.112.134.115.134.117.13.115.132.122.128.12.127.122.126.125.124.126.124.128.121.13.118.128.118.132.117.133.113.134.113.136.11.136.109.137.109.142.104.14.103.14.101.142.1.144.099.146.095.145.094.147.093.15.092.15.087.149.087.15.084.152.084.155.08.152.08.155.04.081.084.138.11.119.128.096.145.072.155.043.16.013.16-.016.155-.046.144-.074.127-.099.106-.12.083-.14.055-.151.026-.16-.004-.16-.034-.158-.05-.124-.042-.085-.002-.004-.003-.005-.084-.165-.002-.004-.003-.005-.086-.164-.002-.004-.003-.005-.088-.162-.002-.005-.003-.005-.09-.161-.002-.005-.003-.004-.092-.16-.003-.005-.002-.005-.094-.16-.003-.004-.003-.004-.096-.159-.002-.004-.003-.005-.098-.157-.003-.004-.003-.005-.1-.156-.003-.004-.003-.005-.101-.154-.003-.005-.003-.004-.104-.154-.003-.004-.003-.005-.106-.152-.003-.005-.003-.004-.108-.151-.003-.004-.003-.005-.11-.15-.003-.004-.003-.004-.111-.15-.004-.003-.003-.005-.113-.147-.004-.004-.003-.005-.115-.146-.004-.004-.003-.004-.117-.145-.004-.004-.003-.004-.12-.144-.003-.004-.003-.004-.121-.142-.004-.004-.003-.004-.123-.141-.003-.004-.004-.004-.125-.14-.003-.004-.004-.004-.127-.138-.003-.004-.004-.004-.128-.136-.004-.004-.004-.004-.13-.135-.004-.004-.004-.004-.132-.134-.003-.004-.004-.003-.134-.133-.004-.003-.004-.004-.135-.13-.004-.004-.004-.004-.136-.128-.004-.004-.004-.004-.138-.126-.004-.004-.004-.003-.14-.125-.004-.004-.004-.003-.14-.123-.005-.004-.004-.003-.142-.121-.004-.004-.004-.003-.144-.12-.004-.003-.004-.003-.145-.117-.004-.004-.004-.003-.147-.115-.004-.004-.004-.003-.148-.113-.004-.003-.004-.004-.149-.111-.004-.003-.004-.004-.05-.036-.14-.083-.15-.055-.16-.027zM6.634 3.28l-.161.008-.157.037-.147.066-.111.074-.04.032-.005.003-.004.004-.145.117-.004.003-.004.004-.144.119-.004.003-.004.004-.142.12-.004.004-.004.004-.141.123-.004.003-.004.004-.14.125-.004.003-.004.004-.138.126-.004.004-.004.004-.136.128-.004.004-.004.004-.135.13-.004.004-.004.003-.134.133-.004.003-.004.004-.132.134-.003.004-.004.004-.13.135-.004.004-.004.004-.128.136-.004.004-.004.004-.126.138-.004.004-.003.004-.125.14-.004.004-.003.004-.123.14-.004.005-.003.004-.121.142-.004.004-.003.004-.12.144-.003.004-.003.004-.117.145-.004.004-.003.004-.115.146-.004.005-.003.004-.113.147-.003.005-.004.004-.111.149-.003.004-.004.004-.11.15-.002.005-.003.004-.108.151-.003.004-.003.005-.106.152-.003.005-.003.004-.104.154-.003.004-.003.005-.102.154-.003.005-.002.004-.1.156-.003.005-.003.004-.098.157-.003.005-.003.004-.096.159-.002.004-.003.005-.094.16-.003.004-.002.004-.092.16-.003.005-.003.005-.09.161-.002.005-.003.005-.088.162-.002.005-.003.004-.086.164-.002.005-.002.004-.084.165-.003.005-.002.004-.082.166-.002.004-.003.005-.08.167-.002.004-.002.005-.078.168-.002.004-.002.005-.045.1-.053.153-.023.16.007.16.037.157.065.148.092.132.114.114.134.09.148.064.157.035.161.006.16-.025.152-.054.14-.08.121-.106.1-.126.065-.118.043-.095.074-.16.075-.155.077-.157.08-.155.08-.152.083-.155.085-.152.086-.15.088-.149.091-.15.094-.15.094-.147.095-.145.099-.146.1-.144.1-.142.104-.14.104-.14.11-.142.107-.137.11-.136.114-.136.113-.134.117-.133.118-.132.117-.129.122-.13.124-.127.123-.126.127-.125.127-.122.128-.12.132-.122.13-.115.133-.117.135-.115.135-.111.136-.11.037-.03.117-.11.094-.132.068-.146.04-.156.01-.161-.02-.16-.05-.154-.076-.141-.102-.125-.123-.104-.14-.08-.153-.051-.16-.023zM16 3.286h-.005l-.148.001h-.01l-.147.003h-.011l-.147.005h-.011l-.146.007h-.011l-.146.009h-.011l-.146.01h-.005l-.005.001-.146.012h-.011l-.145.014h-.006l-.005.001-.05.006-.158.031-.15.06-.135.088-.117.111-.094.13-.069.147-.04.156-.01.16.019.16.049.154.076.142.102.125.123.105.14.08.152.051.16.023.134-.003.045-.005.135-.013.133-.01.136-.01.135-.007.137-.006.136-.004.136-.003h.274l.136.003.136.004.136.006.136.007.136.01.133.01.135.013.135.014.135.016.134.018.132.018.134.021.133.023.133.024.133.025.13.027.132.03.132.03.129.031.13.034.129.035.129.036.13.04.126.038.128.042.126.042.128.045.127.047.126.047.12.048.127.051.123.052.006.002.147.048.16.021.16-.009.157-.038.147-.067.131-.093.112-.116.089-.135.062-.149.033-.158.004-.16-.027-.16-.055-.151-.083-.139-.107-.12-.127-.099-.118-.063-.004-.001-.005-.003-.005-.002-.133-.056-.005-.002-.005-.002-.134-.054-.004-.002-.005-.002-.135-.053-.005-.002-.005-.002-.135-.051-.005-.002-.005-.002-.135-.05-.005-.001-.005-.002-.137-.048-.005-.001-.005-.002-.137-.046-.005-.002-.005-.002-.137-.044-.005-.002-.005-.001-.138-.043-.006-.002-.005-.001-.138-.042-.005-.001-.005-.002-.14-.04H19.4l-.005-.002-.14-.038-.005-.001-.005-.002-.14-.036-.005-.001-.005-.001-.141-.035-.005-.001-.005-.001-.142-.033-.005-.001-.005-.001-.142-.031-.005-.002h-.005l-.142-.03-.005-.001-.005-.001-.143-.028h-.005l-.005-.002-.143-.025-.006-.001-.005-.001-.143-.024-.005-.001-.006-.001-.143-.022-.006-.001h-.005l-.144-.022h-.005l-.006-.001-.144-.019h-.005l-.006-.001-.144-.017h-.006l-.005-.001-.145-.016h-.011l-.145-.014H17.1l-.005-.001-.146-.012h-.01l-.146-.01-.006-.001h-.005l-.146-.009h-.011l-.147-.006h-.01l-.147-.005h-.011l-.147-.003h-.011l-.147-.001H16zm-5.482 1.366l-.16.008-.157.037-.123.053-.06.032-.005.002-.004.003-.128.069-.004.002-.005.003-.126.07-.005.003-.004.002-.126.072-.005.003-.004.003-.125.073-.004.003-.005.003-.124.075-.004.003-.005.002-.123.077-.004.003-.005.003-.122.078-.004.003-.005.003-.121.08-.004.002-.005.003-.12.082-.005.003-.004.003-.12.083-.004.003-.004.003-.118.084-.005.003-.004.003-.118.086-.004.003-.004.003-.117.088-.004.003-.004.003-.116.089-.004.003-.004.004-.114.09-.005.003-.004.003-.113.092-.004.004-.004.003-.113.093-.004.004-.004.003-.111.095-.005.003-.004.004-.11.096-.004.004-.004.003-.11.098-.003.003-.004.004-.108.1-.004.003-.004.003-.107.101-.004.004-.004.003-.106.102-.004.004-.003.004-.105.103-.004.004-.004.004-.103.105-.004.004-.004.003-.102.106-.003.004-.004.004-.1.107-.004.004-.004.004-.099.108-.004.004-.003.004-.098.11-.003.003-.004.004-.096.11-.004.005-.003.004-.095.111-.003.004-.004.004-.093.113-.003.004-.004.004-.092.113-.003.004-.003.005-.09.114-.004.004-.003.004-.089.116-.003.004-.003.004-.088.117-.003.004-.003.004-.086.118-.003.004-.003.005-.084.118-.003.004-.003.005-.083.12-.003.003-.003.005-.082.12-.003.005-.002.004-.068.103-.076.142-.048.154-.018.16.011.161.041.156.07.146.095.13.117.11.136.086.15.06.158.03.162.002.158-.03.15-.057.138-.085.119-.109.082-.105.065-.099.075-.11.077-.113.077-.107.08-.11.08-.108.084-.108.083-.105.086-.106.086-.104.088-.104.089-.101.09-.102.093-.101.093-.099.094-.097.095-.096.098-.097.098-.095.099-.093.1-.092.103-.091.101-.089.104-.088.104-.086.106-.086.106-.083.106-.082.109-.082.108-.079.11-.078.11-.076.112-.076.112-.074.113-.072.113-.071.115-.07.115-.068.118-.067.117-.065.12-.065.054-.029.135-.088.116-.111.094-.132.068-.146.04-.156.009-.161-.02-.16-.05-.153-.078-.142-.102-.125-.123-.103-.141-.079-.153-.051-.16-.022zm13.91 2.116l-.162.008-.157.037-.147.066-.132.092-.113.116-.09.134-.063.148-.034.157-.005.162.025.159.055.152.082.138.086.103.09.09.094.098.092.099.093.1.091.103.089.101.088.104.086.104.086.106.083.105.083.108.08.108.081.11.077.107.077.112.075.111.075.114.072.113.071.113.07.114.068.118.067.115.065.118.064.117.062.117.061.121.059.119.059.122.056.121.054.12.055.125.051.123.051.125.048.123.048.127.047.126.044.125.043.128.042.129.039.126.038.13.022.076.058.15.085.137.11.119.129.096.145.07.155.043.16.013.161-.017.154-.046.144-.075.126-.1.106-.12.082-.14.055-.151.025-.16-.005-.16-.026-.132-.023-.082-.002-.005-.001-.005-.042-.139-.001-.005-.002-.005-.043-.138-.001-.005-.002-.005-.044-.137-.002-.005-.002-.005-.046-.137-.002-.005-.001-.005-.048-.137-.002-.005-.002-.005-.05-.135-.001-.005-.002-.005-.051-.135-.002-.005-.002-.005-.053-.135-.002-.005-.002-.005-.054-.133-.002-.005-.002-.005-.057-.133-.002-.005-.002-.005-.057-.132-.003-.005-.002-.005-.06-.132-.001-.005-.002-.004-.061-.132-.003-.004-.002-.005-.063-.13-.002-.005-.002-.005-.064-.13-.003-.004-.002-.005-.066-.129-.002-.004-.003-.005-.067-.128-.002-.005-.003-.004-.069-.128-.002-.004-.003-.005-.07-.126-.003-.005-.003-.004-.072-.126-.002-.005-.003-.004-.074-.125-.002-.004-.003-.005-.075-.124-.003-.004-.003-.005-.076-.123-.003-.004-.003-.005-.078-.122-.003-.004-.003-.005-.08-.121-.003-.004-.003-.005-.081-.12-.003-.005-.003-.004-.083-.12-.003-.004-.003-.004-.084-.118-.003-.005-.003-.004-.086-.118-.003-.004-.004-.004-.087-.117-.003-.004-.003-.004-.09-.116-.002-.004-.004-.004-.09-.114-.003-.005-.004-.004-.091-.113-.004-.004-.003-.004-.094-.113-.003-.004-.003-.004-.095-.111-.004-.004-.003-.004-.096-.11-.004-.005-.003-.004-.098-.11-.004-.003-.003-.004-.1-.108-.003-.004-.004-.004-.1-.107-.004-.004-.004-.004-.102-.106-.003-.003-.004-.004-.093-.095-.124-.103-.14-.08-.153-.05-.16-.023zM4.45 12.826l-.161.002-.158.032-.15.06-.135.088-.118.11-.094.131-.069.146-.035.129-.026.132v.005l-.002.005-.025.143-.001.005-.001.006-.024.143-.001.005-.001.006-.022.143-.001.006-.001.005-.02.144-.001.005-.001.005-.019.145v.005l-.001.006-.017.144v.006l-.001.005-.016.145v.011l-.014.145v.005l-.001.006-.012.146v.01l-.01.146-.001.006v.005l-.009.146v.011l-.007.146v.011l-.004.147v.011l-.003.147v.01l-.002.148v.01l.001.148v.01l.003.147v.011l.005.147v.01l.007.147v.011l.009.146v.011l.01.146v.01l.013.146v.011l.014.145v.005l.001.006.016.145v.011l.018.144v.006l.001.005.019.144v.006l.001.005.021.144v.005l.002.006.022.143v.006l.002.005.024.143v.005l.002.006.025.143.001.005.001.005.028.143.001.005.001.005.03.142v.005l.002.006.03.141.002.005.001.005.033.142v.005l.002.005.035.14v.006l.002.005.036.14.002.005.001.005.038.14.001.005.002.005.04.14v.005l.002.005.042.138.001.006.002.005.042.138.002.005.002.005.017.054.064.148.09.134.114.114.132.092.148.065.157.037.16.007.16-.023.153-.052.14-.08.123-.104.102-.125.076-.142.049-.153.02-.16-.011-.161-.031-.13-.017-.051-.039-.126-.038-.13-.037-.128-.035-.13-.033-.128-.033-.134-.03-.13-.029-.131-.026-.13-.026-.133-.024-.133-.023-.133-.02-.132-.02-.136-.017-.132-.016-.135-.014-.135-.012-.133-.012-.138-.009-.133-.007-.136-.006-.138-.004-.134-.003-.136v-.274l.003-.136.004-.134.006-.139.007-.136.01-.133.01-.138.013-.132.014-.135.016-.135.017-.132.02-.137.02-.13.023-.134.024-.133.024-.126.016-.16-.014-.161-.044-.155-.072-.145-.098-.128-.12-.108-.137-.084-.15-.057-.16-.029zm26.698 1.601l-.161.01-.157.04-.146.067-.131.093-.112.117-.088.135-.061.149-.033.157-.005.134.006.14.006.176.003.177.001.178-.001.177-.003.178-.006.177-.007.176-.01.177-.012.176-.015.176-.016.173-.018.175-.02.175-.024.174-.025.175-.026.17-.03.174-.03.173-.033.17-.036.172-.037.17-.04.17-.042.172-.043.168-.045.166-.048.169-.05.167-.052.168-.053.164-.056.166-.058.166-.06.16-.062.165-.062.158-.066.165-.068.16-.07.16-.07.158-.075.159-.074.155-.079.158-.08.158-.06.15-.03.158-.001.161.029.159.058.15.085.137.108.119.13.097.144.07.156.044.16.013.16-.017.155-.046.143-.074.127-.1.107-.12.07-.115.083-.164.003-.005.002-.004.082-.166.002-.005.003-.004.08-.167.002-.005.002-.004.078-.168.002-.005.002-.004.076-.169.002-.004.002-.005.074-.17.002-.004.002-.005.072-.17.002-.005.002-.005.07-.171.001-.005.002-.005.068-.172.002-.004.002-.005.065-.173.002-.005.002-.005.063-.173.002-.005.002-.005.06-.174.003-.005.001-.005.06-.175.001-.005.002-.005.057-.176.001-.005.002-.005.055-.177.001-.005.002-.005.052-.177.002-.005.001-.005.051-.178.001-.005.002-.005.048-.179.002-.005v-.005l.047-.179.001-.005.002-.005.044-.18v-.005l.002-.005.042-.18.001-.006.001-.005.04-.181.001-.005.001-.005.037-.182.002-.005v-.005l.036-.182v-.006l.002-.005.033-.182v-.006l.002-.005.03-.183.001-.005.001-.005.029-.184v-.005l.001-.006.027-.184v-.005l.001-.005.024-.185v-.005l.001-.005.022-.185v-.006l.001-.005.02-.185v-.006l.001-.005.017-.186v-.005l.001-.005.015-.187v-.005l.001-.005.013-.187v-.01l.01-.187.001-.006v-.005l.009-.187v-.011l.006-.187v-.011l.004-.188v-.011l.001-.188v-.01l-.001-.188v-.011l-.004-.188v-.011l-.006-.187v-.011l-.007-.145-.022-.16-.05-.152-.08-.141-.103-.124-.125-.102-.141-.077-.153-.05-.16-.02zM.938 15L.777 15l-.158.032-.15.06-.136.087-.117.11-.095.131-.068.146-.04.156-.012.133-.001.14v.01l.001.188v.011l.004.188v.011l.006.187v.011l.008.187v.011l.011.187v.005l.001.005.013.187v.01l.016.187v.01l.018.186v.011l.02.185.001.005v.006l.022.185.001.005v.005l.025.185v.005l.001.005.027.184v.006l.001.005.029.184v.005l.001.005.031.183.001.005.001.006.033.182.001.005.001.006.035.182.001.005.001.005.038.182v.005l.002.005.04.181v.005l.002.005.042.18.001.006.001.005.044.18.002.005v.005l.047.18.001.004.002.005.048.179.002.005.001.005.05.178.002.005.001.005.053.177.002.005.001.005.055.177.002.005.001.005.057.176.002.005.001.005.06.175.001.005.002.005.061.174.002.005.002.005.063.173.002.005.002.005.065.173.002.005.002.004.067.172.002.005.002.005.07.171.002.005.002.005.072.17.002.005.002.004.074.17.002.005.002.004.076.169.002.004.002.005.078.168.002.004.002.005.08.167.003.004.002.005.082.166.002.004.003.005.02.04.086.136.11.118.13.095.146.07.156.041.16.012.16-.019.155-.048.142-.075.126-.1.105-.123.08-.14.054-.152.024-.16-.006-.16-.036-.158-.051-.123-.018-.034-.078-.158L3.1 22.1l-.074-.16-.071-.157-.07-.16-.068-.16-.067-.165-.062-.158-.062-.164-.059-.161-.058-.166-.056-.166-.053-.164-.052-.168-.05-.167-.048-.17-.045-.165-.043-.168-.043-.172-.039-.17-.037-.17-.036-.172-.033-.17-.03-.173-.03-.174-.027-.17-.025-.175-.022-.174-.021-.175-.018-.175-.017-.173-.014-.176-.012-.176-.01-.177-.007-.176-.006-.177-.003-.178L1.73 16v-.134l-.013-.16-.044-.156-.072-.144-.097-.129-.12-.108-.137-.085-.15-.057L.938 15zm26.798 2.024l-.16.007-.157.038-.148.066-.132.092-.113.115-.09.134-.062.148-.03.127-.001.004-.023.134-.024.133-.026.133-.026.13-.03.132-.03.129-.032.134-.033.128-.035.13-.037.128-.038.13-.04.126-.04.128-.044.128-.044.126-.046.126-.048.126-.05.125-.05.125-.051.122-.054.123-.055.122-.056.12-.058.122-.06.12-.061.12-.063.119-.062.116-.067.119-.066.116-.069.115-.069.115-.07.113-.073.113-.074.112-.076.113-.077.112-.077.107-.08.11-.08.107-.085.11-.044.056-.088.135-.06.15-.033.158-.002.16.027.16.057.15.083.138.108.12.128.098.144.072.155.045.16.015.161-.016.155-.044.144-.073.128-.098.09-.099.05-.061.003-.004.003-.005.089-.115.003-.004.003-.005.088-.116.003-.004.003-.005.086-.117.003-.004.003-.005.084-.118.003-.004.003-.005.083-.12.003-.004.003-.004.081-.12.003-.005.003-.004.08-.121.003-.005.003-.004.078-.122.003-.005.003-.004.077-.123.002-.005.003-.004.075-.124.003-.005.003-.004.073-.125.003-.005.003-.004.072-.126.002-.004.003-.005.07-.126.003-.005.002-.005.07-.127.002-.004.002-.005.068-.128.002-.005.002-.004.066-.13.003-.004.002-.005.064-.13.002-.004.003-.005.062-.13.002-.005.003-.005.06-.13.003-.005.002-.005.06-.132.002-.005.002-.005.057-.132.003-.005.002-.005.056-.133.002-.005.002-.005.054-.134.002-.004.002-.005.053-.135.002-.005.002-.005.051-.135.002-.005.002-.005.05-.135.001-.005.002-.005.048-.137.001-.005.002-.005.046-.137.002-.005.002-.005.044-.137.002-.005.002-.005.042-.138.002-.005.001-.006.042-.138.001-.005.002-.005.04-.14V19.4l.002-.005.038-.14.001-.005.002-.005.036-.14.001-.005.001-.005.035-.141.001-.005.001-.005.033-.142.001-.005.001-.005.031-.141.001-.006.002-.005.029-.142v-.005l.002-.005.028-.143v-.005l.002-.005.025-.143.001-.006.001-.005.024-.143.001-.005.001-.006.001-.006.01-.161-.02-.16-.05-.154-.077-.141-.102-.125-.123-.104-.141-.079-.153-.051-.16-.022zM6.841 22.71l-.16.024-.152.053-.14.08-.122.105-.101.126-.076.142-.048.154-.018.16.011.161.041.156.07.146.077.109.04.048.003.004.003.004.095.111.003.004.004.004.096.11.004.005.003.004.098.109.003.004.004.004.1.108.003.004.003.004.101.107.004.004.003.004.102.105.004.004.004.004.103.105.004.004.004.003.105.104.003.004.004.003.106.102.004.004.004.004.107.1.004.004.004.004.108.099.004.003.004.004.11.098.003.003.004.004.11.096.004.003.005.004.11.095.005.003.004.004.113.093.004.003.004.004.113.091.004.004.005.003.114.09.004.004.004.003.116.089.004.003.004.003.117.088.004.003.004.003.118.086.004.003.005.003.118.084.004.003.005.003.119.083.004.003.005.003.12.081.005.003.004.003.121.08.005.003.004.003.122.078.005.003.004.003.123.076.005.003.004.003.124.075.005.003.004.003.125.073.004.003.005.002.126.073.004.002.005.003.126.07.005.003.004.002.128.07.004.002.005.002.128.067.005.003.004.002.13.066.004.002.005.003.13.064.004.002.005.003.13.062.005.002.004.003.132.06.004.003.005.002.132.06.005.002.005.002.132.057.005.002.005.002.133.057.005.002.005.002.133.054.005.002.005.002.13.05.154.045.16.016.16-.015.156-.045.144-.072.128-.098.108-.12.083-.138.057-.15.028-.16-.003-.16-.032-.159-.061-.149-.088-.135-.11-.117-.132-.094-.12-.058-.124-.049-.126-.051-.122-.051-.122-.054-.12-.054-.126-.058-.119-.057-.12-.06-.12-.06-.118-.063-.117-.064-.119-.066-.116-.066-.115-.068-.115-.07-.113-.07-.115-.074-.112-.074-.11-.075-.11-.076-.112-.08-.11-.08-.109-.081-.106-.082-.104-.082-.106-.086-.105-.087-.101-.086-.105-.091-.1-.09-.1-.091-.1-.094-.097-.094-.1-.098-.093-.095-.096-.1-.093-.098-.092-.101-.089-.1-.09-.102-.088-.104-.036-.043-.114-.114-.133-.091-.148-.065-.157-.036-.161-.006zm15.063 2.701l-.16.014-.156.044-.12.057-.06.034-.12.066-.117.064-.118.062-.12.061-.12.06-.118.057-.126.058-.12.054-.122.054-.122.05-.126.052-.125.05-.124.046-.127.047-.125.044-.129.043-.126.04-.13.042-.128.038-.127.035-.13.036-.131.034-.129.031-.132.03-.13.03-.135.027-.133.026-.13.023-.13.022-.137.021-.132.02-.134.017-.132.015-.138.015-.135.013-.133.01-.138.01-.136.007-.134.006-.136.004-.14.003-.16.018-.155.047-.142.076-.127.1-.105.122-.08.14-.054.151-.025.16.006.16.035.158.064.148.09.134.114.114.133.092.147.065.157.036.134.008.145-.002h.011l.147-.005h.01l.147-.007h.011l.146-.009h.011l.146-.01h.005l.005-.001.146-.012h.011l.145-.014h.005l.006-.001.145-.016h.011l.144-.018h.006l.005-.001.144-.02h.011l.144-.021.005-.001h.006l.143-.023.006-.001h.005l.143-.025h.005l.006-.002.143-.026h.005l.005-.002.143-.027.005-.001.005-.001.142-.03h.005l.005-.002.142-.03.005-.002.005-.001.142-.033.005-.001.005-.001.14-.035.006-.001.005-.001.14-.037h.005l.005-.002.14-.038.005-.002h.005l.14-.04.005-.002.005-.001.138-.042.005-.001.006-.002.138-.043.005-.001.005-.002.137-.044.005-.002.005-.002.137-.046.005-.002.005-.001.137-.048.005-.002.005-.002.135-.05.005-.001.005-.002.135-.051.005-.002.005-.002.135-.053.005-.002.004-.002.134-.054.005-.002.005-.002.133-.057.005-.002.005-.002.132-.057.005-.003.005-.002.132-.06.005-.001.004-.002.131-.061.005-.003.005-.002.13-.062.005-.003.005-.002.13-.064.004-.003.005-.002.128-.066.005-.002.005-.003.128-.067.005-.002.004-.003.127-.069.005-.002.005-.003.126-.07.005-.003.004-.003.065-.037.132-.093.112-.115.089-.135.062-.149.034-.157.003-.161-.026-.16-.055-.15-.082-.14-.107-.12-.127-.1-.144-.073-.154-.046-.16-.016zM6.33 26.818l-.16.023-.152.053-.14.08-.122.105-.101.126-.076.142-.048.154-.02.16.012.161.041.156.07.146.094.13.096.093.032.026.004.003.004.004.145.117.004.003.004.004.146.115.005.003.004.004.147.113.005.003.004.004.149.111.004.003.004.003.15.11.005.003.004.003.151.108.004.003.005.003.152.106.005.003.004.003.154.104.004.003.005.003.154.102.005.002.004.003.156.1.005.003.004.003.157.098.005.003.004.002.159.096.004.003.005.003.16.094.004.003.004.002.16.092.005.003.005.002.161.09.005.003.005.002.162.088.005.003.004.002.164.086.005.003.004.002.165.084.005.003.004.002.166.082.004.002.005.003.167.08.004.002.005.002.168.078.004.002.005.002.168.076.005.002.005.002.17.074.004.002.005.002.17.072.005.002.005.002.17.07.006.002.005.001.171.068.005.002.005.002.173.065.005.002.005.002.173.063.005.002.005.002.174.06.005.003.005.001.175.06.005.001.005.002.176.057.005.001.005.002.176.055.006.001.005.002.177.052.005.002.005.001.178.05.005.002.005.002.178.048.006.001.005.002.179.046.005.001.005.002.18.044h.005l.005.002.18.042.006.001.005.001.159.035.16.02.16-.01.157-.04.146-.069.13-.094.112-.117.087-.136.06-.149.033-.158.002-.161-.028-.159-.057-.15-.084-.138-.108-.12-.128-.098-.144-.072-.128-.039-.154-.033-.168-.04-.171-.041-.17-.044-.168-.046-.167-.047-.168-.05-.165-.051-.166-.054-.166-.056-.163-.057-.165-.06-.161-.062-.164-.064-.16-.065-.16-.068-.162-.07-.157-.07-.157-.074-.157-.075-.156-.077-.153-.079-.156-.082-.153-.082-.154-.086-.15-.086-.152-.09-.148-.09-.147-.092-.149-.095-.145-.095-.144-.098-.145-.1-.143-.102-.14-.103-.14-.104-.14-.108-.139-.11-.136-.11-.027-.022-.133-.091-.148-.065-.157-.036-.161-.006zm19.215.087l-.16.01-.157.039-.146.067-.11.076-.064.051-.139.11-.14.108-.14.104-.14.103-.143.101-.145.101-.144.098-.145.095-.149.095-.148.093-.147.089-.152.09-.15.086-.154.086-.153.082-.156.082-.153.079-.156.077-.157.075-.158.073-.157.071-.16.07-.16.068-.161.065-.164.064-.161.061-.165.06-.163.058-.166.056-.166.054-.166.051-.167.05-.167.047-.17.046-.168.044-.171.042-.168.039-.17.037-.11.023-.154.047-.143.075-.126.1-.106.122-.081.139-.054.152-.025.16.006.16.035.158.063.148.09.133.114.115.132.092.148.065.157.037.16.007.133-.016.115-.024.005-.001.005-.001.181-.04h.005l.005-.002.18-.042.006-.001.005-.001.18-.044.005-.002.005-.001.18-.046.004-.002h.005l.179-.05h.005l.005-.002.178-.05.005-.002.005-.002.177-.052.005-.002.005-.001.177-.055.005-.002.005-.001.176-.057.005-.002.005-.002.175-.059.005-.001.005-.002.174-.061.005-.002.005-.002.173-.063.005-.002.005-.002.173-.065.004-.002.005-.002.172-.068.005-.002.005-.002.171-.07.005-.001.005-.002.17-.072.005-.002.004-.002.17-.074.005-.002.004-.002.169-.076.004-.002.005-.002.168-.078.004-.002.005-.003.167-.08.004-.002.005-.002.166-.082.004-.002.005-.003.165-.084.004-.002.005-.003.163-.086.005-.002.005-.003.162-.088.005-.002.005-.003.161-.09.005-.002.004-.003.16-.092.005-.003.005-.002.16-.094.004-.003.004-.003.158-.096.005-.002.004-.003.158-.098.004-.003.005-.003.156-.1.004-.003.004-.003.155-.101.005-.003.004-.003.154-.104.004-.003.004-.003.153-.106.004-.003.005-.003.151-.108.004-.003.005-.003.15-.11.004-.003.004-.003.149-.112.004-.003.004-.003.148-.113.004-.004.004-.003.147-.115.004-.004.004-.003.068-.055.116-.113.092-.132.066-.147.038-.157.008-.16-.022-.16-.05-.153-.08-.14-.103-.125-.124-.102-.142-.077-.153-.05-.16-.02z",
  536. opacity: ".98"
  537. })));
  538. function _extends$J() { _extends$J = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends$J.apply(this, arguments); }
  539. var IntermediateEventCatchNonInterruptingSignalIcon = (({
  540. styles = {},
  541. ...props
  542. }) => /*#__PURE__*/React__default["default"].createElement("svg", _extends$J({
  543. xmlns: "http://www.w3.org/2000/svg",
  544. width: "32",
  545. height: "32"
  546. }, props), /*#__PURE__*/React__default["default"].createElement("path", {
  547. d: "M16.012 8.816L9.21 21.026h13.606l-6.803-12.21zm0 1.776l5.332 9.57H10.681l5.331-9.57zm0-10.281c-1.448.02-2.93.157-4.302.628-.852.447-.255 1.863.66 1.574 2.255-.608 4.648-.607 6.922-.108.934.075 1.228-1.376.338-1.67C18.451.44 17.227.317 16.012.311zm9.012 2.934c-.913-.104-1.272 1.258-.454 1.648 1.834 1.36 3.293 3.185 4.31 5.22.526.776 1.842.098 1.515-.78a15.522 15.522 0 00-5.06-6.006c-.1-.044-.203-.07-.31-.082zM6.65 3.59c-.762.089-1.24.809-1.805 1.267C3.38 6.295 2.163 8.007 1.37 9.905c-.266.898 1.094 1.484 1.564.675a14.825 14.825 0 014.327-5.56c.476-.515.09-1.419-.612-1.431zm9.362.007c-.698.066-1.689-.16-2.033.635-.282.733.535 1.358 1.217 1.125 1.806-.147 3.63.203 5.293.907.902.255 1.472-1.112.656-1.573-1.6-.735-3.374-1.089-5.133-1.094zm-5.479 1.365c-.835.15-1.517.76-2.21 1.226-1.203.94-2.318 2.061-3.057 3.402-.33.904 1.063 1.552 1.547.723 1.045-1.656 2.596-2.925 4.285-3.873.545-.499.171-1.463-.565-1.478zm13.903 2.115c-.875-.07-1.22 1.173-.501 1.627 1.325 1.34 2.188 3.062 2.748 4.84.468.84 1.869.21 1.557-.699-.604-2.118-1.751-4.097-3.351-5.615a.93.93 0 00-.453-.153zM4.467 13.132c-.822-.07-.996.826-1.046 1.455-.256 1.93-.094 3.933.562 5.769.406.844 1.807.365 1.612-.551a11.498 11.498 0 01-.334-5.808.874.874 0 00-.794-.865zm26.687 1.6c-.746-.037-1.014.785-.879 1.395.043 2.393-.57 4.771-1.66 6.894-.31.884 1.02 1.536 1.53.75a15.632 15.632 0 001.821-8.372.876.876 0 00-.812-.667zm-30.197.571c-.782-.073-1.044.775-.933 1.404.068 2.414.661 4.833 1.809 6.962.534.77 1.842.076 1.505-.798a14.833 14.833 0 01-1.603-6.861.876.876 0 00-.778-.707zm26.787 2.024c-.777-.048-.952.797-1.021 1.392-.354 1.692-1.202 3.231-2.216 4.608-.407.872.925 1.638 1.48.852 1.361-1.733 2.296-3.827 2.582-6.017a.874.874 0 00-.825-.835zM6.857 23.012c-.808.018-1.082 1.122-.47 1.59 1.393 1.607 3.187 2.886 5.194 3.599.91.222 1.43-1.165.598-1.596a11.495 11.495 0 01-4.723-3.396.899.899 0 00-.599-.197zm15.057 2.7c-.81.194-1.504.76-2.325.972-1.203.458-2.5.536-3.758.664-.869.307-.573 1.728.346 1.663 2.201-.034 4.412-.626 6.293-1.778.604-.495.227-1.532-.556-1.521zM6.346 27.118c-.833.008-1.11 1.218-.395 1.617 1.986 1.602 4.358 2.749 6.868 3.226.933.076 1.227-1.376.338-1.67a14.838 14.838 0 01-6.345-3.066.929.929 0 00-.466-.107zm19.208.087c-.766.09-1.241.841-1.922 1.158-1.516.991-3.251 1.58-4.996 2.005-.872.405-.346 1.849.584 1.604 2.543-.526 4.98-1.66 6.963-3.344.47-.52.072-1.42-.63-1.423z"
  548. })));
  549. function _extends$I() { _extends$I = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends$I.apply(this, arguments); }
  550. var IntermediateEventCatchNonInterruptingTimerIcon = (({
  551. styles = {},
  552. ...props
  553. }) => /*#__PURE__*/React__default["default"].createElement("svg", _extends$I({
  554. xmlns: "http://www.w3.org/2000/svg",
  555. width: "32",
  556. height: "32"
  557. }, props), /*#__PURE__*/React__default["default"].createElement("path", {
  558. d: "M15.998 8.406c-3.018-.041-5.92 1.926-7.031 4.727-1.138 2.695-.51 6.012 1.537 8.103 1.99 2.141 5.268 2.93 8.014 1.927 2.878-.98 4.992-3.827 5.068-6.87.153-2.957-1.624-5.88-4.3-7.137a7.552 7.552 0 00-3.288-.75zm0 1.384c2.759-.052 5.373 1.973 6.015 4.655.704 2.578-.482 5.517-2.791 6.867-2.358 1.48-5.682 1.086-7.618-.918-2.043-1.971-2.407-5.381-.84-7.745 1.11-1.763 3.15-2.88 5.234-2.86zm1.962 1.765l-2.074 3.762c-.64.068-.793 1.04-.202 1.3.39.27.696-.18 1.052-.165h3.17v-.865h-3.182l1.993-3.615c-.252-.14-.505-.278-.757-.417zm-1.965-8.268h-.158l-.147.003h-.011l-.147.005h-.011l-.146.007h-.011l-.146.009h-.011l-.146.01h-.005l-.005.001-.146.012h-.011l-.145.014h-.006l-.005.001-.05.006-.158.031-.15.06-.135.088-.117.111-.094.13-.069.147-.04.156-.01.16.019.16.049.154.076.142.102.125.123.105.14.08.152.051.16.023.134-.003.045-.005.135-.013.133-.01.136-.01.135-.007.137-.006.136-.004.136-.003h.274l.136.003.136.004.136.006.136.007.136.01.133.01.135.013.135.014.135.016.134.018.132.018.134.021.133.023.133.024.133.025.13.027.132.03.132.03.129.031.13.034.129.035.129.036.13.04.126.038.128.042.126.042.128.045.127.047.126.048.12.047.127.051.123.052.006.002.147.048.16.021.16-.009.157-.038.147-.067.131-.093.112-.116.089-.135.062-.149.033-.158.004-.16-.027-.16-.055-.151-.083-.138-.107-.121-.127-.099-.118-.063-.004-.001-.005-.003-.005-.002-.133-.056-.005-.002-.005-.002-.134-.054-.004-.002-.005-.002-.135-.053-.005-.002-.005-.002-.135-.051-.005-.002-.005-.002-.135-.05-.005-.001-.005-.002-.137-.048-.005-.001-.005-.002-.137-.046-.005-.002-.005-.002-.137-.044-.005-.002-.005-.001-.138-.043-.005-.002-.006-.001-.138-.042-.005-.001-.005-.002-.14-.04H19.4l-.005-.002-.14-.038-.005-.001-.005-.002-.14-.036-.005-.001-.005-.001-.141-.035-.005-.001-.005-.001-.142-.033-.005-.001-.005-.001-.141-.031-.006-.002h-.005l-.142-.03-.005-.001-.005-.001-.143-.028h-.005l-.005-.001-.143-.026-.006-.001-.005-.001-.143-.024-.005-.001-.006-.001-.143-.022-.006-.001h-.005l-.144-.022h-.005l-.006-.001-.144-.019h-.005l-.006-.001-.144-.017h-.006l-.005-.001-.145-.016h-.011l-.145-.014H17.1l-.005-.001-.146-.012h-.01l-.146-.01-.006-.001h-.005l-.146-.009h-.011l-.147-.006h-.01l-.147-.005h-.011l-.147-.003h-.01l-.148-.001h-.01zM10.357 4.66l-.156.037-.123.053-.06.032-.005.002-.004.003-.128.069-.004.002-.005.003-.126.07-.005.003-.004.002-.126.072-.005.003-.004.003-.125.073-.004.003-.005.003-.124.075-.004.003-.005.002-.123.077-.004.003-.005.003-.122.078-.004.003-.005.003-.121.08-.004.002-.005.003-.12.082-.005.003-.004.003-.12.083-.004.003-.004.003-.118.084-.005.003-.004.003-.118.086-.004.003-.004.003-.117.088-.004.003-.004.003-.116.089-.004.003-.004.004-.114.09-.005.003-.004.003-.113.092-.004.004-.004.003-.113.093-.004.004-.004.003-.111.095-.004.003-.005.004-.11.096-.004.004-.004.003-.109.098-.004.003-.004.004-.108.1-.004.003-.004.003-.107.101-.004.004-.004.003-.106.102-.003.004-.004.004-.105.103-.004.004-.004.004-.103.105-.004.004-.004.003-.102.106-.003.004-.004.004-.1.107-.004.004-.004.004-.099.108-.004.004-.003.004-.098.11-.003.003-.004.004-.096.11-.004.005-.003.004-.095.111-.003.004-.004.004-.093.113-.003.004-.004.004-.092.113-.003.004-.003.005-.09.114-.004.004-.003.004-.089.116-.003.004-.003.004-.088.117-.003.004-.003.005-.086.117-.003.004-.003.005-.084.118-.003.004-.003.005-.083.12-.003.003-.003.005-.082.12-.003.005-.002.004-.068.103-.076.142-.048.154-.018.16.011.161.041.156.07.146.095.13.117.11.136.086.15.06.158.03.162.002.158-.029.15-.058.138-.085.119-.108.082-.106.065-.099.075-.11.077-.113.077-.107.08-.11.08-.108.084-.108.083-.105.086-.106.086-.104.088-.104.089-.101.09-.102.093-.101.093-.099.094-.097.095-.096.098-.097.098-.095.099-.093.1-.092.103-.091.101-.089.104-.088.104-.086.106-.086.106-.083.106-.082.109-.082.108-.079.11-.078.11-.076.112-.076.112-.074.113-.072.113-.071.115-.07.115-.068.118-.067.117-.065.12-.065.054-.029.135-.088.116-.111.094-.132.068-.146.04-.156.009-.161-.02-.16-.05-.153-.078-.142-.102-.125-.123-.103-.141-.079-.153-.051-.16-.022-.16.008zm13.91 2.116l-.158.037-.147.066-.132.092-.113.116-.09.134-.063.148-.034.157-.005.162.026.159.054.152.082.139.086.102.09.09.094.098.093.099.092.1.091.103.089.101.088.104.086.104.086.106.083.105.083.108.08.108.081.11.077.107.077.112.075.111.075.114.072.113.071.113.07.115.068.117.067.115.065.118.064.117.062.118.061.12.059.119.059.122.056.121.054.12.055.125.051.123.051.125.048.123.049.127.046.126.044.125.043.128.042.129.039.126.038.13.022.076.058.15.086.137.109.119.129.096.145.07.155.043.16.013.161-.017.155-.046.143-.074.126-.1.106-.122.082-.138.055-.152.025-.16-.005-.16-.026-.132-.023-.082-.002-.005-.001-.005-.042-.139-.001-.005-.002-.005-.043-.138-.001-.005-.002-.005-.044-.137-.002-.005-.002-.005-.046-.137-.002-.005-.001-.005-.048-.137-.002-.005-.002-.005-.05-.135-.001-.005-.002-.005-.051-.135-.002-.005-.002-.005-.053-.135-.002-.005-.002-.005-.054-.133-.002-.005-.002-.005-.057-.133-.002-.005-.002-.005-.057-.132-.003-.005-.002-.005-.059-.132-.002-.005-.002-.004-.061-.132-.003-.004-.002-.005-.062-.13-.003-.005-.002-.005-.064-.13-.003-.004-.002-.005-.066-.129-.002-.004-.003-.005-.067-.128-.002-.005-.003-.004-.069-.128-.002-.004-.003-.005-.07-.126-.003-.005-.003-.004-.072-.126-.002-.005-.003-.004-.073-.125-.003-.004-.003-.005-.075-.124-.003-.004-.003-.005-.076-.123-.003-.004-.003-.005-.078-.122-.003-.004-.003-.005-.08-.121-.003-.004-.003-.005-.08-.12-.004-.005-.003-.004-.083-.12-.003-.004-.003-.004-.084-.118-.003-.005-.003-.004-.086-.117-.003-.005-.003-.004-.088-.117-.003-.004-.003-.004-.09-.116-.002-.004-.004-.004-.09-.114-.003-.005-.004-.004-.091-.113-.004-.004-.003-.004-.093-.113-.004-.004-.003-.004-.095-.111-.004-.004-.003-.004-.096-.11-.004-.005-.003-.004-.098-.109-.004-.004-.003-.004-.1-.108-.003-.004-.004-.004-.1-.107-.004-.004-.004-.004-.102-.106-.003-.003-.004-.004-.093-.095-.124-.103-.14-.08-.153-.05-.16-.023-.16.008zM4.288 12.828l-.158.032-.15.06-.135.088-.117.11-.095.131-.069.146-.035.129-.026.132v.005l-.002.005-.025.143-.001.005-.001.006-.024.143-.001.005-.001.006-.022.143-.001.006-.001.005-.02.144-.001.005-.001.006-.019.144v.005l-.001.006-.017.144v.006l-.001.005-.016.145v.011l-.014.145v.006l-.001.005-.012.146v.01l-.01.146-.001.006v.005l-.009.146v.011l-.007.146v.011l-.004.147v.011l-.003.147v.01l-.002.148v.01l.001.148v.01l.003.147v.011l.005.147v.01l.007.147v.011l.009.146v.011l.01.146v.01l.013.146v.011l.014.145v.005l.001.006.016.145v.011l.018.144v.006l.001.005.019.144v.006l.001.005.021.144v.005l.002.006.022.143v.006l.002.005.024.143v.005l.002.006.025.143.001.005.001.005.028.143.001.005.001.005.03.142v.005l.002.006.03.141.002.005.001.006.033.14v.006l.002.005.035.14v.006l.002.005.036.14.002.005.001.005.038.14.001.005.002.005.04.14v.005l.002.005.042.138.001.006.002.005.042.138.002.005.002.005.017.054.064.148.09.134.114.114.132.092.148.065.157.037.16.007.16-.023.153-.052.14-.08.123-.103.102-.126.076-.142.049-.153.02-.16-.01-.161-.032-.13-.017-.051-.039-.126-.038-.13-.037-.128-.035-.13-.033-.128-.033-.134-.03-.13-.029-.131-.026-.13-.026-.132-.024-.134-.023-.133-.02-.132-.02-.136-.017-.132-.016-.135-.014-.135-.012-.133-.012-.138-.009-.133-.007-.136-.006-.138-.004-.134-.003-.136v-.274l.003-.136.004-.134.006-.139.007-.136.01-.132.01-.139.013-.132.014-.135.016-.135.017-.132.02-.137.02-.13.023-.134.024-.133.024-.126.016-.16-.014-.161-.044-.155-.072-.145-.098-.128-.12-.108-.137-.084-.15-.057-.16-.029-.16.002zm23.286 4.202l-.156.038-.148.066-.132.092-.113.115-.09.134-.062.148-.03.127-.001.004-.023.134-.024.134-.026.132-.026.13-.03.132-.03.129-.032.134-.033.128-.035.13-.037.128-.038.13-.04.126-.04.128-.044.128-.044.126-.046.126-.048.126-.05.125-.05.125-.051.122-.054.123-.055.122-.056.12-.058.122-.06.12-.061.12-.062.119-.063.116-.067.119-.066.116-.068.115-.07.115-.07.113-.073.113-.074.112-.076.113-.077.112-.077.107-.08.11-.08.108-.085.109-.044.056-.088.135-.06.15-.033.158-.002.16.027.16.057.15.083.138.108.12.128.098.144.072.155.045.16.015.161-.016.155-.044.144-.073.128-.098.09-.099.05-.061.003-.004.003-.005.089-.115.003-.004.003-.005.088-.116.003-.004.003-.005.086-.117.003-.004.003-.005.084-.118.003-.004.003-.005.083-.12.003-.004.003-.004.082-.12.003-.005.002-.004.08-.121.003-.005.003-.004.078-.122.003-.005.003-.004.077-.123.002-.005.003-.004.075-.124.003-.005.003-.004.073-.125.003-.004.003-.005.072-.126.002-.004.003-.005.07-.126.003-.005.002-.005.07-.127.002-.004.002-.005.068-.128.002-.005.002-.004.066-.13.003-.004.002-.005.064-.13.002-.004.003-.005.062-.13.003-.005.002-.005.06-.13.003-.005.002-.005.06-.132.002-.005.002-.005.057-.132.003-.005.002-.005.056-.133.002-.005.002-.005.054-.134.002-.004.002-.005.053-.135.002-.005.002-.005.051-.135.002-.005.002-.005.05-.135.001-.005.002-.005.048-.137.001-.005.002-.005.046-.137.002-.005.002-.005.044-.137.002-.005.002-.005.042-.138.002-.005.002-.006.04-.138.002-.005.002-.005.04-.14V19.4l.002-.005.038-.14.001-.005.002-.005.036-.14.001-.005.001-.005.035-.141.001-.005.001-.005.033-.141.001-.006.001-.005.031-.141.002-.006v-.005l.03-.142.001-.005.001-.005.028-.143v-.005l.002-.005.025-.143.001-.006.001-.005.024-.143.001-.005.001-.006.001-.006.01-.161-.02-.16-.05-.154-.077-.141-.102-.125-.123-.104-.141-.079-.153-.051-.16-.022-.16.007zM6.681 22.734l-.152.053-.14.08-.122.105-.101.126-.076.142-.048.154-.018.16.011.161.041.156.07.146.077.11.04.047.003.004.003.004.095.111.003.004.004.004.096.11.004.005.003.004.098.109.003.004.004.004.1.108.003.004.003.004.101.107.004.004.003.004.102.106.004.003.004.004.103.105.004.004.004.004.105.103.004.004.003.003.106.102.004.004.004.004.107.1.004.004.004.004.108.099.004.003.004.004.11.098.003.003.004.004.11.096.005.004.004.003.11.095.005.003.004.004.113.093.004.003.004.004.113.091.004.004.005.003.114.09.004.004.004.003.116.089.004.003.004.003.117.088.004.003.004.003.118.086.004.003.005.003.118.084.004.003.005.003.119.083.004.003.005.003.12.081.005.003.004.003.121.08.005.003.004.003.122.078.005.003.004.003.123.076.005.003.004.003.124.075.005.003.004.003.125.073.004.003.005.003.126.072.004.002.005.003.126.07.005.003.004.002.128.07.004.002.005.002.128.068.005.002.004.002.13.066.004.003.005.002.13.064.004.002.005.003.13.062.005.002.004.003.132.06.004.003.005.002.132.06.005.002.005.002.132.057.005.002.005.003.133.056.005.002.005.002.133.054.005.002.005.002.13.05.154.045.16.016.161-.015.155-.045.144-.072.128-.098.108-.12.083-.138.057-.15.028-.16-.003-.16-.032-.158-.061-.15-.088-.135-.11-.117-.132-.094-.12-.058-.124-.049-.126-.051-.122-.051-.122-.054-.12-.054-.126-.058-.119-.057-.12-.06-.12-.06-.118-.063-.117-.064-.119-.066-.116-.066-.115-.068-.115-.07-.113-.07-.115-.074-.112-.074-.11-.075-.11-.076-.112-.079-.11-.08-.109-.082-.106-.082-.104-.082-.106-.086-.105-.087-.101-.086-.105-.091-.1-.09-.1-.091-.1-.094-.097-.094-.1-.098-.093-.095-.096-.1-.093-.098-.092-.101-.089-.1-.09-.102-.088-.104-.036-.043-.114-.114-.133-.091-.148-.065-.157-.036-.161-.006-.16.024zm15.063 2.691l-.156.044-.12.057-.06.034-.12.066-.116.064-.119.062-.12.061-.12.06-.118.057-.126.058-.12.054-.122.054-.122.05-.126.052-.125.05-.124.046-.127.047-.125.044-.129.043-.126.04-.13.042-.128.038-.127.036-.13.035-.131.034-.129.031-.132.03-.13.03-.135.027-.133.026-.13.023-.13.022-.137.021-.132.02-.134.017-.132.015-.138.015-.135.013-.133.01-.138.01-.136.007-.134.006-.136.004-.14.003-.16.018-.155.047-.142.076-.127.1-.105.122-.08.14-.054.151-.025.16.006.16.035.158.064.148.09.134.114.114.133.092.147.065.157.036.134.008.145-.002h.011l.147-.005h.01l.147-.007h.011l.146-.009h.011l.146-.01h.005l.005-.001.146-.012h.011l.145-.014h.005l.006-.001.145-.016h.011l.144-.018h.006l.005-.001.144-.02h.011l.144-.021h.005l.006-.002.143-.022h.006l.005-.002.143-.024h.005l.006-.002.143-.026h.005l.005-.002.143-.027.005-.001.005-.001.142-.03h.005l.005-.002.142-.03.005-.002.005-.001.142-.033.005-.001.005-.001.14-.035.006-.001.005-.001.14-.036.005-.002.005-.001.14-.038.005-.001.005-.002.14-.04h.005l.005-.002.138-.042.005-.001.006-.002.138-.043.005-.001.005-.002.137-.044.005-.002.005-.002.137-.046.005-.002.005-.001.137-.048.005-.002.005-.002.135-.05.005-.001.005-.002.135-.051.005-.002.005-.002.135-.053.005-.002.004-.002.134-.054.005-.002.005-.002.133-.056.005-.003.005-.002.132-.057.005-.002.005-.003.132-.059.005-.002.004-.002.131-.061.005-.003.005-.002.13-.062.005-.003.005-.002.13-.064.004-.002.005-.003.129-.066.004-.002.005-.003.128-.067.005-.002.004-.003.127-.069.005-.002.005-.003.126-.07.005-.003.004-.002.065-.038.132-.093.112-.115.089-.135.062-.149.034-.157.004-.161-.027-.16-.055-.15-.082-.14-.107-.12-.127-.1-.144-.073-.154-.045-.16-.017-.161.014zM15.994 0l-.187.001h-.011l-.188.004h-.011l-.187.006h-.011l-.187.008h-.005L15.2.02l-.187.01h-.005l-.005.001-.187.013h-.01L14.62.06h-.01l-.186.018h-.011l-.185.02-.005.001h-.006l-.185.022-.005.001h-.005l-.185.025h-.005l-.005.001-.184.027h-.006l-.005.001-.184.029h-.005l-.005.001-.183.031-.005.001-.006.001-.182.033-.006.001-.005.001-.182.035-.005.001-.005.001-.182.038h-.005l-.005.002-.181.04h-.005l-.005.002-.18.042-.006.001-.005.001-.18.044-.005.002h-.005l-.17.045-.152.054-.139.082-.121.106-.1.127-.074.143-.046.155-.017.16.013.16.043.156.07.145.097.13.119.108.137.085.15.058.159.03.16-.001.133-.023.165-.043.168-.041.171-.04.171-.037.172-.036.17-.033.173-.03.17-.03.177-.027.171-.025.175-.022.175-.02.175-.02.176-.016.175-.014.177-.012.176-.01.177-.007.174-.006.177-.003L16 1.73h.177l.178.004.174.006.177.007.176.01.177.012.175.014.176.017.175.018.175.02.175.023.171.025.177.027.17.03.173.03.17.033.171.036.154.033.16.02.161-.01.156-.04.146-.069.131-.094.111-.117.088-.135.06-.15.032-.158.002-.16-.027-.16-.057-.15L20 .714l-.108-.12-.128-.097-.144-.073-.129-.038-.158-.035-.005-.001-.005-.001L19.14.31h-.005l-.005-.002-.182-.035h-.006l-.005-.002-.182-.033h-.006l-.005-.002-.183-.03-.005-.001-.005-.001-.184-.029h-.005l-.006-.001-.184-.027h-.005l-.005-.001-.185-.024h-.005L17.968.12 17.783.1l-.006-.001h-.005l-.185-.02h-.006l-.005-.001L17.39.06 17.385.06h-.005l-.187-.015h-.005l-.005-.001-.187-.013h-.01L16.799.02h-.011L16.6.01h-.011l-.187-.006h-.011L16.204 0h-.011L16.005 0h-.01zm8.86 2.939l-.157.033-.15.062-.134.09-.116.111-.093.132-.067.147-.038.156-.01.161.022.16.05.153.078.141.103.124.102.087.045.034.142.106.137.105.14.11.136.11.135.112.134.115.134.117.13.115.132.122.128.12.127.122.127.125.123.126.124.128.121.13.118.128.118.132.117.133.113.134.113.136.11.136.109.137.109.142.104.14.103.14.101.142.1.144.099.146.095.145.094.147.093.15.092.15.087.149.087.15.085.152.083.155.08.152.08.155.04.081.084.138.11.119.128.096.145.072.155.043.16.013.161-.016.155-.046.143-.074.127-.099.106-.12.083-.14.055-.151.026-.16-.004-.16-.034-.158-.05-.124-.042-.085-.002-.004-.003-.005-.084-.165-.002-.004-.003-.005-.086-.164-.002-.004-.003-.005-.088-.162-.002-.005-.003-.005-.09-.161-.002-.005-.003-.004-.092-.16-.002-.005-.003-.005-.094-.16-.003-.004-.003-.004-.096-.159-.002-.004-.003-.005-.098-.157-.003-.004-.003-.005-.1-.156-.003-.004-.002-.005-.102-.154-.003-.005-.003-.004-.104-.154-.003-.004-.003-.005-.106-.152-.003-.004-.003-.005-.108-.151-.003-.004-.003-.005-.11-.15-.003-.004-.003-.004-.111-.15-.004-.003-.003-.005-.113-.147-.004-.004-.003-.005-.115-.146-.004-.004-.003-.004-.117-.145-.004-.004-.003-.004-.12-.144-.003-.004-.003-.004-.121-.142-.003-.004-.004-.004-.123-.141-.003-.004-.004-.004-.125-.14-.003-.004-.004-.004-.127-.138-.003-.004-.004-.004-.128-.136-.004-.004-.004-.004-.13-.135-.004-.004-.003-.004-.133-.134-.003-.004-.004-.003-.134-.133-.004-.003-.004-.004-.135-.13-.004-.004-.004-.004-.136-.128-.004-.004-.004-.004-.138-.126-.004-.004-.004-.003-.14-.125-.004-.004-.004-.003-.14-.123-.005-.004-.004-.003-.142-.121-.004-.004-.004-.003-.144-.12-.004-.003-.004-.003-.145-.117-.004-.004-.004-.003-.147-.115-.004-.004-.004-.003-.148-.113-.004-.003-.004-.004-.149-.111-.004-.003-.004-.004-.05-.036-.14-.083-.15-.055-.16-.027-.16.004zm-18.381.348l-.157.037-.147.066-.111.074-.04.032-.005.003-.004.004-.145.117-.004.003-.004.004-.144.119-.004.003-.004.004-.142.12-.004.004-.004.004-.141.123-.004.003-.004.004-.14.125-.004.003-.004.004-.138.126-.004.004-.004.004-.136.128-.004.004-.004.004-.135.13-.004.004-.004.003-.134.133-.004.003-.004.004-.132.134-.003.004-.004.004-.13.135-.004.004-.004.004-.128.136-.004.004-.004.004-.126.138-.004.004-.003.004-.125.14-.004.004-.003.004-.123.14-.004.005-.003.004-.121.142-.004.004-.003.004-.12.144-.003.004-.003.004-.117.145-.004.004-.003.004-.115.146-.004.005-.003.004-.113.147-.003.005-.004.004-.111.149-.003.004-.004.004-.11.15-.002.005-.003.004-.108.151-.003.005-.003.004-.106.152-.003.005-.003.004-.104.154-.003.004-.003.005-.102.154-.003.005-.002.004-.1.156-.003.005-.003.004-.098.157-.003.005-.003.004-.096.159-.002.004-.003.005-.094.16-.003.004-.002.004-.092.16-.003.005-.003.005-.09.161-.002.005-.003.005-.088.162-.002.005-.003.004-.086.164-.002.005-.002.004-.084.165-.003.005-.002.004-.082.166-.002.005-.003.004-.08.167-.002.004-.002.005-.078.168-.002.004-.002.005-.045.1-.053.153-.023.16.007.16.037.157.065.148.092.132.114.114.134.09.148.064.157.035.161.006.16-.025.152-.054.14-.08.121-.106.1-.126.065-.118.043-.095.074-.16.075-.155.077-.157.08-.155.08-.152.083-.155.085-.152.086-.15.088-.149.091-.15.094-.15.094-.147.095-.145.099-.146.1-.144.1-.142.104-.14.104-.14.11-.142.107-.137.11-.136.114-.136.113-.134.117-.133.118-.132.117-.129.122-.13.124-.127.123-.126.127-.125.127-.122.128-.12.132-.122.13-.115.133-.117.135-.115.135-.111.136-.11.037-.03.117-.11.094-.132.068-.146.04-.156.01-.161-.02-.16-.05-.154-.076-.141-.102-.125-.123-.104-.14-.08-.153-.051-.16-.023-.161.008zm24.514 11.15l-.157.04-.146.067-.131.093-.112.117-.088.135-.061.149-.033.157-.005.134.006.14.006.176.003.177.001.178-.001.177-.003.178-.006.177-.007.176-.01.177-.012.176-.015.176-.016.173-.018.175-.02.175-.024.174-.024.175-.027.17-.03.174-.03.173-.033.17-.036.172-.037.17-.04.17-.042.172-.043.168-.045.166-.048.169-.05.167-.052.168-.053.164-.056.166-.058.166-.06.161-.061.164-.063.158-.066.165-.068.16-.07.16-.07.158-.075.159-.074.155-.078.158-.081.158-.06.15-.03.158-.001.161.029.159.058.15.085.137.108.12.13.096.144.07.156.044.16.013.16-.017.155-.046.143-.074.127-.1.107-.12.07-.115.083-.164.003-.005.002-.004.082-.166.002-.005.003-.004.08-.167.002-.005.002-.004.078-.168.002-.004.002-.005.076-.169.002-.004.002-.005.074-.17.002-.004.002-.005.072-.17.002-.005.002-.005.07-.17.002-.006.001-.005.068-.172.002-.004.002-.005.065-.173.002-.005.002-.005.063-.173.002-.005.002-.005.06-.174.003-.005.001-.005.06-.175.001-.005.002-.005.057-.176.001-.005.002-.005.055-.177.001-.005.002-.005.052-.177.002-.005.001-.005.051-.178.001-.005.002-.005.048-.179.002-.005v-.005l.047-.179.001-.005.002-.005.044-.18v-.005l.002-.005.042-.18.001-.006.001-.005.04-.18.001-.006.001-.005.038-.182v-.005l.002-.005.035-.182v-.006l.002-.005.033-.182v-.006l.002-.005.03-.183.001-.005.001-.005.029-.184v-.005l.001-.006.027-.184v-.005l.001-.005.024-.185v-.005l.001-.005.022-.185v-.006l.001-.005.02-.185v-.006l.001-.005.017-.186v-.005l.001-.005.015-.187v-.005l.001-.005.013-.187v-.01l.01-.187.001-.006v-.005l.009-.187v-.011l.006-.187v-.011l.004-.188v-.011l.001-.188v-.01l-.001-.188v-.011l-.004-.188v-.011l-.006-.187v-.011l-.007-.145-.022-.16-.05-.152-.08-.141-.103-.124-.125-.102-.141-.077-.153-.05-.16-.02-.161.009zM.777 15l-.158.032-.15.06-.136.087-.117.11-.095.131-.068.146-.04.156-.012.133-.001.14v.01l.001.188v.011l.004.188v.011l.006.187v.011l.008.187v.011l.011.187v.005l.001.005.013.187v.01l.016.187v.01l.018.186v.011l.02.185.001.005v.006l.022.185.001.005v.005l.025.185v.005l.001.005.027.184v.006l.001.005.029.184v.005l.001.005.031.183.001.005.001.006.033.182.001.005.001.006.035.182.001.005.001.005.038.182v.005l.002.005.04.181v.005l.002.005.042.18.001.006.001.005.044.18.002.005v.005l.047.18.001.004.002.005.048.179.002.005.001.005.05.178.002.005.001.005.053.177.002.005.001.005.055.177.002.005.001.005.057.176.002.005.001.005.06.175.001.005.002.005.061.174.002.005.002.005.063.173.002.005.002.005.065.173.002.005.002.004.067.172.002.005.002.005.07.171.002.005.002.005.072.17.002.005.002.005.074.169.002.005.002.004.076.169.002.005.002.004.078.168.002.004.002.005.08.167.003.004.002.005.082.166.002.004.003.005.02.04.086.136.11.118.13.095.146.07.156.041.16.012.16-.019.155-.048.142-.075.126-.1.105-.123.08-.14.054-.152.024-.16-.006-.16-.036-.158-.051-.123-.018-.034-.078-.158L3.1 22.1l-.074-.16-.071-.156-.07-.162-.068-.16-.067-.164-.062-.158-.062-.164-.059-.161-.058-.166-.056-.166-.053-.164-.052-.168-.05-.167-.048-.17-.045-.165-.043-.168-.043-.172-.039-.17-.037-.17-.036-.172-.033-.17-.03-.173-.03-.174-.027-.17-.025-.175-.022-.174-.021-.175-.018-.175-.017-.173-.014-.176-.012-.176-.01-.177-.007-.176-.006-.177-.003-.178L1.73 16v-.134l-.013-.16-.044-.156-.072-.144-.097-.129-.12-.108-.137-.085-.15-.057L.938 15 .777 15zM6.17 26.842l-.152.052-.14.08-.122.105-.101.126-.076.142-.048.154-.02.16.012.161.041.156.07.146.094.13.096.093.032.026.004.003.004.004.145.117.004.003.004.004.146.115.005.003.004.004.147.113.005.003.004.004.149.111.004.003.004.003.15.11.005.003.004.003.151.108.005.003.004.003.152.106.005.003.004.003.154.104.004.003.005.003.154.102.005.002.004.003.156.1.005.003.004.003.157.098.005.003.004.002.159.096.004.003.005.003.16.094.004.003.004.002.16.092.005.003.005.002.161.09.005.003.005.003.162.088.005.002.004.002.164.087.005.002.004.002.165.084.005.003.004.002.166.082.004.002.005.003.167.08.004.002.005.002.168.078.004.002.005.002.169.076.004.002.005.002.17.074.004.002.005.002.17.072.005.002.005.002.17.07.006.002.005.001.171.068.005.002.005.002.173.065.005.002.005.002.173.063.005.002.005.002.174.061.005.002.005.001.175.06.005.001.005.002.176.057.005.001.005.002.177.055.005.001.005.002.177.052.005.002.005.001.178.051.005.001.005.002.178.048.006.002h.005l.179.047.005.001.005.002.18.044h.005l.005.002.18.042.006.001.005.001.159.035.16.02.16-.01.157-.04.146-.069.13-.094.112-.117.087-.136.06-.149.033-.158.002-.161-.028-.159-.057-.15-.084-.138-.108-.12-.128-.098-.144-.072-.128-.039-.154-.033-.168-.04-.171-.041-.169-.044-.17-.045-.166-.048-.168-.05-.165-.051-.166-.054-.166-.056-.163-.057-.165-.06-.161-.062-.164-.064-.16-.065-.16-.068-.162-.07-.157-.07-.157-.074-.157-.075-.156-.077-.153-.079-.156-.082-.153-.082-.154-.086-.15-.086-.152-.09-.148-.09-.147-.092-.149-.095-.145-.095-.144-.098-.145-.1-.143-.102-.14-.103-.14-.104-.14-.108-.139-.11-.136-.11-.027-.022-.133-.091-.148-.065-.157-.036-.161-.006-.16.024zm19.214.073l-.156.039-.146.067-.11.076-.064.051-.139.11-.14.108-.14.104-.14.103-.143.101-.145.101-.144.098-.145.095-.149.095-.148.093-.147.089-.152.09-.15.086-.154.086-.153.082-.156.082-.153.079-.156.077-.157.075-.157.073-.158.071-.16.07-.16.068-.161.065-.164.064-.161.061-.165.06-.163.058-.166.056-.166.054-.166.051-.167.05-.167.048-.17.045-.168.044-.171.042-.168.039-.17.037-.11.023-.154.047-.143.075-.126.1-.106.122-.081.139-.054.152-.025.16.006.16.035.158.063.148.09.133.114.115.132.092.148.065.157.037.16.008.133-.017.115-.024h.005l.005-.002.181-.04h.005l.005-.002.18-.042.006-.001.005-.001.18-.044.005-.002h.005l.18-.047.004-.001.005-.002.179-.048.005-.002.005-.001.178-.05.005-.002.005-.002.177-.052.005-.002.005-.001.177-.055.005-.002.005-.001.176-.057.005-.002.005-.002.175-.059.005-.001.005-.002.174-.061.005-.002.005-.002.173-.063.005-.002.005-.002.173-.065.005-.002.004-.002.172-.068.005-.001.005-.002.171-.07.005-.002.005-.002.17-.072.005-.002.005-.002.169-.074.005-.002.004-.002.169-.076.004-.002.005-.002.168-.078.004-.002.005-.002.167-.08.004-.003.005-.002.166-.082.004-.002.005-.003.165-.084.004-.002.005-.002.163-.087.005-.002.005-.002.162-.088.005-.003.005-.003.161-.09.005-.002.004-.003.16-.092.005-.002.005-.003.16-.094.004-.003.004-.003.158-.096.005-.002.004-.003.158-.098.004-.003.005-.003.156-.1.004-.003.004-.002.155-.102.005-.003.004-.003.154-.104.004-.003.005-.003.152-.106.004-.003.005-.003.151-.108.004-.003.005-.003.15-.11.004-.003.004-.003.149-.111.004-.004.004-.003.148-.113.004-.004.004-.003.147-.115.004-.004.004-.003.068-.055.116-.113.092-.132.066-.147.038-.157.008-.16-.022-.16-.05-.153-.08-.14-.103-.125-.124-.102-.142-.077-.153-.05-.16-.02-.16.009z"
  559. })));
  560. function _extends$H() { _extends$H = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends$H.apply(this, arguments); }
  561. var IntermediateEventCatchParallelMultipleIcon = (({
  562. styles = {},
  563. ...props
  564. }) => /*#__PURE__*/React__default["default"].createElement("svg", _extends$H({
  565. xmlns: "http://www.w3.org/2000/svg",
  566. width: "32",
  567. height: "32"
  568. }, props), /*#__PURE__*/React__default["default"].createElement("path", {
  569. d: "M15.975.003C8.195-.157.935 6.24.125 13.985c-.855 6.55 2.741 13.46 8.74 16.314 5.666 2.847 13.012 1.99 17.71-2.33 4.745-4.162 6.727-11.243 4.532-17.206C29.09 4.884 23.445.408 17.201.049c-.408-.03-.817-.046-1.226-.046zm-.181 1.724c7.134-.269 13.84 5.68 14.399 12.804.686 6.283-3.267 12.792-9.283 14.862-5.847 2.162-13.025.06-16.557-5.141C.728 19.174.872 11.679 4.985 6.916c2.632-3.171 6.671-5.174 10.809-5.19zm.283 1.553c-6.6-.21-12.671 5.585-12.79 12.185-.292 5.964 4.129 11.817 10.034 12.953 5.47 1.198 11.584-1.613 14.025-6.702 2.525-4.97 1.396-11.585-2.912-15.215-2.282-2.022-5.3-3.217-8.357-3.22zM16 4.975c5.818-.154 11.117 5.082 11.024 10.905.103 5.384-4.23 10.5-9.636 11.043-5.075.667-10.426-2.587-11.885-7.552-1.53-4.73.48-10.428 4.888-12.864A11.082 11.082 0 0116 4.975zm-2.15 3.281v5.534H8.213v4.38h5.636v5.534h4.31V18.17h5.639v-4.38h-5.64V8.256h-4.31zm.865.865h2.583v5.534h5.635v2.65h-5.635v5.533h-2.583v-5.534h-5.64v-2.649h5.64V9.121z"
  570. })));
  571. function _extends$G() { _extends$G = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends$G.apply(this, arguments); }
  572. var IntermediateEventCatchSignalIcon = (({
  573. styles = {},
  574. ...props
  575. }) => /*#__PURE__*/React__default["default"].createElement("svg", _extends$G({
  576. xmlns: "http://www.w3.org/2000/svg",
  577. width: "32",
  578. height: "32"
  579. }, props), /*#__PURE__*/React__default["default"].createElement("path", {
  580. d: "M15.975.049C8.195-.11.935 6.286.125 14.03c-.855 6.55 2.741 13.46 8.74 16.314 5.666 2.847 13.012 1.99 17.71-2.33 4.745-4.162 6.727-11.243 4.532-17.206C29.09 4.93 23.445.453 17.201.095c-.408-.03-.817-.046-1.226-.046zm-.181 1.724c7.134-.269 13.84 5.68 14.399 12.804.686 6.283-3.267 12.792-9.283 14.862-5.847 2.162-13.025.06-16.557-5.141C.728 19.22.872 11.725 4.985 6.962c2.632-3.171 6.671-5.174 10.809-5.19zm.283 1.553c-6.6-.21-12.671 5.585-12.79 12.185-.292 5.964 4.129 11.817 10.034 12.953 5.47 1.198 11.584-1.613 14.025-6.702 2.525-4.97 1.396-11.585-2.912-15.216-2.282-2.021-5.3-3.216-8.357-3.22zM16 5.021c5.818-.154 11.117 5.082 11.024 10.905.103 5.384-4.23 10.5-9.636 11.043-5.075.667-10.426-2.587-11.885-7.552-1.53-4.73.48-10.428 4.888-12.864A11.083 11.083 0 0116 5.021zm.006 3.521L9.206 20.745h13.598L16.005 8.542zm0 1.775l5.329 9.564H10.677l5.328-9.564z"
  581. })));
  582. function _extends$F() { _extends$F = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends$F.apply(this, arguments); }
  583. var IntermediateEventCatchTimerIcon = (({
  584. styles = {},
  585. ...props
  586. }) => /*#__PURE__*/React__default["default"].createElement("svg", _extends$F({
  587. xmlns: "http://www.w3.org/2000/svg",
  588. width: "32",
  589. height: "32"
  590. }, props), /*#__PURE__*/React__default["default"].createElement("path", {
  591. d: "M15.97.04h-.127C8.713-.018 2.003 5.334.437 12.286c-1.51 6.123.98 13.005 6.136 16.665 5.125 3.788 12.546 4.105 17.912.623 5.272-3.276 8.33-9.766 7.325-15.916-.904-6.241-5.79-11.7-11.95-13.143A16.082 16.082 0 0015.97.04zm-.181 1.724c.115 0 .23 0 .347.003 6.625-.066 12.823 5.149 13.89 11.69 1.13 5.91-1.908 12.349-7.262 15.138-5.473 3.013-12.866 1.884-17.116-2.726C1.291 21.372.444 13.914 3.802 8.602c2.493-4.112 7.169-6.819 11.987-6.838zm.283 1.554c-.117 0-.234.002-.351.005-6.1 0-11.691 5.049-12.346 11.114-.78 5.684 2.795 11.612 8.218 13.52 5.139 1.943 11.416.101 14.624-4.38 3.461-4.583 3.262-11.538-.596-15.831-2.36-2.747-5.924-4.423-9.549-4.428zm-.078 1.695c.078 0 .156 0 .234.003 5.4 0 10.321 4.556 10.734 9.942.563 5.13-2.958 10.364-7.971 11.678-4.832 1.41-10.457-.935-12.746-5.446-2.463-4.559-1.2-10.795 3.014-13.883a11.072 11.072 0 016.735-2.294zm-.137 3.42c-2.965.02-5.792 1.968-6.884 4.722-1.137 2.693-.509 6.007 1.536 8.096 1.988 2.14 5.263 2.929 8.007 1.926 2.875-.98 4.987-3.824 5.063-6.865.154-2.954-1.622-5.875-4.295-7.13a7.545 7.545 0 00-3.427-.75zm.27 1.381c2.708.013 5.249 2.014 5.88 4.652.704 2.576-.481 5.512-2.788 6.862-2.356 1.478-5.677 1.084-7.611-.918-2.042-1.97-2.405-5.376-.839-7.738 1.11-1.762 3.146-2.877 5.229-2.857h.13zm1.831 1.764l-2.072 3.76c-.64.068-.792 1.039-.202 1.298.39.27.696-.18 1.051-.164h3.168v-.864h-3.18l1.992-3.612-.757-.418z"
  592. })));
  593. function _extends$E() { _extends$E = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends$E.apply(this, arguments); }
  594. var IntermediateEventNoneIcon = (({
  595. styles = {},
  596. ...props
  597. }) => /*#__PURE__*/React__default["default"].createElement("svg", _extends$E({
  598. xmlns: "http://www.w3.org/2000/svg",
  599. width: "32",
  600. height: "32"
  601. }, props), /*#__PURE__*/React__default["default"].createElement("path", {
  602. d: "M15.848.001C8.113-.093.931 6.281.125 13.983c-.855 6.55 2.741 13.46 8.74 16.314 5.666 2.847 13.012 1.99 17.71-2.33 4.745-4.162 6.727-11.243 4.532-17.207C29.105 4.938 23.55.48 17.367.06A16.448 16.448 0 0015.848 0v.001zm.293 1.727c7.113-.099 13.662 5.97 14.077 13.08.56 6.299-3.516 12.735-9.582 14.679-5.798 2.004-12.806-.12-16.283-5.237C.717 19.159.874 11.638 5.016 6.876 7.722 3.638 11.902 1.63 16.14 1.728zm-.415 1.555C9.157 3.258 3.256 9.156 3.278 15.729c-.16 5.965 4.365 11.725 10.293 12.737 5.409 1.065 11.37-1.744 13.775-6.753 2.534-4.986 1.386-11.627-2.953-15.251-2.364-2.077-5.512-3.27-8.667-3.18zm.507 1.692c5.82-.026 11.013 5.318 10.79 11.143-.024 5.3-4.313 10.267-9.636 10.803-5.075.667-10.426-2.588-11.885-7.553-1.535-4.744.494-10.46 4.925-12.885a11.072 11.072 0 015.806-1.508z"
  603. })));
  604. function _extends$D() { _extends$D = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends$D.apply(this, arguments); }
  605. var IntermediateEventThrowCompensationIcon = (({
  606. styles = {},
  607. ...props
  608. }) => /*#__PURE__*/React__default["default"].createElement("svg", _extends$D({
  609. xmlns: "http://www.w3.org/2000/svg",
  610. width: "32",
  611. height: "32"
  612. }, props), /*#__PURE__*/React__default["default"].createElement("path", {
  613. d: "M15.975.003C8.195-.156.935 6.24.125 13.985c-.855 6.55 2.741 13.46 8.74 16.314 5.666 2.847 13.012 1.99 17.71-2.33 4.745-4.162 6.727-11.243 4.532-17.206C29.09 4.884 23.445.407 17.201.049c-.408-.03-.817-.046-1.226-.046zm-.181 1.724c7.134-.269 13.84 5.68 14.399 12.804.686 6.283-3.267 12.792-9.283 14.862-5.847 2.162-13.025.06-16.557-5.141C.728 19.174.872 11.679 4.985 6.916c2.632-3.171 6.671-5.174 10.809-5.19zm.283 1.553c-6.6-.21-12.671 5.585-12.79 12.185-.292 5.964 4.129 11.817 10.034 12.953 5.47 1.198 11.584-1.613 14.025-6.702 2.525-4.97 1.396-11.585-2.912-15.216-2.282-2.021-5.3-3.216-8.357-3.22zM16 4.975c5.818-.154 11.117 5.082 11.024 10.905.103 5.384-4.23 10.5-9.636 11.043-5.075.667-10.426-2.587-11.885-7.552-1.53-4.73.48-10.428 4.888-12.864A11.083 11.083 0 0116 4.975zm-.56 5.772l-7.408 5.231 7.409 5.234v-5.057c2.385 1.687 4.771 3.371 7.157 5.057V10.747l-7.157 5.055v-5.055z"
  614. })));
  615. function _extends$C() { _extends$C = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends$C.apply(this, arguments); }
  616. var IntermediateEventThrowEscalationIcon = (({
  617. styles = {},
  618. ...props
  619. }) => /*#__PURE__*/React__default["default"].createElement("svg", _extends$C({
  620. xmlns: "http://www.w3.org/2000/svg",
  621. width: "32",
  622. height: "32"
  623. }, props), /*#__PURE__*/React__default["default"].createElement("path", {
  624. d: "M15.975.049C8.195-.11.935 6.286.125 14.03c-.855 6.55 2.741 13.46 8.74 16.314 5.666 2.847 13.012 1.99 17.71-2.33 4.745-4.162 6.727-11.243 4.532-17.206C29.09 4.93 23.445.453 17.201.095c-.408-.03-.817-.046-1.226-.046zm-.181 1.724c7.134-.269 13.84 5.68 14.399 12.804.686 6.283-3.267 12.792-9.283 14.862-5.847 2.162-13.025.06-16.557-5.141C.728 19.22.872 11.725 4.985 6.962c2.632-3.171 6.671-5.174 10.809-5.19zm.283 1.553c-6.6-.21-12.671 5.585-12.79 12.185-.292 5.964 4.129 11.817 10.034 12.953 5.47 1.198 11.584-1.613 14.025-6.702 2.525-4.97 1.396-11.585-2.912-15.216-2.282-2.021-5.3-3.216-8.357-3.22zM16 5.021c5.818-.154 11.117 5.082 11.024 10.905.103 5.384-4.23 10.5-9.636 11.043-5.075.667-10.426-2.587-11.885-7.552-1.53-4.73.48-10.428 4.888-12.864A11.083 11.083 0 0116 5.021zm.006 3.927c-1.672 4.654-2.734 9.502-4.406 14.155 1.534-1.525 2.872-3.234 4.406-4.759l4.406 4.76c-1.496-4.71-2.91-9.446-4.406-14.156z"
  625. })));
  626. function _extends$B() { _extends$B = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends$B.apply(this, arguments); }
  627. var IntermediateEventThrowLinkIcon = (({
  628. styles = {},
  629. ...props
  630. }) => /*#__PURE__*/React__default["default"].createElement("svg", _extends$B({
  631. xmlns: "http://www.w3.org/2000/svg",
  632. width: "32",
  633. height: "32"
  634. }, props), /*#__PURE__*/React__default["default"].createElement("path", {
  635. d: "M15.975.049C8.195-.11.935 6.286.125 14.03c-.855 6.55 2.741 13.46 8.74 16.314 5.666 2.847 13.012 1.99 17.71-2.33 4.745-4.162 6.727-11.243 4.532-17.206C29.09 4.93 23.445.453 17.201.095c-.408-.03-.817-.046-1.226-.046zm-.181 1.724c7.134-.269 13.84 5.68 14.399 12.804.686 6.283-3.267 12.792-9.283 14.862-5.847 2.162-13.025.06-16.557-5.141C.728 19.22.872 11.725 4.985 6.962c2.632-3.171 6.671-5.174 10.809-5.19zm.283 1.553c-6.6-.21-12.671 5.585-12.79 12.185-.292 5.964 4.129 11.817 10.034 12.953 5.47 1.198 11.584-1.613 14.025-6.702 2.525-4.97 1.396-11.585-2.912-15.216-2.282-2.021-5.3-3.216-8.357-3.22zM16 5.021c5.818-.154 11.117 5.082 11.024 10.905.103 5.384-4.23 10.5-9.636 11.043-5.075.667-10.426-2.587-11.885-7.552-1.53-4.73.48-10.428 4.888-12.864A11.083 11.083 0 0116 5.021zm1.78 4.093v3.555H9.785v6.714h7.994v3.554l5.829-6.911-5.83-6.912z"
  636. })));
  637. function _extends$A() { _extends$A = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends$A.apply(this, arguments); }
  638. var IntermediateEventThrowMessageIcon = (({
  639. styles = {},
  640. ...props
  641. }) => /*#__PURE__*/React__default["default"].createElement("svg", _extends$A({
  642. xmlns: "http://www.w3.org/2000/svg",
  643. width: "32",
  644. height: "32"
  645. }, props), /*#__PURE__*/React__default["default"].createElement("path", {
  646. d: "M15.975.003C8.195-.156.935 6.24.125 13.985c-.855 6.55 2.741 13.46 8.74 16.314 5.666 2.847 13.012 1.99 17.71-2.33 4.745-4.162 6.727-11.243 4.532-17.206C29.09 4.884 23.445.407 17.201.049c-.408-.03-.817-.046-1.226-.046zm-.181 1.724c7.134-.269 13.84 5.68 14.399 12.804.686 6.283-3.267 12.792-9.283 14.862-5.847 2.162-13.025.06-16.557-5.141C.728 19.174.872 11.679 4.985 6.916c2.632-3.171 6.671-5.174 10.809-5.19zm.283 1.553c-6.6-.21-12.671 5.585-12.79 12.185-.292 5.964 4.129 11.817 10.034 12.953 5.47 1.198 11.584-1.613 14.025-6.702 2.525-4.97 1.396-11.585-2.912-15.216-2.282-2.021-5.3-3.216-8.357-3.22zM16 4.975c5.818-.154 11.117 5.082 11.024 10.905.103 5.384-4.23 10.5-9.636 11.043-5.075.667-10.426-2.587-11.885-7.552-1.53-4.73.48-10.428 4.888-12.864A11.083 11.083 0 0116 4.975zm-5.91 5.475l6.04 4.901 6.042-4.9H10.088zm-1.341 1.138v9.921h14.514V11.79l-7.132 5.787-7.382-5.99z"
  647. })));
  648. function _extends$z() { _extends$z = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends$z.apply(this, arguments); }
  649. var IntermediateEventThrowMultipleIcon = (({
  650. styles = {},
  651. ...props
  652. }) => /*#__PURE__*/React__default["default"].createElement("svg", _extends$z({
  653. xmlns: "http://www.w3.org/2000/svg",
  654. width: "32",
  655. height: "32"
  656. }, props), /*#__PURE__*/React__default["default"].createElement("path", {
  657. d: "M15.975.003C8.195-.156.935 6.24.125 13.985c-.855 6.55 2.741 13.46 8.74 16.314 5.666 2.847 13.012 1.99 17.71-2.33 4.745-4.162 6.727-11.243 4.532-17.206C29.09 4.884 23.445.407 17.201.049c-.408-.03-.817-.046-1.226-.046zm-.181 1.724c7.134-.269 13.84 5.68 14.399 12.804.686 6.283-3.267 12.792-9.283 14.862-5.847 2.162-13.025.06-16.557-5.141C.728 19.174.872 11.679 4.985 6.916c2.632-3.171 6.671-5.174 10.809-5.19zm.283 1.553c-6.6-.21-12.671 5.585-12.79 12.185-.292 5.964 4.129 11.817 10.034 12.953 5.47 1.198 11.584-1.613 14.025-6.702 2.525-4.97 1.396-11.585-2.912-15.216-2.282-2.021-5.3-3.216-8.357-3.22zM16 4.975c5.818-.154 11.117 5.082 11.024 10.905.103 5.384-4.23 10.5-9.636 11.043-5.075.667-10.426-2.587-11.885-7.552-1.53-4.73.48-10.428 4.888-12.864A11.083 11.083 0 0116 4.975zm.006 3.073l-7.62 5.532 2.91 8.95h9.42l2.91-8.95-7.62-5.532z"
  658. })));
  659. function _extends$y() { _extends$y = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends$y.apply(this, arguments); }
  660. var IntermediateEventThrowSignalIcon = (({
  661. styles = {},
  662. ...props
  663. }) => /*#__PURE__*/React__default["default"].createElement("svg", _extends$y({
  664. xmlns: "http://www.w3.org/2000/svg",
  665. width: "32",
  666. height: "32"
  667. }, props), /*#__PURE__*/React__default["default"].createElement("path", {
  668. d: "M15.975.003C8.195-.156.935 6.24.125 13.985c-.855 6.55 2.741 13.46 8.74 16.314 5.666 2.847 13.012 1.99 17.71-2.33 4.745-4.162 6.727-11.243 4.532-17.206C29.09 4.884 23.445.407 17.201.049c-.408-.03-.817-.046-1.226-.046zm-.181 1.724c7.134-.269 13.84 5.68 14.399 12.804.686 6.283-3.267 12.792-9.283 14.862-5.847 2.162-13.025.06-16.557-5.141C.728 19.174.872 11.679 4.985 6.916c2.632-3.171 6.671-5.174 10.809-5.19zm.283 1.553c-6.6-.21-12.671 5.585-12.79 12.185-.292 5.964 4.129 11.817 10.034 12.953 5.47 1.198 11.584-1.613 14.025-6.702 2.525-4.97 1.396-11.585-2.912-15.216-2.282-2.021-5.3-3.216-8.357-3.22zM16 4.975c5.818-.154 11.117 5.082 11.024 10.905.103 5.384-4.23 10.5-9.636 11.043-5.075.667-10.426-2.587-11.885-7.552-1.53-4.73.48-10.428 4.888-12.864A11.083 11.083 0 0116 4.975zm.006 3.52c-2.261 4.07-4.533 8.136-6.798 12.205h13.596L16.005 8.495z"
  669. })));
  670. function _extends$x() { _extends$x = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends$x.apply(this, arguments); }
  671. var LaneIcon = (({
  672. styles = {},
  673. ...props
  674. }) => /*#__PURE__*/React__default["default"].createElement("svg", _extends$x({
  675. xmlns: "http://www.w3.org/2000/svg",
  676. width: "32",
  677. height: "32"
  678. }, props), /*#__PURE__*/React__default["default"].createElement("path", {
  679. d: "M0 7v18.62h32V7H0zm1.655 17.056V8.684h28.62v15.372H1.656z"
  680. })));
  681. function _extends$w() { _extends$w = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends$w.apply(this, arguments); }
  682. var ManualTaskIcon = (({
  683. styles = {},
  684. ...props
  685. }) => /*#__PURE__*/React__default["default"].createElement("svg", _extends$w({
  686. xmlns: "http://www.w3.org/2000/svg",
  687. width: "32",
  688. height: "32"
  689. }, props), /*#__PURE__*/React__default["default"].createElement("path", {
  690. d: "M6.494 3C2.916 3 0 5.903 0 9.475v13.383c0 3.572 2.916 6.475 6.494 6.475h19.012c3.578 0 6.494-2.903 6.494-6.475V9.475C32 5.903 29.084 3 25.506 3H6.494zm0 2h19.012C28.015 5 30 6.98 30 9.475v13.383c0 2.495-1.985 4.475-4.494 4.475H6.494C3.985 27.333 2 25.353 2 22.858V9.475C2 6.98 3.985 5 6.494 5zm4.43 1.328c-.222.005-.43.09-.606.203-.985.638-4.356 2.977-5.096 3.486-.67.46-1.12 1.153-1.38 1.974-.27.858-.235 1.793-.232 2.576.002.59.016 1.104.17 1.727.22.908.634 1.63 1.23 2.118.597.49 1.363.732 2.23.734 3.038.012 6.078.016 9.119 0 .327-.002.645-.127.848-.37.204-.241.287-.56.291-.914a1.732 1.732 0 00-.097-.625h.327c.335 0 .641-.11.852-.316.21-.206.317-.475.374-.754a1.783 1.783 0 00-.126-1.143 1.18 1.18 0 00.877-.521c.196-.306.257-.666.258-1.025.001-.375-.088-.738-.293-1.033a1.179 1.179 0 00-.958-.512h-.478c.108-.237.156-.505.155-.782-.003-.373-.098-.721-.316-.99a1.21 1.21 0 00-.943-.43c-2.273-.004-4.236.018-6.412.012l-.19-.001c.102-.104.202-.205.312-.314.337-.336.662-.652.83-.869.4-.516.46-1.215.123-1.729-.178-.272-.439-.456-.72-.494a.93.93 0 00-.148-.008zm.029.728l.022.001c.055.008.115.027.209.172.132.201.126.606-.09.884-.079.102-.431.465-.767.8-.337.334-.657.643-.815.836-.153.186-.096.338-.056.435.04.096.085.212.298.263.063.014.066.01.086.012l.066.003c2.429.027 4.986-.004 7.223-.003.194 0 .293.056.379.162.086.105.151.286.153.533 0 .257-.065.467-.155.59-.09.124-.183.182-.37.183-1.706-.001-3.411-.005-5.117-.009v.731c2.23.004 4.461.01 6.692.012.17 0 .265.06.361.2.096.138.164.364.163.615 0 .268-.058.501-.143.634-.085.132-.162.193-.385.195-2.32-.001-4.554-.006-6.688-.003v.73c1.905 0 3.809.003 5.713.001.194.005.316.09.416.26.102.173.151.442.093.728-.04.193-.102.313-.17.38-.067.065-.148.108-.343.108h-5.71l.002.734c1.445 0 2.89-.01 4.334-.001.162 0 .232.041.297.123.064.081.123.238.12.488-.003.244-.061.385-.12.455-.06.07-.127.11-.296.11-3.037.016-6.076.012-9.113 0-.735-.002-1.316-.196-1.77-.568-.454-.372-.793-.935-.986-1.728-.134-.546-.146-.978-.148-1.558-.003-.796-.018-1.664.199-2.354.222-.705.582-1.24 1.096-1.593.75-.515 4.14-2.866 5.079-3.474a.504.504 0 01.241-.087z"
  691. })));
  692. function _extends$v() { _extends$v = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends$v.apply(this, arguments); }
  693. var MessageFlowIcon = (({
  694. styles = {},
  695. ...props
  696. }) => /*#__PURE__*/React__default["default"].createElement("svg", _extends$v({
  697. xmlns: "http://www.w3.org/2000/svg",
  698. width: "32",
  699. height: "32"
  700. }, props), /*#__PURE__*/React__default["default"].createElement("path", {
  701. d: "M4.073 26.607l1.295 1.296L1.325 32l-.662-.633L0 30.735l4.073-4.128zm6.953-7.046l1.296 1.296L1.325 32l7.555-7.656-1.295-1.296 1.455-1.474 1.986-2.013zM32 .06s-2.699 5.189-5.417 10.462l-.326.633c-1.14 2.214-2.265 4.407-3.176 6.2-1.228-1.222-2.449-2.452-3.676-3.675l-3.57 3.618-1.297-1.296 3.541-3.588c-.98-.964-1.932-1.958-2.923-2.91l-.753-.706c2.68-1.258 6.533-3.165 9.95-4.876l.617-.309C28.838 1.673 32 .06 32 .06zm-4.126 4.06l-.015.007-.115.057-.048.024-.115.057L17.7 9.172l5.017 4.948 5.157-10z"
  702. })));
  703. function _extends$u() { _extends$u = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends$u.apply(this, arguments); }
  704. var ParticipantIcon = (({
  705. styles = {},
  706. ...props
  707. }) => /*#__PURE__*/React__default["default"].createElement("svg", _extends$u({
  708. xmlns: "http://www.w3.org/2000/svg",
  709. width: "32",
  710. height: "32"
  711. }, props), /*#__PURE__*/React__default["default"].createElement("path", {
  712. d: "M0 5v22.069h32V5H0zm30.276 1.684v18.82H6.62V6.684h23.655zm-28.62 0h3.31v18.82h-3.31V6.684z"
  713. })));
  714. function _extends$t() { _extends$t = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends$t.apply(this, arguments); }
  715. var ProcessIcon = (({
  716. styles = {},
  717. ...props
  718. }) => /*#__PURE__*/React__default["default"].createElement("svg", _extends$t({
  719. xmlns: "http://www.w3.org/2000/svg",
  720. width: "32",
  721. height: "32"
  722. }, props), /*#__PURE__*/React__default["default"].createElement("path", {
  723. fillRule: "evenodd",
  724. d: "M16.177 0l.137.002c.452.009.9.037 1.342.082.346.036.62.303.68.646l.437 2.536c.055.319.296.57.608.655.986.269 1.923.653 2.796 1.14.28.155.624.145.885-.039l2.083-1.47a.775.775 0 01.937.022c.86.699 1.645 1.484 2.343 2.343.22.27.223.653.023.937l-1.439 2.038a.833.833 0 00-.031.896c.512.889.92 1.846 1.204 2.855a.833.833 0 00.653.601l2.435.42c.342.059.61.333.645.679a15.928 15.928 0 01.08 2.064l-.003.114c-.012.382-.038.76-.077 1.134a.775.775 0 01-.645.68l-2.396.412a.835.835 0 00-.656.61 12.511 12.511 0 01-1.2 2.917.832.832 0 00.034.892l1.396 1.978c.2.284.196.667-.023.936a16.104 16.104 0 01-2.343 2.343.775.775 0 01-.937.023l-1.99-1.404a.833.833 0 00-.88-.026c-.907.516-1.886.922-2.916 1.2a.833.833 0 00-.61.656l-.414 2.396a.775.775 0 01-.679.646 16.096 16.096 0 01-3.312 0 .775.775 0 01-.679-.646l-.423-2.452a.834.834 0 00-.598-.636 12.474 12.474 0 01-1.468-.514 12.49 12.49 0 01-1.417-.68.833.833 0 00-.878.03l-2.026 1.43a.775.775 0 01-.937-.023 16.069 16.069 0 01-2.342-2.342.774.774 0 01-.024-.936l1.402-1.986a.833.833 0 00.032-.896 12.507 12.507 0 01-1.214-2.911.833.833 0 00-.655-.606l-2.386-.412a.775.775 0 01-.646-.678 16.097 16.097 0 010-3.314.775.775 0 01.646-.678l2.386-.412a.833.833 0 00.655-.606 12.507 12.507 0 011.214-2.911.833.833 0 00-.032-.896L3.552 6.853a.774.774 0 01.023-.936 16.091 16.091 0 012.343-2.343.775.775 0 01.937-.023l2.03 1.433c.26.177.6.182.874.028.915-.512 1.88-.9 2.87-1.167a.833.833 0 00.612-.656l.424-2.46a.775.775 0 01.679-.645C14.845.032 15.348.004 15.85 0h.326zM16 6.4c-5.302 0-9.6 4.297-9.6 9.599 0 5.302 4.298 9.6 9.6 9.6s9.6-4.298 9.6-9.6-4.298-9.6-9.6-9.6zm-3 4.283c0-1.425 1.637-2.203 2.715-1.29l5.69 4.815c.794.672.794 1.91 0 2.583l-5.69 4.815c-1.078.913-2.715.134-2.715-1.29z"
  725. })));
  726. function _extends$s() { _extends$s = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends$s.apply(this, arguments); }
  727. var ReceiveTaskIcon = (({
  728. styles = {},
  729. ...props
  730. }) => /*#__PURE__*/React__default["default"].createElement("svg", _extends$s({
  731. xmlns: "http://www.w3.org/2000/svg",
  732. width: "32",
  733. height: "32"
  734. }, props), /*#__PURE__*/React__default["default"].createElement("path", {
  735. d: "M6.494 3C2.916 3 0 5.903 0 9.475v13.383c0 3.572 2.916 6.475 6.494 6.475h19.012c3.578 0 6.494-2.903 6.494-6.475V9.475C32 5.903 29.084 3 25.506 3H6.494zm0 2h19.012C28.015 5 30 6.98 30 9.475v13.383c0 2.495-1.985 4.475-4.494 4.475H6.494C3.985 27.333 2 25.353 2 22.858V9.475C2 6.98 3.985 5 6.494 5zM5.23 7.764v11.577h17.55V7.764H5.23zm1.816.758h13.917l-6.959 4.577-6.958-4.577zm-1.06.21l8.018 5.274 8.018-5.275v9.853H5.987V8.73z"
  736. })));
  737. function _extends$r() { _extends$r = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends$r.apply(this, arguments); }
  738. var ScriptTaskIcon = (({
  739. styles = {},
  740. ...props
  741. }) => /*#__PURE__*/React__default["default"].createElement("svg", _extends$r({
  742. xmlns: "http://www.w3.org/2000/svg",
  743. width: "32",
  744. height: "32"
  745. }, props), /*#__PURE__*/React__default["default"].createElement("path", {
  746. d: "M6.494 3C2.916 3 0 5.903 0 9.475v13.383c0 3.572 2.916 6.475 6.494 6.475h19.012c3.578 0 6.494-2.903 6.494-6.475V9.475C32 5.903 29.084 3 25.506 3H6.494zm0 2h19.012C28.015 5 30 6.98 30 9.475v13.383c0 2.495-1.985 4.475-4.494 4.475H6.494C3.985 27.333 2 25.353 2 22.858V9.475C2 6.98 3.985 5 6.494 5zm2.99 3.077l-.077.045-.026.015c-1.09.646-1.84 1.239-2.336 1.818-.496.579-.735 1.162-.742 1.725-.014 1.119.812 1.958 1.544 2.708.732.75 1.385 1.456 1.446 2.041.032.298-.039.598-.364 1.008-.324.408-.911.897-1.85 1.445l-1.388.808h8.56l.101-.059c.996-.58 1.667-1.116 2.094-1.655.429-.54.603-1.107.547-1.638-.11-1.052-.967-1.818-1.688-2.556-.721-.739-1.306-1.436-1.298-2.092.004-.331.132-.7.535-1.171.402-.47 1.08-1.02 2.119-1.636l1.362-.806h-8.54zm.241.867h5.271a6.83 6.83 0 00-1.113 1.01c-.496.58-.736 1.163-.743 1.726-.014 1.119.812 1.958 1.544 2.708.732.75 1.385 1.456 1.446 2.041.032.298-.039.598-.364 1.008-.312.393-.872.862-1.753 1.386H8.728c.367-.286.658-.566.88-.847.43-.54.604-1.107.548-1.638-.11-1.052-.968-1.818-1.688-2.556-.721-.739-1.306-1.435-1.298-2.092.004-.331.132-.7.534-1.171.389-.454 1.04-.984 2.021-1.575zm-1.233 1.48v.4h4.12v-.4h-4.12zm-.154 2.158v.4H12.6v-.4H8.34zm1.931 2.158v.4h4.126v-.4H10.27zm.59 2.158v.4h4.276v-.4h-4.276z"
  747. })));
  748. function _extends$q() { _extends$q = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends$q.apply(this, arguments); }
  749. var SendTaskIcon = (({
  750. styles = {},
  751. ...props
  752. }) => /*#__PURE__*/React__default["default"].createElement("svg", _extends$q({
  753. xmlns: "http://www.w3.org/2000/svg",
  754. width: "32",
  755. height: "32"
  756. }, props), /*#__PURE__*/React__default["default"].createElement("path", {
  757. d: "M6.494 3C2.916 3 0 5.903 0 9.475v13.383c0 3.572 2.916 6.475 6.494 6.475h19.012c3.578 0 6.494-2.903 6.494-6.475V9.475C32 5.903 29.084 3 25.506 3H6.494zm0 2h19.012C28.015 5 30 6.98 30 9.475v13.383c0 2.495-1.985 4.475-4.494 4.475H6.494C3.985 27.333 2 25.353 2 22.858V9.475C2 6.98 3.985 5 6.494 5zm-1.38 3.16l8.332 4.717L21.78 8.16H5.114zm.021 1.745v9.309H21.8V9.905l-8.353 4.655-8.31-4.655z"
  758. })));
  759. function _extends$p() { _extends$p = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends$p.apply(this, arguments); }
  760. var ServiceTaskIcon = (({
  761. styles = {},
  762. ...props
  763. }) => /*#__PURE__*/React__default["default"].createElement("svg", _extends$p({
  764. xmlns: "http://www.w3.org/2000/svg",
  765. width: "32",
  766. height: "32"
  767. }, props), /*#__PURE__*/React__default["default"].createElement("path", {
  768. d: "M6.494 3C2.916 3 0 5.903 0 9.475v13.383c0 3.572 2.916 6.475 6.494 6.475h19.012c3.578 0 6.494-2.903 6.494-6.475V9.475C32 5.903 29.084 3 25.506 3H6.494zm0 2h19.012C28.015 5 30 6.98 30 9.475v13.383c0 2.495-1.985 4.475-4.494 4.475H6.494C3.985 27.333 2 25.353 2 22.858V9.475C2 6.98 3.985 5 6.494 5zm1.22 1.681V7.84c-.329.093-.63.223-.914.382l-.83-.82-1.554 1.561.83.82c-.16.288-.285.594-.372.911l-1.177.002v2.2l1.189-.004c.109.431.345.819.58 1.165v-1.898l-1.038.004v-.737l1.034-.002.058-.294c.084-.429.252-.838.493-1.203l.165-.25-.727-.718.523-.526.728.719.247-.165c.379-.25.793-.417 1.206-.505l.291-.06-.002-1.01h.75L9.19 8.417H11.16c-.185-.221-.951-.508-1.237-.588L9.93 6.68H7.713zm2.078 2.105l.003 1.158a4.19 4.19 0 00-.915.383l-.83-.821-1.553 1.562.83.82c-.16.288-.286.593-.373.91l-1.176.003v2.2l1.188-.004c.094.326.224.624.383.905l-.85.847 1.57 1.543.847-.843c.29.161.599.286.919.373v1.198c.756.006 1.56.003 2.206.003V17.81a4.19 4.19 0 00.915-.383l.847.835 1.554-1.56-.848-.836c.16-.288.286-.594.373-.912l1.152-.007V12.75l-1.165.007a4.09 4.09 0 00-.382-.905l.805-.807-1.57-1.546-.804.806a4.16 4.16 0 00-.915-.372l.007-1.147H9.792zm.732.73h.751l-.006 1.005.297.058c.43.085.844.252 1.21.492l.25.162.701-.704.528.52-.702.704.169.25c.248.374.412.779.505 1.196l.061.292 1.016-.006v.737l-1.01.006-.058.292c-.085.43-.252.838-.494 1.205l-.165.25.744.733-.523.525-.743-.734-.248.165c-.378.247-.789.418-1.203.503l-.294.058v1.067h-.745v-1.059l-.295-.057a3.395 3.395 0 01-1.21-.492l-.248-.162-.747.743-.528-.52.747-.744-.17-.25a3.546 3.546 0 01-.506-1.196l-.06-.291-1.04.004v-.738l1.034-.002.058-.294c.085-.428.252-.837.493-1.203l.165-.25-.726-.718.522-.526.728.72.248-.166a3.546 3.546 0 011.205-.504l.292-.06-.003-1.01zm.388 2.685a1.65 1.65 0 00-1.645 1.645c0 .904.74 1.645 1.645 1.645a1.65 1.65 0 001.645-1.645 1.65 1.65 0 00-1.645-1.645zm0 .73a.91.91 0 01.915.915.91.91 0 01-.915.914.91.91 0 01-.915-.914.91.91 0 01.915-.915z"
  769. })));
  770. function _extends$o() { _extends$o = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends$o.apply(this, arguments); }
  771. var StartEventCompensationIcon = (({
  772. styles = {},
  773. ...props
  774. }) => /*#__PURE__*/React__default["default"].createElement("svg", _extends$o({
  775. xmlns: "http://www.w3.org/2000/svg",
  776. width: "32",
  777. height: "32"
  778. }, props), /*#__PURE__*/React__default["default"].createElement("path", {
  779. d: "M15.995.001C9.705-.084 3.643 3.964 1.257 9.775-1.235 15.485.06 22.577 4.42 27.03c4.193 4.513 11.102 6.17 16.887 4.058 5.996-2.042 10.423-7.93 10.664-14.269.403-6.227-3.26-12.44-8.87-15.153A15.924 15.924 0 0015.994 0zm0 1.73c6.213-.108 12.122 4.355 13.726 10.357 1.678 5.653-.592 12.198-5.463 15.547-5.06 3.719-12.564 3.45-17.343-.626C2.101 23.171.377 16.07 2.848 10.44c2.14-5.205 7.515-8.774 13.147-8.708zm-.566 9.03l-7.415 5.235 7.415 5.238v-5.062c2.386 1.689 4.775 3.375 7.163 5.062V10.761l-7.163 5.058v-5.058zm-.866 1.666v7.13L9.51 15.993l5.052-3.565zm7.166 0v7.137l-5.052-3.568 5.052-3.569z"
  780. })));
  781. function _extends$n() { _extends$n = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends$n.apply(this, arguments); }
  782. var StartEventConditionIcon = (({
  783. styles = {},
  784. ...props
  785. }) => /*#__PURE__*/React__default["default"].createElement("svg", _extends$n({
  786. xmlns: "http://www.w3.org/2000/svg",
  787. width: "32",
  788. height: "32"
  789. }, props), /*#__PURE__*/React__default["default"].createElement("path", {
  790. d: "M16 0C7.174 0 0 7.174 0 16s7.174 16 16 16 16-7.174 16-16S24.826 0 16 0zm0 1.73c7.892 0 14.27 6.378 14.27 14.27 0 7.891-6.379 14.27-14.27 14.27S1.73 23.891 1.73 16C1.73 8.108 8.108 1.73 16 1.73zm-5.362 7.523v13.493h10.724V9.253H10.638zm.863.866h8.995V21.88H11.501V10.12zm.928 1.324v.863h7.139v-.863h-7.139zm0 2.605v.867h7.139v-.867h-7.139zm0 3.01v.864h7.139v-.863h-7.139zm0 2.72v.863h7.139v-.863h-7.139z"
  791. })));
  792. function _extends$m() { _extends$m = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends$m.apply(this, arguments); }
  793. var StartEventErrorIcon = (({
  794. styles = {},
  795. ...props
  796. }) => /*#__PURE__*/React__default["default"].createElement("svg", _extends$m({
  797. xmlns: "http://www.w3.org/2000/svg",
  798. width: "32",
  799. height: "32"
  800. }, props), /*#__PURE__*/React__default["default"].createElement("path", {
  801. d: "M15.995.005C9.705-.08 3.643 3.968 1.257 9.78-1.235 15.49.06 22.581 4.42 27.034c4.193 4.513 11.102 6.17 16.887 4.058 5.996-2.042 10.423-7.93 10.664-14.269.403-6.227-3.26-12.44-8.87-15.153A15.924 15.924 0 0015.994.005zm0 1.73c6.213-.108 12.122 4.355 13.726 10.357 1.678 5.653-.592 12.198-5.463 15.547-5.06 3.719-12.564 3.45-17.343-.626-4.814-3.838-6.538-10.939-4.067-16.57 2.14-5.205 7.515-8.774 13.147-8.708zm6.13 7.45l-3.635 7.37-4.52-5.88c-1.37 4.048-2.738 8.095-4.106 12.143l4.603-5.917 4.748 5.433 2.91-13.149zm-7.754 3.889l4.299 5.449 1.073-2.39-1.028 4.135-4.387-5.16-1.78 2.75 1.823-4.784z"
  802. })));
  803. function _extends$l() { _extends$l = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends$l.apply(this, arguments); }
  804. var StartEventEscalationIcon = (({
  805. styles = {},
  806. ...props
  807. }) => /*#__PURE__*/React__default["default"].createElement("svg", _extends$l({
  808. xmlns: "http://www.w3.org/2000/svg",
  809. width: "32",
  810. height: "32"
  811. }, props), /*#__PURE__*/React__default["default"].createElement("path", {
  812. d: "M15.995.001C9.705-.084 3.643 3.964 1.257 9.775-1.235 15.485.06 22.577 4.42 27.03c4.193 4.513 11.102 6.17 16.887 4.058 5.996-2.042 10.423-7.93 10.664-14.269.403-6.227-3.26-12.44-8.87-15.153A15.924 15.924 0 0015.994 0zm0 1.73c6.213-.108 12.122 4.355 13.726 10.357 1.678 5.653-.592 12.198-5.463 15.547-5.06 3.719-12.564 3.45-17.343-.626C2.101 23.171.377 16.07 2.848 10.44c2.14-5.205 7.515-8.774 13.147-8.708zm0 7.183c-1.674 4.658-2.736 9.509-4.41 14.166 1.535-1.526 2.874-3.236 4.41-4.763l4.41 4.763c-1.499-4.713-2.913-9.453-4.41-14.166zm.032 2.931c.822 2.588 1.598 5.19 2.42 7.778l-2.42-2.615c-.683.598-2.455 2.887-2.34 2.39.871-2.489 1.448-5.07 2.34-7.553z"
  813. })));
  814. function _extends$k() { _extends$k = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends$k.apply(this, arguments); }
  815. var StartEventMessageIcon = (({
  816. styles = {},
  817. ...props
  818. }) => /*#__PURE__*/React__default["default"].createElement("svg", _extends$k({
  819. xmlns: "http://www.w3.org/2000/svg",
  820. width: "32",
  821. height: "32"
  822. }, props), /*#__PURE__*/React__default["default"].createElement("path", {
  823. d: "M15.995.001C9.705-.084 3.643 3.964 1.257 9.775-1.235 15.485.06 22.577 4.42 27.03c4.193 4.513 11.102 6.17 16.887 4.058 5.996-2.042 10.423-7.93 10.664-14.269.403-6.227-3.26-12.44-8.87-15.153A15.924 15.924 0 0015.994 0zm0 1.73c6.213-.108 12.122 4.355 13.726 10.357 1.678 5.653-.592 12.198-5.463 15.547-5.06 3.719-12.564 3.45-17.343-.626C2.101 23.171.377 16.07 2.848 10.44c2.14-5.205 7.515-8.774 13.147-8.708zm-7.257 8.732v11.069h14.513v-11.07H8.738zm3.224 1.73h8.064c-1.428.878-2.857 2.807-4.285 3.018l-3.779-3.019zm9.562 1.017v6.593H10.465V13.21l5.528 4.417 5.53-4.418z"
  824. })));
  825. function _extends$j() { _extends$j = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends$j.apply(this, arguments); }
  826. var StartEventMultipleIcon = (({
  827. styles = {},
  828. ...props
  829. }) => /*#__PURE__*/React__default["default"].createElement("svg", _extends$j({
  830. xmlns: "http://www.w3.org/2000/svg",
  831. width: "32",
  832. height: "32"
  833. }, props), /*#__PURE__*/React__default["default"].createElement("path", {
  834. d: "M15.995.001C9.705-.084 3.643 3.964 1.257 9.775-1.235 15.485.06 22.577 4.42 27.03c4.193 4.513 11.102 6.17 16.887 4.058 5.996-2.042 10.423-7.93 10.664-14.269.403-6.227-3.26-12.44-8.87-15.153A15.924 15.924 0 0015.994 0zm0 1.73c6.213-.108 12.122 4.355 13.726 10.357 1.678 5.653-.592 12.198-5.463 15.547-5.06 3.719-12.564 3.45-17.343-.626C2.101 23.171.377 16.07 2.848 10.44c2.14-5.205 7.515-8.774 13.147-8.708zm0 6.328l-7.626 5.536c.97 2.986 1.942 5.971 2.913 8.957h9.426l2.912-8.957-7.625-5.536zm0 1.068l6.609 4.798-2.525 7.763H11.91l-2.524-7.763 6.609-4.798z"
  835. })));
  836. function _extends$i() { _extends$i = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends$i.apply(this, arguments); }
  837. var StartEventNonInterruptingConditionIcon = (({
  838. styles = {},
  839. ...props
  840. }) => /*#__PURE__*/React__default["default"].createElement("svg", _extends$i({
  841. xmlns: "http://www.w3.org/2000/svg",
  842. width: "32",
  843. height: "32"
  844. }, props), /*#__PURE__*/React__default["default"].createElement("path", {
  845. d: "M10.632 9.189V22.68h10.723V9.189H10.632zm.862.865h8.994v11.76H11.494v-11.76zm.928 1.324v.863h7.138v-.863h-7.138zm0 2.605v.866h7.138v-.866h-7.138zm0 3.01v.863h7.138v-.863h-7.138zm0 2.72v.862h7.138v-.863h-7.138zM16.12 0h-.232l-.22.004h-.012l-.221.006h-.012l-.22.01h-.012l-.22.013h-.012l-.22.016h-.012l-.22.019h-.005l-.006.001-.22.021h-.006l-.005.001-.22.025h-.011l-.22.028h-.005l-.006.002-.219.03h-.005l-.006.001-.218.033-.006.001-.006.001-.217.036-.006.001-.006.001-.217.039-.006.001-.006.001-.216.042-.006.001-.006.001-.215.045-.006.001-.006.002-.215.047-.006.002-.006.001-.214.05-.006.002-.006.002-.115.029-.152.053-.14.081-.122.106-.1.126-.075.143-.047.154-.018.16.012.16.042.156.07.145.095.13.118.11.137.086.15.059.158.03h.161l.132-.022.11-.028.202-.047.203-.046.208-.043.202-.039.206-.037.206-.034.205-.03.208-.03.205-.025.209-.023.208-.02.21-.017.209-.015.207-.011.21-.009.21-.006.207-.003h.21l.21.002.207.005.207.008.212.011.207.014.208.017.209.019.208.022.205.025.206.028.207.03.208.035.205.036.202.039.052.01.16.018.16-.012.156-.042.146-.07.13-.096.109-.119.085-.136.06-.15.03-.159v-.16l-.03-.16-.059-.15-.086-.136-.109-.118-.13-.096-.145-.07-.128-.038-.057-.011-.006-.002h-.006l-.216-.042-.006-.001-.006-.001-.217-.039H18.9l-.006-.002-.217-.035-.006-.001-.006-.001-.218-.032-.006-.001-.006-.001-.218-.03h-.006l-.006-.001-.219-.027h-.011l-.22-.024-.005-.001h-.006l-.22-.021h-.006l-.006-.001-.22-.017-.005-.001h-.006L17.06.03h-.012l-.22-.012h-.012l-.22-.01h-.012l-.22-.005h-.012L16.132 0h-.012zm8.715 2.783l-.157.034-.149.063-.134.089-.116.112-.092.132-.067.147-.038.157-.008.16.021.16.051.153.079.141.103.124.102.087.052.038h.001l.087.064v.001l.082.061.002.001.076.059h.001l.084.065.082.066.002.001.079.063.002.002.077.063.081.067.002.002.077.065.076.065.001.002.08.07.078.07h.002l.075.068.077.072.002.001.073.069.077.073.072.07.002.001.077.076.07.07v.001l.075.076.07.073.002.001.074.079.002.002.069.074.069.075.074.082.07.08.002.001.068.079h.001l.067.079.068.082.065.078.001.002.068.083.067.084.063.081.001.002.067.087.002.002.063.084.001.001.064.087.008.01.008.01.095.12.093.121.09.119.087.119.088.122.086.123.084.12.081.122.001.002.084.126.08.126.08.127.077.126.079.131.074.127.075.131.073.131.07.13.07.133.069.133.045.09.086.137.109.119.13.096.144.07.156.042.16.013.16-.017.155-.047.143-.075.126-.1.106-.121.082-.14.054-.151.025-.16-.005-.16-.035-.158-.05-.124-.048-.095-.002-.004-.002-.004-.073-.14-.002-.005-.002-.004-.074-.14-.002-.004-.002-.004-.076-.14-.002-.003-.002-.004-.077-.139-.003-.004-.002-.004-.078-.138-.003-.004-.002-.003-.08-.137-.002-.004-.003-.004-.081-.136-.002-.004-.003-.004-.083-.136-.002-.003-.002-.004-.085-.135-.002-.004-.003-.003-.085-.134-.003-.004-.002-.004-.087-.132-.003-.004-.003-.004-.088-.132-.003-.003-.002-.004-.09-.13-.003-.005-.003-.003-.091-.13-.003-.004-.002-.004-.093-.129-.003-.003-.003-.004-.094-.128-.003-.004-.003-.003-.095-.127-.003-.004-.003-.004-.097-.125-.003-.004-.003-.004-.09-.114-.06-.082-.003-.003-.002-.003-.069-.091-.002-.004-.002-.003-.07-.09-.003-.003-.002-.003-.07-.09-.003-.003-.002-.003-.071-.09-.002-.003-.003-.002-.072-.089-.002-.003-.002-.003-.073-.088-.002-.003-.002-.002-.074-.087-.002-.003-.002-.003-.074-.086-.003-.003-.002-.003-.074-.086-.003-.002-.002-.003-.075-.085-.003-.003-.002-.002-.076-.084-.002-.003-.003-.003-.076-.083-.002-.003-.003-.003-.077-.082-.002-.003-.003-.002-.077-.082-.003-.003-.003-.002-.078-.081-.002-.003-.003-.003-.078-.08-.003-.002-.003-.003-.079-.08-.002-.002-.003-.002-.08-.08-.002-.002-.003-.002-.08-.078-.003-.003-.003-.002-.08-.077-.003-.003-.003-.002-.082-.077-.002-.002-.003-.002-.082-.076-.003-.002-.002-.003-.083-.075-.003-.002-.002-.003-.084-.074-.002-.002-.003-.002-.084-.074-.003-.002-.002-.002-.085-.073-.002-.002-.003-.003-.085-.071-.003-.003-.002-.002-.086-.07-.003-.003-.002-.002-.086-.07-.003-.003-.003-.002-.086-.07-.003-.002-.003-.002-.087-.069-.002-.002-.003-.002-.088-.068-.002-.002-.003-.002-.088-.067-.003-.003-.003-.002-.088-.066-.003-.002-.003-.002-.089-.066-.003-.002-.003-.002-.057-.042-.14-.082-.15-.055-.16-.026-.16.004zM6.377 3.21l-.157.037-.148.066-.111.074-.007.006-.003.002-.003.002-.086.069-.003.002-.002.002-.086.07-.003.002-.002.002-.086.07-.002.003-.003.002-.085.071-.002.002-.003.003-.084.071-.003.003-.002.002-.084.072-.003.003-.002.002-.083.073-.003.003-.002.002-.083.074-.002.002-.003.003-.082.074-.003.003-.002.002-.081.076-.003.002-.003.002-.08.077-.003.002-.003.003-.08.076-.002.003-.003.002-.08.078-.002.002-.003.003-.079.078-.002.003-.003.002-.078.08-.003.002-.002.002-.078.08-.002.003-.003.002-.077.08-.003.004-.002.002-.077.081-.002.003-.003.003-.076.082-.002.002-.003.003-.075.082-.002.003-.003.003-.074.083-.003.003-.002.003-.074.084-.003.003-.002.002-.074.085-.002.003-.002.003-.073.085-.003.003-.002.003-.072.086-.002.003-.003.003-.071.087-.003.003-.002.002-.07.088-.003.003-.002.003-.07.088-.003.003-.002.003-.07.09-.002.002-.002.003-.069.09-.002.003-.003.003-.068.09-.002.003-.002.003-.067.092-.003.003-.002.003-.067.092-.002.003-.002.003-.066.092-.002.003-.002.004-.066.093-.002.003-.002.003-.065.094-.002.003-.002.004-.064.094-.002.003-.002.004-.063.095-.002.003-.002.003-.063.097-.002.003-.002.003-.046.073-.05.07-.003.002-.002.003-.067.093-.003.003-.002.003-.066.094-.002.003-.002.003-.066.094-.002.003-.002.003-.064.094-.002.004-.002.003-.064.094-.002.004-.002.003-.062.095-.002.003-.002.003-.062.096-.002.003-.002.003-.06.096-.003.003-.002.003-.06.096-.001.004-.002.003-.059.096-.002.004-.002.003-.058.097-.002.003-.001.003-.057.098-.002.003-.002.003-.056.098-.002.003-.002.003-.055.098-.002.004-.001.003-.055.098-.001.004-.002.003-.054.099-.001.003-.002.003-.052.1-.002.002-.002.004-.051.1-.002.002-.002.004-.05.1-.002.003-.002.003-.05.1v.003l-.002.004-.05.1v.003l-.002.004-.048.1-.002.004-.001.003-.047.101-.002.003-.001.004-.013.027-.052.152-.024.16.006.16.037.157.064.148.091.133.114.114.134.09.147.065.157.036.162.006.159-.024.152-.053.14-.08.122-.105.1-.126.066-.117.01-.023.044-.095.045-.095.002-.003.042-.087.048-.097.048-.095v-.001l.048-.092.001-.001.047-.09.05-.093.002-.002.049-.09.052-.092.001-.002.051-.089.001-.002.051-.087.053-.088.001-.002.055-.091.057-.091.057-.09.001-.002.057-.089.055-.083.001-.002.06-.09.06-.088.062-.089.001-.001.06-.084.063-.088.065-.089.017-.023.016-.025.06-.094.059-.09v-.002l.058-.086.057-.086.001-.001.062-.09.062-.088.001-.002.06-.085.002-.002.06-.082.063-.087.064-.084.002-.002.061-.08.065-.084.064-.08v-.001l.067-.083.067-.082.07-.083.069-.08.063-.074.074-.083.068-.077.002-.002.07-.076.07-.075.072-.077.001-.001.067-.07.076-.078.002-.002.07-.07.075-.075.002-.002.072-.07.075-.072.002-.002.073-.069.074-.068.001-.001.08-.073.076-.068.002-.002.072-.063v-.001l.078-.067.079-.068.002-.001.08-.068.002-.002.077-.063.082-.066.001-.001.075-.06.002-.002.006-.004.117-.111.094-.131.068-.146.04-.156.01-.161-.019-.16-.049-.154-.076-.141-.102-.125-.123-.105-.14-.079-.153-.052-.16-.023-.16.007zm24.596 11.088l-.156.04-.146.067-.131.094-.112.117-.087.135-.061.15-.033.157-.004.134.007.142.005.152.004.15.002.149v.153l.001.011v.015l.004.11.002.11v.002l.002.106v.321l-.003.102-.002.106-.004.107-.005.105-.006.106-.006.106-.008.106v.002l-.008.103v.002l-.01.1-.01.105-.01.105-.013.105-.012.099v.002l-.014.108-.014.1-.016.105-.016.103v.002l-.017.099-.018.104-.019.103v.002l-.019.097-.02.104-.022.103v.001l-.022.098-.023.103v.002l-.024.096-.025.103v.002l-.024.096-.027.102v.003l-.026.093v.001l-.029.103v.002l-.03.099-.028.097v.002l-.03.095-.03.096v.001l-.033.1-.031.095v.002l-.035.1v.003l-.034.094v.003l-.035.096v.001l-.034.09v.002l-.038.098-.036.093v.002l-.038.095-.079.194-.08.188-.085.189-.087.19-.09.184-.092.183-.095.184-.05.093-.064.148-.034.158-.005.16.026.16.054.151.082.14.106.12.127.1.143.075.154.046.16.017.161-.013.156-.042.144-.071.13-.096.109-.119.072-.112.053-.099.003-.005.003-.006.102-.195.003-.006.003-.006.098-.196.003-.006.003-.006.096-.197.002-.006.003-.006.093-.2.002-.006.003-.006.09-.2.002-.006.003-.007.086-.202.003-.006.002-.006.084-.203.002-.005.001-.005.04-.102.002-.003.001-.003.04-.103.001-.003.001-.003.04-.103v-.004l.001-.003.039-.103v-.003l.002-.003.037-.104.001-.003.001-.003.037-.104v-.004l.002-.003.035-.104.002-.003v-.004l.035-.104.002-.004v-.003l.034-.105.002-.003v-.003l.034-.105v-.004l.002-.003.032-.106.001-.003.001-.003.031-.106.001-.003.001-.004.031-.106.001-.003.001-.004.03-.106v-.003l.002-.004.028-.107.001-.003.001-.003.028-.107.001-.004.001-.003.027-.107.001-.004v-.003l.027-.108.001-.003v-.004l.026-.108.001-.003v-.004l.025-.108.001-.003v-.004l.025-.108v-.004l.001-.003.023-.109v-.003l.001-.004.022-.109v-.003l.002-.004.02-.109.001-.004v-.003l.02-.11.002-.003v-.004l.02-.11v-.007l.019-.11v-.003l.001-.004.017-.11v-.004l.001-.003.017-.11v-.008l.016-.11v-.004l.001-.004.015-.11v-.008l.015-.111v-.008l.013-.111v-.007l.013-.112v-.007l.011-.112v-.004l.001-.004.01-.112v-.007l.01-.112v-.008l.008-.112v-.008l.007-.113v-.007l.007-.113v-.008l.005-.113v-.007l.005-.114v-.007l.003-.114v-.007l.003-.114v-.129l.001-.114v-.13l-.003-.114v-.008l-.003-.115v-.007l-.003-.102v-.155l-.003-.158v-.01l-.004-.158v-.01l-.006-.158v-.01l-.007-.148-.023-.16-.051-.152-.08-.14-.103-.124-.125-.102-.142-.077-.153-.05-.16-.02-.161.01zm-30.213.66l-.157.034-.149.063-.134.09-.115.113-.092.132-.067.147-.037.156-.009.134.001.11V15.95l.006.22v.012l.01.22v.012l.012.22v.006l.001.006.015.22v.005l.001.006.018.22.001.006v.006l.022.219v.006l.001.006.024.219.001.006v.006l.028.218.001.006v.006l.031.218.001.006.001.006.033.218.001.006.001.005.037.218v.006l.002.005.04.217v.006l.001.006.043.216.001.006.001.006.046.216v.005l.002.006.048.215.002.006.001.006.051.214.002.006v.006l.055.214.002.005.001.006.057.213.002.006.001.005.06.213.002.005.001.006.063.212.002.005.001.006.066.21.002.006.002.006.068.21.002.005.002.005.07.21.003.005.002.005.074.208.002.006.002.005.077.207.002.006.002.005.08.206.002.005.002.006.082.204.002.006.002.005.086.204.002.005.002.006.088.202.002.005.003.006.09.2.003.006.002.005.094.2.002.006.003.005.096.199.002.005.003.005.03.062.086.137.11.118.128.097.145.07.156.043.16.013.16-.017.155-.047.143-.074.127-.1.106-.121.081-.14.055-.15.025-.16-.005-.161-.034-.158-.05-.124-.028-.055-.092-.19-.087-.188-.087-.192-.083-.19-.08-.193-.078-.194-.076-.196-.073-.195-.07-.197-.067-.198-.065-.199-.063-.2-.059-.2-.056-.2-.055-.204-.05-.201-.049-.202-.046-.205-.043-.206-.04-.203-.038-.207-.034-.204-.032-.207-.028-.205-.026-.207-.023-.208-.02-.207-.018-.207-.014-.208-.011-.207-.009-.208-.005-.207-.002-.104-.017-.16-.046-.155-.074-.143-.1-.126-.121-.107-.139-.081-.152-.055-.159-.025-.161.004zm24.585 11.83l-.156.039-.146.068-.11.076-.015.012-.163.129-.166.127-.168.125-.17.124-.17.12-.172.118-.173.115-.176.114-.177.111-.18.11-.178.105-.182.104-.182.101-.184.1-.184.095-.189.095-.186.09-.188.089-.19.086-.19.082-.193.081-.195.078-.191.074-.197.073-.195.07-.196.065-.198.064-.198.061-.2.058-.2.055-.2.052-.2.049-.151.035-.153.05-.141.078-.125.103-.103.124-.078.14-.05.154-.022.16.009.16.038.157.067.147.093.132.116.112.134.089.149.062.158.034.16.003.133-.02.158-.035.006-.002.006-.001.213-.052.006-.002.007-.001.212-.056.006-.001.006-.002.212-.058.006-.002.006-.002.211-.061.006-.002.006-.002.21-.064.006-.002.006-.002.21-.067.005-.002.006-.002.208-.07.006-.002.006-.003.207-.073.006-.002.006-.002.206-.077.006-.002.005-.002.206-.08.005-.001.006-.003.204-.082.006-.002.005-.002.203-.085.006-.003.005-.002.202-.088.006-.002.005-.003.2-.09.006-.003.006-.003.2-.093.005-.003.005-.002.198-.096.006-.003.005-.003.197-.099.005-.002.005-.003.196-.102.005-.002.005-.003.195-.105.005-.002.005-.003.193-.107.005-.003.005-.003.191-.11.005-.003.005-.003.19-.112.005-.003.005-.003.189-.115.005-.003.005-.003.187-.117.005-.003.004-.004.186-.12.005-.003.004-.003.184-.122.005-.003.005-.004.182-.125.004-.003.005-.003.18-.128.005-.003.005-.003.179-.13.004-.003.005-.004.177-.132.004-.004.005-.003.175-.135.005-.003.004-.004.173-.137.005-.003.004-.004.019-.015.115-.113.092-.132.066-.147.038-.157.008-.16-.022-.16-.052-.153-.079-.14-.103-.124-.125-.102-.142-.078-.153-.05-.16-.02-.16.01zm-19.17.054l-.153.051-.14.079-.124.103-.103.125-.077.141-.05.153-.02.16.009.161.04.156.067.147.093.131.095.094.047.04.005.004.005.004.17.14.005.004.005.004.172.137.004.004.005.003.086.067.003.002.003.002.087.067.003.002.003.002.088.066.002.003.003.002.089.065.002.002.003.002.09.065.002.002.003.002.09.064.002.002.003.002.09.063.003.002.003.002.09.063.003.002.003.002.092.062.002.002.003.002.092.061.003.002.003.002.092.06.003.003.003.001.093.06.003.002.003.002.093.06.003.001.003.002.094.058.003.002.003.002.095.058.003.001.003.002.095.057.003.002.003.002.095.056.003.002.003.002.096.055.004.002.003.001.096.055.003.002.003.002.098.053.003.002.003.002.097.053.004.002.003.001.098.053.003.001.003.002.099.052.003.001.003.002.1.05.003.002.003.002.1.05.003.002.003.001.1.05h.003l.004.003.1.048.004.001.003.002.101.048.003.001.004.002.101.046.004.002.003.001.102.046.004.002.003.001.103.045.003.002.003.001.103.045.004.001.003.002.104.043.003.001.004.002.104.042.003.002.004.001.104.042.004.001.003.002.105.04.004.002.003.001.106.04.003.002h.004l.106.04.004.001.003.002.107.038.003.001.004.001.107.038.003.001.004.001.107.037.004.001.004.001.108.036.003.001.004.001.108.035.004.001.003.001.11.034.003.001.004.001.109.033.004.002h.003l.11.033h.004l.003.002.11.031.004.001.004.001.084.023.081.028.004.001.003.001.109.037.003.001.004.001.109.036.003.001.004.001.109.035h.003l.004.002.11.033.003.001.003.001.11.033.003.001.004.001.109.031.004.002h.003l.11.031.003.001.004.001.11.03h.003l.003.001.11.029h.004l.003.002.11.027.003.001.004.001.11.027h.003l.004.001.004.001.16.022.16-.008.157-.038.147-.067.132-.092.112-.116.09-.134.062-.149.034-.157.004-.161-.025-.16-.055-.151-.082-.139-.107-.12-.127-.1-.143-.074-.124-.04h-.003l-.104-.025-.103-.026h-.002l-.095-.026h-.001l-.101-.027h-.002l-.1-.028h-.002l-.103-.03-.104-.032-.097-.03h-.002l-.103-.033-.102-.033-.101-.034-.106-.036-.027-.01-.027-.007-.107-.03-.104-.029-.104-.03h-.002l-.097-.03-.102-.032-.102-.032-.102-.034-.103-.035-.096-.034-.1-.036-.101-.037h-.002l-.094-.036-.096-.037-.097-.04h-.002l-.099-.04-.098-.042h-.002l-.092-.04-.097-.043-.095-.043-.097-.044h-.002l-.09-.043-.094-.045-.094-.046-.093-.047-.09-.046-.096-.05-.088-.047-.002-.001-.09-.049-.094-.052-.002-.002-.087-.049-.087-.05h-.002l-.088-.053h-.001l-.09-.055-.086-.052-.002-.001-.089-.055-.084-.054h-.002l-.09-.059h-.001l-.085-.056-.001-.001-.084-.056-.082-.056h-.001l-.086-.06-.082-.058H7.79l-.086-.062-.002-.002-.08-.058-.081-.06h-.001l-.085-.064-.002-.002-.076-.058-.002-.002-.082-.064-.161-.128-.162-.133-.04-.034-.132-.092-.147-.066-.157-.038-.16-.008-.16.022z"
  846. })));
  847. function _extends$h() { _extends$h = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends$h.apply(this, arguments); }
  848. var StartEventNonInterruptingEscalationIcon = (({
  849. styles = {},
  850. ...props
  851. }) => /*#__PURE__*/React__default["default"].createElement("svg", _extends$h({
  852. xmlns: "http://www.w3.org/2000/svg",
  853. width: "32",
  854. height: "32"
  855. }, props), /*#__PURE__*/React__default["default"].createElement("path", {
  856. d: "M16 9.209c-1.674 4.655-2.735 9.504-4.408 14.16 1.534-1.526 2.873-3.235 4.407-4.761l4.408 4.76c-1.497-4.71-2.91-9.448-4.408-14.16zm.031 2.93c.822 2.586 1.598 5.187 2.42 7.774l-2.42-2.614c-.682.598-2.453 2.886-2.34 2.389.873-2.488 1.45-5.068 2.34-7.55zM16.132.364c-1.51.016-3.055.139-4.492.614-.854.442-.266 1.861.651 1.578 2.266-.58 4.656-.596 6.944-.144.935.063 1.21-1.391.318-1.674-1.118-.26-2.274-.361-3.42-.374zm8.865 2.777c-.931-.1-1.262 1.29-.425 1.666 1.863 1.364 3.222 3.298 4.322 5.296.617.737 1.875-.145 1.398-.979-1.184-2.275-2.808-4.384-4.923-5.866a.863.863 0 00-.372-.117zM6.55 3.564c-.734.078-1.196.762-1.735 1.206C3.552 6.02 2.55 7.511 1.681 9.053c-.31.533-.71 1.33-.03 1.767.615.432 1.282-.132 1.446-.742.796-1.475 1.746-2.89 2.934-4.08.43-.548 1.292-.822 1.34-1.595a.874.874 0 00-.822-.839zm24.582 11.078c-.771-.033-1.004.82-.873 1.437.13 2.395-.471 4.797-1.615 6.897-.33.876.984 1.559 1.512.785a14.276 14.276 0 001.761-8.54.865.865 0 00-.785-.579zm-30.195.666c-.774-.06-1.032.785-.905 1.407.117 2.41.732 4.81 1.858 6.945.528.774 1.84.09 1.51-.786A15.932 15.932 0 011.728 16a.876.876 0 00-.79-.692zm24.57 11.817c-.762.099-1.243.835-1.919 1.16-1.514 1.002-3.237 1.632-4.978 2.092-.864.423-.307 1.855.616 1.591 2.528-.578 4.93-1.75 6.913-3.421.469-.522.07-1.42-.631-1.422zm-19.16.042c-.845.001-1.12 1.228-.395 1.628 1.665 1.401 3.667 2.348 5.76 2.912.618.178 1.482.565 1.893-.177.355-.628-.226-1.297-.87-1.326-1.972-.515-3.912-1.285-5.5-2.594-.26-.213-.522-.472-.888-.443z"
  857. })));
  858. function _extends$g() { _extends$g = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends$g.apply(this, arguments); }
  859. var StartEventNonInterruptingMessageIcon = (({
  860. styles = {},
  861. ...props
  862. }) => /*#__PURE__*/React__default["default"].createElement("svg", _extends$g({
  863. xmlns: "http://www.w3.org/2000/svg",
  864. width: "32",
  865. height: "32"
  866. }, props), /*#__PURE__*/React__default["default"].createElement("path", {
  867. d: "M8.746 10.393v11.064h14.506V10.393H8.746zm3.223 1.728h8.06c-1.428.879-2.856 2.807-4.283 3.018l-3.777-3.018zm9.557 1.018v6.59H10.473v-6.59l5.525 4.416 5.528-4.416zM16.132 0c-1.51.016-3.055.139-4.492.614-.854.442-.266 1.861.651 1.578 2.266-.58 4.656-.596 6.944-.144.935.063 1.21-1.391.318-1.674-1.118-.26-2.274-.361-3.42-.374zm8.865 2.777c-.931-.1-1.262 1.29-.425 1.666 1.863 1.364 3.222 3.298 4.322 5.296.617.737 1.875-.145 1.398-.979-1.184-2.275-2.808-4.384-4.923-5.866a.863.863 0 00-.372-.117zM6.55 3.2c-.734.078-1.196.762-1.735 1.206C3.552 5.656 2.55 7.147 1.681 8.69c-.31.533-.71 1.33-.03 1.767.615.432 1.282-.132 1.446-.742.796-1.475 1.746-2.89 2.934-4.08.43-.548 1.292-.822 1.34-1.595a.874.874 0 00-.822-.839zm24.582 11.078c-.771-.033-1.004.82-.873 1.437.13 2.395-.471 4.797-1.615 6.897-.33.876.984 1.559 1.512.785a14.276 14.276 0 001.761-8.54.865.865 0 00-.785-.579zm-30.195.666c-.774-.06-1.032.785-.905 1.407.117 2.41.732 4.81 1.858 6.945.528.774 1.84.09 1.51-.786a15.932 15.932 0 01-1.672-6.874.876.876 0 00-.79-.692zm24.57 11.817c-.762.099-1.243.835-1.919 1.16-1.514 1.002-3.237 1.632-4.978 2.092-.864.423-.307 1.855.616 1.591 2.528-.578 4.93-1.75 6.913-3.421.469-.522.07-1.42-.631-1.422zm-19.16.042c-.845.001-1.12 1.228-.395 1.628 1.665 1.401 3.667 2.348 5.76 2.912.618.178 1.482.565 1.893-.177.355-.628-.226-1.297-.87-1.326-1.972-.515-3.912-1.285-5.5-2.594-.26-.213-.522-.472-.888-.443z"
  868. })));
  869. function _extends$f() { _extends$f = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends$f.apply(this, arguments); }
  870. var StartEventNonInterruptingMultipleIcon = (({
  871. styles = {},
  872. ...props
  873. }) => /*#__PURE__*/React__default["default"].createElement("svg", _extends$f({
  874. xmlns: "http://www.w3.org/2000/svg",
  875. width: "32",
  876. height: "32"
  877. }, props), /*#__PURE__*/React__default["default"].createElement("path", {
  878. d: "M23.621 13.524L16 7.99l-7.622 5.534 2.911 8.952h9.422l2.911-8.952zm-1.016.33l-2.523 7.759h-8.165l-2.524-7.76L16 9.059l6.606 4.796zM16.132 0c-1.51.016-3.055.139-4.492.614-.854.442-.266 1.861.651 1.578 2.266-.58 4.656-.596 6.944-.144.935.063 1.21-1.391.318-1.674-1.118-.26-2.274-.361-3.42-.374zm8.865 2.777c-.931-.1-1.262 1.29-.425 1.666 1.863 1.364 3.222 3.298 4.322 5.296.617.737 1.875-.145 1.398-.979-1.184-2.275-2.808-4.384-4.923-5.866a.863.863 0 00-.372-.117zM6.55 3.2c-.734.078-1.196.762-1.735 1.206C3.552 5.656 2.55 7.147 1.681 8.69c-.31.533-.71 1.33-.03 1.767.615.432 1.282-.132 1.446-.742.796-1.475 1.746-2.89 2.934-4.08.43-.548 1.292-.822 1.34-1.595a.874.874 0 00-.822-.839zm24.582 11.078c-.771-.033-1.004.82-.873 1.437.13 2.395-.471 4.797-1.615 6.897-.33.876.984 1.559 1.512.785a14.276 14.276 0 001.761-8.54.865.865 0 00-.785-.579zm-30.195.666c-.774-.06-1.032.785-.905 1.407.117 2.41.732 4.81 1.858 6.945.528.774 1.84.09 1.51-.786a15.932 15.932 0 01-1.672-6.874.876.876 0 00-.79-.692zm24.57 11.817c-.762.099-1.243.835-1.919 1.16-1.514 1.002-3.237 1.632-4.978 2.092-.864.423-.307 1.855.616 1.591 2.528-.578 4.93-1.75 6.913-3.421.469-.522.07-1.42-.631-1.422zm-19.16.042c-.845.001-1.12 1.228-.395 1.628 1.665 1.401 3.667 2.348 5.76 2.912.618.178 1.482.565 1.893-.177.355-.628-.226-1.297-.87-1.326-1.972-.515-3.912-1.285-5.5-2.594-.26-.213-.522-.472-.888-.443z"
  879. })));
  880. function _extends$e() { _extends$e = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends$e.apply(this, arguments); }
  881. var StartEventNonInterruptingParallelMultipleIcon = (({
  882. styles = {},
  883. ...props
  884. }) => /*#__PURE__*/React__default["default"].createElement("svg", _extends$e({
  885. xmlns: "http://www.w3.org/2000/svg",
  886. width: "32",
  887. height: "32"
  888. }, props), /*#__PURE__*/React__default["default"].createElement("path", {
  889. d: "M13.503 9.016v4.428H9.075v4.98h4.428v4.428h4.98v-4.427h4.428v-4.981h-4.427V9.016h-4.981zm.83.83h3.32v4.428h4.428v3.32h-4.428v4.428h-3.32v-4.454H9.905v-3.294h4.428V9.846zM16.12 0h-.232l-.22.004h-.012l-.221.006h-.012l-.22.01h-.012l-.22.013h-.012l-.22.016h-.012l-.22.019h-.005l-.006.001-.22.021h-.006l-.005.001-.22.025h-.011l-.22.028h-.005l-.006.002-.219.03h-.005l-.006.001-.218.033-.006.001-.006.001-.217.036-.006.001-.006.001-.217.039-.006.001-.006.001-.216.042-.006.001-.006.001-.215.045-.006.001-.006.002-.215.047-.006.002-.006.001-.214.05-.006.002-.006.002-.115.029-.152.053-.14.081-.122.106-.1.126-.075.143-.047.154-.018.16.012.16.042.156.07.145.095.13.118.11.137.086.15.059.158.03h.161l.132-.022.11-.028.202-.047.203-.046.208-.043.202-.039.206-.037.206-.034.205-.03.208-.03.205-.025.209-.023.208-.02.21-.017.209-.015.207-.011.21-.009.21-.006.207-.003h.21l.21.002.207.005.207.008.212.011.207.014.208.017.209.019.208.022.205.025.206.028.207.03.208.035.205.036.202.039.052.01.16.018.16-.012.156-.042.146-.07.13-.096.109-.119.085-.136.06-.15.03-.159v-.16l-.03-.16-.059-.15-.086-.136-.109-.118-.13-.096-.145-.07-.128-.038-.057-.011-.006-.002h-.006l-.216-.042-.006-.001-.006-.001-.217-.039H18.9l-.006-.002-.217-.035-.006-.001-.006-.001-.218-.032-.006-.001-.006-.001-.218-.03h-.006l-.006-.001-.219-.027h-.011l-.22-.024-.005-.001h-.006l-.22-.021h-.006l-.006-.001-.22-.017-.005-.001h-.006L17.06.03h-.012l-.22-.012h-.012l-.22-.01h-.012l-.22-.005h-.012L16.132 0h-.012zm8.715 2.783l-.157.034-.149.063-.134.089-.116.112-.092.132-.067.147-.038.157-.008.16.021.16.051.153.079.141.103.124.102.087.052.038h.001l.087.064v.001l.082.061.002.001.076.059h.001l.084.065.082.066.002.001.079.063.002.002.077.063.081.067.002.002.077.065.076.065.001.002.08.07.078.07h.002l.075.068.077.072.002.001.073.069.077.073.072.07.002.001.077.076.07.07v.001l.075.076.07.073.002.001.074.079.002.002.069.074.069.075.074.082.07.08.002.001.068.079h.001l.067.079.068.082.065.078.001.002.068.083.067.084.063.081.001.002.067.087.002.002.063.084.001.001.064.087.008.01.008.01.095.12.093.121.09.119.087.119.088.122.086.123.084.12.081.122.001.002.084.126.08.126.08.127.077.126.079.131.074.127.075.131.073.131.07.13.07.133.069.133.045.09.086.137.109.119.13.096.144.07.156.042.16.013.16-.017.155-.047.143-.075.126-.1.106-.121.082-.14.054-.151.025-.16-.005-.16-.035-.158-.05-.124-.048-.095-.002-.004-.002-.004-.073-.14-.002-.005-.002-.004-.074-.14-.002-.004-.002-.004-.076-.14-.002-.003-.002-.004-.077-.139-.003-.004-.002-.004-.078-.138-.003-.004-.002-.003-.08-.137-.002-.004-.003-.004-.081-.136-.002-.004-.003-.004-.083-.136-.002-.003-.002-.004-.085-.135-.002-.004-.003-.003-.085-.134-.003-.004-.002-.004-.087-.132-.003-.004-.003-.004-.088-.132-.003-.003-.002-.004-.09-.13-.003-.005-.003-.003-.091-.13-.003-.004-.002-.004-.093-.129-.003-.003-.003-.004-.094-.128-.003-.004-.003-.003-.095-.127-.003-.004-.003-.004-.097-.125-.003-.004-.003-.004-.09-.114-.06-.082-.003-.003-.002-.003-.069-.091-.002-.004-.002-.003-.07-.09-.003-.003-.002-.003-.07-.09-.003-.003-.002-.003-.071-.09-.002-.003-.003-.002-.072-.089-.002-.003-.002-.003-.073-.088-.002-.003-.002-.002-.074-.087-.002-.003-.002-.003-.074-.086-.003-.003-.002-.003-.074-.086-.003-.002-.002-.003-.075-.085-.003-.003-.002-.002-.076-.084-.002-.003-.003-.003-.076-.083-.002-.003-.003-.003-.077-.082-.002-.003-.003-.002-.077-.082-.003-.003-.003-.002-.078-.081-.002-.003-.003-.003-.078-.08-.003-.002-.003-.003-.079-.08-.002-.002-.003-.002-.08-.08-.002-.002-.003-.002-.08-.078-.003-.003-.003-.002-.08-.077-.003-.003-.003-.002-.082-.077-.002-.002-.003-.002-.082-.076-.003-.002-.002-.003-.083-.075-.003-.002-.002-.003-.084-.074-.002-.002-.003-.002-.084-.074-.003-.002-.002-.002-.085-.073-.002-.002-.003-.003-.085-.071-.003-.003-.002-.002-.086-.07-.003-.003-.002-.002-.086-.07-.003-.003-.003-.002-.086-.07-.003-.002-.003-.002-.087-.069-.002-.002-.003-.002-.088-.068-.002-.002-.003-.002-.088-.067-.003-.003-.003-.002-.088-.066-.003-.002-.003-.002-.089-.066-.003-.002-.003-.002-.057-.042-.14-.082-.15-.055-.16-.026-.16.004zM6.377 3.21l-.157.037-.148.066-.111.074-.007.006-.003.002-.003.002-.086.069-.003.002-.002.002-.086.07-.003.002-.002.002-.086.07-.002.003-.003.002-.085.071-.002.002-.003.003-.084.071-.003.003-.002.002-.084.072-.003.003-.002.002-.083.073-.003.003-.002.002-.083.074-.002.002-.003.003-.082.074-.003.003-.002.002-.081.076-.003.002-.003.002-.08.077-.003.002-.003.003-.08.076-.002.003-.003.002-.08.078-.002.002-.003.003-.079.078-.002.003-.003.002-.078.08-.003.002-.002.002-.078.08-.002.003-.003.002-.077.08-.003.004-.002.002-.077.081-.002.003-.003.003-.076.082-.002.002-.003.003-.075.082-.002.003-.003.003-.074.083-.003.003-.002.003-.074.084-.003.003-.002.002-.074.085-.002.003-.002.003-.073.085-.003.003-.002.003-.072.086-.002.003-.003.003-.071.087-.003.003-.002.002-.07.088-.003.003-.002.003-.07.088-.003.003-.002.003-.07.09-.002.002-.002.003-.069.09-.002.003-.003.003-.068.09-.002.003-.002.003-.067.092-.003.003-.002.003-.067.092-.002.003-.002.003-.066.092-.002.003-.002.004-.066.093-.002.003-.002.003-.065.094-.002.003-.002.004-.064.094-.002.003-.002.004-.063.095-.002.003-.002.003-.063.097-.002.003-.002.003-.046.073-.05.07-.003.002-.002.003-.067.093-.003.003-.002.003-.066.094-.002.003-.002.003-.066.094-.002.003-.002.003-.064.094-.002.004-.002.003-.064.094-.002.004-.002.003-.062.095-.002.003-.002.003-.062.096-.002.003-.002.003-.06.096-.003.003-.002.003-.06.096-.001.004-.002.003-.059.096-.002.004-.002.003-.058.097-.002.003-.001.003-.057.098-.002.003-.002.003-.056.098-.002.003-.002.003-.055.098-.002.004-.001.003-.055.098-.001.004-.002.003-.054.099-.001.003-.002.003-.052.1-.002.002-.002.004-.051.1-.002.002-.002.004-.05.1-.002.003-.002.003-.05.1v.003l-.002.004-.05.1v.003l-.002.004-.048.1-.002.004-.001.003-.047.101-.002.003-.001.004-.013.027-.052.152-.024.16.006.16.037.157.064.148.091.133.114.114.134.09.147.065.157.036.162.006.159-.024.152-.053.14-.08.122-.105.1-.126.066-.117.01-.023.044-.095.045-.095.002-.003.042-.087.048-.097.048-.095v-.001l.048-.092.001-.001.047-.09.05-.093.002-.002.049-.09.052-.092.001-.002.051-.089.001-.002.051-.087.053-.088.001-.002.055-.091.057-.091.057-.09.001-.002.057-.089.055-.083.001-.002.06-.09.06-.088.062-.089.001-.001.06-.084.063-.088.065-.089.017-.023.016-.025.06-.094.059-.09v-.002l.058-.086.057-.086.001-.001.062-.09.062-.088.001-.002.06-.085.002-.002.06-.082.063-.087.064-.084.002-.002.061-.08.065-.084.064-.08v-.001l.067-.083.067-.082.07-.083.069-.08.063-.074.074-.083.068-.077.002-.002.07-.076.07-.075.072-.077.001-.001.067-.07.076-.078.002-.002.07-.07.075-.075.002-.002.072-.07.075-.072.002-.002.073-.069.074-.068.001-.001.08-.073.076-.068.002-.002.072-.063v-.001l.078-.067.079-.068.002-.001.08-.068.002-.002.077-.063.082-.066.001-.001.075-.06.002-.002.006-.004.117-.111.094-.131.068-.146.04-.156.01-.161-.019-.16-.049-.154-.076-.141-.102-.125-.123-.105-.14-.079-.153-.052-.16-.023-.16.007zm24.596 11.088l-.156.04-.146.067-.131.094-.112.117-.087.135-.061.15-.033.157-.004.134.007.142.005.152.004.15.002.149v.153l.001.011v.015l.004.11.002.11v.002l.002.106v.321l-.003.102-.002.106-.004.107-.005.105-.006.106-.006.106-.008.106v.002l-.008.103v.002l-.01.1-.01.105-.01.105-.013.105-.012.099v.002l-.014.108-.014.1-.016.105-.016.103v.002l-.017.099-.018.104-.019.103v.002l-.019.097-.02.104-.022.103v.001l-.022.098-.023.103v.002l-.024.096-.025.103v.002l-.024.096-.027.102v.003l-.026.093v.001l-.029.103v.002l-.03.099-.028.097v.002l-.03.095-.03.096v.001l-.033.1-.031.095v.002l-.035.1v.003l-.034.094v.003l-.035.096v.001l-.034.09v.002l-.038.098-.036.093v.002l-.038.095-.079.194-.08.188-.085.189-.087.19-.09.184-.092.183-.095.184-.05.093-.064.148-.034.158-.005.16.026.16.054.151.082.14.106.12.127.1.143.075.154.046.16.017.161-.013.156-.042.144-.071.13-.096.109-.119.072-.112.053-.099.003-.005.003-.006.102-.195.003-.006.003-.006.098-.196.003-.006.003-.006.096-.197.002-.006.003-.006.093-.2.002-.006.003-.006.09-.2.002-.006.003-.007.086-.202.003-.006.002-.006.084-.203.002-.005.001-.005.04-.102.002-.003.001-.003.04-.103.001-.003.001-.003.04-.103v-.004l.001-.003.039-.103v-.003l.002-.003.037-.104.001-.003.001-.003.037-.104v-.004l.002-.003.035-.104.002-.003v-.004l.035-.104.002-.004v-.003l.034-.105.002-.003v-.003l.034-.105v-.004l.002-.003.032-.106.001-.003.001-.003.031-.106.001-.003.001-.004.031-.106.001-.003.001-.004.03-.106v-.003l.002-.004.028-.107.001-.003.001-.003.028-.107.001-.004.001-.003.027-.107.001-.004v-.003l.027-.108.001-.003v-.004l.026-.108.001-.003v-.004l.025-.108.001-.003v-.004l.025-.108v-.004l.001-.003.023-.109v-.003l.001-.004.022-.109v-.003l.002-.004.02-.109.001-.004v-.003l.02-.11.002-.003v-.004l.02-.11v-.007l.019-.11v-.003l.001-.004.017-.11v-.004l.001-.003.017-.11v-.008l.016-.11v-.004l.001-.004.015-.11v-.008l.015-.111v-.008l.013-.111v-.007l.013-.112v-.007l.011-.112v-.004l.001-.004.01-.112v-.007l.01-.112v-.008l.008-.112v-.008l.007-.113v-.007l.007-.113v-.008l.005-.113v-.007l.005-.114v-.007l.003-.114v-.007l.003-.114v-.129l.001-.114v-.13l-.003-.114v-.008l-.003-.115v-.007l-.003-.102v-.155l-.003-.158v-.01l-.004-.158v-.01l-.006-.158v-.01l-.007-.148-.023-.16-.051-.152-.08-.14-.103-.124-.125-.102-.142-.077-.153-.05-.16-.02-.161.01zm-30.213.66l-.157.034-.149.063-.134.09-.115.113-.092.132-.067.147-.037.156-.009.134.001.11V15.95l.006.22v.012l.01.22v.012l.012.22v.006l.001.006.015.22v.005l.001.006.018.22.001.006v.006l.022.219v.006l.001.006.024.219.001.006v.006l.028.218.001.006v.006l.031.218.001.006.001.006.033.218.001.006.001.005.037.218v.006l.002.005.04.217v.006l.001.006.043.216.001.006.001.006.046.216v.005l.002.006.048.215.002.006.001.006.051.214.002.006v.006l.055.214.002.005.001.006.057.213.002.006.001.005.06.213.002.005.001.006.063.212.002.005.001.006.066.21.002.006.002.006.068.21.002.005.002.005.07.21.003.005.002.005.074.208.002.006.002.005.077.207.002.006.002.005.08.206.002.005.002.006.082.204.002.006.002.005.086.204.002.005.002.006.088.202.002.005.003.006.09.2.003.006.002.005.094.2.002.006.003.005.096.199.002.005.003.005.03.062.086.137.11.118.128.097.145.07.156.043.16.013.16-.017.155-.047.143-.074.127-.1.106-.121.081-.14.055-.15.025-.16-.005-.161-.034-.158-.05-.124-.028-.055-.092-.19-.087-.188-.087-.192-.083-.19-.08-.193-.078-.194-.076-.196-.073-.195-.07-.197-.067-.198-.065-.199-.063-.2-.059-.2-.056-.2-.055-.204-.05-.201-.049-.202-.046-.205-.043-.206-.04-.203-.038-.207-.034-.204-.032-.207-.028-.205-.026-.207-.023-.208-.02-.207-.018-.207-.014-.208-.011-.207-.009-.208-.005-.207-.002-.104-.017-.16-.046-.155-.074-.143-.1-.126-.121-.107-.139-.081-.152-.055-.159-.025-.161.004zm24.585 11.83l-.156.039-.146.068-.11.076-.015.012-.163.129-.166.127-.168.125-.17.124-.17.12-.172.118-.173.115-.176.114-.177.111-.18.11-.178.105-.182.104-.182.101-.184.1-.184.095-.189.095-.186.09-.188.089-.19.086-.19.082-.193.081-.195.078-.191.074-.197.073-.195.07-.196.065-.198.064-.198.061-.2.058-.2.055-.2.052-.2.049-.151.035-.153.05-.141.078-.125.103-.103.124-.078.14-.05.154-.022.16.009.16.038.157.067.147.093.132.116.112.134.089.149.062.158.034.16.003.133-.02.158-.035.006-.002.006-.001.213-.052.006-.002.007-.001.212-.056.006-.001.006-.002.212-.058.006-.002.006-.002.211-.061.006-.002.006-.002.21-.064.006-.002.006-.002.21-.067.005-.002.006-.002.208-.07.006-.002.006-.003.207-.073.006-.002.006-.002.206-.077.006-.002.005-.002.206-.08.005-.001.006-.003.204-.082.006-.002.005-.002.203-.085.006-.003.005-.002.202-.088.006-.002.005-.003.2-.09.006-.003.006-.003.2-.093.005-.003.005-.002.198-.096.006-.003.005-.003.197-.099.005-.002.005-.003.196-.102.005-.002.005-.003.195-.105.005-.002.005-.003.193-.107.005-.003.005-.003.191-.11.005-.003.005-.003.19-.112.005-.003.005-.003.189-.115.005-.003.005-.003.187-.117.005-.003.004-.004.186-.12.005-.003.004-.003.184-.122.005-.003.005-.004.182-.125.004-.003.005-.003.18-.128.005-.003.005-.003.179-.13.004-.003.005-.004.177-.132.004-.004.005-.003.175-.135.005-.003.004-.004.173-.137.005-.003.004-.004.019-.015.115-.113.092-.132.066-.147.038-.157.008-.16-.022-.16-.052-.153-.079-.14-.103-.124-.125-.102-.142-.078-.153-.05-.16-.02-.16.01zm-19.17.054l-.153.051-.14.079-.124.103-.103.125-.077.141-.05.153-.02.16.009.161.04.156.067.147.093.131.095.094.047.04.005.004.005.004.17.14.005.004.005.004.172.137.004.004.005.003.086.067.003.002.003.002.087.067.003.002.003.002.088.066.002.003.003.002.089.065.002.002.003.002.09.065.002.002.003.002.09.064.002.002.003.002.09.063.003.002.003.002.09.063.003.002.003.002.092.062.002.002.003.002.092.061.003.002.003.002.092.06.003.003.003.001.093.06.003.002.003.002.093.06.003.001.003.002.094.058.003.002.003.002.095.058.003.001.003.002.095.057.003.002.003.002.095.056.003.002.003.002.096.055.004.002.003.001.096.055.003.002.003.002.098.053.003.002.003.002.097.053.004.002.003.001.098.053.003.001.003.002.099.052.003.001.003.002.1.05.003.002.003.002.1.05.003.002.003.001.1.05h.003l.004.003.1.048.004.001.003.002.101.048.003.001.004.002.101.046.004.002.003.001.102.046.004.002.003.001.103.045.003.002.003.001.103.045.004.001.003.002.104.043.003.001.004.002.104.042.003.002.004.001.104.042.004.001.003.002.105.04.004.002.003.001.106.04.003.002h.004l.106.04.004.001.003.002.107.038.003.001.004.001.107.038.003.001.004.001.107.037.004.001.004.001.108.036.003.001.004.001.108.035.004.001.003.001.11.034.003.001.004.001.109.033.004.002h.003l.11.033h.004l.003.002.11.031.004.001.004.001.084.023.081.028.004.001.003.001.109.037.003.001.004.001.109.036.003.001.004.001.109.035h.003l.004.002.11.033.003.001.003.001.11.033.003.001.004.001.109.031.004.002h.003l.11.031.003.001.004.001.11.03h.003l.003.001.11.029h.004l.003.002.11.027.003.001.004.001.11.027h.003l.004.001.004.001.16.022.16-.008.157-.038.147-.067.132-.092.112-.116.09-.134.062-.149.034-.157.004-.161-.025-.16-.055-.151-.082-.139-.107-.12-.127-.1-.143-.074-.124-.04h-.003l-.104-.025-.103-.026h-.002l-.095-.026h-.001l-.101-.027h-.002l-.1-.028h-.002l-.103-.03-.104-.032-.097-.03h-.002l-.103-.033-.102-.033-.101-.034-.106-.036-.027-.01-.027-.007-.107-.03-.104-.029-.104-.03h-.002l-.097-.03-.102-.032-.102-.032-.102-.034-.103-.035-.096-.034-.1-.036-.101-.037h-.002l-.094-.036-.096-.037-.097-.04h-.002l-.099-.04-.098-.042h-.002l-.092-.04-.097-.043-.095-.043-.097-.044h-.002l-.09-.043-.094-.045-.094-.046-.093-.047-.09-.046-.096-.05-.088-.047-.002-.001-.09-.049-.094-.052-.002-.002-.087-.049-.087-.05h-.002l-.088-.053h-.001l-.09-.055-.086-.052-.002-.001-.089-.055-.084-.054h-.002l-.09-.059h-.001l-.085-.056-.001-.001-.084-.056-.082-.056h-.001l-.086-.06-.082-.058H7.79l-.086-.062-.002-.002-.08-.058-.081-.06h-.001l-.085-.064-.002-.002-.076-.058-.002-.002-.082-.064-.161-.128-.162-.133-.04-.034-.132-.092-.147-.066-.157-.038-.16-.008-.16.022z",
  890. opacity: ".98"
  891. })));
  892. function _extends$d() { _extends$d = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends$d.apply(this, arguments); }
  893. var StartEventNonInterruptingSignalIcon = (({
  894. styles = {},
  895. ...props
  896. }) => /*#__PURE__*/React__default["default"].createElement("svg", _extends$d({
  897. xmlns: "http://www.w3.org/2000/svg",
  898. width: "32",
  899. height: "32"
  900. }, props), /*#__PURE__*/React__default["default"].createElement("path", {
  901. d: "M16.007 8.82L9.21 21.022h13.596L16.007 8.82zm0 1.775l5.328 9.563H10.68l5.327-9.563zM16.14.386c-1.571.236-4.195-.284-4.9 1.381.619 1.703 2.745.069 4.085.365 1.421-.13 2.84.2 4.235.259C21.27.784 18.19.344 17 .413a20.456 20.456 0 00-.86-.027zM25 3.162c-2.19.694.401 2.26 1.181 3.094 1.083 1.152 1.954 2.484 2.715 3.864 1.48 1.005 1.845-1.26.81-2.03-1.158-1.897-2.613-3.704-4.513-4.89l-.192-.038zm-18.438.423c-1.793.712-2.909 2.548-4.01 4.061-.773.814-2.211 3.653.005 3.211 1.123-1.469 1.87-3.306 3.267-4.614.664-.7 2.73-2.013.738-2.658zm24.57 11.072c-1.659.435-.468 2.667-.99 3.895a13.427 13.427 0 01-1.497 4.435c-.23 1.659 1.991 1.165 2.018-.199a14.277 14.277 0 001.254-7.552.865.865 0 00-.785-.579zm-30.18.666c-1.677.386-.633 2.667-.608 3.876.371 1.623.792 3.35 1.79 4.696 2.382.321.571-2.338.292-3.492a15.92 15.92 0 01-.684-4.39.877.877 0 00-.79-.69zm24.558 11.81c-1.755.865-3.303 2.266-5.274 2.765-1.162-.016-3.074 1.271-1.331 2.102 2.66-.447 5.163-1.733 7.236-3.445.472-.506.06-1.432-.631-1.421zm-19.151.043c-2.004.786.416 2.405 1.43 2.913 1.608.904 3.379 1.636 5.208 1.877 1.77-.804-.228-2.094-1.357-2.073-1.75-.537-3.403-1.396-4.798-2.586l-.227-.104-.256-.027z"
  902. })));
  903. function _extends$c() { _extends$c = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends$c.apply(this, arguments); }
  904. var StartEventNonInterruptingTimerIcon = (({
  905. styles = {},
  906. ...props
  907. }) => /*#__PURE__*/React__default["default"].createElement("svg", _extends$c({
  908. xmlns: "http://www.w3.org/2000/svg",
  909. width: "32",
  910. height: "32"
  911. }, props), /*#__PURE__*/React__default["default"].createElement("path", {
  912. d: "M15.991 8.7c-3.018-.042-5.92 1.925-7.03 4.725-1.138 2.695-.509 6.011 1.537 8.102 1.99 2.142 5.267 2.93 8.013 1.927 2.877-.98 4.99-3.826 5.067-6.87.153-2.956-1.624-5.88-4.299-7.135a7.551 7.551 0 00-3.288-.75zm0 1.383c2.758-.052 5.372 1.972 6.014 4.654.704 2.578-.482 5.516-2.79 6.867-2.358 1.48-5.682 1.085-7.617-.919-2.043-1.97-2.407-5.38-.84-7.743 1.11-1.764 3.149-2.88 5.233-2.86zm1.962 1.764l-2.074 3.762c-.64.068-.793 1.04-.202 1.3.39.27.696-.18 1.052-.165h3.17v-.865h-3.182l1.993-3.614-.757-.418zM16.12.358h-.232l-.22.004h-.012l-.221.006h-.012l-.22.01h-.012l-.22.013h-.012l-.22.016h-.012l-.22.019h-.005l-.006.001-.22.021h-.006l-.005.001-.22.025h-.011l-.22.028h-.005l-.006.002-.219.03h-.005l-.006.001-.218.033-.006.001-.006.001-.217.036-.006.001-.006.001-.217.039-.006.001-.006.001-.216.042-.006.001-.006.001-.215.045-.006.001-.006.002-.215.047-.006.002-.006.001-.214.05-.006.002-.006.002-.115.029-.152.053-.14.081-.122.106-.1.126-.075.143-.047.154-.018.16.012.16.042.156.07.145.095.13.118.11.137.086.15.059.158.03h.161l.132-.022.11-.028.202-.047.203-.046.208-.043.202-.039.206-.037.206-.034.205-.03.208-.03.205-.025.209-.023.208-.02.21-.017.209-.015.207-.011.21-.009.21-.006.207-.003h.21l.21.002.207.005.207.008.212.011.207.014.208.017.209.019.208.022.205.025.206.028.207.03.208.035.205.036.202.039.052.01.16.018.16-.012.156-.042.146-.07.13-.096.109-.119.085-.136.06-.15.03-.159v-.16l-.03-.16-.059-.15-.086-.136L19.823.9l-.13-.096-.145-.07-.128-.038-.057-.011-.006-.002h-.006L19.135.64l-.006-.001-.006-.001-.217-.039H18.9l-.006-.002-.217-.035-.006-.001-.006-.001-.218-.032-.006-.001-.006-.001-.218-.03h-.006l-.006-.001-.219-.027h-.011l-.22-.024-.005-.001h-.006l-.22-.021h-.006L17.512.42l-.22-.017-.005-.001h-.006l-.22-.015h-.012l-.22-.012h-.012l-.22-.01h-.012l-.22-.005h-.012l-.221-.003h-.012zm8.715 2.783l-.157.034-.149.063-.134.089-.116.112-.092.132-.067.147-.038.157-.008.16.021.16.051.153.079.141.103.124.102.087.052.038h.001l.087.064v.001l.082.061.002.001.076.059h.001l.084.065.082.066.002.001.079.063.002.002.077.063.081.067.002.002.077.065.076.065.001.002.08.07.078.07h.002l.075.068.077.072.002.001.073.069.077.073.072.07.002.001.077.076.07.07v.001l.075.076.07.073.002.001.074.079.002.002.069.074.069.075.074.082.07.08.002.001.068.079h.001l.067.079.068.082.065.078.001.002.068.083.067.084.063.081.001.002.067.087.002.002.063.084.001.001.064.087.008.01.008.01.095.12.093.121.09.119.087.119.088.122.086.123.084.12.081.122.001.002.084.126.08.126.08.127.077.126.079.131.074.127.075.131.073.131.07.13.07.133.069.133.045.09.086.137.109.119.13.096.144.07.156.042.16.013.16-.017.155-.047.143-.075.126-.1.106-.121.082-.14.054-.151.025-.16-.005-.16-.035-.158-.05-.124-.048-.095-.002-.004-.002-.004-.073-.14-.002-.005-.002-.004-.074-.14-.002-.004-.002-.004-.076-.14-.002-.003-.002-.004-.077-.139-.003-.004-.002-.004-.078-.138-.003-.004-.002-.003-.08-.137-.002-.004-.003-.004-.081-.136-.002-.004-.003-.004-.083-.136-.002-.003-.002-.004-.085-.135-.002-.004-.003-.003-.085-.134-.003-.004-.002-.004-.087-.132-.003-.004-.003-.004-.088-.132-.003-.003-.002-.004-.09-.13-.003-.005-.003-.003-.091-.13-.003-.004-.002-.004-.093-.129-.003-.003-.003-.004-.094-.128-.003-.004-.003-.003-.095-.127-.003-.004-.003-.004-.097-.125-.003-.004-.003-.004-.09-.114-.06-.082-.003-.003-.002-.003-.069-.091-.002-.004-.002-.003-.07-.09-.003-.003-.002-.003-.07-.09-.003-.003-.002-.003-.071-.09-.002-.003-.003-.002-.072-.089-.002-.003-.002-.003-.073-.088-.002-.003-.002-.002-.074-.087-.002-.003-.002-.003-.074-.086-.003-.003-.002-.003-.074-.086-.003-.002-.002-.003-.075-.085-.003-.003-.002-.002-.076-.084-.002-.003-.003-.003-.076-.083-.002-.003-.003-.003-.077-.082-.002-.003-.003-.002-.077-.082-.003-.003-.003-.002-.078-.081-.002-.003-.003-.003-.078-.08-.003-.002-.003-.003-.079-.08-.002-.002-.003-.002-.08-.08-.002-.002-.003-.002-.08-.078-.003-.003-.003-.002-.08-.077-.003-.003-.003-.002-.082-.077-.002-.002-.003-.002-.082-.076-.003-.002-.002-.003-.083-.075-.003-.002-.002-.003-.084-.074-.002-.002-.003-.002-.084-.074-.003-.002-.002-.002-.085-.073-.002-.002-.003-.003-.085-.071-.003-.003-.002-.002-.086-.07-.003-.003-.002-.002-.086-.07-.003-.003-.003-.002-.086-.07-.003-.002-.003-.002-.087-.069-.002-.002-.003-.002-.088-.068-.002-.002-.003-.002-.088-.067-.003-.003-.003-.002-.088-.066-.003-.002-.003-.002-.089-.066-.003-.002-.003-.002-.057-.042-.14-.082-.15-.055-.16-.026-.16.004zm-18.458.426l-.157.037-.148.066-.111.074-.007.006-.003.002-.003.002-.086.069-.003.002-.002.002-.086.07-.003.002-.002.002-.086.07-.002.003-.003.002-.085.071-.002.002-.003.003-.084.071-.003.003-.002.002-.084.072-.003.003-.002.002-.083.073-.003.003-.002.002-.083.074-.002.002-.003.003-.082.074-.003.003-.002.002-.081.076-.003.002-.003.002-.08.077-.003.002-.003.003-.08.076-.002.003-.003.002-.08.078-.002.002-.003.003-.079.078-.002.003-.003.002-.078.08-.003.002-.002.002-.078.08-.002.003-.003.002-.077.08-.003.004-.002.002-.077.081-.002.003-.003.003-.076.082-.002.002-.003.003-.075.082-.002.003-.003.003-.074.083-.003.003-.002.003-.074.084-.003.003-.002.002-.074.085-.002.003-.002.003-.073.085-.003.003-.002.003-.072.086-.002.003-.003.003-.071.087-.003.003-.002.002-.07.088-.003.003-.002.003-.07.088-.003.003-.002.003-.07.09-.002.002-.002.003-.069.09-.002.003-.003.003-.068.09-.002.003-.002.003-.067.092-.003.003-.002.003-.067.092-.002.003-.002.003-.066.092-.002.003-.002.004-.066.093-.002.003-.002.003-.065.094-.002.003-.002.004-.064.094-.002.003-.002.004-.063.095-.002.003-.002.003-.063.097-.002.003-.002.003-.046.073-.05.07-.003.002-.002.003-.067.093-.003.003-.002.003-.066.094-.002.003-.002.003-.066.094-.002.003-.002.003-.064.094-.002.004-.002.003-.064.094-.002.004-.002.003-.062.095-.002.003-.002.003-.062.096-.002.003-.002.003-.06.096-.003.003-.002.003-.06.096-.001.004-.002.003-.059.096-.002.004-.002.003-.058.097-.002.003-.001.003-.057.098-.002.003-.002.003-.056.098-.002.003-.002.003-.055.098-.002.004-.001.003-.055.098-.001.004-.002.003-.054.099-.001.003-.002.003-.052.1-.002.002-.002.004-.051.1-.002.002-.002.004-.05.1-.002.003-.002.003-.05.1v.003l-.002.004-.05.1V9.5l-.002.004-.048.1-.002.004-.001.003-.047.101-.002.003-.001.004-.013.027-.052.152-.024.16.006.16.037.157.064.148.091.133.114.114.134.09.147.065.157.036.162.006.159-.024.152-.053.14-.08.122-.105.1-.126.066-.117.01-.023.044-.095.045-.095.002-.003.042-.087.048-.097.048-.095v-.001l.048-.092.001-.001.047-.09.05-.093.002-.002.049-.09.052-.092.001-.002.051-.089.001-.002.051-.087.053-.088.001-.002.055-.091.057-.091.057-.09.001-.002.057-.089.055-.083.001-.002.06-.09.06-.088.062-.089.001-.001.06-.084.063-.088.065-.089.017-.023.016-.025.06-.094.059-.09v-.002l.058-.086.057-.086.001-.001.062-.09.062-.088.001-.002.06-.085.002-.002.06-.082.063-.087.064-.084.002-.002.061-.08.065-.084.064-.08v-.001l.067-.083.067-.082.07-.083.069-.08.063-.074.074-.083.068-.077.002-.002.07-.076.07-.075.072-.077.001-.001.067-.07.076-.078.002-.002.07-.07.075-.075.002-.002.072-.07.075-.072.002-.002.073-.069.074-.068.001-.001.08-.073.076-.068.002-.002.072-.063v-.001l.078-.067.079-.068.002-.001.08-.068.002-.002.077-.063.082-.066.001-.001.075-.06.002-.002.006-.004.117-.111.094-.131.068-.146.04-.156.01-.161-.019-.16-.049-.154-.076-.141-.102-.125-.123-.105-.14-.079-.153-.052-.16-.023-.16.007zm24.596 11.088l-.156.04-.146.067-.131.094-.112.117-.087.135-.061.15-.033.157-.004.134.007.142.005.152.004.15.002.149v.153l.001.011v.015l.004.11.002.11v.002l.002.106v.321l-.003.102-.002.106-.004.107-.005.105-.006.106-.006.106-.008.106v.002l-.008.103v.002l-.01.1-.01.105-.01.105-.013.105-.012.099v.002l-.014.108-.014.1-.016.105-.016.103v.002l-.017.099-.018.104-.019.103v.002l-.019.097-.02.104-.022.103v.001l-.022.098-.023.103v.002l-.024.096-.025.103v.002l-.024.096-.027.102v.003l-.026.093v.001l-.029.103v.002l-.03.099-.028.097v.002l-.03.095-.03.096v.001l-.033.1-.031.095v.002l-.035.1v.003l-.034.094v.003l-.035.096v.001l-.034.09v.002l-.038.098-.036.093v.002l-.038.095-.079.194-.08.188-.085.189-.087.19-.09.184-.092.183-.095.184-.05.093-.064.148-.034.158-.005.16.026.16.054.151.082.14.106.12.127.1.143.075.154.046.16.017.161-.013.156-.042.144-.071.13-.096.109-.119.072-.112.053-.099.003-.005.003-.006.102-.195.003-.006.003-.006.098-.196.003-.006.003-.006.096-.197.002-.006.003-.006.093-.2.002-.006.003-.006.09-.2.002-.006.003-.007.086-.202.003-.006.002-.006.084-.203.002-.005.001-.005.04-.102.002-.003.001-.003.04-.103.001-.003.001-.003.04-.103v-.004l.001-.003.039-.103v-.003l.002-.003.037-.104.001-.003.001-.003.037-.104v-.004l.002-.003.035-.104.002-.003v-.004l.035-.104.002-.004v-.003l.034-.105.002-.003v-.003l.034-.105v-.004l.002-.003.032-.106.001-.003.001-.003.031-.106.001-.003.001-.004.031-.106.001-.003.001-.004.03-.106v-.003l.002-.004.028-.107.001-.003.001-.003.028-.107.001-.004.001-.003.027-.107.001-.004v-.003l.027-.108.001-.003v-.004l.026-.108.001-.003v-.004l.025-.108.001-.003v-.004l.025-.108v-.004l.001-.003.023-.109v-.003l.001-.004.022-.109v-.003l.002-.004.02-.109.001-.004v-.003l.02-.11.002-.003v-.004l.02-.11v-.007l.019-.11v-.003l.001-.004.017-.11v-.004l.001-.003.017-.11v-.008l.016-.11v-.004l.001-.004.015-.11v-.008l.015-.111v-.008l.013-.111v-.007l.013-.112v-.007l.011-.112v-.004l.001-.004.01-.112v-.007l.01-.112v-.008l.008-.112v-.008l.007-.113v-.007l.007-.113v-.008l.005-.113v-.007l.005-.114v-.007l.003-.114v-.007l.003-.114v-.129l.001-.114v-.13l-.003-.114V16.5l-.003-.115v-.007l-.003-.102v-.155l-.003-.158v-.01l-.004-.158v-.01l-.006-.158v-.01l-.007-.148-.023-.16-.051-.152-.08-.14-.103-.124-.125-.102-.142-.077-.153-.05-.16-.02-.161.01zm-30.213.66l-.157.034-.149.063-.134.09-.115.113-.092.132-.067.147-.037.156-.009.134.001.11V16.308l.006.22v.012l.01.22v.012l.012.22v.006l.001.006.015.22v.005l.001.006.018.22.001.006v.006l.022.219v.006l.001.006.024.219.001.006v.006l.028.218.001.006v.006l.031.218.001.006.001.006.033.218.001.006.001.005.037.218v.006l.002.005.04.217v.006l.001.006.043.216.001.006.001.006.046.216v.005l.002.006.048.215.002.006.001.006.051.214.002.006v.006l.055.214.002.005.001.006.057.213.002.006.001.005.06.213.002.005.001.006.063.212.002.005.001.006.066.21.002.006.002.006.068.21.002.005.002.005.07.21.003.005.002.005.074.208.002.006.002.005.077.207.002.006.002.005.08.206.002.005.002.006.082.204.002.006.002.005.086.204.002.005.002.006.088.202.002.005.003.006.09.2.003.006.002.005.094.2.002.006.003.005.096.199.002.005.003.005.03.062.086.137.11.118.128.097.145.07.156.043.16.013.16-.017.155-.047.143-.074.127-.1.106-.121.081-.14.055-.15.025-.16-.005-.161-.034-.158-.05-.124-.028-.055-.092-.19-.087-.188-.087-.192-.083-.19-.08-.193-.078-.194-.076-.196-.073-.195-.07-.197-.067-.198-.065-.199-.063-.2-.059-.2-.056-.2-.055-.204-.05-.201-.049-.202-.046-.205-.043-.206-.04-.203-.038-.207-.034-.204-.032-.207-.028-.205-.026-.207-.023-.208-.02-.207-.018-.207-.014-.208-.011-.207-.009-.208-.005-.207-.002-.104-.017-.16-.046-.155-.074-.143-.1-.126-.121-.107-.139-.081-.152-.055-.159-.025-.161.004zm24.585 11.83l-.156.039-.146.068-.11.076-.015.012-.163.129-.166.127-.168.125-.17.124-.17.12-.172.118-.173.115-.176.114-.177.111-.18.11-.178.105-.182.104-.182.101-.184.1-.184.095-.189.095-.186.09-.188.089-.19.086-.19.082-.193.081-.195.078-.191.074-.197.073-.195.07-.196.065-.198.064-.198.061-.2.058-.2.055-.2.052-.2.049-.151.035-.153.05-.141.078-.125.103-.103.124-.078.14-.05.154-.022.16.009.16.038.157.067.147.093.132.116.112.134.089.149.062.158.034.16.003.133-.02.158-.035.006-.002.006-.001.213-.052.006-.002.007-.001.212-.056.006-.001.006-.002.212-.058.006-.002.006-.002.211-.061.006-.002.006-.002.21-.064.006-.002.006-.002.21-.067.005-.002.006-.002.208-.07.006-.002.006-.003.207-.073.006-.002.006-.002.206-.077.006-.002.005-.002.206-.08.005-.001.006-.003.204-.082.006-.002.005-.002.203-.085.006-.003.005-.002.202-.088.006-.002.005-.003.2-.09.006-.003.006-.003.2-.093.005-.003.005-.002.198-.096.006-.003.005-.003.197-.099.005-.002.005-.003.196-.102.005-.002.005-.003.195-.105.005-.002.005-.003.193-.107.005-.003.005-.003.191-.11.005-.003.005-.003.19-.112.005-.003.005-.003.189-.115.005-.003.005-.003.187-.117.005-.003.004-.004.186-.12.005-.003.004-.003.184-.122.005-.003.005-.004.182-.125.004-.003.005-.003.18-.128.005-.003.005-.003.179-.13.004-.003.005-.004.177-.132.004-.004.005-.003.175-.135.005-.003.004-.004.173-.137.005-.003.004-.004.019-.015.115-.113.092-.132.066-.147.038-.157.008-.16-.022-.16-.052-.153-.079-.14-.103-.124-.125-.102-.142-.078-.153-.05-.16-.02-.16.01zm-19.17.054l-.153.051-.14.079-.124.103-.103.125-.077.141-.05.153-.02.16.009.161.04.156.067.147.093.131.095.094.047.04.005.004.005.004.17.14.005.004.005.004.172.137.004.004.005.003.086.067.003.002.003.002.087.067.003.002.003.002.088.066.002.003.003.002.089.065.002.002.003.002.09.065.002.002.003.002.09.064.002.002.003.002.09.063.003.002.003.002.09.063.003.002.003.002.092.062.002.002.003.002.092.061.003.002.003.002.092.06.003.003.003.001.093.06.003.002.003.002.093.06.003.001.003.002.094.058.003.002.003.002.095.058.003.001.003.002.095.057.003.002.003.002.095.056.003.002.003.002.096.055.004.002.003.001.096.055.003.002.003.002.098.053.003.002.003.002.097.053.004.002.003.001.098.053.003.001.003.002.099.052.003.001.003.002.1.05.003.002.003.002.1.05.003.002.003.001.1.05h.003l.004.003.1.048.004.001.003.002.101.048.003.001.004.002.101.046.004.002.003.001.102.046.004.002.003.001.103.045.003.002.003.001.103.045.004.001.003.002.104.043.003.001.004.002.104.042.003.002.004.001.104.042.004.001.003.002.105.04.004.002.003.001.106.04.003.002h.004l.106.04.004.001.003.002.107.038.003.001.004.001.107.038.003.001.004.001.107.037.004.001.004.001.108.036.003.001.004.001.108.035.004.001.003.001.11.034.003.001.004.001.109.033.004.002h.003l.11.033h.004l.003.002.11.031.004.001.004.001.084.023.081.028.004.001.003.001.109.037.003.001.004.001.109.036.003.001.004.001.109.035h.003l.004.002.11.033.003.001.003.001.11.033.003.001.004.001.109.031.004.002h.003l.11.031.003.001.004.001.11.03h.003l.003.001.11.029h.004l.003.002.11.027.003.001.004.001.11.027h.003l.004.001.004.001.16.022.16-.008.157-.038.147-.067.132-.092.112-.116.09-.134.062-.149.034-.157.004-.161-.025-.16-.055-.151-.082-.139-.107-.12-.127-.1-.143-.074-.124-.04h-.003l-.104-.025-.103-.026h-.002l-.095-.026h-.001l-.101-.027h-.002l-.1-.028h-.002l-.103-.03-.104-.032-.097-.03h-.002l-.103-.033-.102-.033-.101-.034-.106-.036-.027-.01-.027-.007-.107-.03-.104-.029-.104-.03h-.002l-.097-.03-.102-.032-.102-.032-.102-.034-.103-.035-.096-.034-.1-.036-.101-.037h-.002l-.094-.036-.096-.037-.097-.04h-.002l-.099-.04-.098-.042h-.002l-.092-.04-.097-.043-.095-.043-.097-.044h-.002l-.09-.043-.094-.045-.094-.046-.093-.047-.09-.046-.096-.05-.088-.047-.002-.001-.09-.049-.094-.052-.002-.002-.087-.049-.087-.05h-.002l-.088-.053h-.001l-.09-.055-.086-.052-.002-.001-.089-.055-.084-.054h-.002l-.09-.059h-.001l-.085-.056-.001-.001-.084-.056-.082-.056h-.001l-.086-.06-.082-.058H7.79l-.086-.062-.002-.002-.08-.058-.081-.06h-.001l-.085-.064-.002-.002-.076-.058-.002-.002-.082-.064-.161-.128-.162-.133-.04-.034-.132-.092-.147-.066-.157-.038-.16-.008-.16.022z"
  913. })));
  914. function _extends$b() { _extends$b = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends$b.apply(this, arguments); }
  915. var StartEventNoneIcon = (({
  916. styles = {},
  917. ...props
  918. }) => /*#__PURE__*/React__default["default"].createElement("svg", _extends$b({
  919. xmlns: "http://www.w3.org/2000/svg",
  920. width: "32",
  921. height: "32"
  922. }, props), /*#__PURE__*/React__default["default"].createElement("path", {
  923. d: "M15.847.004C9.61-.016 3.624 4.014 1.257 9.78-1.235 15.49.06 22.581 4.42 27.034c4.193 4.513 11.101 6.17 16.887 4.058 5.996-2.042 10.423-7.93 10.664-14.268.403-6.228-3.26-12.441-8.87-15.154A15.924 15.924 0 0015.846.004zm.439 1.729c6.105.033 11.856 4.45 13.435 10.359 1.678 5.653-.592 12.198-5.463 15.547-5.06 3.719-12.564 3.45-17.343-.625-4.814-3.84-6.538-10.94-4.067-16.57 2.14-5.206 7.515-8.775 13.147-8.71.097-.001.194-.002.29-.001z"
  924. })));
  925. function _extends$a() { _extends$a = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends$a.apply(this, arguments); }
  926. var StartEventParallelMultipleIcon = (({
  927. styles = {},
  928. ...props
  929. }) => /*#__PURE__*/React__default["default"].createElement("svg", _extends$a({
  930. xmlns: "http://www.w3.org/2000/svg",
  931. width: "32",
  932. height: "32"
  933. }, props), /*#__PURE__*/React__default["default"].createElement("path", {
  934. d: "M15.847 0C9.61-.02 3.624 4.01 1.257 9.775-1.235 15.485.06 22.577 4.42 27.03c4.193 4.513 11.101 6.17 16.887 4.058 5.996-2.042 10.423-7.93 10.664-14.268.403-6.228-3.26-12.441-8.87-15.154A15.924 15.924 0 0015.846 0zm.439 1.729c6.105.033 11.856 4.45 13.435 10.359 1.678 5.653-.592 12.198-5.463 15.547-5.06 3.719-12.564 3.45-17.343-.625C2.101 23.17.377 16.07 2.848 10.44c2.134-5.2 7.522-8.78 13.147-8.71.097-.001.194-.002.29-.001zM13.504 9.08v4.427H9.077v4.98h4.427v4.427h4.98v-4.427h4.428v-4.98h-4.427V9.08h-4.98zm.83.83h3.32v4.427h4.428v3.32h-4.427v4.427h-3.32v-4.453H9.906v-3.294h4.427V9.91z"
  935. })));
  936. function _extends$9() { _extends$9 = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends$9.apply(this, arguments); }
  937. var StartEventSignalIcon = (({
  938. styles = {},
  939. ...props
  940. }) => /*#__PURE__*/React__default["default"].createElement("svg", _extends$9({
  941. xmlns: "http://www.w3.org/2000/svg",
  942. width: "32",
  943. height: "32"
  944. }, props), /*#__PURE__*/React__default["default"].createElement("path", {
  945. d: "M15.995.005C9.705-.08 3.643 3.968 1.257 9.78-1.235 15.49.06 22.581 4.42 27.034c4.193 4.513 11.102 6.17 16.887 4.058 5.996-2.042 10.423-7.93 10.664-14.269.403-6.227-3.26-12.44-8.87-15.153A15.924 15.924 0 0015.994.005zm0 1.73c6.213-.108 12.122 4.355 13.726 10.357 1.678 5.653-.592 12.198-5.463 15.547-5.06 3.719-12.564 3.45-17.343-.626-4.814-3.838-6.538-10.939-4.067-16.57 2.14-5.205 7.515-8.774 13.147-8.708zm0 6.776L9.19 20.724H22.8L15.995 8.511zm0 1.777l5.332 9.572H10.662l5.333-9.572z"
  946. })));
  947. function _extends$8() { _extends$8 = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends$8.apply(this, arguments); }
  948. var StartEventTimerIcon = (({
  949. styles = {},
  950. ...props
  951. }) => /*#__PURE__*/React__default["default"].createElement("svg", _extends$8({
  952. xmlns: "http://www.w3.org/2000/svg",
  953. width: "32",
  954. height: "32"
  955. }, props), /*#__PURE__*/React__default["default"].createElement("path", {
  956. d: "M16 0C7.174 0 0 7.174 0 16s7.174 16 16 16 16-7.174 16-16S24.826 0 16 0zm0 1.73c7.892 0 14.27 6.378 14.27 14.27 0 7.891-6.379 14.27-14.27 14.27S1.73 23.891 1.73 16C1.73 8.108 8.108 1.73 16 1.73zm-.143 6.676c-2.967.02-5.797 1.97-6.89 4.727-1.138 2.695-.51 6.012 1.537 8.102 1.99 2.142 5.268 2.932 8.014 1.928 2.878-.98 4.992-3.827 5.068-6.87.153-2.957-1.624-5.881-4.3-7.137a7.552 7.552 0 00-3.43-.75zm.27 1.383c2.71.012 5.254 2.015 5.886 4.656.704 2.577-.482 5.517-2.791 6.867-2.358 1.48-5.682 1.085-7.618-.918-2.043-1.971-2.407-5.381-.84-7.745 1.11-1.763 3.15-2.88 5.234-2.86h.13zm1.833 1.765l-2.074 3.763c-.64.068-.793 1.04-.202 1.3.39.27.696-.18 1.052-.165h3.17v-.865h-3.181l1.992-3.615-.757-.418z"
  957. })));
  958. function _extends$7() { _extends$7 = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends$7.apply(this, arguments); }
  959. var SubprocessCollapsedIcon = (({
  960. styles = {},
  961. ...props
  962. }) => /*#__PURE__*/React__default["default"].createElement("svg", _extends$7({
  963. xmlns: "http://www.w3.org/2000/svg",
  964. width: "32",
  965. height: "32"
  966. }, props), /*#__PURE__*/React__default["default"].createElement("path", {
  967. d: "M5.637 3A5.644 5.644 0 000 8.637v15.417a5.644 5.644 0 005.637 5.637h20.726A5.644 5.644 0 0032 24.054V8.637A5.644 5.644 0 0026.363 3H5.637zm0 1.778h20.726a3.83 3.83 0 013.859 3.859v15.417a3.83 3.83 0 01-3.859 3.858h-4.201V16.695H9.838v11.217H5.637a3.83 3.83 0 01-3.859-3.858V8.637a3.83 3.83 0 013.859-3.859zm5.33 13.046h10.066v10.065H10.967V17.824zm4.189 1.431V22.06H12.35v1.689h2.804V26.554h1.69V23.749h2.804V22.06h-2.804V19.255h-1.69z"
  968. })));
  969. function _extends$6() { _extends$6 = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends$6.apply(this, arguments); }
  970. var SubprocessExpandedIcon = (({
  971. styles = {},
  972. ...props
  973. }) => /*#__PURE__*/React__default["default"].createElement("svg", _extends$6({
  974. xmlns: "http://www.w3.org/2000/svg",
  975. width: "32",
  976. height: "32"
  977. }, props), /*#__PURE__*/React__default["default"].createElement("path", {
  978. d: "M5.636 3A5.642 5.642 0 000 8.636v15.418a5.643 5.643 0 005.636 5.636h20.728A5.643 5.643 0 0032 24.054V8.636A5.642 5.642 0 0026.364 3H5.636zm0 1.778h20.728a3.83 3.83 0 013.858 3.858v15.418a3.83 3.83 0 01-3.858 3.858h-4.203V16.723H9.84v11.189H5.636a3.83 3.83 0 01-3.858-3.858V8.636a3.83 3.83 0 013.858-3.858zm5.331 13.074h10.066v10.06H10.967v-10.06zm1.336 3.996v1.711h7.394v-1.71h-7.394z"
  979. })));
  980. function _extends$5() { _extends$5 = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends$5.apply(this, arguments); }
  981. var TaskNoneIcon = (({
  982. styles = {},
  983. ...props
  984. }) => /*#__PURE__*/React__default["default"].createElement("svg", _extends$5({
  985. xmlns: "http://www.w3.org/2000/svg",
  986. width: "32",
  987. height: "32"
  988. }, props), /*#__PURE__*/React__default["default"].createElement("path", {
  989. d: "M6.494 2.667C2.916 2.667 0 5.57 0 9.142v13.383C0 26.097 2.916 29 6.494 29h19.012C29.084 29 32 26.097 32 22.525V9.142c0-3.572-2.916-6.475-6.494-6.475H6.494zm0 2h19.012c2.509 0 4.494 1.98 4.494 4.475v13.383C30 25.02 28.015 27 25.506 27H6.494C3.985 27 2 25.02 2 22.525V9.142c0-2.495 1.985-4.475 4.494-4.475z"
  990. })));
  991. function _extends$4() { _extends$4 = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends$4.apply(this, arguments); }
  992. var TextAnnotationicon = (({
  993. styles = {},
  994. ...props
  995. }) => /*#__PURE__*/React__default["default"].createElement("svg", _extends$4({
  996. xmlns: "http://www.w3.org/2000/svg",
  997. width: "32",
  998. height: "32"
  999. }, props), /*#__PURE__*/React__default["default"].createElement("path", {
  1000. d: "M22.087 0v31.647H32v-1.788h-8.125V1.788H32V0h-9.913zm-2.924 13.999l-2.737 2.167 2.167 2.738 2.738-2.167-2.168-2.738zm-5.475 4.335L10.95 20.5l2.168 2.738 2.737-2.168-2.167-2.737zm-5.475 4.335l-2.738 2.167 2.168 2.738 2.737-2.168-2.167-2.737zm-5.476 4.335L0 29.17l2.167 2.738 2.738-2.168-2.168-2.737z"
  1001. })));
  1002. function _extends$3() { _extends$3 = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends$3.apply(this, arguments); }
  1003. var TransactionIcon = (({
  1004. styles = {},
  1005. ...props
  1006. }) => /*#__PURE__*/React__default["default"].createElement("svg", _extends$3({
  1007. xmlns: "http://www.w3.org/2000/svg",
  1008. width: "32",
  1009. height: "32"
  1010. }, props), /*#__PURE__*/React__default["default"].createElement("path", {
  1011. d: "M5.422 3A5.424 5.424 0 000 8.422v15.822a5.424 5.424 0 005.422 5.423h21.156A5.424 5.424 0 0032 24.244V8.422A5.424 5.424 0 0026.578 3H5.422zm0 1.244h21.156a4.155 4.155 0 014.178 4.178v15.822a4.155 4.155 0 01-4.178 4.178H5.422a4.155 4.155 0 01-4.178-4.178V8.422a4.155 4.155 0 014.178-4.178zm1.056 1.778a3.373 3.373 0 00-3.367 3.366v13.89a3.373 3.373 0 003.367 3.366h19.044a3.373 3.373 0 003.367-3.366V9.388a3.373 3.373 0 00-3.367-3.366H6.478zm0 1.245h19.044c1.187 0 2.122.935 2.122 2.121v13.89a2.104 2.104 0 01-2.122 2.122H6.478a2.104 2.104 0 01-2.122-2.122V9.388c0-1.186.935-2.121 2.122-2.121z"
  1012. })));
  1013. function _extends$2() { _extends$2 = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends$2.apply(this, arguments); }
  1014. var UserTaskIcon = (({
  1015. styles = {},
  1016. ...props
  1017. }) => /*#__PURE__*/React__default["default"].createElement("svg", _extends$2({
  1018. xmlns: "http://www.w3.org/2000/svg",
  1019. width: "32",
  1020. height: "32"
  1021. }, props), /*#__PURE__*/React__default["default"].createElement("path", {
  1022. fillRule: "evenodd",
  1023. d: "M10.263 7.468c-1.698 0-2.912 1.305-2.915 2.791v.001c0 .45.121.924.311 1.352.138.309.308.593.516.82-1.235.423-2.683 1.119-3.414 2.49l-.04.075v4.44h11.083v-4.44l-.04-.074c-.72-1.352-2.136-2.047-3.36-2.471.597-.608.774-1.392.774-2.192-.004-1.487-1.218-2.792-2.915-2.792zm-1.16 1.583c.08 0 .165.003.26.008.757.045 1.012.181 1.207.31.196.13.334.252.851.268.404-.016.598-.087.737-.169.056-.033.103-.067.152-.1.128.275.197.578.198.893 0 .894-.154 1.52-.975 2.034l.08.604c.171.052.348.11.527.171.025.105.054.242.073.387.02.153.029.311.016.43a.422.422 0 01-.056.19c-.417.417-1.157.66-1.908.66-.75 0-1.49-.243-1.908-.66a.422.422 0 01-.056-.19 1.949 1.949 0 01.016-.43c.02-.146.049-.284.074-.388.177-.062.352-.118.521-.17l.048-.648a.616.616 0 00-.126-.118c-.183-.138-.405-.44-.562-.793-.157-.353-.254-.757-.254-1.08 0-.387.105-.758.297-1.079l.11-.04c.143-.046.339-.09.679-.09zm-1.448 4.304l-.002.014c-.025.185-.04.387-.018.589.021.202.074.42.248.593.595.594 1.494.857 2.382.857.889 0 1.788-.263 2.382-.857.174-.174.227-.391.249-.593a2.496 2.496 0 00-.018-.59l-.002-.01c.903.396 1.776.963 2.258 1.81v3.599H13.53v-2.538h-.67v2.538H7.651v-2.538h-.67v2.538H5.39v-3.599c.483-.849 1.359-1.416 2.264-1.813zM6.495 3C2.914 3 0 5.903 0 9.475v13.383c0 3.572 2.916 6.475 6.494 6.475h19.012c3.578 0 6.494-2.903 6.494-6.475V9.475C32 5.903 29.084 3 25.506 3H6.494zm0 2h19.01C28.016 5 30 6.98 30 9.475v13.383c0 2.495-1.985 4.475-4.494 4.475H6.494C3.985 27.333 2 25.353 2 22.858V9.475C2 6.98 3.985 5 6.494 5z"
  1024. })));
  1025. var iconsByType = {
  1026. 'Association': AssociationIcon,
  1027. 'BusinessRuleTask': BusinessRuleTaskIcon,
  1028. 'CallActivity': CallActivityIcon,
  1029. 'Collaboration': CollaborationIcon,
  1030. 'ConditionalFlow': ConditionalFlowIcon,
  1031. 'SequenceFlow': ConnectionIcon,
  1032. 'DataInput': DataInputIcon,
  1033. 'DataInputAssociation': DataInputOutputAssociationIcon,
  1034. 'DataOutput': DataOutputIcon,
  1035. 'DataOutputAssociation': DataInputOutputAssociationIcon,
  1036. 'DataObjectReference': DataObjectIcon,
  1037. 'DataStoreReference': DataStoreIcon,
  1038. 'DefaultFlow': DefaultFlowIcon,
  1039. 'CancelEndEvent': EndEventCancelIcon,
  1040. 'CompensateEndEvent': EndEventCompensationIcon,
  1041. 'ErrorEndEvent': EndEventErrorIcon,
  1042. 'EscalationEndEvent': EndEventEscalationIcon,
  1043. 'LinkEndEvent': EndEventLinkIcon,
  1044. 'MessageEndEvent': EndEventMessageIcon,
  1045. 'MultipleEndEvent': EndEventMultipleIcon,
  1046. 'EndEvent': EndEventNoneIcon,
  1047. 'SignalEndEvent': EndEventSignalIcon,
  1048. 'TerminateEndEvent': EndEventTerminateIcon,
  1049. 'EventSubProcess': EventSubProcessExpandedIcon,
  1050. 'ComplexGateway': GatewayComplexIcon,
  1051. 'EventBasedGateway': GatewayEventBasedIcon,
  1052. 'ExclusiveGateway': GatewayXorIcon,
  1053. 'Gateway': GatewayNoneIcon,
  1054. 'InclusiveGateway': GatewayOrIcon,
  1055. 'ParallelGateway': GatewayParallelIcon,
  1056. 'Group': GroupIcon,
  1057. 'CancelIntermediateCatchEvent': IntermediateEventCatchCancelIcon,
  1058. 'CompensateIntermediateCatchEvent': IntermediateEventCatchCompensationIcon,
  1059. 'ConditionalIntermediateCatchEvent': IntermediateEventCatchConditionIcon,
  1060. 'ErrorIntermediateCatchEvent': IntermediateEventCatchErrorIcon,
  1061. 'EscalationIntermediateCatchEvent': IntermediateEventCatchEscalationIcon,
  1062. 'LinkIntermediateCatchEvent': IntermediateEventCatchLinkIcon,
  1063. 'MessageIntermediateCatchEvent': IntermediateEventCatchMessageIcon,
  1064. 'MultipleIntermediateCatchEvent': IntermediateEventCatchMultipleIcon,
  1065. 'ConditionalIntermediateCatchEventNonInterrupting': IntermediateEventCatchNonInterruptingConditionIcon,
  1066. 'EscalationIntermediateCatchEventNonInterrupting': IntermediateEventCatchNonInterruptingEscalationIcon,
  1067. 'MessageIntermediateCatchEventNonInterrupting': IntermediateEventCatchNonInterruptingMessageIcon,
  1068. 'MultipleIntermediateCatchEventNonInterrupting': IntermediateEventCatchNonInterruptingMultipleIcon,
  1069. 'ParallelIntermediateCatchEventNonInterrupting': IntermediateEventCatchNonInterruptingParallelIcon,
  1070. 'SignalIntermediateCatchEventNonInterrupting': IntermediateEventCatchNonInterruptingSignalIcon,
  1071. 'TimerIntermediateCatchEventNonInterrupting': IntermediateEventCatchNonInterruptingTimerIcon,
  1072. 'ParallelMultipleIntermediateCatchEvent': IntermediateEventCatchParallelMultipleIcon,
  1073. 'SignalIntermediateCatchEvent': IntermediateEventCatchSignalIcon,
  1074. 'TimerIntermediateCatchEvent': IntermediateEventCatchTimerIcon,
  1075. 'IntermediateThrowEvent': IntermediateEventNoneIcon,
  1076. 'CompensateIntermediateThrowEvent': IntermediateEventThrowCompensationIcon,
  1077. 'EscalationIntermediateThrowEvent': IntermediateEventThrowEscalationIcon,
  1078. 'LinkIntermediateThrowEvent': IntermediateEventThrowLinkIcon,
  1079. 'MessageIntermediateThrowEvent': IntermediateEventThrowMessageIcon,
  1080. 'MultipleIntermediateThrowEvent': IntermediateEventThrowMultipleIcon,
  1081. 'SignalIntermediateThrowEvent': IntermediateEventThrowSignalIcon,
  1082. 'Lane': LaneIcon,
  1083. 'ManualTask': ManualTaskIcon,
  1084. 'MessageFlow': MessageFlowIcon,
  1085. 'Participant': ParticipantIcon,
  1086. 'Process': ProcessIcon,
  1087. 'ReceiveTask': ReceiveTaskIcon,
  1088. 'ScriptTask': ScriptTaskIcon,
  1089. 'SendTask': SendTaskIcon,
  1090. 'ServiceTask': ServiceTaskIcon,
  1091. 'CompensateStartEvent': StartEventCompensationIcon,
  1092. 'ConditionalStartEvent': StartEventConditionIcon,
  1093. 'ErrorStartEvent': StartEventErrorIcon,
  1094. 'EscalationStartEvent': StartEventEscalationIcon,
  1095. 'MessageStartEvent': StartEventMessageIcon,
  1096. 'MultipleStartEvent': StartEventMultipleIcon,
  1097. 'ConditionalStartEventNonInterrupting': StartEventNonInterruptingConditionIcon,
  1098. 'EscalationStartEventNonInterrupting': StartEventNonInterruptingEscalationIcon,
  1099. 'MessageStartEventNonInterrupting': StartEventNonInterruptingMessageIcon,
  1100. 'MultipleStartEventNonInterrupting': StartEventNonInterruptingMultipleIcon,
  1101. 'ParallelMultipleStartEventNonInterrupting': StartEventNonInterruptingParallelMultipleIcon,
  1102. 'SignalStartEventNonInterrupting': StartEventNonInterruptingSignalIcon,
  1103. 'TimerStartEventNonInterrupting': StartEventNonInterruptingTimerIcon,
  1104. 'CancelBoundaryEvent': IntermediateEventCatchCancelIcon,
  1105. 'CompensateBoundaryEvent': IntermediateEventCatchCompensationIcon,
  1106. 'ConditionalBoundaryEvent': IntermediateEventCatchConditionIcon,
  1107. 'ErrorBoundaryEvent': IntermediateEventCatchErrorIcon,
  1108. 'EscalationBoundaryEvent': IntermediateEventCatchEscalationIcon,
  1109. 'LinkBoundaryEvent': IntermediateEventCatchLinkIcon,
  1110. 'MessageBoundaryEvent': IntermediateEventCatchMessageIcon,
  1111. 'MultipleBoundaryEvent': IntermediateEventCatchMultipleIcon,
  1112. 'BoundaryEvent': IntermediateEventNoneIcon,
  1113. 'ConditionalBoundaryEventNonInterrupting': IntermediateEventCatchNonInterruptingConditionIcon,
  1114. 'EscalationBoundaryEventNonInterrupting': IntermediateEventCatchNonInterruptingEscalationIcon,
  1115. 'MessageBoundaryEventNonInterrupting': IntermediateEventCatchNonInterruptingMessageIcon,
  1116. 'MultipleBoundaryEventNonInterrupting': IntermediateEventCatchNonInterruptingMultipleIcon,
  1117. 'ParallelBoundaryEventNonInterrupting': IntermediateEventCatchNonInterruptingParallelIcon,
  1118. 'SignalBoundaryEventNonInterrupting': IntermediateEventCatchNonInterruptingSignalIcon,
  1119. 'TimerBoundaryEventNonInterrupting': IntermediateEventCatchNonInterruptingTimerIcon,
  1120. 'ParallelMultipleBoundaryEvent': IntermediateEventCatchParallelMultipleIcon,
  1121. 'SignalBoundaryEvent': IntermediateEventCatchSignalIcon,
  1122. 'TimerBoundaryEvent': IntermediateEventCatchTimerIcon,
  1123. 'StartEvent': StartEventNoneIcon,
  1124. 'ParallelMultipleStartEvent': StartEventParallelMultipleIcon,
  1125. 'SignalStartEvent': StartEventSignalIcon,
  1126. 'TimerStartEvent': StartEventTimerIcon,
  1127. 'CollapsedSubProcess': SubprocessCollapsedIcon,
  1128. 'CollapsedAdHocSubProcess': SubprocessCollapsedIcon,
  1129. 'ExpandedSubProcess': SubprocessExpandedIcon,
  1130. 'ExpandedAdHocSubProcess': SubprocessExpandedIcon,
  1131. 'Task': TaskNoneIcon,
  1132. 'TextAnnotation': TextAnnotationicon,
  1133. 'Transaction': TransactionIcon,
  1134. 'UserTask': UserTaskIcon
  1135. };
  1136. function getConcreteType(element) {
  1137. const {
  1138. type: elementType
  1139. } = element;
  1140. let type = getRawType(elementType); // (1) event definition types
  1141. const eventDefinition = getEventDefinition$1(element);
  1142. if (eventDefinition) {
  1143. type = `${getEventDefinitionPrefix(eventDefinition)}${type}`; // (1.1) interrupting / non interrupting
  1144. if (ModelUtil.is(element, 'bpmn:StartEvent') && !DiUtil.isInterrupting(element) || ModelUtil.is(element, 'bpmn:BoundaryEvent') && !isCancelActivity(element)) {
  1145. type = `${type}NonInterrupting`;
  1146. }
  1147. return type;
  1148. } // (2) sub process types
  1149. if (ModelUtil.is(element, 'bpmn:SubProcess') && !ModelUtil.is(element, 'bpmn:Transaction')) {
  1150. if (DiUtil.isEventSubProcess(element)) {
  1151. type = `Event${type}`;
  1152. } else {
  1153. const expanded = DiUtil.isExpanded(element) && !isPlane(element);
  1154. type = `${expanded ? 'Expanded' : 'Collapsed'}${type}`;
  1155. }
  1156. } // (3) conditional + default flows
  1157. if (isDefaultFlow(element)) {
  1158. type = 'DefaultFlow';
  1159. }
  1160. if (isConditionalFlow(element)) {
  1161. type = 'ConditionalFlow';
  1162. }
  1163. return type;
  1164. }
  1165. const PanelHeaderProvider = {
  1166. getDocumentationRef: element => {
  1167. const elementTemplates = getTemplatesService();
  1168. if (elementTemplates) {
  1169. return getTemplateDocumentation(element, elementTemplates);
  1170. }
  1171. },
  1172. getElementLabel: element => {
  1173. if (ModelUtil.is(element, 'bpmn:Process')) {
  1174. return ModelUtil.getBusinessObject(element).name;
  1175. }
  1176. return LabelUtil.getLabel(element);
  1177. },
  1178. getElementIcon: element => {
  1179. const concreteType = getConcreteType(element);
  1180. const elementTemplates = getTemplatesService();
  1181. if (elementTemplates) {
  1182. const template = getTemplate(element, elementTemplates);
  1183. if (template && template.icon) {
  1184. return () => jsxRuntime.jsx("img", {
  1185. class: "bio-properties-panel-header-template-icon",
  1186. width: "32",
  1187. height: "32",
  1188. src: template.icon.contents
  1189. });
  1190. }
  1191. }
  1192. return iconsByType[concreteType];
  1193. },
  1194. getTypeLabel: element => {
  1195. const elementTemplates = getTemplatesService();
  1196. if (elementTemplates) {
  1197. const template = getTemplate(element, elementTemplates);
  1198. if (template && template.name) {
  1199. return template.name;
  1200. }
  1201. }
  1202. const concreteType = getConcreteType(element);
  1203. return concreteType.replace(/(\B[A-Z])/g, ' $1').replace(/(\bNon Interrupting)/g, '($1)');
  1204. }
  1205. }; // helpers ///////////////////////
  1206. function isCancelActivity(element) {
  1207. const businessObject = ModelUtil.getBusinessObject(element);
  1208. return businessObject && businessObject.cancelActivity !== false;
  1209. }
  1210. function getEventDefinition$1(element) {
  1211. const businessObject = ModelUtil.getBusinessObject(element),
  1212. eventDefinitions = businessObject.eventDefinitions;
  1213. return eventDefinitions && eventDefinitions[0];
  1214. }
  1215. function getRawType(type) {
  1216. return type.split(':')[1];
  1217. }
  1218. function getEventDefinitionPrefix(eventDefinition) {
  1219. const rawType = getRawType(eventDefinition.$type);
  1220. return rawType.replace('EventDefinition', '');
  1221. }
  1222. function isDefaultFlow(element) {
  1223. const businessObject = ModelUtil.getBusinessObject(element);
  1224. const sourceBusinessObject = ModelUtil.getBusinessObject(element.source);
  1225. if (!ModelUtil.is(element, 'bpmn:SequenceFlow') || !sourceBusinessObject) {
  1226. return false;
  1227. }
  1228. return sourceBusinessObject.default && sourceBusinessObject.default === businessObject && (ModelUtil.is(sourceBusinessObject, 'bpmn:Gateway') || ModelUtil.is(sourceBusinessObject, 'bpmn:Activity'));
  1229. }
  1230. function isConditionalFlow(element) {
  1231. const businessObject = ModelUtil.getBusinessObject(element);
  1232. const sourceBusinessObject = ModelUtil.getBusinessObject(element.source);
  1233. if (!ModelUtil.is(element, 'bpmn:SequenceFlow') || !sourceBusinessObject) {
  1234. return false;
  1235. }
  1236. return businessObject.conditionExpression && ModelUtil.is(sourceBusinessObject, 'bpmn:Activity');
  1237. }
  1238. function isPlane(element) {
  1239. // Backwards compatibility for bpmn-js<8
  1240. const di = element && (element.di || ModelUtil.getBusinessObject(element).di);
  1241. return ModelUtil.is(di, 'bpmndi:BPMNPlane');
  1242. }
  1243. function getTemplatesService() {
  1244. // eslint-disable-next-line react-hooks/rules-of-hooks
  1245. return useService('elementTemplates', false);
  1246. }
  1247. function getTemplate(element, elementTemplates) {
  1248. return elementTemplates.get(element);
  1249. }
  1250. function getTemplateDocumentation(element, elementTemplates) {
  1251. const template = getTemplate(element, elementTemplates);
  1252. return template && template.documentationRef;
  1253. }
  1254. function _extends$1() { _extends$1 = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends$1.apply(this, arguments); }
  1255. var EmptyIcon = (({
  1256. styles = {},
  1257. ...props
  1258. }) => /*#__PURE__*/React__default["default"].createElement("svg", _extends$1({
  1259. xmlns: "http://www.w3.org/2000/svg",
  1260. xmlnsXlink: "http://www.w3.org/1999/xlink",
  1261. width: "64",
  1262. height: "64"
  1263. }, props), /*#__PURE__*/React__default["default"].createElement("defs", null, /*#__PURE__*/React__default["default"].createElement("rect", {
  1264. id: "a",
  1265. width: "57",
  1266. height: "47",
  1267. x: "3",
  1268. y: "8",
  1269. rx: "7"
  1270. }), /*#__PURE__*/React__default["default"].createElement("mask", {
  1271. id: "b",
  1272. width: "57",
  1273. height: "47",
  1274. x: "0",
  1275. y: "0",
  1276. fill: "#fff",
  1277. maskContentUnits: "userSpaceOnUse",
  1278. maskUnits: "objectBoundingBox"
  1279. }, /*#__PURE__*/React__default["default"].createElement("use", {
  1280. xlinkHref: "#a"
  1281. }))), /*#__PURE__*/React__default["default"].createElement("g", {
  1282. fill: "none",
  1283. fillRule: "evenodd"
  1284. }, /*#__PURE__*/React__default["default"].createElement("path", {
  1285. fill: "#818798",
  1286. d: "M52 11a5 5 0 015 5v31a5 5 0 01-5 5H11a5 5 0 01-5-5V16a5 5 0 015-5h41zm0 2H11a3 3 0 00-2.995 2.824L8 16v31a3 3 0 002.824 2.995L11 50h41a3 3 0 002.995-2.824L55 47V16a3 3 0 00-2.824-2.995L52 13z"
  1287. }), /*#__PURE__*/React__default["default"].createElement("path", {
  1288. fill: "#D5D7DD",
  1289. d: "M16 24h31v6H16zM21 33h21v6H21z"
  1290. }), /*#__PURE__*/React__default["default"].createElement("use", {
  1291. stroke: "#B9BCC6",
  1292. strokeDasharray: "5 2",
  1293. strokeWidth: "2",
  1294. mask: "url(#b)",
  1295. xlinkHref: "#a"
  1296. }))));
  1297. function _extends() { _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }
  1298. var MultipleIcon = (({
  1299. styles = {},
  1300. ...props
  1301. }) => /*#__PURE__*/React__default["default"].createElement("svg", _extends({
  1302. xmlns: "http://www.w3.org/2000/svg",
  1303. xmlnsXlink: "http://www.w3.org/1999/xlink",
  1304. width: "128",
  1305. height: "64"
  1306. }, props), /*#__PURE__*/React__default["default"].createElement("defs", null, /*#__PURE__*/React__default["default"].createElement("path", {
  1307. id: "a",
  1308. d: "M9 9h110v47H9z"
  1309. }), /*#__PURE__*/React__default["default"].createElement("mask", {
  1310. id: "b",
  1311. width: "110",
  1312. height: "47",
  1313. x: "0",
  1314. y: "0",
  1315. fill: "#fff",
  1316. maskContentUnits: "userSpaceOnUse",
  1317. maskUnits: "objectBoundingBox"
  1318. }, /*#__PURE__*/React__default["default"].createElement("use", {
  1319. xlinkHref: "#a"
  1320. }))), /*#__PURE__*/React__default["default"].createElement("g", {
  1321. fill: "none",
  1322. fillRule: "evenodd"
  1323. }, /*#__PURE__*/React__default["default"].createElement("path", {
  1324. fill: "#818798",
  1325. d: "M25 20.272L37.728 33 25 45.728 12.272 33 25 20.272zm0 2.829L15.1 33l9.9 9.9 9.9-9.9-9.9-9.9z"
  1326. }), /*#__PURE__*/React__default["default"].createElement("path", {
  1327. fill: "#D5D7DD",
  1328. d: "M17 47h16v6H17z"
  1329. }), /*#__PURE__*/React__default["default"].createElement("path", {
  1330. fill: "#818798",
  1331. d: "M35 32h27v2H35z"
  1332. }), /*#__PURE__*/React__default["default"].createElement("path", {
  1333. fill: "#818798",
  1334. d: "M60 30v6l6-3z"
  1335. }), /*#__PURE__*/React__default["default"].createElement("path", {
  1336. fill: "#D5D7DD",
  1337. d: "M80 34h21v6H80z"
  1338. }), /*#__PURE__*/React__default["default"].createElement("g", null, /*#__PURE__*/React__default["default"].createElement("path", {
  1339. fill: "#818798",
  1340. d: "M111 12a5 5 0 015 5v31a5 5 0 01-5 5H70a5 5 0 01-5-5V17a5 5 0 015-5h41zm0 2H70a3 3 0 00-3 3v31a3 3 0 003 3h41a3 3 0 003-3V17a3 3 0 00-3-3z"
  1341. }), /*#__PURE__*/React__default["default"].createElement("path", {
  1342. fill: "#D5D7DD",
  1343. d: "M75 25h31v6H75z"
  1344. })), /*#__PURE__*/React__default["default"].createElement("use", {
  1345. stroke: "#B9BCC6",
  1346. strokeDasharray: "5 2",
  1347. strokeWidth: "2",
  1348. mask: "url(#b)",
  1349. xlinkHref: "#a"
  1350. }))));
  1351. const PanelPlaceholderProvider = {
  1352. getEmpty: () => {
  1353. return {
  1354. text: 'Select an element to edit its properties.',
  1355. icon: EmptyIcon
  1356. };
  1357. },
  1358. getMultiple: () => {
  1359. return {
  1360. text: 'Multiple elements are selected. Select a single element to edit its properties.',
  1361. icon: MultipleIcon
  1362. };
  1363. }
  1364. };
  1365. function BpmnPropertiesPanel(props) {
  1366. const {
  1367. element,
  1368. injector,
  1369. getProviders,
  1370. layoutConfig,
  1371. descriptionConfig
  1372. } = props;
  1373. const canvas = injector.get('canvas');
  1374. const elementRegistry = injector.get('elementRegistry');
  1375. const eventBus = injector.get('eventBus');
  1376. const [state, setState] = hooks.useState({
  1377. selectedElement: element
  1378. });
  1379. const selectedElement = state.selectedElement;
  1380. /**
  1381. * @param {djs.model.Base | Array<djs.model.Base>} element
  1382. */
  1383. const _update = element => {
  1384. if (!element) {
  1385. return;
  1386. }
  1387. let newSelectedElement = element; // handle labels
  1388. if (newSelectedElement && newSelectedElement.type === 'label') {
  1389. newSelectedElement = newSelectedElement.labelTarget;
  1390. }
  1391. setState({ ...state,
  1392. selectedElement: newSelectedElement
  1393. }); // notify interested parties on property panel updates
  1394. eventBus.fire('propertiesPanel.updated', {
  1395. element: newSelectedElement
  1396. });
  1397. }; // (2) react on element changes
  1398. // (2a) selection changed
  1399. hooks.useEffect(() => {
  1400. const onSelectionChanged = e => {
  1401. const {
  1402. newSelection = []
  1403. } = e;
  1404. if (newSelection.length > 1) {
  1405. return _update(newSelection);
  1406. }
  1407. const newElement = newSelection[0];
  1408. const rootElement = canvas.getRootElement();
  1409. if (isImplicitRoot$1(rootElement)) {
  1410. return;
  1411. }
  1412. _update(newElement || rootElement);
  1413. };
  1414. eventBus.on('selection.changed', onSelectionChanged);
  1415. return () => {
  1416. eventBus.off('selection.changed', onSelectionChanged);
  1417. };
  1418. }, []); // (2b) selected element changed
  1419. hooks.useEffect(() => {
  1420. const onElementsChanged = e => {
  1421. const elements = e.elements;
  1422. const updatedElement = findElement(elements, selectedElement);
  1423. if (updatedElement && elementExists(updatedElement, elementRegistry)) {
  1424. _update(updatedElement);
  1425. }
  1426. };
  1427. eventBus.on('elements.changed', onElementsChanged);
  1428. return () => {
  1429. eventBus.off('elements.changed', onElementsChanged);
  1430. };
  1431. }, [selectedElement]); // (2c) root element changed
  1432. hooks.useEffect(() => {
  1433. const onRootAdded = e => {
  1434. const element = e.element;
  1435. _update(element);
  1436. };
  1437. eventBus.on('root.added', onRootAdded);
  1438. return () => {
  1439. eventBus.off('root.added', onRootAdded);
  1440. };
  1441. }, [selectedElement]); // (2d) provided entries changed
  1442. hooks.useEffect(() => {
  1443. const onProvidersChanged = () => {
  1444. _update(selectedElement);
  1445. };
  1446. eventBus.on('propertiesPanel.providersChanged', onProvidersChanged);
  1447. return () => {
  1448. eventBus.off('propertiesPanel.providersChanged', onProvidersChanged);
  1449. };
  1450. }, [selectedElement]); // (2e) element templates changed
  1451. hooks.useEffect(() => {
  1452. const onTemplatesChanged = () => {
  1453. _update(selectedElement);
  1454. };
  1455. eventBus.on('elementTemplates.changed', onTemplatesChanged);
  1456. return () => {
  1457. eventBus.off('elementTemplates.changed', onTemplatesChanged);
  1458. };
  1459. }, [selectedElement]); // (3) create properties panel context
  1460. const bpmnPropertiesPanelContext = {
  1461. selectedElement,
  1462. injector,
  1463. getService(type, strict) {
  1464. return injector.get(type, strict);
  1465. }
  1466. }; // (4) retrieve groups for selected element
  1467. const providers = getProviders(selectedElement);
  1468. const groups = hooks.useMemo(() => {
  1469. return minDash.reduce(providers, function (groups, provider) {
  1470. // do not collect groups for multi element state
  1471. if (minDash.isArray(selectedElement)) {
  1472. return [];
  1473. }
  1474. const updater = provider.getGroups(selectedElement);
  1475. return updater(groups);
  1476. }, []);
  1477. }, [providers, selectedElement]); // (5) notify layout changes
  1478. const onLayoutChanged = layout => {
  1479. eventBus.fire('propertiesPanel.layoutChanged', {
  1480. layout
  1481. });
  1482. }; // (6) notify description changes
  1483. const onDescriptionLoaded = description => {
  1484. eventBus.fire('propertiesPanel.descriptionLoaded', {
  1485. description
  1486. });
  1487. };
  1488. return jsxRuntime.jsx(BpmnPropertiesPanelContext.Provider, {
  1489. value: bpmnPropertiesPanelContext,
  1490. children: jsxRuntime.jsx(propertiesPanel.PropertiesPanel, {
  1491. element: selectedElement,
  1492. headerProvider: PanelHeaderProvider,
  1493. placeholderProvider: PanelPlaceholderProvider,
  1494. groups: groups,
  1495. layoutConfig: layoutConfig,
  1496. layoutChanged: onLayoutChanged,
  1497. descriptionConfig: descriptionConfig,
  1498. descriptionLoaded: onDescriptionLoaded,
  1499. eventBus: eventBus
  1500. })
  1501. });
  1502. } // helpers //////////////////////////
  1503. function isImplicitRoot$1(element) {
  1504. // Backwards compatibility for diagram-js<7.4.0, see https://github.com/bpmn-io/bpmn-properties-panel/pull/102
  1505. return element && (element.isImplicit || element.id === '__implicitroot');
  1506. }
  1507. function findElement(elements, element) {
  1508. return minDash.find(elements, e => e === element);
  1509. }
  1510. function elementExists(element, elementRegistry) {
  1511. return element && elementRegistry.get(element.id);
  1512. }
  1513. const DEFAULT_PRIORITY = 1000;
  1514. /**
  1515. * @typedef { import('@bpmn-io/properties-panel').GroupDefinition } GroupDefinition
  1516. * @typedef { import('@bpmn-io/properties-panel').ListGroupDefinition } ListGroupDefinition
  1517. * @typedef { { getGroups: (ModdleElement) => (Array{GroupDefinition|ListGroupDefinition}) => Array{GroupDefinition|ListGroupDefinition}) } PropertiesProvider
  1518. */
  1519. class BpmnPropertiesPanelRenderer {
  1520. constructor(config, injector, eventBus) {
  1521. const {
  1522. parent,
  1523. layout: layoutConfig,
  1524. description: descriptionConfig
  1525. } = config || {};
  1526. this._eventBus = eventBus;
  1527. this._injector = injector;
  1528. this._layoutConfig = layoutConfig;
  1529. this._descriptionConfig = descriptionConfig;
  1530. this._container = minDom.domify('<div style="height: 100%" class="bio-properties-panel-container" input-handle-modified-keys="y,z"></div>');
  1531. eventBus.on('diagram.init', () => {
  1532. if (parent) {
  1533. this.attachTo(parent);
  1534. }
  1535. });
  1536. eventBus.on('diagram.destroy', () => {
  1537. this.detach();
  1538. });
  1539. eventBus.on('root.added', event => {
  1540. const {
  1541. element
  1542. } = event;
  1543. this._render(element);
  1544. });
  1545. }
  1546. /**
  1547. * Attach the properties panel to a parent node.
  1548. *
  1549. * @param {HTMLElement} container
  1550. */
  1551. attachTo(container) {
  1552. if (!container) {
  1553. throw new Error('container required');
  1554. } // unwrap jQuery if provided
  1555. if (container.get && container.constructor.prototype.jquery) {
  1556. container = container.get(0);
  1557. }
  1558. if (typeof container === 'string') {
  1559. container = minDom.query(container);
  1560. } // (1) detach from old parent
  1561. this.detach(); // (2) append to parent container
  1562. container.appendChild(this._container); // (3) notify interested parties
  1563. this._eventBus.fire('propertiesPanel.attach');
  1564. }
  1565. /**
  1566. * Detach the properties panel from its parent node.
  1567. */
  1568. detach() {
  1569. const parentNode = this._container.parentNode;
  1570. if (parentNode) {
  1571. parentNode.removeChild(this._container);
  1572. this._eventBus.fire('propertiesPanel.detach');
  1573. }
  1574. }
  1575. /**
  1576. * Register a new properties provider to the properties panel.
  1577. *
  1578. * @param {Number} [priority]
  1579. * @param {PropertiesProvider} provider
  1580. */
  1581. registerProvider(priority, provider) {
  1582. if (!provider) {
  1583. provider = priority;
  1584. priority = DEFAULT_PRIORITY;
  1585. }
  1586. if (typeof provider.getGroups !== 'function') {
  1587. console.error('Properties provider does not implement #getGroups(element) API');
  1588. return;
  1589. }
  1590. this._eventBus.on('propertiesPanel.getProviders', priority, function (event) {
  1591. event.providers.push(provider);
  1592. });
  1593. this._eventBus.fire('propertiesPanel.providersChanged');
  1594. }
  1595. _getProviders() {
  1596. const event = this._eventBus.createEvent({
  1597. type: 'propertiesPanel.getProviders',
  1598. providers: []
  1599. });
  1600. this._eventBus.fire(event);
  1601. return event.providers;
  1602. }
  1603. _render(element) {
  1604. const canvas = this._injector.get('canvas');
  1605. if (!element) {
  1606. element = canvas.getRootElement();
  1607. }
  1608. if (isImplicitRoot(element)) {
  1609. return;
  1610. }
  1611. preact.render(jsxRuntime.jsx(BpmnPropertiesPanel, {
  1612. element: element,
  1613. injector: this._injector,
  1614. getProviders: this._getProviders.bind(this),
  1615. layoutConfig: this._layoutConfig,
  1616. descriptionConfig: this._descriptionConfig
  1617. }), this._container);
  1618. this._eventBus.fire('propertiesPanel.rendered');
  1619. }
  1620. _destroy() {
  1621. if (this._container) {
  1622. preact.render(null, this._container);
  1623. this._eventBus.fire('propertiesPanel.destroyed');
  1624. }
  1625. }
  1626. }
  1627. BpmnPropertiesPanelRenderer.$inject = ['config.propertiesPanel', 'injector', 'eventBus']; // helpers ///////////////////////
  1628. function isImplicitRoot(element) {
  1629. // Backwards compatibility for diagram-js<7.4.0, see https://github.com/bpmn-io/bpmn-properties-panel/pull/102
  1630. return element && (element.isImplicit || element.id === '__implicitroot');
  1631. }
  1632. /**
  1633. * A handler that combines and executes multiple commands.
  1634. *
  1635. * All updates are bundled on the command stack and executed in one step.
  1636. * This also makes it possible to revert the changes in one step.
  1637. *
  1638. * Example use case: remove the camunda:formKey attribute and in addition
  1639. * add all form fields needed for the camunda:formData property.
  1640. */
  1641. class MultiCommandHandler {
  1642. constructor(commandStack) {
  1643. this._commandStack = commandStack;
  1644. }
  1645. preExecute(context) {
  1646. const commandStack = this._commandStack;
  1647. minDash.forEach(context, function (command) {
  1648. commandStack.execute(command.cmd, command.context);
  1649. });
  1650. }
  1651. }
  1652. MultiCommandHandler.$inject = ['commandStack'];
  1653. const HANDLERS = {
  1654. 'properties-panel.multi-command-executor': MultiCommandHandler
  1655. };
  1656. function CommandInitializer(eventBus, commandStack) {
  1657. eventBus.on('diagram.init', function () {
  1658. minDash.forEach(HANDLERS, function (handler, id) {
  1659. commandStack.registerHandler(id, handler);
  1660. });
  1661. });
  1662. }
  1663. CommandInitializer.$inject = ['eventBus', 'commandStack'];
  1664. var Commands = {
  1665. __init__: [CommandInitializer]
  1666. };
  1667. var index$3 = {
  1668. __depends__: [Commands, propertiesPanel.DebounceInputModule],
  1669. __init__: ['propertiesPanel'],
  1670. propertiesPanel: ['type', BpmnPropertiesPanelRenderer]
  1671. };
  1672. function ReferenceSelectEntry(props) {
  1673. const {
  1674. autoFocusEntry,
  1675. element,
  1676. getOptions
  1677. } = props;
  1678. const options = getOptions(element);
  1679. const prevOptions = propertiesPanel.usePrevious(options); // auto focus specifc other entry when options changed
  1680. hooks.useEffect(() => {
  1681. if (autoFocusEntry && prevOptions && options.length > prevOptions.length) {
  1682. const entry = minDom.query(`[data-entry-id="${autoFocusEntry}"]`);
  1683. const focusableInput = minDom.query('.bio-properties-panel-input', entry);
  1684. if (focusableInput) {
  1685. focusableInput.select();
  1686. }
  1687. }
  1688. }, [options]);
  1689. return jsxRuntime.jsx(propertiesPanel.SelectEntry, { ...props
  1690. });
  1691. }
  1692. function isErrorSupported(element) {
  1693. return ModelingUtil.isAny(element, ['bpmn:StartEvent', 'bpmn:BoundaryEvent', 'bpmn:EndEvent']) && !!getErrorEventDefinition(element);
  1694. }
  1695. function getErrorEventDefinition(element) {
  1696. return getEventDefinition(element, 'bpmn:ErrorEventDefinition');
  1697. }
  1698. function isTimerSupported(element) {
  1699. return ModelingUtil.isAny(element, ['bpmn:StartEvent', 'bpmn:IntermediateCatchEvent', 'bpmn:BoundaryEvent']) && !!getTimerEventDefinition(element);
  1700. }
  1701. /**
  1702. * Get the timer definition type for a given timer event definition.
  1703. *
  1704. * @param {ModdleElement<bpmn:TimerEventDefinition>} timer
  1705. *
  1706. * @return {string|undefined} the timer definition type
  1707. */
  1708. function getTimerDefinitionType(timer) {
  1709. if (!timer) {
  1710. return;
  1711. }
  1712. const timeDate = timer.get('timeDate');
  1713. if (typeof timeDate !== 'undefined') {
  1714. return 'timeDate';
  1715. }
  1716. const timeCycle = timer.get('timeCycle');
  1717. if (typeof timeCycle !== 'undefined') {
  1718. return 'timeCycle';
  1719. }
  1720. const timeDuration = timer.get('timeDuration');
  1721. if (typeof timeDuration !== 'undefined') {
  1722. return 'timeDuration';
  1723. }
  1724. }
  1725. function getTimerEventDefinition(element) {
  1726. return getEventDefinition(element, 'bpmn:TimerEventDefinition');
  1727. }
  1728. function getError(element) {
  1729. const errorEventDefinition = getErrorEventDefinition(element);
  1730. return errorEventDefinition && errorEventDefinition.get('errorRef');
  1731. }
  1732. function getEventDefinition(element, eventType) {
  1733. const businessObject = ModelUtil.getBusinessObject(element);
  1734. const eventDefinitions = businessObject.get('eventDefinitions') || [];
  1735. return minDash.find(eventDefinitions, function (definition) {
  1736. return ModelUtil.is(definition, eventType);
  1737. });
  1738. }
  1739. function isMessageSupported(element) {
  1740. return ModelUtil.is(element, 'bpmn:ReceiveTask') || ModelingUtil.isAny(element, ['bpmn:StartEvent', 'bpmn:EndEvent', 'bpmn:IntermediateThrowEvent', 'bpmn:BoundaryEvent', 'bpmn:IntermediateCatchEvent']) && !!getMessageEventDefinition(element);
  1741. }
  1742. function getMessageEventDefinition(element) {
  1743. if (ModelUtil.is(element, 'bpmn:ReceiveTask')) {
  1744. return ModelUtil.getBusinessObject(element);
  1745. }
  1746. return getEventDefinition(element, 'bpmn:MessageEventDefinition');
  1747. }
  1748. function getMessage(element) {
  1749. const messageEventDefinition = getMessageEventDefinition(element);
  1750. return messageEventDefinition && messageEventDefinition.get('messageRef');
  1751. }
  1752. function getLinkEventDefinition(element) {
  1753. return getEventDefinition(element, 'bpmn:LinkEventDefinition');
  1754. }
  1755. function getSignalEventDefinition(element) {
  1756. return getEventDefinition(element, 'bpmn:SignalEventDefinition');
  1757. }
  1758. function isLinkSupported(element) {
  1759. return ModelingUtil.isAny(element, ['bpmn:IntermediateThrowEvent', 'bpmn:IntermediateCatchEvent']) && !!getLinkEventDefinition(element);
  1760. }
  1761. function isSignalSupported(element) {
  1762. return ModelUtil.is(element, 'bpmn:Event') && !!getSignalEventDefinition(element);
  1763. }
  1764. function getSignal(element) {
  1765. const signalEventDefinition = getSignalEventDefinition(element);
  1766. return signalEventDefinition && signalEventDefinition.get('signalRef');
  1767. }
  1768. function getEscalationEventDefinition(element) {
  1769. return getEventDefinition(element, 'bpmn:EscalationEventDefinition');
  1770. }
  1771. function isEscalationSupported(element) {
  1772. return ModelUtil.is(element, 'bpmn:Event') && !!getEscalationEventDefinition(element);
  1773. }
  1774. function getEscalation(element) {
  1775. const escalationEventDefinition = getEscalationEventDefinition(element);
  1776. return escalationEventDefinition && escalationEventDefinition.get('escalationRef');
  1777. }
  1778. function isCompensationSupported(element) {
  1779. return ModelingUtil.isAny(element, ['bpmn:EndEvent', 'bpmn:IntermediateThrowEvent']) && !!getCompensateEventDefinition(element);
  1780. }
  1781. function getCompensateEventDefinition(element) {
  1782. return getEventDefinition(element, 'bpmn:CompensateEventDefinition');
  1783. }
  1784. function getCompensateActivity(element) {
  1785. const compensateEventDefinition = getCompensateEventDefinition(element);
  1786. return compensateEventDefinition && compensateEventDefinition.get('activityRef');
  1787. }
  1788. /**
  1789. * @typedef { import('@bpmn-io/properties-panel').EntryDefinition } Entry
  1790. */
  1791. /**
  1792. * @returns {Array<Entry>} entries
  1793. */
  1794. function CompensationProps(props) {
  1795. const {
  1796. element
  1797. } = props;
  1798. if (!isCompensationSupported(element)) {
  1799. return [];
  1800. }
  1801. return [{
  1802. id: 'waitForCompletion',
  1803. component: WaitForCompletion,
  1804. isEdited: propertiesPanel.isCheckboxEntryEdited
  1805. }, {
  1806. id: 'activityRef',
  1807. component: ActivityRef,
  1808. isEdited: propertiesPanel.isSelectEntryEdited
  1809. }];
  1810. }
  1811. function WaitForCompletion(props) {
  1812. const {
  1813. element
  1814. } = props;
  1815. const commandStack = useService('commandStack');
  1816. const translate = useService('translate');
  1817. const compensateEventDefinition = getCompensateEventDefinition(element);
  1818. const getValue = () => {
  1819. return compensateEventDefinition.get('waitForCompletion');
  1820. };
  1821. const setValue = value => {
  1822. commandStack.execute('element.updateModdleProperties', {
  1823. element,
  1824. moddleElement: compensateEventDefinition,
  1825. properties: {
  1826. waitForCompletion: value
  1827. }
  1828. });
  1829. };
  1830. return propertiesPanel.CheckboxEntry({
  1831. element,
  1832. id: 'waitForCompletion',
  1833. label: translate('Wait for completion'),
  1834. getValue,
  1835. setValue
  1836. });
  1837. }
  1838. function ActivityRef(props) {
  1839. const {
  1840. element
  1841. } = props;
  1842. const commandStack = useService('commandStack');
  1843. const elementRegistry = useService('elementRegistry');
  1844. const translate = useService('translate');
  1845. const compensateEventDefinition = getCompensateEventDefinition(element);
  1846. const getValue = () => {
  1847. const activityRef = getCompensateActivity(element);
  1848. return activityRef && activityRef.get('id');
  1849. };
  1850. const setValue = value => {
  1851. // update (or remove) activityRef
  1852. const activityRef = value ? ModelUtil.getBusinessObject(elementRegistry.get(value)) : undefined;
  1853. commandStack.execute('element.updateModdleProperties', {
  1854. element,
  1855. moddleElement: compensateEventDefinition,
  1856. properties: {
  1857. activityRef
  1858. }
  1859. });
  1860. };
  1861. const getOptions = () => {
  1862. let options = [{
  1863. value: '',
  1864. label: translate('<none>')
  1865. }];
  1866. const activities = findActivityRefs(element);
  1867. sortByName$6(activities).forEach(function (activity) {
  1868. options.push({
  1869. value: activity.id,
  1870. label: createOptionLabel(activity)
  1871. });
  1872. });
  1873. return options;
  1874. };
  1875. return ReferenceSelectEntry({
  1876. element,
  1877. id: 'activityRef',
  1878. label: translate('Activity reference'),
  1879. getValue,
  1880. setValue,
  1881. getOptions
  1882. });
  1883. } // helper /////////////////////////
  1884. function getFlowElements(element, type) {
  1885. const {
  1886. flowElements
  1887. } = element;
  1888. return flowElements.filter(function (flowElement) {
  1889. return ModelUtil.is(flowElement, type);
  1890. });
  1891. }
  1892. function getContainedActivities(element) {
  1893. return getFlowElements(element, 'bpmn:Activity');
  1894. }
  1895. function getContainedBoundaryEvents(element) {
  1896. return getFlowElements(element, 'bpmn:BoundaryEvent');
  1897. }
  1898. /**
  1899. * Checks whether an Activity is attaching a CompensateEvent of the parent container.
  1900. *
  1901. * @param {ModdleElement} activity
  1902. * @param {Array<ModdleElement>} boundaryEvents
  1903. * @returns {Boolean}
  1904. */
  1905. function hasCompensationEventAttached(activity, boundaryEvents) {
  1906. const {
  1907. id: activityId
  1908. } = activity;
  1909. return !!minDash.find(boundaryEvents, function (boundaryEvent) {
  1910. const {
  1911. attachedToRef
  1912. } = boundaryEvent;
  1913. const compensateEventDefinition = getCompensateEventDefinition(boundaryEvent);
  1914. return attachedToRef && compensateEventDefinition && attachedToRef.id === activityId;
  1915. });
  1916. }
  1917. /**
  1918. * Checks whether an Activity can be compensated. That's the case when it is
  1919. * a) a CallActivity
  1920. * b) a SubProcess, when it is not event based and not a compensation
  1921. * c) any other Activity, when it is attaching a CompensateEvent of the parent container
  1922. *
  1923. * @param {ModdleElement} activity
  1924. * @param {Array<ModdleElement>} boundaryEvents
  1925. * @returns {Boolean}
  1926. */
  1927. function canBeCompensated(activity, boundaryEvents) {
  1928. return ModelUtil.is(activity, 'bpmn:CallActivity') || ModelUtil.is(activity, 'bpmn:SubProcess') && !activity.triggeredByEvent && !activity.isForCompensation || hasCompensationEventAttached(activity, boundaryEvents);
  1929. }
  1930. function getActivitiesForCompensation(element) {
  1931. const activities = getContainedActivities(element);
  1932. const boundaryEvents = getContainedBoundaryEvents(element);
  1933. return activities.filter(function (activity) {
  1934. return canBeCompensated(activity, boundaryEvents);
  1935. });
  1936. }
  1937. /**
  1938. * Retrieves all possible activities to reference for a Compensation.
  1939. *
  1940. * @param {djs.model.Base} element
  1941. * @returns {Array<ModdleElement>}
  1942. */
  1943. function findActivityRefs(element) {
  1944. const businessObject = ModelUtil.getBusinessObject(element);
  1945. let parent = businessObject.$parent; // (1) get all activities in parent container
  1946. let activities = getActivitiesForCompensation(parent); // (2) if throwing compensation event is inside an EventSubProcess,
  1947. // also get all activities outside of the event sub process
  1948. if (ModelUtil.is(parent, 'bpmn:SubProcess') && parent.triggeredByEvent) {
  1949. parent = parent.$parent;
  1950. if (parent) {
  1951. activities = [...activities, ...getActivitiesForCompensation(parent)];
  1952. }
  1953. }
  1954. return activities;
  1955. }
  1956. /**
  1957. * Retrieves an option label in the form
  1958. * a) with name: "my Task (id=Task_1)"
  1959. * b) without name: "(id=Task_1)"
  1960. *
  1961. * @param {ModdleElement} activity
  1962. * @returns {String}
  1963. */
  1964. function createOptionLabel(activity) {
  1965. const {
  1966. id,
  1967. name
  1968. } = activity;
  1969. return `${name ? name + ' ' : ''}(id=${id})`;
  1970. }
  1971. function sortByName$6(elements) {
  1972. return minDash.sortBy(elements, e => (e.name || '').toLowerCase());
  1973. }
  1974. const DOCUMENTATION_TEXT_FORMAT = 'text/plain';
  1975. /**
  1976. * @typedef { import('@bpmn-io/properties-panel').EntryDefinition } Entry
  1977. */
  1978. /**
  1979. * @returns {Array<Entry>} entries
  1980. */
  1981. function DocumentationProps(props) {
  1982. const {
  1983. element
  1984. } = props;
  1985. const entries = [{
  1986. id: 'documentation',
  1987. component: ElementDocumentationProperty,
  1988. isEdited: propertiesPanel.isTextAreaEntryEdited
  1989. }];
  1990. if (hasProcessRef$2(element)) {
  1991. entries.push({
  1992. id: 'processDocumentation',
  1993. component: ProcessDocumentationProperty,
  1994. isEdited: propertiesPanel.isTextAreaEntryEdited
  1995. });
  1996. }
  1997. return entries;
  1998. }
  1999. function ElementDocumentationProperty(props) {
  2000. const {
  2001. element
  2002. } = props;
  2003. const bpmnFactory = useService('bpmnFactory');
  2004. const commandStack = useService('commandStack');
  2005. const translate = useService('translate');
  2006. const debounce = useService('debounceInput');
  2007. const getValue = getDocumentation(ModelUtil.getBusinessObject(element));
  2008. const setValue = setDocumentation(element, ModelUtil.getBusinessObject(element), bpmnFactory, commandStack);
  2009. return propertiesPanel.TextAreaEntry({
  2010. element,
  2011. id: 'documentation',
  2012. label: translate('Element documentation'),
  2013. getValue,
  2014. setValue,
  2015. debounce
  2016. });
  2017. }
  2018. function ProcessDocumentationProperty(props) {
  2019. const {
  2020. element
  2021. } = props;
  2022. const bpmnFactory = useService('bpmnFactory');
  2023. const commandStack = useService('commandStack');
  2024. const translate = useService('translate');
  2025. const debounce = useService('debounceInput');
  2026. const processRef = ModelUtil.getBusinessObject(element).processRef;
  2027. const getValue = getDocumentation(processRef);
  2028. const setValue = setDocumentation(element, processRef, bpmnFactory, commandStack);
  2029. return propertiesPanel.TextAreaEntry({
  2030. element,
  2031. id: 'processDocumentation',
  2032. label: translate('Process documentation'),
  2033. getValue,
  2034. setValue,
  2035. debounce
  2036. });
  2037. } // helper ////////////////////////////
  2038. function hasProcessRef$2(element) {
  2039. return ModelUtil.is(element, 'bpmn:Participant') && element.businessObject.get('processRef');
  2040. }
  2041. function findDocumentation(docs) {
  2042. return docs.find(function (d) {
  2043. return (d.textFormat || DOCUMENTATION_TEXT_FORMAT) === DOCUMENTATION_TEXT_FORMAT;
  2044. });
  2045. }
  2046. /**
  2047. * Retrieves a documentation element from a given moddle element.
  2048. *
  2049. * @param {ModdleElement} businessObject
  2050. *
  2051. * @returns {ModdleElement} documentation element inside the given moddle element.
  2052. */
  2053. function getDocumentation(businessObject) {
  2054. return function () {
  2055. const documentation = findDocumentation(businessObject && businessObject.get('documentation'));
  2056. return documentation && documentation.text;
  2057. };
  2058. }
  2059. /**
  2060. * Sets a documentation element for a given moddle element.
  2061. *
  2062. * @param {ModdleElement} businessObject
  2063. */
  2064. function setDocumentation(element, businessObject, bpmnFactory, commandStack) {
  2065. return function (value) {
  2066. let documentation = findDocumentation(businessObject && businessObject.get('documentation')); // (1) update or removing existing documentation
  2067. if (documentation) {
  2068. if (value) {
  2069. return commandStack.execute('element.updateModdleProperties', {
  2070. element,
  2071. moddleElement: documentation,
  2072. properties: {
  2073. text: value
  2074. }
  2075. });
  2076. } else {
  2077. return commandStack.execute('element.updateModdleProperties', {
  2078. element,
  2079. moddleElement: businessObject,
  2080. properties: {
  2081. documentation: minDash.without(businessObject.get('documentation'), documentation)
  2082. }
  2083. });
  2084. }
  2085. } // (2) create new documentation entry
  2086. if (value) {
  2087. documentation = bpmnFactory.create('bpmn:Documentation', {
  2088. text: value
  2089. });
  2090. return commandStack.execute('element.updateModdleProperties', {
  2091. element,
  2092. moddleElement: businessObject,
  2093. properties: {
  2094. documentation: [...businessObject.get('documentation'), documentation]
  2095. }
  2096. });
  2097. }
  2098. };
  2099. }
  2100. /**
  2101. * Create a new element and set its parent.
  2102. *
  2103. * @param {String} elementType of the new element
  2104. * @param {Object} properties of the new element in key-value pairs
  2105. * @param {moddle.object} parent of the new element
  2106. * @param {BpmnFactory} factory which creates the new element
  2107. *
  2108. * @returns {djs.model.Base} element which is created
  2109. */
  2110. function createElement(elementType, properties, parent, factory) {
  2111. const element = factory.create(elementType, properties);
  2112. if (parent) {
  2113. element.$parent = parent;
  2114. }
  2115. return element;
  2116. }
  2117. /**
  2118. * generate a semantic id with given prefix
  2119. */
  2120. function nextId(prefix) {
  2121. const ids = new Ids__default["default"]([32, 32, 1]);
  2122. return ids.nextPrefixed(prefix);
  2123. }
  2124. function getRoot(businessObject) {
  2125. let parent = businessObject;
  2126. while (parent.$parent) {
  2127. parent = parent.$parent;
  2128. }
  2129. return parent;
  2130. }
  2131. function filterElementsByType(objectList, type) {
  2132. const list = objectList || [];
  2133. return list.filter(element => ModelUtil.is(element, type));
  2134. }
  2135. function findRootElementsByType(businessObject, referencedType) {
  2136. const root = getRoot(businessObject);
  2137. return filterElementsByType(root.get('rootElements'), referencedType);
  2138. }
  2139. function findRootElementById(businessObject, type, id) {
  2140. const elements = findRootElementsByType(businessObject, type);
  2141. return elements.find(element => element.id === id);
  2142. }
  2143. const EMPTY_OPTION$4 = '';
  2144. const CREATE_NEW_OPTION$4 = 'create-new';
  2145. /**
  2146. * @typedef { import('@bpmn-io/properties-panel').EntryDefinition } Entry
  2147. */
  2148. /**
  2149. * @returns {Array<Entry>} entries
  2150. */
  2151. function ErrorProps$1(props) {
  2152. const {
  2153. element
  2154. } = props;
  2155. if (!isErrorSupported(element)) {
  2156. return [];
  2157. }
  2158. const error = getError(element);
  2159. let entries = [{
  2160. id: 'errorRef',
  2161. component: ErrorRef$1,
  2162. isEdited: propertiesPanel.isSelectEntryEdited
  2163. }];
  2164. if (error) {
  2165. entries = [...entries, {
  2166. id: 'errorName',
  2167. component: ErrorName$1,
  2168. isEdited: propertiesPanel.isTextFieldEntryEdited
  2169. }, {
  2170. id: 'errorCode',
  2171. component: ErrorCode$1,
  2172. isEdited: propertiesPanel.isTextFieldEntryEdited
  2173. }];
  2174. }
  2175. return entries;
  2176. }
  2177. function ErrorRef$1(props) {
  2178. const {
  2179. element
  2180. } = props;
  2181. const bpmnFactory = useService('bpmnFactory');
  2182. const commandStack = useService('commandStack');
  2183. const translate = useService('translate');
  2184. const errorEventDefinition = getErrorEventDefinition(element);
  2185. const getValue = () => {
  2186. const error = getError(element);
  2187. if (error) {
  2188. return error.get('id');
  2189. }
  2190. return EMPTY_OPTION$4;
  2191. };
  2192. const setValue = value => {
  2193. const root = getRoot(errorEventDefinition);
  2194. const commands = [];
  2195. let error; // (1) create new error
  2196. if (value === CREATE_NEW_OPTION$4) {
  2197. error = createElement('bpmn:Error', {
  2198. name: nextId('Error_')
  2199. }, root, bpmnFactory);
  2200. value = error.get('id');
  2201. commands.push({
  2202. cmd: 'element.updateModdleProperties',
  2203. context: {
  2204. element,
  2205. moddleElement: root,
  2206. properties: {
  2207. rootElements: [...root.get('rootElements'), error]
  2208. }
  2209. }
  2210. });
  2211. } // (2) update (or remove) errorRef
  2212. error = error || findRootElementById(errorEventDefinition, 'bpmn:Error', value);
  2213. commands.push({
  2214. cmd: 'element.updateModdleProperties',
  2215. context: {
  2216. element,
  2217. moddleElement: errorEventDefinition,
  2218. properties: {
  2219. errorRef: error
  2220. }
  2221. }
  2222. }); // (3) commit all updates
  2223. return commandStack.execute('properties-panel.multi-command-executor', commands);
  2224. };
  2225. const getOptions = () => {
  2226. let options = [{
  2227. value: EMPTY_OPTION$4,
  2228. label: translate('<none>')
  2229. }, {
  2230. value: CREATE_NEW_OPTION$4,
  2231. label: translate('Create new ...')
  2232. }];
  2233. const errors = findRootElementsByType(ModelUtil.getBusinessObject(element), 'bpmn:Error');
  2234. sortByName$5(errors).forEach(error => {
  2235. options.push({
  2236. value: error.get('id'),
  2237. label: error.get('name')
  2238. });
  2239. });
  2240. return options;
  2241. };
  2242. return ReferenceSelectEntry({
  2243. element,
  2244. id: 'errorRef',
  2245. label: translate('Global error reference'),
  2246. autoFocusEntry: 'errorName',
  2247. getValue,
  2248. setValue,
  2249. getOptions
  2250. });
  2251. }
  2252. function ErrorName$1(props) {
  2253. const {
  2254. element
  2255. } = props;
  2256. const commandStack = useService('commandStack');
  2257. const translate = useService('translate');
  2258. const debounce = useService('debounceInput');
  2259. const error = getError(element);
  2260. const getValue = () => {
  2261. return error.get('name');
  2262. };
  2263. const setValue = value => {
  2264. return commandStack.execute('element.updateModdleProperties', {
  2265. element,
  2266. moddleElement: error,
  2267. properties: {
  2268. name: value
  2269. }
  2270. });
  2271. };
  2272. return propertiesPanel.TextFieldEntry({
  2273. element,
  2274. id: 'errorName',
  2275. label: translate('Name'),
  2276. getValue,
  2277. setValue,
  2278. debounce
  2279. });
  2280. }
  2281. function ErrorCode$1(props) {
  2282. const {
  2283. element
  2284. } = props;
  2285. const commandStack = useService('commandStack');
  2286. const translate = useService('translate');
  2287. const debounce = useService('debounceInput');
  2288. const error = getError(element);
  2289. const getValue = () => {
  2290. return error.get('errorCode');
  2291. };
  2292. const setValue = value => {
  2293. return commandStack.execute('element.updateModdleProperties', {
  2294. element,
  2295. moddleElement: error,
  2296. properties: {
  2297. errorCode: value
  2298. }
  2299. });
  2300. };
  2301. return propertiesPanel.TextFieldEntry({
  2302. element,
  2303. id: 'errorCode',
  2304. label: translate('Code'),
  2305. getValue,
  2306. setValue,
  2307. debounce
  2308. });
  2309. } // helper /////////////////////////
  2310. function sortByName$5(elements) {
  2311. return minDash.sortBy(elements, e => (e.name || '').toLowerCase());
  2312. }
  2313. const CREATE_NEW_OPTION$3 = 'create-new';
  2314. /**
  2315. * @typedef { import('@bpmn-io/properties-panel').EntryDefinition } Entry
  2316. */
  2317. /**
  2318. * @returns {Array<Entry>} entries
  2319. */
  2320. function EscalationProps$1(props) {
  2321. const {
  2322. element
  2323. } = props;
  2324. if (!isEscalationSupported(element)) {
  2325. return [];
  2326. }
  2327. const escalation = getEscalation(element);
  2328. let entries = [{
  2329. id: 'escalationRef',
  2330. component: EscalationRef,
  2331. isEdited: propertiesPanel.isSelectEntryEdited
  2332. }];
  2333. if (escalation) {
  2334. entries = [...entries, {
  2335. id: 'escalationName',
  2336. component: EscalationName,
  2337. isEdited: propertiesPanel.isTextFieldEntryEdited
  2338. }, {
  2339. id: 'escalationCode',
  2340. component: EscalationCode,
  2341. isEdited: propertiesPanel.isTextFieldEntryEdited
  2342. }];
  2343. }
  2344. return entries;
  2345. }
  2346. function EscalationRef(props) {
  2347. const {
  2348. element
  2349. } = props;
  2350. const bpmnFactory = useService('bpmnFactory');
  2351. const commandStack = useService('commandStack');
  2352. const translate = useService('translate');
  2353. const escalationEventDefinition = getEscalationEventDefinition(element);
  2354. const getValue = () => {
  2355. const escalation = getEscalation(element);
  2356. return escalation && escalation.get('id');
  2357. };
  2358. const setValue = value => {
  2359. const root = getRoot(escalationEventDefinition);
  2360. const commands = [];
  2361. let escalation; // (1) create new escalation
  2362. if (value === CREATE_NEW_OPTION$3) {
  2363. const id = nextId('Escalation_');
  2364. escalation = createElement('bpmn:Escalation', {
  2365. id,
  2366. name: id
  2367. }, root, bpmnFactory);
  2368. value = escalation.get('id');
  2369. commands.push({
  2370. cmd: 'element.updateModdleProperties',
  2371. context: {
  2372. element,
  2373. moddleElement: root,
  2374. properties: {
  2375. rootElements: [...root.get('rootElements'), escalation]
  2376. }
  2377. }
  2378. });
  2379. } // (2) update (or remove) escalationRef
  2380. escalation = escalation || findRootElementById(escalationEventDefinition, 'bpmn:Escalation', value);
  2381. commands.push({
  2382. cmd: 'element.updateModdleProperties',
  2383. context: {
  2384. element,
  2385. moddleElement: escalationEventDefinition,
  2386. properties: {
  2387. escalationRef: escalation
  2388. }
  2389. }
  2390. }); // (3) commit all updates
  2391. return commandStack.execute('properties-panel.multi-command-executor', commands);
  2392. };
  2393. const getOptions = () => {
  2394. let options = [{
  2395. value: '',
  2396. label: translate('<none>')
  2397. }, {
  2398. value: CREATE_NEW_OPTION$3,
  2399. label: translate('Create new ...')
  2400. }];
  2401. const escalations = findRootElementsByType(ModelUtil.getBusinessObject(element), 'bpmn:Escalation');
  2402. sortByName$4(escalations).forEach(escalation => {
  2403. options.push({
  2404. value: escalation.get('id'),
  2405. label: escalation.get('name')
  2406. });
  2407. });
  2408. return options;
  2409. };
  2410. return ReferenceSelectEntry({
  2411. element,
  2412. id: 'escalationRef',
  2413. label: translate('Global escalation reference'),
  2414. autoFocusEntry: 'escalationName',
  2415. getValue,
  2416. setValue,
  2417. getOptions
  2418. });
  2419. }
  2420. function EscalationName(props) {
  2421. const {
  2422. element
  2423. } = props;
  2424. const commandStack = useService('commandStack');
  2425. const translate = useService('translate');
  2426. const debounce = useService('debounceInput');
  2427. const escalation = getEscalation(element);
  2428. const getValue = () => {
  2429. return escalation.get('name');
  2430. };
  2431. const setValue = value => {
  2432. return commandStack.execute('element.updateModdleProperties', {
  2433. element,
  2434. moddleElement: escalation,
  2435. properties: {
  2436. name: value
  2437. }
  2438. });
  2439. };
  2440. return propertiesPanel.TextFieldEntry({
  2441. element,
  2442. id: 'escalationName',
  2443. label: translate('Name'),
  2444. getValue,
  2445. setValue,
  2446. debounce
  2447. });
  2448. }
  2449. function EscalationCode(props) {
  2450. const {
  2451. element
  2452. } = props;
  2453. const commandStack = useService('commandStack');
  2454. const translate = useService('translate');
  2455. const debounce = useService('debounceInput');
  2456. const escalation = getEscalation(element);
  2457. const getValue = () => {
  2458. return escalation.get('escalationCode');
  2459. };
  2460. const setValue = value => {
  2461. return commandStack.execute('element.updateModdleProperties', {
  2462. element,
  2463. moddleElement: escalation,
  2464. properties: {
  2465. escalationCode: value
  2466. }
  2467. });
  2468. };
  2469. return propertiesPanel.TextFieldEntry({
  2470. element,
  2471. id: 'escalationCode',
  2472. label: translate('Code'),
  2473. getValue,
  2474. setValue,
  2475. debounce
  2476. });
  2477. } // helper /////////////////////////
  2478. function sortByName$4(elements) {
  2479. return minDash.sortBy(elements, e => (e.name || '').toLowerCase());
  2480. }
  2481. /**
  2482. * @typedef { import('@bpmn-io/properties-panel').EntryDefinition } Entry
  2483. */
  2484. /**
  2485. * @returns {Array<Entry>} entries
  2486. */
  2487. function ExecutableProps(props) {
  2488. const {
  2489. element
  2490. } = props;
  2491. if (!ModelUtil.is(element, 'bpmn:Process') && !hasProcessRef$1(element)) {
  2492. return [];
  2493. }
  2494. return [{
  2495. id: 'isExecutable',
  2496. component: Executable,
  2497. isEdited: propertiesPanel.isCheckboxEntryEdited
  2498. }];
  2499. }
  2500. function Executable(props) {
  2501. const {
  2502. element
  2503. } = props;
  2504. const modeling = useService('modeling');
  2505. const commandStack = useService('commandStack');
  2506. const translate = useService('translate');
  2507. let getValue, setValue;
  2508. setValue = value => {
  2509. modeling.updateProperties(element, {
  2510. isExecutable: value
  2511. });
  2512. };
  2513. getValue = element => {
  2514. return element.businessObject.isExecutable;
  2515. }; // handle properties on processRef level for participants
  2516. if (ModelUtil.is(element, 'bpmn:Participant')) {
  2517. const process = element.businessObject.get('processRef');
  2518. setValue = value => {
  2519. commandStack.execute('element.updateModdleProperties', {
  2520. element,
  2521. moddleElement: process,
  2522. properties: {
  2523. isExecutable: value
  2524. }
  2525. });
  2526. };
  2527. getValue = () => {
  2528. return process.get('isExecutable');
  2529. };
  2530. }
  2531. return propertiesPanel.CheckboxEntry({
  2532. element,
  2533. id: 'isExecutable',
  2534. label: translate('Executable'),
  2535. getValue,
  2536. setValue
  2537. });
  2538. } // helper /////////////////////
  2539. function hasProcessRef$1(element) {
  2540. return ModelUtil.is(element, 'bpmn:Participant') && element.businessObject.get('processRef');
  2541. }
  2542. const SPACE_REGEX = /\s/; // for QName validation as per http://www.w3.org/TR/REC-xml/#NT-NameChar
  2543. const QNAME_REGEX = /^([a-z][\w-.]*:)?[a-z_][\w-.]*$/i; // for ID validation as per BPMN Schema (QName - Namespace)
  2544. const ID_REGEX = /^[a-z_][\w-.]*$/i;
  2545. /**
  2546. * checks whether the id value is valid
  2547. *
  2548. * @param {ModdleElement} element
  2549. * @param {String} idValue
  2550. * @param {Function} translate
  2551. *
  2552. * @return {String} error message
  2553. */
  2554. function isIdValid(element, idValue, translate) {
  2555. const assigned = element.$model.ids.assigned(idValue);
  2556. const idAlreadyExists = assigned && assigned !== element;
  2557. if (!idValue) {
  2558. return translate('ID must not be empty.');
  2559. }
  2560. if (idAlreadyExists) {
  2561. return translate('ID must be unique.');
  2562. }
  2563. return validateId(idValue, translate);
  2564. }
  2565. function validateId(idValue, translate) {
  2566. if (containsSpace(idValue)) {
  2567. return translate('ID must not contain spaces.');
  2568. }
  2569. if (!ID_REGEX.test(idValue)) {
  2570. if (QNAME_REGEX.test(idValue)) {
  2571. return translate('ID must not contain prefix.');
  2572. }
  2573. return translate('ID must be a valid QName.');
  2574. }
  2575. }
  2576. function containsSpace(value) {
  2577. return SPACE_REGEX.test(value);
  2578. }
  2579. /**
  2580. * @typedef { import('@bpmn-io/properties-panel').EntryDefinition } Entry
  2581. */
  2582. /**
  2583. * @returns {Array<Entry>} entries
  2584. */
  2585. function IdProps() {
  2586. return [{
  2587. id: 'id',
  2588. component: Id$3,
  2589. isEdited: propertiesPanel.isTextFieldEntryEdited
  2590. }];
  2591. }
  2592. function Id$3(props) {
  2593. const {
  2594. element
  2595. } = props;
  2596. const modeling = useService('modeling');
  2597. const debounce = useService('debounceInput');
  2598. const translate = useService('translate');
  2599. const setValue = value => {
  2600. modeling.updateProperties(element, {
  2601. id: value
  2602. });
  2603. };
  2604. const getValue = element => {
  2605. return element.businessObject.id;
  2606. };
  2607. const validate = value => {
  2608. const businessObject = ModelUtil.getBusinessObject(element);
  2609. return isIdValid(businessObject, value, translate);
  2610. };
  2611. return propertiesPanel.TextFieldEntry({
  2612. element,
  2613. id: 'id',
  2614. label: translate(ModelUtil.is(element, 'bpmn:Participant') ? 'Participant ID' : 'ID'),
  2615. getValue,
  2616. setValue,
  2617. debounce,
  2618. validate
  2619. });
  2620. }
  2621. /**
  2622. * @typedef { import('@bpmn-io/properties-panel').EntryDefinition } Entry
  2623. */
  2624. /**
  2625. * @returns {Array<Entry>} entries
  2626. */
  2627. function LinkProps(props) {
  2628. const {
  2629. element
  2630. } = props;
  2631. if (!isLinkSupported(element)) {
  2632. return [];
  2633. }
  2634. return [{
  2635. id: 'linkName',
  2636. component: LinkName,
  2637. isEdited: propertiesPanel.isTextFieldEntryEdited
  2638. }];
  2639. }
  2640. function LinkName(props) {
  2641. const {
  2642. element
  2643. } = props;
  2644. const commandStack = useService('commandStack');
  2645. const translate = useService('translate');
  2646. const debounce = useService('debounceInput');
  2647. const linkEventDefinition = getLinkEventDefinition(element);
  2648. const getValue = () => {
  2649. return linkEventDefinition.get('name');
  2650. };
  2651. const setValue = value => {
  2652. commandStack.execute('element.updateModdleProperties', {
  2653. element,
  2654. moddleElement: linkEventDefinition,
  2655. properties: {
  2656. name: value
  2657. }
  2658. });
  2659. };
  2660. return propertiesPanel.TextFieldEntry({
  2661. element,
  2662. id: 'linkName',
  2663. label: translate('Name'),
  2664. getValue,
  2665. setValue,
  2666. debounce
  2667. });
  2668. }
  2669. const EMPTY_OPTION$3 = '';
  2670. const CREATE_NEW_OPTION$2 = 'create-new';
  2671. /**
  2672. * @typedef { import('@bpmn-io/properties-panel').EntryDefinition } Entry
  2673. */
  2674. /**
  2675. * @returns {Array<Entry>} entries
  2676. */
  2677. function MessageProps$1(props) {
  2678. const {
  2679. element
  2680. } = props;
  2681. if (!isMessageSupported(element)) {
  2682. return [];
  2683. }
  2684. const message = getMessage(element);
  2685. let entries = [{
  2686. id: 'messageRef',
  2687. component: MessageRef,
  2688. isEdited: propertiesPanel.isSelectEntryEdited
  2689. }];
  2690. if (message) {
  2691. entries = [...entries, {
  2692. id: 'messageName',
  2693. component: MessageName$1,
  2694. isEdited: propertiesPanel.isTextFieldEntryEdited
  2695. }];
  2696. }
  2697. return entries;
  2698. }
  2699. function MessageRef(props) {
  2700. const {
  2701. element
  2702. } = props;
  2703. const bpmnFactory = useService('bpmnFactory');
  2704. const commandStack = useService('commandStack');
  2705. const translate = useService('translate');
  2706. const messageEventDefinition = getMessageEventDefinition(element);
  2707. const getValue = () => {
  2708. const message = getMessage(element);
  2709. if (message) {
  2710. return message.get('id');
  2711. }
  2712. return EMPTY_OPTION$3;
  2713. };
  2714. const setValue = value => {
  2715. const root = getRoot(messageEventDefinition);
  2716. const commands = [];
  2717. let message; // (1) create new message
  2718. if (value === CREATE_NEW_OPTION$2) {
  2719. const id = nextId('Message_');
  2720. message = createElement('bpmn:Message', {
  2721. id,
  2722. name: id
  2723. }, root, bpmnFactory);
  2724. value = message.get('id');
  2725. commands.push({
  2726. cmd: 'element.updateModdleProperties',
  2727. context: {
  2728. element,
  2729. moddleElement: root,
  2730. properties: {
  2731. rootElements: [...root.get('rootElements'), message]
  2732. }
  2733. }
  2734. });
  2735. } // (2) update (or remove) messageRef
  2736. message = message || findRootElementById(messageEventDefinition, 'bpmn:Message', value);
  2737. commands.push({
  2738. cmd: 'element.updateModdleProperties',
  2739. context: {
  2740. element,
  2741. moddleElement: messageEventDefinition,
  2742. properties: {
  2743. messageRef: message
  2744. }
  2745. }
  2746. }); // (3) commit all updates
  2747. return commandStack.execute('properties-panel.multi-command-executor', commands);
  2748. };
  2749. const getOptions = () => {
  2750. let options = [{
  2751. value: EMPTY_OPTION$3,
  2752. label: translate('<none>')
  2753. }, {
  2754. value: CREATE_NEW_OPTION$2,
  2755. label: translate('Create new ...')
  2756. }];
  2757. const messages = findRootElementsByType(ModelUtil.getBusinessObject(element), 'bpmn:Message');
  2758. sortByName$3(messages).forEach(message => {
  2759. options.push({
  2760. value: message.get('id'),
  2761. label: message.get('name')
  2762. });
  2763. });
  2764. return options;
  2765. };
  2766. return ReferenceSelectEntry({
  2767. element,
  2768. id: 'messageRef',
  2769. label: translate('Global message reference'),
  2770. autoFocusEntry: 'messageName',
  2771. getValue,
  2772. setValue,
  2773. getOptions
  2774. });
  2775. }
  2776. function MessageName$1(props) {
  2777. const {
  2778. element
  2779. } = props;
  2780. const commandStack = useService('commandStack');
  2781. const translate = useService('translate');
  2782. const debounce = useService('debounceInput');
  2783. const message = getMessage(element);
  2784. const getValue = () => {
  2785. return message.get('name');
  2786. };
  2787. const setValue = value => {
  2788. return commandStack.execute('element.updateModdleProperties', {
  2789. element,
  2790. moddleElement: message,
  2791. properties: {
  2792. name: value
  2793. }
  2794. });
  2795. };
  2796. return propertiesPanel.TextFieldEntry({
  2797. element,
  2798. id: 'messageName',
  2799. label: translate('Name'),
  2800. getValue,
  2801. setValue,
  2802. debounce
  2803. });
  2804. } // helper /////////////////////////
  2805. function sortByName$3(elements) {
  2806. return minDash.sortBy(elements, e => (e.name || '').toLowerCase());
  2807. }
  2808. /**
  2809. * @typedef { import('@bpmn-io/properties-panel').EntryDefinition } Entry
  2810. */
  2811. /**
  2812. * @returns {Array<Entry>} entries
  2813. */
  2814. function MultiInstanceProps$2(props) {
  2815. const {
  2816. element
  2817. } = props;
  2818. if (!isMultiInstanceSupported$1(element)) {
  2819. return [];
  2820. }
  2821. const entries = [{
  2822. id: 'loopCardinality',
  2823. component: LoopCardinality,
  2824. isEdited: propertiesPanel.isTextFieldEntryEdited
  2825. }, {
  2826. id: 'completionCondition',
  2827. component: CompletionCondition$1,
  2828. isEdited: propertiesPanel.isTextFieldEntryEdited
  2829. }];
  2830. return entries;
  2831. }
  2832. function LoopCardinality(props) {
  2833. const {
  2834. element
  2835. } = props;
  2836. const bpmnFactory = useService('bpmnFactory');
  2837. const debounce = useService('debounceInput');
  2838. const commandStack = useService('commandStack');
  2839. const translate = useService('translate');
  2840. const getValue = () => {
  2841. return getLoopCardinalityValue(element);
  2842. };
  2843. const setValue = value => {
  2844. return commandStack.execute('element.updateModdleProperties', updateFormalExpression(element, 'loopCardinality', value, bpmnFactory));
  2845. };
  2846. return propertiesPanel.TextFieldEntry({
  2847. element,
  2848. id: 'loopCardinality',
  2849. label: translate('Loop cardinality'),
  2850. getValue,
  2851. setValue,
  2852. debounce
  2853. });
  2854. }
  2855. function CompletionCondition$1(props) {
  2856. const {
  2857. element
  2858. } = props;
  2859. const bpmnFactory = useService('bpmnFactory');
  2860. const debounce = useService('debounceInput');
  2861. const commandStack = useService('commandStack');
  2862. const translate = useService('translate');
  2863. const getValue = () => {
  2864. return getCompletionConditionValue(element);
  2865. };
  2866. const setValue = value => {
  2867. return commandStack.execute('element.updateModdleProperties', updateFormalExpression(element, 'completionCondition', value, bpmnFactory));
  2868. };
  2869. return propertiesPanel.TextFieldEntry({
  2870. element,
  2871. id: 'completionCondition',
  2872. label: translate('Completion condition'),
  2873. getValue,
  2874. setValue,
  2875. debounce
  2876. });
  2877. } // helper ////////////////////////////
  2878. // generic ///////////////////////////
  2879. /**
  2880. * isMultiInstanceSupported - check whether given element supports MultiInstanceLoopCharacteristics.
  2881. *
  2882. * @param {djs.model.Base} element
  2883. * @return {boolean}
  2884. */
  2885. function isMultiInstanceSupported$1(element) {
  2886. const loopCharacteristics = getLoopCharacteristics$2(element);
  2887. return !!loopCharacteristics && ModelUtil.is(loopCharacteristics, 'bpmn:MultiInstanceLoopCharacteristics');
  2888. }
  2889. /**
  2890. * getBody - get the body of a given expression.
  2891. *
  2892. * @param {ModdleElement<bpmn:FormalExpression>} expression
  2893. * @return {string} the body (value) of the expression
  2894. */
  2895. function getBody(expression) {
  2896. return expression && expression.get('body');
  2897. }
  2898. /**
  2899. * getProperty - get a property value of the loop characteristics.
  2900. *
  2901. * @param {djs.model.Base} element
  2902. * @param {string} propertyName
  2903. *
  2904. * @return {any} the property value
  2905. */
  2906. function getProperty$2(element, propertyName) {
  2907. const loopCharacteristics = getLoopCharacteristics$2(element);
  2908. return loopCharacteristics && loopCharacteristics.get(propertyName);
  2909. }
  2910. /**
  2911. * getLoopCharacteristics - get loopCharacteristics of a given element.
  2912. *
  2913. * @param {djs.model.Base} element
  2914. * @return {ModdleElement<bpmn:MultiInstanceLoopCharacteristics> | undefined}
  2915. */
  2916. function getLoopCharacteristics$2(element) {
  2917. const bo = ModelUtil.getBusinessObject(element);
  2918. return bo.loopCharacteristics;
  2919. }
  2920. /**
  2921. * createFormalExpression - creates a 'bpmn:FormalExpression' element.
  2922. *
  2923. * @param {ModdleElement} parent
  2924. * @param {string} body
  2925. * @param {BpmnFactory} bpmnFactory
  2926. *
  2927. * @result {ModdleElement<bpmn:FormalExpression>} a formal expression
  2928. */
  2929. function createFormalExpression$1(parent, body, bpmnFactory) {
  2930. return createElement('bpmn:FormalExpression', {
  2931. body: body
  2932. }, parent, bpmnFactory);
  2933. }
  2934. /**
  2935. * updateFormalExpression - updates a specific formal expression of the loop characteristics.
  2936. *
  2937. * @param {djs.model.Base} element
  2938. * @param {string} propertyName
  2939. * @param {string} newValue
  2940. * @param {BpmnFactory} bpmnFactory
  2941. */
  2942. function updateFormalExpression(element, propertyName, newValue, bpmnFactory) {
  2943. const loopCharacteristics = getLoopCharacteristics$2(element);
  2944. const expressionProps = {};
  2945. if (!newValue) {
  2946. // remove formal expression
  2947. expressionProps[propertyName] = undefined;
  2948. return {
  2949. element,
  2950. moddleElement: loopCharacteristics,
  2951. properties: expressionProps
  2952. };
  2953. }
  2954. const existingExpression = loopCharacteristics.get(propertyName);
  2955. if (!existingExpression) {
  2956. // add formal expression
  2957. expressionProps[propertyName] = createFormalExpression$1(loopCharacteristics, newValue, bpmnFactory);
  2958. return {
  2959. element,
  2960. moddleElement: loopCharacteristics,
  2961. properties: expressionProps
  2962. };
  2963. } // edit existing formal expression
  2964. return {
  2965. element,
  2966. moddleElement: existingExpression,
  2967. properties: {
  2968. body: newValue
  2969. }
  2970. };
  2971. } // loopCardinality
  2972. /**
  2973. * getLoopCardinality - get the loop cardinality of the loop characteristics.
  2974. *
  2975. * @param {djs.model.Base} element
  2976. *
  2977. * @return {ModdleElement<bpmn:FormalExpression>} an expression representing the loop cardinality
  2978. */
  2979. function getLoopCardinality(element) {
  2980. return getProperty$2(element, 'loopCardinality');
  2981. }
  2982. /**
  2983. * getLoopCardinalityValue - get the loop cardinality value of the loop characteristics.
  2984. *
  2985. * @param {djs.model.Base} element
  2986. *
  2987. * @return {string} the loop cardinality value
  2988. */
  2989. function getLoopCardinalityValue(element) {
  2990. const loopCardinality = getLoopCardinality(element);
  2991. return getBody(loopCardinality);
  2992. } // completionCondition /////////////////////
  2993. /**
  2994. * getCompletionCondition - get the completion condition of the loop characteristics.
  2995. *
  2996. * @param {djs.model.Base} element
  2997. *
  2998. * @return {ModdleElement<bpmn:FormalExpression>} an expression representing the completion condition
  2999. */
  3000. function getCompletionCondition$1(element) {
  3001. return getProperty$2(element, 'completionCondition');
  3002. }
  3003. /**
  3004. * getCompletionConditionValue - get the completion condition value of the loop characteristics.
  3005. *
  3006. * @param {djs.model.Base} element
  3007. *
  3008. * @return {string} the completion condition value
  3009. */
  3010. function getCompletionConditionValue(element) {
  3011. const completionCondition = getCompletionCondition$1(element);
  3012. return getBody(completionCondition);
  3013. }
  3014. /**
  3015. * @typedef { import('@bpmn-io/properties-panel').EntryDefinition } Entry
  3016. */
  3017. /**
  3018. * @returns {Array<Entry>} entries
  3019. */
  3020. function NameProps(props) {
  3021. const {
  3022. element
  3023. } = props;
  3024. if (ModelingUtil.isAny(element, ['bpmn:Collaboration', 'bpmn:DataAssociation', 'bpmn:Association'])) {
  3025. return [];
  3026. }
  3027. return [{
  3028. id: 'name',
  3029. component: Name$3,
  3030. isEdited: propertiesPanel.isTextFieldEntryEdited
  3031. }];
  3032. }
  3033. function Name$3(props) {
  3034. const {
  3035. element
  3036. } = props;
  3037. const modeling = useService('modeling');
  3038. const debounce = useService('debounceInput');
  3039. const canvas = useService('canvas');
  3040. const bpmnFactory = useService('bpmnFactory');
  3041. const translate = useService('translate'); // (1) default: name
  3042. let options = {
  3043. element,
  3044. id: 'name',
  3045. label: translate('Name'),
  3046. debounce,
  3047. setValue: value => {
  3048. modeling.updateProperties(element, {
  3049. name: value
  3050. });
  3051. },
  3052. getValue: element => {
  3053. return element.businessObject.name;
  3054. }
  3055. }; // (2) text annotations
  3056. if (ModelUtil.is(element, 'bpmn:TextAnnotation')) {
  3057. options = { ...options,
  3058. setValue: value => {
  3059. modeling.updateProperties(element, {
  3060. text: value
  3061. });
  3062. },
  3063. getValue: element => {
  3064. return element.businessObject.text;
  3065. }
  3066. };
  3067. } // (3) groups
  3068. else if (ModelUtil.is(element, 'bpmn:Group')) {
  3069. options = { ...options,
  3070. setValue: value => {
  3071. const businessObject = ModelUtil.getBusinessObject(element),
  3072. categoryValueRef = businessObject.categoryValueRef;
  3073. if (!categoryValueRef) {
  3074. initializeCategory(businessObject, canvas.getRootElement(), bpmnFactory);
  3075. }
  3076. modeling.updateLabel(element, value);
  3077. },
  3078. getValue: element => {
  3079. const businessObject = ModelUtil.getBusinessObject(element),
  3080. categoryValueRef = businessObject.categoryValueRef;
  3081. return categoryValueRef && categoryValueRef.value;
  3082. }
  3083. };
  3084. } // (4) participants (only update label)
  3085. else if (ModelUtil.is(element, 'bpmn:Participant')) {
  3086. options.label = translate('Participant Name');
  3087. }
  3088. return propertiesPanel.TextFieldEntry(options);
  3089. } // helpers ////////////////////////
  3090. function initializeCategory(businessObject, rootElement, bpmnFactory) {
  3091. const definitions = ModelUtil.getBusinessObject(rootElement).$parent;
  3092. const categoryValue = createCategoryValue(definitions, bpmnFactory);
  3093. businessObject.categoryValueRef = categoryValue;
  3094. }
  3095. function createCategoryValue(definitions, bpmnFactory) {
  3096. const categoryValue = bpmnFactory.create('bpmn:CategoryValue');
  3097. const category = bpmnFactory.create('bpmn:Category', {
  3098. categoryValue: [categoryValue]
  3099. }); // add to correct place
  3100. Collections.add(definitions.get('rootElements'), category);
  3101. ModelUtil.getBusinessObject(category).$parent = definitions;
  3102. ModelUtil.getBusinessObject(categoryValue).$parent = category;
  3103. return categoryValue;
  3104. }
  3105. /**
  3106. * @typedef { import('@bpmn-io/properties-panel').EntryDefinition } Entry
  3107. */
  3108. /**
  3109. * @returns {Array<Entry>} entries
  3110. */
  3111. function ProcessProps(props) {
  3112. const {
  3113. element
  3114. } = props;
  3115. if (!hasProcessRef(element)) {
  3116. return [];
  3117. }
  3118. return [{
  3119. id: 'processId',
  3120. component: ProcessId,
  3121. isEdited: propertiesPanel.isTextFieldEntryEdited
  3122. }, {
  3123. id: 'processName',
  3124. component: ProcessName,
  3125. isEdited: propertiesPanel.isTextFieldEntryEdited
  3126. }];
  3127. }
  3128. function ProcessName(props) {
  3129. const {
  3130. element
  3131. } = props;
  3132. const commandStack = useService('commandStack');
  3133. const translate = useService('translate');
  3134. const debounce = useService('debounceInput');
  3135. const process = element.businessObject.get('processRef');
  3136. const getValue = () => {
  3137. return process.get('name');
  3138. };
  3139. const setValue = value => {
  3140. commandStack.execute('element.updateModdleProperties', {
  3141. element,
  3142. moddleElement: process,
  3143. properties: {
  3144. name: value
  3145. }
  3146. });
  3147. };
  3148. return propertiesPanel.TextFieldEntry({
  3149. element,
  3150. id: 'processName',
  3151. label: translate('Process name'),
  3152. getValue,
  3153. setValue,
  3154. debounce
  3155. });
  3156. }
  3157. function ProcessId(props) {
  3158. const {
  3159. element
  3160. } = props;
  3161. const commandStack = useService('commandStack');
  3162. const translate = useService('translate');
  3163. const debounce = useService('debounceInput');
  3164. const process = element.businessObject.get('processRef');
  3165. const getValue = () => {
  3166. return process.get('id');
  3167. };
  3168. const setValue = value => {
  3169. commandStack.execute('element.updateModdleProperties', {
  3170. element,
  3171. moddleElement: process,
  3172. properties: {
  3173. id: value
  3174. }
  3175. });
  3176. };
  3177. const validate = value => {
  3178. return isIdValid(process, value, translate);
  3179. };
  3180. return propertiesPanel.TextFieldEntry({
  3181. element,
  3182. id: 'processId',
  3183. label: translate('Process ID'),
  3184. getValue,
  3185. setValue,
  3186. debounce,
  3187. validate
  3188. });
  3189. } // helper ////////////////
  3190. function hasProcessRef(element) {
  3191. return ModelUtil.is(element, 'bpmn:Participant') && element.businessObject.get('processRef');
  3192. }
  3193. const EMPTY_OPTION$2 = '';
  3194. const CREATE_NEW_OPTION$1 = 'create-new';
  3195. /**
  3196. * @typedef { import('@bpmn-io/properties-panel').EntryDefinition } Entry
  3197. */
  3198. /**
  3199. * @returns {Array<Entry>} entries
  3200. */
  3201. function SignalProps(props) {
  3202. const {
  3203. element
  3204. } = props;
  3205. if (!isSignalSupported(element)) {
  3206. return [];
  3207. }
  3208. const signal = getSignal(element);
  3209. let entries = [{
  3210. id: 'signalRef',
  3211. component: SignalRef,
  3212. isEdited: propertiesPanel.isSelectEntryEdited
  3213. }];
  3214. if (signal) {
  3215. entries = [...entries, {
  3216. id: 'signalName',
  3217. component: SignalName,
  3218. isEdited: propertiesPanel.isTextFieldEntryEdited
  3219. }];
  3220. }
  3221. return entries;
  3222. }
  3223. function SignalRef(props) {
  3224. const {
  3225. element
  3226. } = props;
  3227. const bpmnFactory = useService('bpmnFactory');
  3228. const commandStack = useService('commandStack');
  3229. const translate = useService('translate');
  3230. const signalEventDefinition = getSignalEventDefinition(element);
  3231. const getValue = () => {
  3232. const signal = getSignal(element);
  3233. if (signal) {
  3234. return signal.get('id');
  3235. }
  3236. return EMPTY_OPTION$2;
  3237. };
  3238. const setValue = value => {
  3239. const root = getRoot(signalEventDefinition);
  3240. const commands = [];
  3241. let signal; // (1) create new signal
  3242. if (value === CREATE_NEW_OPTION$1) {
  3243. const id = nextId('Signal_');
  3244. signal = createElement('bpmn:Signal', {
  3245. id,
  3246. name: id
  3247. }, root, bpmnFactory);
  3248. value = signal.get('id');
  3249. commands.push({
  3250. cmd: 'element.updateModdleProperties',
  3251. context: {
  3252. element,
  3253. moddleElement: root,
  3254. properties: {
  3255. rootElements: [...root.get('rootElements'), signal]
  3256. }
  3257. }
  3258. });
  3259. } // (2) update (or remove) signalRef
  3260. signal = signal || findRootElementById(signalEventDefinition, 'bpmn:Signal', value);
  3261. commands.push({
  3262. cmd: 'element.updateModdleProperties',
  3263. context: {
  3264. element,
  3265. moddleElement: signalEventDefinition,
  3266. properties: {
  3267. signalRef: signal
  3268. }
  3269. }
  3270. }); // (3) commit all updates
  3271. return commandStack.execute('properties-panel.multi-command-executor', commands);
  3272. };
  3273. const getOptions = () => {
  3274. let options = [{
  3275. value: EMPTY_OPTION$2,
  3276. label: translate('<none>')
  3277. }, {
  3278. value: CREATE_NEW_OPTION$1,
  3279. label: translate('Create new ...')
  3280. }];
  3281. const signals = findRootElementsByType(ModelUtil.getBusinessObject(element), 'bpmn:Signal');
  3282. sortByName$2(signals).forEach(signal => {
  3283. options.push({
  3284. value: signal.get('id'),
  3285. label: signal.get('name')
  3286. });
  3287. });
  3288. return options;
  3289. };
  3290. return ReferenceSelectEntry({
  3291. element,
  3292. id: 'signalRef',
  3293. label: translate('Global signal reference'),
  3294. autoFocusEntry: 'signalName',
  3295. getValue,
  3296. setValue,
  3297. getOptions
  3298. });
  3299. }
  3300. function SignalName(props) {
  3301. const {
  3302. element
  3303. } = props;
  3304. const commandStack = useService('commandStack');
  3305. const translate = useService('translate');
  3306. const debounce = useService('debounceInput');
  3307. const signal = getSignal(element);
  3308. const getValue = () => {
  3309. return signal.get('name');
  3310. };
  3311. const setValue = value => {
  3312. return commandStack.execute('element.updateModdleProperties', {
  3313. element,
  3314. moddleElement: signal,
  3315. properties: {
  3316. name: value
  3317. }
  3318. });
  3319. };
  3320. return propertiesPanel.TextFieldEntry({
  3321. element,
  3322. id: 'signalName',
  3323. label: translate('Name'),
  3324. getValue,
  3325. setValue,
  3326. debounce
  3327. });
  3328. } // helper /////////////////////////
  3329. function sortByName$2(elements) {
  3330. return minDash.sortBy(elements, e => (e.name || '').toLowerCase());
  3331. }
  3332. function TimerProps$1(props) {
  3333. const {
  3334. element,
  3335. listener,
  3336. idPrefix
  3337. } = props;
  3338. let {
  3339. timerEventDefinition
  3340. } = props;
  3341. if (!timerEventDefinition) {
  3342. const businessObject = ModelUtil.getBusinessObject(element);
  3343. timerEventDefinition = getTimerEventDefinition(businessObject);
  3344. }
  3345. const timerEventDefinitionType = getTimerDefinitionType(timerEventDefinition); // (1) Only show for supported elements
  3346. if (!isTimerSupported(element) && !isTimerSupportedOnListener(listener)) {
  3347. return [];
  3348. } // (2) Provide entries, have a value only if selection was made
  3349. const entries = [];
  3350. entries.push({
  3351. id: getId(idPrefix, 'timerEventDefinitionType'),
  3352. component: TimerEventDefinitionType$1,
  3353. isEdited: propertiesPanel.isSelectEntryEdited,
  3354. timerEventDefinition,
  3355. timerEventDefinitionType
  3356. });
  3357. if (timerEventDefinitionType) {
  3358. entries.push({
  3359. id: getId(idPrefix, 'timerEventDefinitionValue'),
  3360. component: TimerEventDefinitionValue$1,
  3361. isEdited: propertiesPanel.isTextFieldEntryEdited,
  3362. timerEventDefinition,
  3363. timerEventDefinitionType
  3364. });
  3365. }
  3366. return entries;
  3367. }
  3368. /**
  3369. * TimerEventDefinitionType - Generic select entry allowing to select a specific
  3370. * timerEventDefintionType. To be used together with timerEventDefinitionValue.
  3371. *
  3372. * @param {type} props
  3373. * @return {SelectEntry}
  3374. */
  3375. function TimerEventDefinitionType$1(props) {
  3376. const {
  3377. element,
  3378. timerEventDefinition,
  3379. timerEventDefinitionType
  3380. } = props;
  3381. const commandStack = useService('commandStack'),
  3382. bpmnFactory = useService('bpmnFactory'),
  3383. translate = useService('translate');
  3384. const getValue = () => {
  3385. return timerEventDefinitionType || '';
  3386. };
  3387. const setValue = value => {
  3388. // (1) Check if value is different to current type
  3389. if (value === timerEventDefinitionType) {
  3390. return;
  3391. } // (2) Create empty formalExpression element
  3392. const formalExpression = bpmnFactory.create('bpmn:FormalExpression', {
  3393. body: undefined
  3394. });
  3395. formalExpression.$parent = timerEventDefinition; // (3) Set the value for selected timerEventDefinitionType
  3396. const newProps = {
  3397. timeDuration: undefined,
  3398. timeDate: undefined,
  3399. timeCycle: undefined
  3400. };
  3401. if (value !== '') {
  3402. newProps[value] = formalExpression;
  3403. } // (4) Execute businessObject update
  3404. commandStack.execute('element.updateModdleProperties', {
  3405. element,
  3406. moddleElement: timerEventDefinition,
  3407. properties: newProps
  3408. });
  3409. };
  3410. const getOptions = element => {
  3411. return [{
  3412. value: '',
  3413. label: translate('<none>')
  3414. }, {
  3415. value: 'timeDate',
  3416. label: translate('Date')
  3417. }, {
  3418. value: 'timeDuration',
  3419. label: translate('Duration')
  3420. }, {
  3421. value: 'timeCycle',
  3422. label: translate('Cycle')
  3423. }];
  3424. };
  3425. return propertiesPanel.SelectEntry({
  3426. element,
  3427. id: 'timerEventDefinitionType',
  3428. label: translate('Type'),
  3429. getValue,
  3430. setValue,
  3431. getOptions
  3432. });
  3433. }
  3434. /**
  3435. * TimerEventDefinitionValue - Generic textField entry allowing to specify the
  3436. * timerEventDefintionValue based on the set timerEventDefintionType. To be used
  3437. * together with timerEventDefinitionType.
  3438. *
  3439. * @param {type} props
  3440. * @return {TextFieldEntry}
  3441. */
  3442. function TimerEventDefinitionValue$1(props) {
  3443. const {
  3444. element,
  3445. timerEventDefinition,
  3446. timerEventDefinitionType
  3447. } = props;
  3448. const commandStack = useService('commandStack'),
  3449. translate = useService('translate'),
  3450. debounce = useService('debounceInput');
  3451. const timerEventFormalExpression = timerEventDefinition.get(timerEventDefinitionType);
  3452. const getValue = () => {
  3453. return timerEventFormalExpression && timerEventFormalExpression.get('body');
  3454. };
  3455. const setValue = value => {
  3456. commandStack.execute('element.updateModdleProperties', {
  3457. element,
  3458. moddleElement: timerEventFormalExpression,
  3459. properties: {
  3460. body: value
  3461. }
  3462. });
  3463. };
  3464. return propertiesPanel.TextFieldEntry({
  3465. element,
  3466. id: 'timerEventDefinitionValue',
  3467. label: translate('Value'),
  3468. getValue,
  3469. setValue,
  3470. debounce,
  3471. description: getTimerEventDefinitionValueDescription$1(timerEventDefinitionType, translate)
  3472. });
  3473. } // helper //////////////////////////
  3474. function getTimerEventDefinitionValueDescription$1(timerDefinitionType, translate) {
  3475. switch (timerDefinitionType) {
  3476. case 'timeDate':
  3477. return jsxRuntime.jsxs("div", {
  3478. children: [jsxRuntime.jsx("p", {
  3479. children: translate('A specific point in time defined as ISO 8601 combined date and time representation.')
  3480. }), jsxRuntime.jsxs("ul", {
  3481. children: [jsxRuntime.jsxs("li", {
  3482. children: [jsxRuntime.jsx("code", {
  3483. children: "2019-10-01T12:00:00Z"
  3484. }), " - ", translate('UTC time')]
  3485. }), jsxRuntime.jsxs("li", {
  3486. children: [jsxRuntime.jsx("code", {
  3487. children: "2019-10-02T08:09:40+02:00"
  3488. }), " - ", translate('UTC plus 2 hours zone offset')]
  3489. })]
  3490. }), jsxRuntime.jsx("a", {
  3491. href: "https://docs.camunda.org/manual/latest/reference/bpmn20/events/timer-events/#time-date",
  3492. target: "_blank",
  3493. rel: "noopener",
  3494. children: translate('Documentation: Timer events')
  3495. })]
  3496. });
  3497. case 'timeCycle':
  3498. return jsxRuntime.jsxs("div", {
  3499. children: [jsxRuntime.jsx("p", {
  3500. children: translate('A cycle defined as ISO 8601 repeating intervals format.')
  3501. }), jsxRuntime.jsxs("ul", {
  3502. children: [jsxRuntime.jsxs("li", {
  3503. children: [jsxRuntime.jsx("code", {
  3504. children: "R5/PT10S"
  3505. }), " - ", translate('every 10 seconds, up to 5 times')]
  3506. }), jsxRuntime.jsxs("li", {
  3507. children: [jsxRuntime.jsx("code", {
  3508. children: "R/P1D"
  3509. }), " - ", translate('every day, infinitely')]
  3510. })]
  3511. }), jsxRuntime.jsx("a", {
  3512. href: "https://docs.camunda.org/manual/latest/reference/bpmn20/events/timer-events/#time-cycle",
  3513. target: "_blank",
  3514. rel: "noopener",
  3515. children: translate('Documentation: Timer events')
  3516. })]
  3517. });
  3518. case 'timeDuration':
  3519. return jsxRuntime.jsxs("div", {
  3520. children: [jsxRuntime.jsx("p", {
  3521. children: translate('A time duration defined as ISO 8601 durations format.')
  3522. }), jsxRuntime.jsxs("ul", {
  3523. children: [jsxRuntime.jsxs("li", {
  3524. children: [jsxRuntime.jsx("code", {
  3525. children: "PT15S"
  3526. }), " - ", translate('15 seconds')]
  3527. }), jsxRuntime.jsxs("li", {
  3528. children: [jsxRuntime.jsx("code", {
  3529. children: "PT1H30M"
  3530. }), " - ", translate('1 hour and 30 minutes')]
  3531. }), jsxRuntime.jsxs("li", {
  3532. children: [jsxRuntime.jsx("code", {
  3533. children: "P14D"
  3534. }), " - ", translate('14 days')]
  3535. })]
  3536. }), jsxRuntime.jsx("a", {
  3537. href: "https://docs.camunda.org/manual/latest/reference/bpmn20/events/timer-events/#time-duration",
  3538. target: "_blank",
  3539. rel: "noopener",
  3540. children: translate('Documentation: Timer events')
  3541. })]
  3542. });
  3543. }
  3544. }
  3545. function isTimerSupportedOnListener(listener) {
  3546. return listener && ModelUtil.is(listener, 'camunda:TaskListener') && getTimerEventDefinition(listener);
  3547. }
  3548. function getId(idPrefix, id) {
  3549. return idPrefix ? idPrefix + id : id;
  3550. }
  3551. function GeneralGroup(element) {
  3552. const entries = [...NameProps({
  3553. element
  3554. }), ...IdProps(), ...ProcessProps({
  3555. element
  3556. }), ...ExecutableProps({
  3557. element
  3558. })];
  3559. return {
  3560. id: 'general',
  3561. label: 'General',
  3562. entries,
  3563. component: propertiesPanel.Group
  3564. };
  3565. }
  3566. function CompensationGroup(element) {
  3567. const group = {
  3568. label: 'Compensation',
  3569. id: 'compensation',
  3570. component: propertiesPanel.Group,
  3571. entries: [...CompensationProps({
  3572. element
  3573. })]
  3574. };
  3575. if (group.entries.length) {
  3576. return group;
  3577. }
  3578. return null;
  3579. }
  3580. function DocumentationGroup(element) {
  3581. const entries = [...DocumentationProps({
  3582. element
  3583. })];
  3584. return {
  3585. id: 'documentation',
  3586. label: 'Documentation',
  3587. entries,
  3588. component: propertiesPanel.Group
  3589. };
  3590. }
  3591. function ErrorGroup(element) {
  3592. const group = {
  3593. id: 'error',
  3594. label: 'Error',
  3595. component: propertiesPanel.Group,
  3596. entries: [...ErrorProps$1({
  3597. element
  3598. })]
  3599. };
  3600. if (group.entries.length) {
  3601. return group;
  3602. }
  3603. return null;
  3604. }
  3605. function MessageGroup(element) {
  3606. const group = {
  3607. id: 'message',
  3608. label: 'Message',
  3609. component: propertiesPanel.Group,
  3610. entries: [...MessageProps$1({
  3611. element
  3612. })]
  3613. };
  3614. if (group.entries.length) {
  3615. return group;
  3616. }
  3617. return null;
  3618. }
  3619. function SignalGroup(element) {
  3620. const group = {
  3621. id: 'signal',
  3622. label: 'Signal',
  3623. component: propertiesPanel.Group,
  3624. entries: [...SignalProps({
  3625. element
  3626. })]
  3627. };
  3628. if (group.entries.length) {
  3629. return group;
  3630. }
  3631. return null;
  3632. }
  3633. function LinkGroup(element) {
  3634. const group = {
  3635. label: 'Link',
  3636. id: 'link',
  3637. component: propertiesPanel.Group,
  3638. entries: [...LinkProps({
  3639. element
  3640. })]
  3641. };
  3642. if (group.entries.length) {
  3643. return group;
  3644. }
  3645. return null;
  3646. }
  3647. function EscalationGroup(element) {
  3648. const group = {
  3649. id: 'escalation',
  3650. label: 'Escalation',
  3651. component: propertiesPanel.Group,
  3652. entries: [...EscalationProps$1({
  3653. element
  3654. })]
  3655. };
  3656. if (group.entries.length) {
  3657. return group;
  3658. }
  3659. return null;
  3660. }
  3661. function TimerGroup(element) {
  3662. const group = {
  3663. label: 'Timer',
  3664. id: 'timer',
  3665. component: propertiesPanel.Group,
  3666. entries: [...TimerProps$1({
  3667. element
  3668. })]
  3669. };
  3670. if (group.entries.length) {
  3671. return group;
  3672. }
  3673. return null;
  3674. }
  3675. function MultiInstanceGroup(element) {
  3676. const group = {
  3677. label: 'Multi-instance',
  3678. id: 'multiInstance',
  3679. component: propertiesPanel.Group,
  3680. entries: [...MultiInstanceProps$2({
  3681. element
  3682. })]
  3683. };
  3684. if (group.entries.length) {
  3685. return group;
  3686. }
  3687. return null;
  3688. }
  3689. function getGroups(element) {
  3690. const groups = [GeneralGroup(element), DocumentationGroup(element), CompensationGroup(element), ErrorGroup(element), LinkGroup(element), MessageGroup(element), MultiInstanceGroup(element), SignalGroup(element), EscalationGroup(element), TimerGroup(element)]; // contract: if a group returns null, it should not be displayed at all
  3691. return groups.filter(group => group !== null);
  3692. }
  3693. class BpmnPropertiesProvider {
  3694. constructor(propertiesPanel) {
  3695. propertiesPanel.registerProvider(this);
  3696. }
  3697. getGroups(element) {
  3698. return groups => {
  3699. groups = groups.concat(getGroups(element));
  3700. return groups;
  3701. };
  3702. }
  3703. }
  3704. BpmnPropertiesProvider.$inject = ['propertiesPanel'];
  3705. var index$2 = {
  3706. __init__: ['bpmnPropertiesProvider'],
  3707. bpmnPropertiesProvider: ['type', BpmnPropertiesProvider]
  3708. };
  3709. /**
  3710. * Get extension elements of business object. Optionally filter by type.
  3711. *
  3712. * @param {ModdleElement} businessObject
  3713. * @param {String} [type=undefined]
  3714. * @returns {Array<ModdleElement>}
  3715. */
  3716. function getExtensionElementsList(businessObject, type = undefined) {
  3717. const extensionElements = businessObject.get('extensionElements');
  3718. if (!extensionElements) {
  3719. return [];
  3720. }
  3721. const values = extensionElements.get('values');
  3722. if (!values || !values.length) {
  3723. return [];
  3724. }
  3725. if (type) {
  3726. return values.filter(value => ModelUtil.is(value, type));
  3727. }
  3728. return values;
  3729. }
  3730. /**
  3731. * Add one or more extension elements. Create bpmn:ExtensionElements if it doesn't exist.
  3732. *
  3733. * @param {ModdleElement} element
  3734. * @param {ModdleElement} businessObject
  3735. * @param {ModdleElement|Array<ModdleElement>} extensionElementsToAdd
  3736. * @param {CommandStack} commandStack
  3737. */
  3738. function addExtensionElements(element, businessObject, extensionElementToAdd, bpmnFactory, commandStack) {
  3739. const commands = [];
  3740. let extensionElements = businessObject.get('extensionElements'); // (1) create bpmn:ExtensionElements if it doesn't exist
  3741. if (!extensionElements) {
  3742. extensionElements = createElement('bpmn:ExtensionElements', {
  3743. values: []
  3744. }, businessObject, bpmnFactory);
  3745. commands.push({
  3746. cmd: 'element.updateModdleProperties',
  3747. context: {
  3748. element,
  3749. moddleElement: businessObject,
  3750. properties: {
  3751. extensionElements
  3752. }
  3753. }
  3754. });
  3755. }
  3756. extensionElementToAdd.$parent = extensionElements; // (2) add extension element to list
  3757. commands.push({
  3758. cmd: 'element.updateModdleProperties',
  3759. context: {
  3760. element,
  3761. moddleElement: extensionElements,
  3762. properties: {
  3763. values: [...extensionElements.get('values'), extensionElementToAdd]
  3764. }
  3765. }
  3766. });
  3767. commandStack.execute('properties-panel.multi-command-executor', commands);
  3768. }
  3769. /**
  3770. * Remove one or more extension elements. Remove bpmn:ExtensionElements afterwards if it's empty.
  3771. *
  3772. * @param {ModdleElement} element
  3773. * @param {ModdleElement} businessObject
  3774. * @param {ModdleElement|Array<ModdleElement>} extensionElementsToRemove
  3775. * @param {CommandStack} commandStack
  3776. */
  3777. function removeExtensionElements(element, businessObject, extensionElementsToRemove, commandStack) {
  3778. if (!minDash.isArray(extensionElementsToRemove)) {
  3779. extensionElementsToRemove = [extensionElementsToRemove];
  3780. }
  3781. const extensionElements = businessObject.get('extensionElements'),
  3782. values = extensionElements.get('values').filter(value => !extensionElementsToRemove.includes(value));
  3783. commandStack.execute('element.updateModdleProperties', {
  3784. element,
  3785. moddleElement: extensionElements,
  3786. properties: {
  3787. values
  3788. }
  3789. });
  3790. }
  3791. function withVariableContext(Component) {
  3792. return props => {
  3793. const {
  3794. bpmnElement,
  3795. element
  3796. } = props;
  3797. const bo = (bpmnElement || element).businessObject;
  3798. const context = hooks.useMemo(() => {
  3799. const variables = zeebe.getVariablesForElement(bo);
  3800. return variables.map(variable => {
  3801. return {
  3802. name: variable.name,
  3803. info: 'Written in ' + variable.origin.map(origin => origin.name || origin.id).join(', ')
  3804. };
  3805. });
  3806. }, [bo]);
  3807. return jsxRuntime.jsx(Component, { ...props,
  3808. variables: context
  3809. });
  3810. };
  3811. }
  3812. function AssignmentDefinitionProps(props) {
  3813. const {
  3814. element
  3815. } = props;
  3816. if (!ModelUtil.is(element, 'bpmn:UserTask')) {
  3817. return [];
  3818. }
  3819. return [{
  3820. id: 'assignmentDefinitionAssignee',
  3821. component: Assignee$1,
  3822. isEdited: propertiesPanel.isFeelEntryEdited
  3823. }, {
  3824. id: 'assignmentDefinitionCandidateGroups',
  3825. component: CandidateGroups$1,
  3826. isEdited: propertiesPanel.isFeelEntryEdited
  3827. }];
  3828. }
  3829. function Assignee$1(props) {
  3830. const {
  3831. element
  3832. } = props;
  3833. const commandStack = useService('commandStack');
  3834. const bpmnFactory = useService('bpmnFactory');
  3835. const translate = useService('translate');
  3836. const debounce = useService('debounceInput');
  3837. const getValue = () => {
  3838. return (getAssignmentDefinition(element) || {}).assignee;
  3839. };
  3840. const setValue = value => {
  3841. const commands = [];
  3842. const businessObject = ModelUtil.getBusinessObject(element);
  3843. let extensionElements = businessObject.get('extensionElements'); // (1) ensure extension elements
  3844. if (!extensionElements) {
  3845. extensionElements = createElement('bpmn:ExtensionElements', {
  3846. values: []
  3847. }, businessObject, bpmnFactory);
  3848. commands.push({
  3849. cmd: 'element.updateModdleProperties',
  3850. context: {
  3851. element,
  3852. moddleElement: businessObject,
  3853. properties: {
  3854. extensionElements
  3855. }
  3856. }
  3857. });
  3858. } // (2) ensure AssignmentDefinition
  3859. let assignmentDefinition = getAssignmentDefinition(element);
  3860. if (!assignmentDefinition) {
  3861. assignmentDefinition = createElement('zeebe:AssignmentDefinition', {}, extensionElements, bpmnFactory);
  3862. commands.push({
  3863. cmd: 'element.updateModdleProperties',
  3864. context: {
  3865. element,
  3866. moddleElement: extensionElements,
  3867. properties: {
  3868. values: [...extensionElements.get('values'), assignmentDefinition]
  3869. }
  3870. }
  3871. });
  3872. } // (3) update assignee definition type
  3873. commands.push({
  3874. cmd: 'element.updateModdleProperties',
  3875. context: {
  3876. element,
  3877. moddleElement: assignmentDefinition,
  3878. properties: {
  3879. assignee: value
  3880. }
  3881. }
  3882. }); // (4) commit all updates
  3883. commandStack.execute('properties-panel.multi-command-executor', commands);
  3884. };
  3885. return withVariableContext(propertiesPanel.FeelEntry)({
  3886. element,
  3887. id: 'assignmentDefinitionAssignee',
  3888. label: translate('Assignee'),
  3889. feel: 'optional',
  3890. getValue,
  3891. setValue,
  3892. debounce
  3893. });
  3894. }
  3895. function CandidateGroups$1(props) {
  3896. const {
  3897. element
  3898. } = props;
  3899. const commandStack = useService('commandStack');
  3900. const bpmnFactory = useService('bpmnFactory');
  3901. const translate = useService('translate');
  3902. const debounce = useService('debounceInput');
  3903. const getValue = () => {
  3904. return (getAssignmentDefinition(element) || {}).candidateGroups;
  3905. };
  3906. const setValue = value => {
  3907. let commands = [];
  3908. const businessObject = ModelUtil.getBusinessObject(element);
  3909. let extensionElements = businessObject.get('extensionElements'); // (1) ensure extension elements
  3910. if (!extensionElements) {
  3911. extensionElements = createElement('bpmn:ExtensionElements', {
  3912. values: []
  3913. }, businessObject, bpmnFactory);
  3914. commands.push({
  3915. cmd: 'element.updateModdleProperties',
  3916. context: {
  3917. element,
  3918. moddleElement: businessObject,
  3919. properties: {
  3920. extensionElements
  3921. }
  3922. }
  3923. });
  3924. } // (2) ensure assignmentDefinition
  3925. let assignmentDefinition = getAssignmentDefinition(element);
  3926. if (!assignmentDefinition) {
  3927. assignmentDefinition = createElement('zeebe:AssignmentDefinition', {}, extensionElements, bpmnFactory);
  3928. commands.push({
  3929. cmd: 'element.updateModdleProperties',
  3930. context: {
  3931. element,
  3932. moddleElement: extensionElements,
  3933. properties: {
  3934. values: [...extensionElements.get('values'), assignmentDefinition]
  3935. }
  3936. }
  3937. });
  3938. } // (3) update candidateGroups
  3939. commands.push({
  3940. cmd: 'element.updateModdleProperties',
  3941. context: {
  3942. element,
  3943. moddleElement: assignmentDefinition,
  3944. properties: {
  3945. candidateGroups: value
  3946. }
  3947. }
  3948. });
  3949. commandStack.execute('properties-panel.multi-command-executor', commands);
  3950. };
  3951. return withVariableContext(propertiesPanel.FeelEntry)({
  3952. element,
  3953. id: 'assignmentDefinitionCandidateGroups',
  3954. label: translate('Candidate groups'),
  3955. feel: 'optional',
  3956. getValue,
  3957. setValue,
  3958. debounce
  3959. });
  3960. } // helper ///////////////////////
  3961. function getAssignmentDefinition(element) {
  3962. const businessObject = ModelUtil.getBusinessObject(element);
  3963. return getExtensionElementsList(businessObject, 'zeebe:AssignmentDefinition')[0];
  3964. }
  3965. const DMN_IMPLEMENTATION_OPTION = 'dmn',
  3966. JOB_WORKER_IMPLEMENTATION_OPTION = 'jobWorker',
  3967. DEFAULT_IMPLEMENTATION_OPTION = '';
  3968. function BusinessRuleImplementationProps(props) {
  3969. const {
  3970. element
  3971. } = props;
  3972. if (!ModelUtil.is(element, 'bpmn:BusinessRuleTask')) {
  3973. return [];
  3974. }
  3975. return [{
  3976. id: 'businessRuleImplementation',
  3977. component: BusinessRuleImplementation,
  3978. isEdited: () => isBusinessRuleImplementationEdited(element)
  3979. }];
  3980. }
  3981. function BusinessRuleImplementation(props) {
  3982. const {
  3983. element,
  3984. id
  3985. } = props;
  3986. const commandStack = useService('commandStack');
  3987. const bpmnFactory = useService('bpmnFactory');
  3988. const translate = useService('translate');
  3989. const getValue = () => {
  3990. if (getCalledDecision$1(element)) {
  3991. return DMN_IMPLEMENTATION_OPTION;
  3992. }
  3993. if (getTaskDefinition$2(element)) {
  3994. return JOB_WORKER_IMPLEMENTATION_OPTION;
  3995. }
  3996. return DEFAULT_IMPLEMENTATION_OPTION;
  3997. };
  3998. /**
  3999. * Set value by either creating a zeebe:calledDecision or a zeebe:taskDefintion
  4000. * extension element. Note that they must not exist both at the same time, however
  4001. * this will be ensured by a bpmn-js behavior (and not by the propPanel).
  4002. */
  4003. const setValue = value => {
  4004. let extensionElement, extensionElementType;
  4005. if (value === DMN_IMPLEMENTATION_OPTION) {
  4006. extensionElement = getCalledDecision$1(element);
  4007. extensionElementType = 'zeebe:CalledDecision';
  4008. } else if (value === JOB_WORKER_IMPLEMENTATION_OPTION) {
  4009. extensionElement = getTaskDefinition$2(element);
  4010. extensionElementType = 'zeebe:TaskDefinition';
  4011. } else {
  4012. resetElement(element, commandStack);
  4013. }
  4014. if (!extensionElement && extensionElementType) {
  4015. extensionElement = createElement(extensionElementType, {}, null, bpmnFactory);
  4016. updateExtensionElements(element, extensionElement, bpmnFactory, commandStack);
  4017. }
  4018. };
  4019. const getOptions = () => {
  4020. const options = [{
  4021. value: DEFAULT_IMPLEMENTATION_OPTION,
  4022. label: translate('<none>')
  4023. }, {
  4024. value: DMN_IMPLEMENTATION_OPTION,
  4025. label: translate('DMN decision')
  4026. }, {
  4027. value: JOB_WORKER_IMPLEMENTATION_OPTION,
  4028. label: translate('Job worker')
  4029. }];
  4030. return options;
  4031. };
  4032. return propertiesPanel.SelectEntry({
  4033. element,
  4034. id,
  4035. label: translate('Implementation'),
  4036. getValue,
  4037. setValue,
  4038. getOptions
  4039. });
  4040. } // helper ///////////////////////
  4041. function getTaskDefinition$2(element) {
  4042. const businessObject = ModelUtil.getBusinessObject(element);
  4043. return getExtensionElementsList(businessObject, 'zeebe:TaskDefinition')[0];
  4044. }
  4045. function getCalledDecision$1(element) {
  4046. const businessObject = ModelUtil.getBusinessObject(element);
  4047. return getExtensionElementsList(businessObject, 'zeebe:CalledDecision')[0];
  4048. }
  4049. function isBusinessRuleImplementationEdited(element) {
  4050. return getTaskDefinition$2(element);
  4051. }
  4052. function resetElement(element, commandStack) {
  4053. const businessObject = ModelUtil.getBusinessObject(element);
  4054. const taskDefintion = getTaskDefinition$2(element);
  4055. const calledDecision = getCalledDecision$1(element);
  4056. if (taskDefintion) {
  4057. removeExtensionElements(element, businessObject, taskDefintion, commandStack);
  4058. }
  4059. if (calledDecision) {
  4060. removeExtensionElements(element, businessObject, calledDecision, commandStack);
  4061. }
  4062. }
  4063. function updateExtensionElements(element, extensionElementToAdd, bpmnFactory, commandStack) {
  4064. const businessObject = ModelUtil.getBusinessObject(element);
  4065. const commands = [];
  4066. let extensionElements = businessObject.get('extensionElements');
  4067. let extensionElementValues; // (1) create bpmn:ExtensionElements if it doesn't exist
  4068. if (!extensionElements) {
  4069. extensionElements = createElement('bpmn:ExtensionElements', {
  4070. values: []
  4071. }, businessObject, bpmnFactory);
  4072. commands.push({
  4073. cmd: 'element.updateModdleProperties',
  4074. context: {
  4075. element,
  4076. moddleElement: businessObject,
  4077. properties: {
  4078. extensionElements
  4079. }
  4080. }
  4081. });
  4082. }
  4083. extensionElementToAdd.$parent = extensionElements; // (2) remove old exension element from extensionElements
  4084. if (ModelUtil.is(extensionElementToAdd, 'zeebe:TaskDefinition')) {
  4085. extensionElementValues = minDash.without(extensionElements.get('values'), getCalledDecision$1(element));
  4086. } else if (ModelUtil.is(extensionElementToAdd, 'zeebe:CalledDecision')) {
  4087. extensionElementValues = minDash.without(extensionElements.get('values'), getTaskDefinition$2(element));
  4088. } // (3) add extension element to list
  4089. commands.push({
  4090. cmd: 'element.updateModdleProperties',
  4091. context: {
  4092. element,
  4093. moddleElement: extensionElements,
  4094. properties: {
  4095. values: [...extensionElementValues, extensionElementToAdd]
  4096. }
  4097. }
  4098. });
  4099. commandStack.execute('properties-panel.multi-command-executor', commands);
  4100. }
  4101. function CalledDecisionProps(props) {
  4102. const {
  4103. element
  4104. } = props;
  4105. if (!ModelUtil.is(element, 'bpmn:BusinessRuleTask') || !getCalledDecision(element)) {
  4106. return [];
  4107. }
  4108. return [{
  4109. id: 'decisionId',
  4110. component: DecisionID,
  4111. isEdited: propertiesPanel.isFeelEntryEdited
  4112. }, {
  4113. id: 'resultVariable',
  4114. component: ResultVariable$3,
  4115. isEdited: propertiesPanel.isTextFieldEntryEdited
  4116. }];
  4117. }
  4118. function DecisionID(props) {
  4119. const {
  4120. element,
  4121. id
  4122. } = props;
  4123. const commandStack = useService('commandStack');
  4124. const bpmnFactory = useService('bpmnFactory');
  4125. const translate = useService('translate');
  4126. const debounce = useService('debounceInput');
  4127. const getValue = () => {
  4128. return (getCalledDecision(element) || {}).decisionId;
  4129. };
  4130. const setValue = value => {
  4131. const commands = [];
  4132. const businessObject = ModelUtil.getBusinessObject(element);
  4133. let extensionElements = businessObject.get('extensionElements'); // (1) ensure extension elements
  4134. if (!extensionElements) {
  4135. extensionElements = createElement('bpmn:ExtensionElements', {
  4136. values: []
  4137. }, businessObject, bpmnFactory);
  4138. commands.push({
  4139. cmd: 'element.updateModdleProperties',
  4140. context: {
  4141. element,
  4142. moddleElement: businessObject,
  4143. properties: {
  4144. extensionElements
  4145. }
  4146. }
  4147. });
  4148. } // (2) ensure calledDecision
  4149. let calledDecision = getCalledDecision(element);
  4150. if (!calledDecision) {
  4151. calledDecision = createElement('zeebe:CalledDecision', {}, extensionElements, bpmnFactory);
  4152. commands.push({
  4153. cmd: 'element.updateModdleProperties',
  4154. context: {
  4155. element,
  4156. moddleElement: extensionElements,
  4157. properties: {
  4158. values: [...extensionElements.get('values'), calledDecision]
  4159. }
  4160. }
  4161. });
  4162. } // (3) update caledDecision.decisionId
  4163. commands.push({
  4164. cmd: 'element.updateModdleProperties',
  4165. context: {
  4166. element,
  4167. moddleElement: calledDecision,
  4168. properties: {
  4169. decisionId: value
  4170. }
  4171. }
  4172. }); // (4) commit all updates
  4173. commandStack.execute('properties-panel.multi-command-executor', commands);
  4174. };
  4175. return withVariableContext(propertiesPanel.FeelEntry)({
  4176. element,
  4177. id,
  4178. label: translate('Decision ID'),
  4179. feel: 'optional',
  4180. getValue,
  4181. setValue,
  4182. debounce
  4183. });
  4184. }
  4185. function ResultVariable$3(props) {
  4186. const {
  4187. element,
  4188. id
  4189. } = props;
  4190. const commandStack = useService('commandStack');
  4191. const bpmnFactory = useService('bpmnFactory');
  4192. const translate = useService('translate');
  4193. const debounce = useService('debounceInput');
  4194. const getValue = () => {
  4195. return (getCalledDecision(element) || {}).resultVariable;
  4196. };
  4197. const setValue = value => {
  4198. const commands = [];
  4199. const businessObject = ModelUtil.getBusinessObject(element);
  4200. let extensionElements = businessObject.get('extensionElements'); // (1) ensure extension elements
  4201. if (!extensionElements) {
  4202. extensionElements = createElement('bpmn:ExtensionElements', {
  4203. values: []
  4204. }, businessObject, bpmnFactory);
  4205. commands.push({
  4206. cmd: 'element.updateModdleProperties',
  4207. context: {
  4208. element,
  4209. moddleElement: businessObject,
  4210. properties: {
  4211. extensionElements
  4212. }
  4213. }
  4214. });
  4215. } // (2) ensure calledDecision
  4216. let calledDecision = getCalledDecision(element);
  4217. if (!calledDecision) {
  4218. calledDecision = createElement('zeebe:CalledDecision', {}, extensionElements, bpmnFactory);
  4219. commands.push({
  4220. cmd: 'element.updateModdleProperties',
  4221. context: {
  4222. element,
  4223. moddleElement: extensionElements,
  4224. properties: {
  4225. values: [...extensionElements.get('values'), calledDecision]
  4226. }
  4227. }
  4228. });
  4229. } // (3) update caledDecision.decisionId
  4230. commands.push({
  4231. cmd: 'element.updateModdleProperties',
  4232. context: {
  4233. element,
  4234. moddleElement: calledDecision,
  4235. properties: {
  4236. resultVariable: value
  4237. }
  4238. }
  4239. }); // (4) commit all updates
  4240. commandStack.execute('properties-panel.multi-command-executor', commands);
  4241. };
  4242. return propertiesPanel.TextFieldEntry({
  4243. element,
  4244. id,
  4245. label: translate('Result variable'),
  4246. getValue,
  4247. setValue,
  4248. debounce
  4249. });
  4250. } // helper ///////////////////////
  4251. function getCalledDecision(element) {
  4252. const businessObject = ModelUtil.getBusinessObject(element);
  4253. return getExtensionElementsList(businessObject, 'zeebe:CalledDecision')[0];
  4254. }
  4255. function ConditionProps$1(props) {
  4256. const {
  4257. element
  4258. } = props;
  4259. if (!ModelUtil.is(element, 'bpmn:SequenceFlow')) {
  4260. return [];
  4261. }
  4262. const conditionProps = [];
  4263. if (isConditionalSource$1(element.source)) {
  4264. conditionProps.push({
  4265. id: 'conditionExpression',
  4266. component: ConditionExpression$1,
  4267. isEdited: propertiesPanel.isFeelEntryEdited
  4268. });
  4269. }
  4270. return conditionProps;
  4271. }
  4272. function ConditionExpression$1(props) {
  4273. const {
  4274. element
  4275. } = props;
  4276. const commandStack = useService('commandStack'),
  4277. bpmnFactory = useService('bpmnFactory'),
  4278. translate = useService('translate'),
  4279. debounce = useService('debounceInput');
  4280. const getValue = () => {
  4281. return getConditionExpression$1(element);
  4282. };
  4283. const setValue = value => {
  4284. const commands = [];
  4285. const businessObject = ModelUtil.getBusinessObject(element); // (1) If we set value to a default flow, make it a non-default flow
  4286. // by updating the element source
  4287. const source = element.source;
  4288. if (source.businessObject.default === businessObject) {
  4289. commands.push({
  4290. cmd: 'element.updateProperties',
  4291. context: {
  4292. element: source,
  4293. properties: {
  4294. 'default': undefined
  4295. }
  4296. }
  4297. });
  4298. } // (2) Create and set formalExpression element containing the conditionExpression,
  4299. // unless the provided value is empty
  4300. const formalExpressionElement = value && value != '' ? createElement('bpmn:FormalExpression', {
  4301. body: value
  4302. }, businessObject, bpmnFactory) : undefined;
  4303. commands.push({
  4304. cmd: 'element.updateProperties',
  4305. context: {
  4306. element: element,
  4307. properties: {
  4308. conditionExpression: formalExpressionElement
  4309. }
  4310. }
  4311. }); // (3) Execute the commands
  4312. commandStack.execute('properties-panel.multi-command-executor', commands);
  4313. };
  4314. return withVariableContext(propertiesPanel.FeelEntry)({
  4315. element,
  4316. id: 'conditionExpression',
  4317. label: translate('Condition expression'),
  4318. feel: 'required',
  4319. getValue,
  4320. setValue,
  4321. debounce
  4322. });
  4323. } // helper //////////////////////////
  4324. const CONDITIONAL_SOURCES$1 = ['bpmn:Activity', 'bpmn:ExclusiveGateway'];
  4325. function isConditionalSource$1(element) {
  4326. return ModelingUtil.isAny(element, CONDITIONAL_SOURCES$1);
  4327. }
  4328. /**
  4329. * getConditionExpression - get the body value of a condition expression for a given element
  4330. *
  4331. * @param {ModdleElement} element
  4332. *
  4333. * @return {string|undefined}
  4334. */
  4335. function getConditionExpression$1(element) {
  4336. const businessObject = ModelUtil.getBusinessObject(element);
  4337. const conditionExpression = businessObject.conditionExpression;
  4338. if (conditionExpression) {
  4339. return conditionExpression.get('body');
  4340. }
  4341. }
  4342. function FormProps$1(props) {
  4343. const {
  4344. element,
  4345. injector
  4346. } = props;
  4347. const formHelper = injector.invoke(FormHelper);
  4348. if (!ModelUtil.is(element, 'bpmn:UserTask')) {
  4349. return [];
  4350. }
  4351. const entries = [{
  4352. id: 'formType',
  4353. component: FormType$1,
  4354. isEdited: propertiesPanel.isSelectEntryEdited
  4355. }];
  4356. if (isCamundaForm(element, formHelper)) {
  4357. entries.push({
  4358. id: 'formConfiguration',
  4359. component: FormConfiguration,
  4360. isEdited: propertiesPanel.isTextAreaEntryEdited
  4361. });
  4362. } else if (isCustomKey(element, formHelper)) {
  4363. entries.push({
  4364. id: 'customFormKey',
  4365. component: CustomFormKey,
  4366. isEdited: propertiesPanel.isTextFieldEntryEdited
  4367. });
  4368. }
  4369. return entries;
  4370. }
  4371. function FormType$1(props) {
  4372. const {
  4373. element
  4374. } = props;
  4375. const translate = useService('translate');
  4376. const injector = useService('injector');
  4377. const formHelper = injector.invoke(FormHelper);
  4378. const getValue = () => {
  4379. const formDefinition = formHelper.getFormDefinition(element);
  4380. const userTaskForm = formHelper.getUserTaskForm(element);
  4381. if (formDefinition) {
  4382. if (userTaskForm) {
  4383. return 'camundaForm';
  4384. }
  4385. return 'formKey';
  4386. }
  4387. return '';
  4388. };
  4389. const setValue = value => {
  4390. formHelper.resetForm(element);
  4391. if (value === 'camundaForm') {
  4392. formHelper.setUserTaskForm(element, '');
  4393. } else if (value === 'formKey') {
  4394. formHelper.setFormDefinition(element, '');
  4395. }
  4396. };
  4397. const getOptions = () => {
  4398. return [{
  4399. value: '',
  4400. label: translate('<none>')
  4401. }, {
  4402. value: 'camundaForm',
  4403. label: translate('Camunda forms')
  4404. }, {
  4405. value: 'formKey',
  4406. label: translate('Custom form key')
  4407. }];
  4408. };
  4409. return propertiesPanel.SelectEntry({
  4410. element,
  4411. id: 'formType',
  4412. label: translate('Type'),
  4413. getValue,
  4414. setValue,
  4415. getOptions
  4416. });
  4417. }
  4418. function FormConfiguration(props) {
  4419. const {
  4420. element
  4421. } = props;
  4422. const injector = useService('injector');
  4423. const debounce = useService('debounceInput');
  4424. const translate = useService('translate');
  4425. const formHelper = injector.invoke(FormHelper);
  4426. const getValue = () => {
  4427. const userTaskForm = formHelper.getUserTaskForm(element);
  4428. return userTaskForm.get('body');
  4429. };
  4430. const setValue = value => {
  4431. formHelper.setUserTaskForm(element, value);
  4432. };
  4433. return propertiesPanel.TextAreaEntry({
  4434. element,
  4435. id: 'formConfiguration',
  4436. label: translate('Form JSON configuration'),
  4437. rows: 4,
  4438. getValue,
  4439. setValue,
  4440. debounce
  4441. });
  4442. }
  4443. function CustomFormKey(props) {
  4444. const {
  4445. element
  4446. } = props;
  4447. const injector = useService('injector');
  4448. const debounce = useService('debounceInput');
  4449. const translate = useService('translate');
  4450. const formHelper = injector.invoke(FormHelper);
  4451. const getValue = () => {
  4452. const formDefinition = formHelper.getFormDefinition(element);
  4453. return formDefinition.get('formKey');
  4454. };
  4455. const setValue = value => {
  4456. formHelper.setFormDefinition(element, value);
  4457. };
  4458. return propertiesPanel.TextFieldEntry({
  4459. element,
  4460. id: 'customFormKey',
  4461. label: translate('Form key'),
  4462. getValue,
  4463. setValue,
  4464. debounce
  4465. });
  4466. }
  4467. const USER_TASK_FORM_PREFIX = 'userTaskForm_';
  4468. function FormHelper(bpmnFactory, commandStack) {
  4469. function getFormDefinition(element) {
  4470. const businessObject = ModelUtil.getBusinessObject(element);
  4471. const formDefinitions = getExtensionElementsList(businessObject, 'zeebe:FormDefinition');
  4472. return formDefinitions[0];
  4473. }
  4474. function getUserTaskForm(element, parent) {
  4475. const rootElement = parent || getRootElement(element); // (1) get form definition from user task
  4476. const formDefinition = getFormDefinition(element);
  4477. if (minDash.isUndefined(formDefinition)) {
  4478. return;
  4479. }
  4480. const formKey = formDefinition.get('formKey'); // (2) retrieve user task form via form key
  4481. const userTaskForm = findUserTaskForm(formKey, rootElement);
  4482. return userTaskForm;
  4483. }
  4484. function ensureTaskForm(element, values) {
  4485. let commands = [];
  4486. const rootElement = getRootElement(element); // (1) ensure root element extension elements
  4487. let rootExtensionElements = rootElement.get('extensionElements');
  4488. if (!rootExtensionElements) {
  4489. rootExtensionElements = createElement('bpmn:ExtensionElements', {
  4490. values: []
  4491. }, rootElement, bpmnFactory);
  4492. commands.push(UpdateModdlePropertiesCmd(element, rootElement, {
  4493. extensionElements: rootExtensionElements
  4494. }));
  4495. } // (2) ensure user task form
  4496. let userTaskForm = getUserTaskForm(element); // (2.1) create user task form if doesn't exist
  4497. if (!userTaskForm) {
  4498. userTaskForm = createUserTaskForm(values, rootExtensionElements, bpmnFactory);
  4499. commands.push(UpdateModdlePropertiesCmd(element, rootExtensionElements, {
  4500. values: [...rootExtensionElements.get('values'), userTaskForm]
  4501. }));
  4502. }
  4503. commands.push(UpdateModdlePropertiesCmd(element, userTaskForm, values));
  4504. return commands;
  4505. }
  4506. function ensureFormDefinition(element, customFormKey) {
  4507. const businessObject = ModelUtil.getBusinessObject(element);
  4508. let commands = []; // (1) ensure extension elements
  4509. let extensionElements = businessObject.get('extensionElements');
  4510. if (minDash.isUndefined(extensionElements)) {
  4511. extensionElements = createElement('bpmn:ExtensionElements', {
  4512. values: []
  4513. }, businessObject, bpmnFactory);
  4514. commands.push(UpdateModdlePropertiesCmd(element, businessObject, {
  4515. extensionElements: extensionElements
  4516. }));
  4517. } // (2) ensure form definition
  4518. let formDefinition = getFormDefinition(element); // (2.1) create if doesn't exist
  4519. if (!formDefinition) {
  4520. let formKey = customFormKey;
  4521. if (minDash.isUndefined(formKey)) {
  4522. const formId = createFormId();
  4523. formKey = createFormKey(formId);
  4524. }
  4525. formDefinition = createFormDefinition({
  4526. formKey
  4527. }, extensionElements, bpmnFactory);
  4528. commands.push(UpdateModdlePropertiesCmd(element, extensionElements, {
  4529. values: [...extensionElements.get('values'), formDefinition]
  4530. }));
  4531. } // (2.2) update existing form definition with custom key
  4532. else if (customFormKey) {
  4533. commands.push(UpdateModdlePropertiesCmd(element, formDefinition, {
  4534. formKey: customFormKey
  4535. }));
  4536. }
  4537. return {
  4538. formId: resolveFormId(formDefinition.get('formKey')),
  4539. commands
  4540. };
  4541. }
  4542. function setFormDefinition(element, customFormKey) {
  4543. const {
  4544. commands
  4545. } = ensureFormDefinition(element, customFormKey);
  4546. commandStack.execute('properties-panel.multi-command-executor', commands);
  4547. }
  4548. function setUserTaskForm(element, value) {
  4549. const {
  4550. formId,
  4551. commands: formDefCommands
  4552. } = ensureFormDefinition(element);
  4553. const userTaskCommands = ensureTaskForm(element, {
  4554. id: formId,
  4555. body: value
  4556. });
  4557. const commands = formDefCommands.concat(userTaskCommands);
  4558. commandStack.execute('properties-panel.multi-command-executor', commands);
  4559. }
  4560. function unsetFormDefinition(element) {
  4561. const businessObject = ModelUtil.getBusinessObject(element),
  4562. extensionElements = businessObject.get('extensionElements');
  4563. let commands = [];
  4564. const formDefinition = getFormDefinition(element);
  4565. if (!formDefinition) {
  4566. return commands;
  4567. }
  4568. let values = minDash.without(extensionElements.get('values'), formDefinition);
  4569. commands.push(UpdateModdlePropertiesCmd(element, extensionElements, {
  4570. values
  4571. }));
  4572. return commands;
  4573. }
  4574. function resetForm(element) {
  4575. const rootElement = getRootElement(element),
  4576. rootExtensionElements = rootElement.get('extensionElements'); // (1) remove form definition
  4577. const commands = unsetFormDefinition(element); // (2) remove referenced user task form
  4578. const userTaskForm = getUserTaskForm(element);
  4579. if (!userTaskForm) {
  4580. commandStack.execute('properties-panel.multi-command-executor', commands);
  4581. return;
  4582. }
  4583. const values = minDash.without(rootExtensionElements.get('values'), userTaskForm);
  4584. commands.push(UpdateModdlePropertiesCmd(element, rootExtensionElements, {
  4585. values
  4586. }));
  4587. commandStack.execute('properties-panel.multi-command-executor', commands);
  4588. }
  4589. function createFormKey(formId) {
  4590. return 'camunda-forms:bpmn:' + formId;
  4591. }
  4592. function createFormId() {
  4593. return nextId(USER_TASK_FORM_PREFIX);
  4594. }
  4595. function resolveFormId(formKey) {
  4596. return formKey.split(':')[2];
  4597. }
  4598. function createFormDefinition(properties, extensionElements, bpmnFactory) {
  4599. return createElement('zeebe:FormDefinition', properties, extensionElements, bpmnFactory);
  4600. }
  4601. function createUserTaskForm(properties, extensionElements, bpmnFactory) {
  4602. return createElement('zeebe:UserTaskForm', properties, extensionElements, bpmnFactory);
  4603. }
  4604. function findUserTaskForm(formKey, rootElement) {
  4605. const forms = getExtensionElementsList(rootElement, 'zeebe:UserTaskForm');
  4606. return minDash.find(forms, function (userTaskForm) {
  4607. return createFormKey(userTaskForm.id) === formKey;
  4608. });
  4609. }
  4610. function getRootElement(element) {
  4611. const businessObject = ModelUtil.getBusinessObject(element);
  4612. let parent = businessObject;
  4613. while (parent.$parent && !ModelUtil.is(parent, 'bpmn:Process')) {
  4614. parent = parent.$parent;
  4615. }
  4616. return parent;
  4617. }
  4618. return {
  4619. getFormDefinition,
  4620. getUserTaskForm,
  4621. setFormDefinition,
  4622. setUserTaskForm,
  4623. resetForm
  4624. };
  4625. }
  4626. FormHelper.$inject = ['bpmnFactory', 'commandStack']; // helpers /////////////
  4627. function UpdateModdlePropertiesCmd(element, businessObject, newProperties) {
  4628. return {
  4629. cmd: 'element.updateModdleProperties',
  4630. context: {
  4631. element,
  4632. moddleElement: businessObject,
  4633. properties: newProperties
  4634. }
  4635. };
  4636. }
  4637. function isCamundaForm(element, formHelper) {
  4638. const formDefinition = formHelper.getFormDefinition(element);
  4639. const userTaskForm = formHelper.getUserTaskForm(element);
  4640. return formDefinition && userTaskForm;
  4641. }
  4642. function isCustomKey(element, formHelper) {
  4643. const formDefinition = formHelper.getFormDefinition(element);
  4644. const userTaskForm = formHelper.getUserTaskForm(element);
  4645. return formDefinition && !userTaskForm;
  4646. }
  4647. function Header(props) {
  4648. const {
  4649. idPrefix,
  4650. header
  4651. } = props;
  4652. const entries = [{
  4653. id: idPrefix + '-key',
  4654. component: KeyProperty,
  4655. header,
  4656. idPrefix
  4657. }, {
  4658. id: idPrefix + '-value',
  4659. component: ValueProperty$2,
  4660. header,
  4661. idPrefix
  4662. }];
  4663. return entries;
  4664. }
  4665. function KeyProperty(props) {
  4666. const {
  4667. idPrefix,
  4668. element,
  4669. header
  4670. } = props;
  4671. const commandStack = useService('commandStack');
  4672. const translate = useService('translate');
  4673. const debounce = useService('debounceInput');
  4674. const setValue = value => {
  4675. commandStack.execute('element.updateModdleProperties', {
  4676. element,
  4677. moddleElement: header,
  4678. properties: {
  4679. key: value
  4680. }
  4681. });
  4682. };
  4683. const getValue = header => {
  4684. return header.key;
  4685. };
  4686. return propertiesPanel.TextFieldEntry({
  4687. element: header,
  4688. id: idPrefix + '-key',
  4689. label: translate('Key'),
  4690. getValue,
  4691. setValue,
  4692. debounce
  4693. });
  4694. }
  4695. function ValueProperty$2(props) {
  4696. const {
  4697. idPrefix,
  4698. element,
  4699. header
  4700. } = props;
  4701. const commandStack = useService('commandStack');
  4702. const translate = useService('translate');
  4703. const debounce = useService('debounceInput');
  4704. const setValue = value => {
  4705. commandStack.execute('element.updateModdleProperties', {
  4706. element,
  4707. moddleElement: header,
  4708. properties: {
  4709. value
  4710. }
  4711. });
  4712. };
  4713. const getValue = header => {
  4714. return header.value;
  4715. };
  4716. return propertiesPanel.TextFieldEntry({
  4717. element: header,
  4718. id: idPrefix + '-value',
  4719. label: translate('Value'),
  4720. getValue,
  4721. setValue,
  4722. debounce
  4723. });
  4724. }
  4725. function isZeebeServiceTask(element) {
  4726. if (!ModelUtil.is(element, 'zeebe:ZeebeServiceTask')) return false;
  4727. if (ModelUtil.is(element, 'bpmn:EndEvent') || ModelUtil.is(element, 'bpmn:IntermediateThrowEvent')) {
  4728. return !!getMessageEventDefinition(element);
  4729. } // A BusinessRuleTask is per default not a ServiceTask, only if it has a TaskDefinition
  4730. // (ie. if the implementation is set to ==JobWorker)
  4731. if (ModelUtil.is(element, 'bpmn:BusinessRuleTask') && !getTaskDefinition$1(element)) {
  4732. return false;
  4733. }
  4734. return true;
  4735. }
  4736. function isMessageEndEvent(element) {
  4737. return ModelUtil.is(element, 'bpmn:EndEvent') && !!getMessageEventDefinition(element);
  4738. }
  4739. function isMessageThrowEvent(element) {
  4740. return ModelUtil.is(element, 'bpmn:IntermediateThrowEvent') && !!getMessageEventDefinition(element);
  4741. } // helper ////////////////
  4742. function getTaskDefinition$1(element) {
  4743. const businessObject = ModelUtil.getBusinessObject(element);
  4744. return getExtensionElementsList(businessObject, 'zeebe:TaskDefinition')[0];
  4745. }
  4746. function areHeadersSupported(element) {
  4747. return ModelUtil.is(element, 'bpmn:UserTask') || isZeebeServiceTask(element);
  4748. }
  4749. /**
  4750. * Get first zeebe:TaskHeaders element for a specific element.
  4751. *
  4752. * @param {ModdleElement} element
  4753. *
  4754. * @return {ModdleElement} a zeebe:TaskHeader element
  4755. */
  4756. function getTaskHeaders(element) {
  4757. const businessObject = ModelUtil.getBusinessObject(element);
  4758. return getExtensionElementsList(businessObject, 'zeebe:TaskHeaders')[0];
  4759. }
  4760. /**
  4761. * Retrieve all zeebe:Header elements for a specific element.
  4762. *
  4763. * @param {ModdleElement} element
  4764. *
  4765. * @return {Array<ModdleElement>} a list of zeebe:Header elements
  4766. */
  4767. function getHeaders(element) {
  4768. const taskHeaders = getTaskHeaders(element);
  4769. return taskHeaders ? taskHeaders.get('values') : [];
  4770. }
  4771. function HeaderProps({
  4772. element,
  4773. injector
  4774. }) {
  4775. if (!areHeadersSupported(element)) {
  4776. return null;
  4777. }
  4778. const headers = getHeaders(element) || [];
  4779. const bpmnFactory = injector.get('bpmnFactory'),
  4780. commandStack = injector.get('commandStack');
  4781. const items = headers.map((header, index) => {
  4782. const id = element.id + '-header-' + index;
  4783. return {
  4784. id,
  4785. label: header.get('key') || '',
  4786. entries: Header({
  4787. idPrefix: id,
  4788. element,
  4789. header
  4790. }),
  4791. autoFocusEntry: id + '-key',
  4792. remove: removeFactory$c({
  4793. commandStack,
  4794. element,
  4795. header
  4796. })
  4797. };
  4798. });
  4799. return {
  4800. items,
  4801. add: addFactory$9({
  4802. bpmnFactory,
  4803. commandStack,
  4804. element
  4805. })
  4806. };
  4807. }
  4808. function removeFactory$c({
  4809. commandStack,
  4810. element,
  4811. header
  4812. }) {
  4813. return function (event) {
  4814. event.stopPropagation();
  4815. let commands = [];
  4816. const taskHeaders = getTaskHeaders(element);
  4817. if (!taskHeaders) {
  4818. return;
  4819. }
  4820. const newTaskHeaders = minDash.without(taskHeaders.get('values'), header);
  4821. commands.push({
  4822. cmd: 'element.updateModdleProperties',
  4823. context: {
  4824. element,
  4825. moddleElement: taskHeaders,
  4826. properties: {
  4827. values: newTaskHeaders
  4828. }
  4829. }
  4830. }); // remove zeebe:TaskHeaders if there are no headers anymore
  4831. if (!newTaskHeaders.length) {
  4832. const businessObject = ModelUtil.getBusinessObject(element),
  4833. extensionElements = businessObject.get('extensionElements');
  4834. commands.push({
  4835. cmd: 'element.updateModdleProperties',
  4836. context: {
  4837. element,
  4838. moddleElement: extensionElements,
  4839. properties: {
  4840. values: minDash.without(extensionElements.get('values'), taskHeaders)
  4841. }
  4842. }
  4843. });
  4844. }
  4845. commandStack.execute('properties-panel.multi-command-executor', commands);
  4846. };
  4847. }
  4848. function addFactory$9({
  4849. bpmnFactory,
  4850. commandStack,
  4851. element
  4852. }) {
  4853. return function (event) {
  4854. event.stopPropagation();
  4855. let commands = [];
  4856. const businessObject = ModelUtil.getBusinessObject(element);
  4857. let extensionElements = businessObject.get('extensionElements'); // (1) ensure extension elements
  4858. if (!extensionElements) {
  4859. extensionElements = createElement('bpmn:ExtensionElements', {
  4860. values: []
  4861. }, businessObject, bpmnFactory);
  4862. commands.push({
  4863. cmd: 'element.updateModdleProperties',
  4864. context: {
  4865. element,
  4866. moddleElement: businessObject,
  4867. properties: {
  4868. extensionElements
  4869. }
  4870. }
  4871. });
  4872. } // (2) ensure zeebe:TaskHeaders
  4873. let taskHeaders = getTaskHeaders(element);
  4874. if (!taskHeaders) {
  4875. const parent = extensionElements;
  4876. taskHeaders = createElement('zeebe:TaskHeaders', {
  4877. values: []
  4878. }, parent, bpmnFactory);
  4879. commands.push({
  4880. cmd: 'element.updateModdleProperties',
  4881. context: {
  4882. element,
  4883. moddleElement: extensionElements,
  4884. properties: {
  4885. values: [...extensionElements.get('values'), taskHeaders]
  4886. }
  4887. }
  4888. });
  4889. } // (3) create header
  4890. const header = createElement('zeebe:Header', {}, taskHeaders, bpmnFactory); // (4) add header to list
  4891. commands.push({
  4892. cmd: 'element.updateModdleProperties',
  4893. context: {
  4894. element,
  4895. moddleElement: taskHeaders,
  4896. properties: {
  4897. values: [...taskHeaders.get('values'), header]
  4898. }
  4899. }
  4900. });
  4901. commandStack.execute('properties-panel.multi-command-executor', commands);
  4902. };
  4903. }
  4904. function InputOutputParameter$1(props) {
  4905. const {
  4906. idPrefix,
  4907. parameter
  4908. } = props;
  4909. const entries = [{
  4910. id: idPrefix + '-target',
  4911. component: TargetProperty,
  4912. idPrefix,
  4913. parameter
  4914. }, {
  4915. id: idPrefix + '-source',
  4916. component: SourceProperty,
  4917. idPrefix,
  4918. parameter
  4919. }];
  4920. return entries;
  4921. }
  4922. function TargetProperty(props) {
  4923. const {
  4924. idPrefix,
  4925. element,
  4926. parameter
  4927. } = props;
  4928. const commandStack = useService('commandStack');
  4929. const translate = useService('translate');
  4930. const debounce = useService('debounceInput');
  4931. const setValue = value => {
  4932. commandStack.execute('element.updateModdleProperties', {
  4933. element,
  4934. moddleElement: parameter,
  4935. properties: {
  4936. target: value
  4937. }
  4938. });
  4939. };
  4940. const getValue = parameter => {
  4941. return parameter.target;
  4942. };
  4943. return propertiesPanel.TextFieldEntry({
  4944. element: parameter,
  4945. id: idPrefix + '-target',
  4946. label: translate(ModelUtil.is(parameter, 'zeebe:Input') ? 'Local variable name' : 'Process variable name'),
  4947. getValue,
  4948. setValue,
  4949. debounce
  4950. });
  4951. }
  4952. function SourceProperty(props) {
  4953. const {
  4954. idPrefix,
  4955. element,
  4956. parameter
  4957. } = props;
  4958. const commandStack = useService('commandStack');
  4959. const translate = useService('translate');
  4960. const debounce = useService('debounceInput');
  4961. const setValue = value => {
  4962. commandStack.execute('element.updateModdleProperties', {
  4963. element,
  4964. moddleElement: parameter,
  4965. properties: {
  4966. source: value
  4967. }
  4968. });
  4969. };
  4970. const getValue = parameter => {
  4971. return parameter.source;
  4972. };
  4973. return withVariableContext(propertiesPanel.FeelEntry)({
  4974. bpmnElement: element,
  4975. element: parameter,
  4976. id: idPrefix + '-source',
  4977. label: translate('Variable assignment value'),
  4978. feel: 'required',
  4979. getValue,
  4980. setValue,
  4981. debounce
  4982. });
  4983. }
  4984. function getElements$1(bo, type, prop) {
  4985. const elems = getExtensionElementsList(bo, type);
  4986. return !prop ? elems : (elems[0] || {})[prop] || [];
  4987. }
  4988. function getParameters$1(element, prop) {
  4989. const ioMapping = getIoMapping(element);
  4990. return ioMapping && ioMapping.get(prop) || [];
  4991. }
  4992. /**
  4993. * Get a ioMapping from the business object
  4994. *
  4995. * @param {djs.model.Base} element
  4996. *
  4997. * @return {ModdleElement} the ioMapping object
  4998. */
  4999. function getIoMapping(element) {
  5000. const bo = ModelUtil.getBusinessObject(element);
  5001. return (getElements$1(bo, 'zeebe:IoMapping') || [])[0];
  5002. }
  5003. /**
  5004. * Return all input parameters existing in the business object, and
  5005. * an empty array if none exist.
  5006. *
  5007. * @param {djs.model.Base} element
  5008. *
  5009. * @return {Array} a list of input parameter objects
  5010. */
  5011. function getInputParameters$1(element) {
  5012. return getParameters$1.apply(this, [element, 'inputParameters']);
  5013. }
  5014. /**
  5015. * Return all output parameters existing in the business object, and
  5016. * an empty array if none exist.
  5017. *
  5018. * @param {djs.model.Base} element
  5019. *
  5020. * @return {Array} a list of output parameter objects
  5021. */
  5022. function getOutputParameters$1(element) {
  5023. return getParameters$1.apply(this, [element, 'outputParameters']);
  5024. }
  5025. function areInputParametersSupported$1(element) {
  5026. return ModelingUtil.isAny(element, ['bpmn:UserTask', 'bpmn:SubProcess', 'bpmn:CallActivity', 'bpmn:BusinessRuleTask']) || isZeebeServiceTask(element);
  5027. }
  5028. function areOutputParametersSupported$1(element) {
  5029. return ModelingUtil.isAny(element, ['zeebe:ZeebeServiceTask', 'bpmn:UserTask', 'bpmn:SubProcess', 'bpmn:ReceiveTask', 'bpmn:CallActivity', 'bpmn:Event', 'bpmn:BusinessRuleTask']);
  5030. }
  5031. function createIOMapping(properties, parent, bpmnFactory) {
  5032. return createElement('zeebe:IoMapping', properties, parent, bpmnFactory);
  5033. }
  5034. function InputProps$1({
  5035. element,
  5036. injector
  5037. }) {
  5038. if (!areInputParametersSupported$1(element)) {
  5039. return null;
  5040. }
  5041. const inputParameters = getInputParameters$1(element) || [];
  5042. const bpmnFactory = injector.get('bpmnFactory'),
  5043. commandStack = injector.get('commandStack');
  5044. const items = inputParameters.map((parameter, index) => {
  5045. const id = element.id + '-input-' + index;
  5046. return {
  5047. id,
  5048. label: parameter.get('target') || '',
  5049. entries: InputOutputParameter$1({
  5050. idPrefix: id,
  5051. element,
  5052. parameter
  5053. }),
  5054. autoFocusEntry: id + '-target',
  5055. remove: removeFactory$b({
  5056. commandStack,
  5057. element,
  5058. parameter
  5059. })
  5060. };
  5061. });
  5062. return {
  5063. items,
  5064. add: addFactory$8({
  5065. element,
  5066. bpmnFactory,
  5067. commandStack
  5068. })
  5069. };
  5070. }
  5071. function removeFactory$b({
  5072. commandStack,
  5073. element,
  5074. parameter
  5075. }) {
  5076. return function (event) {
  5077. event.stopPropagation();
  5078. const commands = [];
  5079. const ioMapping = getIoMapping(element);
  5080. if (!ioMapping) {
  5081. return;
  5082. }
  5083. const inputParameters = minDash.without(ioMapping.get('inputParameters'), parameter);
  5084. commands.push({
  5085. cmd: 'element.updateModdleProperties',
  5086. context: {
  5087. element,
  5088. moddleElement: ioMapping,
  5089. properties: {
  5090. inputParameters
  5091. }
  5092. }
  5093. });
  5094. const businessObject = ModelUtil.getBusinessObject(element),
  5095. extensionElements = businessObject.get('extensionElements'),
  5096. values = minDash.without(extensionElements.get('values'), ioMapping); // remove ioMapping if there are no input/output parameters anymore
  5097. if (!inputParameters.length && !ioMapping.get('outputParameters').length) {
  5098. commands.push({
  5099. cmd: 'element.updateModdleProperties',
  5100. context: {
  5101. element,
  5102. moddleElement: extensionElements,
  5103. properties: {
  5104. values
  5105. }
  5106. }
  5107. });
  5108. }
  5109. commandStack.execute('properties-panel.multi-command-executor', commands);
  5110. };
  5111. }
  5112. function addFactory$8({
  5113. element,
  5114. bpmnFactory,
  5115. commandStack
  5116. }) {
  5117. return function (event) {
  5118. event.stopPropagation();
  5119. const commands = [];
  5120. const businessObject = ModelUtil.getBusinessObject(element);
  5121. let extensionElements = businessObject.get('extensionElements'); // (1) ensure extension elements
  5122. if (!extensionElements) {
  5123. extensionElements = createElement('bpmn:ExtensionElements', {
  5124. values: []
  5125. }, businessObject, bpmnFactory);
  5126. commands.push({
  5127. cmd: 'element.updateModdleProperties',
  5128. context: {
  5129. element,
  5130. moddleElement: businessObject,
  5131. properties: {
  5132. extensionElements
  5133. }
  5134. }
  5135. });
  5136. } // (2) ensure IoMapping
  5137. let ioMapping = getIoMapping(element);
  5138. if (!ioMapping) {
  5139. ioMapping = createIOMapping({
  5140. inputParameters: [],
  5141. outputParameters: []
  5142. }, extensionElements, bpmnFactory);
  5143. commands.push({
  5144. cmd: 'element.updateModdleProperties',
  5145. context: {
  5146. element,
  5147. moddleElement: extensionElements,
  5148. properties: {
  5149. values: [...extensionElements.get('values'), ioMapping]
  5150. }
  5151. }
  5152. });
  5153. } // (3) create parameter
  5154. const newParameter = createElement('zeebe:Input', {
  5155. source: '=source',
  5156. target: nextId('InputVariable_')
  5157. }, ioMapping, bpmnFactory); // (4) add parameter to list
  5158. commands.push({
  5159. cmd: 'element.updateModdleProperties',
  5160. context: {
  5161. element,
  5162. moddleElement: ioMapping,
  5163. properties: {
  5164. inputParameters: [...ioMapping.get('inputParameters'), newParameter]
  5165. }
  5166. }
  5167. });
  5168. commandStack.execute('properties-panel.multi-command-executor', commands);
  5169. };
  5170. }
  5171. function MessageProps(props) {
  5172. const {
  5173. element
  5174. } = props;
  5175. const message = getMessage(element);
  5176. const entries = [];
  5177. if (message) {
  5178. entries.push({
  5179. id: 'messageName',
  5180. component: MessageName,
  5181. isEdited: propertiesPanel.isFeelEntryEdited
  5182. });
  5183. }
  5184. if (message && canHaveSubscriptionCorrelationKey(element)) {
  5185. entries.push({
  5186. id: 'messageSubscriptionCorrelationKey',
  5187. component: SubscriptionCorrelationKey,
  5188. isEdited: propertiesPanel.isFeelEntryEdited
  5189. });
  5190. }
  5191. return entries;
  5192. }
  5193. function MessageName(props) {
  5194. const {
  5195. element
  5196. } = props;
  5197. const commandStack = useService('commandStack');
  5198. const translate = useService('translate');
  5199. const debounce = useService('debounceInput');
  5200. const message = getMessage(element);
  5201. const getValue = () => {
  5202. return message.get('name');
  5203. };
  5204. const setValue = value => {
  5205. return commandStack.execute('element.updateModdleProperties', {
  5206. element,
  5207. moddleElement: message,
  5208. properties: {
  5209. name: value
  5210. }
  5211. });
  5212. };
  5213. return withVariableContext(propertiesPanel.FeelEntry)({
  5214. element,
  5215. id: 'messageName',
  5216. label: translate('Name'),
  5217. feel: 'optional',
  5218. getValue,
  5219. setValue,
  5220. debounce
  5221. });
  5222. }
  5223. function SubscriptionCorrelationKey(props) {
  5224. const {
  5225. element
  5226. } = props;
  5227. const bpmnFactory = useService('bpmnFactory');
  5228. const commandStack = useService('commandStack');
  5229. const translate = useService('translate');
  5230. const debounce = useService('debounceInput');
  5231. const getValue = () => {
  5232. return getCorrelationKey(element);
  5233. };
  5234. const setValue = value => {
  5235. const commands = [];
  5236. const message = getMessage(element);
  5237. let extensionElements = message.get('extensionElements'); // (1) ensure extension elements
  5238. if (!extensionElements) {
  5239. extensionElements = createElement('bpmn:ExtensionElements', {
  5240. values: []
  5241. }, message, bpmnFactory);
  5242. commands.push({
  5243. cmd: 'element.updateModdleProperties',
  5244. context: {
  5245. element,
  5246. moddleElement: message,
  5247. properties: {
  5248. extensionElements
  5249. }
  5250. }
  5251. });
  5252. } // (2) ensure subscription
  5253. let subscription = getSubscription(element);
  5254. if (!subscription) {
  5255. subscription = createElement('zeebe:Subscription', {}, extensionElements, bpmnFactory);
  5256. commands.push({
  5257. cmd: 'element.updateModdleProperties',
  5258. context: {
  5259. element,
  5260. moddleElement: extensionElements,
  5261. properties: {
  5262. values: [...extensionElements.get('values'), subscription]
  5263. }
  5264. }
  5265. });
  5266. } // (3) update subscription correlation key
  5267. commands.push({
  5268. cmd: 'element.updateModdleProperties',
  5269. context: {
  5270. element,
  5271. moddleElement: subscription,
  5272. properties: {
  5273. correlationKey: value
  5274. }
  5275. }
  5276. }); // (4) commit all updates
  5277. commandStack.execute('properties-panel.multi-command-executor', commands);
  5278. };
  5279. return withVariableContext(propertiesPanel.FeelEntry)({
  5280. element,
  5281. id: 'messageSubscriptionCorrelationKey',
  5282. label: translate('Subscription correlation key'),
  5283. feel: 'required',
  5284. getValue,
  5285. setValue,
  5286. debounce
  5287. });
  5288. } // helper ///////////////////////
  5289. function canHaveSubscriptionCorrelationKey(element) {
  5290. // (1) allow for receive task
  5291. if (ModelUtil.is(element, 'bpmn:ReceiveTask')) {
  5292. return true;
  5293. } // (2) allow for non start events
  5294. if (!ModelUtil.is(element, 'bpmn:StartEvent')) {
  5295. return true;
  5296. } // (3) allow for start events inside event sub processes
  5297. if (ModelUtil.is(element, 'bpmn:StartEvent') && DiUtil.isEventSubProcess(element.parent)) {
  5298. return true;
  5299. }
  5300. return false;
  5301. }
  5302. function getCorrelationKey(element) {
  5303. const subscription = getSubscription(element);
  5304. return subscription ? subscription.get('correlationKey') : '';
  5305. }
  5306. function getSubscription(element) {
  5307. const message = getMessage(element);
  5308. const subscriptions = getSubscriptions(message);
  5309. return subscriptions[0];
  5310. }
  5311. function getSubscriptions(message) {
  5312. const extensionElements = getExtensionElementsList(message, 'zeebe:Subscription');
  5313. return extensionElements;
  5314. }
  5315. function MultiInstanceProps$1(props) {
  5316. const {
  5317. element
  5318. } = props;
  5319. if (!supportsMultiInstances(element)) {
  5320. return [];
  5321. }
  5322. return [{
  5323. id: 'multiInstance-inputCollection',
  5324. component: InputCollection,
  5325. isEdited: propertiesPanel.isFeelEntryEdited
  5326. }, {
  5327. id: 'multiInstance-inputElement',
  5328. component: InputElement,
  5329. isEdited: propertiesPanel.isTextFieldEntryEdited
  5330. }, {
  5331. id: 'multiInstance-outputCollection',
  5332. component: OutputCollection,
  5333. isEdited: propertiesPanel.isTextFieldEntryEdited
  5334. }, {
  5335. id: 'multiInstance-outputElement',
  5336. component: OutputElement,
  5337. isEdited: propertiesPanel.isFeelEntryEdited
  5338. }, {
  5339. id: 'multiInstance-completionCondition',
  5340. component: CompletionCondition,
  5341. isEdited: propertiesPanel.isFeelEntryEdited
  5342. }];
  5343. }
  5344. function InputCollection(props) {
  5345. const {
  5346. element
  5347. } = props;
  5348. const commandStack = useService('commandStack');
  5349. const bpmnFactory = useService('bpmnFactory');
  5350. const translate = useService('translate');
  5351. const debounce = useService('debounceInput');
  5352. const getValue = () => {
  5353. return getProperty$1(element, 'inputCollection');
  5354. };
  5355. const setValue = value => {
  5356. return setProperty(element, 'inputCollection', value, commandStack, bpmnFactory);
  5357. };
  5358. return withVariableContext(propertiesPanel.FeelEntry)({
  5359. element,
  5360. id: 'multiInstance-inputCollection',
  5361. label: translate('Input collection'),
  5362. feel: 'required',
  5363. getValue,
  5364. setValue,
  5365. debounce
  5366. });
  5367. }
  5368. function InputElement(props) {
  5369. const {
  5370. element
  5371. } = props;
  5372. const commandStack = useService('commandStack');
  5373. const bpmnFactory = useService('bpmnFactory');
  5374. const translate = useService('translate');
  5375. const debounce = useService('debounceInput');
  5376. const getValue = () => {
  5377. return getProperty$1(element, 'inputElement');
  5378. };
  5379. const setValue = value => {
  5380. return setProperty(element, 'inputElement', value, commandStack, bpmnFactory);
  5381. };
  5382. return propertiesPanel.TextFieldEntry({
  5383. element,
  5384. id: 'multiInstance-inputElement',
  5385. label: translate('Input element'),
  5386. getValue,
  5387. setValue,
  5388. debounce
  5389. });
  5390. }
  5391. function OutputCollection(props) {
  5392. const {
  5393. element
  5394. } = props;
  5395. const commandStack = useService('commandStack');
  5396. const bpmnFactory = useService('bpmnFactory');
  5397. const translate = useService('translate');
  5398. const debounce = useService('debounceInput');
  5399. const getValue = () => {
  5400. return getProperty$1(element, 'outputCollection');
  5401. };
  5402. const setValue = value => {
  5403. return setProperty(element, 'outputCollection', value, commandStack, bpmnFactory);
  5404. };
  5405. return propertiesPanel.TextFieldEntry({
  5406. element,
  5407. id: 'multiInstance-outputCollection',
  5408. label: translate('Output collection'),
  5409. getValue,
  5410. setValue,
  5411. debounce
  5412. });
  5413. }
  5414. function OutputElement(props) {
  5415. const {
  5416. element
  5417. } = props;
  5418. const commandStack = useService('commandStack');
  5419. const bpmnFactory = useService('bpmnFactory');
  5420. const translate = useService('translate');
  5421. const debounce = useService('debounceInput');
  5422. const getValue = () => {
  5423. return getProperty$1(element, 'outputElement');
  5424. };
  5425. const setValue = value => {
  5426. return setProperty(element, 'outputElement', value, commandStack, bpmnFactory);
  5427. };
  5428. return withVariableContext(propertiesPanel.FeelEntry)({
  5429. element,
  5430. id: 'multiInstance-outputElement',
  5431. label: translate('Output element'),
  5432. feel: 'required',
  5433. getValue,
  5434. setValue,
  5435. debounce
  5436. });
  5437. }
  5438. function CompletionCondition(props) {
  5439. const {
  5440. element
  5441. } = props;
  5442. const commandStack = useService('commandStack');
  5443. const bpmnFactory = useService('bpmnFactory');
  5444. const translate = useService('translate');
  5445. const debounce = useService('debounceInput');
  5446. const getValue = () => {
  5447. const completionCondition = getCompletionCondition(element);
  5448. return completionCondition && completionCondition.get('body');
  5449. };
  5450. const setValue = value => {
  5451. if (value && value !== '') {
  5452. const loopCharacteristics = getLoopCharacteristics$1(element);
  5453. const completionCondition = createElement('bpmn:FormalExpression', {
  5454. body: value
  5455. }, loopCharacteristics, bpmnFactory);
  5456. setCompletionCondition(element, commandStack, completionCondition);
  5457. } else {
  5458. setCompletionCondition(element, commandStack, undefined);
  5459. }
  5460. };
  5461. return withVariableContext(propertiesPanel.FeelEntry)({
  5462. element,
  5463. id: 'multiInstance-completionCondition',
  5464. label: translate('Completion condition'),
  5465. feel: 'required',
  5466. getValue,
  5467. setValue,
  5468. debounce
  5469. });
  5470. } // helper ///////////////////////
  5471. function getLoopCharacteristics$1(element) {
  5472. const businessObject = ModelUtil.getBusinessObject(element);
  5473. return businessObject.get('loopCharacteristics');
  5474. }
  5475. function getZeebeLoopCharacteristics(loopCharacteristics) {
  5476. const extensionElements = getExtensionElementsList(loopCharacteristics, 'zeebe:LoopCharacteristics');
  5477. return extensionElements && extensionElements[0];
  5478. }
  5479. function supportsMultiInstances(element) {
  5480. return !!getLoopCharacteristics$1(element);
  5481. }
  5482. function getCompletionCondition(element) {
  5483. return getLoopCharacteristics$1(element).get('completionCondition');
  5484. }
  5485. function setCompletionCondition(element, commandStack, completionCondition = undefined) {
  5486. commandStack.execute('element.updateModdleProperties', {
  5487. element,
  5488. moddleElement: getLoopCharacteristics$1(element),
  5489. properties: {
  5490. completionCondition
  5491. }
  5492. });
  5493. }
  5494. function getProperty$1(element, propertyName) {
  5495. const loopCharacteristics = getLoopCharacteristics$1(element),
  5496. zeebeLoopCharacteristics = getZeebeLoopCharacteristics(loopCharacteristics);
  5497. return zeebeLoopCharacteristics && zeebeLoopCharacteristics.get(propertyName);
  5498. }
  5499. function setProperty(element, propertyName, value, commandStack, bpmnFactory) {
  5500. const loopCharacteristics = getLoopCharacteristics$1(element);
  5501. const commands = []; // (1) ensure extension elements
  5502. let extensionElements = loopCharacteristics.get('extensionElements');
  5503. if (!extensionElements) {
  5504. extensionElements = createElement('bpmn:ExtensionElements', {
  5505. values: []
  5506. }, loopCharacteristics, bpmnFactory);
  5507. commands.push({
  5508. cmd: 'element.updateModdleProperties',
  5509. context: {
  5510. element,
  5511. moddleElement: loopCharacteristics,
  5512. properties: {
  5513. extensionElements
  5514. }
  5515. }
  5516. });
  5517. } // (2) ensure zeebe loop characteristics
  5518. let zeebeLoopCharacteristics = getZeebeLoopCharacteristics(loopCharacteristics);
  5519. if (!zeebeLoopCharacteristics) {
  5520. zeebeLoopCharacteristics = createElement('zeebe:LoopCharacteristics', {}, extensionElements, bpmnFactory);
  5521. commands.push({
  5522. cmd: 'element.updateModdleProperties',
  5523. context: {
  5524. element,
  5525. moddleElement: extensionElements,
  5526. properties: {
  5527. values: [...extensionElements.get('values'), zeebeLoopCharacteristics]
  5528. }
  5529. }
  5530. });
  5531. } // (3) update defined property
  5532. commands.push({
  5533. cmd: 'element.updateModdleProperties',
  5534. context: {
  5535. element,
  5536. moddleElement: zeebeLoopCharacteristics,
  5537. properties: {
  5538. [propertyName]: value
  5539. }
  5540. }
  5541. }); // (4) commit all updates
  5542. commandStack.execute('properties-panel.multi-command-executor', commands);
  5543. }
  5544. function getProcessId(element) {
  5545. const calledElement = getCalledElement(element);
  5546. return calledElement ? calledElement.get('processId') : '';
  5547. }
  5548. function getCalledElement(element) {
  5549. const calledElements = getCalledElements(element);
  5550. return calledElements[0];
  5551. }
  5552. function getCalledElements(element) {
  5553. const bo = ModelUtil.getBusinessObject(element);
  5554. const extElements = getExtensionElementsList(bo, 'zeebe:CalledElement');
  5555. return extElements;
  5556. }
  5557. function OutputPropagationProps(props) {
  5558. const {
  5559. element
  5560. } = props;
  5561. if (!ModelUtil.is(element, 'bpmn:CallActivity')) {
  5562. return [];
  5563. }
  5564. return [{
  5565. id: 'propagateAllChildVariables',
  5566. component: PropagateAllChildVariables,
  5567. isEdited: propertiesPanel.isToggleSwitchEntryEdited
  5568. }];
  5569. }
  5570. function PropagateAllChildVariables(props) {
  5571. const {
  5572. element
  5573. } = props;
  5574. const commandStack = useService('commandStack'),
  5575. bpmnFactory = useService('bpmnFactory'),
  5576. translate = useService('translate');
  5577. const propagateAllChildVariables = isPropagateAllChildVariables(element);
  5578. const getValue = () => {
  5579. return propagateAllChildVariables;
  5580. };
  5581. const setValue = value => {
  5582. const commands = [];
  5583. const businessObject = ModelUtil.getBusinessObject(element); // (1) ensure extension elements
  5584. let extensionElements = businessObject.get('extensionElements');
  5585. if (!extensionElements) {
  5586. extensionElements = createElement('bpmn:ExtensionElements', {
  5587. values: []
  5588. }, businessObject, bpmnFactory);
  5589. commands.push({
  5590. cmd: 'element.updateModdleProperties',
  5591. context: {
  5592. element,
  5593. moddleElement: businessObject,
  5594. properties: {
  5595. extensionElements
  5596. }
  5597. }
  5598. });
  5599. } // (2) ensure zeebe:calledElement
  5600. let calledElement = getCalledElement(businessObject);
  5601. if (!calledElement) {
  5602. calledElement = createElement('zeebe:CalledElement', {}, extensionElements, bpmnFactory);
  5603. commands.push({
  5604. cmd: 'element.updateModdleProperties',
  5605. context: {
  5606. element,
  5607. moddleElement: extensionElements,
  5608. properties: {
  5609. values: [...extensionElements.get('values'), calledElement]
  5610. }
  5611. }
  5612. });
  5613. } // (3) Update propagateAllChildVariables attribute
  5614. commands.push({
  5615. cmd: 'element.updateModdleProperties',
  5616. context: {
  5617. element,
  5618. moddleElement: calledElement,
  5619. properties: {
  5620. propagateAllChildVariables: value
  5621. }
  5622. }
  5623. }); // (4) Execute the commands
  5624. commandStack.execute('properties-panel.multi-command-executor', commands);
  5625. };
  5626. return propertiesPanel.ToggleSwitchEntry({
  5627. id: 'propagateAllChildVariables',
  5628. label: translate('Propagate all child process variables'),
  5629. switcherLabel: propagateAllChildVariables ? translate('On') : translate('Off'),
  5630. description: propagateAllChildVariables ? translate('All variables from the child process instance will be propagated to the parent process instance') : translate('Only variables defined via output mappings will be propagated from the child to the parent process instance'),
  5631. getValue,
  5632. setValue
  5633. });
  5634. } // helper //////////////////////////
  5635. /**
  5636. * Determine default value for propagateAllChildVariables attribute
  5637. * @param {Object} element representing a bpmn:CallActivity
  5638. *
  5639. * @returns {boolean}
  5640. */
  5641. function determinePropAllChildVariablesDefault(element) {
  5642. const outputParameters = getOutputParameters$1(element);
  5643. if (outputParameters) {
  5644. return outputParameters.length > 0 ? false : true;
  5645. }
  5646. }
  5647. /**
  5648. * Check whether the propagateAllChildVariables attribute is set on an element.
  5649. * Note that a default logic will be determine if it is not explicitly set.
  5650. * @param {Object} element
  5651. *
  5652. * @returns {boolean}
  5653. */
  5654. function isPropagateAllChildVariables(element) {
  5655. if (!ModelUtil.is(element, 'bpmn:CallActivity')) {
  5656. return undefined;
  5657. }
  5658. const bo = ModelUtil.getBusinessObject(element),
  5659. calledElement = getCalledElement(bo);
  5660. return calledElement && minDash.has(calledElement, 'propagateAllChildVariables') ? calledElement.get('propagateAllChildVariables') : determinePropAllChildVariablesDefault(element);
  5661. }
  5662. function OutputProps$1({
  5663. element,
  5664. injector
  5665. }) {
  5666. if (!areOutputParametersSupported$1(element)) {
  5667. return null;
  5668. }
  5669. const outputParameters = getOutputParameters$1(element) || [];
  5670. const bpmnFactory = injector.get('bpmnFactory'),
  5671. commandStack = injector.get('commandStack');
  5672. const items = outputParameters.map((parameter, index) => {
  5673. const id = element.id + '-output-' + index;
  5674. return {
  5675. id,
  5676. label: parameter.get('target') || '',
  5677. entries: InputOutputParameter$1({
  5678. idPrefix: id,
  5679. element,
  5680. parameter
  5681. }),
  5682. autoFocusEntry: id + '-target',
  5683. remove: removeFactory$a({
  5684. commandStack,
  5685. element,
  5686. parameter
  5687. })
  5688. };
  5689. });
  5690. return {
  5691. items,
  5692. add: addFactory$7({
  5693. element,
  5694. bpmnFactory,
  5695. commandStack
  5696. })
  5697. };
  5698. }
  5699. function removeFactory$a({
  5700. commandStack,
  5701. element,
  5702. parameter
  5703. }) {
  5704. return function (event) {
  5705. event.stopPropagation();
  5706. let commands = [];
  5707. const ioMapping = getIoMapping(element);
  5708. if (!ioMapping) {
  5709. return;
  5710. }
  5711. const outputParameters = minDash.without(ioMapping.get('outputParameters'), parameter);
  5712. commands.push({
  5713. cmd: 'element.updateModdleProperties',
  5714. context: {
  5715. element,
  5716. moddleElement: ioMapping,
  5717. properties: {
  5718. outputParameters
  5719. }
  5720. }
  5721. }); // remove ioMapping if there are no input/output parameters anymore
  5722. if (!ioMapping.get('inputParameters').length && !outputParameters.length) {
  5723. const businessObject = ModelUtil.getBusinessObject(element),
  5724. extensionElements = businessObject.get('extensionElements'),
  5725. values = minDash.without(extensionElements.get('values'), ioMapping);
  5726. commands.push({
  5727. cmd: 'element.updateModdleProperties',
  5728. context: {
  5729. element,
  5730. moddleElement: extensionElements,
  5731. properties: {
  5732. values
  5733. }
  5734. }
  5735. });
  5736. }
  5737. commandStack.execute('properties-panel.multi-command-executor', commands);
  5738. };
  5739. }
  5740. function addFactory$7({
  5741. element,
  5742. bpmnFactory,
  5743. commandStack
  5744. }) {
  5745. return function (event) {
  5746. event.stopPropagation();
  5747. let commands = [];
  5748. const businessObject = ModelUtil.getBusinessObject(element);
  5749. let extensionElements = businessObject.get('extensionElements'); // (1) ensure extension elements
  5750. if (!extensionElements) {
  5751. extensionElements = createElement('bpmn:ExtensionElements', {
  5752. values: []
  5753. }, businessObject, bpmnFactory);
  5754. commands.push({
  5755. cmd: 'element.updateModdleProperties',
  5756. context: {
  5757. element,
  5758. moddleElement: businessObject,
  5759. properties: {
  5760. extensionElements
  5761. }
  5762. }
  5763. });
  5764. } // (2) ensure IoMapping
  5765. let ioMapping = getIoMapping(element);
  5766. if (!ioMapping) {
  5767. const parent = extensionElements;
  5768. ioMapping = createIOMapping({
  5769. inputParameters: [],
  5770. outputParameters: []
  5771. }, parent, bpmnFactory);
  5772. commands.push({
  5773. cmd: 'element.updateModdleProperties',
  5774. context: {
  5775. element,
  5776. moddleElement: extensionElements,
  5777. properties: {
  5778. values: [...extensionElements.get('values'), ioMapping]
  5779. }
  5780. }
  5781. });
  5782. } // (3) create parameter
  5783. const newParameter = createElement('zeebe:Output', {
  5784. source: '=source',
  5785. target: nextId('OutputVariable_')
  5786. }, ioMapping, bpmnFactory); // (4) add parameter to list
  5787. commands.push({
  5788. cmd: 'element.updateModdleProperties',
  5789. context: {
  5790. element,
  5791. moddleElement: ioMapping,
  5792. properties: {
  5793. outputParameters: [...ioMapping.get('outputParameters'), newParameter]
  5794. }
  5795. }
  5796. });
  5797. commandStack.execute('properties-panel.multi-command-executor', commands);
  5798. };
  5799. }
  5800. function TargetProps(props) {
  5801. const {
  5802. element
  5803. } = props;
  5804. if (!ModelUtil.is(element, 'bpmn:CallActivity')) {
  5805. return [];
  5806. }
  5807. return [{
  5808. id: 'targetProcessId',
  5809. component: TargetProcessId,
  5810. isEdited: propertiesPanel.isFeelEntryEdited
  5811. }];
  5812. }
  5813. function TargetProcessId(props) {
  5814. const {
  5815. element,
  5816. id
  5817. } = props;
  5818. const commandStack = useService('commandStack'),
  5819. bpmnFactory = useService('bpmnFactory'),
  5820. translate = useService('translate'),
  5821. debounce = useService('debounceInput');
  5822. const getValue = () => {
  5823. return getProcessId(element);
  5824. };
  5825. const setValue = value => {
  5826. const commands = [];
  5827. const businessObject = ModelUtil.getBusinessObject(element); // (1) ensure extension elements
  5828. let extensionElements = businessObject.get('extensionElements');
  5829. if (!extensionElements) {
  5830. extensionElements = createElement('bpmn:ExtensionElements', {
  5831. values: []
  5832. }, businessObject, bpmnFactory);
  5833. commands.push({
  5834. cmd: 'element.updateModdleProperties',
  5835. context: {
  5836. element,
  5837. moddleElement: businessObject,
  5838. properties: {
  5839. extensionElements
  5840. }
  5841. }
  5842. });
  5843. } // (2) ensure zeebe:calledElement
  5844. let calledElement = getCalledElement(businessObject);
  5845. if (!calledElement) {
  5846. calledElement = createElement('zeebe:CalledElement', {}, extensionElements, bpmnFactory);
  5847. commands.push({
  5848. cmd: 'element.updateModdleProperties',
  5849. context: {
  5850. element,
  5851. moddleElement: extensionElements,
  5852. properties: {
  5853. values: [...extensionElements.get('values'), calledElement]
  5854. }
  5855. }
  5856. });
  5857. } // (3) Update processId attribute
  5858. commands.push({
  5859. cmd: 'element.updateModdleProperties',
  5860. context: {
  5861. element,
  5862. moddleElement: calledElement,
  5863. properties: {
  5864. processId: value
  5865. }
  5866. }
  5867. }); // (4) Execute the commands
  5868. commandStack.execute('properties-panel.multi-command-executor', commands);
  5869. };
  5870. return withVariableContext(propertiesPanel.FeelEntry)({
  5871. element,
  5872. id,
  5873. label: translate('Process ID'),
  5874. feel: 'optional',
  5875. getValue,
  5876. setValue,
  5877. debounce
  5878. });
  5879. }
  5880. function TaskDefinitionProps(props) {
  5881. const {
  5882. element
  5883. } = props;
  5884. if (!isZeebeServiceTask(element)) {
  5885. return [];
  5886. }
  5887. return [{
  5888. id: 'taskDefinitionType',
  5889. component: TaskDefinitionType,
  5890. isEdited: propertiesPanel.isFeelEntryEdited
  5891. }, {
  5892. id: 'taskDefinitionRetries',
  5893. component: TaskDefinitionRetries,
  5894. isEdited: propertiesPanel.isFeelEntryEdited
  5895. }];
  5896. }
  5897. function TaskDefinitionType(props) {
  5898. const {
  5899. element,
  5900. id
  5901. } = props;
  5902. const commandStack = useService('commandStack');
  5903. const bpmnFactory = useService('bpmnFactory');
  5904. const translate = useService('translate');
  5905. const debounce = useService('debounceInput');
  5906. const getValue = () => {
  5907. return (getTaskDefinition(element) || {}).type;
  5908. };
  5909. const setValue = value => {
  5910. const commands = [];
  5911. const businessObject = ModelUtil.getBusinessObject(element);
  5912. let extensionElements = businessObject.get('extensionElements'); // (1) ensure extension elements
  5913. if (!extensionElements) {
  5914. extensionElements = createElement('bpmn:ExtensionElements', {
  5915. values: []
  5916. }, businessObject, bpmnFactory);
  5917. commands.push({
  5918. cmd: 'element.updateModdleProperties',
  5919. context: {
  5920. element,
  5921. moddleElement: businessObject,
  5922. properties: {
  5923. extensionElements
  5924. }
  5925. }
  5926. });
  5927. } // (2) ensure task definition
  5928. let taskDefinition = getTaskDefinition(element);
  5929. if (!taskDefinition) {
  5930. taskDefinition = createElement('zeebe:TaskDefinition', {}, extensionElements, bpmnFactory);
  5931. commands.push({
  5932. cmd: 'element.updateModdleProperties',
  5933. context: {
  5934. element,
  5935. moddleElement: extensionElements,
  5936. properties: {
  5937. values: [...extensionElements.get('values'), taskDefinition]
  5938. }
  5939. }
  5940. });
  5941. } // (3) update task definition type
  5942. commands.push({
  5943. cmd: 'element.updateModdleProperties',
  5944. context: {
  5945. element,
  5946. moddleElement: taskDefinition,
  5947. properties: {
  5948. type: value
  5949. }
  5950. }
  5951. }); // (4) commit all updates
  5952. commandStack.execute('properties-panel.multi-command-executor', commands);
  5953. };
  5954. return withVariableContext(propertiesPanel.FeelEntry)({
  5955. element,
  5956. id,
  5957. label: translate('Type'),
  5958. feel: 'optional',
  5959. getValue,
  5960. setValue,
  5961. debounce
  5962. });
  5963. }
  5964. function TaskDefinitionRetries(props) {
  5965. const {
  5966. element,
  5967. id
  5968. } = props;
  5969. const commandStack = useService('commandStack');
  5970. const bpmnFactory = useService('bpmnFactory');
  5971. const translate = useService('translate');
  5972. const debounce = useService('debounceInput');
  5973. const getValue = () => {
  5974. return (getTaskDefinition(element) || {}).retries;
  5975. };
  5976. const setValue = value => {
  5977. let commands = [];
  5978. const businessObject = ModelUtil.getBusinessObject(element);
  5979. let extensionElements = businessObject.get('extensionElements'); // (1) ensure extension elements
  5980. if (!extensionElements) {
  5981. extensionElements = createElement('bpmn:ExtensionElements', {
  5982. values: []
  5983. }, businessObject, bpmnFactory);
  5984. commands.push({
  5985. cmd: 'element.updateModdleProperties',
  5986. context: {
  5987. element,
  5988. moddleElement: businessObject,
  5989. properties: {
  5990. extensionElements
  5991. }
  5992. }
  5993. });
  5994. } // (2) ensure task definition
  5995. let taskDefinition = getTaskDefinition(element);
  5996. if (!taskDefinition) {
  5997. taskDefinition = createElement('zeebe:TaskDefinition', {}, extensionElements, bpmnFactory);
  5998. commands.push({
  5999. cmd: 'element.updateModdleProperties',
  6000. context: {
  6001. element,
  6002. moddleElement: extensionElements,
  6003. properties: {
  6004. values: [...extensionElements.get('values'), taskDefinition]
  6005. }
  6006. }
  6007. });
  6008. } // (3) update task definition retries
  6009. commands.push({
  6010. cmd: 'element.updateModdleProperties',
  6011. context: {
  6012. element,
  6013. moddleElement: taskDefinition,
  6014. properties: {
  6015. retries: value
  6016. }
  6017. }
  6018. });
  6019. commandStack.execute('properties-panel.multi-command-executor', commands);
  6020. };
  6021. return withVariableContext(propertiesPanel.FeelEntry)({
  6022. element,
  6023. id,
  6024. label: translate('Retries'),
  6025. feel: 'optional',
  6026. getValue,
  6027. setValue,
  6028. debounce
  6029. });
  6030. } // helper ///////////////////////
  6031. function getTaskDefinition(element) {
  6032. const businessObject = ModelUtil.getBusinessObject(element);
  6033. return getExtensionElementsList(businessObject, 'zeebe:TaskDefinition')[0];
  6034. }
  6035. function TimerProps(props) {
  6036. const {
  6037. element
  6038. } = props;
  6039. const businessObject = ModelUtil.getBusinessObject(element),
  6040. timerEventDefinition = getTimerEventDefinition(businessObject),
  6041. timerEventDefinitionType = getTimerDefinitionType(timerEventDefinition); // (1) Only show for supported elements
  6042. if (!isTimerSupported(element)) {
  6043. return [];
  6044. } // (2) Return duration-specific TexField only if only duration is supported
  6045. const onlySupportDuration = !isTimerDefinitionTypeSupported('timeCycle', element) && !isTimerDefinitionTypeSupported('timeDate', element); // (3) Only provide duration-specific textField if only duration is supported,
  6046. // otherwise push type-select and generic textField is type was selected
  6047. const entries = [];
  6048. if (onlySupportDuration) {
  6049. entries.push({
  6050. id: 'timerEventDefinitionDurationValue',
  6051. component: TimerEventDefinitionDurationValue,
  6052. isEdited: propertiesPanel.isFeelEntryEdited
  6053. });
  6054. } else {
  6055. entries.push({
  6056. id: 'timerEventDefinitionType',
  6057. component: TimerEventDefinitionType,
  6058. isEdited: propertiesPanel.isSelectEntryEdited
  6059. });
  6060. if (timerEventDefinitionType) {
  6061. entries.push({
  6062. id: 'timerEventDefinitionValue',
  6063. component: TimerEventDefinitionValue,
  6064. isEdited: propertiesPanel.isFeelEntryEdited
  6065. });
  6066. }
  6067. }
  6068. return entries;
  6069. }
  6070. /**
  6071. * TimerEventDefinitionType - Generic select entry allowing to select a specific
  6072. * timerEventDefintionType. To be used together with timerEventDefinitionValue.
  6073. *
  6074. * @param {type} props
  6075. * @return {SelectEntry}
  6076. */
  6077. function TimerEventDefinitionType(props) {
  6078. const {
  6079. element
  6080. } = props;
  6081. const commandStack = useService('commandStack'),
  6082. bpmnFactory = useService('bpmnFactory'),
  6083. translate = useService('translate');
  6084. const businessObject = ModelUtil.getBusinessObject(element),
  6085. timerEventDefinition = getTimerEventDefinition(businessObject),
  6086. timerEventDefinitionType = getTimerDefinitionType(timerEventDefinition);
  6087. const getValue = () => {
  6088. return timerEventDefinitionType || '';
  6089. };
  6090. const setValue = value => {
  6091. // (1) Check if value is different to current type
  6092. if (value === timerEventDefinitionType) {
  6093. return;
  6094. } // (2) Create empty formalExpression element
  6095. const formalExpression = bpmnFactory.create('bpmn:FormalExpression', {
  6096. body: undefined
  6097. });
  6098. formalExpression.$parent = timerEventDefinition; // (3) Set the value for selected timerEventDefinitionType
  6099. const newProps = {
  6100. timeDuration: undefined,
  6101. timeDate: undefined,
  6102. timeCycle: undefined
  6103. };
  6104. newProps[value] = formalExpression; // (4) Execute businessObject update
  6105. commandStack.execute('element.updateModdleProperties', {
  6106. element,
  6107. moddleElement: timerEventDefinition,
  6108. properties: newProps
  6109. });
  6110. };
  6111. const getOptions = element => {
  6112. const options = [{
  6113. value: '',
  6114. label: translate('<none>')
  6115. }];
  6116. if (isTimerDefinitionTypeSupported('timeDate', element)) {
  6117. options.push({
  6118. value: 'timeDate',
  6119. label: translate('Date')
  6120. });
  6121. }
  6122. if (isTimerDefinitionTypeSupported('timeDuration', element)) {
  6123. options.push({
  6124. value: 'timeDuration',
  6125. label: translate('Duration')
  6126. });
  6127. }
  6128. if (isTimerDefinitionTypeSupported('timeCycle', element)) {
  6129. options.push({
  6130. value: 'timeCycle',
  6131. label: translate('Cycle')
  6132. });
  6133. }
  6134. return options;
  6135. };
  6136. return propertiesPanel.SelectEntry({
  6137. element,
  6138. id: 'timerEventDefinitionType',
  6139. label: translate('Type'),
  6140. getValue,
  6141. setValue,
  6142. getOptions
  6143. });
  6144. }
  6145. /**
  6146. * TimerEventDefinitionValue - Generic textField entry allowing to specify the
  6147. * timerEventDefintionValue based on the set timerEventDefintionType. To be used
  6148. * together with timerEventDefinitionType.
  6149. *
  6150. * @param {type} props
  6151. * @return {TextFieldEntry}
  6152. */
  6153. function TimerEventDefinitionValue(props) {
  6154. const {
  6155. element
  6156. } = props;
  6157. const commandStack = useService('commandStack'),
  6158. translate = useService('translate'),
  6159. debounce = useService('debounceInput');
  6160. const businessObject = ModelUtil.getBusinessObject(element),
  6161. timerEventDefinition = getTimerEventDefinition(businessObject),
  6162. timerEventDefinitionType = getTimerDefinitionType(timerEventDefinition),
  6163. timerEventFormalExpression = timerEventDefinition.get(timerEventDefinitionType);
  6164. const getValue = () => {
  6165. return timerEventFormalExpression && timerEventFormalExpression.get('body');
  6166. };
  6167. const setValue = value => {
  6168. commandStack.execute('element.updateModdleProperties', {
  6169. element,
  6170. moddleElement: timerEventFormalExpression,
  6171. properties: {
  6172. body: value
  6173. }
  6174. });
  6175. };
  6176. return withVariableContext(propertiesPanel.FeelEntry)({
  6177. element,
  6178. id: 'timerEventDefinitionValue',
  6179. label: translate('Value'),
  6180. feel: 'optional',
  6181. getValue,
  6182. setValue,
  6183. debounce,
  6184. description: getTimerEventDefinitionValueDescription(timerEventDefinitionType, translate)
  6185. });
  6186. }
  6187. /**
  6188. * TimerEventDefinitionDurationValue - textField entry allowing to specify the
  6189. * duration value. This is to be used stand-alone, without the TimerEventDefinitionType
  6190. *
  6191. * @param {type} props
  6192. * @return {TextFieldEntry}
  6193. */
  6194. function TimerEventDefinitionDurationValue(props) {
  6195. const {
  6196. element
  6197. } = props;
  6198. const bpmnFactory = useService('bpmnFactory'),
  6199. commandStack = useService('commandStack'),
  6200. translate = useService('translate'),
  6201. debounce = useService('debounceInput');
  6202. const businessObject = ModelUtil.getBusinessObject(element),
  6203. timerEventDefinition = getTimerEventDefinition(businessObject);
  6204. let timerEventFormalExpression = timerEventDefinition.get('timeDuration');
  6205. const getValue = () => {
  6206. return timerEventFormalExpression && timerEventFormalExpression.get('body');
  6207. };
  6208. const setValue = value => {
  6209. const commands = []; // (1) re-use formalExpression
  6210. if (!timerEventFormalExpression) {
  6211. timerEventFormalExpression = bpmnFactory.create('bpmn:FormalExpression', {
  6212. body: undefined
  6213. });
  6214. timerEventFormalExpression.$parent = timerEventDefinition; // (1.1) update the formalExpression
  6215. const properties = {
  6216. timeDuration: timerEventFormalExpression,
  6217. timeDate: undefined,
  6218. timeCycle: undefined
  6219. }; // (1.2) push command
  6220. commands.push({
  6221. cmd: 'element.updateModdleProperties',
  6222. context: {
  6223. element,
  6224. moddleElement: timerEventDefinition,
  6225. properties
  6226. }
  6227. });
  6228. } // (2) update value
  6229. commands.push({
  6230. cmd: 'element.updateModdleProperties',
  6231. context: {
  6232. element,
  6233. moddleElement: timerEventFormalExpression,
  6234. properties: {
  6235. body: value
  6236. }
  6237. }
  6238. }); // (3) commit all commands
  6239. commandStack.execute('properties-panel.multi-command-executor', commands);
  6240. };
  6241. return withVariableContext(propertiesPanel.FeelEntry)({
  6242. element,
  6243. id: 'timerEventDefinitionDurationValue',
  6244. label: translate('Timer duration'),
  6245. feel: 'optional',
  6246. getValue,
  6247. setValue,
  6248. debounce,
  6249. description: getTimerEventDefinitionValueDescription('timeDuration', translate)
  6250. });
  6251. } // helper //////////////////////////
  6252. /**
  6253. * isTimerDefinitionTypeSupported - Checks whether a given timerDefinitionType
  6254. * is supported for a given element
  6255. *
  6256. * @param {string} timerDefinitionType
  6257. * @param {ModdleElement} element
  6258. *
  6259. * @return {boolean}
  6260. */
  6261. function isTimerDefinitionTypeSupported(timerDefinitionType, element) {
  6262. const businessObject = ModelUtil.getBusinessObject(element);
  6263. switch (timerDefinitionType) {
  6264. case 'timeDate':
  6265. if (ModelUtil.is(element, 'bpmn:StartEvent')) {
  6266. return true;
  6267. }
  6268. return false;
  6269. case 'timeCycle':
  6270. if (ModelUtil.is(element, 'bpmn:StartEvent')) {
  6271. return true;
  6272. }
  6273. if (ModelUtil.is(element, 'bpmn:BoundaryEvent') && !businessObject.cancelActivity) {
  6274. return true;
  6275. }
  6276. return false;
  6277. case 'timeDuration':
  6278. if (ModelUtil.is(element, 'bpmn:IntermediateCatchEvent')) {
  6279. return true;
  6280. }
  6281. if (ModelUtil.is(element, 'bpmn:BoundaryEvent') && !businessObject.cancelActivity) {
  6282. return true;
  6283. }
  6284. return false;
  6285. default:
  6286. return undefined;
  6287. }
  6288. }
  6289. function getTimerEventDefinitionValueDescription(timerDefinitionType, translate) {
  6290. switch (timerDefinitionType) {
  6291. case 'timeDate':
  6292. return jsxRuntime.jsxs("div", {
  6293. children: [jsxRuntime.jsx("p", {
  6294. children: translate('A specific point in time defined as ISO 8601 combined date and time representation.')
  6295. }), jsxRuntime.jsxs("ul", {
  6296. children: [jsxRuntime.jsxs("li", {
  6297. children: [jsxRuntime.jsx("code", {
  6298. children: "2019-10-01T12:00:00Z"
  6299. }), " - ", translate('UTC time')]
  6300. }), jsxRuntime.jsxs("li", {
  6301. children: [jsxRuntime.jsx("code", {
  6302. children: "2019-10-02T08:09:40+02:00"
  6303. }), " - ", translate('UTC plus 2 hours zone offset')]
  6304. })]
  6305. }), jsxRuntime.jsx("a", {
  6306. href: "https://docs.camunda.io/docs/reference/bpmn-processes/timer-events/timer-events#time-date",
  6307. target: "_blank",
  6308. rel: "noopener",
  6309. title: translate('Timer documentation'),
  6310. children: translate('How to configure a timer')
  6311. })]
  6312. });
  6313. case 'timeCycle':
  6314. return jsxRuntime.jsxs("div", {
  6315. children: [jsxRuntime.jsx("p", {
  6316. children: translate('A cycle defined as ISO 8601 repeating intervals format.')
  6317. }), jsxRuntime.jsxs("ul", {
  6318. children: [jsxRuntime.jsxs("li", {
  6319. children: [jsxRuntime.jsx("code", {
  6320. children: "R5/PT10S"
  6321. }), " - ", translate('every 10 seconds, up to 5 times')]
  6322. }), jsxRuntime.jsxs("li", {
  6323. children: [jsxRuntime.jsx("code", {
  6324. children: "R/P1D"
  6325. }), " - ", translate('every day, infinitely')]
  6326. })]
  6327. }), jsxRuntime.jsx("a", {
  6328. href: "https://docs.camunda.io/docs/reference/bpmn-processes/timer-events/timer-events#time-cycle",
  6329. target: "_blank",
  6330. rel: "noopener",
  6331. title: translate('Timer documentation'),
  6332. children: translate('How to configure a timer')
  6333. })]
  6334. });
  6335. case 'timeDuration':
  6336. return jsxRuntime.jsxs("div", {
  6337. children: [jsxRuntime.jsx("p", {
  6338. children: translate('A time duration defined as ISO 8601 durations format.')
  6339. }), jsxRuntime.jsxs("ul", {
  6340. children: [jsxRuntime.jsxs("li", {
  6341. children: [jsxRuntime.jsx("code", {
  6342. children: "PT15S"
  6343. }), " - ", translate('15 seconds')]
  6344. }), jsxRuntime.jsxs("li", {
  6345. children: [jsxRuntime.jsx("code", {
  6346. children: "PT1H30M"
  6347. }), " - ", translate('1 hour and 30 minutes')]
  6348. }), jsxRuntime.jsxs("li", {
  6349. children: [jsxRuntime.jsx("code", {
  6350. children: "P14D"
  6351. }), " - ", translate('14 days')]
  6352. })]
  6353. }), jsxRuntime.jsx("a", {
  6354. href: "https://docs.camunda.io/docs/reference/bpmn-processes/timer-events/timer-events#time-duration",
  6355. target: "_blank",
  6356. rel: "noopener",
  6357. title: translate('Timer documentation'),
  6358. children: translate('How to configure a timer')
  6359. })]
  6360. });
  6361. }
  6362. }
  6363. const LOW_PRIORITY$1 = 500;
  6364. const ZEEBE_GROUPS = [BusinessRuleImplementationGroup, CalledDecisionGroup, TaskDefinitionGroup, AssignmentDefinitionGroup, FormGroup$1, ConditionGroup$1, TargetGroup, InputGroup$1, OutputPropagationGroup, OutputGroup$1, HeaderGroup];
  6365. class ZeebePropertiesProvider {
  6366. constructor(propertiesPanel, injector) {
  6367. propertiesPanel.registerProvider(LOW_PRIORITY$1, this);
  6368. this._injector = injector;
  6369. }
  6370. getGroups(element) {
  6371. return groups => {
  6372. // (1) add zeebe specific groups
  6373. groups = groups.concat(this._getGroups(element)); // (2) update existing groups with zeebe specific properties
  6374. updateMessageGroup(groups, element);
  6375. updateTimerGroup(groups, element);
  6376. updateMultiInstanceGroup$1(groups, element); // (3) remove message group when not applicable
  6377. groups = removeMessageGroup(groups, element);
  6378. return groups;
  6379. };
  6380. }
  6381. _getGroups(element) {
  6382. const groups = ZEEBE_GROUPS.map(createGroup => createGroup(element, this._injector));
  6383. return groups.filter(group => group !== null);
  6384. }
  6385. }
  6386. ZeebePropertiesProvider.$inject = ['propertiesPanel', 'injector'];
  6387. function CalledDecisionGroup(element) {
  6388. const group = {
  6389. id: 'calledDecision',
  6390. label: 'Called decision',
  6391. entries: [...CalledDecisionProps({
  6392. element
  6393. })],
  6394. component: propertiesPanel.Group
  6395. };
  6396. return group.entries.length ? group : null;
  6397. }
  6398. function TaskDefinitionGroup(element) {
  6399. const group = {
  6400. id: 'taskDefinition',
  6401. label: 'Task definition',
  6402. entries: [...TaskDefinitionProps({
  6403. element
  6404. })],
  6405. component: propertiesPanel.Group
  6406. };
  6407. return group.entries.length ? group : null;
  6408. }
  6409. function InputGroup$1(element, injector) {
  6410. const group = {
  6411. id: 'inputs',
  6412. label: 'Inputs',
  6413. component: propertiesPanel.ListGroup,
  6414. ...InputProps$1({
  6415. element,
  6416. injector
  6417. })
  6418. };
  6419. return group.items ? group : null;
  6420. }
  6421. function OutputGroup$1(element, injector) {
  6422. const group = {
  6423. id: 'outputs',
  6424. label: 'Outputs',
  6425. component: propertiesPanel.ListGroup,
  6426. ...OutputProps$1({
  6427. element,
  6428. injector
  6429. })
  6430. };
  6431. return group.items ? group : null;
  6432. }
  6433. function ConditionGroup$1(element) {
  6434. const group = {
  6435. id: 'condition',
  6436. label: 'Condition',
  6437. entries: [...ConditionProps$1({
  6438. element
  6439. })],
  6440. component: propertiesPanel.Group
  6441. };
  6442. return group.entries.length ? group : null;
  6443. }
  6444. function FormGroup$1(element, injector) {
  6445. const group = {
  6446. id: 'form',
  6447. label: 'Form',
  6448. entries: [...FormProps$1({
  6449. element,
  6450. injector
  6451. })],
  6452. component: propertiesPanel.Group
  6453. };
  6454. return group.entries.length ? group : null;
  6455. }
  6456. function TargetGroup(element) {
  6457. const group = {
  6458. id: 'calledElement',
  6459. label: 'Called element',
  6460. entries: [...TargetProps({
  6461. element
  6462. })],
  6463. component: propertiesPanel.Group
  6464. };
  6465. return group.entries.length ? group : null;
  6466. }
  6467. function HeaderGroup(element, injector) {
  6468. const group = {
  6469. id: 'headers',
  6470. label: 'Headers',
  6471. component: propertiesPanel.ListGroup,
  6472. ...HeaderProps({
  6473. element,
  6474. injector
  6475. })
  6476. };
  6477. return group.items ? group : null;
  6478. }
  6479. function OutputPropagationGroup(element) {
  6480. const group = {
  6481. id: 'outputPropagation',
  6482. label: 'Output propagation',
  6483. entries: [...OutputPropagationProps({
  6484. element
  6485. })],
  6486. component: propertiesPanel.Group
  6487. };
  6488. return group.entries.length ? group : null;
  6489. }
  6490. function BusinessRuleImplementationGroup(element) {
  6491. const group = {
  6492. id: 'businessRuleImplementation',
  6493. label: 'Implementation',
  6494. entries: [...BusinessRuleImplementationProps({
  6495. element
  6496. })],
  6497. component: propertiesPanel.Group
  6498. };
  6499. return group.entries.length ? group : null;
  6500. }
  6501. function AssignmentDefinitionGroup(element) {
  6502. const group = {
  6503. id: 'assignmentDefinition',
  6504. label: 'Assignment',
  6505. entries: [...AssignmentDefinitionProps({
  6506. element
  6507. })],
  6508. component: propertiesPanel.Group
  6509. };
  6510. return group.entries.length ? group : null;
  6511. }
  6512. function updateMessageGroup(groups, element) {
  6513. const messageGroup = findGroup$1(groups, 'message');
  6514. if (!messageGroup) {
  6515. return;
  6516. }
  6517. messageGroup.entries = overrideGenericEntries(messageGroup.entries, MessageProps({
  6518. element
  6519. }));
  6520. } // overwrite bpmn generic timerEventDefinition group with zeebe-specific one
  6521. function updateTimerGroup(groups, element) {
  6522. const timerEventGroup = findGroup$1(groups, 'timer');
  6523. if (!timerEventGroup) {
  6524. return;
  6525. }
  6526. timerEventGroup.entries = [...TimerProps({
  6527. element
  6528. })];
  6529. } // overwrite bpmn generic multiInstance group with zeebe-specific one
  6530. function updateMultiInstanceGroup$1(groups, element) {
  6531. const multiInstanceGroup = findGroup$1(groups, 'multiInstance');
  6532. if (!multiInstanceGroup) {
  6533. return;
  6534. }
  6535. multiInstanceGroup.entries = [...MultiInstanceProps$1({
  6536. element
  6537. })];
  6538. } // remove message group from Message End Event & Message Throw Event
  6539. function removeMessageGroup(groups, element) {
  6540. const messageGroup = findGroup$1(groups, 'message');
  6541. if (isMessageEndEvent(element) || isMessageThrowEvent(element)) {
  6542. groups = groups.filter(g => g != messageGroup);
  6543. }
  6544. return groups;
  6545. } // helper /////////////////////
  6546. function findGroup$1(groups, id) {
  6547. return groups.find(g => g.id === id);
  6548. }
  6549. /**
  6550. * Replace generic bpmn components with specific zeebe ones.
  6551. *
  6552. * @param {Array} oldEntries
  6553. * @param {Array} newEntries
  6554. * @returns {Array} combined entries
  6555. */
  6556. function overrideGenericEntries(oldEntries, newEntries) {
  6557. const filteredEntries = oldEntries.filter(oldEntry => !newEntries.find(newEntry => newEntry.id === oldEntry.id));
  6558. return [...filteredEntries, ...newEntries];
  6559. }
  6560. var zeebePropertiesProviderModule = {
  6561. __init__: ['zeebePropertiesProvider'],
  6562. zeebePropertiesProvider: ['type', ZeebePropertiesProvider]
  6563. };
  6564. function AsynchronousContinuationsProps(props) {
  6565. const {
  6566. element
  6567. } = props;
  6568. const checkboxIsEditedInverted = node => {
  6569. return node && !node.checked;
  6570. };
  6571. const businessObject = ModelUtil.getBusinessObject(element);
  6572. const entries = [];
  6573. if (ModelUtil.is(element, 'camunda:AsyncCapable')) {
  6574. entries.push({
  6575. id: 'asynchronousContinuationBefore',
  6576. component: AsynchronousContinuationBefore,
  6577. isEdited: propertiesPanel.isCheckboxEntryEdited
  6578. }, {
  6579. id: 'asynchronousContinuationAfter',
  6580. component: AsynchronousContinuationAfter,
  6581. isEdited: propertiesPanel.isCheckboxEntryEdited
  6582. });
  6583. if (isAsyncBefore$2(businessObject) || isAsyncAfter$2(businessObject)) {
  6584. entries.push({
  6585. id: 'exclusive',
  6586. component: Exclusive,
  6587. isEdited: checkboxIsEditedInverted
  6588. });
  6589. }
  6590. }
  6591. return entries;
  6592. }
  6593. function AsynchronousContinuationBefore(props) {
  6594. const {
  6595. element
  6596. } = props;
  6597. const commandStack = useService('commandStack'),
  6598. translate = useService('translate');
  6599. const businessObject = ModelUtil.getBusinessObject(element);
  6600. const getValue = () => {
  6601. return isAsyncBefore$2(businessObject);
  6602. };
  6603. const setValue = value => {
  6604. // overwrite the legacy `async` property, we will use the more explicit `asyncBefore`
  6605. const props = {
  6606. 'camunda:asyncBefore': value,
  6607. 'camunda:async': undefined
  6608. };
  6609. commandStack.execute('element.updateModdleProperties', {
  6610. element,
  6611. moddleElement: businessObject,
  6612. properties: props
  6613. });
  6614. };
  6615. return propertiesPanel.CheckboxEntry({
  6616. element,
  6617. id: 'asynchronousContinuationBefore',
  6618. label: translate('Before'),
  6619. getValue,
  6620. setValue
  6621. });
  6622. }
  6623. function AsynchronousContinuationAfter(props) {
  6624. const {
  6625. element
  6626. } = props;
  6627. const commandStack = useService('commandStack'),
  6628. translate = useService('translate');
  6629. const businessObject = ModelUtil.getBusinessObject(element);
  6630. const getValue = () => {
  6631. return isAsyncAfter$2(businessObject);
  6632. };
  6633. const setValue = value => {
  6634. commandStack.execute('element.updateModdleProperties', {
  6635. element,
  6636. moddleElement: businessObject,
  6637. properties: {
  6638. 'camunda:asyncAfter': value
  6639. }
  6640. });
  6641. };
  6642. return propertiesPanel.CheckboxEntry({
  6643. element,
  6644. id: 'asynchronousContinuationAfter',
  6645. label: translate('After'),
  6646. getValue,
  6647. setValue
  6648. });
  6649. }
  6650. function Exclusive(props) {
  6651. const {
  6652. element
  6653. } = props;
  6654. const commandStack = useService('commandStack'),
  6655. translate = useService('translate');
  6656. const businessObject = ModelUtil.getBusinessObject(element);
  6657. const getValue = () => {
  6658. return isExclusive$1(businessObject);
  6659. };
  6660. const setValue = value => {
  6661. commandStack.execute('element.updateModdleProperties', {
  6662. element,
  6663. moddleElement: businessObject,
  6664. properties: {
  6665. 'camunda:exclusive': value
  6666. }
  6667. });
  6668. };
  6669. return propertiesPanel.CheckboxEntry({
  6670. element,
  6671. id: 'exclusive',
  6672. label: translate('Exclusive'),
  6673. getValue,
  6674. setValue
  6675. });
  6676. } // helper //////////////////
  6677. /**
  6678. * Returns true if the attribute 'camunda:asyncBefore' is set
  6679. * to true.
  6680. *
  6681. * @param {ModdleElement} bo
  6682. *
  6683. * @return {boolean} a boolean value
  6684. */
  6685. function isAsyncBefore$2(bo) {
  6686. return !!(bo.get('camunda:asyncBefore') || bo.get('camunda:async'));
  6687. }
  6688. /**
  6689. * Returns true if the attribute 'camunda:asyncAfter' is set
  6690. * to true.
  6691. *
  6692. * @param {ModdleElement} bo
  6693. *
  6694. * @return {boolean} a boolean value
  6695. */
  6696. function isAsyncAfter$2(bo) {
  6697. return !!bo.get('camunda:asyncAfter');
  6698. }
  6699. /**
  6700. * Returns true if the attribute 'camunda:exclusive' is set
  6701. * to true.
  6702. *
  6703. * @param {ModdleElement} bo
  6704. *
  6705. * @return {boolean} a boolean value
  6706. */
  6707. function isExclusive$1(bo) {
  6708. return !!bo.get('camunda:exclusive');
  6709. }
  6710. const EMPTY_OPTION$1 = '';
  6711. function BusinessKeyProps$1(props) {
  6712. const {
  6713. element
  6714. } = props;
  6715. if (!ModelUtil.is(element, 'bpmn:StartEvent') || !hasFormFields(element)) {
  6716. return [];
  6717. }
  6718. return [{
  6719. id: 'businessKey',
  6720. component: BusinessKey$1,
  6721. isEdited: propertiesPanel.isSelectEntryEdited
  6722. }];
  6723. }
  6724. function BusinessKey$1(props) {
  6725. const {
  6726. element
  6727. } = props;
  6728. const commandStack = useService('commandStack');
  6729. const translate = useService('translate');
  6730. const formData = getFormData$2(element);
  6731. const getValue = () => {
  6732. return formData.get('camunda:businessKey') || '';
  6733. };
  6734. const setValue = value => {
  6735. commandStack.execute('element.updateModdleProperties', {
  6736. element,
  6737. moddleElement: formData,
  6738. properties: {
  6739. 'camunda:businessKey': value
  6740. }
  6741. });
  6742. };
  6743. const getOptions = () => {
  6744. const options = [{
  6745. value: EMPTY_OPTION$1,
  6746. label: translate('<none>')
  6747. }];
  6748. const fields = formData.get('fields');
  6749. fields.forEach(field => {
  6750. const id = field.get('camunda:id');
  6751. if (id) {
  6752. options.push({
  6753. value: id,
  6754. label: id
  6755. });
  6756. }
  6757. });
  6758. return options;
  6759. };
  6760. return propertiesPanel.SelectEntry({
  6761. element,
  6762. id: 'businessKey',
  6763. label: translate('Key'),
  6764. getValue,
  6765. setValue,
  6766. getOptions
  6767. });
  6768. } // helper ///////////////////
  6769. function getFormData$2(element) {
  6770. const businessObject = ModelUtil.getBusinessObject(element);
  6771. return getExtensionElementsList(businessObject, 'camunda:FormData')[0];
  6772. }
  6773. function hasFormFields(element) {
  6774. const businessObject = ModelUtil.getBusinessObject(element);
  6775. const formData = getFormData$2(businessObject);
  6776. return formData && formData.get('camunda:fields').length;
  6777. }
  6778. function CalledBpmnProps(props) {
  6779. const {
  6780. element
  6781. } = props;
  6782. const entries = [{
  6783. id: 'calledElement',
  6784. component: CalledElement,
  6785. isEdited: propertiesPanel.isTextFieldEntryEdited
  6786. }, {
  6787. id: 'calledElementBinding',
  6788. component: CalledElementBinding,
  6789. isEdited: propertiesPanel.isSelectEntryEdited
  6790. }, {
  6791. id: 'calledElementTenantId',
  6792. component: CalledElementTenantId,
  6793. isEdited: propertiesPanel.isTextFieldEntryEdited
  6794. }];
  6795. const binding = ModelUtil.getBusinessObject(element).get('camunda:calledElementBinding');
  6796. if (binding === 'version') {
  6797. entries.splice(-1, 0, {
  6798. id: 'calledElementVersion',
  6799. component: CalledElementVersion,
  6800. isEdited: propertiesPanel.isTextFieldEntryEdited
  6801. });
  6802. } else if (binding === 'versionTag') {
  6803. entries.splice(-1, 0, {
  6804. id: 'calledElementVersionTag',
  6805. component: CalledElementVersionTag,
  6806. isEdited: propertiesPanel.isTextFieldEntryEdited
  6807. });
  6808. }
  6809. return entries;
  6810. }
  6811. function CalledElement(props) {
  6812. const {
  6813. element
  6814. } = props;
  6815. const modeling = useService('modeling');
  6816. const translate = useService('translate');
  6817. const debounce = useService('debounceInput');
  6818. const getValue = () => {
  6819. return ModelUtil.getBusinessObject(element).get('calledElement');
  6820. };
  6821. const setValue = value => {
  6822. modeling.updateProperties(element, {
  6823. calledElement: value || ''
  6824. });
  6825. };
  6826. return jsxRuntime.jsx(propertiesPanel.TextFieldEntry, {
  6827. element: element,
  6828. id: "calledElement",
  6829. label: translate('Called element'),
  6830. getValue: getValue,
  6831. setValue: setValue,
  6832. debounce: debounce
  6833. });
  6834. }
  6835. function CalledElementBinding(props) {
  6836. const {
  6837. element
  6838. } = props;
  6839. const modeling = useService('modeling');
  6840. const translate = useService('translate');
  6841. const getValue = () => {
  6842. return ModelUtil.getBusinessObject(element).get('camunda:calledElementBinding') || 'latest';
  6843. };
  6844. const setValue = value => {
  6845. modeling.updateProperties(element, {
  6846. calledElementBinding: value === 'latest' ? undefined : value,
  6847. calledElementVersion: undefined,
  6848. calledElementVersionTag: undefined
  6849. });
  6850. };
  6851. const getOptions = () => [{
  6852. value: 'latest',
  6853. label: translate('latest')
  6854. }, {
  6855. value: 'deployment',
  6856. label: translate('deployment')
  6857. }, {
  6858. value: 'version',
  6859. label: translate('version')
  6860. }, {
  6861. value: 'versionTag',
  6862. label: translate('version tag')
  6863. }];
  6864. return jsxRuntime.jsx(propertiesPanel.SelectEntry, {
  6865. element: element,
  6866. id: "calledElementBinding",
  6867. label: translate('Binding'),
  6868. getValue: getValue,
  6869. setValue: setValue,
  6870. getOptions: getOptions
  6871. });
  6872. }
  6873. function CalledElementVersion(props) {
  6874. const {
  6875. element
  6876. } = props;
  6877. const modeling = useService('modeling');
  6878. const translate = useService('translate');
  6879. const debounce = useService('debounceInput');
  6880. const getValue = () => {
  6881. return ModelUtil.getBusinessObject(element).get('camunda:calledElementVersion');
  6882. };
  6883. const setValue = value => {
  6884. modeling.updateProperties(element, {
  6885. calledElementVersion: value
  6886. });
  6887. };
  6888. return jsxRuntime.jsx(propertiesPanel.TextFieldEntry, {
  6889. element: element,
  6890. id: "calledElementVersion",
  6891. label: translate('Version'),
  6892. getValue: getValue,
  6893. setValue: setValue,
  6894. debounce: debounce
  6895. });
  6896. }
  6897. function CalledElementVersionTag(props) {
  6898. const {
  6899. element
  6900. } = props;
  6901. const modeling = useService('modeling');
  6902. const translate = useService('translate');
  6903. const debounce = useService('debounceInput');
  6904. const getValue = () => {
  6905. return ModelUtil.getBusinessObject(element).get('camunda:calledElementVersionTag');
  6906. };
  6907. const setValue = value => {
  6908. modeling.updateProperties(element, {
  6909. calledElementVersionTag: value
  6910. });
  6911. };
  6912. return jsxRuntime.jsx(propertiesPanel.TextFieldEntry, {
  6913. element: element,
  6914. id: "calledElementVersionTag",
  6915. label: translate('Version tag'),
  6916. getValue: getValue,
  6917. setValue: setValue,
  6918. debounce: debounce
  6919. });
  6920. }
  6921. function CalledElementTenantId(props) {
  6922. const {
  6923. element
  6924. } = props;
  6925. const modeling = useService('modeling');
  6926. const translate = useService('translate');
  6927. const debounce = useService('debounceInput');
  6928. const getValue = () => {
  6929. return ModelUtil.getBusinessObject(element).get('camunda:calledElementTenantId');
  6930. };
  6931. const setValue = value => {
  6932. modeling.updateProperties(element, {
  6933. calledElementTenantId: value
  6934. });
  6935. };
  6936. return jsxRuntime.jsx(propertiesPanel.TextFieldEntry, {
  6937. element: element,
  6938. id: "calledElementTenantId",
  6939. label: translate('Tenant ID'),
  6940. getValue: getValue,
  6941. setValue: setValue,
  6942. debounce: debounce
  6943. });
  6944. }
  6945. function CalledCmmnProps(props) {
  6946. const {
  6947. element
  6948. } = props;
  6949. const entries = [{
  6950. id: 'calledElementCaseRef',
  6951. component: CaseRef,
  6952. isEdited: propertiesPanel.isTextFieldEntryEdited
  6953. }, {
  6954. id: 'calledElementCaseBinding',
  6955. component: CaseBinding,
  6956. isEdited: propertiesPanel.isSelectEntryEdited
  6957. }, {
  6958. id: 'calledElementCaseTenantId',
  6959. component: CaseTenantId,
  6960. isEdited: propertiesPanel.isTextFieldEntryEdited
  6961. }];
  6962. if (ModelUtil.getBusinessObject(element).get('camunda:caseBinding') === 'version') {
  6963. entries.splice(-1, 0, {
  6964. id: 'calledElementCaseVersion',
  6965. component: CaseVersion,
  6966. isEdited: propertiesPanel.isTextFieldEntryEdited
  6967. });
  6968. }
  6969. return entries;
  6970. }
  6971. function CaseRef(props) {
  6972. const {
  6973. element
  6974. } = props;
  6975. const modeling = useService('modeling');
  6976. const translate = useService('translate');
  6977. const debounce = useService('debounceInput');
  6978. const getValue = () => {
  6979. return ModelUtil.getBusinessObject(element).get('camunda:caseRef');
  6980. };
  6981. const setValue = value => {
  6982. modeling.updateProperties(element, {
  6983. caseRef: value || ''
  6984. });
  6985. };
  6986. return jsxRuntime.jsx(propertiesPanel.TextFieldEntry, {
  6987. element: element,
  6988. id: "calledElementCaseRef",
  6989. label: translate('Case ref'),
  6990. getValue: getValue,
  6991. setValue: setValue,
  6992. debounce: debounce
  6993. });
  6994. }
  6995. function CaseBinding(props) {
  6996. const {
  6997. element
  6998. } = props;
  6999. const modeling = useService('modeling');
  7000. const translate = useService('translate');
  7001. const getValue = () => {
  7002. return ModelUtil.getBusinessObject(element).get('camunda:caseBinding') || 'latest';
  7003. };
  7004. const setValue = value => {
  7005. modeling.updateProperties(element, {
  7006. caseBinding: value === 'latest' ? undefined : value,
  7007. caseVersion: undefined
  7008. });
  7009. };
  7010. const getOptions = () => [{
  7011. value: 'latest',
  7012. label: translate('latest')
  7013. }, {
  7014. value: 'deployment',
  7015. label: translate('deployment')
  7016. }, {
  7017. value: 'version',
  7018. label: translate('version')
  7019. }];
  7020. return jsxRuntime.jsx(propertiesPanel.SelectEntry, {
  7021. element: element,
  7022. id: "calledElementCaseBinding",
  7023. label: translate('Binding'),
  7024. getValue: getValue,
  7025. setValue: setValue,
  7026. getOptions: getOptions
  7027. });
  7028. }
  7029. function CaseVersion(props) {
  7030. const {
  7031. element
  7032. } = props;
  7033. const modeling = useService('modeling');
  7034. const translate = useService('translate');
  7035. const debounce = useService('debounceInput');
  7036. const getValue = () => {
  7037. return ModelUtil.getBusinessObject(element).get('camunda:caseVersion');
  7038. };
  7039. const setValue = value => {
  7040. modeling.updateProperties(element, {
  7041. caseVersion: value
  7042. });
  7043. };
  7044. return jsxRuntime.jsx(propertiesPanel.TextFieldEntry, {
  7045. element: element,
  7046. id: "calledElementCaseVersion",
  7047. label: translate('Version'),
  7048. getValue: getValue,
  7049. setValue: setValue,
  7050. debounce: debounce
  7051. });
  7052. }
  7053. function CaseTenantId(props) {
  7054. const {
  7055. element
  7056. } = props;
  7057. const modeling = useService('modeling');
  7058. const translate = useService('translate');
  7059. const debounce = useService('debounceInput');
  7060. const getValue = () => {
  7061. return ModelUtil.getBusinessObject(element).get('camunda:caseTenantId');
  7062. };
  7063. const setValue = value => {
  7064. modeling.updateProperties(element, {
  7065. caseTenantId: value
  7066. });
  7067. };
  7068. return jsxRuntime.jsx(propertiesPanel.TextFieldEntry, {
  7069. element: element,
  7070. id: "calledElementCaseTenantId",
  7071. label: translate('Tenant ID'),
  7072. getValue: getValue,
  7073. setValue: setValue,
  7074. debounce: debounce
  7075. });
  7076. }
  7077. function DelegateVariableMappingProps(props) {
  7078. const {
  7079. element
  7080. } = props;
  7081. const entries = [{
  7082. id: 'calledElementDelegateVariableMappingType',
  7083. component: DelegateVariableMappingType,
  7084. isEdited: propertiesPanel.isSelectEntryEdited
  7085. }];
  7086. const type = getDelegateVariableMappingType(element);
  7087. if (type === 'class') {
  7088. entries.push({
  7089. id: 'calledElementVariableMappingClass',
  7090. component: VariableMappingClass,
  7091. isEdited: propertiesPanel.isTextFieldEntryEdited
  7092. });
  7093. } else if (type === 'delegateExpression') {
  7094. entries.push({
  7095. id: 'calledElementVariableMappingDelegateExpression',
  7096. component: VariableMappingDelegateExpression,
  7097. isEdited: propertiesPanel.isTextFieldEntryEdited
  7098. });
  7099. }
  7100. return entries;
  7101. }
  7102. const DEFAULT_PROPS$5 = {
  7103. 'camunda:variableMappingClass': undefined,
  7104. 'camunda:variableMappingDelegateExpression': undefined
  7105. };
  7106. function DelegateVariableMappingType(props) {
  7107. const {
  7108. element
  7109. } = props;
  7110. const commandStack = useService('commandStack');
  7111. const translate = useService('translate');
  7112. const getValue = () => {
  7113. return getDelegateVariableMappingType(element);
  7114. };
  7115. const setValue = value => {
  7116. const properties = { ...DEFAULT_PROPS$5
  7117. };
  7118. if (value === 'class') {
  7119. properties['camunda:variableMappingClass'] = '';
  7120. } else if (value === 'delegateExpression') {
  7121. properties['camunda:variableMappingDelegateExpression'] = '';
  7122. }
  7123. commandStack.execute('element.updateProperties', {
  7124. element,
  7125. properties
  7126. });
  7127. };
  7128. const getOptions = () => [{
  7129. value: 'none',
  7130. label: translate('<none>')
  7131. }, {
  7132. value: 'class',
  7133. label: translate('Class')
  7134. }, {
  7135. value: 'delegateExpression',
  7136. label: translate('Delegate expression')
  7137. }];
  7138. return jsxRuntime.jsx(propertiesPanel.SelectEntry, {
  7139. element: element,
  7140. id: "calledElementDelegateVariableMappingType",
  7141. label: translate('Delegate Variable Mapping'),
  7142. getValue: getValue,
  7143. setValue: setValue,
  7144. getOptions: getOptions
  7145. });
  7146. }
  7147. function VariableMappingDelegateExpression(props) {
  7148. const {
  7149. element
  7150. } = props;
  7151. const modeling = useService('modeling');
  7152. const translate = useService('translate');
  7153. const debounce = useService('debounceInput');
  7154. const getValue = () => {
  7155. return ModelUtil.getBusinessObject(element).get('camunda:variableMappingDelegateExpression');
  7156. };
  7157. const setValue = value => {
  7158. modeling.updateProperties(element, {
  7159. variableMappingDelegateExpression: value || '',
  7160. variableMappingClass: undefined
  7161. });
  7162. };
  7163. return jsxRuntime.jsx(propertiesPanel.TextFieldEntry, {
  7164. element: element,
  7165. id: "calledElementVariableMappingDelegateExpression",
  7166. label: translate('Delegate Expression'),
  7167. getValue: getValue,
  7168. setValue: setValue,
  7169. debounce: debounce
  7170. });
  7171. }
  7172. function VariableMappingClass(props) {
  7173. const {
  7174. element
  7175. } = props;
  7176. const modeling = useService('modeling');
  7177. const translate = useService('translate');
  7178. const debounce = useService('debounceInput');
  7179. const getValue = () => {
  7180. return ModelUtil.getBusinessObject(element).get('camunda:variableMappingClass');
  7181. };
  7182. const setValue = value => {
  7183. modeling.updateProperties(element, {
  7184. variableMappingDelegateExpression: undefined,
  7185. variableMappingClass: value || ''
  7186. });
  7187. };
  7188. return jsxRuntime.jsx(propertiesPanel.TextFieldEntry, {
  7189. element: element,
  7190. id: "calledElementVariableMappingClass",
  7191. label: translate('Delegate Class'),
  7192. getValue: getValue,
  7193. setValue: setValue,
  7194. debounce: debounce
  7195. });
  7196. } // helper /////
  7197. function getDelegateVariableMappingType(element) {
  7198. const businessObject = ModelUtil.getBusinessObject(element);
  7199. if (businessObject.get('camunda:variableMappingClass') !== undefined) {
  7200. return 'class';
  7201. } else if (businessObject.get('camunda:variableMappingDelegateExpression') !== undefined) {
  7202. return 'delegateExpression';
  7203. }
  7204. return 'none';
  7205. }
  7206. function CallActivityProps(props) {
  7207. const {
  7208. element
  7209. } = props;
  7210. if (!ModelUtil.is(element, 'bpmn:CallActivity')) {
  7211. return [];
  7212. }
  7213. const entries = [];
  7214. entries.push({
  7215. id: 'calledElementType',
  7216. component: CalledElementType,
  7217. isEdited: propertiesPanel.isSelectEntryEdited
  7218. });
  7219. const calledElementType = getCalledElementType(element);
  7220. if (calledElementType === 'bpmn') {
  7221. entries.push(...CalledBpmnProps({
  7222. element
  7223. }), ...BusinessKeyProps({
  7224. element
  7225. }), ...DelegateVariableMappingProps({
  7226. element
  7227. }));
  7228. } else if (calledElementType === 'cmmn') {
  7229. entries.push(...CalledCmmnProps({
  7230. element
  7231. }), ...BusinessKeyProps({
  7232. element
  7233. }));
  7234. } else {
  7235. entries.push(...BusinessKeyProps({
  7236. element
  7237. }));
  7238. }
  7239. return entries;
  7240. }
  7241. const DEFAULT_PROPS$4 = {
  7242. calledElement: undefined,
  7243. 'camunda:calledElementBinding': undefined,
  7244. 'camunda:calledElementVersion': undefined,
  7245. 'camunda:calledElementTenantId': undefined,
  7246. 'camunda:variableMappingClass': undefined,
  7247. 'camunda:variableMappingDelegateExpression': undefined,
  7248. 'camunda:caseRef': undefined,
  7249. 'camunda:caseBinding': undefined,
  7250. 'camunda:caseVersion': undefined,
  7251. 'camunda:caseTenantId': undefined
  7252. };
  7253. const DEFAULT_BUSINESS_KEY = '#{execution.processBusinessKey}';
  7254. function CalledElementType(props) {
  7255. const {
  7256. element
  7257. } = props;
  7258. const commandStack = useService('commandStack');
  7259. const translate = useService('translate');
  7260. const getValue = () => {
  7261. return getCalledElementType(element);
  7262. };
  7263. const setValue = value => {
  7264. const properties = { ...DEFAULT_PROPS$4
  7265. };
  7266. if (value === 'bpmn') {
  7267. properties['calledElement'] = '';
  7268. } else if (value === 'cmmn') {
  7269. properties['camunda:caseRef'] = '';
  7270. }
  7271. commandStack.execute('element.updateProperties', {
  7272. element,
  7273. properties
  7274. });
  7275. };
  7276. const getOptions = () => [{
  7277. value: '',
  7278. label: translate('<none>')
  7279. }, {
  7280. value: 'bpmn',
  7281. label: translate('BPMN')
  7282. }, {
  7283. value: 'cmmn',
  7284. label: translate('CMMN')
  7285. }];
  7286. return jsxRuntime.jsx(propertiesPanel.SelectEntry, {
  7287. element: element,
  7288. id: "calledElementType",
  7289. label: translate('Type'),
  7290. getValue: getValue,
  7291. setValue: setValue,
  7292. getOptions: getOptions
  7293. });
  7294. }
  7295. function BusinessKeyProps(props) {
  7296. const {
  7297. element
  7298. } = props;
  7299. const entries = [{
  7300. id: 'calledElementBusinessKey',
  7301. component: BusinessKey,
  7302. isEdited: propertiesPanel.isCheckboxEntryEdited
  7303. }];
  7304. if (hasBusinessKey(element)) {
  7305. entries.push({
  7306. id: 'calledElementBusinessKeyExpression',
  7307. component: BusinessKeyExpression,
  7308. isEdited: propertiesPanel.isTextFieldEntryEdited
  7309. });
  7310. }
  7311. return entries;
  7312. }
  7313. function BusinessKey(props) {
  7314. const {
  7315. element
  7316. } = props;
  7317. const commandStack = useService('commandStack');
  7318. const modeling = useService('modeling');
  7319. const bpmnFactory = useService('bpmnFactory');
  7320. const translate = useService('translate');
  7321. const getValue = () => {
  7322. return hasBusinessKey(element);
  7323. };
  7324. const setValue = value => {
  7325. if (value) {
  7326. addBusinessKey();
  7327. } else {
  7328. removeBusinessKey();
  7329. }
  7330. };
  7331. function addBusinessKey() {
  7332. const businessObject = ModelUtil.getBusinessObject(element);
  7333. let extensionElements = businessObject.get('extensionElements'); // (1) If there are no extension elements, create camunda:In and update element's properties
  7334. if (!extensionElements) {
  7335. extensionElements = createElement('bpmn:ExtensionElements', {}, businessObject, bpmnFactory);
  7336. const businessKeyItem = createBusinessKey(extensionElements);
  7337. extensionElements.set('values', [businessKeyItem]);
  7338. modeling.updateProperties(element, {
  7339. extensionElements
  7340. });
  7341. } else {
  7342. // (2) Otherwise, add camunda:In to the existing values
  7343. const businessKeyItem = createBusinessKey(extensionElements);
  7344. addExtensionElements(element, businessObject, businessKeyItem, bpmnFactory, commandStack);
  7345. }
  7346. }
  7347. function createBusinessKey(parent) {
  7348. return createElement('camunda:In', {
  7349. businessKey: DEFAULT_BUSINESS_KEY
  7350. }, parent, bpmnFactory);
  7351. }
  7352. function removeBusinessKey() {
  7353. const businessObject = ModelUtil.getBusinessObject(element);
  7354. const camundaInList = getExtensionElementsList(businessObject, 'camunda:In');
  7355. const businessKeyItems = camundaInList.filter(camundaIn => camundaIn.get('businessKey') !== undefined);
  7356. removeExtensionElements(element, businessObject, businessKeyItems, commandStack);
  7357. }
  7358. return jsxRuntime.jsx(propertiesPanel.CheckboxEntry, {
  7359. element: element,
  7360. id: "calledElementBusinessKey",
  7361. label: translate('Business key'),
  7362. getValue: getValue,
  7363. setValue: setValue
  7364. });
  7365. }
  7366. function BusinessKeyExpression(props) {
  7367. const {
  7368. element
  7369. } = props;
  7370. const commandStack = useService('commandStack');
  7371. const translate = useService('translate');
  7372. const debounce = useService('debounceInput');
  7373. const getValue = () => getBusinessKey(element);
  7374. const setValue = value => {
  7375. const camundaIn = findCamundaInWithBusinessKey(element);
  7376. commandStack.execute('element.updateModdleProperties', {
  7377. element,
  7378. moddleElement: camundaIn,
  7379. properties: {
  7380. businessKey: value || ''
  7381. }
  7382. });
  7383. };
  7384. return jsxRuntime.jsx(propertiesPanel.TextFieldEntry, {
  7385. element: element,
  7386. id: "calledElementBusinessKeyExpression",
  7387. label: translate('Business key expression'),
  7388. getValue: getValue,
  7389. setValue: setValue,
  7390. debounce: debounce
  7391. });
  7392. } // helper //////
  7393. function getCalledElementType(element) {
  7394. const businessObject = ModelUtil.getBusinessObject(element);
  7395. if (businessObject.get('calledElement') !== undefined) {
  7396. return 'bpmn';
  7397. } else if (businessObject.get('camunda:caseRef') !== undefined) {
  7398. return 'cmmn';
  7399. }
  7400. return '';
  7401. }
  7402. function hasBusinessKey(element) {
  7403. return getBusinessKey(element) !== undefined;
  7404. }
  7405. function getBusinessKey(element) {
  7406. const camundaIn = findCamundaInWithBusinessKey(element);
  7407. if (camundaIn) {
  7408. return camundaIn.get('businessKey');
  7409. }
  7410. }
  7411. function findCamundaInWithBusinessKey(element) {
  7412. const businessObject = ModelUtil.getBusinessObject(element);
  7413. const camundaInList = getExtensionElementsList(businessObject, 'camunda:In');
  7414. for (const camundaIn of camundaInList) {
  7415. const businessKey = camundaIn.get('businessKey');
  7416. if (businessKey !== undefined) {
  7417. return camundaIn;
  7418. }
  7419. }
  7420. }
  7421. function CandidateStarterProps(props) {
  7422. const {
  7423. element
  7424. } = props;
  7425. const businessObject = ModelUtil.getBusinessObject(element);
  7426. if (!ModelUtil.is(element, 'bpmn:Process') && !(ModelUtil.is(element, 'bpmn:Participant') && businessObject.get('processRef'))) {
  7427. return [];
  7428. }
  7429. return [{
  7430. id: 'candidateStarterGroups',
  7431. component: CandidateStarterGroups,
  7432. isEdited: propertiesPanel.isTextFieldEntryEdited
  7433. }, {
  7434. id: 'candidateStarterUsers',
  7435. component: CandidateStarterUsers,
  7436. isEdited: propertiesPanel.isTextFieldEntryEdited
  7437. }];
  7438. }
  7439. function CandidateStarterGroups(props) {
  7440. const {
  7441. element
  7442. } = props;
  7443. const commandStack = useService('commandStack'),
  7444. translate = useService('translate'),
  7445. debounce = useService('debounceInput');
  7446. const process = getProcess$3(element);
  7447. const getValue = () => {
  7448. return process.get('camunda:candidateStarterGroups') || '';
  7449. };
  7450. const setValue = value => {
  7451. commandStack.execute('element.updateModdleProperties', {
  7452. element: element,
  7453. moddleElement: process,
  7454. properties: {
  7455. 'camunda:candidateStarterGroups': value
  7456. }
  7457. });
  7458. };
  7459. return propertiesPanel.TextFieldEntry({
  7460. element,
  7461. id: 'candidateStarterGroups',
  7462. label: translate('Candidate starter groups'),
  7463. description: translate('Specify more than one group as a comma separated list.'),
  7464. getValue,
  7465. setValue,
  7466. debounce
  7467. });
  7468. }
  7469. function CandidateStarterUsers(props) {
  7470. const {
  7471. element
  7472. } = props;
  7473. const commandStack = useService('commandStack'),
  7474. translate = useService('translate'),
  7475. debounce = useService('debounceInput');
  7476. const process = getProcess$3(element);
  7477. const getValue = () => {
  7478. return process.get('camunda:candidateStarterUsers') || '';
  7479. };
  7480. const setValue = value => {
  7481. commandStack.execute('element.updateModdleProperties', {
  7482. element: element,
  7483. moddleElement: process,
  7484. properties: {
  7485. 'camunda:candidateStarterUsers': value
  7486. }
  7487. });
  7488. };
  7489. return propertiesPanel.TextFieldEntry({
  7490. element,
  7491. id: 'candidateStarterUsers',
  7492. label: translate('Candidate starter users'),
  7493. description: translate('Specify more than one user as a comma separated list.'),
  7494. getValue,
  7495. setValue,
  7496. debounce
  7497. });
  7498. } // helper //////////////////
  7499. /**
  7500. * getProcess - get the businessObject of the process referred to by a bpmn:Process
  7501. * or by a bpmn:Participant
  7502. *
  7503. * @param {ModdleElement} element either a bpmn:Process or a bpmn:Participant
  7504. * @return {BusinessObject}
  7505. */
  7506. function getProcess$3(element) {
  7507. return ModelUtil.is(element, 'bpmn:Process') ? ModelUtil.getBusinessObject(element) : ModelUtil.getBusinessObject(element).get('processRef');
  7508. }
  7509. function ConditionProps(props) {
  7510. const {
  7511. element
  7512. } = props;
  7513. if (!(ModelUtil.is(element, 'bpmn:SequenceFlow') && isConditionalSource(element.source)) && !getConditionalEventDefinition(element)) {
  7514. return [];
  7515. }
  7516. const entries = [];
  7517. if (getConditionalEventDefinition(element)) {
  7518. entries.push(...VariableEventProps({
  7519. element
  7520. }));
  7521. }
  7522. entries.push({
  7523. id: 'conditionType',
  7524. component: ConditionType,
  7525. isEdited: propertiesPanel.isSelectEntryEdited
  7526. });
  7527. const conditionType = getConditionType(element);
  7528. if (conditionType === 'script') {
  7529. entries.push(...ConditionScriptProps({
  7530. element
  7531. }));
  7532. } else if (conditionType === 'expression') {
  7533. entries.push({
  7534. id: 'conditionExpression',
  7535. component: ConditionExpression,
  7536. isEdited: propertiesPanel.isTextFieldEntryEdited
  7537. });
  7538. }
  7539. return entries;
  7540. }
  7541. function ConditionType(props) {
  7542. const {
  7543. element
  7544. } = props;
  7545. const commandStack = useService('commandStack');
  7546. const bpmnFactory = useService('bpmnFactory');
  7547. const translate = useService('translate');
  7548. const getValue = () => {
  7549. return getConditionType(element);
  7550. };
  7551. const setValue = value => {
  7552. // (1) Remove formalExpression if <none> is selected
  7553. if (value === '') {
  7554. updateCondition(element, commandStack, undefined);
  7555. } else {
  7556. // (2) Create and set formalExpression element containing the conditionExpression
  7557. const attributes = {
  7558. body: '',
  7559. language: value === 'script' ? '' : undefined
  7560. };
  7561. const formalExpressionElement = createFormalExpression(element, attributes, bpmnFactory);
  7562. updateCondition(element, commandStack, formalExpressionElement);
  7563. }
  7564. };
  7565. const getOptions = () => [{
  7566. value: '',
  7567. label: translate('<none>')
  7568. }, {
  7569. value: 'script',
  7570. label: translate('Script')
  7571. }, {
  7572. value: 'expression',
  7573. label: translate('Expression')
  7574. }];
  7575. return jsxRuntime.jsx(propertiesPanel.SelectEntry, {
  7576. element: element,
  7577. id: "conditionType",
  7578. label: translate('Type'),
  7579. getValue: getValue,
  7580. setValue: setValue,
  7581. getOptions: getOptions
  7582. });
  7583. }
  7584. function ConditionExpression(props) {
  7585. const {
  7586. element
  7587. } = props;
  7588. const commandStack = useService('commandStack'),
  7589. bpmnFactory = useService('bpmnFactory'),
  7590. translate = useService('translate'),
  7591. debounce = useService('debounceInput');
  7592. const getValue = () => {
  7593. return getConditionExpression(element).get('body');
  7594. };
  7595. const setValue = value => {
  7596. const conditionExpression = createFormalExpression(element, {
  7597. body: value
  7598. }, bpmnFactory);
  7599. updateCondition(element, commandStack, conditionExpression);
  7600. };
  7601. return jsxRuntime.jsx(propertiesPanel.TextFieldEntry, {
  7602. element: element,
  7603. id: "conditionExpression",
  7604. label: translate('Condition Expression'),
  7605. getValue: getValue,
  7606. setValue: setValue,
  7607. debounce: debounce
  7608. });
  7609. }
  7610. function ConditionScriptProps(props) {
  7611. const {
  7612. element
  7613. } = props;
  7614. const entries = [];
  7615. const scriptType = getScriptType$1(element); // (1) language
  7616. entries.push({
  7617. id: 'conditionScriptLanguage',
  7618. component: Language,
  7619. isEdited: propertiesPanel.isTextFieldEntryEdited
  7620. }); // (2) type
  7621. entries.push({
  7622. id: 'conditionScriptType',
  7623. component: ScriptType,
  7624. isEdited: propertiesPanel.isSelectEntryEdited
  7625. }); // (3) script
  7626. if (scriptType === 'script') {
  7627. entries.push({
  7628. id: 'conditionScriptValue',
  7629. component: Script$1,
  7630. isEdited: propertiesPanel.isTextAreaEntryEdited
  7631. });
  7632. } else if (scriptType === 'resource') {
  7633. // (4) resource
  7634. entries.push({
  7635. id: 'conditionScriptResource',
  7636. component: Resource$1,
  7637. isEdited: propertiesPanel.isTextFieldEntryEdited
  7638. });
  7639. }
  7640. return entries;
  7641. }
  7642. function Language(props) {
  7643. const {
  7644. element
  7645. } = props;
  7646. const commandStack = useService('commandStack');
  7647. const translate = useService('translate');
  7648. const debounce = useService('debounceInput');
  7649. const getValue = () => {
  7650. return getConditionExpression(element).get('language');
  7651. };
  7652. const setValue = value => {
  7653. commandStack.execute('element.updateModdleProperties', {
  7654. element: element,
  7655. moddleElement: getConditionExpression(element),
  7656. properties: {
  7657. language: value || ''
  7658. }
  7659. });
  7660. };
  7661. return jsxRuntime.jsx(propertiesPanel.TextFieldEntry, {
  7662. element: element,
  7663. id: "conditionScriptLanguage",
  7664. label: translate('Format'),
  7665. getValue: getValue,
  7666. setValue: setValue,
  7667. debounce: debounce
  7668. });
  7669. }
  7670. function ScriptType(props) {
  7671. const {
  7672. element
  7673. } = props;
  7674. const commandStack = useService('commandStack');
  7675. const translate = useService('translate');
  7676. const getValue = () => {
  7677. return getScriptType$1(element);
  7678. };
  7679. const setValue = value => {
  7680. // reset script properties on type change
  7681. const updatedProperties = {
  7682. 'body': value === 'script' ? '' : undefined,
  7683. 'camunda:resource': value === 'resource' ? '' : undefined
  7684. };
  7685. commandStack.execute('element.updateModdleProperties', {
  7686. element: element,
  7687. moddleElement: getConditionExpression(element),
  7688. properties: updatedProperties
  7689. });
  7690. };
  7691. const getOptions = () => {
  7692. const options = [{
  7693. value: 'resource',
  7694. label: translate('External resource')
  7695. }, {
  7696. value: 'script',
  7697. label: translate('Inline script')
  7698. }];
  7699. return options;
  7700. };
  7701. return propertiesPanel.SelectEntry({
  7702. element,
  7703. id: 'conditionScriptType',
  7704. label: translate('Script type'),
  7705. getValue,
  7706. setValue,
  7707. getOptions
  7708. });
  7709. }
  7710. function Script$1(props) {
  7711. const {
  7712. element
  7713. } = props;
  7714. const commandStack = useService('commandStack');
  7715. const translate = useService('translate');
  7716. const debounce = useService('debounceInput');
  7717. const getValue = () => {
  7718. return getConditionExpression(element).get('body');
  7719. };
  7720. const setValue = value => {
  7721. commandStack.execute('element.updateModdleProperties', {
  7722. element: element,
  7723. moddleElement: getConditionExpression(element),
  7724. properties: {
  7725. 'body': value || ''
  7726. }
  7727. });
  7728. };
  7729. return jsxRuntime.jsx(propertiesPanel.TextAreaEntry, {
  7730. element: element,
  7731. id: "conditionScriptValue",
  7732. label: translate('Script'),
  7733. getValue: getValue,
  7734. setValue: setValue,
  7735. debounce: debounce,
  7736. monospace: true
  7737. });
  7738. }
  7739. function Resource$1(props) {
  7740. const {
  7741. element
  7742. } = props;
  7743. const commandStack = useService('commandStack');
  7744. const translate = useService('translate');
  7745. const debounce = useService('debounceInput');
  7746. const getValue = () => {
  7747. return getConditionExpression(element).get('camunda:resource');
  7748. };
  7749. const setValue = value => {
  7750. commandStack.execute('element.updateModdleProperties', {
  7751. element: element,
  7752. moddleElement: getConditionExpression(element),
  7753. properties: {
  7754. 'camunda:resource': value || ''
  7755. }
  7756. });
  7757. };
  7758. return jsxRuntime.jsx(propertiesPanel.TextFieldEntry, {
  7759. element: true,
  7760. id: "conditionScriptResource",
  7761. label: translate('Resource'),
  7762. getValue: getValue,
  7763. setValue: setValue,
  7764. debounce: debounce
  7765. });
  7766. }
  7767. function VariableEventProps(props) {
  7768. const {
  7769. element
  7770. } = props;
  7771. const entries = [];
  7772. entries.push({
  7773. id: 'conditionVariableName',
  7774. component: VariableName,
  7775. isEdited: propertiesPanel.isTextFieldEntryEdited
  7776. });
  7777. if (!ModelUtil.is(element, 'bpmn:StartEvent')) {
  7778. entries.push({
  7779. id: 'conditionVariableEvents',
  7780. component: VariableEvents,
  7781. isEdited: propertiesPanel.isTextFieldEntryEdited
  7782. });
  7783. }
  7784. return entries;
  7785. }
  7786. function VariableName(props) {
  7787. const {
  7788. element
  7789. } = props;
  7790. const commandStack = useService('commandStack');
  7791. const translate = useService('translate');
  7792. const debounce = useService('debounceInput');
  7793. const getValue = () => {
  7794. return getConditionalEventDefinition(element).get('variableName');
  7795. };
  7796. const setValue = value => {
  7797. commandStack.execute('element.updateModdleProperties', {
  7798. element: element,
  7799. moddleElement: getConditionalEventDefinition(element),
  7800. properties: {
  7801. variableName: value || ''
  7802. }
  7803. });
  7804. };
  7805. return jsxRuntime.jsx(propertiesPanel.TextFieldEntry, {
  7806. element: element,
  7807. id: "conditionVariableName",
  7808. label: translate('Variable name'),
  7809. getValue: getValue,
  7810. setValue: setValue,
  7811. debounce: debounce
  7812. });
  7813. }
  7814. function VariableEvents(props) {
  7815. const {
  7816. element
  7817. } = props;
  7818. const commandStack = useService('commandStack');
  7819. const translate = useService('translate');
  7820. const debounce = useService('debounceInput');
  7821. const getValue = () => {
  7822. return getConditionalEventDefinition(element).get('variableEvents');
  7823. };
  7824. const setValue = value => {
  7825. commandStack.execute('element.updateModdleProperties', {
  7826. element: element,
  7827. moddleElement: getConditionalEventDefinition(element),
  7828. properties: {
  7829. variableEvents: value || ''
  7830. }
  7831. });
  7832. };
  7833. return jsxRuntime.jsx(propertiesPanel.TextFieldEntry, {
  7834. element: element,
  7835. id: "conditionVariableEvents",
  7836. label: translate('Variable events'),
  7837. description: translate('Specify more than one variable change event as a comma separated list.'),
  7838. getValue: getValue,
  7839. setValue: setValue,
  7840. debounce: debounce
  7841. });
  7842. } // helper ////////////////////
  7843. const CONDITIONAL_SOURCES = ['bpmn:Activity', 'bpmn:ExclusiveGateway', 'bpmn:InclusiveGateway', 'bpmn:ComplexGateway'];
  7844. function isConditionalSource(element) {
  7845. return ModelingUtil.isAny(element, CONDITIONAL_SOURCES);
  7846. }
  7847. function getConditionalEventDefinition(element) {
  7848. if (!ModelUtil.is(element, 'bpmn:Event')) {
  7849. return false;
  7850. }
  7851. return getEventDefinition(element, 'bpmn:ConditionalEventDefinition');
  7852. }
  7853. function getConditionType(element) {
  7854. const conditionExpression = getConditionExpression(element);
  7855. if (!conditionExpression) {
  7856. return '';
  7857. } else {
  7858. return conditionExpression.get('language') === undefined ? 'expression' : 'script';
  7859. }
  7860. }
  7861. /**
  7862. * getConditionExpression - get the body value of a condition expression for a given element
  7863. *
  7864. * @param {ModdleElement} element
  7865. *
  7866. * @return {string|undefined}
  7867. */
  7868. function getConditionExpression(element) {
  7869. const businessObject = ModelUtil.getBusinessObject(element);
  7870. if (ModelUtil.is(businessObject, 'bpmn:SequenceFlow')) {
  7871. return businessObject.get('conditionExpression');
  7872. } else if (getConditionalEventDefinition(businessObject)) {
  7873. return getConditionalEventDefinition(businessObject).get('condition');
  7874. }
  7875. }
  7876. function getScriptType$1(element) {
  7877. const conditionExpression = getConditionExpression(element);
  7878. const resource = conditionExpression.get('camunda:resource');
  7879. if (typeof resource !== 'undefined') {
  7880. return 'resource';
  7881. } else {
  7882. return 'script';
  7883. }
  7884. }
  7885. function updateCondition(element, commandStack, condition = undefined) {
  7886. if (ModelUtil.is(element, 'bpmn:SequenceFlow')) {
  7887. commandStack.execute('element.updateProperties', {
  7888. element,
  7889. properties: {
  7890. conditionExpression: condition
  7891. }
  7892. });
  7893. } else {
  7894. commandStack.execute('element.updateModdleProperties', {
  7895. element,
  7896. moddleElement: getConditionalEventDefinition(element),
  7897. properties: {
  7898. condition
  7899. }
  7900. });
  7901. }
  7902. }
  7903. function createFormalExpression(parent, attributes, bpmnFactory) {
  7904. return createElement('bpmn:FormalExpression', attributes, ModelUtil.is(parent, 'bpmn:SequenceFlow') ? ModelUtil.getBusinessObject(parent) : getConditionalEventDefinition(parent), bpmnFactory);
  7905. }
  7906. /**
  7907. * Cf. https://docs.camunda.org/manual/latest/user-guide/process-engine/scripting/
  7908. */
  7909. function ScriptProps(props) {
  7910. const {
  7911. element,
  7912. script,
  7913. prefix
  7914. } = props;
  7915. const entries = [];
  7916. const scriptType = getScriptType(script || element);
  7917. const idPrefix = prefix || ''; // (1) scriptFormat
  7918. entries.push({
  7919. id: idPrefix + 'scriptFormat',
  7920. component: Format,
  7921. isEdited: propertiesPanel.isTextFieldEntryEdited,
  7922. idPrefix,
  7923. script
  7924. }); // (2) type
  7925. entries.push({
  7926. id: idPrefix + 'scriptType',
  7927. component: Type$3,
  7928. isEdited: propertiesPanel.isSelectEntryEdited,
  7929. idPrefix,
  7930. script
  7931. }); // (3) script
  7932. if (scriptType === 'script') {
  7933. entries.push({
  7934. id: idPrefix + 'scriptValue',
  7935. component: Script,
  7936. isEdited: propertiesPanel.isTextAreaEntryEdited,
  7937. idPrefix,
  7938. script
  7939. });
  7940. } // (4) resource
  7941. if (scriptType === 'resource') {
  7942. entries.push({
  7943. id: idPrefix + 'scriptResource',
  7944. component: Resource,
  7945. isEdited: propertiesPanel.isTextFieldEntryEdited,
  7946. idPrefix,
  7947. script
  7948. });
  7949. }
  7950. return entries;
  7951. }
  7952. function Format(props) {
  7953. const {
  7954. element,
  7955. idPrefix,
  7956. script
  7957. } = props;
  7958. const commandStack = useService('commandStack');
  7959. const translate = useService('translate');
  7960. const debounce = useService('debounceInput');
  7961. const businessObject = script || ModelUtil.getBusinessObject(element);
  7962. const getValue = () => {
  7963. return businessObject.get('scriptFormat');
  7964. };
  7965. const setValue = value => {
  7966. commandStack.execute('element.updateModdleProperties', {
  7967. element,
  7968. moddleElement: businessObject,
  7969. properties: {
  7970. scriptFormat: value
  7971. }
  7972. });
  7973. };
  7974. return propertiesPanel.TextFieldEntry({
  7975. element,
  7976. id: idPrefix + 'scriptFormat',
  7977. label: translate('Format'),
  7978. getValue,
  7979. setValue,
  7980. debounce
  7981. });
  7982. }
  7983. function Type$3(props) {
  7984. const {
  7985. element,
  7986. idPrefix,
  7987. script
  7988. } = props;
  7989. const commandStack = useService('commandStack');
  7990. const translate = useService('translate');
  7991. const businessObject = script || ModelUtil.getBusinessObject(element);
  7992. const scriptProperty = getScriptProperty(businessObject);
  7993. const getValue = () => {
  7994. return getScriptType(businessObject);
  7995. };
  7996. const setValue = value => {
  7997. // reset script properties on type change
  7998. const properties = {
  7999. [scriptProperty]: value === 'script' ? '' : undefined,
  8000. 'camunda:resource': value === 'resource' ? '' : undefined
  8001. };
  8002. commandStack.execute('element.updateModdleProperties', {
  8003. element,
  8004. moddleElement: businessObject,
  8005. properties
  8006. });
  8007. };
  8008. const getOptions = () => {
  8009. const options = [{
  8010. value: '',
  8011. label: translate('<none>')
  8012. }, {
  8013. value: 'resource',
  8014. label: translate('External resource')
  8015. }, {
  8016. value: 'script',
  8017. label: translate('Inline script')
  8018. }];
  8019. return options;
  8020. };
  8021. return propertiesPanel.SelectEntry({
  8022. element,
  8023. id: idPrefix + 'scriptType',
  8024. label: translate('Type'),
  8025. getValue,
  8026. setValue,
  8027. getOptions
  8028. });
  8029. }
  8030. function Script(props) {
  8031. const {
  8032. element,
  8033. idPrefix,
  8034. script
  8035. } = props;
  8036. const commandStack = useService('commandStack');
  8037. const translate = useService('translate');
  8038. const debounce = useService('debounceInput');
  8039. const businessObject = script || ModelUtil.getBusinessObject(element);
  8040. const scriptProperty = getScriptProperty(businessObject);
  8041. const getValue = () => {
  8042. return getScriptValue(businessObject);
  8043. };
  8044. const setValue = value => {
  8045. commandStack.execute('element.updateModdleProperties', {
  8046. element,
  8047. moddleElement: businessObject,
  8048. properties: {
  8049. [scriptProperty]: value || ''
  8050. }
  8051. });
  8052. };
  8053. return propertiesPanel.TextAreaEntry({
  8054. element,
  8055. id: idPrefix + 'scriptValue',
  8056. label: translate('Script'),
  8057. getValue,
  8058. setValue,
  8059. debounce,
  8060. monospace: true
  8061. });
  8062. }
  8063. function Resource(props) {
  8064. const {
  8065. element,
  8066. idPrefix,
  8067. script
  8068. } = props;
  8069. const commandStack = useService('commandStack');
  8070. const translate = useService('translate');
  8071. const debounce = useService('debounceInput');
  8072. const businessObject = script || ModelUtil.getBusinessObject(element);
  8073. const getValue = () => {
  8074. return businessObject.get('camunda:resource');
  8075. };
  8076. const setValue = value => {
  8077. commandStack.execute('element.updateModdleProperties', {
  8078. element,
  8079. moddleElement: businessObject,
  8080. properties: {
  8081. 'camunda:resource': value || ''
  8082. }
  8083. });
  8084. };
  8085. return propertiesPanel.TextFieldEntry({
  8086. element,
  8087. id: idPrefix + 'scriptResource',
  8088. label: translate('Resource'),
  8089. getValue,
  8090. setValue,
  8091. debounce
  8092. });
  8093. } // helper ////////////////////
  8094. function getScriptType(element) {
  8095. const businessObject = ModelUtil.getBusinessObject(element);
  8096. const scriptValue = getScriptValue(businessObject);
  8097. if (typeof scriptValue !== 'undefined') {
  8098. return 'script';
  8099. }
  8100. const resource = businessObject.get('camunda:resource');
  8101. if (typeof resource !== 'undefined') {
  8102. return 'resource';
  8103. }
  8104. }
  8105. function getScriptValue(businessObject) {
  8106. return businessObject.get(getScriptProperty(businessObject));
  8107. }
  8108. function isScript$2(element) {
  8109. return ModelUtil.is(element, 'camunda:Script');
  8110. }
  8111. function getScriptProperty(businessObject) {
  8112. return isScript$2(businessObject) ? 'value' : 'script';
  8113. }
  8114. function getElements(businessObject, type, property) {
  8115. const elements = getExtensionElementsList(businessObject, type);
  8116. return !property ? elements : (elements[0] || {})[property] || [];
  8117. }
  8118. function getParameters(element, prop) {
  8119. const inputOutput = getInputOutput(element);
  8120. return inputOutput && inputOutput.get(prop) || [];
  8121. }
  8122. /**
  8123. * Get a camunda:inputOutput from the business object
  8124. *
  8125. * @param {djs.model.Base | ModdleElement} element
  8126. *
  8127. * @return {ModdleElement} the inputOutput object
  8128. */
  8129. function getInputOutput(element) {
  8130. if (ModelUtil.is(element, 'camunda:Connector')) {
  8131. return element.get('inputOutput');
  8132. }
  8133. const businessObject = ModelUtil.getBusinessObject(element);
  8134. return (getElements(businessObject, 'camunda:InputOutput') || [])[0];
  8135. }
  8136. /**
  8137. * Return all input parameters existing in the business object, and
  8138. * an empty array if none exist.
  8139. *
  8140. * @param {djs.model.Base} element
  8141. *
  8142. * @return {Array} a list of input parameter objects
  8143. */
  8144. function getInputParameters(element) {
  8145. return getParameters(element, 'inputParameters');
  8146. }
  8147. /**
  8148. * Return all output parameters existing in the business object, and
  8149. * an empty array if none exist.
  8150. *
  8151. * @param {djs.model.Base} element
  8152. *
  8153. * @return {Array} a list of output parameter objects
  8154. */
  8155. function getOutputParameters(element) {
  8156. return getParameters(element, 'outputParameters');
  8157. }
  8158. function isInputOutputSupported(element) {
  8159. const businessObject = ModelUtil.getBusinessObject(element);
  8160. return ModelUtil.is(businessObject, 'bpmn:FlowNode') && !(ModelingUtil.isAny(businessObject, ['bpmn:StartEvent', 'bpmn:BoundaryEvent', 'bpmn:Gateway']) || ModelUtil.is(businessObject, 'bpmn:SubProcess') && businessObject.get('triggeredByEvent'));
  8161. }
  8162. function areInputParametersSupported(element) {
  8163. return isInputOutputSupported(element);
  8164. }
  8165. function areOutputParametersSupported(element) {
  8166. const businessObject = ModelUtil.getBusinessObject(element);
  8167. return isInputOutputSupported(element) && !ModelUtil.is(businessObject, 'bpmn:EndEvent') && !businessObject.loopCharacteristics;
  8168. }
  8169. function getInputOutputType(parameter) {
  8170. const definitionTypes = {
  8171. 'camunda:Map': 'map',
  8172. 'camunda:List': 'list',
  8173. 'camunda:Script': 'script'
  8174. };
  8175. let type = 'stringOrExpression';
  8176. const definition = parameter.get('definition');
  8177. if (typeof definition !== 'undefined') {
  8178. type = definitionTypes[definition.$type];
  8179. }
  8180. return type;
  8181. }
  8182. function CreateParameterCmd(element, type, parent, bpmnFactory) {
  8183. const isInput = type === 'camunda:InputParameter';
  8184. const newParameter = createElement(type, {
  8185. name: nextId(isInput ? 'Input_' : 'Output_')
  8186. }, parent, bpmnFactory);
  8187. const propertyName = isInput ? 'inputParameters' : 'outputParameters';
  8188. return {
  8189. cmd: 'element.updateModdleProperties',
  8190. context: {
  8191. element,
  8192. moddleElement: parent,
  8193. properties: {
  8194. [propertyName]: [...parent.get(propertyName), newParameter]
  8195. }
  8196. }
  8197. };
  8198. }
  8199. function AddParameterCmd(element, type, bpmnFactory) {
  8200. const commands = [];
  8201. const businessObject = ModelUtil.getBusinessObject(element);
  8202. let extensionElements = businessObject.get('extensionElements'); // (1) ensure extension elements
  8203. if (!extensionElements) {
  8204. extensionElements = createElement('bpmn:ExtensionElements', {
  8205. values: []
  8206. }, businessObject, bpmnFactory);
  8207. commands.push({
  8208. cmd: 'element.updateModdleProperties',
  8209. context: {
  8210. element,
  8211. moddleElement: businessObject,
  8212. properties: {
  8213. extensionElements
  8214. }
  8215. }
  8216. });
  8217. } // (2) ensure inputOutput
  8218. let inputOutput = getInputOutput(element);
  8219. if (!inputOutput) {
  8220. const parent = extensionElements;
  8221. inputOutput = createElement('camunda:InputOutput', {
  8222. inputParameters: [],
  8223. outputParameters: []
  8224. }, parent, bpmnFactory);
  8225. commands.push({
  8226. cmd: 'element.updateModdleProperties',
  8227. context: {
  8228. element,
  8229. moddleElement: extensionElements,
  8230. properties: {
  8231. values: [...extensionElements.get('values'), inputOutput]
  8232. }
  8233. }
  8234. });
  8235. } // (3) create + add parameter
  8236. commands.push(CreateParameterCmd(element, type, inputOutput, bpmnFactory));
  8237. return commands;
  8238. }
  8239. function ListProp(props) {
  8240. const {
  8241. element,
  8242. id: idPrefix,
  8243. index,
  8244. item
  8245. } = props;
  8246. const id = `${idPrefix}-listItem-${index}`;
  8247. return jsxRuntime.jsx(ListItem, {
  8248. idPrefix: id,
  8249. element: element,
  8250. item: item
  8251. });
  8252. }
  8253. function ListProps(props) {
  8254. const {
  8255. idPrefix,
  8256. element,
  8257. parameter
  8258. } = props;
  8259. const bpmnFactory = useService('bpmnFactory');
  8260. const commandStack = useService('commandStack');
  8261. const translate = useService('translate');
  8262. const list = parameter.get('definition');
  8263. const items = list.get('items');
  8264. function addItem() {
  8265. const value = createElement('camunda:Value', {}, parameter, bpmnFactory);
  8266. commandStack.execute('element.updateModdleProperties', {
  8267. element,
  8268. moddleElement: list,
  8269. properties: {
  8270. items: [...list.get('items'), value]
  8271. }
  8272. });
  8273. }
  8274. function removeItem(item) {
  8275. commandStack.execute('element.updateModdleProperties', {
  8276. element,
  8277. moddleElement: list,
  8278. properties: {
  8279. items: minDash.without(list.get('items'), item)
  8280. }
  8281. });
  8282. }
  8283. function compareFn(item, anotherItem) {
  8284. const [value = '', anotherValue = ''] = [item.value, anotherItem.value];
  8285. return value === anotherValue ? 0 : value > anotherValue ? 1 : -1;
  8286. }
  8287. return propertiesPanel.ListEntry({
  8288. element,
  8289. autoFocusEntry: true,
  8290. compareFn,
  8291. id: idPrefix + '-list',
  8292. items,
  8293. label: translate('List values'),
  8294. onAdd: addItem,
  8295. onRemove: removeItem,
  8296. component: ListProp
  8297. });
  8298. }
  8299. function ListItem(props) {
  8300. const {
  8301. idPrefix,
  8302. element,
  8303. item
  8304. } = props;
  8305. const commandStack = useService('commandStack');
  8306. const translate = useService('translate');
  8307. const definitionLabels = {
  8308. 'camunda:Map': translate('Map'),
  8309. 'camunda:List': translate('List'),
  8310. 'camunda:Script': translate('Script')
  8311. };
  8312. const getValue = () => {
  8313. if (isDefinitionType$1(item)) {
  8314. return definitionLabels[item.$type];
  8315. }
  8316. return item.get('value');
  8317. };
  8318. const setValue = value => {
  8319. commandStack.execute('element.updateModdleProperties', {
  8320. element,
  8321. moddleElement: item,
  8322. properties: {
  8323. value
  8324. }
  8325. });
  8326. };
  8327. return ListValue({
  8328. id: idPrefix + '-value',
  8329. disabled: isDefinitionType$1(item),
  8330. getValue,
  8331. setValue
  8332. });
  8333. }
  8334. function ListValue(props) {
  8335. const {
  8336. id,
  8337. disabled,
  8338. getValue,
  8339. setValue
  8340. } = props;
  8341. const debounce = useService('debounceInput', true);
  8342. return jsxRuntime.jsx(propertiesPanel.SimpleEntry, {
  8343. id: id,
  8344. getValue: getValue,
  8345. setValue: setValue,
  8346. disabled: disabled,
  8347. debounce: debounce
  8348. });
  8349. } // helper //////////////////////
  8350. function isScript$1(element) {
  8351. return ModelUtil.is(element, 'camunda:Script');
  8352. }
  8353. function isList$1(element) {
  8354. return ModelUtil.is(element, 'camunda:List');
  8355. }
  8356. function isMap$1(element) {
  8357. return ModelUtil.is(element, 'camunda:Map');
  8358. }
  8359. function isDefinitionType$1(element) {
  8360. return isScript$1(element) || isList$1(element) || isMap$1(element);
  8361. }
  8362. function MapProp(props) {
  8363. const {
  8364. element,
  8365. id: idPrefix,
  8366. index,
  8367. item: entry,
  8368. open
  8369. } = props;
  8370. const id = `${idPrefix}-mapEntry-${index}`;
  8371. const translate = useService('translate');
  8372. return jsxRuntime.jsx(propertiesPanel.CollapsibleEntry, {
  8373. id: id,
  8374. element: element,
  8375. entries: MapEntry({
  8376. element,
  8377. entry,
  8378. idPrefix: id
  8379. }),
  8380. label: entry.get('key') || translate('<empty>'),
  8381. open: open
  8382. });
  8383. }
  8384. function MapProps(props) {
  8385. const {
  8386. idPrefix,
  8387. element,
  8388. parameter
  8389. } = props;
  8390. const bpmnFactory = useService('bpmnFactory');
  8391. const commandStack = useService('commandStack');
  8392. const translate = useService('translate');
  8393. const map = parameter.get('definition');
  8394. const entries = map.get('entries');
  8395. function addEntry() {
  8396. const entry = createElement('camunda:Entry', {}, parameter, bpmnFactory);
  8397. commandStack.execute('element.updateModdleProperties', {
  8398. element,
  8399. moddleElement: map,
  8400. properties: {
  8401. entries: [...map.get('entries'), entry]
  8402. }
  8403. });
  8404. }
  8405. function removeEntry(entry) {
  8406. commandStack.execute('element.updateModdleProperties', {
  8407. element,
  8408. moddleElement: map,
  8409. properties: {
  8410. entries: minDash.without(map.get('entries'), entry)
  8411. }
  8412. });
  8413. }
  8414. function compareFn(entry, anotherEntry) {
  8415. const [key = '', anotherKey = ''] = [entry.key, anotherEntry.key];
  8416. return key === anotherKey ? 0 : key > anotherKey ? 1 : -1;
  8417. }
  8418. return propertiesPanel.ListEntry({
  8419. element,
  8420. autoFocusEntry: true,
  8421. compareFn,
  8422. id: idPrefix + '-map',
  8423. items: entries,
  8424. label: translate('Map entries'),
  8425. onAdd: addEntry,
  8426. onRemove: removeEntry,
  8427. component: MapProp
  8428. });
  8429. }
  8430. function MapEntry(props) {
  8431. const {
  8432. element,
  8433. entry,
  8434. idPrefix
  8435. } = props;
  8436. const entries = [{
  8437. id: idPrefix + '-key',
  8438. component: MapKey,
  8439. entry,
  8440. idPrefix,
  8441. element
  8442. }, {
  8443. id: idPrefix + '-value',
  8444. component: MapValue,
  8445. entry,
  8446. idPrefix,
  8447. element
  8448. }];
  8449. return entries;
  8450. }
  8451. function MapKey(props) {
  8452. const {
  8453. element,
  8454. entry,
  8455. idPrefix
  8456. } = props;
  8457. const commandStack = useService('commandStack');
  8458. const translate = useService('translate');
  8459. const debounce = useService('debounceInput');
  8460. const setValue = value => {
  8461. commandStack.execute('element.updateModdleProperties', {
  8462. element,
  8463. moddleElement: entry,
  8464. properties: {
  8465. key: value
  8466. }
  8467. });
  8468. };
  8469. const getValue = () => {
  8470. return entry.get('key');
  8471. };
  8472. return propertiesPanel.TextFieldEntry({
  8473. element: entry,
  8474. id: idPrefix + '-key',
  8475. label: translate('Key'),
  8476. getValue,
  8477. setValue,
  8478. debounce
  8479. });
  8480. }
  8481. function MapValue(props) {
  8482. const {
  8483. element,
  8484. entry,
  8485. idPrefix
  8486. } = props;
  8487. const commandStack = useService('commandStack');
  8488. const translate = useService('translate');
  8489. const debounce = useService('debounceInput');
  8490. const definition = entry.get('definition');
  8491. const definitionLabels = {
  8492. 'camunda:Map': translate('Map'),
  8493. 'camunda:List': translate('List'),
  8494. 'camunda:Script': translate('Script')
  8495. };
  8496. const setValue = value => {
  8497. commandStack.execute('element.updateModdleProperties', {
  8498. element,
  8499. moddleElement: entry,
  8500. properties: {
  8501. value
  8502. }
  8503. });
  8504. };
  8505. const getValue = () => {
  8506. if (isDefinitionType(definition)) {
  8507. return definitionLabels[definition.$type];
  8508. }
  8509. return entry.get('value');
  8510. };
  8511. return propertiesPanel.TextFieldEntry({
  8512. element: entry,
  8513. id: idPrefix + '-value',
  8514. label: translate('Value'),
  8515. getValue,
  8516. setValue,
  8517. disabled: isDefinitionType(definition),
  8518. debounce
  8519. });
  8520. } // helper ///////////////////
  8521. function isScript(element) {
  8522. return ModelUtil.is(element, 'camunda:Script');
  8523. }
  8524. function isList(element) {
  8525. return ModelUtil.is(element, 'camunda:List');
  8526. }
  8527. function isMap(element) {
  8528. return ModelUtil.is(element, 'camunda:Map');
  8529. }
  8530. function isDefinitionType(element) {
  8531. return isScript(element) || isList(element) || isMap(element);
  8532. }
  8533. const DEFAULT_PROPS$3 = {
  8534. value: undefined,
  8535. definition: undefined
  8536. };
  8537. function InputOutputParameter(props) {
  8538. const {
  8539. idPrefix,
  8540. element,
  8541. parameter
  8542. } = props;
  8543. const inputOutputType = getInputOutputType(parameter);
  8544. let entries = [{
  8545. id: idPrefix + '-name',
  8546. component: Name$2,
  8547. isEdited: propertiesPanel.isTextFieldEntryEdited,
  8548. idPrefix,
  8549. parameter
  8550. }, {
  8551. id: idPrefix + '-type',
  8552. component: Type$2,
  8553. isEdited: propertiesPanel.isSelectEntryEdited,
  8554. idPrefix,
  8555. parameter
  8556. }]; // (1) String or expression
  8557. if (inputOutputType === 'stringOrExpression') {
  8558. entries.push({
  8559. id: idPrefix + '-stringOrExpression',
  8560. component: StringOrExpression,
  8561. isEdited: propertiesPanel.isTextAreaEntryEdited,
  8562. idPrefix,
  8563. parameter
  8564. }); // (2) Script
  8565. } else if (inputOutputType === 'script') {
  8566. const script = parameter.get('definition');
  8567. entries = [...entries, ...ScriptProps({
  8568. element,
  8569. prefix: idPrefix + '-',
  8570. script
  8571. })]; // (3) List
  8572. } else if (inputOutputType === 'list') {
  8573. entries.push({
  8574. id: `${idPrefix}-list`,
  8575. component: ListProps,
  8576. idPrefix,
  8577. parameter
  8578. }); // (4) Map
  8579. } else if (inputOutputType === 'map') {
  8580. entries.push({
  8581. id: `${idPrefix}-map`,
  8582. component: MapProps,
  8583. idPrefix,
  8584. parameter
  8585. });
  8586. }
  8587. return entries;
  8588. }
  8589. function Name$2(props) {
  8590. const {
  8591. idPrefix,
  8592. element,
  8593. parameter
  8594. } = props;
  8595. const commandStack = useService('commandStack');
  8596. const translate = useService('translate');
  8597. const debounce = useService('debounceInput');
  8598. const setValue = value => {
  8599. commandStack.execute('element.updateModdleProperties', {
  8600. element,
  8601. moddleElement: parameter,
  8602. properties: {
  8603. name: value
  8604. }
  8605. });
  8606. };
  8607. const getValue = parameter => {
  8608. return parameter.get('name');
  8609. };
  8610. return propertiesPanel.TextFieldEntry({
  8611. element: parameter,
  8612. id: idPrefix + '-name',
  8613. label: translate(isInput(parameter) ? 'Local variable name' : 'Process variable name'),
  8614. getValue,
  8615. setValue,
  8616. debounce
  8617. });
  8618. }
  8619. function Type$2(props) {
  8620. const {
  8621. idPrefix,
  8622. element,
  8623. parameter
  8624. } = props;
  8625. const bpmnFactory = useService('bpmnFactory');
  8626. const commandStack = useService('commandStack');
  8627. const translate = useService('translate');
  8628. const createDefinitionElement = type => {
  8629. return createElement(type, {}, parameter, bpmnFactory);
  8630. };
  8631. const getValue = mapping => {
  8632. return getInputOutputType(mapping);
  8633. };
  8634. const setValue = value => {
  8635. let properties = { ...DEFAULT_PROPS$3
  8636. };
  8637. if (value === 'script') {
  8638. properties.definition = createDefinitionElement('camunda:Script');
  8639. } else if (value === 'list') {
  8640. properties.definition = createDefinitionElement('camunda:List');
  8641. } else if (value === 'map') {
  8642. properties.definition = createDefinitionElement('camunda:Map');
  8643. }
  8644. commandStack.execute('element.updateModdleProperties', {
  8645. element,
  8646. moddleElement: parameter,
  8647. properties
  8648. });
  8649. };
  8650. const getOptions = () => {
  8651. const options = [{
  8652. label: translate('List'),
  8653. value: 'list'
  8654. }, {
  8655. label: translate('Map'),
  8656. value: 'map'
  8657. }, {
  8658. label: translate('Script'),
  8659. value: 'script'
  8660. }, {
  8661. label: translate('String or expression'),
  8662. value: 'stringOrExpression'
  8663. }];
  8664. return options;
  8665. };
  8666. return propertiesPanel.SelectEntry({
  8667. element: parameter,
  8668. id: idPrefix + '-type',
  8669. label: translate('Assignment type'),
  8670. getValue,
  8671. setValue,
  8672. getOptions
  8673. });
  8674. }
  8675. function StringOrExpression(props) {
  8676. const {
  8677. idPrefix,
  8678. element,
  8679. parameter
  8680. } = props;
  8681. const commandStack = useService('commandStack');
  8682. const translate = useService('translate');
  8683. const debounce = useService('debounceInput');
  8684. const setValue = value => {
  8685. commandStack.execute('element.updateModdleProperties', {
  8686. element,
  8687. moddleElement: parameter,
  8688. properties: {
  8689. value
  8690. }
  8691. });
  8692. };
  8693. const getValue = parameter => {
  8694. return parameter.get('value');
  8695. };
  8696. return propertiesPanel.TextAreaEntry({
  8697. element: parameter,
  8698. id: idPrefix + '-stringOrExpression',
  8699. label: translate('Value'),
  8700. description: translate('Start typing "${}" to create an expression.'),
  8701. getValue,
  8702. setValue,
  8703. rows: 1,
  8704. debounce
  8705. });
  8706. } // helper /////////////////////
  8707. function isInput(parameter) {
  8708. return ModelUtil.is(parameter, 'camunda:InputParameter');
  8709. }
  8710. /**
  8711. * Check whether an element is camunda:ServiceTaskLike
  8712. *
  8713. * @param {djs.model.Base} element
  8714. *
  8715. * @return {boolean} a boolean value
  8716. */
  8717. function isServiceTaskLike(element) {
  8718. return ModelUtil.is(element, 'camunda:ServiceTaskLike');
  8719. }
  8720. /**
  8721. * Returns 'true' if the given element is 'camunda:DmnCapable'
  8722. *
  8723. * @param {djs.model.Base} element
  8724. *
  8725. * @return {boolean} a boolean value
  8726. */
  8727. function isDmnCapable(element) {
  8728. return ModelUtil.is(element, 'camunda:DmnCapable');
  8729. }
  8730. /**
  8731. * Returns 'true' if the given element is 'camunda:ExternalCapable'
  8732. *
  8733. * @param {djs.model.Base} element
  8734. *
  8735. * @return {boolean} a boolean value
  8736. */
  8737. function isExternalCapable(element) {
  8738. return ModelUtil.is(element, 'camunda:ExternalCapable');
  8739. }
  8740. /**
  8741. * getServiceTaskLikeBusinessObject - Get a 'camunda:ServiceTaskLike' business object.
  8742. *
  8743. * If the given element is not a 'camunda:ServiceTaskLike', then 'false'
  8744. * is returned.
  8745. *
  8746. * @param {djs.model.Base} element
  8747. * @return {ModdleElement} the 'camunda:ServiceTaskLike' business object
  8748. */
  8749. function getServiceTaskLikeBusinessObject(element) {
  8750. if (ModelUtil.is(element, 'bpmn:IntermediateThrowEvent') || ModelUtil.is(element, 'bpmn:EndEvent')) {
  8751. // change business object to 'messageEventDefinition' when
  8752. // the element is a message intermediate throw event or message end event
  8753. // because the camunda extensions (e.g. camunda:class) are in the message
  8754. // event definition tag and not in the intermediate throw event or end event tag
  8755. const messageEventDefinition = getMessageEventDefinition(element);
  8756. if (messageEventDefinition) {
  8757. element = messageEventDefinition;
  8758. }
  8759. }
  8760. return isServiceTaskLike(element) && ModelUtil.getBusinessObject(element);
  8761. }
  8762. /**
  8763. * Returns the implementation type of the given element.
  8764. *
  8765. * Possible implementation types are:
  8766. * - dmn
  8767. * - connector
  8768. * - external
  8769. * - class
  8770. * - expression
  8771. * - delegateExpression
  8772. * - script
  8773. * - or undefined, when no matching implementation type is found
  8774. *
  8775. * @param {djs.model.Base} element
  8776. *
  8777. * @return {String} the implementation type
  8778. */
  8779. function getImplementationType(element) {
  8780. const businessObject = getListenerBusinessObject(element) || getServiceTaskLikeBusinessObject(element);
  8781. if (!businessObject) {
  8782. return;
  8783. }
  8784. if (isDmnCapable(businessObject)) {
  8785. const decisionRef = businessObject.get('camunda:decisionRef');
  8786. if (typeof decisionRef !== 'undefined') {
  8787. return 'dmn';
  8788. }
  8789. }
  8790. if (isServiceTaskLike(businessObject)) {
  8791. const connectors = getExtensionElementsList(businessObject, 'camunda:Connector');
  8792. if (connectors.length) {
  8793. return 'connector';
  8794. }
  8795. }
  8796. if (isExternalCapable(businessObject)) {
  8797. const type = businessObject.get('camunda:type');
  8798. if (type === 'external') {
  8799. return 'external';
  8800. }
  8801. }
  8802. const cls = businessObject.get('camunda:class');
  8803. if (typeof cls !== 'undefined') {
  8804. return 'class';
  8805. }
  8806. const expression = businessObject.get('camunda:expression');
  8807. if (typeof expression !== 'undefined') {
  8808. return 'expression';
  8809. }
  8810. const delegateExpression = businessObject.get('camunda:delegateExpression');
  8811. if (typeof delegateExpression !== 'undefined') {
  8812. return 'delegateExpression';
  8813. }
  8814. const script = businessObject.get('script');
  8815. if (typeof script !== 'undefined') {
  8816. return 'script';
  8817. }
  8818. }
  8819. function getListenerBusinessObject(businessObject) {
  8820. if (ModelingUtil.isAny(businessObject, ['camunda:ExecutionListener', 'camunda:TaskListener'])) {
  8821. return businessObject;
  8822. }
  8823. }
  8824. function areConnectorsSupported(element) {
  8825. const businessObject = getServiceTaskLikeBusinessObject(element);
  8826. return businessObject && getImplementationType(businessObject) === 'connector';
  8827. }
  8828. function getConnectors$2(businessObject) {
  8829. return getExtensionElementsList(businessObject, 'camunda:Connector');
  8830. }
  8831. function getConnector$1(element) {
  8832. const businessObject = getServiceTaskLikeBusinessObject(element);
  8833. const connectors = getConnectors$2(businessObject);
  8834. return connectors[0];
  8835. }
  8836. function ConnectorInputProps(props) {
  8837. const {
  8838. element,
  8839. injector
  8840. } = props;
  8841. if (!areConnectorsSupported(element)) {
  8842. return null;
  8843. }
  8844. const connector = getConnector$1(element);
  8845. const commandStack = injector.get('commandStack'),
  8846. bpmnFactory = injector.get('bpmnFactory');
  8847. const inputParameters = getInputParameters(connector) || [];
  8848. const items = inputParameters.map((parameter, index) => {
  8849. const id = element.id + '-connector-inputParameter-' + index;
  8850. return {
  8851. id,
  8852. label: parameter.get('name') || '',
  8853. entries: InputOutputParameter({
  8854. element,
  8855. idPrefix: id,
  8856. parameter
  8857. }),
  8858. autoFocusEntry: id + '-name',
  8859. remove: removeFactory$9({
  8860. connector,
  8861. element,
  8862. parameter,
  8863. commandStack
  8864. })
  8865. };
  8866. });
  8867. function add(event) {
  8868. event.stopPropagation();
  8869. const commands = []; // (1) ensure inputOutput
  8870. let inputOutput = getInputOutput(connector);
  8871. if (!inputOutput) {
  8872. inputOutput = createElement('camunda:InputOutput', {
  8873. inputParameters: [],
  8874. outputParameters: []
  8875. }, connector, bpmnFactory);
  8876. commands.push({
  8877. cmd: 'element.updateModdleProperties',
  8878. context: {
  8879. element: element,
  8880. moddleElement: connector,
  8881. properties: {
  8882. inputOutput
  8883. }
  8884. }
  8885. });
  8886. } // (2) create + add parameter
  8887. commands.push(CreateParameterCmd(element, 'camunda:InputParameter', inputOutput, bpmnFactory)); // (3) commit all updates
  8888. commandStack.execute('properties-panel.multi-command-executor', commands);
  8889. }
  8890. return {
  8891. items,
  8892. add
  8893. };
  8894. }
  8895. function removeFactory$9(props) {
  8896. const {
  8897. commandStack,
  8898. connector,
  8899. element,
  8900. parameter
  8901. } = props;
  8902. return function (event) {
  8903. event.stopPropagation();
  8904. const inputOutput = getInputOutput(connector);
  8905. if (!inputOutput) {
  8906. return;
  8907. }
  8908. commandStack.execute('element.updateModdleProperties', {
  8909. element: element,
  8910. moddleElement: inputOutput,
  8911. properties: {
  8912. inputParameters: minDash.without(inputOutput.get('inputParameters'), parameter)
  8913. }
  8914. });
  8915. };
  8916. }
  8917. function ConnectorOutputProps(props) {
  8918. const {
  8919. element,
  8920. injector
  8921. } = props;
  8922. if (!areConnectorsSupported(element)) {
  8923. return null;
  8924. }
  8925. const connector = getConnector$1(element);
  8926. const commandStack = injector.get('commandStack'),
  8927. bpmnFactory = injector.get('bpmnFactory');
  8928. const outputParameters = getOutputParameters(connector) || [];
  8929. const items = outputParameters.map((parameter, index) => {
  8930. const id = element.id + '-connector-outputParameter-' + index;
  8931. return {
  8932. id,
  8933. label: parameter.get('name') || '',
  8934. entries: InputOutputParameter({
  8935. idPrefix: id,
  8936. element,
  8937. parameter
  8938. }),
  8939. autoFocusEntry: id + '-name',
  8940. remove: removeFactory$8({
  8941. connector,
  8942. element,
  8943. commandStack,
  8944. parameter
  8945. })
  8946. };
  8947. });
  8948. function add(event) {
  8949. event.stopPropagation();
  8950. const commands = []; // (1) ensure inputOutput
  8951. let inputOutput = getInputOutput(connector);
  8952. if (!inputOutput) {
  8953. inputOutput = createElement('camunda:InputOutput', {
  8954. inputParameters: [],
  8955. outputParameters: []
  8956. }, connector, bpmnFactory);
  8957. commands.push({
  8958. cmd: 'element.updateModdleProperties',
  8959. context: {
  8960. element: element,
  8961. moddleElement: connector,
  8962. properties: {
  8963. inputOutput
  8964. }
  8965. }
  8966. });
  8967. } // (2) create + add parameter
  8968. commands.push(CreateParameterCmd(element, 'camunda:OutputParameter', inputOutput, bpmnFactory)); // (3) commit all updates
  8969. commandStack.execute('properties-panel.multi-command-executor', commands);
  8970. }
  8971. return {
  8972. items,
  8973. add
  8974. };
  8975. }
  8976. function removeFactory$8(props) {
  8977. const {
  8978. commandStack,
  8979. connector,
  8980. element,
  8981. parameter
  8982. } = props;
  8983. return function (event) {
  8984. event.stopPropagation();
  8985. const inputOutput = getInputOutput(connector);
  8986. if (!inputOutput) {
  8987. return;
  8988. }
  8989. commandStack.execute('element.updateModdleProperties', {
  8990. element: element,
  8991. moddleElement: inputOutput,
  8992. properties: {
  8993. outputParameters: minDash.without(inputOutput.get('outputParameters'), parameter)
  8994. }
  8995. });
  8996. };
  8997. }
  8998. function ErrorProps(props) {
  8999. const {
  9000. element,
  9001. entries
  9002. } = props;
  9003. if (!isErrorSupported(element)) {
  9004. return entries;
  9005. }
  9006. const error = getError(element); // (1) errorMessage (error)
  9007. if (error) {
  9008. const idx = findPlaceToInsert(entries, 'errorCode'); // place below errorCode
  9009. entries.splice(idx, 0, {
  9010. id: 'errorMessage',
  9011. component: ErrorMessage$1,
  9012. isEdited: propertiesPanel.isTextFieldEntryEdited
  9013. });
  9014. }
  9015. if (!canHaveErrorVariables(element)) {
  9016. return entries;
  9017. } // (2) errorCodeVariable + errorMessageVariable (errorEventDefinition)
  9018. entries.push({
  9019. id: 'errorCodeVariable',
  9020. component: ErrorCodeVariable,
  9021. isEdited: propertiesPanel.isTextFieldEntryEdited
  9022. }, {
  9023. id: 'errorMessageVariable',
  9024. component: ErrorMessageVariable,
  9025. isEdited: propertiesPanel.isTextFieldEntryEdited
  9026. });
  9027. return entries;
  9028. }
  9029. function ErrorMessage$1(props) {
  9030. const {
  9031. element
  9032. } = props;
  9033. const commandStack = useService('commandStack');
  9034. const translate = useService('translate');
  9035. const debounce = useService('debounceInput');
  9036. const error = getError(element);
  9037. const getValue = () => {
  9038. return error.get('camunda:errorMessage');
  9039. };
  9040. const setValue = value => {
  9041. return commandStack.execute('element.updateModdleProperties', {
  9042. element,
  9043. moddleElement: error,
  9044. properties: {
  9045. 'camunda:errorMessage': value
  9046. }
  9047. });
  9048. };
  9049. return propertiesPanel.TextFieldEntry({
  9050. element,
  9051. id: 'errorMessage',
  9052. label: translate('Message'),
  9053. getValue,
  9054. setValue,
  9055. debounce
  9056. });
  9057. }
  9058. function ErrorCodeVariable(props) {
  9059. const {
  9060. element
  9061. } = props;
  9062. const commandStack = useService('commandStack');
  9063. const translate = useService('translate');
  9064. const debounce = useService('debounceInput');
  9065. const errorEventDefinition = getErrorEventDefinition(element);
  9066. const getValue = () => {
  9067. return errorEventDefinition.get('camunda:errorCodeVariable');
  9068. };
  9069. const setValue = value => {
  9070. return commandStack.execute('element.updateModdleProperties', {
  9071. element,
  9072. moddleElement: errorEventDefinition,
  9073. properties: {
  9074. 'camunda:errorCodeVariable': value
  9075. }
  9076. });
  9077. };
  9078. return propertiesPanel.TextFieldEntry({
  9079. element,
  9080. id: 'errorCodeVariable',
  9081. label: translate('Code variable'),
  9082. description: translate('Define the name of the variable that will contain the error code.'),
  9083. getValue,
  9084. setValue,
  9085. debounce
  9086. });
  9087. }
  9088. function ErrorMessageVariable(props) {
  9089. const {
  9090. element
  9091. } = props;
  9092. const commandStack = useService('commandStack');
  9093. const translate = useService('translate');
  9094. const debounce = useService('debounceInput');
  9095. const errorEventDefinition = getErrorEventDefinition(element);
  9096. const getValue = () => {
  9097. return errorEventDefinition.get('camunda:errorMessageVariable');
  9098. };
  9099. const setValue = value => {
  9100. return commandStack.execute('element.updateModdleProperties', {
  9101. element,
  9102. moddleElement: errorEventDefinition,
  9103. properties: {
  9104. 'camunda:errorMessageVariable': value
  9105. }
  9106. });
  9107. };
  9108. return propertiesPanel.TextFieldEntry({
  9109. element,
  9110. id: 'errorMessageVariable',
  9111. label: translate('Message variable'),
  9112. description: translate('Define the name of the variable that will contain the error message.'),
  9113. getValue,
  9114. setValue,
  9115. debounce
  9116. });
  9117. } // helper ///////////////////////
  9118. function canHaveErrorVariables(element) {
  9119. return ModelUtil.is(element, 'bpmn:StartEvent') || ModelUtil.is(element, 'bpmn:BoundaryEvent');
  9120. }
  9121. function findPlaceToInsert(entries, idx) {
  9122. const entryIndex = minDash.findIndex(entries, entry => entry.id === idx);
  9123. return entryIndex >= 0 ? entryIndex + 1 : entries.length;
  9124. }
  9125. const EMPTY_OPTION = '';
  9126. const CREATE_NEW_OPTION = 'create-new';
  9127. function Error$1(props) {
  9128. const {
  9129. idPrefix,
  9130. errorEventDefinition
  9131. } = props;
  9132. let entries = [{
  9133. id: idPrefix + '-errorRef',
  9134. component: ErrorRef,
  9135. isEdited: propertiesPanel.isSelectEntryEdited,
  9136. errorEventDefinition,
  9137. idPrefix
  9138. }];
  9139. const error = errorEventDefinition.get('errorRef');
  9140. if (error) {
  9141. entries = [...entries, {
  9142. id: idPrefix + '-errorName',
  9143. component: ErrorName,
  9144. isEdited: propertiesPanel.isTextFieldEntryEdited,
  9145. error,
  9146. errorEventDefinition,
  9147. idPrefix
  9148. }, {
  9149. id: idPrefix + '-errorCode',
  9150. component: ErrorCode,
  9151. isEdited: propertiesPanel.isTextFieldEntryEdited,
  9152. error,
  9153. errorEventDefinition,
  9154. idPrefix
  9155. }, {
  9156. id: idPrefix + '-errorMessage',
  9157. component: ErrorMessage,
  9158. isEdited: propertiesPanel.isTextFieldEntryEdited,
  9159. error,
  9160. errorEventDefinition,
  9161. idPrefix
  9162. }];
  9163. }
  9164. entries.push({
  9165. id: idPrefix + '-expression',
  9166. component: Expression$2,
  9167. errorEventDefinition,
  9168. idPrefix
  9169. });
  9170. return entries;
  9171. }
  9172. function ErrorRef(props) {
  9173. const {
  9174. element,
  9175. errorEventDefinition,
  9176. idPrefix
  9177. } = props;
  9178. const bpmnFactory = useService('bpmnFactory');
  9179. const commandStack = useService('commandStack');
  9180. const translate = useService('translate');
  9181. const businessObject = ModelUtil.getBusinessObject(element);
  9182. const getValue = () => {
  9183. const error = errorEventDefinition.get('errorRef');
  9184. if (error) {
  9185. return error.get('id');
  9186. }
  9187. return EMPTY_OPTION;
  9188. };
  9189. const setValue = value => {
  9190. const root = getRoot(businessObject);
  9191. const commands = [];
  9192. let error; // (1) create new error
  9193. if (value === CREATE_NEW_OPTION) {
  9194. error = createElement('bpmn:Error', {
  9195. name: nextId('Error_')
  9196. }, root, bpmnFactory);
  9197. value = error.get('id');
  9198. commands.push({
  9199. cmd: 'element.updateModdleProperties',
  9200. context: {
  9201. element,
  9202. moddleElement: root,
  9203. properties: {
  9204. rootElements: [...root.get('rootElements'), error]
  9205. }
  9206. }
  9207. });
  9208. } // (2) update (or remove) errorRef
  9209. error = error || findRootElementById(businessObject, 'bpmn:Error', value);
  9210. commands.push({
  9211. cmd: 'element.updateModdleProperties',
  9212. context: {
  9213. element,
  9214. moddleElement: errorEventDefinition,
  9215. properties: {
  9216. errorRef: error
  9217. }
  9218. }
  9219. }); // (3) commit all updates
  9220. return commandStack.execute('properties-panel.multi-command-executor', commands);
  9221. };
  9222. const getOptions = () => {
  9223. let options = [{
  9224. value: EMPTY_OPTION,
  9225. label: translate('<none>')
  9226. }, {
  9227. value: CREATE_NEW_OPTION,
  9228. label: translate('Create new ...')
  9229. }];
  9230. const errors = findRootElementsByType(ModelUtil.getBusinessObject(element), 'bpmn:Error');
  9231. sortByName$1(errors).forEach(error => {
  9232. options.push({
  9233. value: error.get('id'),
  9234. label: error.get('name') || error.get('id')
  9235. });
  9236. });
  9237. return options;
  9238. };
  9239. return ReferenceSelectEntry({
  9240. element,
  9241. id: idPrefix + '-errorRef',
  9242. label: translate('Global error reference'),
  9243. autoFocusEntry: idPrefix + '-errorName',
  9244. getValue,
  9245. setValue,
  9246. getOptions
  9247. });
  9248. }
  9249. function ErrorName(props) {
  9250. const {
  9251. element,
  9252. error,
  9253. idPrefix
  9254. } = props;
  9255. const commandStack = useService('commandStack');
  9256. const translate = useService('translate');
  9257. const debounce = useService('debounceInput');
  9258. const getValue = () => {
  9259. return error.get('name');
  9260. };
  9261. const setValue = value => {
  9262. return commandStack.execute('element.updateModdleProperties', {
  9263. element,
  9264. moddleElement: error,
  9265. properties: {
  9266. name: value
  9267. }
  9268. });
  9269. };
  9270. return propertiesPanel.TextFieldEntry({
  9271. element,
  9272. id: idPrefix + '-errorName',
  9273. label: translate('Name'),
  9274. getValue,
  9275. setValue,
  9276. debounce
  9277. });
  9278. }
  9279. function ErrorCode(props) {
  9280. const {
  9281. element,
  9282. error,
  9283. idPrefix
  9284. } = props;
  9285. const commandStack = useService('commandStack');
  9286. const translate = useService('translate');
  9287. const debounce = useService('debounceInput');
  9288. const getValue = () => {
  9289. return error.get('errorCode');
  9290. };
  9291. const setValue = value => {
  9292. return commandStack.execute('element.updateModdleProperties', {
  9293. element,
  9294. moddleElement: error,
  9295. properties: {
  9296. errorCode: value
  9297. }
  9298. });
  9299. };
  9300. return propertiesPanel.TextFieldEntry({
  9301. element,
  9302. id: idPrefix + '-errorCode',
  9303. label: translate('Code'),
  9304. getValue,
  9305. setValue,
  9306. debounce
  9307. });
  9308. }
  9309. function ErrorMessage(props) {
  9310. const {
  9311. element,
  9312. error,
  9313. idPrefix
  9314. } = props;
  9315. const commandStack = useService('commandStack');
  9316. const translate = useService('translate');
  9317. const debounce = useService('debounceInput');
  9318. const getValue = () => {
  9319. return error.get('errorMessage');
  9320. };
  9321. const setValue = value => {
  9322. return commandStack.execute('element.updateModdleProperties', {
  9323. element,
  9324. moddleElement: error,
  9325. properties: {
  9326. errorMessage: value
  9327. }
  9328. });
  9329. };
  9330. return propertiesPanel.TextFieldEntry({
  9331. element,
  9332. id: idPrefix + '-errorMessage',
  9333. label: translate('Message'),
  9334. getValue,
  9335. setValue,
  9336. debounce
  9337. });
  9338. }
  9339. function Expression$2(props) {
  9340. const {
  9341. element,
  9342. errorEventDefinition,
  9343. idPrefix
  9344. } = props;
  9345. const commandStack = useService('commandStack');
  9346. const translate = useService('translate');
  9347. const debounce = useService('debounceInput');
  9348. const setValue = value => {
  9349. commandStack.execute('element.updateModdleProperties', {
  9350. element,
  9351. moddleElement: errorEventDefinition,
  9352. properties: {
  9353. 'camunda:expression': value
  9354. }
  9355. });
  9356. };
  9357. const getValue = () => {
  9358. return errorEventDefinition.get('camunda:expression');
  9359. };
  9360. return propertiesPanel.TextFieldEntry({
  9361. element: errorEventDefinition,
  9362. id: idPrefix + '-expression',
  9363. label: translate('Throw expression'),
  9364. getValue,
  9365. setValue,
  9366. debounce
  9367. });
  9368. } // helpers //////////
  9369. function sortByName$1(elements) {
  9370. return minDash.sortBy(elements, e => (e.name || '').toLowerCase());
  9371. }
  9372. function ErrorsProps({
  9373. element,
  9374. injector
  9375. }) {
  9376. const businessObject = ModelUtil.getBusinessObject(element);
  9377. if (!ModelUtil.is(element, 'bpmn:ServiceTask') || getImplementationType(element) !== 'external') {
  9378. return null;
  9379. }
  9380. const errorEventDefinitions = getExtensionElementsList(businessObject, 'camunda:ErrorEventDefinition');
  9381. const bpmnFactory = injector.get('bpmnFactory'),
  9382. commandStack = injector.get('commandStack');
  9383. const items = errorEventDefinitions.map((errorEventDefinition, index) => {
  9384. const id = element.id + '-error-' + index;
  9385. return {
  9386. id,
  9387. label: getErrorLabel(errorEventDefinition),
  9388. entries: Error$1({
  9389. idPrefix: id,
  9390. element,
  9391. errorEventDefinition
  9392. }),
  9393. autoFocusEntry: id + '-errorRef',
  9394. remove: removeFactory$7({
  9395. commandStack,
  9396. element,
  9397. errorEventDefinition
  9398. })
  9399. };
  9400. });
  9401. return {
  9402. items,
  9403. add: addFactory$6({
  9404. bpmnFactory,
  9405. commandStack,
  9406. element
  9407. }),
  9408. shouldSort: false
  9409. };
  9410. }
  9411. function removeFactory$7({
  9412. commandStack,
  9413. element,
  9414. errorEventDefinition
  9415. }) {
  9416. return function (event) {
  9417. event.stopPropagation();
  9418. const businessObject = ModelUtil.getBusinessObject(element);
  9419. removeExtensionElements(element, businessObject, errorEventDefinition, commandStack);
  9420. };
  9421. }
  9422. function addFactory$6({
  9423. bpmnFactory,
  9424. commandStack,
  9425. element
  9426. }) {
  9427. return function (event) {
  9428. event.stopPropagation();
  9429. const businessObject = ModelUtil.getBusinessObject(element);
  9430. const error = createElement('camunda:ErrorEventDefinition', {}, undefined, bpmnFactory);
  9431. addExtensionElements(element, businessObject, error, bpmnFactory, commandStack);
  9432. };
  9433. } // helpers //////////
  9434. function getErrorLabel(errorEventDefinition) {
  9435. const error = errorEventDefinition.get('errorRef');
  9436. if (!error) {
  9437. return '<no reference>';
  9438. }
  9439. const errorCode = error.get('errorCode'),
  9440. name = error.get('name') || '<unnamed>';
  9441. if (errorCode) {
  9442. return `${name} (code = ${errorCode})`;
  9443. }
  9444. return name;
  9445. }
  9446. /**
  9447. * @typedef { import('@bpmn-io/properties-panel').EntryDefinition } Entry
  9448. */
  9449. /**
  9450. * @returns {Array<Entry>} entries
  9451. */
  9452. function EscalationProps(props) {
  9453. const {
  9454. element,
  9455. entries
  9456. } = props;
  9457. if (!(isEscalationSupported(element) && canHaveEscalationVariables(element))) {
  9458. return entries;
  9459. }
  9460. entries.push({
  9461. id: 'escalationCodeVariable',
  9462. component: EscalationCodeVariable,
  9463. isEdited: propertiesPanel.isTextFieldEntryEdited
  9464. });
  9465. return entries;
  9466. }
  9467. function EscalationCodeVariable(props) {
  9468. const {
  9469. element
  9470. } = props;
  9471. const commandStack = useService('commandStack');
  9472. const translate = useService('translate');
  9473. const debounce = useService('debounceInput');
  9474. const escalationEventDefinition = getEscalationEventDefinition(element);
  9475. const getValue = () => {
  9476. return escalationEventDefinition.get('camunda:escalationCodeVariable');
  9477. };
  9478. const setValue = value => {
  9479. return commandStack.execute('element.updateModdleProperties', {
  9480. element,
  9481. moddleElement: escalationEventDefinition,
  9482. properties: {
  9483. 'camunda:escalationCodeVariable': value
  9484. }
  9485. });
  9486. };
  9487. return propertiesPanel.TextFieldEntry({
  9488. element,
  9489. id: 'escalationCodeVariable',
  9490. label: translate('Code variable'),
  9491. description: translate('Define the name of the variable that will contain the escalation code.'),
  9492. getValue,
  9493. setValue,
  9494. debounce
  9495. });
  9496. } // helper ///////////////////////
  9497. function canHaveEscalationVariables(element) {
  9498. return ModelUtil.is(element, 'bpmn:StartEvent') || ModelUtil.is(element, 'bpmn:BoundaryEvent');
  9499. }
  9500. function ExtensionProperty(props) {
  9501. const {
  9502. idPrefix,
  9503. property
  9504. } = props;
  9505. const entries = [{
  9506. id: idPrefix + '-name',
  9507. component: NameProperty$1,
  9508. idPrefix,
  9509. property
  9510. }, {
  9511. id: idPrefix + '-value',
  9512. component: ValueProperty$1,
  9513. idPrefix,
  9514. property
  9515. }];
  9516. return entries;
  9517. }
  9518. function NameProperty$1(props) {
  9519. const {
  9520. idPrefix,
  9521. element,
  9522. property
  9523. } = props;
  9524. const commandStack = useService('commandStack');
  9525. const translate = useService('translate');
  9526. const debounce = useService('debounceInput');
  9527. const setValue = value => {
  9528. commandStack.execute('element.updateModdleProperties', {
  9529. element,
  9530. moddleElement: property,
  9531. properties: {
  9532. name: value
  9533. }
  9534. });
  9535. };
  9536. const getValue = () => {
  9537. return property.name;
  9538. };
  9539. return propertiesPanel.TextFieldEntry({
  9540. element: property,
  9541. id: idPrefix + '-name',
  9542. label: translate('Name'),
  9543. getValue,
  9544. setValue,
  9545. debounce
  9546. });
  9547. }
  9548. function ValueProperty$1(props) {
  9549. const {
  9550. idPrefix,
  9551. element,
  9552. property
  9553. } = props;
  9554. const commandStack = useService('commandStack');
  9555. const translate = useService('translate');
  9556. const debounce = useService('debounceInput');
  9557. const setValue = value => {
  9558. commandStack.execute('element.updateModdleProperties', {
  9559. element,
  9560. moddleElement: property,
  9561. properties: {
  9562. value
  9563. }
  9564. });
  9565. };
  9566. const getValue = () => {
  9567. return property.value;
  9568. };
  9569. return propertiesPanel.TextFieldEntry({
  9570. element: property,
  9571. id: idPrefix + '-value',
  9572. label: translate('Value'),
  9573. getValue,
  9574. setValue,
  9575. debounce
  9576. });
  9577. }
  9578. function ExtensionPropertiesProps({
  9579. element,
  9580. injector
  9581. }) {
  9582. let businessObject = getRelevantBusinessObject(element); // do not offer for empty pools
  9583. if (!businessObject) {
  9584. return;
  9585. }
  9586. const properties = getPropertiesList(businessObject) || [];
  9587. const bpmnFactory = injector.get('bpmnFactory'),
  9588. commandStack = injector.get('commandStack');
  9589. const items = properties.map((property, index) => {
  9590. const id = element.id + '-extensionProperty-' + index;
  9591. return {
  9592. id,
  9593. label: property.get('name') || '',
  9594. entries: ExtensionProperty({
  9595. idPrefix: id,
  9596. element,
  9597. property
  9598. }),
  9599. autoFocusEntry: id + '-name',
  9600. remove: removeFactory$6({
  9601. commandStack,
  9602. element,
  9603. property
  9604. })
  9605. };
  9606. });
  9607. return {
  9608. items,
  9609. add: addFactory$5({
  9610. bpmnFactory,
  9611. commandStack,
  9612. element
  9613. })
  9614. };
  9615. }
  9616. function removeFactory$6({
  9617. commandStack,
  9618. element,
  9619. property
  9620. }) {
  9621. return function (event) {
  9622. event.stopPropagation();
  9623. const commands = [];
  9624. const businessObject = getRelevantBusinessObject(element);
  9625. const properties = getProperties(businessObject);
  9626. if (!properties) {
  9627. return;
  9628. }
  9629. const values = minDash.without(properties.get('values'), property);
  9630. commands.push({
  9631. cmd: 'element.updateModdleProperties',
  9632. context: {
  9633. element,
  9634. moddleElement: properties,
  9635. properties: {
  9636. values
  9637. }
  9638. }
  9639. }); // remove camunda:Properties if there are no properties anymore
  9640. if (!values.length) {
  9641. const businessObject = ModelUtil.getBusinessObject(element),
  9642. extensionElements = businessObject.get('extensionElements');
  9643. commands.push({
  9644. cmd: 'element.updateModdleProperties',
  9645. context: {
  9646. element,
  9647. moddleElement: extensionElements,
  9648. properties: {
  9649. values: minDash.without(extensionElements.get('values'), properties)
  9650. }
  9651. }
  9652. });
  9653. }
  9654. commandStack.execute('properties-panel.multi-command-executor', commands);
  9655. };
  9656. }
  9657. function addFactory$5({
  9658. bpmnFactory,
  9659. commandStack,
  9660. element
  9661. }) {
  9662. return function (event) {
  9663. event.stopPropagation();
  9664. let commands = [];
  9665. const businessObject = getRelevantBusinessObject(element);
  9666. let extensionElements = businessObject.get('extensionElements'); // (1) ensure extension elements
  9667. if (!extensionElements) {
  9668. extensionElements = createElement('bpmn:ExtensionElements', {
  9669. values: []
  9670. }, businessObject, bpmnFactory);
  9671. commands.push({
  9672. cmd: 'element.updateModdleProperties',
  9673. context: {
  9674. element,
  9675. moddleElement: businessObject,
  9676. properties: {
  9677. extensionElements
  9678. }
  9679. }
  9680. });
  9681. } // (2) ensure camunda:Properties
  9682. let properties = getProperties(businessObject);
  9683. if (!properties) {
  9684. const parent = extensionElements;
  9685. properties = createElement('camunda:Properties', {
  9686. values: []
  9687. }, parent, bpmnFactory);
  9688. commands.push({
  9689. cmd: 'element.updateModdleProperties',
  9690. context: {
  9691. element,
  9692. moddleElement: extensionElements,
  9693. properties: {
  9694. values: [...extensionElements.get('values'), properties]
  9695. }
  9696. }
  9697. });
  9698. } // (3) create camunda:Property
  9699. const property = createElement('camunda:Property', {}, properties, bpmnFactory); // (4) add property to list
  9700. commands.push({
  9701. cmd: 'element.updateModdleProperties',
  9702. context: {
  9703. element,
  9704. moddleElement: properties,
  9705. properties: {
  9706. values: [...properties.get('values'), property]
  9707. }
  9708. }
  9709. }); // (5) commit all updates
  9710. commandStack.execute('properties-panel.multi-command-executor', commands);
  9711. };
  9712. } // helper //////////////////
  9713. function getRelevantBusinessObject(element) {
  9714. let businessObject = ModelUtil.getBusinessObject(element);
  9715. if (ModelUtil.is(element, 'bpmn:Participant')) {
  9716. return businessObject.get('processRef');
  9717. }
  9718. return businessObject;
  9719. }
  9720. function getProperties(businessObject) {
  9721. return getExtensionElementsList(businessObject, 'camunda:Properties')[0];
  9722. }
  9723. function getPropertiesList(businessObject) {
  9724. const properties = getProperties(businessObject);
  9725. return properties && properties.get('values');
  9726. }
  9727. function ExternalTaskPriorityProps(props) {
  9728. const {
  9729. element
  9730. } = props;
  9731. const businessObject = ModelUtil.getBusinessObject(element);
  9732. if (!ModelUtil.is(element, 'bpmn:Process') && !(ModelUtil.is(element, 'bpmn:Participant') && businessObject.get('processRef')) && !isExternalTaskLike(element)) {
  9733. return [];
  9734. }
  9735. return [{
  9736. id: 'externalTaskPriority',
  9737. component: ExternalTaskPriority,
  9738. isEdited: propertiesPanel.isTextFieldEntryEdited
  9739. }];
  9740. }
  9741. function ExternalTaskPriority(props) {
  9742. const {
  9743. element
  9744. } = props;
  9745. const commandStack = useService('commandStack'),
  9746. translate = useService('translate'),
  9747. debounce = useService('debounceInput');
  9748. let businessObject;
  9749. if (ModelUtil.is(element, 'bpmn:Participant')) {
  9750. businessObject = ModelUtil.getBusinessObject(element).get('processRef');
  9751. } else if (isExternalTaskLike(element)) {
  9752. businessObject = getServiceTaskLikeBusinessObject(element);
  9753. } else {
  9754. businessObject = ModelUtil.getBusinessObject(element);
  9755. }
  9756. const getValue = () => {
  9757. return businessObject.get('camunda:taskPriority');
  9758. };
  9759. const setValue = value => {
  9760. commandStack.execute('element.updateModdleProperties', {
  9761. element,
  9762. moddleElement: businessObject,
  9763. properties: {
  9764. 'camunda:taskPriority': value
  9765. }
  9766. });
  9767. };
  9768. return propertiesPanel.TextFieldEntry({
  9769. element,
  9770. id: 'externalTaskPriority',
  9771. label: translate('Priority'),
  9772. getValue,
  9773. setValue,
  9774. debounce
  9775. });
  9776. } // helper //////////////////
  9777. function isExternalTaskLike(element) {
  9778. const bo = getServiceTaskLikeBusinessObject(element),
  9779. type = bo && bo.get('camunda:type');
  9780. return ModelUtil.is(bo, 'camunda:ServiceTaskLike') && type && type === 'external';
  9781. }
  9782. const DEFAULT_PROPS$2 = {
  9783. 'stringValue': undefined,
  9784. 'string': undefined,
  9785. 'expression': undefined
  9786. };
  9787. function FieldInjection(props) {
  9788. const {
  9789. element,
  9790. idPrefix,
  9791. field
  9792. } = props;
  9793. const entries = [{
  9794. id: idPrefix + '-name',
  9795. component: NameProperty,
  9796. field,
  9797. idPrefix,
  9798. element
  9799. }, {
  9800. id: idPrefix + '-type',
  9801. component: TypeProperty,
  9802. field,
  9803. idPrefix,
  9804. element
  9805. }, {
  9806. id: idPrefix + '-value',
  9807. component: ValueProperty,
  9808. field,
  9809. idPrefix,
  9810. element
  9811. }];
  9812. return entries;
  9813. }
  9814. function NameProperty(props) {
  9815. const {
  9816. idPrefix,
  9817. element,
  9818. field
  9819. } = props;
  9820. const commandStack = useService('commandStack'),
  9821. translate = useService('translate'),
  9822. debounce = useService('debounceInput');
  9823. const setValue = value => {
  9824. commandStack.execute('element.updateModdleProperties', {
  9825. element,
  9826. moddleElement: field,
  9827. properties: {
  9828. name: value
  9829. }
  9830. });
  9831. };
  9832. const getValue = field => {
  9833. return field.name;
  9834. };
  9835. return propertiesPanel.TextFieldEntry({
  9836. element: field,
  9837. id: idPrefix + '-name',
  9838. label: translate('Name'),
  9839. getValue,
  9840. setValue,
  9841. debounce
  9842. });
  9843. }
  9844. function TypeProperty(props) {
  9845. const {
  9846. idPrefix,
  9847. element,
  9848. field
  9849. } = props;
  9850. const commandStack = useService('commandStack'),
  9851. translate = useService('translate');
  9852. const getValue = field => {
  9853. return determineType(field);
  9854. };
  9855. const setValue = value => {
  9856. const properties = Object.assign({}, DEFAULT_PROPS$2);
  9857. properties[value] = '';
  9858. commandStack.execute('element.updateModdleProperties', {
  9859. element,
  9860. moddleElement: field,
  9861. properties
  9862. });
  9863. };
  9864. const getOptions = element => {
  9865. const options = [{
  9866. value: 'string',
  9867. label: translate('String')
  9868. }, {
  9869. value: 'expression',
  9870. label: translate('Expression')
  9871. }];
  9872. return options;
  9873. };
  9874. return propertiesPanel.SelectEntry({
  9875. element: field,
  9876. id: idPrefix + '-type',
  9877. label: translate('Type'),
  9878. getValue,
  9879. setValue,
  9880. getOptions
  9881. });
  9882. }
  9883. function ValueProperty(props) {
  9884. const {
  9885. idPrefix,
  9886. element,
  9887. field
  9888. } = props;
  9889. const commandStack = useService('commandStack');
  9890. const translate = useService('translate');
  9891. const debounce = useService('debounceInput');
  9892. const setValue = value => {
  9893. // (1) determine which type we have set
  9894. const type = determineType(field); // (2) set property accordingly
  9895. const properties = Object.assign({}, DEFAULT_PROPS$2);
  9896. properties[type] = value || ''; // (3) execute the update command
  9897. commandStack.execute('element.updateModdleProperties', {
  9898. element,
  9899. moddleElement: field,
  9900. properties
  9901. });
  9902. };
  9903. const getValue = field => {
  9904. return field.string || field.stringValue || field.expression;
  9905. };
  9906. return propertiesPanel.TextFieldEntry({
  9907. element: field,
  9908. id: idPrefix + '-value',
  9909. label: translate('Value'),
  9910. getValue,
  9911. setValue,
  9912. debounce
  9913. });
  9914. } // helper ///////////////////
  9915. /**
  9916. * determineType - get the type of a fieldInjection based on the attributes
  9917. * set on it
  9918. *
  9919. * @param {ModdleElement} field
  9920. * @return {('string'|'expression')}
  9921. */
  9922. function determineType(field) {
  9923. // string is the default type
  9924. return 'string' in field && 'string' || 'expression' in field && 'expression' || 'stringValue' in field && 'string' || 'string';
  9925. }
  9926. function FieldInjectionProps({
  9927. element,
  9928. injector
  9929. }) {
  9930. const businessObject = getServiceTaskLikeBusinessObject(element);
  9931. if (!businessObject) {
  9932. return null;
  9933. }
  9934. const fieldInjections = getExtensionElementsList(businessObject, 'camunda:Field');
  9935. const bpmnFactory = injector.get('bpmnFactory'),
  9936. commandStack = injector.get('commandStack');
  9937. const items = fieldInjections.map((field, index) => {
  9938. const id = element.id + '-fieldInjection-' + index;
  9939. return {
  9940. id,
  9941. label: getFieldLabel(field),
  9942. entries: FieldInjection({
  9943. idPrefix: id,
  9944. element,
  9945. field
  9946. }),
  9947. autoFocusEntry: id + '-name',
  9948. remove: removeFactory$5({
  9949. commandStack,
  9950. element,
  9951. field
  9952. })
  9953. };
  9954. });
  9955. return {
  9956. items,
  9957. add: addFactory$4({
  9958. bpmnFactory,
  9959. commandStack,
  9960. element
  9961. })
  9962. };
  9963. }
  9964. function removeFactory$5({
  9965. commandStack,
  9966. element,
  9967. field
  9968. }) {
  9969. return function (event) {
  9970. event.stopPropagation();
  9971. const businessObject = getServiceTaskLikeBusinessObject(element);
  9972. removeExtensionElements(element, businessObject, field, commandStack);
  9973. };
  9974. }
  9975. function addFactory$4({
  9976. bpmnFactory,
  9977. commandStack,
  9978. element
  9979. }) {
  9980. return function (event) {
  9981. event.stopPropagation();
  9982. const businessObject = getServiceTaskLikeBusinessObject(element);
  9983. const fieldInjection = createElement('camunda:Field', {
  9984. name: undefined,
  9985. string: '',
  9986. // string is the default type
  9987. stringValue: undefined
  9988. }, null, bpmnFactory);
  9989. addExtensionElements(element, businessObject, fieldInjection, bpmnFactory, commandStack);
  9990. };
  9991. } // helper ///////////////
  9992. function getFieldLabel(field) {
  9993. return field.name || '<empty>';
  9994. }
  9995. function FormFieldConstraint(props) {
  9996. const {
  9997. constraint,
  9998. element,
  9999. idPrefix
  10000. } = props;
  10001. const entries = [{
  10002. id: idPrefix + '-name',
  10003. component: Name$1,
  10004. constraint,
  10005. idPrefix,
  10006. element
  10007. }, {
  10008. id: idPrefix + '-config',
  10009. component: Config,
  10010. constraint,
  10011. idPrefix,
  10012. element
  10013. }];
  10014. return entries;
  10015. }
  10016. function Name$1(props) {
  10017. const {
  10018. idPrefix,
  10019. element,
  10020. constraint
  10021. } = props;
  10022. const commandStack = useService('commandStack'),
  10023. translate = useService('translate'),
  10024. debounce = useService('debounceInput');
  10025. const setValue = value => {
  10026. commandStack.execute('element.updateModdleProperties', {
  10027. element,
  10028. moddleElement: constraint,
  10029. properties: {
  10030. name: value
  10031. }
  10032. });
  10033. };
  10034. const getValue = () => {
  10035. return constraint.name;
  10036. };
  10037. return propertiesPanel.TextFieldEntry({
  10038. element: constraint,
  10039. id: idPrefix + '-name',
  10040. label: translate('Name'),
  10041. getValue,
  10042. setValue,
  10043. debounce
  10044. });
  10045. }
  10046. function Config(props) {
  10047. const {
  10048. idPrefix,
  10049. element,
  10050. constraint
  10051. } = props;
  10052. const commandStack = useService('commandStack'),
  10053. translate = useService('translate'),
  10054. debounce = useService('debounceInput');
  10055. const setValue = value => {
  10056. commandStack.execute('element.updateModdleProperties', {
  10057. element,
  10058. moddleElement: constraint,
  10059. properties: {
  10060. config: value
  10061. }
  10062. });
  10063. };
  10064. const getValue = () => {
  10065. return constraint.config;
  10066. };
  10067. return propertiesPanel.TextFieldEntry({
  10068. element: constraint,
  10069. id: idPrefix + '-config',
  10070. label: translate('Config'),
  10071. getValue,
  10072. setValue,
  10073. debounce
  10074. });
  10075. }
  10076. function FormFieldProperty(props) {
  10077. const {
  10078. element,
  10079. idPrefix,
  10080. property
  10081. } = props;
  10082. const entries = [{
  10083. id: idPrefix + '-id',
  10084. component: Id$2,
  10085. idPrefix,
  10086. property,
  10087. element
  10088. }, {
  10089. id: idPrefix + '-value',
  10090. component: Value$1,
  10091. idPrefix,
  10092. property,
  10093. element
  10094. }];
  10095. return entries;
  10096. }
  10097. function Id$2(props) {
  10098. const {
  10099. idPrefix,
  10100. element,
  10101. property
  10102. } = props;
  10103. const commandStack = useService('commandStack'),
  10104. translate = useService('translate'),
  10105. debounce = useService('debounceInput');
  10106. const setValue = value => {
  10107. commandStack.execute('element.updateModdleProperties', {
  10108. element,
  10109. moddleElement: property,
  10110. properties: {
  10111. id: value
  10112. }
  10113. });
  10114. };
  10115. const getValue = () => {
  10116. return property.id;
  10117. };
  10118. return propertiesPanel.TextFieldEntry({
  10119. element: property,
  10120. id: idPrefix + '-id',
  10121. label: translate('ID'),
  10122. getValue,
  10123. setValue,
  10124. debounce
  10125. });
  10126. }
  10127. function Value$1(props) {
  10128. const {
  10129. idPrefix,
  10130. element,
  10131. property
  10132. } = props;
  10133. const commandStack = useService('commandStack'),
  10134. translate = useService('translate'),
  10135. debounce = useService('debounceInput');
  10136. const setValue = value => {
  10137. commandStack.execute('element.updateModdleProperties', {
  10138. element,
  10139. moddleElement: property,
  10140. properties: {
  10141. value
  10142. }
  10143. });
  10144. };
  10145. const getValue = () => {
  10146. return property.value;
  10147. };
  10148. return propertiesPanel.TextFieldEntry({
  10149. element: property,
  10150. id: idPrefix + '-value',
  10151. label: translate('Value'),
  10152. getValue,
  10153. setValue,
  10154. debounce
  10155. });
  10156. }
  10157. function FormFieldValue(props) {
  10158. const {
  10159. element,
  10160. idPrefix,
  10161. value
  10162. } = props;
  10163. const entries = [{
  10164. id: idPrefix + '-id',
  10165. component: Id$1,
  10166. idPrefix,
  10167. value,
  10168. element
  10169. }, {
  10170. id: idPrefix + '-name',
  10171. component: Name,
  10172. idPrefix,
  10173. value,
  10174. element
  10175. }];
  10176. return entries;
  10177. }
  10178. function Id$1(props) {
  10179. const {
  10180. idPrefix,
  10181. element,
  10182. value
  10183. } = props;
  10184. const commandStack = useService('commandStack'),
  10185. translate = useService('translate'),
  10186. debounce = useService('debounceInput');
  10187. const setValue = val => {
  10188. commandStack.execute('element.updateModdleProperties', {
  10189. element,
  10190. moddleElement: value,
  10191. properties: {
  10192. id: val
  10193. }
  10194. });
  10195. };
  10196. const getValue = () => {
  10197. return value.id;
  10198. };
  10199. return propertiesPanel.TextFieldEntry({
  10200. element: value,
  10201. id: idPrefix + '-id',
  10202. label: translate('ID'),
  10203. getValue,
  10204. setValue,
  10205. debounce
  10206. });
  10207. }
  10208. function Name(props) {
  10209. const {
  10210. idPrefix,
  10211. element,
  10212. value
  10213. } = props;
  10214. const commandStack = useService('commandStack'),
  10215. translate = useService('translate'),
  10216. debounce = useService('debounceInput');
  10217. const setValue = val => {
  10218. commandStack.execute('element.updateModdleProperties', {
  10219. element,
  10220. moddleElement: value,
  10221. properties: {
  10222. name: val
  10223. }
  10224. });
  10225. };
  10226. const getValue = () => {
  10227. return value.name;
  10228. };
  10229. return propertiesPanel.TextFieldEntry({
  10230. element: value,
  10231. id: idPrefix + '-name',
  10232. label: translate('Name'),
  10233. getValue,
  10234. setValue,
  10235. debounce
  10236. });
  10237. }
  10238. const CUSTOM_TYPE_VALUE = '',
  10239. DEFINED_TYPE_VALUES = ['boolean', 'date', 'enum', 'long', 'string', undefined];
  10240. function FormField(props) {
  10241. const {
  10242. idPrefix,
  10243. formField
  10244. } = props;
  10245. const entries = [{
  10246. id: idPrefix + '-formFieldID',
  10247. component: Id,
  10248. idPrefix,
  10249. formField
  10250. }, {
  10251. id: idPrefix + '-formFieldLabel',
  10252. component: Label,
  10253. idPrefix,
  10254. formField
  10255. }, {
  10256. id: idPrefix + '-formFieldType',
  10257. component: Type$1,
  10258. idPrefix,
  10259. formField
  10260. }];
  10261. if (!DEFINED_TYPE_VALUES.includes(formField.get('type'))) {
  10262. entries.push({
  10263. id: idPrefix + '-formFieldCustomType',
  10264. component: CustomType,
  10265. idPrefix,
  10266. formField
  10267. });
  10268. }
  10269. entries.push({
  10270. id: idPrefix + '-formFieldDefaultValue',
  10271. component: DefaultValue,
  10272. idPrefix,
  10273. formField
  10274. });
  10275. if (formField.get('type') === 'enum') {
  10276. entries.push({
  10277. id: idPrefix + '-formFieldValues',
  10278. component: ValueList,
  10279. formField,
  10280. idPrefix
  10281. });
  10282. }
  10283. entries.push({
  10284. id: idPrefix + '-formFieldConstraints',
  10285. component: ConstraintList,
  10286. formField,
  10287. idPrefix
  10288. }, {
  10289. id: idPrefix + '-formFieldProperties',
  10290. component: PropertiesList,
  10291. formField,
  10292. idPrefix
  10293. });
  10294. return entries;
  10295. }
  10296. function Id(props) {
  10297. const {
  10298. idPrefix,
  10299. element,
  10300. formField
  10301. } = props;
  10302. const commandStack = useService('commandStack');
  10303. const translate = useService('translate');
  10304. const debounce = useService('debounceInput');
  10305. const setValue = value => {
  10306. commandStack.execute('element.updateModdleProperties', {
  10307. element,
  10308. moddleElement: formField,
  10309. properties: {
  10310. id: value
  10311. }
  10312. });
  10313. };
  10314. const getValue = () => {
  10315. return formField.get('id');
  10316. };
  10317. return propertiesPanel.TextFieldEntry({
  10318. element: formField,
  10319. id: idPrefix + '-formFieldID',
  10320. label: translate('ID'),
  10321. description: translate('Refers to the process variable name'),
  10322. getValue,
  10323. setValue,
  10324. debounce
  10325. });
  10326. }
  10327. function Label(props) {
  10328. const {
  10329. idPrefix,
  10330. element,
  10331. formField
  10332. } = props;
  10333. const commandStack = useService('commandStack');
  10334. const translate = useService('translate');
  10335. const debounce = useService('debounceInput');
  10336. const setValue = value => {
  10337. commandStack.execute('element.updateModdleProperties', {
  10338. element,
  10339. moddleElement: formField,
  10340. properties: {
  10341. label: value
  10342. }
  10343. });
  10344. };
  10345. const getValue = () => {
  10346. return formField.get('label');
  10347. };
  10348. return propertiesPanel.TextFieldEntry({
  10349. element: formField,
  10350. id: idPrefix + '-formFieldLabel',
  10351. label: translate('Label'),
  10352. getValue,
  10353. setValue,
  10354. debounce
  10355. });
  10356. }
  10357. function Type$1(props) {
  10358. const {
  10359. idPrefix,
  10360. element,
  10361. formField
  10362. } = props;
  10363. const commandStack = useService('commandStack');
  10364. const translate = useService('translate');
  10365. const setValue = value => {
  10366. commandStack.execute('element.updateModdleProperties', {
  10367. element,
  10368. moddleElement: formField,
  10369. properties: {
  10370. type: value
  10371. }
  10372. });
  10373. };
  10374. const getValue = () => {
  10375. const type = formField.get('type');
  10376. return DEFINED_TYPE_VALUES.includes(type) ? type : CUSTOM_TYPE_VALUE;
  10377. };
  10378. const getOptions = () => {
  10379. const options = [{
  10380. label: translate('boolean'),
  10381. value: 'boolean'
  10382. }, {
  10383. label: translate('date'),
  10384. value: 'date'
  10385. }, {
  10386. label: translate('enum'),
  10387. value: 'enum'
  10388. }, {
  10389. label: translate('long'),
  10390. value: 'long'
  10391. }, {
  10392. label: translate('string'),
  10393. value: 'string'
  10394. }, {
  10395. label: translate('<custom type>'),
  10396. value: CUSTOM_TYPE_VALUE
  10397. }]; // for the initial state only, we want to show an empty state
  10398. if (formField.get('type') === undefined) {
  10399. options.unshift({
  10400. label: translate('<none>'),
  10401. value: ''
  10402. });
  10403. }
  10404. return options;
  10405. };
  10406. return propertiesPanel.SelectEntry({
  10407. element: formField,
  10408. id: idPrefix + '-formFieldType',
  10409. label: translate('Type'),
  10410. getValue,
  10411. setValue,
  10412. getOptions
  10413. });
  10414. }
  10415. function CustomType(props) {
  10416. const {
  10417. idPrefix,
  10418. element,
  10419. formField
  10420. } = props;
  10421. const commandStack = useService('commandStack');
  10422. const translate = useService('translate');
  10423. const debounce = useService('debounceInput');
  10424. const setValue = value => {
  10425. const type = value || '';
  10426. commandStack.execute('element.updateModdleProperties', {
  10427. element,
  10428. moddleElement: formField,
  10429. properties: {
  10430. type
  10431. }
  10432. });
  10433. };
  10434. const getValue = () => {
  10435. return formField.get('type');
  10436. };
  10437. return propertiesPanel.TextFieldEntry({
  10438. element: formField,
  10439. id: idPrefix + '-formFieldCustomType',
  10440. label: translate('Custom type'),
  10441. getValue,
  10442. setValue,
  10443. debounce
  10444. });
  10445. }
  10446. function DefaultValue(props) {
  10447. const {
  10448. idPrefix,
  10449. element,
  10450. formField
  10451. } = props;
  10452. const commandStack = useService('commandStack');
  10453. const translate = useService('translate');
  10454. const debounce = useService('debounceInput');
  10455. const setValue = value => {
  10456. commandStack.execute('element.updateModdleProperties', {
  10457. element,
  10458. moddleElement: formField,
  10459. properties: {
  10460. defaultValue: value
  10461. }
  10462. });
  10463. };
  10464. const getValue = () => {
  10465. return formField.get('defaultValue');
  10466. };
  10467. return propertiesPanel.TextFieldEntry({
  10468. element: formField,
  10469. id: idPrefix + '-formFieldDefaultValue',
  10470. label: translate('Default value'),
  10471. getValue,
  10472. setValue,
  10473. debounce
  10474. });
  10475. }
  10476. function Value(props) {
  10477. const {
  10478. element,
  10479. id: idPrefix,
  10480. index,
  10481. item: value,
  10482. open
  10483. } = props;
  10484. const translate = useService('translate');
  10485. const id = `${idPrefix}-value-${index}`;
  10486. return jsxRuntime.jsx(propertiesPanel.CollapsibleEntry, {
  10487. id: id,
  10488. element: element,
  10489. entries: FormFieldValue({
  10490. idPrefix: id,
  10491. element,
  10492. value
  10493. }),
  10494. label: value.get('id') || translate('<empty>'),
  10495. open: open
  10496. });
  10497. }
  10498. function ValueList(props) {
  10499. const {
  10500. element,
  10501. formField,
  10502. idPrefix
  10503. } = props;
  10504. const id = `${idPrefix}-formFieldValues`;
  10505. const bpmnFactory = useService('bpmnFactory');
  10506. const commandStack = useService('commandStack');
  10507. const translate = useService('translate');
  10508. const values = formField.get('values') || [];
  10509. function addValue() {
  10510. const value = createElement('camunda:Value', {
  10511. id: undefined,
  10512. name: undefined
  10513. }, formField, bpmnFactory);
  10514. commandStack.execute('element.updateModdleProperties', {
  10515. element: element,
  10516. moddleElement: formField,
  10517. properties: {
  10518. values: [...formField.get('values'), value]
  10519. }
  10520. });
  10521. }
  10522. function removeValue(value) {
  10523. commandStack.execute('element.updateModdleProperties', {
  10524. element: element,
  10525. moddleElement: formField,
  10526. properties: {
  10527. values: minDash.without(formField.get('values'), value)
  10528. }
  10529. });
  10530. }
  10531. return jsxRuntime.jsx(propertiesPanel.ListEntry, {
  10532. element: element,
  10533. autoFocusEntry: `[data-entry-id="${id}-value-${values.length - 1}"] input`,
  10534. id: id,
  10535. label: translate('Values'),
  10536. items: values,
  10537. component: Value,
  10538. onAdd: addValue,
  10539. onRemove: removeValue
  10540. });
  10541. }
  10542. function Constraint(props) {
  10543. const {
  10544. element,
  10545. id: idPrefix,
  10546. index,
  10547. item: constraint,
  10548. open
  10549. } = props;
  10550. const translate = useService('translate');
  10551. const id = `${idPrefix}-constraint-${index}`;
  10552. return jsxRuntime.jsx(propertiesPanel.CollapsibleEntry, {
  10553. id: id,
  10554. element: element,
  10555. entries: FormFieldConstraint({
  10556. constraint,
  10557. element,
  10558. idPrefix: id
  10559. }),
  10560. label: constraint.get('name') || translate('<empty>'),
  10561. open: open
  10562. });
  10563. }
  10564. function ConstraintList(props) {
  10565. const {
  10566. element,
  10567. formField,
  10568. idPrefix
  10569. } = props;
  10570. const id = `${idPrefix}-formFieldConstraints`;
  10571. const bpmnFactory = useService('bpmnFactory');
  10572. const commandStack = useService('commandStack');
  10573. const translate = useService('translate');
  10574. const businessObject = ModelUtil.getBusinessObject(element);
  10575. let validation = formField.get('validation');
  10576. const constraints = validation && validation.get('constraints') || [];
  10577. function addConstraint() {
  10578. const commands = []; // (1) ensure validation
  10579. if (!validation) {
  10580. validation = createElement('camunda:Validation', {}, businessObject, bpmnFactory);
  10581. commands.push({
  10582. cmd: 'element.updateModdleProperties',
  10583. context: {
  10584. element,
  10585. moddleElement: formField,
  10586. properties: {
  10587. validation
  10588. }
  10589. }
  10590. });
  10591. } // (2) add constraint
  10592. const constraint = createElement('camunda:Constraint', {
  10593. name: undefined,
  10594. config: undefined
  10595. }, validation, bpmnFactory);
  10596. commands.push({
  10597. cmd: 'element.updateModdleProperties',
  10598. context: {
  10599. element,
  10600. moddleElement: validation,
  10601. properties: {
  10602. constraints: [...validation.get('constraints'), constraint]
  10603. }
  10604. }
  10605. }); // (3) commit updates
  10606. commandStack.execute('properties-panel.multi-command-executor', commands);
  10607. }
  10608. function removeConstraint(constraint) {
  10609. commandStack.execute('element.updateModdleProperties', {
  10610. element,
  10611. moddleElement: validation,
  10612. properties: {
  10613. constraints: minDash.without(validation.get('constraints'), constraint)
  10614. }
  10615. });
  10616. }
  10617. return jsxRuntime.jsx(propertiesPanel.ListEntry, {
  10618. element: element,
  10619. autoFocusEntry: `[data-entry-id="${id}-constraint-${constraints.length - 1}"] input`,
  10620. id: id,
  10621. label: translate('Constraints'),
  10622. items: constraints,
  10623. component: Constraint,
  10624. onAdd: addConstraint,
  10625. onRemove: removeConstraint
  10626. });
  10627. }
  10628. function Property(props) {
  10629. const {
  10630. element,
  10631. id: idPrefix,
  10632. index,
  10633. item: property,
  10634. open
  10635. } = props;
  10636. const translate = useService('translate');
  10637. const id = `${idPrefix}-property-${index}`;
  10638. return jsxRuntime.jsx(propertiesPanel.CollapsibleEntry, {
  10639. id: id,
  10640. element: element,
  10641. entries: FormFieldProperty({
  10642. element,
  10643. idPrefix: id,
  10644. property
  10645. }),
  10646. label: property.get('id') || translate('<empty>'),
  10647. open: open
  10648. });
  10649. }
  10650. function PropertiesList(props) {
  10651. const {
  10652. element,
  10653. formField,
  10654. idPrefix
  10655. } = props;
  10656. const id = `${idPrefix}-formFieldProperties`;
  10657. const bpmnFactory = useService('bpmnFactory');
  10658. const commandStack = useService('commandStack');
  10659. const translate = useService('translate');
  10660. const businessObject = ModelUtil.getBusinessObject(element);
  10661. let properties = formField.get('properties');
  10662. const propertyEntries = properties && properties.get('values') || [];
  10663. function addProperty() {
  10664. const commands = []; // (1) ensure properties
  10665. if (!properties) {
  10666. properties = createElement('camunda:Properties', {}, businessObject, bpmnFactory);
  10667. commands.push({
  10668. cmd: 'element.updateModdleProperties',
  10669. context: {
  10670. element,
  10671. moddleElement: formField,
  10672. properties: {
  10673. properties
  10674. }
  10675. }
  10676. });
  10677. } // (2) add property
  10678. const property = createElement('camunda:Property', {
  10679. id: undefined,
  10680. value: undefined
  10681. }, properties, bpmnFactory);
  10682. commands.push({
  10683. cmd: 'element.updateModdleProperties',
  10684. context: {
  10685. element,
  10686. moddleElement: properties,
  10687. properties: {
  10688. values: [...properties.get('values'), property]
  10689. }
  10690. }
  10691. }); // (3) commit updates
  10692. commandStack.execute('properties-panel.multi-command-executor', commands);
  10693. }
  10694. function removeProperty(property) {
  10695. commandStack.execute('element.updateModdleProperties', {
  10696. element,
  10697. moddleElement: properties,
  10698. properties: {
  10699. values: minDash.without(properties.get('values'), property)
  10700. }
  10701. });
  10702. }
  10703. return jsxRuntime.jsx(propertiesPanel.ListEntry, {
  10704. element: element,
  10705. autoFocusEntry: true,
  10706. id: id,
  10707. compareFn: createAlphanumericCompare('id'),
  10708. label: translate('Properties'),
  10709. items: propertyEntries,
  10710. component: Property,
  10711. onAdd: addProperty,
  10712. onRemove: removeProperty
  10713. });
  10714. } // helper //////////////////
  10715. function createAlphanumericCompare(field) {
  10716. return function (entry, anotherEntry) {
  10717. const [key = '', anotherKey = ''] = [entry[field], anotherEntry[field]];
  10718. return key === anotherKey ? 0 : key > anotherKey ? 1 : -1;
  10719. };
  10720. }
  10721. function FormDataProps({
  10722. element,
  10723. injector
  10724. }) {
  10725. if (!isFormDataSupported(element)) {
  10726. return;
  10727. }
  10728. const formFields = getFormFieldsList(element) || [];
  10729. const bpmnFactory = injector.get('bpmnFactory'),
  10730. commandStack = injector.get('commandStack');
  10731. const items = formFields.map((formField, index) => {
  10732. const id = element.id + '-formField-' + index;
  10733. return {
  10734. id,
  10735. label: formField.get('id') || '',
  10736. entries: FormField({
  10737. idPrefix: id,
  10738. element,
  10739. formField
  10740. }),
  10741. autoFocusEntry: id + '-formFieldID',
  10742. remove: removeFactory$4({
  10743. commandStack,
  10744. element,
  10745. formField
  10746. })
  10747. };
  10748. });
  10749. return {
  10750. items,
  10751. add: addFactory$3({
  10752. bpmnFactory,
  10753. commandStack,
  10754. element
  10755. }),
  10756. shouldSort: false
  10757. };
  10758. }
  10759. function addFactory$3({
  10760. bpmnFactory,
  10761. commandStack,
  10762. element
  10763. }) {
  10764. return function (event) {
  10765. event.stopPropagation();
  10766. const commands = []; // (1) get camunda:FormData
  10767. const formData = getFormData$1(element); // (2) create camunda:FormField
  10768. const formField = createElement('camunda:FormField', {}, formData, bpmnFactory); // (3) add formField to list
  10769. commands.push({
  10770. cmd: 'element.updateModdleProperties',
  10771. context: {
  10772. element,
  10773. moddleElement: formData,
  10774. properties: {
  10775. fields: [...formData.get('fields'), formField]
  10776. }
  10777. }
  10778. }); // (4) commit all updates
  10779. commandStack.execute('properties-panel.multi-command-executor', commands);
  10780. };
  10781. }
  10782. function removeFactory$4({
  10783. commandStack,
  10784. element,
  10785. formField
  10786. }) {
  10787. return function (event) {
  10788. event.stopPropagation();
  10789. const formData = getFormData$1(element),
  10790. formFields = getFormFieldsList(element);
  10791. if (!formFields || !formFields.length) {
  10792. return;
  10793. }
  10794. const fields = minDash.without(formData.get('fields'), formField); // update formData
  10795. commandStack.execute('element.updateModdleProperties', {
  10796. element,
  10797. moddleElement: formData,
  10798. properties: {
  10799. fields
  10800. }
  10801. });
  10802. };
  10803. } // helper ///////////////////////////////
  10804. function isFormDataSupported(element) {
  10805. const formData = getFormData$1(element);
  10806. return (ModelUtil.is(element, 'bpmn:StartEvent') && !ModelUtil.is(element.parent, 'bpmn:SubProcess') || ModelUtil.is(element, 'bpmn:UserTask')) && formData;
  10807. }
  10808. function getFormData$1(element) {
  10809. const bo = ModelUtil.getBusinessObject(element);
  10810. return getExtensionElementsList(bo, 'camunda:FormData')[0];
  10811. }
  10812. function getFormFieldsList(element) {
  10813. const businessObject = ModelUtil.getBusinessObject(element);
  10814. const formData = getFormData$1(businessObject);
  10815. return formData && formData.fields;
  10816. }
  10817. const FORM_KEY_PROPS = {
  10818. 'camunda:formRef': undefined,
  10819. 'camunda:formRefBinding': undefined,
  10820. 'camunda:formRefVersion': undefined
  10821. };
  10822. const FORM_REF_PROPS = {
  10823. 'camunda:formKey': undefined
  10824. };
  10825. function FormTypeProps(props) {
  10826. return [{
  10827. id: 'formType',
  10828. component: FormType,
  10829. isEdited: propertiesPanel.isSelectEntryEdited
  10830. }];
  10831. }
  10832. function FormType(props) {
  10833. const {
  10834. element
  10835. } = props;
  10836. const translate = useService('translate');
  10837. const bpmnFactory = useService('bpmnFactory');
  10838. const businessObject = ModelUtil.getBusinessObject(element);
  10839. const commandStack = useService('commandStack');
  10840. let extensionElements = businessObject.get('extensionElements');
  10841. const getValue = () => {
  10842. if (minDash.isDefined(businessObject.get('camunda:formKey'))) {
  10843. return 'formKey';
  10844. } else if (minDash.isDefined(businessObject.get('camunda:formRef'))) {
  10845. return 'formRef';
  10846. } else if (getFormData(element)) {
  10847. return 'formData';
  10848. }
  10849. return '';
  10850. };
  10851. const setValue = value => {
  10852. const commands = removePropertiesCommands(element);
  10853. if (value === 'formData') {
  10854. // (1) ensure extension elements
  10855. if (!extensionElements) {
  10856. extensionElements = createElement('bpmn:ExtensionElements', {
  10857. values: []
  10858. }, businessObject, bpmnFactory);
  10859. commands.push({
  10860. cmd: 'element.updateModdleProperties',
  10861. context: {
  10862. element,
  10863. moddleElement: businessObject,
  10864. properties: {
  10865. extensionElements
  10866. }
  10867. }
  10868. });
  10869. } // (2) create camunda:FormData
  10870. const parent = extensionElements;
  10871. const formData = createElement('camunda:FormData', {
  10872. fields: []
  10873. }, parent, bpmnFactory);
  10874. commands.push({
  10875. cmd: 'element.updateModdleProperties',
  10876. context: {
  10877. element,
  10878. moddleElement: extensionElements,
  10879. properties: {
  10880. values: [...extensionElements.get('values'), formData]
  10881. }
  10882. }
  10883. });
  10884. } else if (value === 'formKey') {
  10885. commands.push({
  10886. cmd: 'element.updateModdleProperties',
  10887. context: {
  10888. element,
  10889. moddleElement: businessObject,
  10890. properties: {
  10891. 'camunda:formKey': ''
  10892. }
  10893. }
  10894. });
  10895. } else if (value === 'formRef') {
  10896. commands.push({
  10897. cmd: 'element.updateModdleProperties',
  10898. context: {
  10899. element,
  10900. moddleElement: businessObject,
  10901. properties: {
  10902. 'camunda:formRef': ''
  10903. }
  10904. }
  10905. });
  10906. }
  10907. commandStack.execute('properties-panel.multi-command-executor', commands);
  10908. };
  10909. const getOptions = () => {
  10910. return [{
  10911. value: '',
  10912. label: translate('<none>')
  10913. }, {
  10914. value: 'formRef',
  10915. label: translate('Camunda Forms')
  10916. }, {
  10917. value: 'formKey',
  10918. label: translate('Embedded or External Task Forms')
  10919. }, {
  10920. value: 'formData',
  10921. label: translate('Generated Task Forms')
  10922. }];
  10923. };
  10924. return propertiesPanel.SelectEntry({
  10925. element,
  10926. id: 'formType',
  10927. label: translate('Type'),
  10928. getValue,
  10929. setValue,
  10930. getOptions
  10931. });
  10932. }
  10933. function getFormData(element) {
  10934. const bo = ModelUtil.getBusinessObject(element);
  10935. return getExtensionElementsList(bo, 'camunda:FormData')[0];
  10936. }
  10937. function removePropertiesCommands(element, commandStack) {
  10938. const businessObject = ModelUtil.getBusinessObject(element);
  10939. const extensionElements = businessObject.get('extensionElements');
  10940. const commands = []; // (1) reset formKey and formRef
  10941. commands.push({
  10942. cmd: 'element.updateModdleProperties',
  10943. context: {
  10944. element,
  10945. moddleElement: businessObject,
  10946. properties: { ...FORM_KEY_PROPS,
  10947. ...FORM_REF_PROPS
  10948. }
  10949. }
  10950. }); // (2) remove formData if defined
  10951. if (extensionElements && getFormData(element)) {
  10952. commands.push({
  10953. cmd: 'element.updateModdleProperties',
  10954. context: {
  10955. element,
  10956. moddleElement: extensionElements,
  10957. properties: {
  10958. values: minDash.without(extensionElements.get('values'), getFormData(element))
  10959. }
  10960. }
  10961. });
  10962. }
  10963. return commands;
  10964. }
  10965. function getFormRefBinding(element) {
  10966. const businessObject = ModelUtil.getBusinessObject(element);
  10967. return businessObject.get('camunda:formRefBinding') || 'latest';
  10968. }
  10969. function getFormType(element) {
  10970. const businessObject = ModelUtil.getBusinessObject(element);
  10971. if (minDash.isDefined(businessObject.get('camunda:formKey'))) {
  10972. return 'formKey';
  10973. } else if (minDash.isDefined(businessObject.get('camunda:formRef'))) {
  10974. return 'formRef';
  10975. }
  10976. }
  10977. function isFormSupported(element) {
  10978. return ModelUtil.is(element, 'bpmn:StartEvent') && !ModelUtil.is(element.parent, 'bpmn:SubProcess') || ModelUtil.is(element, 'bpmn:UserTask');
  10979. }
  10980. function FormProps(props) {
  10981. const {
  10982. element
  10983. } = props;
  10984. if (!isFormSupported(element)) {
  10985. return [];
  10986. }
  10987. const formType = getFormType(element),
  10988. bindingType = getFormRefBinding(element); // (1) display form type select
  10989. const entries = [...FormTypeProps()]; // (2) display form properties based on type
  10990. if (formType === 'formKey') {
  10991. entries.push({
  10992. id: 'formKey',
  10993. component: FormKey,
  10994. isEdited: propertiesPanel.isTextFieldEntryEdited
  10995. });
  10996. } else if (formType === 'formRef') {
  10997. entries.push({
  10998. id: 'formRef',
  10999. component: FormRef,
  11000. isEdited: propertiesPanel.isTextFieldEntryEdited
  11001. }, {
  11002. id: 'formRefBinding',
  11003. component: Binding$1,
  11004. isEdited: propertiesPanel.isSelectEntryEdited
  11005. });
  11006. if (bindingType === 'version') {
  11007. entries.push({
  11008. id: 'formRefVersion',
  11009. component: Version$1,
  11010. isEdited: propertiesPanel.isTextFieldEntryEdited
  11011. });
  11012. }
  11013. }
  11014. return entries;
  11015. }
  11016. function FormKey(props) {
  11017. const {
  11018. element
  11019. } = props;
  11020. const debounce = useService('debounceInput');
  11021. const modeling = useService('modeling');
  11022. const translate = useService('translate');
  11023. const businessObject = ModelUtil.getBusinessObject(element);
  11024. const getValue = () => {
  11025. return businessObject.get('camunda:formKey');
  11026. };
  11027. const setValue = value => {
  11028. modeling.updateProperties(element, {
  11029. 'camunda:formKey': value
  11030. });
  11031. };
  11032. return propertiesPanel.TextFieldEntry({
  11033. element,
  11034. id: 'formKey',
  11035. label: translate('Form key'),
  11036. getValue,
  11037. setValue,
  11038. debounce
  11039. });
  11040. }
  11041. function FormRef(props) {
  11042. const {
  11043. element
  11044. } = props;
  11045. const debounce = useService('debounceInput');
  11046. const modeling = useService('modeling');
  11047. const translate = useService('translate');
  11048. const businessObject = ModelUtil.getBusinessObject(element);
  11049. const getValue = () => {
  11050. return businessObject.get('camunda:formRef');
  11051. };
  11052. const setValue = value => {
  11053. modeling.updateProperties(element, {
  11054. 'camunda:formRef': value
  11055. });
  11056. };
  11057. return propertiesPanel.TextFieldEntry({
  11058. element,
  11059. id: 'formRef',
  11060. label: translate('Form reference'),
  11061. getValue,
  11062. setValue,
  11063. debounce
  11064. });
  11065. }
  11066. function Binding$1(props) {
  11067. const {
  11068. element
  11069. } = props;
  11070. const modeling = useService('modeling');
  11071. const translate = useService('translate');
  11072. const getValue = () => {
  11073. return getFormRefBinding(element);
  11074. };
  11075. const setValue = value => {
  11076. modeling.updateProperties(element, {
  11077. 'camunda:formRefBinding': value
  11078. });
  11079. }; // Note: default is "latest",
  11080. // cf. https://docs.camunda.org/manual/develop/reference/bpmn20/custom-extensions/extension-attributes/#formrefbinding
  11081. const getOptions = () => {
  11082. const options = [{
  11083. value: 'deployment',
  11084. label: translate('deployment')
  11085. }, {
  11086. value: 'latest',
  11087. label: translate('latest')
  11088. }, {
  11089. value: 'version',
  11090. label: translate('version')
  11091. }];
  11092. return options;
  11093. };
  11094. return propertiesPanel.SelectEntry({
  11095. element,
  11096. id: 'formRefBinding',
  11097. label: translate('Binding'),
  11098. getValue,
  11099. setValue,
  11100. getOptions
  11101. });
  11102. }
  11103. function Version$1(props) {
  11104. const {
  11105. element
  11106. } = props;
  11107. const debounce = useService('debounceInput');
  11108. const modeling = useService('modeling');
  11109. const translate = useService('translate');
  11110. const businessObject = ModelUtil.getBusinessObject(element);
  11111. const getValue = () => {
  11112. return businessObject.get('camunda:formRefVersion');
  11113. };
  11114. const setValue = value => {
  11115. modeling.updateProperties(element, {
  11116. 'camunda:formRefVersion': value
  11117. });
  11118. };
  11119. return propertiesPanel.TextFieldEntry({
  11120. element,
  11121. id: 'formRefVersion',
  11122. label: translate('Version'),
  11123. getValue,
  11124. setValue,
  11125. debounce
  11126. });
  11127. }
  11128. function HistoryCleanupProps(props) {
  11129. const {
  11130. element
  11131. } = props;
  11132. const businessObject = ModelUtil.getBusinessObject(element);
  11133. if (!ModelUtil.is(element, 'bpmn:Process') && !(ModelUtil.is(element, 'bpmn:Participant') && businessObject.get('processRef'))) {
  11134. return [];
  11135. }
  11136. return [{
  11137. id: 'historyTimeToLive',
  11138. component: HistoryTimeToLive,
  11139. isEdited: propertiesPanel.isTextFieldEntryEdited
  11140. }];
  11141. }
  11142. function HistoryTimeToLive(props) {
  11143. const {
  11144. element
  11145. } = props;
  11146. const commandStack = useService('commandStack');
  11147. const translate = useService('translate');
  11148. const debounce = useService('debounceInput');
  11149. const process = getProcess$2(element);
  11150. const getValue = () => {
  11151. return process.get('camunda:historyTimeToLive') || '';
  11152. };
  11153. const setValue = value => {
  11154. commandStack.execute('element.updateModdleProperties', {
  11155. element,
  11156. moddleElement: process,
  11157. properties: {
  11158. 'camunda:historyTimeToLive': value
  11159. }
  11160. });
  11161. };
  11162. return propertiesPanel.TextFieldEntry({
  11163. element,
  11164. id: 'historyTimeToLive',
  11165. label: translate('Time to live'),
  11166. getValue,
  11167. setValue,
  11168. debounce
  11169. });
  11170. } // helper //////////////////
  11171. function getProcess$2(element) {
  11172. return ModelUtil.is(element, 'bpmn:Process') ? ModelUtil.getBusinessObject(element) : ModelUtil.getBusinessObject(element).get('processRef');
  11173. }
  11174. function DmnImplementationProps(props) {
  11175. const {
  11176. element
  11177. } = props;
  11178. const entries = [];
  11179. const implementationType = getImplementationType(element);
  11180. const bindingType = getDecisionRefBinding(element);
  11181. if (implementationType !== 'dmn') {
  11182. return entries;
  11183. } // (1) decisionRef
  11184. entries.push({
  11185. id: 'decisionRef',
  11186. component: DecisionRef,
  11187. isEdited: propertiesPanel.isTextFieldEntryEdited
  11188. }); // (2) binding
  11189. entries.push({
  11190. id: 'decisionRefBinding',
  11191. component: Binding,
  11192. isEdited: propertiesPanel.isSelectEntryEdited
  11193. }); // (3) version
  11194. if (bindingType === 'version') {
  11195. entries.push({
  11196. id: 'decisionRefVersion',
  11197. component: Version,
  11198. isEdited: propertiesPanel.isTextFieldEntryEdited
  11199. });
  11200. } // (4) versionTag
  11201. if (bindingType === 'versionTag') {
  11202. entries.push({
  11203. id: 'decisionRefVersionTag',
  11204. component: VersionTag$1,
  11205. isEdited: propertiesPanel.isTextFieldEntryEdited
  11206. });
  11207. } // (5) tenantId
  11208. entries.push({
  11209. id: 'decisionRefTenantId',
  11210. component: TenantId,
  11211. isEdited: propertiesPanel.isTextFieldEntryEdited
  11212. }); // (6) resultVariable
  11213. entries.push({
  11214. id: 'decisionRefResultVariable',
  11215. component: ResultVariable$2,
  11216. isEdited: propertiesPanel.isTextFieldEntryEdited
  11217. }); // (7) mapDecisionResult
  11218. if (getResultVariable(element)) {
  11219. entries.push({
  11220. id: 'mapDecisionResult',
  11221. component: MapDecisionResult,
  11222. isEdited: propertiesPanel.isSelectEntryEdited
  11223. });
  11224. }
  11225. return entries;
  11226. }
  11227. function DecisionRef(props) {
  11228. const {
  11229. element
  11230. } = props;
  11231. const commandStack = useService('commandStack');
  11232. const translate = useService('translate');
  11233. const debounce = useService('debounceInput');
  11234. const businessObject = ModelUtil.getBusinessObject(element);
  11235. const getValue = () => {
  11236. return businessObject.get('camunda:decisionRef');
  11237. };
  11238. const setValue = value => {
  11239. commandStack.execute('element.updateModdleProperties', {
  11240. element,
  11241. moddleElement: businessObject,
  11242. properties: {
  11243. 'camunda:decisionRef': value
  11244. }
  11245. });
  11246. };
  11247. return propertiesPanel.TextFieldEntry({
  11248. element,
  11249. id: 'decisionRef',
  11250. label: translate('Decision reference'),
  11251. getValue,
  11252. setValue,
  11253. debounce
  11254. });
  11255. }
  11256. function Binding(props) {
  11257. const {
  11258. element
  11259. } = props;
  11260. const commandStack = useService('commandStack');
  11261. const translate = useService('translate');
  11262. const getValue = () => {
  11263. return getDecisionRefBinding(element);
  11264. };
  11265. const setValue = value => {
  11266. const businessObject = ModelUtil.getBusinessObject(element); // reset version properties on binding type change
  11267. const updatedProperties = {
  11268. 'camunda:decisionRefVersion': undefined,
  11269. 'camunda:decisionRefVersionTag': undefined,
  11270. 'camunda:decisionRefBinding': value
  11271. };
  11272. commandStack.execute('element.updateModdleProperties', {
  11273. element,
  11274. moddleElement: businessObject,
  11275. properties: updatedProperties
  11276. });
  11277. }; // Note: default is "latest",
  11278. // cf. https://docs.camunda.org/manual/latest/reference/bpmn20/custom-extensions/extension-attributes/#decisionrefbinding
  11279. const getOptions = () => {
  11280. const options = [{
  11281. value: 'deployment',
  11282. label: translate('deployment')
  11283. }, {
  11284. value: 'latest',
  11285. label: translate('latest')
  11286. }, {
  11287. value: 'version',
  11288. label: translate('version')
  11289. }, {
  11290. value: 'versionTag',
  11291. label: translate('versionTag')
  11292. }];
  11293. return options;
  11294. };
  11295. return propertiesPanel.SelectEntry({
  11296. element,
  11297. id: 'decisionRefBinding',
  11298. label: translate('Binding'),
  11299. getValue,
  11300. setValue,
  11301. getOptions
  11302. });
  11303. }
  11304. function Version(props) {
  11305. const {
  11306. element
  11307. } = props;
  11308. const commandStack = useService('commandStack');
  11309. const translate = useService('translate');
  11310. const debounce = useService('debounceInput');
  11311. const businessObject = ModelUtil.getBusinessObject(element);
  11312. const getValue = () => {
  11313. return businessObject.get('camunda:decisionRefVersion');
  11314. };
  11315. const setValue = value => {
  11316. commandStack.execute('element.updateModdleProperties', {
  11317. element,
  11318. moddleElement: businessObject,
  11319. properties: {
  11320. 'camunda:decisionRefVersion': value
  11321. }
  11322. });
  11323. };
  11324. return propertiesPanel.TextFieldEntry({
  11325. element,
  11326. id: 'decisionRefVersion',
  11327. label: translate('Version'),
  11328. getValue,
  11329. setValue,
  11330. debounce
  11331. });
  11332. }
  11333. function VersionTag$1(props) {
  11334. const {
  11335. element
  11336. } = props;
  11337. const commandStack = useService('commandStack');
  11338. const translate = useService('translate');
  11339. const debounce = useService('debounceInput');
  11340. const businessObject = ModelUtil.getBusinessObject(element);
  11341. const getValue = () => {
  11342. return businessObject.get('camunda:decisionRefVersionTag');
  11343. };
  11344. const setValue = value => {
  11345. commandStack.execute('element.updateModdleProperties', {
  11346. element,
  11347. moddleElement: businessObject,
  11348. properties: {
  11349. 'camunda:decisionRefVersionTag': value
  11350. }
  11351. });
  11352. };
  11353. return propertiesPanel.TextFieldEntry({
  11354. element,
  11355. id: 'decisionRefVersionTag',
  11356. label: translate('Version tag'),
  11357. getValue,
  11358. setValue,
  11359. debounce
  11360. });
  11361. }
  11362. function TenantId(props) {
  11363. const {
  11364. element
  11365. } = props;
  11366. const commandStack = useService('commandStack');
  11367. const translate = useService('translate');
  11368. const debounce = useService('debounceInput');
  11369. const businessObject = ModelUtil.getBusinessObject(element);
  11370. const getValue = () => {
  11371. return businessObject.get('camunda:decisionRefTenantId');
  11372. };
  11373. const setValue = value => {
  11374. commandStack.execute('element.updateModdleProperties', {
  11375. element,
  11376. moddleElement: businessObject,
  11377. properties: {
  11378. 'camunda:decisionRefTenantId': value
  11379. }
  11380. });
  11381. };
  11382. return propertiesPanel.TextFieldEntry({
  11383. element,
  11384. id: 'decisionRefTenantId',
  11385. label: translate('Tenant ID'),
  11386. getValue,
  11387. setValue,
  11388. debounce
  11389. });
  11390. }
  11391. function ResultVariable$2(props) {
  11392. const {
  11393. element
  11394. } = props;
  11395. const commandStack = useService('commandStack');
  11396. const translate = useService('translate');
  11397. const debounce = useService('debounceInput');
  11398. const businessObject = ModelUtil.getBusinessObject(element);
  11399. const getValue = () => {
  11400. return getResultVariable(businessObject);
  11401. }; // Note: camunda:mapDecisionResult got cleaned up in modeling behavior
  11402. // cf. https://github.com/camunda/camunda-bpmn-js/blob/main/lib/camunda-platform/features/modeling/behavior/UpdateResultVariableBehavior.js
  11403. const setValue = value => {
  11404. commandStack.execute('element.updateModdleProperties', {
  11405. element,
  11406. moddleElement: businessObject,
  11407. properties: {
  11408. 'camunda:resultVariable': value
  11409. }
  11410. });
  11411. };
  11412. return propertiesPanel.TextFieldEntry({
  11413. element,
  11414. id: 'decisionRefResultVariable',
  11415. label: translate('Result variable'),
  11416. getValue,
  11417. setValue,
  11418. debounce
  11419. });
  11420. }
  11421. function MapDecisionResult(props) {
  11422. const {
  11423. element
  11424. } = props;
  11425. const commandStack = useService('commandStack');
  11426. const translate = useService('translate');
  11427. const businessObject = ModelUtil.getBusinessObject(element);
  11428. const getValue = () => {
  11429. return businessObject.get('camunda:mapDecisionResult') || 'resultList';
  11430. };
  11431. const setValue = value => {
  11432. commandStack.execute('element.updateModdleProperties', {
  11433. element,
  11434. moddleElement: businessObject,
  11435. properties: {
  11436. 'camunda:mapDecisionResult': value
  11437. }
  11438. });
  11439. }; // Note: default is "resultList",
  11440. // cf. https://docs.camunda.org/manual/latest/reference/bpmn20/custom-extensions/extension-attributes/#mapdecisionresult
  11441. const getOptions = () => {
  11442. const options = [{
  11443. value: 'collectEntries',
  11444. label: translate('collectEntries (List<Object>)')
  11445. }, {
  11446. value: 'resultList',
  11447. label: translate('resultList (List<Map<String, Object>>)')
  11448. }, {
  11449. value: 'singleEntry',
  11450. label: translate('singleEntry (TypedValue)')
  11451. }, {
  11452. value: 'singleResult',
  11453. label: translate('singleResult (Map<String, Object>)')
  11454. }];
  11455. return options;
  11456. };
  11457. return propertiesPanel.SelectEntry({
  11458. element,
  11459. id: 'mapDecisionResult',
  11460. label: translate('Map decision result'),
  11461. getValue,
  11462. setValue,
  11463. getOptions
  11464. });
  11465. } // helper ////////////////////
  11466. function getDecisionRefBinding(element) {
  11467. const businessObject = ModelUtil.getBusinessObject(element);
  11468. return businessObject.get('camunda:decisionRefBinding') || 'latest';
  11469. }
  11470. function getResultVariable(element) {
  11471. const businessObject = ModelUtil.getBusinessObject(element);
  11472. return businessObject.get('camunda:resultVariable');
  11473. }
  11474. const DELEGATE_PROPS = {
  11475. 'camunda:class': undefined,
  11476. 'camunda:expression': undefined,
  11477. 'camunda:delegateExpression': undefined,
  11478. 'camunda:resultVariable': undefined
  11479. };
  11480. const DMN_CAPABLE_PROPS = {
  11481. 'camunda:decisionRef': undefined,
  11482. 'camunda:decisionRefBinding': 'latest',
  11483. 'camunda:decisionRefVersion': undefined,
  11484. 'camunda:mapDecisionResult': 'resultList',
  11485. 'camunda:decisionRefTenantId': undefined
  11486. };
  11487. const EXTERNAL_CAPABLE_PROPS = {
  11488. 'camunda:type': undefined,
  11489. 'camunda:topic': undefined
  11490. };
  11491. const IMPLEMENTATION_TYPE_NONE_LABEL = '<none>',
  11492. IMPLEMENTATION_TYPE_JAVA_LABEL = 'Java class',
  11493. IMPLEMENTATION_TYPE_EXPRESSION_LABEL = 'Expression',
  11494. IMPLEMENTATION_TYPE_DELEGATE_LABEL = 'Delegate expression',
  11495. IMPLEMENTATION_TYPE_DMN_LABEL = 'DMN',
  11496. IMPLEMENTATION_TYPE_EXTERNAL_LABEL = 'External',
  11497. IMPLEMENTATION_TYPE_CONNECTOR_LABEL = 'Connector';
  11498. function ImplementationTypeProps(props) {
  11499. return [{
  11500. id: 'implementationType',
  11501. component: ImplementationType,
  11502. isEdited: propertiesPanel.isSelectEntryEdited
  11503. }];
  11504. }
  11505. function ImplementationType(props) {
  11506. const {
  11507. element
  11508. } = props;
  11509. const bpmnFactory = useService('bpmnFactory');
  11510. const commandStack = useService('commandStack');
  11511. const translate = useService('translate');
  11512. const getValue = () => {
  11513. return getImplementationType(element) || '';
  11514. };
  11515. const setValue = value => {
  11516. const oldType = getImplementationType(element);
  11517. const businessObject = getServiceTaskLikeBusinessObject(element);
  11518. const commands = [];
  11519. let updatedProperties = DELEGATE_PROPS;
  11520. let extensionElements = businessObject.get('extensionElements'); // (1) class, expression, delegateExpression
  11521. if (isDelegateType(value)) {
  11522. updatedProperties = { ...updatedProperties,
  11523. [value]: isDelegateType(oldType) ? businessObject.get(`camunda:${oldType}`) : ''
  11524. };
  11525. } // (2) dmn
  11526. if (isDmnCapable(businessObject)) {
  11527. updatedProperties = { ...updatedProperties,
  11528. ...DMN_CAPABLE_PROPS
  11529. };
  11530. if (value === 'dmn') {
  11531. updatedProperties = { ...updatedProperties,
  11532. 'camunda:decisionRef': ''
  11533. };
  11534. }
  11535. } // (3) external
  11536. // Note: error event definition elements got cleaned up in modeling behavior
  11537. // cf. https://github.com/camunda/camunda-bpmn-js/blob/main/lib/camunda-platform/features/modeling/behavior/DeleteErrorEventDefinitionBehavior.js
  11538. if (isExternalCapable(businessObject)) {
  11539. updatedProperties = { ...updatedProperties,
  11540. ...EXTERNAL_CAPABLE_PROPS
  11541. };
  11542. if (value === 'external') {
  11543. updatedProperties = { ...updatedProperties,
  11544. 'camunda:type': 'external',
  11545. 'camunda:topic': ''
  11546. };
  11547. }
  11548. } // (4) connector
  11549. if (isServiceTaskLike(businessObject)) {
  11550. // (4.1) remove all connectors on type change
  11551. const connectors = getConnectors$1(businessObject);
  11552. if (connectors.length) {
  11553. commands.push({
  11554. cmd: 'element.updateModdleProperties',
  11555. context: {
  11556. element,
  11557. moddleElement: extensionElements,
  11558. properties: {
  11559. values: minDash.without(extensionElements.get('values'), value => connectors.includes(value))
  11560. }
  11561. }
  11562. });
  11563. } // (4.2) create connector
  11564. if (value === 'connector') {
  11565. // ensure extension elements
  11566. if (!extensionElements) {
  11567. extensionElements = createElement('bpmn:ExtensionElements', {
  11568. values: []
  11569. }, businessObject, bpmnFactory);
  11570. commands.push(UpdateModdlePropertiesCommand(element, businessObject, {
  11571. extensionElements
  11572. }));
  11573. }
  11574. const connector = createElement('camunda:Connector', {}, extensionElements, bpmnFactory);
  11575. commands.push({
  11576. cmd: 'element.updateModdleProperties',
  11577. context: {
  11578. element,
  11579. moddleElement: extensionElements,
  11580. properties: {
  11581. values: [...extensionElements.get('values'), connector]
  11582. }
  11583. }
  11584. });
  11585. }
  11586. } // (5) collect all property updates
  11587. commands.push(UpdateModdlePropertiesCommand(element, businessObject, updatedProperties)); // (6) commit all updates
  11588. commandStack.execute('properties-panel.multi-command-executor', commands);
  11589. };
  11590. const getOptions = () => {
  11591. const businessObject = getServiceTaskLikeBusinessObject(element);
  11592. const options = [{
  11593. value: '',
  11594. label: translate(IMPLEMENTATION_TYPE_NONE_LABEL)
  11595. }, {
  11596. value: 'class',
  11597. label: translate(IMPLEMENTATION_TYPE_JAVA_LABEL)
  11598. }, {
  11599. value: 'expression',
  11600. label: translate(IMPLEMENTATION_TYPE_EXPRESSION_LABEL)
  11601. }, {
  11602. value: 'delegateExpression',
  11603. label: translate(IMPLEMENTATION_TYPE_DELEGATE_LABEL)
  11604. }];
  11605. if (isDmnCapable(businessObject)) {
  11606. options.push({
  11607. value: 'dmn',
  11608. label: translate(IMPLEMENTATION_TYPE_DMN_LABEL)
  11609. });
  11610. }
  11611. if (isExternalCapable(businessObject)) {
  11612. options.push({
  11613. value: 'external',
  11614. label: translate(IMPLEMENTATION_TYPE_EXTERNAL_LABEL)
  11615. });
  11616. }
  11617. if (isServiceTaskLike(businessObject)) {
  11618. options.push({
  11619. value: 'connector',
  11620. label: translate(IMPLEMENTATION_TYPE_CONNECTOR_LABEL)
  11621. });
  11622. }
  11623. return sortByPriority(options);
  11624. };
  11625. return propertiesPanel.SelectEntry({
  11626. element,
  11627. id: 'implementationType',
  11628. label: translate('Type'),
  11629. getValue,
  11630. setValue,
  11631. getOptions
  11632. });
  11633. } // helper ///////////////////////
  11634. function isDelegateType(type) {
  11635. return ['class', 'expression', 'delegateExpression'].includes(type);
  11636. }
  11637. function getConnectors$1(businessObject) {
  11638. return getExtensionElementsList(businessObject, 'camunda:Connector');
  11639. }
  11640. function UpdateModdlePropertiesCommand(element, businessObject, newProperties) {
  11641. return {
  11642. cmd: 'element.updateModdleProperties',
  11643. context: {
  11644. element,
  11645. moddleElement: businessObject,
  11646. properties: newProperties
  11647. }
  11648. };
  11649. }
  11650. function sortByPriority(options) {
  11651. const priorities = {
  11652. [IMPLEMENTATION_TYPE_NONE_LABEL]: 0,
  11653. [IMPLEMENTATION_TYPE_JAVA_LABEL]: 3,
  11654. [IMPLEMENTATION_TYPE_EXPRESSION_LABEL]: 4,
  11655. [IMPLEMENTATION_TYPE_DELEGATE_LABEL]: 5,
  11656. [IMPLEMENTATION_TYPE_DMN_LABEL]: 1,
  11657. [IMPLEMENTATION_TYPE_EXTERNAL_LABEL]: 2,
  11658. [IMPLEMENTATION_TYPE_CONNECTOR_LABEL]: 6
  11659. };
  11660. return minDash.sortBy(options, o => priorities[o.label]);
  11661. }
  11662. function ImplementationProps(props) {
  11663. const {
  11664. element
  11665. } = props;
  11666. if (!getServiceTaskLikeBusinessObject(element)) {
  11667. return [];
  11668. }
  11669. const implementationType = getImplementationType(element); // (1) display implementation type select
  11670. const entries = [...ImplementationTypeProps()]; // (2) display implementation properties based on type
  11671. if (implementationType === 'class') {
  11672. entries.push({
  11673. id: 'javaClass',
  11674. component: JavaClass,
  11675. isEdited: propertiesPanel.isTextFieldEntryEdited
  11676. });
  11677. } else if (implementationType === 'expression') {
  11678. entries.push({
  11679. id: 'expression',
  11680. component: Expression$1,
  11681. isEdited: propertiesPanel.isTextFieldEntryEdited
  11682. }, {
  11683. id: 'expressionResultVariable',
  11684. component: ResultVariable$1,
  11685. isEdited: propertiesPanel.isTextFieldEntryEdited
  11686. });
  11687. } else if (implementationType === 'delegateExpression') {
  11688. entries.push({
  11689. id: 'delegateExpression',
  11690. component: DelegateExpression,
  11691. isEdited: propertiesPanel.isTextFieldEntryEdited
  11692. });
  11693. } else if (implementationType === 'dmn') {
  11694. entries.push(...DmnImplementationProps({
  11695. element
  11696. }));
  11697. } else if (implementationType === 'external') {
  11698. entries.push({
  11699. id: 'externalTopic',
  11700. component: Topic,
  11701. isEdited: propertiesPanel.isTextFieldEntryEdited
  11702. });
  11703. } else if (implementationType === 'connector') {
  11704. entries.push({
  11705. id: 'connectorId',
  11706. component: ConnectorId,
  11707. isEdited: propertiesPanel.isTextFieldEntryEdited
  11708. });
  11709. }
  11710. return entries;
  11711. }
  11712. function JavaClass(props) {
  11713. const {
  11714. element,
  11715. businessObject = getServiceTaskLikeBusinessObject(element),
  11716. id = 'javaClass'
  11717. } = props;
  11718. const commandStack = useService('commandStack');
  11719. const translate = useService('translate');
  11720. const debounce = useService('debounceInput');
  11721. const getValue = () => {
  11722. return businessObject.get('camunda:class');
  11723. };
  11724. const setValue = value => {
  11725. commandStack.execute('element.updateModdleProperties', {
  11726. element,
  11727. moddleElement: businessObject,
  11728. properties: {
  11729. 'camunda:class': value
  11730. }
  11731. });
  11732. };
  11733. return propertiesPanel.TextFieldEntry({
  11734. element,
  11735. id,
  11736. label: translate('Java class'),
  11737. getValue,
  11738. setValue,
  11739. debounce
  11740. });
  11741. }
  11742. function Expression$1(props) {
  11743. const {
  11744. element,
  11745. businessObject = getServiceTaskLikeBusinessObject(element),
  11746. id = 'expression'
  11747. } = props;
  11748. const commandStack = useService('commandStack');
  11749. const translate = useService('translate');
  11750. const debounce = useService('debounceInput');
  11751. const getValue = () => {
  11752. return businessObject.get('camunda:expression');
  11753. };
  11754. const setValue = value => {
  11755. commandStack.execute('element.updateModdleProperties', {
  11756. element,
  11757. moddleElement: businessObject,
  11758. properties: {
  11759. 'camunda:expression': value
  11760. }
  11761. });
  11762. };
  11763. return propertiesPanel.TextFieldEntry({
  11764. element,
  11765. id,
  11766. label: translate('Expression'),
  11767. getValue,
  11768. setValue,
  11769. debounce
  11770. });
  11771. }
  11772. function ResultVariable$1(props) {
  11773. const {
  11774. element
  11775. } = props;
  11776. const commandStack = useService('commandStack');
  11777. const translate = useService('translate');
  11778. const debounce = useService('debounceInput');
  11779. const businessObject = getServiceTaskLikeBusinessObject(element);
  11780. const getValue = () => {
  11781. return businessObject.get('camunda:resultVariable');
  11782. };
  11783. const setValue = value => {
  11784. commandStack.execute('element.updateModdleProperties', {
  11785. element,
  11786. moddleElement: businessObject,
  11787. properties: {
  11788. 'camunda:resultVariable': value
  11789. }
  11790. });
  11791. };
  11792. return propertiesPanel.TextFieldEntry({
  11793. element,
  11794. id: 'expressionResultVariable',
  11795. label: translate('Result variable'),
  11796. getValue,
  11797. setValue,
  11798. debounce
  11799. });
  11800. }
  11801. function DelegateExpression(props) {
  11802. const {
  11803. element,
  11804. businessObject = getServiceTaskLikeBusinessObject(element),
  11805. id = 'delegateExpression'
  11806. } = props;
  11807. const commandStack = useService('commandStack');
  11808. const translate = useService('translate');
  11809. const debounce = useService('debounceInput');
  11810. const getValue = () => {
  11811. return businessObject.get('camunda:delegateExpression');
  11812. };
  11813. const setValue = value => {
  11814. commandStack.execute('element.updateModdleProperties', {
  11815. element,
  11816. moddleElement: businessObject,
  11817. properties: {
  11818. 'camunda:delegateExpression': value
  11819. }
  11820. });
  11821. };
  11822. return propertiesPanel.TextFieldEntry({
  11823. element,
  11824. id,
  11825. label: translate('Delegate expression'),
  11826. getValue,
  11827. setValue,
  11828. debounce
  11829. });
  11830. }
  11831. function Topic(props) {
  11832. const {
  11833. element
  11834. } = props;
  11835. const commandStack = useService('commandStack');
  11836. const translate = useService('translate');
  11837. const debounce = useService('debounceInput');
  11838. const businessObject = getServiceTaskLikeBusinessObject(element);
  11839. const getValue = () => {
  11840. return businessObject.get('camunda:topic');
  11841. };
  11842. const setValue = value => {
  11843. commandStack.execute('element.updateModdleProperties', {
  11844. element,
  11845. moddleElement: businessObject,
  11846. properties: {
  11847. 'camunda:topic': value
  11848. }
  11849. });
  11850. };
  11851. return propertiesPanel.TextFieldEntry({
  11852. element,
  11853. id: 'externalTopic',
  11854. label: translate('Topic'),
  11855. getValue,
  11856. setValue,
  11857. debounce
  11858. });
  11859. }
  11860. function ConnectorId(props) {
  11861. const {
  11862. element
  11863. } = props;
  11864. const commandStack = useService('commandStack');
  11865. const translate = useService('translate');
  11866. const debounce = useService('debounceInput');
  11867. const connector = getConnector(element);
  11868. const getValue = () => {
  11869. return connector.get('camunda:connectorId');
  11870. };
  11871. const setValue = value => {
  11872. commandStack.execute('element.updateModdleProperties', {
  11873. element,
  11874. moddleElement: connector,
  11875. properties: {
  11876. 'camunda:connectorId': value
  11877. }
  11878. });
  11879. };
  11880. return propertiesPanel.TextFieldEntry({
  11881. element,
  11882. id: 'connectorId',
  11883. label: translate('Connector ID'),
  11884. getValue,
  11885. setValue,
  11886. debounce
  11887. });
  11888. } // helper //////////////////
  11889. function getConnectors(businessObject) {
  11890. return getExtensionElementsList(businessObject, 'camunda:Connector');
  11891. }
  11892. function getConnector(element) {
  11893. const businessObject = getServiceTaskLikeBusinessObject(element);
  11894. const connectors = getConnectors(businessObject);
  11895. return connectors[0];
  11896. }
  11897. function InitiatorProps(props) {
  11898. const {
  11899. element
  11900. } = props;
  11901. if (!isInitiator(element)) {
  11902. return [];
  11903. }
  11904. return [{
  11905. id: 'initiator',
  11906. component: Initiator,
  11907. isEdited: propertiesPanel.isTextFieldEntryEdited
  11908. }];
  11909. }
  11910. function Initiator(props) {
  11911. const {
  11912. element
  11913. } = props;
  11914. const commandStack = useService('commandStack');
  11915. const translate = useService('translate');
  11916. const debounce = useService('debounceInput');
  11917. const businessObject = ModelUtil.getBusinessObject(element);
  11918. const getValue = () => {
  11919. return businessObject.get('camunda:initiator');
  11920. };
  11921. const setValue = value => {
  11922. commandStack.execute('element.updateModdleProperties', {
  11923. element,
  11924. moddleElement: businessObject,
  11925. properties: {
  11926. 'camunda:initiator': value
  11927. }
  11928. });
  11929. };
  11930. return propertiesPanel.TextFieldEntry({
  11931. element,
  11932. id: 'initiator',
  11933. label: translate('Initiator'),
  11934. getValue,
  11935. setValue,
  11936. debounce
  11937. });
  11938. } // helper ///////////////////
  11939. function isInitiator(element) {
  11940. return ModelUtil.is(element, 'camunda:Initiator') && !ModelUtil.is(element.parent, 'bpmn:SubProcess');
  11941. }
  11942. /**
  11943. * Cf. https://docs.camunda.org/manual/7.15/reference/bpmn20/subprocesses/call-activity/#passing-variables
  11944. */
  11945. function InMappingPropagationProps(props) {
  11946. const {
  11947. element
  11948. } = props;
  11949. if (!areInMappingsSupported$1(element)) {
  11950. return [];
  11951. }
  11952. const entries = [{
  11953. id: 'inMapping-propagation',
  11954. component: PropagateAll$1,
  11955. isEdited: propertiesPanel.isCheckboxEntryEdited
  11956. }];
  11957. if (isPropagateAll$1(element)) {
  11958. entries.push({
  11959. id: 'inMapping-propagation-local',
  11960. component: Local$2,
  11961. isEdited: propertiesPanel.isCheckboxEntryEdited
  11962. });
  11963. }
  11964. return entries;
  11965. }
  11966. function PropagateAll$1(props) {
  11967. const {
  11968. element
  11969. } = props;
  11970. const commandStack = useService('commandStack');
  11971. const bpmnFactory = useService('bpmnFactory');
  11972. const translate = useService('translate');
  11973. const getValue = () => {
  11974. return isPropagateAll$1(element);
  11975. };
  11976. const setValue = value => {
  11977. if (value) {
  11978. addInMapping();
  11979. } else {
  11980. removeInMapping();
  11981. }
  11982. };
  11983. function addInMapping() {
  11984. const businessObject = getSignalEventDefinition(element) || ModelUtil.getBusinessObject(element);
  11985. const mapping = createElement('camunda:In', {
  11986. variables: 'all'
  11987. }, null, bpmnFactory);
  11988. addExtensionElements(element, businessObject, mapping, bpmnFactory, commandStack);
  11989. }
  11990. function removeInMapping() {
  11991. const businessObject = getSignalEventDefinition(element) || ModelUtil.getBusinessObject(element);
  11992. const mappings = findRelevantInMappings(element);
  11993. removeExtensionElements(element, businessObject, mappings, commandStack);
  11994. }
  11995. return propertiesPanel.CheckboxEntry({
  11996. id: 'inMapping-propagation',
  11997. label: translate('Propagate all variables'),
  11998. getValue,
  11999. setValue
  12000. });
  12001. }
  12002. function Local$2(props) {
  12003. const {
  12004. element
  12005. } = props;
  12006. const commandStack = useService('commandStack');
  12007. const translate = useService('translate');
  12008. const mapping = findRelevantInMappings(element)[0];
  12009. const getValue = () => {
  12010. return mapping.get('camunda:local');
  12011. };
  12012. const setValue = value => {
  12013. commandStack.execute('element.updateModdleProperties', {
  12014. element,
  12015. moddleElement: mapping,
  12016. properties: {
  12017. local: value
  12018. }
  12019. });
  12020. };
  12021. return propertiesPanel.CheckboxEntry({
  12022. element,
  12023. id: 'inMapping-propagation-local',
  12024. label: translate('Local'),
  12025. getValue,
  12026. setValue
  12027. });
  12028. } // helper //////////////////////////
  12029. function areInMappingsSupported$1(element) {
  12030. const signalEventDefinition = getSignalEventDefinition(element);
  12031. if (signalEventDefinition) {
  12032. return ModelingUtil.isAny(element, ['bpmn:IntermediateThrowEvent', 'bpmn:EndEvent']);
  12033. }
  12034. return ModelUtil.is(element, 'bpmn:CallActivity');
  12035. }
  12036. function getInMappings$1(element) {
  12037. const businessObject = ModelUtil.getBusinessObject(element);
  12038. const signalEventDefinition = getSignalEventDefinition(businessObject);
  12039. return getExtensionElementsList(signalEventDefinition || businessObject, 'camunda:In');
  12040. }
  12041. function findRelevantInMappings(element) {
  12042. const inMappings = getInMappings$1(element);
  12043. return minDash.filter(inMappings, function (mapping) {
  12044. const variables = mapping.get('variables');
  12045. return variables && variables === 'all';
  12046. });
  12047. }
  12048. function isPropagateAll$1(element) {
  12049. const mappings = findRelevantInMappings(element);
  12050. return !!mappings.length;
  12051. }
  12052. const DEFAULT_PROPS$1 = {
  12053. 'source': undefined,
  12054. 'sourceExpression': undefined
  12055. };
  12056. function InOutMapping(props) {
  12057. const {
  12058. idPrefix,
  12059. mapping
  12060. } = props;
  12061. const type = getInOutType(mapping);
  12062. const entries = []; // (1) Type
  12063. entries.push({
  12064. id: idPrefix + '-type',
  12065. component: Type,
  12066. idPrefix,
  12067. mapping
  12068. }); // (2) Source
  12069. if (type === 'source') {
  12070. entries.push({
  12071. id: idPrefix + '-source',
  12072. component: Source,
  12073. idPrefix,
  12074. mapping
  12075. });
  12076. } // (3) Source expression
  12077. if (type === 'sourceExpression') {
  12078. entries.push({
  12079. id: idPrefix + '-sourceExpression',
  12080. component: SourceExpression,
  12081. idPrefix,
  12082. mapping
  12083. });
  12084. } // (4) Target
  12085. entries.push({
  12086. id: idPrefix + '-target',
  12087. component: Target,
  12088. idPrefix,
  12089. mapping
  12090. }); // (5) Local
  12091. entries.push({
  12092. id: idPrefix + '-local',
  12093. component: Local$1,
  12094. idPrefix,
  12095. mapping
  12096. });
  12097. return entries;
  12098. }
  12099. function Type(props) {
  12100. const {
  12101. idPrefix,
  12102. element,
  12103. mapping
  12104. } = props;
  12105. const commandStack = useService('commandStack');
  12106. const translate = useService('translate');
  12107. const getValue = mapping => {
  12108. return getInOutType(mapping);
  12109. };
  12110. const setValue = value => {
  12111. const properties = { ...DEFAULT_PROPS$1,
  12112. [value]: ''
  12113. };
  12114. commandStack.execute('element.updateModdleProperties', {
  12115. element,
  12116. moddleElement: mapping,
  12117. properties
  12118. });
  12119. };
  12120. const getOptions = () => {
  12121. const options = [{
  12122. label: translate('Source'),
  12123. value: 'source'
  12124. }, {
  12125. label: translate('Source expression'),
  12126. value: 'sourceExpression'
  12127. }];
  12128. return options;
  12129. };
  12130. return propertiesPanel.SelectEntry({
  12131. element: mapping,
  12132. id: idPrefix + '-type',
  12133. label: translate('Type'),
  12134. getValue,
  12135. setValue,
  12136. getOptions
  12137. });
  12138. }
  12139. function Source(props) {
  12140. const {
  12141. idPrefix,
  12142. element,
  12143. mapping
  12144. } = props;
  12145. const commandStack = useService('commandStack');
  12146. const translate = useService('translate');
  12147. const debounce = useService('debounceInput');
  12148. const setValue = value => {
  12149. commandStack.execute('element.updateModdleProperties', {
  12150. element,
  12151. moddleElement: mapping,
  12152. properties: {
  12153. source: value
  12154. }
  12155. });
  12156. };
  12157. const getValue = mapping => {
  12158. return mapping.get('camunda:source');
  12159. };
  12160. return propertiesPanel.TextFieldEntry({
  12161. element: mapping,
  12162. id: idPrefix + '-source',
  12163. label: translate('Source'),
  12164. getValue,
  12165. setValue,
  12166. debounce
  12167. });
  12168. }
  12169. function SourceExpression(props) {
  12170. const {
  12171. idPrefix,
  12172. element,
  12173. mapping
  12174. } = props;
  12175. const commandStack = useService('commandStack');
  12176. const translate = useService('translate');
  12177. const debounce = useService('debounceInput');
  12178. const setValue = value => {
  12179. commandStack.execute('element.updateModdleProperties', {
  12180. element,
  12181. moddleElement: mapping,
  12182. properties: {
  12183. sourceExpression: value
  12184. }
  12185. });
  12186. };
  12187. const getValue = mapping => {
  12188. return mapping.get('camunda:sourceExpression');
  12189. };
  12190. return propertiesPanel.TextFieldEntry({
  12191. element: mapping,
  12192. id: idPrefix + '-sourceExpression',
  12193. label: translate('Source expression'),
  12194. getValue,
  12195. setValue,
  12196. debounce
  12197. });
  12198. }
  12199. function Target(props) {
  12200. const {
  12201. idPrefix,
  12202. element,
  12203. mapping
  12204. } = props;
  12205. const commandStack = useService('commandStack');
  12206. const translate = useService('translate');
  12207. const debounce = useService('debounceInput');
  12208. const setValue = value => {
  12209. commandStack.execute('element.updateModdleProperties', {
  12210. element,
  12211. moddleElement: mapping,
  12212. properties: {
  12213. target: value
  12214. }
  12215. });
  12216. };
  12217. const getValue = mapping => {
  12218. return mapping.get('camunda:target');
  12219. };
  12220. return propertiesPanel.TextFieldEntry({
  12221. element: mapping,
  12222. id: idPrefix + '-target',
  12223. label: translate('Target'),
  12224. getValue,
  12225. setValue,
  12226. debounce
  12227. });
  12228. }
  12229. function Local$1(props) {
  12230. const {
  12231. idPrefix,
  12232. element,
  12233. mapping
  12234. } = props;
  12235. const commandStack = useService('commandStack');
  12236. const translate = useService('translate');
  12237. const getValue = () => {
  12238. return mapping.get('camunda:local');
  12239. };
  12240. const setValue = value => {
  12241. commandStack.execute('element.updateModdleProperties', {
  12242. element,
  12243. moddleElement: mapping,
  12244. properties: {
  12245. local: value
  12246. }
  12247. });
  12248. };
  12249. return propertiesPanel.CheckboxEntry({
  12250. element,
  12251. id: idPrefix + '-local',
  12252. label: translate('Local'),
  12253. getValue,
  12254. setValue
  12255. });
  12256. } // helper ///////////////////
  12257. function getInOutType(mapping) {
  12258. let inOutType = '';
  12259. if (typeof mapping.source !== 'undefined') {
  12260. inOutType = 'source';
  12261. } else if (typeof mapping.sourceExpression !== 'undefined') {
  12262. inOutType = 'sourceExpression';
  12263. }
  12264. return inOutType;
  12265. }
  12266. /**
  12267. * Cf. https://docs.camunda.org/manual/latest/reference/bpmn20/custom-extensions/extension-elements/#in
  12268. */
  12269. function InMappingProps({
  12270. element,
  12271. injector
  12272. }) {
  12273. if (!areInMappingsSupported(element)) {
  12274. return null;
  12275. }
  12276. const variableMappings = getInMappings(element) || [];
  12277. const bpmnFactory = injector.get('bpmnFactory'),
  12278. commandStack = injector.get('commandStack');
  12279. const items = variableMappings.map((mapping, index) => {
  12280. const id = element.id + '-inMapping-' + index;
  12281. return {
  12282. id,
  12283. label: mapping.get('target') || '',
  12284. entries: InOutMapping({
  12285. idPrefix: id,
  12286. element,
  12287. mapping
  12288. }),
  12289. autoFocusEntry: id + '-target',
  12290. remove: removeFactory$3({
  12291. commandStack,
  12292. element,
  12293. mapping
  12294. })
  12295. };
  12296. });
  12297. return {
  12298. items,
  12299. add: addFactory$2({
  12300. bpmnFactory,
  12301. commandStack,
  12302. element
  12303. })
  12304. };
  12305. }
  12306. function removeFactory$3({
  12307. commandStack,
  12308. element,
  12309. mapping
  12310. }) {
  12311. return function (event) {
  12312. event.stopPropagation();
  12313. const businessObject = getSignalEventDefinition(element) || ModelUtil.getBusinessObject(element);
  12314. removeExtensionElements(element, businessObject, mapping, commandStack);
  12315. };
  12316. }
  12317. function addFactory$2({
  12318. bpmnFactory,
  12319. commandStack,
  12320. element
  12321. }) {
  12322. return function (event) {
  12323. event.stopPropagation();
  12324. const businessObject = getSignalEventDefinition(element) || ModelUtil.getBusinessObject(element);
  12325. const newMapping = createElement('camunda:In', {
  12326. source: '' // source is the default type
  12327. }, null, bpmnFactory);
  12328. addExtensionElements(element, businessObject, newMapping, bpmnFactory, commandStack);
  12329. };
  12330. } // helper ///////////////
  12331. function getInMappings(element) {
  12332. const businessObject = ModelUtil.getBusinessObject(element);
  12333. const signalEventDefinition = getSignalEventDefinition(businessObject);
  12334. const mappings = getExtensionElementsList(signalEventDefinition || businessObject, 'camunda:In'); // only retrieve relevant mappings here, others are handled in other groups
  12335. // mapping.businessKey => camunda-platform/CallAvtivityProps
  12336. // mapping.variables => camunda-platform/InMappingPropagationProps
  12337. return minDash.filter(mappings, function (mapping) {
  12338. return !mapping.businessKey && !(mapping.variables && mapping.variables === 'all');
  12339. });
  12340. }
  12341. function areInMappingsSupported(element) {
  12342. const signalEventDefinition = getSignalEventDefinition(element);
  12343. if (signalEventDefinition) {
  12344. return ModelingUtil.isAny(element, ['bpmn:IntermediateThrowEvent', 'bpmn:EndEvent']);
  12345. }
  12346. return ModelUtil.is(element, 'bpmn:CallActivity');
  12347. }
  12348. function InputProps(props) {
  12349. const {
  12350. element,
  12351. injector
  12352. } = props;
  12353. if (!areInputParametersSupported(element)) {
  12354. return null;
  12355. }
  12356. const inputParameters = getInputParameters(element) || [];
  12357. const bpmnFactory = injector.get('bpmnFactory'),
  12358. commandStack = injector.get('commandStack');
  12359. const items = inputParameters.map((parameter, index) => {
  12360. const id = element.id + '-inputParameter-' + index;
  12361. return {
  12362. id,
  12363. label: parameter.get('name') || '',
  12364. entries: InputOutputParameter({
  12365. idPrefix: id,
  12366. element,
  12367. parameter
  12368. }),
  12369. autoFocusEntry: id + '-name',
  12370. remove: removeFactory$2({
  12371. element,
  12372. commandStack,
  12373. parameter
  12374. })
  12375. };
  12376. });
  12377. function add(event) {
  12378. event.stopPropagation();
  12379. commandStack.execute('properties-panel.multi-command-executor', AddParameterCmd(element, 'camunda:InputParameter', bpmnFactory));
  12380. }
  12381. return {
  12382. items,
  12383. add
  12384. };
  12385. }
  12386. function removeFactory$2(props) {
  12387. const {
  12388. commandStack,
  12389. element,
  12390. parameter
  12391. } = props;
  12392. return function (event) {
  12393. event.stopPropagation();
  12394. const inputOutput = getInputOutput(element);
  12395. if (!inputOutput) {
  12396. return;
  12397. }
  12398. commandStack.execute('element.updateModdleProperties', {
  12399. element,
  12400. moddleElement: inputOutput,
  12401. properties: {
  12402. inputParameters: minDash.without(inputOutput.get('inputParameters'), parameter)
  12403. }
  12404. });
  12405. };
  12406. }
  12407. function JobExecutionProps(props) {
  12408. const {
  12409. element
  12410. } = props;
  12411. const businessObject = ModelUtil.getBusinessObject(element);
  12412. const entries = []; // (1) add retryTimeCycle field for camunda:asyncCapable enabled Elements
  12413. // or TimerEvents
  12414. if (ModelUtil.is(element, 'camunda:AsyncCapable') && isAsync$1(businessObject) || isTimerEvent(element)) {
  12415. entries.push({
  12416. id: 'retryTimeCycle',
  12417. component: RetryTimeCycle,
  12418. isEdited: propertiesPanel.isTextFieldEntryEdited
  12419. });
  12420. } // (2) add jobPriority field for camunda:jobPriorized with async enabled
  12421. // or Processes
  12422. // or Processes referred to by participants
  12423. // or TimerEvents
  12424. if (ModelUtil.is(element, 'camunda:JobPriorized') && isAsync$1(businessObject) || ModelUtil.is(element, 'bpmn:Process') || ModelUtil.is(element, 'bpmn:Participant') && businessObject.get('processRef') || isTimerEvent(element)) {
  12425. entries.push({
  12426. id: 'jobPriority',
  12427. component: JobPriority,
  12428. isEdited: propertiesPanel.isTextFieldEntryEdited
  12429. });
  12430. }
  12431. return entries;
  12432. }
  12433. function JobPriority(props) {
  12434. const {
  12435. element
  12436. } = props;
  12437. const commandStack = useService('commandStack'),
  12438. translate = useService('translate'),
  12439. debounce = useService('debounceInput');
  12440. const businessObject = ModelUtil.is(element, 'bpmn:Participant') ? ModelUtil.getBusinessObject(element).get('processRef') : ModelUtil.getBusinessObject(element);
  12441. const getValue = () => {
  12442. return businessObject.get('camunda:jobPriority');
  12443. };
  12444. const setValue = value => {
  12445. commandStack.execute('element.updateModdleProperties', {
  12446. element,
  12447. moddleElement: businessObject,
  12448. properties: {
  12449. 'camunda:jobPriority': value
  12450. }
  12451. });
  12452. };
  12453. return propertiesPanel.TextFieldEntry({
  12454. element,
  12455. id: 'jobPriority',
  12456. label: translate('Priority'),
  12457. getValue,
  12458. setValue,
  12459. debounce
  12460. });
  12461. }
  12462. function RetryTimeCycle(props) {
  12463. const {
  12464. element
  12465. } = props;
  12466. const bpmnFactory = useService('bpmnFactory'),
  12467. commandStack = useService('commandStack'),
  12468. translate = useService('translate'),
  12469. debounce = useService('debounceInput');
  12470. const businessObject = ModelUtil.getBusinessObject(element);
  12471. const getValue = () => {
  12472. const failedJobRetryTimeCycle = getExtensionElementsList(businessObject, 'camunda:FailedJobRetryTimeCycle')[0];
  12473. return failedJobRetryTimeCycle && failedJobRetryTimeCycle.body;
  12474. };
  12475. const setValue = value => {
  12476. const commands = [];
  12477. let extensionElements = businessObject.get('extensionElements'); // (1) ensure extension elements
  12478. if (!extensionElements) {
  12479. extensionElements = createElement('bpmn:ExtensionElements', {
  12480. values: []
  12481. }, businessObject, bpmnFactory);
  12482. commands.push({
  12483. cmd: 'element.updateModdleProperties',
  12484. context: {
  12485. element,
  12486. moddleElement: businessObject,
  12487. properties: {
  12488. extensionElements
  12489. }
  12490. }
  12491. });
  12492. } // (2) ensure failedJobRetryTimeCycle
  12493. let failedJobRetryTimeCycle = getExtensionElementsList(businessObject, 'camunda:FailedJobRetryTimeCycle')[0];
  12494. if (!failedJobRetryTimeCycle) {
  12495. failedJobRetryTimeCycle = createElement('camunda:FailedJobRetryTimeCycle', {}, extensionElements, bpmnFactory);
  12496. commands.push({
  12497. cmd: 'element.updateModdleProperties',
  12498. context: {
  12499. element,
  12500. moddleElement: extensionElements,
  12501. properties: {
  12502. values: [...extensionElements.get('values'), failedJobRetryTimeCycle]
  12503. }
  12504. }
  12505. });
  12506. } // (3) update failedJobRetryTimeCycle value
  12507. commands.push({
  12508. cmd: 'element.updateModdleProperties',
  12509. context: {
  12510. element,
  12511. moddleElement: failedJobRetryTimeCycle,
  12512. properties: {
  12513. body: value
  12514. }
  12515. }
  12516. }); // (4) commit all updates
  12517. commandStack.execute('properties-panel.multi-command-executor', commands);
  12518. };
  12519. return propertiesPanel.TextFieldEntry({
  12520. element,
  12521. id: 'retryTimeCycle',
  12522. label: translate('Retry time cycle'),
  12523. getValue,
  12524. setValue,
  12525. debounce
  12526. });
  12527. } // helper //////////////////
  12528. /**
  12529. * @param {ModdleElement} bo
  12530. * @return {boolean} a boolean value
  12531. */
  12532. function isAsyncBefore$1(bo) {
  12533. return !!(bo.get('camunda:asyncBefore') || bo.get('camunda:async'));
  12534. }
  12535. /**
  12536. * @param {ModdleElement} bo
  12537. * @return {boolean}
  12538. */
  12539. function isAsyncAfter$1(bo) {
  12540. return !!bo.get('camunda:asyncAfter');
  12541. }
  12542. /**
  12543. * isAsync - returns true if the attribute 'camunda:asyncAfter' or 'camunda:asyncBefore'
  12544. * is set to true.
  12545. *
  12546. * @param {ModdleElement} bo
  12547. * @return {boolean}
  12548. */
  12549. function isAsync$1(bo) {
  12550. return isAsyncAfter$1(bo) || isAsyncBefore$1(bo);
  12551. }
  12552. /**
  12553. * isTimerEvent - returns true if the element is a bpmn:Event with a timerEventDefinition
  12554. *
  12555. * @param {ModdleElement} element
  12556. * @return {boolean}
  12557. */
  12558. function isTimerEvent(element) {
  12559. return ModelUtil.is(element, 'bpmn:Event') && getTimerEventDefinition(element);
  12560. }
  12561. /**
  12562. * @typedef { import('@bpmn-io/properties-panel').EntryDefinition } Entry
  12563. */
  12564. /**
  12565. * @returns {Array<Entry>} entries
  12566. */
  12567. function MultiInstanceProps(props) {
  12568. const {
  12569. element
  12570. } = props;
  12571. const loopCharacteristics = getLoopCharacteristics(element);
  12572. let entries = props.entries || [];
  12573. if (!isMultiInstanceSupported(element)) {
  12574. return entries;
  12575. }
  12576. entries.push({
  12577. id: 'collection',
  12578. component: Collection,
  12579. isEdited: propertiesPanel.isTextFieldEntryEdited
  12580. }, {
  12581. id: 'elementVariable',
  12582. component: ElementVariable,
  12583. isEdited: propertiesPanel.isTextFieldEntryEdited
  12584. }, {
  12585. id: 'multiInstanceAsynchronousBefore',
  12586. component: MultiInstanceAsynchronousBefore,
  12587. isEdited: propertiesPanel.isCheckboxEntryEdited
  12588. }, {
  12589. id: 'multiInstanceAsynchronousAfter',
  12590. component: MultiInstanceAsynchronousAfter,
  12591. isEdited: propertiesPanel.isCheckboxEntryEdited
  12592. });
  12593. if (isAsync(loopCharacteristics)) {
  12594. entries.push({
  12595. id: 'multiInstanceExclusive',
  12596. component: MultiInstanceExclusive,
  12597. isEdited: checkboxIsEditedInverted
  12598. }, {
  12599. id: 'multiInstanceRetryTimeCycle',
  12600. component: MultiInstanceRetryTimeCycle,
  12601. isEdited: propertiesPanel.isTextFieldEntryEdited
  12602. });
  12603. }
  12604. return entries;
  12605. }
  12606. function Collection(props) {
  12607. const {
  12608. element
  12609. } = props;
  12610. const debounce = useService('debounceInput');
  12611. const commandStack = useService('commandStack');
  12612. const translate = useService('translate');
  12613. const loopCharacteristics = getLoopCharacteristics(element);
  12614. const getValue = () => {
  12615. return getCollection(element);
  12616. };
  12617. const setValue = value => {
  12618. return commandStack.execute('element.updateModdleProperties', {
  12619. element,
  12620. moddleElement: loopCharacteristics,
  12621. properties: {
  12622. 'camunda:collection': value
  12623. }
  12624. });
  12625. };
  12626. return propertiesPanel.TextFieldEntry({
  12627. element,
  12628. id: 'collection',
  12629. label: translate('Collection'),
  12630. getValue,
  12631. setValue,
  12632. debounce
  12633. });
  12634. }
  12635. function ElementVariable(props) {
  12636. const {
  12637. element
  12638. } = props;
  12639. const debounce = useService('debounceInput');
  12640. const commandStack = useService('commandStack');
  12641. const translate = useService('translate');
  12642. const loopCharacteristics = getLoopCharacteristics(element);
  12643. const getValue = () => {
  12644. return getElementVariable(element);
  12645. };
  12646. const setValue = value => {
  12647. return commandStack.execute('element.updateModdleProperties', {
  12648. element,
  12649. moddleElement: loopCharacteristics,
  12650. properties: {
  12651. 'camunda:elementVariable': value
  12652. }
  12653. });
  12654. };
  12655. return propertiesPanel.TextFieldEntry({
  12656. element,
  12657. id: 'elementVariable',
  12658. label: translate('Element variable'),
  12659. getValue,
  12660. setValue,
  12661. debounce
  12662. });
  12663. }
  12664. function MultiInstanceAsynchronousBefore(props) {
  12665. const {
  12666. element
  12667. } = props;
  12668. const commandStack = useService('commandStack');
  12669. const translate = useService('translate');
  12670. const loopCharacteristics = getLoopCharacteristics(element);
  12671. const getValue = () => {
  12672. return isAsyncBefore(loopCharacteristics);
  12673. };
  12674. const setValue = value => {
  12675. // overwrite the legacy `async` property, we will use the more explicit `asyncBefore`
  12676. const properties = {
  12677. 'camunda:asyncBefore': value,
  12678. 'camunda:async': undefined
  12679. };
  12680. commandStack.execute('element.updateModdleProperties', {
  12681. element,
  12682. moddleElement: loopCharacteristics,
  12683. properties
  12684. });
  12685. };
  12686. return propertiesPanel.CheckboxEntry({
  12687. element,
  12688. id: 'multiInstanceAsynchronousBefore',
  12689. label: translate('Asynchronous before'),
  12690. getValue,
  12691. setValue
  12692. });
  12693. }
  12694. function MultiInstanceAsynchronousAfter(props) {
  12695. const {
  12696. element
  12697. } = props;
  12698. const commandStack = useService('commandStack');
  12699. const translate = useService('translate');
  12700. const loopCharacteristics = getLoopCharacteristics(element);
  12701. const getValue = () => {
  12702. return isAsyncAfter(loopCharacteristics);
  12703. };
  12704. const setValue = value => {
  12705. commandStack.execute('element.updateModdleProperties', {
  12706. element,
  12707. moddleElement: loopCharacteristics,
  12708. properties: {
  12709. 'camunda:asyncAfter': value
  12710. }
  12711. });
  12712. };
  12713. return propertiesPanel.CheckboxEntry({
  12714. element,
  12715. id: 'multiInstanceAsynchronousAfter',
  12716. label: translate('Asynchronous after'),
  12717. getValue,
  12718. setValue
  12719. });
  12720. }
  12721. function MultiInstanceExclusive(props) {
  12722. const {
  12723. element
  12724. } = props;
  12725. const commandStack = useService('commandStack'),
  12726. translate = useService('translate');
  12727. const loopCharacteristics = getLoopCharacteristics(element);
  12728. const getValue = () => {
  12729. return isExclusive(loopCharacteristics);
  12730. };
  12731. const setValue = value => {
  12732. commandStack.execute('element.updateModdleProperties', {
  12733. element,
  12734. moddleElement: loopCharacteristics,
  12735. properties: {
  12736. 'camunda:exclusive': value
  12737. }
  12738. });
  12739. };
  12740. return propertiesPanel.CheckboxEntry({
  12741. element,
  12742. id: 'multiInstanceExclusive',
  12743. label: translate('Exclusive'),
  12744. getValue,
  12745. setValue
  12746. });
  12747. }
  12748. function MultiInstanceRetryTimeCycle(props) {
  12749. const {
  12750. element
  12751. } = props;
  12752. const bpmnFactory = useService('bpmnFactory'),
  12753. commandStack = useService('commandStack'),
  12754. translate = useService('translate'),
  12755. debounce = useService('debounceInput');
  12756. const loopCharacteristics = getLoopCharacteristics(element);
  12757. const getValue = () => {
  12758. const failedJobRetryTimeCycle = getExtensionElementsList(loopCharacteristics, 'camunda:FailedJobRetryTimeCycle')[0];
  12759. return failedJobRetryTimeCycle && failedJobRetryTimeCycle.body;
  12760. };
  12761. const setValue = value => {
  12762. const commands = [];
  12763. let extensionElements = loopCharacteristics.get('extensionElements'); // (1) ensure extension elements
  12764. if (!extensionElements) {
  12765. extensionElements = createElement('bpmn:ExtensionElements', {
  12766. values: []
  12767. }, loopCharacteristics, bpmnFactory);
  12768. commands.push({
  12769. cmd: 'element.updateModdleProperties',
  12770. context: {
  12771. element,
  12772. moddleElement: loopCharacteristics,
  12773. properties: {
  12774. extensionElements
  12775. }
  12776. }
  12777. });
  12778. } // (2) ensure failedJobRetryTimeCycle
  12779. let failedJobRetryTimeCycle = getExtensionElementsList(loopCharacteristics, 'camunda:FailedJobRetryTimeCycle')[0];
  12780. if (!failedJobRetryTimeCycle) {
  12781. failedJobRetryTimeCycle = createElement('camunda:FailedJobRetryTimeCycle', {}, extensionElements, bpmnFactory);
  12782. commands.push({
  12783. cmd: 'element.updateModdleProperties',
  12784. context: {
  12785. element: loopCharacteristics,
  12786. moddleElement: extensionElements,
  12787. properties: {
  12788. values: [...extensionElements.get('values'), failedJobRetryTimeCycle]
  12789. }
  12790. }
  12791. });
  12792. } // (3) update failedJobRetryTimeCycle value
  12793. commands.push({
  12794. cmd: 'element.updateModdleProperties',
  12795. context: {
  12796. element,
  12797. moddleElement: failedJobRetryTimeCycle,
  12798. properties: {
  12799. body: value
  12800. }
  12801. }
  12802. }); // (4) commit all updates
  12803. commandStack.execute('properties-panel.multi-command-executor', commands);
  12804. };
  12805. return propertiesPanel.TextFieldEntry({
  12806. element,
  12807. id: 'multiInstanceRetryTimeCycle',
  12808. label: translate('Retry time cycle'),
  12809. getValue,
  12810. setValue,
  12811. debounce
  12812. });
  12813. } // helper ////////////////////////////
  12814. // generic ///////////////////////////
  12815. /**
  12816. * isMultiInstanceSupported - check whether given element supports camunda specific props
  12817. * for multiInstance (ref. <camunda:Cllectable>).
  12818. *
  12819. * @param {djs.model.Base} element
  12820. * @return {boolean}
  12821. */
  12822. function isMultiInstanceSupported(element) {
  12823. const loopCharacteristics = getLoopCharacteristics(element);
  12824. return !!loopCharacteristics && ModelUtil.is(loopCharacteristics, 'camunda:Collectable');
  12825. }
  12826. /**
  12827. * getProperty - get a property value of the loop characteristics.
  12828. *
  12829. * @param {djs.model.Base} element
  12830. * @param {string} propertyName
  12831. *
  12832. * @return {any} the property value
  12833. */
  12834. function getProperty(element, propertyName) {
  12835. var loopCharacteristics = getLoopCharacteristics(element);
  12836. return loopCharacteristics && loopCharacteristics.get(propertyName);
  12837. }
  12838. /**
  12839. * getLoopCharacteristics - get loopCharacteristics of a given element.
  12840. *
  12841. * @param {djs.model.Base} element
  12842. * @return {ModdleElement<bpmn:MultiInstanceLoopCharacteristics> | undefined}
  12843. */
  12844. function getLoopCharacteristics(element) {
  12845. const bo = ModelUtil.getBusinessObject(element);
  12846. return bo.loopCharacteristics;
  12847. } // collection
  12848. /**
  12849. * getCollection - get the 'camunda:collection' attribute value of the loop characteristics.
  12850. *
  12851. * @param {djs.model.Base} element
  12852. *
  12853. * @return {string} the 'camunda:collection' value
  12854. */
  12855. function getCollection(element) {
  12856. return getProperty(element, 'camunda:collection');
  12857. } // elementVariable
  12858. /**
  12859. * getElementVariable - get the 'camunda:elementVariable' attribute value of the loop characteristics.
  12860. *
  12861. * @param {djs.model.Base} element
  12862. *
  12863. * @return {string} the 'camunda:elementVariable' value
  12864. */
  12865. function getElementVariable(element) {
  12866. return getProperty(element, 'camunda:elementVariable');
  12867. } // asyncBefore asyncAfter
  12868. /**
  12869. * Returns true if the attribute 'camunda:asyncBefore' is set
  12870. * to true.
  12871. *
  12872. * @param {ModdleElement} bo
  12873. *
  12874. * @return {boolean} a boolean value
  12875. */
  12876. function isAsyncBefore(bo) {
  12877. return !!(bo.get('camunda:asyncBefore') || bo.get('camunda:async'));
  12878. }
  12879. /**
  12880. * Returns true if the attribute 'camunda:asyncAfter' is set
  12881. * to true.
  12882. *
  12883. * @param {ModdleElement} bo
  12884. *
  12885. * @return {boolean} a boolean value
  12886. */
  12887. function isAsyncAfter(bo) {
  12888. return !!bo.get('camunda:asyncAfter');
  12889. }
  12890. /**
  12891. * Returns true if the attribute 'camunda:exclusive' is set
  12892. * to true.
  12893. *
  12894. * @param {ModdleElement} bo
  12895. *
  12896. * @return {boolean} a boolean value
  12897. */
  12898. function isExclusive(bo) {
  12899. return !!bo.get('camunda:exclusive');
  12900. }
  12901. /**
  12902. * isAsync - returns true if the attribute 'camunda:asyncAfter' or 'camunda:asyncBefore'
  12903. * is set to true.
  12904. *
  12905. * @param {ModdleElement} bo
  12906. * @return {boolean}
  12907. */
  12908. function isAsync(bo) {
  12909. return isAsyncAfter(bo) || isAsyncBefore(bo);
  12910. } // Checkbox
  12911. function checkboxIsEditedInverted(node) {
  12912. return node && !node.checked;
  12913. }
  12914. /**
  12915. * Cf. https://docs.camunda.org/manual/7.15/reference/bpmn20/subprocesses/call-activity/#passing-variables
  12916. */
  12917. function OutMappingPropagationProps(props) {
  12918. const {
  12919. element
  12920. } = props;
  12921. if (!areOutMappingsSupported$1(element)) {
  12922. return [];
  12923. }
  12924. const entries = [{
  12925. id: 'outMapping-propagation',
  12926. component: PropagateAll,
  12927. isEdited: propertiesPanel.isCheckboxEntryEdited
  12928. }];
  12929. if (isPropagateAll(element)) {
  12930. entries.push({
  12931. id: 'outMapping-propagation-local',
  12932. component: Local,
  12933. isEdited: propertiesPanel.isCheckboxEntryEdited
  12934. });
  12935. }
  12936. return entries;
  12937. }
  12938. function PropagateAll(props) {
  12939. const {
  12940. element
  12941. } = props;
  12942. const commandStack = useService('commandStack');
  12943. const bpmnFactory = useService('bpmnFactory');
  12944. const translate = useService('translate');
  12945. const getValue = () => {
  12946. return isPropagateAll(element);
  12947. };
  12948. const setValue = value => {
  12949. if (value) {
  12950. addOutMapping();
  12951. } else {
  12952. removeOutMapping();
  12953. }
  12954. };
  12955. function addOutMapping() {
  12956. const businessObject = ModelUtil.getBusinessObject(element);
  12957. const mapping = createElement('camunda:Out', {
  12958. variables: 'all'
  12959. }, null, bpmnFactory);
  12960. addExtensionElements(element, businessObject, mapping, bpmnFactory, commandStack);
  12961. }
  12962. function removeOutMapping() {
  12963. const businessObject = ModelUtil.getBusinessObject(element);
  12964. const mappings = findRelevantOutMappings(element);
  12965. removeExtensionElements(element, businessObject, mappings, commandStack);
  12966. }
  12967. return propertiesPanel.CheckboxEntry({
  12968. id: 'outMapping-propagation',
  12969. label: translate('Propagate all variables'),
  12970. getValue,
  12971. setValue
  12972. });
  12973. }
  12974. function Local(props) {
  12975. const {
  12976. element
  12977. } = props;
  12978. const commandStack = useService('commandStack');
  12979. const translate = useService('translate');
  12980. const mapping = findRelevantOutMappings(element)[0];
  12981. const getValue = () => {
  12982. return mapping.get('camunda:local');
  12983. };
  12984. const setValue = value => {
  12985. commandStack.execute('element.updateModdleProperties', {
  12986. element,
  12987. moddleElement: mapping,
  12988. properties: {
  12989. local: value
  12990. }
  12991. });
  12992. };
  12993. return propertiesPanel.CheckboxEntry({
  12994. element,
  12995. id: 'outMapping-propagation-local',
  12996. label: translate('Local'),
  12997. getValue,
  12998. setValue
  12999. });
  13000. } // helper //////////////////////////
  13001. function areOutMappingsSupported$1(element) {
  13002. return ModelUtil.is(element, 'bpmn:CallActivity');
  13003. }
  13004. function getOutMappings$1(element) {
  13005. const businessObject = ModelUtil.getBusinessObject(element);
  13006. return getExtensionElementsList(businessObject, 'camunda:Out');
  13007. }
  13008. function findRelevantOutMappings(element) {
  13009. const inMappings = getOutMappings$1(element);
  13010. return minDash.filter(inMappings, function (mapping) {
  13011. const variables = mapping.get('variables');
  13012. return variables && variables === 'all';
  13013. });
  13014. }
  13015. function isPropagateAll(element) {
  13016. const mappings = findRelevantOutMappings(element);
  13017. return !!mappings.length;
  13018. }
  13019. /**
  13020. * Cf. https://docs.camunda.org/manual/latest/reference/bpmn20/custom-extensions/extension-elements/#out
  13021. */
  13022. function OutMappingProps({
  13023. element,
  13024. injector
  13025. }) {
  13026. if (!areOutMappingsSupported(element)) {
  13027. return null;
  13028. }
  13029. const variableMappings = getOutMappings(element) || [];
  13030. const bpmnFactory = injector.get('bpmnFactory'),
  13031. commandStack = injector.get('commandStack');
  13032. const items = variableMappings.map((mapping, index) => {
  13033. const id = element.id + '-outMapping-' + index;
  13034. return {
  13035. id,
  13036. label: mapping.get('target') || '',
  13037. entries: InOutMapping({
  13038. idPrefix: id,
  13039. element,
  13040. mapping
  13041. }),
  13042. autoFocusEntry: id + '-target',
  13043. remove: removeFactory$1({
  13044. commandStack,
  13045. element,
  13046. mapping
  13047. })
  13048. };
  13049. });
  13050. return {
  13051. items,
  13052. add: addFactory$1({
  13053. bpmnFactory,
  13054. commandStack,
  13055. element
  13056. })
  13057. };
  13058. }
  13059. function removeFactory$1({
  13060. commandStack,
  13061. element,
  13062. mapping
  13063. }) {
  13064. return function (event) {
  13065. event.stopPropagation();
  13066. const businessObject = ModelUtil.getBusinessObject(element);
  13067. removeExtensionElements(element, businessObject, mapping, commandStack);
  13068. };
  13069. }
  13070. function addFactory$1({
  13071. bpmnFactory,
  13072. commandStack,
  13073. element
  13074. }) {
  13075. return function (event) {
  13076. event.stopPropagation();
  13077. const businessObject = ModelUtil.getBusinessObject(element);
  13078. const newMapping = createElement('camunda:Out', {
  13079. source: '' // source is the default type
  13080. }, null, bpmnFactory);
  13081. addExtensionElements(element, businessObject, newMapping, bpmnFactory, commandStack);
  13082. };
  13083. } // helper ///////////////
  13084. function getOutMappings(element) {
  13085. const businessObject = ModelUtil.getBusinessObject(element);
  13086. const mappings = getExtensionElementsList(businessObject, 'camunda:Out'); // only retrieve relevant mappings here, others are handled in other groups
  13087. // mapping.businessKey => camunda-platform/CallAvtivityProps
  13088. // mapping.variables => camunda-platform/OutMappingPropagationProps
  13089. return minDash.filter(mappings, function (mapping) {
  13090. return !mapping.businessKey && !(mapping.variables && mapping.variables === 'all');
  13091. });
  13092. }
  13093. function areOutMappingsSupported(element) {
  13094. return ModelUtil.is(element, 'bpmn:CallActivity');
  13095. }
  13096. function OutputProps({
  13097. element,
  13098. injector
  13099. }) {
  13100. if (!areOutputParametersSupported(element)) {
  13101. return null;
  13102. }
  13103. const outputParameters = getOutputParameters(element) || [];
  13104. const bpmnFactory = injector.get('bpmnFactory'),
  13105. commandStack = injector.get('commandStack');
  13106. const items = outputParameters.map((parameter, index) => {
  13107. const id = element.id + '-outputParameter-' + index;
  13108. return {
  13109. id,
  13110. label: parameter.get('name') || '',
  13111. entries: InputOutputParameter({
  13112. idPrefix: id,
  13113. element,
  13114. parameter
  13115. }),
  13116. autoFocusEntry: id + '-name',
  13117. remove: removeFactory({
  13118. commandStack,
  13119. element,
  13120. parameter
  13121. })
  13122. };
  13123. });
  13124. return {
  13125. items,
  13126. add: addFactory({
  13127. bpmnFactory,
  13128. commandStack,
  13129. element
  13130. })
  13131. };
  13132. }
  13133. function removeFactory({
  13134. commandStack,
  13135. element,
  13136. parameter
  13137. }) {
  13138. return function (event) {
  13139. event.stopPropagation();
  13140. const inputOutput = getInputOutput(element);
  13141. if (!inputOutput) {
  13142. return;
  13143. }
  13144. commandStack.execute('element.updateModdleProperties', {
  13145. element,
  13146. moddleElement: inputOutput,
  13147. properties: {
  13148. outputParameters: minDash.without(inputOutput.get('outputParameters'), parameter)
  13149. }
  13150. });
  13151. };
  13152. }
  13153. function addFactory({
  13154. bpmnFactory,
  13155. commandStack,
  13156. element
  13157. }) {
  13158. return function (event) {
  13159. event.stopPropagation();
  13160. commandStack.execute('properties-panel.multi-command-executor', AddParameterCmd(element, 'camunda:OutputParameter', bpmnFactory));
  13161. };
  13162. }
  13163. const LISTENER_ALLOWED_TYPES = ['bpmn:Activity', 'bpmn:Event', 'bpmn:Gateway', 'bpmn:SequenceFlow', 'bpmn:Process', 'bpmn:Participant'];
  13164. const SCRIPT_PROPS = {
  13165. 'script': undefined,
  13166. 'resource': undefined,
  13167. 'scriptFormat': undefined
  13168. };
  13169. const CLASS_PROPS = {
  13170. 'class': undefined
  13171. };
  13172. const EXPRESSION_PROPS = {
  13173. 'expression': undefined
  13174. };
  13175. const DELEGATE_EXPRESSION_PROPS = {
  13176. 'delegateExpression': undefined
  13177. };
  13178. const DEFAULT_PROPS = { ...SCRIPT_PROPS,
  13179. ...CLASS_PROPS,
  13180. ...EXPRESSION_PROPS,
  13181. ...DELEGATE_EXPRESSION_PROPS
  13182. };
  13183. const DEFAULT_EVENT_PROPS = {
  13184. 'eventDefinitions': undefined,
  13185. 'event': undefined
  13186. };
  13187. const IMPLEMENTATION_TYPE_TO_LABEL = {
  13188. class: 'Java class',
  13189. expression: 'Expression',
  13190. delegateExpression: 'Delegate expression',
  13191. script: 'Script'
  13192. };
  13193. const EVENT_TO_LABEL = {
  13194. start: 'Start',
  13195. end: 'End',
  13196. take: 'Take',
  13197. create: 'Create',
  13198. assignment: 'Assignment',
  13199. complete: 'Complete',
  13200. delete: 'Delete',
  13201. update: 'Update',
  13202. timeout: 'Timeout'
  13203. };
  13204. /**
  13205. * Cf. https://docs.camunda.org/manual/latest/user-guide/process-engine/delegation-code/#execution-listener
  13206. */
  13207. function ExecutionListenerProps({
  13208. element,
  13209. injector
  13210. }) {
  13211. if (!ModelingUtil.isAny(element, LISTENER_ALLOWED_TYPES)) {
  13212. return;
  13213. }
  13214. const bpmnFactory = injector.get('bpmnFactory'),
  13215. commandStack = injector.get('commandStack');
  13216. if (ModelUtil.is(element, 'bpmn:Participant') && !element.businessObject.processRef) {
  13217. return;
  13218. }
  13219. const businessObject = getListenersContainer(element);
  13220. const listeners = getExtensionElementsList(businessObject, 'camunda:ExecutionListener');
  13221. return {
  13222. items: listeners.map((listener, index) => {
  13223. const id = `${element.id}-executionListener-${index}`; // @TODO(barmac): Find a way to pass translate for internationalized label.
  13224. return {
  13225. id,
  13226. label: getListenerLabel(listener),
  13227. entries: ExecutionListener({
  13228. idPrefix: id,
  13229. element,
  13230. listener
  13231. }),
  13232. remove: removeListenerFactory({
  13233. element,
  13234. listener,
  13235. commandStack
  13236. })
  13237. };
  13238. }),
  13239. add: addExecutionListenerFactory({
  13240. bpmnFactory,
  13241. commandStack,
  13242. element
  13243. })
  13244. };
  13245. }
  13246. function ExecutionListener(props) {
  13247. const {
  13248. idPrefix,
  13249. element,
  13250. listener
  13251. } = props;
  13252. return [{
  13253. id: `${idPrefix}-eventType`,
  13254. component: EventType,
  13255. listener
  13256. }, {
  13257. id: `${idPrefix}-listenerType`,
  13258. component: ListenerType,
  13259. listener
  13260. }, ...ImplementationDetails({
  13261. idPrefix,
  13262. element,
  13263. listener
  13264. }), {
  13265. id: `${idPrefix}-fields`,
  13266. component: Fields,
  13267. listener
  13268. }];
  13269. }
  13270. function TaskListenerProps({
  13271. element,
  13272. injector
  13273. }) {
  13274. if (!ModelUtil.is(element, 'bpmn:UserTask')) {
  13275. return;
  13276. }
  13277. const bpmnFactory = injector.get('bpmnFactory'),
  13278. commandStack = injector.get('commandStack');
  13279. const businessObject = getListenersContainer(element);
  13280. const listeners = getExtensionElementsList(businessObject, 'camunda:TaskListener');
  13281. return {
  13282. items: listeners.map((listener, index) => {
  13283. const id = `${element.id}-taskListener-${index}`; // @TODO(barmac): Find a way to pass translate for internationalized label.
  13284. return {
  13285. id,
  13286. label: getListenerLabel(listener),
  13287. entries: TaskListener({
  13288. idPrefix: id,
  13289. element,
  13290. listener
  13291. }),
  13292. remove: removeListenerFactory({
  13293. element,
  13294. listener,
  13295. commandStack
  13296. })
  13297. };
  13298. }),
  13299. add: addTaskListenerFactory({
  13300. bpmnFactory,
  13301. commandStack,
  13302. element
  13303. })
  13304. };
  13305. }
  13306. function TaskListener(props) {
  13307. const {
  13308. idPrefix,
  13309. element,
  13310. listener
  13311. } = props;
  13312. return [{
  13313. id: `${idPrefix}-eventType`,
  13314. component: EventType,
  13315. listener
  13316. }, {
  13317. id: `${idPrefix}-listenerId`,
  13318. component: ListenerId,
  13319. listener
  13320. }, {
  13321. id: `${idPrefix}-listenerType`,
  13322. component: ListenerType,
  13323. listener
  13324. }, ...ImplementationDetails({
  13325. idPrefix,
  13326. element,
  13327. listener
  13328. }), ...EventTypeDetails({
  13329. idPrefix,
  13330. element,
  13331. listener
  13332. }), {
  13333. id: `${idPrefix}-fields`,
  13334. component: Fields,
  13335. listener
  13336. }];
  13337. }
  13338. function removeListenerFactory({
  13339. element,
  13340. listener,
  13341. commandStack
  13342. }) {
  13343. return function removeListener(event) {
  13344. event.stopPropagation();
  13345. removeExtensionElements(element, getListenersContainer(element), listener, commandStack);
  13346. };
  13347. }
  13348. function EventType({
  13349. id,
  13350. element,
  13351. listener
  13352. }) {
  13353. const translate = useService('translate');
  13354. const bpmnFactory = useService('bpmnFactory');
  13355. const commandStack = useService('commandStack');
  13356. function getValue() {
  13357. return listener.get('event');
  13358. }
  13359. function setValue(value) {
  13360. const properties = getDefaultEventTypeProperties(value, bpmnFactory);
  13361. commandStack.execute('element.updateModdleProperties', {
  13362. element,
  13363. moddleElement: listener,
  13364. properties
  13365. });
  13366. }
  13367. function getOptions() {
  13368. if (ModelUtil.is(listener, 'camunda:TaskListener')) {
  13369. return [{
  13370. value: 'create',
  13371. label: translate('create')
  13372. }, {
  13373. value: 'assignment',
  13374. label: translate('assignment')
  13375. }, {
  13376. value: 'complete',
  13377. label: translate('complete')
  13378. }, {
  13379. value: 'delete',
  13380. label: translate('delete')
  13381. }, {
  13382. value: 'update',
  13383. label: translate('update')
  13384. }, {
  13385. value: 'timeout',
  13386. label: translate('timeout')
  13387. }];
  13388. }
  13389. if (ModelUtil.is(element, 'bpmn:SequenceFlow')) {
  13390. return [{
  13391. value: 'take',
  13392. label: translate('take')
  13393. }];
  13394. }
  13395. return [{
  13396. value: 'start',
  13397. label: translate('start')
  13398. }, {
  13399. value: 'end',
  13400. label: translate('end')
  13401. }];
  13402. }
  13403. return jsxRuntime.jsx(propertiesPanel.SelectEntry, {
  13404. id: id,
  13405. label: translate('Event type'),
  13406. getValue: getValue,
  13407. setValue: setValue,
  13408. getOptions: getOptions
  13409. });
  13410. }
  13411. function ListenerId({
  13412. id,
  13413. element,
  13414. listener
  13415. }) {
  13416. const translate = useService('translate');
  13417. const debounce = useService('debounceInput');
  13418. const commandStack = useService('commandStack');
  13419. let options = {
  13420. element,
  13421. id: id,
  13422. label: translate('Listener ID'),
  13423. debounce,
  13424. isEdited: propertiesPanel.isTextFieldEntryEdited,
  13425. setValue: value => {
  13426. commandStack.execute('element.updateModdleProperties', {
  13427. element,
  13428. moddleElement: listener,
  13429. properties: {
  13430. 'camunda:id': value
  13431. }
  13432. });
  13433. },
  13434. getValue: () => {
  13435. return listener.get('camunda:id');
  13436. }
  13437. };
  13438. return propertiesPanel.TextFieldEntry(options);
  13439. }
  13440. function ListenerType({
  13441. id,
  13442. element,
  13443. listener
  13444. }) {
  13445. const modeling = useService('modeling');
  13446. const translate = useService('translate');
  13447. const bpmnFactory = useService('bpmnFactory');
  13448. function getValue() {
  13449. return getListenerType(listener);
  13450. }
  13451. function setValue(value) {
  13452. const properties = getDefaultImplementationProperties(value, bpmnFactory);
  13453. modeling.updateModdleProperties(element, listener, properties);
  13454. }
  13455. function getOptions() {
  13456. return getListenerTypeOptions(translate);
  13457. }
  13458. return jsxRuntime.jsx(propertiesPanel.SelectEntry, {
  13459. id: id,
  13460. label: translate('Listener type'),
  13461. getValue: getValue,
  13462. setValue: setValue,
  13463. getOptions: getOptions
  13464. });
  13465. }
  13466. function ImplementationDetails(props) {
  13467. const {
  13468. idPrefix,
  13469. element,
  13470. listener
  13471. } = props;
  13472. const type = getListenerType(listener);
  13473. if (type === 'class') {
  13474. return [{
  13475. id: getPrefixedId(idPrefix, 'javaClass'),
  13476. component: JavaClass,
  13477. businessObject: listener
  13478. }];
  13479. } else if (type === 'expression') {
  13480. return [{
  13481. id: getPrefixedId(idPrefix, 'expression'),
  13482. component: Expression$1,
  13483. businessObject: listener
  13484. }];
  13485. } else if (type === 'delegateExpression') {
  13486. return [{
  13487. id: getPrefixedId(idPrefix, 'delegateExpression'),
  13488. component: DelegateExpression,
  13489. businessObject: listener
  13490. }];
  13491. } else if (type === 'script') {
  13492. return ScriptProps({
  13493. element,
  13494. script: listener.get('script'),
  13495. prefix: idPrefix
  13496. });
  13497. }
  13498. }
  13499. function EventTypeDetails(props) {
  13500. const {
  13501. idPrefix,
  13502. element,
  13503. listener
  13504. } = props;
  13505. const type = listener.get('event');
  13506. if (type === 'timeout') {
  13507. return TimerProps$1({
  13508. element,
  13509. listener,
  13510. timerEventDefinition: getTimerEventDefinition(listener),
  13511. idPrefix: idPrefix
  13512. });
  13513. }
  13514. return [];
  13515. }
  13516. function Field(props) {
  13517. const {
  13518. element,
  13519. id: idPrefix,
  13520. index,
  13521. item: field,
  13522. open
  13523. } = props;
  13524. const fieldId = `${idPrefix}-field-${index}`;
  13525. return jsxRuntime.jsx(propertiesPanel.CollapsibleEntry, {
  13526. id: fieldId,
  13527. element: element,
  13528. entries: FieldInjection({
  13529. element,
  13530. field,
  13531. idPrefix: fieldId
  13532. }),
  13533. label: field.get('name') || '<empty>',
  13534. open: open
  13535. });
  13536. }
  13537. function Fields(props) {
  13538. const {
  13539. id,
  13540. element,
  13541. listener
  13542. } = props;
  13543. const bpmnFactory = useService('bpmnFactory');
  13544. const commandStack = useService('commandStack');
  13545. const translate = useService('translate');
  13546. const fields = listener.get('fields');
  13547. function addField() {
  13548. const field = createElement('camunda:Field', {}, listener, bpmnFactory);
  13549. commandStack.execute('element.updateModdleProperties', {
  13550. element,
  13551. moddleElement: listener,
  13552. properties: {
  13553. fields: [...listener.get('fields'), field]
  13554. }
  13555. });
  13556. }
  13557. function removeField(field) {
  13558. commandStack.execute('element.updateModdleProperties', {
  13559. element,
  13560. moddleElement: listener,
  13561. properties: {
  13562. fields: minDash.without(listener.get('fields'), field)
  13563. }
  13564. });
  13565. }
  13566. return jsxRuntime.jsx(propertiesPanel.ListEntry, {
  13567. id: id,
  13568. element: element,
  13569. label: translate('Field injection'),
  13570. items: fields,
  13571. component: Field,
  13572. onAdd: addField,
  13573. onRemove: removeField,
  13574. compareFn: compareName,
  13575. autoFocusEntry: true
  13576. });
  13577. }
  13578. function addListenerFactory({
  13579. bpmnFactory,
  13580. commandStack,
  13581. element,
  13582. listenerGroup
  13583. }) {
  13584. return function (event) {
  13585. event.stopPropagation();
  13586. const listener = bpmnFactory.create(listenerGroup, {
  13587. event: getDefaultEvent(element, listenerGroup),
  13588. class: ''
  13589. });
  13590. const businessObject = getListenersContainer(element);
  13591. addExtensionElements(element, businessObject, listener, bpmnFactory, commandStack);
  13592. };
  13593. }
  13594. function addTaskListenerFactory(props) {
  13595. return addListenerFactory({ ...props,
  13596. listenerGroup: 'camunda:TaskListener'
  13597. });
  13598. }
  13599. function addExecutionListenerFactory(props) {
  13600. return addListenerFactory({ ...props,
  13601. listenerGroup: 'camunda:ExecutionListener'
  13602. });
  13603. } // helper
  13604. /**
  13605. * Get a readable label for a listener.
  13606. *
  13607. * @param {ModdleElement} listener
  13608. * @param {string => string} [translate]
  13609. */
  13610. function getListenerLabel(listener, translate = value => value) {
  13611. const event = listener.get('event');
  13612. const implementationType = getListenerType(listener);
  13613. return `${translate(EVENT_TO_LABEL[event])}: ${translate(IMPLEMENTATION_TYPE_TO_LABEL[implementationType])}`;
  13614. }
  13615. function getListenerTypeOptions(translate) {
  13616. return Object.entries(IMPLEMENTATION_TYPE_TO_LABEL).map(([value, label]) => ({
  13617. value,
  13618. label: translate(label)
  13619. }));
  13620. }
  13621. function getListenerType(listener) {
  13622. return getImplementationType(listener);
  13623. }
  13624. function getDefaultEvent(element, listenerGroup) {
  13625. if (listenerGroup === 'camunda:TaskListener') return 'create';
  13626. return ModelUtil.is(element, 'bpmn:SequenceFlow') ? 'take' : 'start';
  13627. }
  13628. function getDefaultImplementationProperties(type, bpmnFactory) {
  13629. switch (type) {
  13630. case 'class':
  13631. return { ...DEFAULT_PROPS,
  13632. 'class': ''
  13633. };
  13634. case 'expression':
  13635. return { ...DEFAULT_PROPS,
  13636. 'expression': ''
  13637. };
  13638. case 'delegateExpression':
  13639. return { ...DEFAULT_PROPS,
  13640. 'delegateExpression': ''
  13641. };
  13642. case 'script':
  13643. return { ...DEFAULT_PROPS,
  13644. 'script': bpmnFactory.create('camunda:Script')
  13645. };
  13646. }
  13647. }
  13648. function getDefaultEventTypeProperties(type, bpmnFactory) {
  13649. switch (type) {
  13650. case 'timeout':
  13651. return { ...DEFAULT_EVENT_PROPS,
  13652. eventDefinitions: [bpmnFactory.create('bpmn:TimerEventDefinition')],
  13653. event: type
  13654. };
  13655. default:
  13656. return { ...DEFAULT_EVENT_PROPS,
  13657. event: type
  13658. };
  13659. }
  13660. }
  13661. function getPrefixedId(prefix, id) {
  13662. return `${prefix}-${id}`;
  13663. }
  13664. function compareName(field, anotherField) {
  13665. const [name = '', anotherName = ''] = [field.name, anotherField.name];
  13666. return name === anotherName ? 0 : name > anotherName ? 1 : -1;
  13667. }
  13668. function getListenersContainer(element) {
  13669. const businessObject = ModelUtil.getBusinessObject(element);
  13670. return businessObject.get('processRef') || businessObject;
  13671. }
  13672. function ProcessVariablesProps(props) {
  13673. const {
  13674. element
  13675. } = props;
  13676. if (!canHaveProcessVariables(element)) {
  13677. return null;
  13678. }
  13679. const businessObject = ModelUtil.getBusinessObject(element);
  13680. const rootElement = getRootElement(businessObject);
  13681. const scope = getScope(element); // (1) fetch available process variables for given scope
  13682. const variables = extractProcessVariables.getVariablesForScope(scope, rootElement);
  13683. if (!variables.length) {
  13684. return null;
  13685. }
  13686. const withNames = populateElementNames(sortByName(variables));
  13687. const byScope = groupByScope(withNames);
  13688. const multiScope = isMultiScope(byScope);
  13689. let variableItems = []; // (2) get variables to display
  13690. if (multiScope) {
  13691. // (2a) multiple scopes, sub scopes first
  13692. // assumption: variables extractor fetches parent variables first
  13693. const reversed = minDash.map(reverse(minDash.keys(byScope)), scopeKey => byScope[scopeKey]);
  13694. variableItems = minDash.flatten(reversed);
  13695. } else {
  13696. // (2b) single scope
  13697. variableItems = withNames;
  13698. }
  13699. const items = variableItems.map((variable, index) => {
  13700. const id = element.id + '-variable-' + index;
  13701. return {
  13702. id,
  13703. label: variable.name,
  13704. entries: [...ProcessVariableItem({
  13705. idPrefix: id,
  13706. multiScope,
  13707. variable
  13708. })]
  13709. };
  13710. });
  13711. return {
  13712. items,
  13713. shouldSort: false
  13714. };
  13715. }
  13716. function ProcessVariableItem(props) {
  13717. const {
  13718. idPrefix,
  13719. multiScope,
  13720. variable
  13721. } = props;
  13722. let entries = [];
  13723. if (multiScope) {
  13724. entries.push({
  13725. id: idPrefix + '-scope',
  13726. component: Scope,
  13727. idPrefix,
  13728. variable
  13729. });
  13730. }
  13731. entries.push({
  13732. id: idPrefix + '-createdIn',
  13733. component: CreatedIn,
  13734. idPrefix,
  13735. variable
  13736. });
  13737. return entries;
  13738. }
  13739. function Scope(props) {
  13740. const {
  13741. idPrefix,
  13742. variable
  13743. } = props;
  13744. const translate = useService('translate');
  13745. const id = idPrefix + '-scope';
  13746. return jsxRuntime.jsxs("div", {
  13747. "data-entry-id": id,
  13748. class: "bio-properties-panel-entry",
  13749. children: [jsxRuntime.jsx("b", {
  13750. style: "font-weight: bold",
  13751. class: "bio-properties-panel-label",
  13752. children: translate('Scope')
  13753. }), jsxRuntime.jsx("label", {
  13754. id: prefixId(id),
  13755. class: "bio-properties-panel-label",
  13756. children: variable.scope
  13757. })]
  13758. });
  13759. }
  13760. function CreatedIn(props) {
  13761. const {
  13762. idPrefix,
  13763. variable
  13764. } = props;
  13765. const translate = useService('translate');
  13766. const id = idPrefix + '-createdIn';
  13767. const origin = variable.origin.join(', ');
  13768. return jsxRuntime.jsxs("div", {
  13769. "data-entry-id": id,
  13770. class: "bio-properties-panel-entry",
  13771. children: [jsxRuntime.jsx("b", {
  13772. style: "font-weight: bold",
  13773. class: "bio-properties-panel-label",
  13774. children: translate('Created in')
  13775. }), jsxRuntime.jsx("label", {
  13776. id: prefixId(id),
  13777. class: "bio-properties-panel-label",
  13778. children: origin
  13779. })]
  13780. });
  13781. } // helper //////////////////////
  13782. function canHaveProcessVariables(element) {
  13783. const businessObject = ModelUtil.getBusinessObject(element);
  13784. return ModelingUtil.isAny(element, ['bpmn:Process', 'bpmn:SubProcess']) || ModelUtil.is(element, 'bpmn:Participant') && businessObject.get('processRef');
  13785. }
  13786. function getRootElement(element) {
  13787. const businessObject = ModelUtil.getBusinessObject(element);
  13788. if (ModelUtil.is(businessObject, 'bpmn:Participant')) {
  13789. return businessObject.processRef;
  13790. }
  13791. if (ModelUtil.is(businessObject, 'bpmn:Process')) {
  13792. return businessObject;
  13793. }
  13794. let parent = businessObject;
  13795. while (parent.$parent && !ModelUtil.is(parent, 'bpmn:Process')) {
  13796. parent = parent.$parent;
  13797. }
  13798. return parent;
  13799. }
  13800. function getScope(element) {
  13801. const bo = ModelUtil.getBusinessObject(element);
  13802. if (ModelUtil.is(element, 'bpmn:Participant')) {
  13803. return bo.processRef.id;
  13804. }
  13805. return bo.id;
  13806. }
  13807. function sortByName(variables) {
  13808. return minDash.sortBy(variables, function (variable) {
  13809. return variable.name;
  13810. });
  13811. }
  13812. function groupByScope(variables) {
  13813. return minDash.groupBy(variables, 'scope');
  13814. }
  13815. function populateElementNames(variables) {
  13816. minDash.forEach(variables, function (variable) {
  13817. const names = minDash.map(variable.origin, function (element) {
  13818. return element.name || element.id;
  13819. });
  13820. variable.origin = names;
  13821. variable.scope = variable.scope.name || variable.scope.id;
  13822. });
  13823. return variables;
  13824. }
  13825. function isMultiScope(scopedVariables) {
  13826. return minDash.keys(scopedVariables).length > 1;
  13827. }
  13828. function reverse(array) {
  13829. return minDash.map(array, function (a, i) {
  13830. return array[array.length - 1 - i];
  13831. });
  13832. }
  13833. function prefixId(id) {
  13834. return `bio-properties-panel-${id}`;
  13835. }
  13836. function ScriptTaskProps(props) {
  13837. const {
  13838. element
  13839. } = props;
  13840. if (!ModelUtil.is(element, 'bpmn:ScriptTask')) {
  13841. return [];
  13842. }
  13843. const entries = [...ScriptProps({
  13844. element
  13845. })];
  13846. entries.push({
  13847. id: 'scriptResultVariable',
  13848. component: ResultVariable,
  13849. isEdited: propertiesPanel.isTextFieldEntryEdited
  13850. });
  13851. return entries;
  13852. }
  13853. function ResultVariable(props) {
  13854. const {
  13855. element
  13856. } = props;
  13857. const commandStack = useService('commandStack');
  13858. const translate = useService('translate');
  13859. const debounce = useService('debounceInput');
  13860. const businessObject = ModelUtil.getBusinessObject(element);
  13861. const getValue = () => {
  13862. return businessObject.get('camunda:resultVariable');
  13863. };
  13864. const setValue = value => {
  13865. commandStack.execute('element.updateModdleProperties', {
  13866. element,
  13867. moddleElement: businessObject,
  13868. properties: {
  13869. 'camunda:resultVariable': value
  13870. }
  13871. });
  13872. };
  13873. return propertiesPanel.TextFieldEntry({
  13874. element,
  13875. id: 'scriptResultVariable',
  13876. label: translate('Result variable'),
  13877. getValue,
  13878. setValue,
  13879. debounce
  13880. });
  13881. }
  13882. function TasklistProps(props) {
  13883. const {
  13884. element
  13885. } = props;
  13886. const businessObject = ModelUtil.getBusinessObject(element);
  13887. const isEdited = node => {
  13888. return node && !node.checked;
  13889. };
  13890. if (!ModelUtil.is(element, 'bpmn:Process') && !(ModelUtil.is(element, 'bpmn:Participant') && businessObject.get('processRef'))) {
  13891. return [];
  13892. }
  13893. return [{
  13894. id: 'isStartableInTasklist',
  13895. component: Startable,
  13896. isEdited
  13897. }];
  13898. }
  13899. function Startable(props) {
  13900. const {
  13901. element
  13902. } = props;
  13903. const commandStack = useService('commandStack');
  13904. const translate = useService('translate');
  13905. const process = getProcess$1(element);
  13906. const getValue = () => {
  13907. return process.get('camunda:isStartableInTasklist');
  13908. };
  13909. const setValue = value => {
  13910. commandStack.execute('element.updateModdleProperties', {
  13911. element,
  13912. moddleElement: process,
  13913. properties: {
  13914. 'camunda:isStartableInTasklist': value
  13915. }
  13916. });
  13917. };
  13918. return propertiesPanel.CheckboxEntry({
  13919. element,
  13920. id: 'isStartableInTasklist',
  13921. label: translate('Startable'),
  13922. getValue,
  13923. setValue
  13924. });
  13925. } // helper //////////////////
  13926. function getProcess$1(element) {
  13927. return ModelUtil.is(element, 'bpmn:Process') ? ModelUtil.getBusinessObject(element) : ModelUtil.getBusinessObject(element).get('processRef');
  13928. }
  13929. /**
  13930. * Cf. https://docs.camunda.org/manual/latest/reference/bpmn20/tasks/user-task/
  13931. */
  13932. function UserAssignmentProps(props) {
  13933. const {
  13934. element
  13935. } = props;
  13936. if (!ModelUtil.is(element, 'camunda:Assignable')) {
  13937. return [];
  13938. }
  13939. return [{
  13940. id: 'assignee',
  13941. component: Assignee,
  13942. isEdited: propertiesPanel.isTextFieldEntryEdited
  13943. }, {
  13944. id: 'candidateGroups',
  13945. component: CandidateGroups,
  13946. isEdited: propertiesPanel.isTextFieldEntryEdited
  13947. }, {
  13948. id: 'candidateUsers',
  13949. component: CandidateUsers,
  13950. isEdited: propertiesPanel.isTextFieldEntryEdited
  13951. }, {
  13952. id: 'dueDate',
  13953. component: DueDate,
  13954. isEdited: propertiesPanel.isTextFieldEntryEdited
  13955. }, {
  13956. id: 'followUpDate',
  13957. component: FollowUpDate,
  13958. isEdited: propertiesPanel.isTextFieldEntryEdited
  13959. }, {
  13960. id: 'priority',
  13961. component: Priority,
  13962. isEdited: propertiesPanel.isTextFieldEntryEdited
  13963. }];
  13964. }
  13965. function Assignee(props) {
  13966. const {
  13967. element
  13968. } = props;
  13969. const commandStack = useService('commandStack');
  13970. const translate = useService('translate');
  13971. const debounce = useService('debounceInput');
  13972. const businessObject = ModelUtil.getBusinessObject(element);
  13973. const getValue = () => {
  13974. return businessObject.get('camunda:assignee');
  13975. };
  13976. const setValue = value => {
  13977. commandStack.execute('element.updateModdleProperties', {
  13978. element,
  13979. moddleElement: businessObject,
  13980. properties: {
  13981. 'camunda:assignee': value
  13982. }
  13983. });
  13984. };
  13985. return propertiesPanel.TextFieldEntry({
  13986. element,
  13987. id: 'assignee',
  13988. label: translate('Assignee'),
  13989. getValue,
  13990. setValue,
  13991. debounce
  13992. });
  13993. }
  13994. function CandidateUsers(props) {
  13995. const {
  13996. element
  13997. } = props;
  13998. const commandStack = useService('commandStack');
  13999. const translate = useService('translate');
  14000. const debounce = useService('debounceInput');
  14001. const businessObject = ModelUtil.getBusinessObject(element);
  14002. const getValue = () => {
  14003. return businessObject.get('camunda:candidateUsers');
  14004. };
  14005. const setValue = value => {
  14006. commandStack.execute('element.updateModdleProperties', {
  14007. element,
  14008. moddleElement: businessObject,
  14009. properties: {
  14010. 'camunda:candidateUsers': value
  14011. }
  14012. });
  14013. };
  14014. return propertiesPanel.TextFieldEntry({
  14015. element,
  14016. id: 'candidateUsers',
  14017. label: translate('Candidate users'),
  14018. getValue,
  14019. setValue,
  14020. debounce
  14021. });
  14022. }
  14023. function CandidateGroups(props) {
  14024. const {
  14025. element
  14026. } = props;
  14027. const commandStack = useService('commandStack');
  14028. const translate = useService('translate');
  14029. const debounce = useService('debounceInput');
  14030. const businessObject = ModelUtil.getBusinessObject(element);
  14031. const getValue = () => {
  14032. return businessObject.get('camunda:candidateGroups');
  14033. };
  14034. const setValue = value => {
  14035. commandStack.execute('element.updateModdleProperties', {
  14036. element,
  14037. moddleElement: businessObject,
  14038. properties: {
  14039. 'camunda:candidateGroups': value
  14040. }
  14041. });
  14042. };
  14043. return propertiesPanel.TextFieldEntry({
  14044. element,
  14045. id: 'candidateGroups',
  14046. label: translate('Candidate groups'),
  14047. getValue,
  14048. setValue,
  14049. debounce
  14050. });
  14051. }
  14052. function DueDate(props) {
  14053. const {
  14054. element
  14055. } = props;
  14056. const commandStack = useService('commandStack');
  14057. const translate = useService('translate');
  14058. const debounce = useService('debounceInput');
  14059. const businessObject = ModelUtil.getBusinessObject(element);
  14060. const getValue = () => {
  14061. return businessObject.get('camunda:dueDate');
  14062. };
  14063. const setValue = value => {
  14064. commandStack.execute('element.updateModdleProperties', {
  14065. element,
  14066. moddleElement: businessObject,
  14067. properties: {
  14068. 'camunda:dueDate': value
  14069. }
  14070. });
  14071. };
  14072. return propertiesPanel.TextFieldEntry({
  14073. element,
  14074. id: 'dueDate',
  14075. label: translate('Due date'),
  14076. description: translate('The due date as an EL expression (e.g. ${someDate}) or an ISO date (e.g. 2015-06-26T09:54:00).'),
  14077. getValue,
  14078. setValue,
  14079. debounce
  14080. });
  14081. }
  14082. function FollowUpDate(props) {
  14083. const {
  14084. element
  14085. } = props;
  14086. const commandStack = useService('commandStack');
  14087. const translate = useService('translate');
  14088. const debounce = useService('debounceInput');
  14089. const businessObject = ModelUtil.getBusinessObject(element);
  14090. const getValue = () => {
  14091. return businessObject.get('camunda:followUpDate');
  14092. };
  14093. const setValue = value => {
  14094. commandStack.execute('element.updateModdleProperties', {
  14095. element,
  14096. moddleElement: businessObject,
  14097. properties: {
  14098. 'camunda:followUpDate': value
  14099. }
  14100. });
  14101. };
  14102. return propertiesPanel.TextFieldEntry({
  14103. element,
  14104. id: 'followUpDate',
  14105. label: translate('Follow up date'),
  14106. description: translate('The follow up date as an EL expression (e.g. ${someDate}) or an ' + 'ISO date (e.g. 2015-06-26T09:54:00).'),
  14107. getValue,
  14108. setValue,
  14109. debounce
  14110. });
  14111. }
  14112. function Priority(props) {
  14113. const {
  14114. element
  14115. } = props;
  14116. const commandStack = useService('commandStack');
  14117. const translate = useService('translate');
  14118. const debounce = useService('debounceInput');
  14119. const businessObject = ModelUtil.getBusinessObject(element);
  14120. const getValue = () => {
  14121. return businessObject.get('camunda:priority');
  14122. };
  14123. const setValue = value => {
  14124. commandStack.execute('element.updateModdleProperties', {
  14125. element,
  14126. moddleElement: businessObject,
  14127. properties: {
  14128. 'camunda:priority': value
  14129. }
  14130. });
  14131. };
  14132. return propertiesPanel.TextFieldEntry({
  14133. element,
  14134. id: 'priority',
  14135. label: translate('Priority'),
  14136. getValue,
  14137. setValue,
  14138. debounce
  14139. });
  14140. }
  14141. function VersionTagProps(props) {
  14142. const {
  14143. element
  14144. } = props;
  14145. const businessObject = ModelUtil.getBusinessObject(element);
  14146. if (!ModelUtil.is(element, 'bpmn:Process') && !(ModelUtil.is(element, 'bpmn:Participant') && businessObject.get('processRef'))) {
  14147. return [];
  14148. }
  14149. return [{
  14150. id: 'versionTag',
  14151. component: VersionTag,
  14152. isEdited: propertiesPanel.isTextFieldEntryEdited
  14153. }];
  14154. }
  14155. function VersionTag(props) {
  14156. const {
  14157. element
  14158. } = props;
  14159. const commandStack = useService('commandStack');
  14160. const translate = useService('translate');
  14161. const debounce = useService('debounceInput');
  14162. const process = getProcess(element);
  14163. const getValue = () => {
  14164. return process.get('camunda:versionTag') || '';
  14165. };
  14166. const setValue = value => {
  14167. commandStack.execute('element.updateModdleProperties', {
  14168. element,
  14169. moddleElement: process,
  14170. properties: {
  14171. 'camunda:versionTag': value
  14172. }
  14173. });
  14174. };
  14175. return propertiesPanel.TextFieldEntry({
  14176. element,
  14177. id: 'versionTag',
  14178. label: translate('Version tag'),
  14179. getValue,
  14180. setValue,
  14181. debounce
  14182. });
  14183. } // helper //////////////////
  14184. function getProcess(element) {
  14185. return ModelUtil.is(element, 'bpmn:Process') ? ModelUtil.getBusinessObject(element) : ModelUtil.getBusinessObject(element).get('processRef');
  14186. }
  14187. const LOW_PRIORITY = 500;
  14188. const CAMUNDA_PLATFORM_GROUPS = [HistoryCleanupGroup, TasklistGroup, CandidateStarterGroup, ImplementationGroup, ExternalTaskGroup, ProcessVariablesGroup, ErrorsGroup, UserAssignmentGroup, FormGroup, FormDataGroup, TaskListenerGroup, StartInitiatorGroup, ScriptGroup, ConditionGroup, CallActivityGroup, AsynchronousContinuationsGroup, JobExecutionGroup, InMappingPropagationGroup, InMappingGroup, InputGroup, ConnectorInputGroup, OutMappingPropagationGroup, OutMappingGroup, OutputGroup, ConnectorOutputGroup, ExecutionListenerGroup, ExtensionPropertiesGroup, FieldInjectionGroup, BusinessKeyGroup];
  14189. /**
  14190. * Provides `camunda` namespace properties.
  14191. *
  14192. * @example
  14193. * ```javascript
  14194. * import BpmnModeler from 'bpmn-js/lib/Modeler';
  14195. * import {
  14196. * BpmnPropertiesPanelModule,
  14197. * BpmnPropertiesProviderModule,
  14198. * CamundaPlatformPropertiesProviderModule
  14199. * } from 'bpmn-js-properties-panel';
  14200. *
  14201. * const modeler = new BpmnModeler({
  14202. * container: '#canvas',
  14203. * propertiesPanel: {
  14204. * parent: '#properties'
  14205. * },
  14206. * additionalModules: [
  14207. * BpmnPropertiesPanelModule,
  14208. * BpmnPropertiesProviderModule,
  14209. * CamundaPlatformPropertiesProviderModule
  14210. * ]
  14211. * });
  14212. * ```
  14213. */
  14214. class CamundaPlatformPropertiesProvider {
  14215. constructor(propertiesPanel, injector) {
  14216. propertiesPanel.registerProvider(LOW_PRIORITY, this);
  14217. this._injector = injector;
  14218. }
  14219. getGroups(element) {
  14220. return groups => {
  14221. // (1) add Camunda Platform specific groups
  14222. groups = groups.concat(this._getGroups(element)); // (2) update existing groups with Camunda Platform specific properties
  14223. updateGeneralGroup(groups, element);
  14224. updateErrorGroup(groups, element);
  14225. updateEscalationGroup(groups, element);
  14226. updateMultiInstanceGroup(groups, element); // (3) move groups given specific priorities
  14227. moveImplementationGroup(groups);
  14228. return groups;
  14229. };
  14230. }
  14231. _getGroups(element) {
  14232. const groups = CAMUNDA_PLATFORM_GROUPS.map(createGroup => createGroup(element, this._injector)); // contract: if a group returns null, it should not be displayed at all
  14233. return groups.filter(group => group !== null);
  14234. }
  14235. }
  14236. CamundaPlatformPropertiesProvider.$inject = ['propertiesPanel', 'injector'];
  14237. /**
  14238. * This ensures the <Implementation> group always locates after <Documentation>
  14239. */
  14240. function moveImplementationGroup(groups) {
  14241. const documentationGroupIdx = findGroupIndex(groups, 'documentation');
  14242. if (documentationGroupIdx < 0) {
  14243. return;
  14244. }
  14245. return moveGroup(groups, 'CamundaPlatform__Implementation', documentationGroupIdx + 1);
  14246. }
  14247. function updateGeneralGroup(groups, element) {
  14248. const generalGroup = findGroup(groups, 'general');
  14249. if (!generalGroup) {
  14250. return;
  14251. }
  14252. const {
  14253. entries
  14254. } = generalGroup; // (1) add version tag before executable (if existing)
  14255. const executableEntry = minDash.findIndex(entries, entry => entry.id === 'isExecutable');
  14256. const insertIndex = executableEntry >= 0 ? executableEntry : entries.length;
  14257. entries.splice(insertIndex, 0, ...VersionTagProps({
  14258. element
  14259. }));
  14260. }
  14261. function updateErrorGroup(groups, element) {
  14262. const errorGroup = findGroup(groups, 'error');
  14263. if (!errorGroup) {
  14264. return;
  14265. }
  14266. const {
  14267. entries
  14268. } = errorGroup;
  14269. ErrorProps({
  14270. element,
  14271. entries
  14272. });
  14273. }
  14274. function updateMultiInstanceGroup(groups, element) {
  14275. const multiInstanceGroup = findGroup(groups, 'multiInstance');
  14276. if (!multiInstanceGroup) {
  14277. return;
  14278. }
  14279. const {
  14280. entries
  14281. } = multiInstanceGroup;
  14282. MultiInstanceProps({
  14283. element,
  14284. entries
  14285. });
  14286. }
  14287. function updateEscalationGroup(groups, element) {
  14288. const escalationGroup = findGroup(groups, 'escalation');
  14289. if (!escalationGroup) {
  14290. return;
  14291. }
  14292. const {
  14293. entries
  14294. } = escalationGroup;
  14295. EscalationProps({
  14296. element,
  14297. entries
  14298. });
  14299. }
  14300. function ImplementationGroup(element) {
  14301. const group = {
  14302. label: 'Implementation',
  14303. id: 'CamundaPlatform__Implementation',
  14304. component: propertiesPanel.Group,
  14305. entries: [...ImplementationProps({
  14306. element
  14307. })]
  14308. };
  14309. if (group.entries.length) {
  14310. return group;
  14311. }
  14312. return null;
  14313. }
  14314. function ErrorsGroup(element, injector) {
  14315. const group = {
  14316. label: 'Errors',
  14317. id: 'CamundaPlatform__Errors',
  14318. component: propertiesPanel.ListGroup,
  14319. ...ErrorsProps({
  14320. element,
  14321. injector
  14322. })
  14323. };
  14324. if (group.items) {
  14325. return group;
  14326. }
  14327. return null;
  14328. }
  14329. function UserAssignmentGroup(element) {
  14330. const group = {
  14331. label: 'User assignment',
  14332. id: 'CamundaPlatform__UserAssignment',
  14333. component: propertiesPanel.Group,
  14334. entries: [...UserAssignmentProps({
  14335. element
  14336. })]
  14337. };
  14338. if (group.entries.length) {
  14339. return group;
  14340. }
  14341. return null;
  14342. }
  14343. function ScriptGroup(element) {
  14344. const group = {
  14345. label: 'Script',
  14346. id: 'CamundaPlatform__Script',
  14347. component: propertiesPanel.Group,
  14348. entries: [...ScriptTaskProps({
  14349. element
  14350. })]
  14351. };
  14352. if (group.entries.length) {
  14353. return group;
  14354. }
  14355. return null;
  14356. }
  14357. function CallActivityGroup(element) {
  14358. const group = {
  14359. label: 'Called element',
  14360. id: 'CamundaPlatform__CallActivity',
  14361. component: propertiesPanel.Group,
  14362. entries: [...CallActivityProps({
  14363. element
  14364. })]
  14365. };
  14366. if (group.entries.length) {
  14367. return group;
  14368. }
  14369. return null;
  14370. }
  14371. function ConditionGroup(element) {
  14372. const group = {
  14373. label: 'Condition',
  14374. id: 'CamundaPlatform__Condition',
  14375. component: propertiesPanel.Group,
  14376. entries: [...ConditionProps({
  14377. element
  14378. })]
  14379. };
  14380. if (group.entries.length) {
  14381. return group;
  14382. }
  14383. return null;
  14384. }
  14385. function StartInitiatorGroup(element) {
  14386. const group = {
  14387. label: 'Start initiator',
  14388. id: 'CamundaPlatform__StartInitiator',
  14389. component: propertiesPanel.Group,
  14390. entries: [...InitiatorProps({
  14391. element
  14392. })]
  14393. };
  14394. if (group.entries.length) {
  14395. return group;
  14396. }
  14397. return null;
  14398. }
  14399. function ExternalTaskGroup(element) {
  14400. const group = {
  14401. label: 'External task',
  14402. id: 'CamundaPlatform__ExternalTask',
  14403. component: propertiesPanel.Group,
  14404. entries: [...ExternalTaskPriorityProps({
  14405. element
  14406. })]
  14407. };
  14408. if (group.entries.length) {
  14409. return group;
  14410. }
  14411. return null;
  14412. }
  14413. function AsynchronousContinuationsGroup(element) {
  14414. const group = {
  14415. label: 'Asynchronous continuations',
  14416. id: 'CamundaPlatform__AsynchronousContinuations',
  14417. component: propertiesPanel.Group,
  14418. entries: [...AsynchronousContinuationsProps({
  14419. element
  14420. })]
  14421. };
  14422. if (group.entries.length) {
  14423. return group;
  14424. }
  14425. return null;
  14426. }
  14427. function JobExecutionGroup(element) {
  14428. const group = {
  14429. label: 'Job execution',
  14430. id: 'CamundaPlatform__JobExecution',
  14431. component: propertiesPanel.Group,
  14432. entries: [...JobExecutionProps({
  14433. element
  14434. })]
  14435. };
  14436. if (group.entries.length) {
  14437. return group;
  14438. }
  14439. return null;
  14440. }
  14441. function CandidateStarterGroup(element) {
  14442. const group = {
  14443. label: 'Candidate starter',
  14444. id: 'CamundaPlatform__CandidateStarter',
  14445. component: propertiesPanel.Group,
  14446. entries: [...CandidateStarterProps({
  14447. element
  14448. })]
  14449. };
  14450. if (group.entries.length) {
  14451. return group;
  14452. }
  14453. return null;
  14454. }
  14455. function FieldInjectionGroup(element, injector) {
  14456. const group = {
  14457. label: 'Field injections',
  14458. id: 'CamundaPlatform__FieldInjection',
  14459. component: propertiesPanel.ListGroup,
  14460. ...FieldInjectionProps({
  14461. element,
  14462. injector
  14463. })
  14464. };
  14465. if (group.items) {
  14466. return group;
  14467. }
  14468. return null;
  14469. }
  14470. function HistoryCleanupGroup(element) {
  14471. const group = {
  14472. label: 'History cleanup',
  14473. id: 'CamundaPlatform__HistoryCleanup',
  14474. component: propertiesPanel.Group,
  14475. entries: [...HistoryCleanupProps({
  14476. element
  14477. })]
  14478. };
  14479. if (group.entries.length) {
  14480. return group;
  14481. }
  14482. return null;
  14483. }
  14484. function TasklistGroup(element) {
  14485. const group = {
  14486. label: 'Tasklist',
  14487. id: 'CamundaPlatform__Tasklist',
  14488. component: propertiesPanel.Group,
  14489. entries: [...TasklistProps({
  14490. element
  14491. })]
  14492. };
  14493. if (group.entries.length) {
  14494. return group;
  14495. }
  14496. return null;
  14497. }
  14498. function InMappingGroup(element, injector) {
  14499. const group = {
  14500. label: 'In mappings',
  14501. id: 'CamundaPlatform__InMapping',
  14502. component: propertiesPanel.ListGroup,
  14503. ...InMappingProps({
  14504. element,
  14505. injector
  14506. })
  14507. };
  14508. if (group.items) {
  14509. return group;
  14510. }
  14511. return null;
  14512. }
  14513. function InMappingPropagationGroup(element) {
  14514. const group = {
  14515. label: 'In mapping propagation',
  14516. id: 'CamundaPlatform__InMappingPropagation',
  14517. component: propertiesPanel.Group,
  14518. entries: [...InMappingPropagationProps({
  14519. element
  14520. })]
  14521. };
  14522. if (group.entries.length) {
  14523. return group;
  14524. }
  14525. return null;
  14526. }
  14527. function OutMappingGroup(element, injector) {
  14528. const group = {
  14529. label: 'Out mappings',
  14530. id: 'CamundaPlatform__OutMapping',
  14531. component: propertiesPanel.ListGroup,
  14532. ...OutMappingProps({
  14533. element,
  14534. injector
  14535. })
  14536. };
  14537. if (group.items) {
  14538. return group;
  14539. }
  14540. return null;
  14541. }
  14542. function OutMappingPropagationGroup(element) {
  14543. const group = {
  14544. label: 'Out mapping propagation',
  14545. id: 'CamundaPlatform__OutMappingPropagation',
  14546. component: propertiesPanel.Group,
  14547. entries: [...OutMappingPropagationProps({
  14548. element
  14549. })]
  14550. };
  14551. if (group.entries.length) {
  14552. return group;
  14553. }
  14554. return null;
  14555. }
  14556. function ProcessVariablesGroup(element, injector) {
  14557. const group = {
  14558. label: 'Process variables',
  14559. id: 'CamundaPlatform__ProcessVariables',
  14560. component: propertiesPanel.ListGroup,
  14561. ...ProcessVariablesProps({
  14562. element,
  14563. injector
  14564. })
  14565. };
  14566. if (group.items) {
  14567. return group;
  14568. }
  14569. return null;
  14570. }
  14571. function FormDataGroup(element, injector) {
  14572. const group = {
  14573. label: 'Form fields',
  14574. id: 'CamundaPlatform__FormData',
  14575. component: propertiesPanel.ListGroup,
  14576. ...FormDataProps({
  14577. element,
  14578. injector
  14579. })
  14580. };
  14581. if (group.items) {
  14582. return group;
  14583. }
  14584. return null;
  14585. }
  14586. function BusinessKeyGroup(element) {
  14587. const group = {
  14588. label: 'Business key',
  14589. id: 'CamundaPlatform__BusinessKey',
  14590. component: propertiesPanel.Group,
  14591. entries: [...BusinessKeyProps$1({
  14592. element
  14593. })]
  14594. };
  14595. if (group.entries.length) {
  14596. return group;
  14597. }
  14598. return null;
  14599. }
  14600. function FormGroup(element) {
  14601. const group = {
  14602. label: 'Forms',
  14603. id: 'CamundaPlatform__Form',
  14604. component: propertiesPanel.Group,
  14605. entries: [...FormProps({
  14606. element
  14607. })]
  14608. };
  14609. if (group.entries.length) {
  14610. return group;
  14611. }
  14612. return null;
  14613. }
  14614. function ExecutionListenerGroup(element, injector) {
  14615. const group = {
  14616. label: 'Execution listeners',
  14617. id: 'CamundaPlatform__ExecutionListener',
  14618. component: propertiesPanel.ListGroup,
  14619. ...ExecutionListenerProps({
  14620. element,
  14621. injector
  14622. })
  14623. };
  14624. if (group.items) {
  14625. return group;
  14626. }
  14627. return null;
  14628. }
  14629. function TaskListenerGroup(element, injector) {
  14630. const group = {
  14631. label: 'Task listeners',
  14632. id: 'CamundaPlatform__TaskListener',
  14633. component: propertiesPanel.ListGroup,
  14634. ...TaskListenerProps({
  14635. element,
  14636. injector
  14637. })
  14638. };
  14639. if (group.items) {
  14640. return group;
  14641. }
  14642. return null;
  14643. }
  14644. function InputGroup(element, injector) {
  14645. const group = {
  14646. label: 'Inputs',
  14647. id: 'CamundaPlatform__Input',
  14648. component: propertiesPanel.ListGroup,
  14649. ...InputProps({
  14650. element,
  14651. injector
  14652. })
  14653. };
  14654. if (group.items) {
  14655. return group;
  14656. }
  14657. return null;
  14658. }
  14659. function OutputGroup(element, injector) {
  14660. const group = {
  14661. label: 'Outputs',
  14662. id: 'CamundaPlatform__Output',
  14663. component: propertiesPanel.ListGroup,
  14664. ...OutputProps({
  14665. element,
  14666. injector
  14667. })
  14668. };
  14669. if (group.items) {
  14670. return group;
  14671. }
  14672. return null;
  14673. }
  14674. function ConnectorInputGroup(element, injector) {
  14675. const group = {
  14676. label: 'Connector inputs',
  14677. id: 'CamundaPlatform__ConnectorInput',
  14678. component: propertiesPanel.ListGroup,
  14679. ...ConnectorInputProps({
  14680. element,
  14681. injector
  14682. })
  14683. };
  14684. if (group.items) {
  14685. return group;
  14686. }
  14687. return null;
  14688. }
  14689. function ConnectorOutputGroup(element, injector) {
  14690. const group = {
  14691. label: 'Connector outputs',
  14692. id: 'CamundaPlatform__ConnectorOutput',
  14693. component: propertiesPanel.ListGroup,
  14694. ...ConnectorOutputProps({
  14695. element,
  14696. injector
  14697. })
  14698. };
  14699. if (group.items) {
  14700. return group;
  14701. }
  14702. return null;
  14703. }
  14704. function ExtensionPropertiesGroup(element, injector) {
  14705. const group = {
  14706. label: 'Extension properties',
  14707. id: 'CamundaPlatform__ExtensionProperties',
  14708. component: propertiesPanel.ListGroup,
  14709. ...ExtensionPropertiesProps({
  14710. element,
  14711. injector
  14712. })
  14713. };
  14714. if (group.items) {
  14715. return group;
  14716. }
  14717. return null;
  14718. } // helper /////////////////////
  14719. function findGroup(groups, id) {
  14720. return groups.find(g => g.id === id);
  14721. }
  14722. function findGroupIndex(groups, id) {
  14723. return minDash.findIndex(groups, g => g.id === id);
  14724. }
  14725. function moveGroup(groups, id, position) {
  14726. const groupIndex = findGroupIndex(groups, id);
  14727. if (position < 0 || groupIndex < 0) {
  14728. return;
  14729. }
  14730. return arrayMove.mutate(groups, groupIndex, position);
  14731. }
  14732. var camundaPlatformPropertiesProviderModule = {
  14733. __init__: ['camundaPlatformPropertiesProvider'],
  14734. camundaPlatformPropertiesProvider: ['type', CamundaPlatformPropertiesProvider]
  14735. };
  14736. const PROPERTY_TYPE$1 = 'property';
  14737. const ZEBBE_INPUT_TYPE = 'zeebe:input';
  14738. const ZEEBE_OUTPUT_TYPE = 'zeebe:output';
  14739. const ZEEBE_TASK_DEFINITION_TYPE_TYPE = 'zeebe:taskDefinition:type';
  14740. const ZEEBE_TASK_HEADER_TYPE = 'zeebe:taskHeader';
  14741. const EXTENSION_BINDING_TYPES$1 = [ZEBBE_INPUT_TYPE, ZEEBE_OUTPUT_TYPE, ZEEBE_TASK_DEFINITION_TYPE_TYPE, ZEEBE_TASK_HEADER_TYPE];
  14742. const TASK_DEFINITION_TYPES = [ZEEBE_TASK_DEFINITION_TYPE_TYPE];
  14743. const IO_BINDING_TYPES$1 = [ZEBBE_INPUT_TYPE, ZEEBE_OUTPUT_TYPE];
  14744. /**
  14745. * The BPMN 2.0 extension attribute name under
  14746. * which the element template ID is stored.
  14747. *
  14748. * @type {String}
  14749. */
  14750. const TEMPLATE_ID_ATTR$1 = 'zeebe:modelerTemplate';
  14751. /**
  14752. * The BPMN 2.0 extension attribute name under
  14753. * which the element template version is stored.
  14754. *
  14755. * @type {String}
  14756. */
  14757. const TEMPLATE_VERSION_ATTR$1 = 'zeebe:modelerTemplateVersion';
  14758. /**
  14759. * Get template id for a given diagram element.
  14760. *
  14761. * @param {djs.model.Base} element
  14762. *
  14763. * @return {String}
  14764. */
  14765. function getTemplateId$1(element) {
  14766. const businessObject = ModelUtil.getBusinessObject(element);
  14767. if (businessObject) {
  14768. return businessObject.get(TEMPLATE_ID_ATTR$1);
  14769. }
  14770. }
  14771. /**
  14772. * Get template version for a given diagram element.
  14773. *
  14774. * @param {djs.model.Base} element
  14775. *
  14776. * @return {String}
  14777. */
  14778. function getTemplateVersion$1(element) {
  14779. const businessObject = ModelUtil.getBusinessObject(element);
  14780. if (businessObject) {
  14781. return businessObject.get(TEMPLATE_VERSION_ATTR$1);
  14782. }
  14783. }
  14784. /**
  14785. * Find extension with given type in
  14786. * BPMN element, diagram element or ExtensionElement.
  14787. *
  14788. * @param {ModdleElement|djs.model.Base} element
  14789. * @param {String} type
  14790. *
  14791. * @return {ModdleElement} the extension
  14792. */
  14793. function findExtension$1(element, type) {
  14794. const businessObject = ModelUtil.getBusinessObject(element);
  14795. let extensionElements;
  14796. if (ModelUtil.is(businessObject, 'bpmn:ExtensionElements')) {
  14797. extensionElements = businessObject;
  14798. } else {
  14799. extensionElements = businessObject.get('extensionElements');
  14800. }
  14801. if (!extensionElements) {
  14802. return null;
  14803. }
  14804. return extensionElements.get('values').find(value => {
  14805. return ModelUtil.is(value, type);
  14806. });
  14807. }
  14808. function findInputParameter$1(ioMapping, binding) {
  14809. const parameters = ioMapping.get('inputParameters');
  14810. return parameters.find(parameter => {
  14811. return parameter.target === binding.name;
  14812. });
  14813. }
  14814. function findOutputParameter$1(ioMapping, binding) {
  14815. const parameters = ioMapping.get('outputParameters');
  14816. return parameters.find(parameter => {
  14817. return parameter.source === binding.source;
  14818. });
  14819. }
  14820. function findTaskHeader(taskHeaders, binding) {
  14821. const headers = taskHeaders.get('values');
  14822. return headers.find(header => {
  14823. return header.key === binding.key;
  14824. });
  14825. }
  14826. /**
  14827. * Create an input parameter representing the given
  14828. * binding and value.
  14829. *
  14830. * @param {PropertyBinding} binding
  14831. * @param {String} value
  14832. * @param {BpmnFactory} bpmnFactory
  14833. *
  14834. * @return {ModdleElement}
  14835. */
  14836. function createInputParameter$1(binding, value, bpmnFactory) {
  14837. const {
  14838. name
  14839. } = binding;
  14840. return bpmnFactory.create('zeebe:Input', {
  14841. source: value,
  14842. target: name
  14843. });
  14844. }
  14845. /**
  14846. * Create an output parameter representing the given
  14847. * binding and value.
  14848. *
  14849. * @param {PropertyBinding} binding
  14850. * @param {String} value
  14851. * @param {BpmnFactory} bpmnFactory
  14852. *
  14853. * @return {ModdleElement}
  14854. */
  14855. function createOutputParameter$1(binding, value, bpmnFactory) {
  14856. const {
  14857. source
  14858. } = binding;
  14859. return bpmnFactory.create('zeebe:Output', {
  14860. source,
  14861. target: value
  14862. });
  14863. }
  14864. /**
  14865. * Create a task header representing the given
  14866. * binding and value.
  14867. *
  14868. * @param {PropertyBinding} binding
  14869. * @param {String} value
  14870. * @param {BpmnFactory} bpmnFactory
  14871. *
  14872. * @return {ModdleElement}
  14873. */
  14874. function createTaskHeader(binding, value, bpmnFactory) {
  14875. const {
  14876. key
  14877. } = binding;
  14878. return bpmnFactory.create('zeebe:Header', {
  14879. key,
  14880. value
  14881. });
  14882. }
  14883. /**
  14884. * Create a task definition representing the given value.
  14885. *
  14886. * @param {String} value
  14887. * @param {BpmnFactory} bpmnFactory
  14888. *
  14889. * @return {ModdleElement}
  14890. */
  14891. function createTaskDefinitionWithType(value, bpmnFactory) {
  14892. return bpmnFactory.create('zeebe:TaskDefinition', {
  14893. type: value
  14894. });
  14895. }
  14896. /**
  14897. * Retrieves whether an element should be updated for a given property.
  14898. *
  14899. * That matches once
  14900. * a) the property value is not empty, or
  14901. * b) the property is not optional
  14902. *
  14903. * @param {String} value
  14904. * @param {Object} property
  14905. * @returns {Boolean}
  14906. */
  14907. function shouldUpdate(value, property) {
  14908. const {
  14909. optional
  14910. } = property;
  14911. return value || !optional;
  14912. }
  14913. /**
  14914. * Gets or, in case not existent, creates extension element for given element.
  14915. *
  14916. * @param {djs.model.Base} element
  14917. * @param {String} type
  14918. * @param {BpmnFactory} bpmnFactory
  14919. * @returns {ModdleElement}
  14920. */
  14921. function ensureExtension(element, type, bpmnFactory) {
  14922. const businessObject = ModelUtil.getBusinessObject(element);
  14923. const extensionElements = businessObject.get('extensionElements');
  14924. let extension = findExtension$1(extensionElements, type);
  14925. if (!extension) {
  14926. extension = bpmnFactory.create(type);
  14927. extension.$parent = extensionElements;
  14928. extensionElements.get('values').push(extension);
  14929. }
  14930. return extension;
  14931. }
  14932. const PRIMITIVE_MODDLE_TYPES$1 = ['Boolean', 'Integer', 'String'];
  14933. function getPropertyValue$1(element, property, scope) {
  14934. let businessObject = ModelUtil.getBusinessObject(element);
  14935. const defaultValue = '';
  14936. const {
  14937. binding
  14938. } = property;
  14939. const {
  14940. name,
  14941. type
  14942. } = binding; // property
  14943. if (type === 'property') {
  14944. const value = businessObject.get(name);
  14945. if (!minDash.isUndefined(value)) {
  14946. return value;
  14947. }
  14948. return defaultValue;
  14949. } // zeebe:taskDefinition
  14950. if (TASK_DEFINITION_TYPES.includes(type)) {
  14951. const taskDefinition = findExtension$1(businessObject, 'zeebe:TaskDefinition');
  14952. if (taskDefinition) {
  14953. if (type === ZEEBE_TASK_DEFINITION_TYPE_TYPE) {
  14954. return taskDefinition.get('type');
  14955. }
  14956. }
  14957. return defaultValue;
  14958. }
  14959. if (IO_BINDING_TYPES$1.includes(type)) {
  14960. const ioMapping = findExtension$1(businessObject, 'zeebe:IoMapping');
  14961. if (!ioMapping) {
  14962. return defaultValue;
  14963. } // zeebe:Input
  14964. if (type === ZEBBE_INPUT_TYPE) {
  14965. const inputParameter = findInputParameter$1(ioMapping, binding);
  14966. if (inputParameter) {
  14967. return inputParameter.get('source');
  14968. }
  14969. return defaultValue;
  14970. } // zeebe:Output
  14971. if (type === ZEEBE_OUTPUT_TYPE) {
  14972. const outputParameter = findOutputParameter$1(ioMapping, binding);
  14973. if (outputParameter) {
  14974. return outputParameter.get('target');
  14975. }
  14976. return defaultValue;
  14977. }
  14978. } // zeebe:taskHeaders
  14979. if (type === ZEEBE_TASK_HEADER_TYPE) {
  14980. const taskHeaders = findExtension$1(businessObject, 'zeebe:TaskHeaders');
  14981. if (!taskHeaders) {
  14982. return defaultValue;
  14983. }
  14984. const header = findTaskHeader(taskHeaders, binding);
  14985. if (header) {
  14986. return header.get('value');
  14987. }
  14988. return defaultValue;
  14989. } // should never throw as templates are validated beforehand
  14990. throw unknownBindingError$1(element, property);
  14991. }
  14992. function setPropertyValue(bpmnFactory, commandStack, element, property, value) {
  14993. let businessObject = ModelUtil.getBusinessObject(element);
  14994. const {
  14995. binding
  14996. } = property;
  14997. const {
  14998. name,
  14999. type
  15000. } = binding;
  15001. let extensionElements;
  15002. let propertyValue;
  15003. const commands = [];
  15004. const context = {
  15005. element,
  15006. property
  15007. }; // ensure extension elements
  15008. if (EXTENSION_BINDING_TYPES$1.includes(type)) {
  15009. extensionElements = businessObject.get('extensionElements');
  15010. if (!extensionElements) {
  15011. extensionElements = createElement('bpmn:ExtensionElements', null, businessObject, bpmnFactory);
  15012. commands.push({
  15013. cmd: 'element.updateModdleProperties',
  15014. context: { ...context,
  15015. moddleElement: businessObject,
  15016. properties: {
  15017. extensionElements
  15018. }
  15019. }
  15020. });
  15021. }
  15022. } // property
  15023. if (type === 'property') {
  15024. const propertyDescriptor = businessObject.$descriptor.propertiesByName[name]; // if property not created yet
  15025. if (!propertyDescriptor) {
  15026. propertyValue = value;
  15027. } else {
  15028. const {
  15029. type: propertyType
  15030. } = propertyDescriptor; // do not override non-primitive types
  15031. if (!PRIMITIVE_MODDLE_TYPES$1.includes(propertyType)) {
  15032. throw new Error(`cannot set property of type <${propertyType}>`);
  15033. }
  15034. if (propertyType === 'Boolean') {
  15035. propertyValue = !!value;
  15036. } else if (propertyType === 'Integer') {
  15037. propertyValue = parseInt(value, 10);
  15038. if (isNaN(propertyValue)) {
  15039. // do not set NaN value
  15040. propertyValue = undefined;
  15041. }
  15042. } else {
  15043. // make sure we don't remove the property
  15044. propertyValue = value || '';
  15045. }
  15046. }
  15047. if (!minDash.isUndefined(propertyValue)) {
  15048. commands.push({
  15049. cmd: 'element.updateModdleProperties',
  15050. context: { ...context,
  15051. moddleElement: businessObject,
  15052. properties: {
  15053. [name]: propertyValue
  15054. }
  15055. }
  15056. });
  15057. }
  15058. } // zeebe:taskDefinition
  15059. if (TASK_DEFINITION_TYPES.includes(type)) {
  15060. const oldTaskDefinition = findExtension$1(extensionElements, 'zeebe:TaskDefinition');
  15061. let newTaskDefinition;
  15062. if (type === ZEEBE_TASK_DEFINITION_TYPE_TYPE) {
  15063. newTaskDefinition = createTaskDefinitionWithType(value, bpmnFactory);
  15064. } else {
  15065. return unknownBindingError$1(element, property);
  15066. }
  15067. const values = extensionElements.get('values').filter(value => value !== oldTaskDefinition);
  15068. commands.push({
  15069. cmd: 'element.updateModdleProperties',
  15070. context: { ...context,
  15071. moddleElement: extensionElements,
  15072. properties: {
  15073. values: [...values, newTaskDefinition]
  15074. }
  15075. }
  15076. });
  15077. }
  15078. if (IO_BINDING_TYPES$1.includes(type)) {
  15079. let ioMapping = findExtension$1(extensionElements, 'zeebe:IoMapping');
  15080. if (!ioMapping) {
  15081. ioMapping = createElement('zeebe:IoMapping', null, businessObject, bpmnFactory);
  15082. commands.push({
  15083. cmd: 'element.updateModdleProperties',
  15084. context: { ...context,
  15085. moddleElement: extensionElements,
  15086. properties: {
  15087. values: [...extensionElements.get('values'), ioMapping]
  15088. }
  15089. }
  15090. });
  15091. } // zeebe:Input
  15092. if (type === ZEBBE_INPUT_TYPE) {
  15093. const oldZeebeInputParameter = findInputParameter$1(ioMapping, binding);
  15094. const values = ioMapping.get('inputParameters').filter(value => value !== oldZeebeInputParameter); // do not persist empty parameters when configured as <optional>
  15095. if (shouldUpdate(value, property)) {
  15096. const newZeebeInputParameter = createInputParameter$1(binding, value, bpmnFactory);
  15097. values.push(newZeebeInputParameter);
  15098. }
  15099. commands.push({
  15100. cmd: 'element.updateModdleProperties',
  15101. context: { ...context,
  15102. moddleElement: ioMapping,
  15103. properties: {
  15104. inputParameters: [...values]
  15105. }
  15106. }
  15107. });
  15108. } // zeebe:Output
  15109. if (type === ZEEBE_OUTPUT_TYPE) {
  15110. const oldZeebeOutputParameter = findOutputParameter$1(ioMapping, binding);
  15111. const values = ioMapping.get('outputParameters').filter(value => value !== oldZeebeOutputParameter); // do not persist empty parameters when configured as <optional>
  15112. if (shouldUpdate(value, property)) {
  15113. const newZeebeOutputParameter = createOutputParameter$1(binding, value, bpmnFactory);
  15114. values.push(newZeebeOutputParameter);
  15115. }
  15116. commands.push({
  15117. cmd: 'element.updateModdleProperties',
  15118. context: { ...context,
  15119. moddleElement: ioMapping,
  15120. properties: {
  15121. 'outputParameters': [...values]
  15122. }
  15123. }
  15124. });
  15125. }
  15126. } // zeebe:taskHeaders
  15127. if (type === ZEEBE_TASK_HEADER_TYPE) {
  15128. let taskHeaders = findExtension$1(extensionElements, 'zeebe:TaskHeaders');
  15129. if (!taskHeaders) {
  15130. taskHeaders = createElement('zeebe:TaskHeaders', null, businessObject, bpmnFactory);
  15131. commands.push({
  15132. cmd: 'element.updateModdleProperties',
  15133. context: { ...context,
  15134. moddleElement: extensionElements,
  15135. properties: {
  15136. values: [...extensionElements.get('values'), taskHeaders]
  15137. }
  15138. }
  15139. });
  15140. }
  15141. const oldTaskHeader = findTaskHeader(taskHeaders, binding);
  15142. const newTaskHeader = createTaskHeader(binding, value, bpmnFactory);
  15143. const values = taskHeaders.get('values').filter(value => value !== oldTaskHeader);
  15144. commands.push({
  15145. cmd: 'element.updateModdleProperties',
  15146. context: { ...context,
  15147. moddleElement: taskHeaders,
  15148. properties: {
  15149. values: [...values, newTaskHeader]
  15150. }
  15151. }
  15152. });
  15153. }
  15154. if (commands.length) {
  15155. commandStack.execute('properties-panel.multi-command-executor', commands);
  15156. return;
  15157. } // should never throw as templates are validated beforehand
  15158. throw unknownBindingError$1(element, property);
  15159. }
  15160. function unsetProperty(commandStack, element, property) {
  15161. let businessObject = ModelUtil.getBusinessObject(element);
  15162. const {
  15163. binding
  15164. } = property;
  15165. const {
  15166. type
  15167. } = binding;
  15168. let extensionElements;
  15169. const commands = [];
  15170. const context = {
  15171. element,
  15172. property
  15173. };
  15174. if (EXTENSION_BINDING_TYPES$1.includes(type)) {
  15175. extensionElements = businessObject.get('extensionElements');
  15176. if (!extensionElements) return;
  15177. } // zeebe:taskDefinition
  15178. if (TASK_DEFINITION_TYPES.includes(type)) {
  15179. const oldTaskDefinition = findExtension$1(extensionElements, 'zeebe:TaskDefinition');
  15180. commands.push({
  15181. cmd: 'element.updateModdleProperties',
  15182. context: { ...context,
  15183. moddleElement: extensionElements,
  15184. properties: {
  15185. values: minDash.without(extensionElements.get('values'), oldTaskDefinition)
  15186. }
  15187. }
  15188. });
  15189. } // zeebe:IoMapping
  15190. if (IO_BINDING_TYPES$1.includes(type)) {
  15191. let ioMapping = findExtension$1(extensionElements, 'zeebe:IoMapping');
  15192. if (!ioMapping) return; // zeebe:Input
  15193. if (type === ZEBBE_INPUT_TYPE) {
  15194. const oldZeebeInputParameter = findInputParameter$1(ioMapping, binding);
  15195. const values = ioMapping.get('inputParameters').filter(value => value !== oldZeebeInputParameter);
  15196. if (ioMapping.get('outputParameters').length == 0 && values.length == 0) {
  15197. commands.push({
  15198. cmd: 'element.updateModdleProperties',
  15199. context: { ...context,
  15200. moddleElement: extensionElements,
  15201. properties: {
  15202. values: minDash.without(extensionElements.get('values'), ioMapping)
  15203. }
  15204. }
  15205. });
  15206. } else {
  15207. commands.push({
  15208. cmd: 'element.updateModdleProperties',
  15209. context: { ...context,
  15210. moddleElement: ioMapping,
  15211. properties: {
  15212. inputParameters: [...values]
  15213. }
  15214. }
  15215. });
  15216. }
  15217. } // zeebe:Output
  15218. if (type === ZEEBE_OUTPUT_TYPE) {
  15219. const oldZeebeOutputParameter = findOutputParameter$1(ioMapping, binding);
  15220. const values = ioMapping.get('outputParameters').filter(value => value !== oldZeebeOutputParameter);
  15221. if (ioMapping.get('inputParameters').length == 0 && values.length == 0) {
  15222. commands.push({
  15223. cmd: 'element.updateModdleProperties',
  15224. context: { ...context,
  15225. moddleElement: extensionElements,
  15226. properties: {
  15227. values: minDash.without(extensionElements.get('values'), ioMapping)
  15228. }
  15229. }
  15230. });
  15231. }
  15232. commands.push({
  15233. cmd: 'element.updateModdleProperties',
  15234. context: { ...context,
  15235. moddleElement: ioMapping,
  15236. properties: {
  15237. 'outputParameters': [...values]
  15238. }
  15239. }
  15240. });
  15241. }
  15242. } // zeebe:taskHeaders
  15243. if (type === ZEEBE_TASK_HEADER_TYPE) {
  15244. let taskHeaders = findExtension$1(extensionElements, 'zeebe:TaskHeaders');
  15245. if (!taskHeaders) return;
  15246. const oldTaskHeader = findTaskHeader(taskHeaders, binding);
  15247. const values = taskHeaders.get('values').filter(value => value !== oldTaskHeader);
  15248. if (values.length === 0) {
  15249. commands.push({
  15250. cmd: 'element.updateModdleProperties',
  15251. context: { ...context,
  15252. moddleElement: extensionElements,
  15253. properties: {
  15254. values: minDash.without(extensionElements.get('values'), taskHeaders)
  15255. }
  15256. }
  15257. });
  15258. } else {
  15259. commands.push({
  15260. cmd: 'element.updateModdleProperties',
  15261. context: { ...context,
  15262. moddleElement: taskHeaders,
  15263. properties: {
  15264. values: [...values]
  15265. }
  15266. }
  15267. });
  15268. }
  15269. }
  15270. if (commands.length) {
  15271. commandStack.execute('properties-panel.multi-command-executor', commands);
  15272. return;
  15273. }
  15274. } // helpers
  15275. function unknownBindingError$1(element, property) {
  15276. const businessObject = ModelUtil.getBusinessObject(element);
  15277. const id = businessObject.get('id');
  15278. const {
  15279. binding
  15280. } = property;
  15281. const {
  15282. type
  15283. } = binding;
  15284. return new Error(`unknown binding <${type}> for element <${id}>, this should never happen`);
  15285. }
  15286. /**
  15287. * Based on conditions, remove properties from the template.
  15288. */
  15289. function applyConditions(element, elementTemplate) {
  15290. const {
  15291. properties
  15292. } = elementTemplate;
  15293. const filteredProperties = properties.filter(property => {
  15294. return isConditionMet(element, properties, property);
  15295. });
  15296. return { ...elementTemplate,
  15297. properties: filteredProperties
  15298. };
  15299. }
  15300. function isConditionMet(element, properties, property) {
  15301. const {
  15302. condition
  15303. } = property; // If no condition is defined, return true.
  15304. if (!condition) {
  15305. return true;
  15306. }
  15307. return isSimpleConditionMet(element, properties, condition);
  15308. }
  15309. function isSimpleConditionMet(element, properties, condition) {
  15310. const {
  15311. property,
  15312. equals,
  15313. oneOf
  15314. } = condition;
  15315. const propertyValue = getValue(element, properties, property);
  15316. if (equals) {
  15317. return propertyValue === equals;
  15318. }
  15319. if (oneOf) {
  15320. return oneOf.includes(propertyValue);
  15321. }
  15322. return false;
  15323. }
  15324. function getValue(element, properties, propertyId) {
  15325. const property = properties.find(p => p.id === propertyId);
  15326. if (!property) {
  15327. return;
  15328. }
  15329. return getPropertyValue$1(element, property);
  15330. }
  15331. /**
  15332. * Applies an element template to an element. Sets `zeebe:modelerTemplate` and
  15333. * `zeebe:modelerTemplateVersion`.
  15334. */
  15335. class ChangeElementTemplateHandler$1 {
  15336. constructor(bpmnFactory, bpmnReplace, commandStack, modeling) {
  15337. this._bpmnFactory = bpmnFactory;
  15338. this._bpmnReplace = bpmnReplace;
  15339. this._commandStack = commandStack;
  15340. this._modeling = modeling;
  15341. }
  15342. /**
  15343. * Change an element's template and update its properties as specified in `newTemplate`. Specify
  15344. * `oldTemplate` to update from one template to another. If `newTemplate` isn't specified the
  15345. * `zeebe:modelerTemplate` and `zeebe:modelerTemplateVersion` properties will be removed from
  15346. * the element.
  15347. *
  15348. * @param {Object} context
  15349. * @param {Object} context.element
  15350. * @param {Object} [context.oldTemplate]
  15351. * @param {Object} [context.newTemplate]
  15352. */
  15353. preExecute(context) {
  15354. let newTemplate = context.newTemplate,
  15355. oldTemplate = context.oldTemplate;
  15356. let element = context.element; // update zeebe:modelerTemplate attribute
  15357. this._updateZeebeModelerTemplate(element, newTemplate); // update zeebe:modelerTemplateIcon
  15358. this._updateZeebeModelerTemplateIcon(element, newTemplate);
  15359. if (newTemplate) {
  15360. // do not apply properties that don't meet conditions
  15361. newTemplate = applyConditions(element, newTemplate); // update task type
  15362. element = context.element = this._updateTaskType(element, newTemplate); // update properties
  15363. this._updateProperties(element, oldTemplate, newTemplate); // update zeebe:TaskDefinition
  15364. this._updateZeebeTaskDefinition(element, oldTemplate, newTemplate); // update zeebe:Input and zeebe:Output properties
  15365. this._updateZeebeInputOutputParameterProperties(element, oldTemplate, newTemplate); // update zeebe:Header properties
  15366. this._updateZeebeTaskHeaderProperties(element, oldTemplate, newTemplate);
  15367. }
  15368. }
  15369. _getOrCreateExtensionElements(element) {
  15370. const bpmnFactory = this._bpmnFactory,
  15371. modeling = this._modeling;
  15372. const businessObject = ModelUtil.getBusinessObject(element);
  15373. let extensionElements = businessObject.get('extensionElements');
  15374. if (!extensionElements) {
  15375. extensionElements = bpmnFactory.create('bpmn:ExtensionElements', {
  15376. values: []
  15377. });
  15378. extensionElements.$parent = businessObject;
  15379. modeling.updateProperties(element, {
  15380. extensionElements: extensionElements
  15381. });
  15382. }
  15383. return extensionElements;
  15384. }
  15385. _updateZeebeModelerTemplate(element, newTemplate) {
  15386. const modeling = this._modeling;
  15387. modeling.updateProperties(element, {
  15388. 'zeebe:modelerTemplate': newTemplate && newTemplate.id,
  15389. 'zeebe:modelerTemplateVersion': newTemplate && newTemplate.version
  15390. });
  15391. }
  15392. _updateZeebeModelerTemplateIcon(element, newTemplate) {
  15393. const modeling = this._modeling;
  15394. const icon = newTemplate && newTemplate.icon;
  15395. modeling.updateProperties(element, {
  15396. 'zeebe:modelerTemplateIcon': icon && icon.contents
  15397. });
  15398. }
  15399. _updateProperties(element, oldTemplate, newTemplate) {
  15400. const commandStack = this._commandStack;
  15401. const newProperties = newTemplate.properties.filter(newProperty => {
  15402. const newBinding = newProperty.binding,
  15403. newBindingType = newBinding.type;
  15404. return newBindingType === 'property';
  15405. });
  15406. if (!newProperties.length) {
  15407. return;
  15408. }
  15409. const businessObject = ModelUtil.getBusinessObject(element);
  15410. newProperties.forEach(newProperty => {
  15411. const oldProperty = findOldProperty$1(oldTemplate, newProperty),
  15412. newBinding = newProperty.binding,
  15413. newBindingName = newBinding.name,
  15414. newPropertyValue = newProperty.value,
  15415. changedElement = businessObject;
  15416. let properties = {};
  15417. if (shouldKeepValue(changedElement, oldProperty, newProperty)) {
  15418. return;
  15419. }
  15420. properties[newBindingName] = newPropertyValue;
  15421. commandStack.execute('element.updateModdleProperties', {
  15422. element,
  15423. moddleElement: businessObject,
  15424. properties
  15425. });
  15426. });
  15427. }
  15428. /**
  15429. * Update `zeebe:TaskDefinition` properties of specified business object. This
  15430. * can only exist in `bpmn:ExtensionElements`.
  15431. *
  15432. * @param {djs.model.Base} element
  15433. * @param {Object} oldTemplate
  15434. * @param {Object} newTemplate
  15435. */
  15436. _updateZeebeTaskDefinition(element, oldTemplate, newTemplate) {
  15437. const bpmnFactory = this._bpmnFactory,
  15438. commandStack = this._commandStack;
  15439. const newProperties = newTemplate.properties.filter(newProperty => {
  15440. const newBinding = newProperty.binding,
  15441. newBindingType = newBinding.type;
  15442. return newBindingType === 'zeebe:taskDefinition:type';
  15443. }); // (1) do not override old task definition if no new properties specified
  15444. if (!newProperties.length) {
  15445. return;
  15446. }
  15447. const businessObject = this._getOrCreateExtensionElements(element);
  15448. newProperties.forEach(newProperty => {
  15449. const oldProperty = findOldProperty$1(oldTemplate, newProperty),
  15450. oldBinding = oldProperty && oldProperty.binding,
  15451. oldBindingType = oldBinding && oldBinding.type,
  15452. oldTaskDefinition = findBusinessObject(businessObject, newProperty),
  15453. newPropertyValue = newProperty.value,
  15454. newBinding = newProperty.binding,
  15455. newBindingType = newBinding.type; // (2) update old task definition
  15456. if (oldTaskDefinition) {
  15457. if (!shouldKeepValue(oldTaskDefinition, oldProperty, newProperty)) {
  15458. // TODO(pinussilvestrus): for now we only support <type>
  15459. // this needs to be adjusted once we support more
  15460. let properties = {};
  15461. if (oldBindingType === 'zeebe:taskDefinition:type' || !oldBindingType) {
  15462. properties = {
  15463. type: newPropertyValue
  15464. };
  15465. }
  15466. commandStack.execute('element.updateModdleProperties', {
  15467. element,
  15468. moddleElement: oldTaskDefinition,
  15469. properties
  15470. });
  15471. }
  15472. } // (3) add new task definition
  15473. else {
  15474. let newTaskDefinition; // TODO(pinussilvestrus): for now we only support <type>
  15475. // this needs to be adjusted once we support more
  15476. if (newBindingType === 'zeebe:taskDefinition:type') {
  15477. newTaskDefinition = createTaskDefinitionWithType(newPropertyValue, bpmnFactory);
  15478. }
  15479. commandStack.execute('element.updateModdleProperties', {
  15480. element,
  15481. moddleElement: businessObject,
  15482. properties: {
  15483. values: [...businessObject.get('values'), newTaskDefinition]
  15484. }
  15485. });
  15486. }
  15487. });
  15488. }
  15489. /**
  15490. * Update `zeebe:Input` and `zeebe:Output` properties of specified business
  15491. * object. Both can only exist in `zeebe:ioMapping` which can exist in `bpmn:ExtensionElements`.
  15492. *
  15493. * @param {djs.model.Base} element
  15494. * @param {Object} oldTemplate
  15495. * @param {Object} newTemplate
  15496. */
  15497. _updateZeebeInputOutputParameterProperties(element, oldTemplate, newTemplate) {
  15498. const bpmnFactory = this._bpmnFactory,
  15499. commandStack = this._commandStack;
  15500. const newProperties = newTemplate.properties.filter(newProperty => {
  15501. const newBinding = newProperty.binding,
  15502. newBindingType = newBinding.type;
  15503. return newBindingType === 'zeebe:input' || newBindingType === 'zeebe:output';
  15504. });
  15505. const businessObject = this._getOrCreateExtensionElements(element);
  15506. let ioMapping = findExtension$1(businessObject, 'zeebe:IoMapping'); // (1) remove old mappings if no new specified
  15507. if (!newProperties.length) {
  15508. if (!ioMapping) {
  15509. return;
  15510. }
  15511. commandStack.execute('element.updateModdleProperties', {
  15512. element,
  15513. moddleElement: businessObject,
  15514. properties: {
  15515. values: minDash.without(businessObject.get('values'), ioMapping)
  15516. }
  15517. });
  15518. }
  15519. if (!ioMapping) {
  15520. ioMapping = bpmnFactory.create('zeebe:IoMapping');
  15521. commandStack.execute('element.updateModdleProperties', {
  15522. element,
  15523. moddleElement: businessObject,
  15524. properties: {
  15525. values: [...businessObject.get('values'), ioMapping]
  15526. }
  15527. });
  15528. }
  15529. const oldInputs = ioMapping.get('zeebe:inputParameters') ? ioMapping.get('zeebe:inputParameters').slice() : [];
  15530. const oldOutputs = ioMapping.get('zeebe:outputParameters') ? ioMapping.get('zeebe:outputParameters').slice() : [];
  15531. let propertyName;
  15532. newProperties.forEach(newProperty => {
  15533. const oldProperty = findOldProperty$1(oldTemplate, newProperty),
  15534. inputOrOutput = findBusinessObject(businessObject, newProperty),
  15535. newPropertyValue = newProperty.value,
  15536. newBinding = newProperty.binding,
  15537. newBindingType = newBinding.type;
  15538. let newInputOrOutput, properties; // (2) update old inputs and outputs
  15539. if (inputOrOutput) {
  15540. // (2a) exclude old inputs and outputs from cleanup, unless
  15541. // a) optional and has empty value, and
  15542. // b) not changed
  15543. if (shouldUpdate(newPropertyValue, newProperty) || shouldKeepValue(inputOrOutput, oldProperty, newProperty)) {
  15544. if (ModelUtil.is(inputOrOutput, 'zeebe:Input')) {
  15545. remove$1(oldInputs, inputOrOutput);
  15546. } else {
  15547. remove$1(oldOutputs, inputOrOutput);
  15548. }
  15549. } // (2a) do updates (unless changed)
  15550. if (!shouldKeepValue(inputOrOutput, oldProperty, newProperty)) {
  15551. if (ModelUtil.is(inputOrOutput, 'zeebe:Input')) {
  15552. properties = {
  15553. source: newPropertyValue
  15554. };
  15555. } else {
  15556. properties = {
  15557. target: newPropertyValue
  15558. };
  15559. }
  15560. commandStack.execute('element.updateModdleProperties', {
  15561. element,
  15562. moddleElement: inputOrOutput,
  15563. properties
  15564. });
  15565. }
  15566. } // (3) add new inputs and outputs (unless optional)
  15567. else if (shouldUpdate(newPropertyValue, newProperty)) {
  15568. if (newBindingType === 'zeebe:input') {
  15569. propertyName = 'inputParameters';
  15570. newInputOrOutput = createInputParameter$1(newBinding, newPropertyValue, bpmnFactory);
  15571. } else {
  15572. propertyName = 'outputParameters';
  15573. newInputOrOutput = createOutputParameter$1(newBinding, newPropertyValue, bpmnFactory);
  15574. }
  15575. commandStack.execute('element.updateModdleProperties', {
  15576. element,
  15577. moddleElement: ioMapping,
  15578. properties: {
  15579. [propertyName]: [...ioMapping.get(propertyName), newInputOrOutput]
  15580. }
  15581. });
  15582. }
  15583. }); // (4) remove old inputs and outputs
  15584. if (oldInputs.length) {
  15585. commandStack.execute('element.updateModdleProperties', {
  15586. element,
  15587. moddleElement: ioMapping,
  15588. properties: {
  15589. inputParameters: minDash.without(ioMapping.get('inputParameters'), inputParameter => oldInputs.includes(inputParameter))
  15590. }
  15591. });
  15592. }
  15593. if (oldOutputs.length) {
  15594. commandStack.execute('element.updateModdleProperties', {
  15595. element,
  15596. moddleElement: ioMapping,
  15597. properties: {
  15598. outputParameters: minDash.without(ioMapping.get('outputParameters'), outputParameter => oldOutputs.includes(outputParameter))
  15599. }
  15600. });
  15601. }
  15602. }
  15603. /**
  15604. * Update `zeebe:Header` properties of specified business
  15605. * object. Those can only exist in `zeebe:taskHeaders` which can exist in `bpmn:ExtensionElements`.
  15606. *
  15607. * @param {djs.model.Base} element
  15608. * @param {Object} oldTemplate
  15609. * @param {Object} newTemplate
  15610. */
  15611. _updateZeebeTaskHeaderProperties(element, oldTemplate, newTemplate) {
  15612. const bpmnFactory = this._bpmnFactory,
  15613. commandStack = this._commandStack;
  15614. const newProperties = newTemplate.properties.filter(newProperty => {
  15615. const newBinding = newProperty.binding,
  15616. newBindingType = newBinding.type;
  15617. return newBindingType === 'zeebe:taskHeader';
  15618. });
  15619. const businessObject = this._getOrCreateExtensionElements(element);
  15620. let taskHeaders = findExtension$1(businessObject, 'zeebe:TaskHeaders'); // (1) remove old headers if no new specified
  15621. if (!newProperties.length) {
  15622. if (!taskHeaders) {
  15623. return;
  15624. }
  15625. commandStack.execute('element.updateModdleProperties', {
  15626. element,
  15627. moddleElement: businessObject,
  15628. properties: {
  15629. values: minDash.without(businessObject.get('values'), taskHeaders)
  15630. }
  15631. });
  15632. }
  15633. if (!taskHeaders) {
  15634. taskHeaders = bpmnFactory.create('zeebe:TaskHeaders');
  15635. commandStack.execute('element.updateModdleProperties', {
  15636. element,
  15637. moddleElement: businessObject,
  15638. properties: {
  15639. values: [...businessObject.get('values'), taskHeaders]
  15640. }
  15641. });
  15642. }
  15643. const oldHeaders = taskHeaders.get('zeebe:values') ? taskHeaders.get('zeebe:values').slice() : [];
  15644. newProperties.forEach(newProperty => {
  15645. const oldProperty = findOldProperty$1(oldTemplate, newProperty),
  15646. oldHeader = findBusinessObject(businessObject, newProperty),
  15647. newPropertyValue = newProperty.value,
  15648. newBinding = newProperty.binding; // (2) update old headers
  15649. if (oldHeader) {
  15650. if (!shouldKeepValue(oldHeader, oldProperty, newProperty)) {
  15651. const properties = {
  15652. value: newPropertyValue
  15653. };
  15654. commandStack.execute('element.updateModdleProperties', {
  15655. element,
  15656. moddleElement: oldHeader,
  15657. properties
  15658. });
  15659. }
  15660. remove$1(oldHeaders, oldHeader);
  15661. } // (3) add new headers
  15662. else {
  15663. const newHeader = createTaskHeader(newBinding, newPropertyValue, bpmnFactory);
  15664. commandStack.execute('element.updateModdleProperties', {
  15665. element,
  15666. moddleElement: taskHeaders,
  15667. properties: {
  15668. values: [...taskHeaders.get('values'), newHeader]
  15669. }
  15670. });
  15671. }
  15672. }); // (4) remove old headers
  15673. if (oldHeaders.length) {
  15674. commandStack.execute('element.updateModdleProperties', {
  15675. element,
  15676. moddleElement: taskHeaders,
  15677. properties: {
  15678. values: minDash.without(taskHeaders.get('values'), header => oldHeaders.includes(header))
  15679. }
  15680. });
  15681. }
  15682. }
  15683. /**
  15684. * Replaces the element with the specified elementType
  15685. *
  15686. * @param {djs.model.Base} element
  15687. * @param {Object} newTemplate
  15688. */
  15689. _updateTaskType(element, newTemplate) {
  15690. // determine new task type
  15691. const newType = newTemplate.elementType;
  15692. if (!newType) {
  15693. return element;
  15694. } // don't replace Task that is already the correct type
  15695. if (element.$type === newType.value) {
  15696. return element;
  15697. }
  15698. return this._bpmnReplace.replaceElement(element, {
  15699. type: newType.value
  15700. });
  15701. }
  15702. }
  15703. ChangeElementTemplateHandler$1.$inject = ['bpmnFactory', 'bpmnReplace', 'commandStack', 'modeling']; // helpers //////////
  15704. /**
  15705. * Find business object matching specified property.
  15706. *
  15707. * @param {djs.model.Base|ModdleElement} element
  15708. * @param {Object} property
  15709. *
  15710. * @returns {ModdleElement}
  15711. */
  15712. function findBusinessObject(element, property) {
  15713. const businessObject = ModelUtil.getBusinessObject(element);
  15714. const binding = property.binding,
  15715. bindingType = binding.type;
  15716. if (bindingType === 'zeebe:taskDefinition:type') {
  15717. return findExtension$1(businessObject, 'zeebe:TaskDefinition');
  15718. }
  15719. if (bindingType === 'zeebe:input' || bindingType === 'zeebe:output') {
  15720. const extensionElements = findExtension$1(businessObject, 'zeebe:IoMapping');
  15721. if (!extensionElements) {
  15722. return;
  15723. }
  15724. if (bindingType === 'zeebe:input') {
  15725. return minDash.find(extensionElements.get('zeebe:inputParameters'), function (input) {
  15726. return input.get('zeebe:target') === binding.name;
  15727. });
  15728. } else {
  15729. return minDash.find(extensionElements.get('zeebe:outputParameters'), function (output) {
  15730. return output.get('zeebe:source') === binding.source;
  15731. });
  15732. }
  15733. }
  15734. if (bindingType === 'zeebe:taskHeader') {
  15735. const extensionElements = findExtension$1(businessObject, 'zeebe:TaskHeaders');
  15736. if (!extensionElements) {
  15737. return;
  15738. }
  15739. return minDash.find(extensionElements.get('zeebe:values'), function (value) {
  15740. return value.get('zeebe:key') === binding.key;
  15741. });
  15742. }
  15743. }
  15744. /**
  15745. * Find old property matching specified new property.
  15746. *
  15747. * @param {Object} oldTemplate
  15748. * @param {Object} newProperty
  15749. *
  15750. * @returns {Object}
  15751. */
  15752. function findOldProperty$1(oldTemplate, newProperty) {
  15753. if (!oldTemplate) {
  15754. return;
  15755. }
  15756. const oldProperties = oldTemplate.properties,
  15757. newBinding = newProperty.binding,
  15758. newBindingName = newBinding.name,
  15759. newBindingType = newBinding.type;
  15760. if (newBindingType === 'property') {
  15761. return minDash.find(oldProperties, function (oldProperty) {
  15762. const oldBinding = oldProperty.binding,
  15763. oldBindingName = oldBinding.name,
  15764. oldBindingType = oldBinding.type;
  15765. return oldBindingType === 'property' && oldBindingName === newBindingName;
  15766. });
  15767. }
  15768. if (newBindingType === 'zeebe:taskDefinition:type') {
  15769. return minDash.find(oldProperties, function (oldProperty) {
  15770. const oldBinding = oldProperty.binding,
  15771. oldBindingType = oldBinding.type;
  15772. return oldBindingType === 'zeebe:taskDefinition:type';
  15773. });
  15774. }
  15775. if (newBindingType === 'zeebe:input') {
  15776. return minDash.find(oldProperties, function (oldProperty) {
  15777. const oldBinding = oldProperty.binding,
  15778. oldBindingName = oldBinding.name,
  15779. oldBindingType = oldBinding.type;
  15780. if (oldBindingType !== 'zeebe:input') {
  15781. return;
  15782. }
  15783. return oldBindingName === newBindingName;
  15784. });
  15785. }
  15786. if (newBindingType === 'zeebe:output') {
  15787. return minDash.find(oldProperties, function (oldProperty) {
  15788. const oldBinding = oldProperty.binding,
  15789. oldBindingType = oldBinding.type;
  15790. if (oldBindingType !== 'zeebe:output') {
  15791. return;
  15792. }
  15793. return oldBinding.source === newBinding.source;
  15794. });
  15795. }
  15796. if (newBindingType === 'zeebe:taskHeader') {
  15797. return minDash.find(oldProperties, function (oldProperty) {
  15798. const oldBinding = oldProperty.binding,
  15799. oldBindingType = oldBinding.type;
  15800. if (oldBindingType !== 'zeebe:taskHeader') {
  15801. return;
  15802. }
  15803. return oldBinding.key === newBinding.key;
  15804. });
  15805. }
  15806. }
  15807. /**
  15808. * Check whether the existing property should be keept. This is the case if
  15809. * - an old template was set and the value differs from the default
  15810. * - no template was set but the property was set manually
  15811. *
  15812. * @param {djs.model.Base|ModdleElement} element
  15813. * @param {Object} oldProperty
  15814. * @param {Object} newProperty
  15815. *
  15816. * @returns {boolean}
  15817. */
  15818. function shouldKeepValue(element, oldProperty, newProperty) {
  15819. if (newProperty.type === 'Hidden') {
  15820. return false;
  15821. }
  15822. if (oldProperty) {
  15823. return propertyChanged$1(element, oldProperty);
  15824. } else {
  15825. return !!getPropertyValue(element, newProperty);
  15826. }
  15827. }
  15828. /**
  15829. * Check whether property was changed after being set by template.
  15830. *
  15831. * @param {djs.model.Base|ModdleElement} element
  15832. * @param {Object} oldProperty
  15833. *
  15834. * @returns {boolean}
  15835. */
  15836. function propertyChanged$1(element, oldProperty) {
  15837. const oldPropertyValue = oldProperty.value;
  15838. return getPropertyValue(element, oldProperty) !== oldPropertyValue;
  15839. }
  15840. function getPropertyValue(element, property) {
  15841. const businessObject = ModelUtil.getBusinessObject(element);
  15842. const binding = property.binding,
  15843. bindingName = binding.name,
  15844. bindingType = binding.type;
  15845. if (bindingType === 'property') {
  15846. return businessObject.get(bindingName);
  15847. }
  15848. if (bindingType === 'zeebe:taskDefinition:type') {
  15849. return businessObject.get('zeebe:type');
  15850. }
  15851. if (bindingType === 'zeebe:input') {
  15852. return businessObject.get('zeebe:source');
  15853. }
  15854. if (bindingType === 'zeebe:output') {
  15855. return businessObject.get('zeebe:target');
  15856. }
  15857. if (bindingType === 'zeebe:taskHeader') {
  15858. return businessObject.get('zeebe:value');
  15859. }
  15860. }
  15861. function remove$1(array, item) {
  15862. const index = array.indexOf(item);
  15863. if (minDash.isUndefined(index)) {
  15864. return array;
  15865. }
  15866. array.splice(index, 1);
  15867. return array;
  15868. }
  15869. /**
  15870. * Checks the conditions of an element template and sets/resets the
  15871. * corresponding properties on the element.
  15872. */
  15873. class ElementTemplatesConditionChecker extends CommandInterceptor__default["default"] {
  15874. constructor(eventBus, elementTemplates, commandStack, bpmnFactory) {
  15875. super(eventBus);
  15876. this._eventBus = eventBus;
  15877. this._elementTemplates = elementTemplates;
  15878. this._commandStack = commandStack;
  15879. this._bpmnFactory = bpmnFactory;
  15880. this.preExecute(['element.updateProperties', 'element.updateModdleProperties'], this._saveConditionalState, true, this);
  15881. this.postExecute(['element.updateProperties', 'element.updateModdleProperties', 'propertiesPanel.zeebe.changeTemplate'], this._applyConditions, true, this);
  15882. }
  15883. _saveConditionalState(context) {
  15884. const {
  15885. element
  15886. } = context;
  15887. const template = this._elementTemplates.get(element);
  15888. if (!template) {
  15889. return;
  15890. }
  15891. context.oldTemplate = applyConditions(element, template);
  15892. }
  15893. _applyConditions(context) {
  15894. const {
  15895. element,
  15896. oldTemplate
  15897. } = context;
  15898. const template = this._elementTemplates.get(element);
  15899. if (!template || !oldTemplate || template.id !== oldTemplate.id) {
  15900. return;
  15901. }
  15902. const newTemplate = applyConditions(element, template);
  15903. const propertiesToAdd = getMissingProperties(oldTemplate, newTemplate);
  15904. const propertiesToRemove = getMissingProperties(newTemplate, oldTemplate);
  15905. propertiesToAdd.forEach(property => setPropertyValue(this._bpmnFactory, this._commandStack, element, property, property.value));
  15906. propertiesToRemove.forEach(property => unsetProperty(this._commandStack, element, property));
  15907. }
  15908. }
  15909. ElementTemplatesConditionChecker.$inject = ['eventBus', 'elementTemplates', 'commandStack', 'bpmnFactory']; // helpers
  15910. function getMissingProperties(sourceTemplate, targetTemplate) {
  15911. let properties = targetTemplate.properties;
  15912. return properties.filter(targetProp => !findOldProperty$1(sourceTemplate, targetProp));
  15913. }
  15914. /**
  15915. * The BPMN 2.0 extension attribute name under
  15916. * which the element template ID is stored.
  15917. *
  15918. * @type {String}
  15919. */
  15920. const TEMPLATE_ID_ATTR = 'camunda:modelerTemplate';
  15921. /**
  15922. * The BPMN 2.0 extension attribute name under
  15923. * which the element template version is stored.
  15924. *
  15925. * @type {String}
  15926. */
  15927. const TEMPLATE_VERSION_ATTR = 'camunda:modelerTemplateVersion';
  15928. /**
  15929. * Get template id for a given diagram element.
  15930. *
  15931. * @param {djs.model.Base} element
  15932. *
  15933. * @return {String}
  15934. */
  15935. function getTemplateId(element) {
  15936. const businessObject = ModelUtil.getBusinessObject(element);
  15937. if (businessObject) {
  15938. return businessObject.get(TEMPLATE_ID_ATTR);
  15939. }
  15940. }
  15941. /**
  15942. * Get template version for a given diagram element.
  15943. *
  15944. * @param {djs.model.Base} element
  15945. *
  15946. * @return {String}
  15947. */
  15948. function getTemplateVersion(element) {
  15949. const businessObject = ModelUtil.getBusinessObject(element);
  15950. if (businessObject) {
  15951. return businessObject.get(TEMPLATE_VERSION_ATTR);
  15952. }
  15953. }
  15954. /**
  15955. * Find extension with given type in
  15956. * BPMN element, diagram element or ExtensionElement.
  15957. *
  15958. * @param {ModdleElement|djs.model.Base} element
  15959. * @param {String} type
  15960. *
  15961. * @return {ModdleElement} the extension
  15962. */
  15963. function findExtension(element, type) {
  15964. const businessObject = ModelUtil.getBusinessObject(element);
  15965. let extensionElements;
  15966. if (ModelUtil.is(businessObject, 'bpmn:ExtensionElements')) {
  15967. extensionElements = businessObject;
  15968. } else {
  15969. extensionElements = businessObject.get('extensionElements');
  15970. }
  15971. if (!extensionElements) {
  15972. return null;
  15973. }
  15974. return extensionElements.get('values').find(value => {
  15975. return ModelUtil.is(value, type);
  15976. });
  15977. }
  15978. function findExtensions(element, types) {
  15979. const extensionElements = getExtensionElements(element);
  15980. if (!extensionElements) {
  15981. return [];
  15982. }
  15983. return extensionElements.get('values').filter(value => {
  15984. return ModelingUtil.isAny(value, types);
  15985. });
  15986. }
  15987. function findCamundaInOut(element, binding) {
  15988. const extensionElements = getExtensionElements(element);
  15989. if (!extensionElements) {
  15990. return;
  15991. }
  15992. const {
  15993. type
  15994. } = binding;
  15995. let matcher;
  15996. if (type === 'camunda:in') {
  15997. matcher = element => {
  15998. return ModelUtil.is(element, 'camunda:In') && isInOut(element, binding);
  15999. };
  16000. } else if (type === 'camunda:out') {
  16001. matcher = element => {
  16002. return ModelUtil.is(element, 'camunda:Out') && isInOut(element, binding);
  16003. };
  16004. } else if (type === 'camunda:in:businessKey') {
  16005. matcher = element => {
  16006. return ModelUtil.is(element, 'camunda:In') && 'businessKey' in element;
  16007. };
  16008. }
  16009. return extensionElements.get('values').find(matcher);
  16010. }
  16011. function findCamundaProperty(camundaProperties, binding) {
  16012. return camundaProperties.get('values').find(value => {
  16013. return value.name === binding.name;
  16014. });
  16015. }
  16016. function findInputParameter(inputOutput, binding) {
  16017. const parameters = inputOutput.get('inputParameters');
  16018. return parameters.find(parameter => {
  16019. return parameter.name === binding.name;
  16020. });
  16021. }
  16022. function findOutputParameter(inputOutput, binding) {
  16023. const parameters = inputOutput.get('outputParameters');
  16024. return parameters.find(function (parameter) {
  16025. const {
  16026. value
  16027. } = parameter;
  16028. if (!binding.scriptFormat) {
  16029. return value === binding.source;
  16030. }
  16031. const definition = parameter.get('camunda:definition');
  16032. if (!definition || binding.scriptFormat !== definition.get('camunda:scriptFormat')) {
  16033. return false;
  16034. }
  16035. return definition.get('camunda:value') === binding.source;
  16036. });
  16037. }
  16038. function findCamundaErrorEventDefinition(element, errorRef) {
  16039. const errorEventDefinitions = findExtensions(element, ['camunda:ErrorEventDefinition']);
  16040. let error; // error ID has to start with <Error_${ errorRef }_>
  16041. return errorEventDefinitions.find(definition => {
  16042. error = definition.get('bpmn:errorRef');
  16043. if (error) {
  16044. return error.get('bpmn:id').startsWith(`Error_${errorRef}`);
  16045. }
  16046. });
  16047. }
  16048. function getExtensionElements(element) {
  16049. const businessObject = ModelUtil.getBusinessObject(element);
  16050. if (ModelUtil.is(businessObject, 'bpmn:ExtensionElements')) {
  16051. return businessObject;
  16052. } else {
  16053. return businessObject.get('extensionElements');
  16054. }
  16055. }
  16056. function isInOut(element, binding) {
  16057. if (binding.type === 'camunda:in') {
  16058. // find based on target attribute
  16059. if (binding.target) {
  16060. return element.target === binding.target;
  16061. }
  16062. }
  16063. if (binding.type === 'camunda:out') {
  16064. // find based on source / sourceExpression
  16065. if (binding.source) {
  16066. return element.source === binding.source;
  16067. }
  16068. if (binding.sourceExpression) {
  16069. return element.sourceExpression === binding.sourceExpression;
  16070. }
  16071. } // find based variables / local combination
  16072. if (binding.variables) {
  16073. return element.variables === 'all' && (binding.variables !== 'local' || element.local);
  16074. }
  16075. }
  16076. /**
  16077. * Registry for element templates.
  16078. */
  16079. class ElementTemplates$1 {
  16080. constructor(commandStack) {
  16081. this._commandStack = commandStack;
  16082. this._templates = {};
  16083. }
  16084. /**
  16085. * Get template with given ID and optional version or for element.
  16086. *
  16087. * @param {String|djs.model.Base} id
  16088. * @param {number} [version]
  16089. *
  16090. * @return {ElementTemplate}
  16091. */
  16092. get(id, version) {
  16093. const templates = this._templates;
  16094. let element;
  16095. if (minDash.isUndefined(id)) {
  16096. return null;
  16097. } else if (minDash.isString(id)) {
  16098. if (minDash.isUndefined(version)) {
  16099. version = '_';
  16100. }
  16101. if (templates[id] && templates[id][version]) {
  16102. return templates[id][version];
  16103. } else {
  16104. return null;
  16105. }
  16106. } else {
  16107. element = id;
  16108. return this.get(this._getTemplateId(element), this._getTemplateVersion(element));
  16109. }
  16110. }
  16111. /**
  16112. * Get default template for given element.
  16113. *
  16114. * @param {djs.model.Base} element
  16115. *
  16116. * @return {ElementTemplate}
  16117. */
  16118. getDefault(element) {
  16119. return minDash.find(this.getAll(element), function (template) {
  16120. return template.isDefault;
  16121. }) || null;
  16122. }
  16123. /**
  16124. * Get all templates (with given ID or applicable to element).
  16125. *
  16126. * @param {String|djs.model.Base} [id]
  16127. * @return {Array<ElementTemplate>}
  16128. */
  16129. getAll(id) {
  16130. return this._getTemplateVerions(id, false);
  16131. }
  16132. /**
  16133. * Get all templates (with given ID or applicable to element) with the latest
  16134. * version.
  16135. *
  16136. * @param {String|djs.model.Base} [id]
  16137. * @return {Array<ElementTemplate>}
  16138. */
  16139. getLatest(id) {
  16140. return this._getTemplateVerions(id, true);
  16141. }
  16142. /**
  16143. * Set templates.
  16144. *
  16145. * @param {Array<ElementTemplate>} templates
  16146. */
  16147. set(templates) {
  16148. this._templates = {};
  16149. templates.forEach(template => {
  16150. const id = template.id,
  16151. version = minDash.isUndefined(template.version) ? '_' : template.version;
  16152. if (!this._templates[id]) {
  16153. this._templates[id] = {
  16154. latest: template
  16155. };
  16156. }
  16157. this._templates[id][version] = template;
  16158. const latestVerions = this._templates[id].latest.version;
  16159. if (minDash.isUndefined(latestVerions) || template.version > latestVerions) {
  16160. this._templates[id].latest = template;
  16161. }
  16162. });
  16163. }
  16164. _getTemplateVerions(id, latestOnly) {
  16165. if (typeof id === 'boolean') {
  16166. latestOnly = id;
  16167. id = undefined;
  16168. }
  16169. const templates = this._templates;
  16170. const getVersions = template => {
  16171. const {
  16172. latest,
  16173. ...versions
  16174. } = template;
  16175. return latestOnly ? [latest] : minDash.values(versions);
  16176. };
  16177. if (minDash.isUndefined(id)) {
  16178. return minDash.flatten(minDash.values(templates).map(getVersions));
  16179. }
  16180. if (minDash.isObject(id)) {
  16181. const element = id;
  16182. return minDash.filter(this._getTemplateVerions(latestOnly), function (template) {
  16183. return ModelingUtil.isAny(element, template.appliesTo);
  16184. }) || [];
  16185. }
  16186. if (minDash.isString(id)) {
  16187. return templates[id] && getVersions(templates[id]);
  16188. }
  16189. throw new Error('argument must be of type {String|djs.model.Base|Undefined}');
  16190. }
  16191. _getTemplateId(element) {
  16192. return getTemplateId(element);
  16193. }
  16194. _getTemplateVersion(element) {
  16195. return getTemplateVersion(element);
  16196. }
  16197. /**
  16198. * Apply element template to a given element.
  16199. *
  16200. * @param {djs.model.Base} element
  16201. * @param {ElementTemplate} newTemplate
  16202. *
  16203. * @return {djs.model.Base} the updated element
  16204. */
  16205. applyTemplate(element, newTemplate) {
  16206. const oldTemplate = this.get(element);
  16207. const context = {
  16208. element,
  16209. newTemplate,
  16210. oldTemplate
  16211. };
  16212. this._commandStack.execute('propertiesPanel.camunda.changeTemplate', context);
  16213. return context.element;
  16214. }
  16215. }
  16216. ElementTemplates$1.$inject = ['commandStack'];
  16217. /**
  16218. * Registry for element templates.
  16219. */
  16220. class ElementTemplates extends ElementTemplates$1 {
  16221. constructor(templateElementFactory, commandStack) {
  16222. super(commandStack);
  16223. this._commandStack = commandStack;
  16224. this._templateElementFactory = templateElementFactory;
  16225. }
  16226. _getTemplateId(element) {
  16227. return getTemplateId$1(element);
  16228. }
  16229. _getTemplateVersion(element) {
  16230. return getTemplateVersion$1(element);
  16231. }
  16232. /**
  16233. * Create an element based on an element template.
  16234. *
  16235. * @param {ElementTemplate} template
  16236. * @returns {djs.model.Base}
  16237. */
  16238. createElement(template) {
  16239. if (!template) {
  16240. throw new Error('template is missing');
  16241. }
  16242. const element = this._templateElementFactory.create(template);
  16243. return element;
  16244. }
  16245. /**
  16246. * Apply element template to a given element.
  16247. *
  16248. * @param {djs.model.Base} element
  16249. * @param {ElementTemplate} newTemplate
  16250. *
  16251. * @return {djs.model.Base} the updated element
  16252. */
  16253. applyTemplate(element, newTemplate) {
  16254. const oldTemplate = this.get(element);
  16255. const context = {
  16256. element,
  16257. newTemplate,
  16258. oldTemplate
  16259. };
  16260. this._commandStack.execute('propertiesPanel.zeebe.changeTemplate', context);
  16261. return context.element;
  16262. }
  16263. }
  16264. ElementTemplates.$inject = ['templateElementFactory', 'commandStack'];
  16265. const SUPPORTED_SCHEMA_VERSION$1 = elementTemplatesValidator.getSchemaVersion();
  16266. const MORPHABLE_TYPES = ['bpmn:Activity', 'bpmn:Event', 'bpmn:Gateway'];
  16267. /**
  16268. * A element template validator.
  16269. */
  16270. class Validator$1 {
  16271. constructor(moddle) {
  16272. this._templatesById = {};
  16273. this._validTemplates = [];
  16274. this._errors = [];
  16275. this._moddle = moddle;
  16276. }
  16277. /**
  16278. * Adds the templates.
  16279. *
  16280. * @param {Array<TemplateDescriptor>} templates
  16281. *
  16282. * @return {Validator}
  16283. */
  16284. addAll(templates) {
  16285. if (!minDash.isArray(templates)) {
  16286. this._logError('templates must be []');
  16287. } else {
  16288. templates.forEach(this.add, this);
  16289. }
  16290. return this;
  16291. }
  16292. /**
  16293. * Add the given element template, if it is valid.
  16294. *
  16295. * @param {TemplateDescriptor} template
  16296. *
  16297. * @return {Validator}
  16298. */
  16299. add(template) {
  16300. const err = this._validateTemplate(template);
  16301. let id, version;
  16302. if (!err) {
  16303. id = template.id;
  16304. version = template.version || '_';
  16305. if (!this._templatesById[id]) {
  16306. this._templatesById[id] = {};
  16307. }
  16308. this._templatesById[id][version] = template;
  16309. this._validTemplates.push(template);
  16310. }
  16311. return this;
  16312. }
  16313. /**
  16314. * Validate given template and return error (if any).
  16315. *
  16316. * @param {TemplateDescriptor} template
  16317. *
  16318. * @return {Error} validation error, if any
  16319. */
  16320. _validateTemplate(template) {
  16321. let err;
  16322. const id = template.id,
  16323. version = template.version || '_',
  16324. schemaVersion = template.$schema && getSchemaVersion(template.$schema); // (1) compatibility
  16325. if (schemaVersion && semverCompare__default["default"](SUPPORTED_SCHEMA_VERSION$1, schemaVersion) < 0) {
  16326. return this._logError(`unsupported element template schema version <${schemaVersion}>. Your installation only supports up to version <${SUPPORTED_SCHEMA_VERSION$1}>. Please update your installation`, template);
  16327. } // (2) versioning
  16328. if (this._templatesById[id] && this._templatesById[id][version]) {
  16329. if (version === '_') {
  16330. return this._logError(`template id <${id}> already used`, template);
  16331. } else {
  16332. return this._logError(`template id <${id}> and version <${version}> already used`, template);
  16333. }
  16334. } // (3) elementType validation
  16335. const elementTypeError = this._validateElementType(template);
  16336. if (elementTypeError) {
  16337. return elementTypeError;
  16338. } // (4) JSON schema compliance
  16339. const validationResult = elementTemplatesValidator.validate(template);
  16340. const {
  16341. errors,
  16342. valid
  16343. } = validationResult;
  16344. if (!valid) {
  16345. err = new Error('invalid template');
  16346. filteredSchemaErrors(errors).forEach(error => {
  16347. this._logError(error.message, template);
  16348. });
  16349. }
  16350. return err;
  16351. }
  16352. /**
  16353. * Validate elementType for given template and return error (if any).
  16354. *
  16355. * @param {TemplateDescriptor} template
  16356. *
  16357. * @return {Error} validation error, if any
  16358. */
  16359. _validateElementType(template) {
  16360. if (template.elementType && template.appliesTo) {
  16361. const elementType = template.elementType.value,
  16362. appliesTo = template.appliesTo; // (3.1) template can be applied to elementType
  16363. // prevents cases where the elementType is not part of appliesTo
  16364. if (!appliesTo.find(type => this._isType(elementType, type))) {
  16365. return this._logError(`template does not apply to requested element type <${elementType}>`, template);
  16366. } // (3.2) template only applies to same type of element
  16367. // prevent elementTemplates to morph into incompatible types, e.g. Task -> SequenceFlow
  16368. for (const sourceType of appliesTo) {
  16369. if (!this._canMorph(sourceType, elementType)) {
  16370. return this._logError(`can not morph <${sourceType}> into <${elementType}>`, template);
  16371. }
  16372. }
  16373. }
  16374. }
  16375. /**
  16376. * Check if given type is a subtype of given base type.
  16377. *
  16378. * @param {String} type
  16379. * @param {String} baseType
  16380. * @returns {Boolean}
  16381. */
  16382. _isType(type, baseType) {
  16383. const moddleType = this._moddle.getType(type);
  16384. return moddleType && baseType in this._moddle.getElementDescriptor(moddleType).allTypesByName;
  16385. }
  16386. /**
  16387. * Checks if a given type can be morphed into another type.
  16388. *
  16389. * @param {String} sourceType
  16390. * @param {String} targetType
  16391. * @returns {Boolean}
  16392. */
  16393. _canMorph(sourceType, targetType) {
  16394. if (sourceType === targetType) {
  16395. return true;
  16396. }
  16397. const baseType = MORPHABLE_TYPES.find(type => this._isType(sourceType, type));
  16398. if (!baseType) {
  16399. return false;
  16400. }
  16401. return this._isType(targetType, baseType);
  16402. }
  16403. /**
  16404. * Log an error for the given template
  16405. *
  16406. * @param {(String|Error)} err
  16407. * @param {TemplateDescriptor} template
  16408. *
  16409. * @return {Error} logged validation errors
  16410. */
  16411. _logError(err, template) {
  16412. if (minDash.isString(err)) {
  16413. if (template) {
  16414. const {
  16415. id,
  16416. name
  16417. } = template;
  16418. err = `template(id: <${id}>, name: <${name}>): ${err}`;
  16419. }
  16420. err = new Error(err);
  16421. }
  16422. this._errors.push(err);
  16423. return err;
  16424. }
  16425. getErrors() {
  16426. return this._errors;
  16427. }
  16428. getValidTemplates() {
  16429. return this._validTemplates;
  16430. }
  16431. } // helpers //////////
  16432. /**
  16433. * Extract schema version from schema URI
  16434. *
  16435. * @param {String} schemaUri - for example https://unpkg.com/@camunda/element-templates-json-schema@99.99.99/resources/schema.json
  16436. *
  16437. * @return {String} for example '99.99.99'
  16438. */
  16439. function getSchemaVersion(schemaUri) {
  16440. const re = /\d+\.\d+\.\d+/g;
  16441. const match = schemaUri.match(re);
  16442. return match === null ? undefined : match[0];
  16443. }
  16444. /**
  16445. * Extract only relevant errors of the validation result.
  16446. *
  16447. * The JSON Schema we use under the hood produces more errors than we need for a
  16448. * detected schema violation (for example, unmatched sub-schemas, if-then-rules,
  16449. * `oneOf`-definitions ...).
  16450. *
  16451. * We call these errors "relevant" that have a custom error message defined by us OR
  16452. * are basic data type errors.
  16453. *
  16454. * @param {Array} schemaErrors
  16455. *
  16456. * @return {Array}
  16457. */
  16458. function filteredSchemaErrors(schemaErrors) {
  16459. return minDash.filter(schemaErrors, err => {
  16460. const {
  16461. dataPath,
  16462. keyword
  16463. } = err; // (1) regular errors are customized from the schema
  16464. if (keyword === 'errorMessage') {
  16465. return true;
  16466. } // (2) data type errors
  16467. // ignore type errors nested in scopes
  16468. if (keyword === 'type' && dataPath && !dataPath.startsWith('/scopes/')) {
  16469. return true;
  16470. }
  16471. return false;
  16472. });
  16473. }
  16474. const SUPPORTED_SCHEMA_VERSION = elementTemplatesValidator.getZeebeSchemaVersion();
  16475. const SUPPORTED_SCHEMA_PACKAGE = elementTemplatesValidator.getZeebeSchemaPackage();
  16476. /**
  16477. * A Camunda Cloud element template validator.
  16478. */
  16479. class Validator extends Validator$1 {
  16480. constructor(moddle) {
  16481. super(moddle);
  16482. }
  16483. /**
  16484. * Validate given template and return error (if any).
  16485. *
  16486. * @param {TemplateDescriptor} template
  16487. *
  16488. * @return {Error} validation error, if any
  16489. */
  16490. _validateTemplate(template) {
  16491. let err;
  16492. const id = template.id,
  16493. version = template.version || '_',
  16494. schema = template.$schema,
  16495. schemaVersion = schema && getSchemaVersion(schema); // (1) $schema attribute defined
  16496. if (!schema) {
  16497. return this._logError('missing $schema attribute.', template);
  16498. }
  16499. if (!this.isSchemaValid(schema)) {
  16500. return this._logError(`unsupported $schema attribute <${schema}>.`, template);
  16501. } // (2) compatibility
  16502. if (schemaVersion && semverCompare__default["default"](SUPPORTED_SCHEMA_VERSION, schemaVersion) < 0) {
  16503. return this._logError(`unsupported element template schema version <${schemaVersion}>. Your installation only supports up to version <${SUPPORTED_SCHEMA_VERSION}>. Please update your installation`, template);
  16504. } // (3) versioning
  16505. if (this._templatesById[id] && this._templatesById[id][version]) {
  16506. if (version === '_') {
  16507. return this._logError(`template id <${id}> already used`, template);
  16508. } else {
  16509. return this._logError(`template id <${id}> and version <${version}> already used`, template);
  16510. }
  16511. } // (4) elementType validation
  16512. const elementTypeError = this._validateElementType(template);
  16513. if (elementTypeError) {
  16514. return elementTypeError;
  16515. } // (5) JSON schema compliance
  16516. const validationResult = elementTemplatesValidator.validateZeebe(template);
  16517. const {
  16518. errors,
  16519. valid
  16520. } = validationResult;
  16521. if (!valid) {
  16522. err = new Error('invalid template');
  16523. filteredSchemaErrors(errors).forEach(error => {
  16524. this._logError(error.message, template);
  16525. });
  16526. }
  16527. return err;
  16528. }
  16529. isSchemaValid(schema) {
  16530. return schema && schema.includes(SUPPORTED_SCHEMA_PACKAGE);
  16531. }
  16532. }
  16533. /**
  16534. * The guy responsible for template loading.
  16535. *
  16536. * Provide the actual templates via the `config.elementTemplates`.
  16537. *
  16538. * That configuration can either be an array of template
  16539. * descriptors or a node style callback to retrieve
  16540. * the templates asynchronously.
  16541. *
  16542. * @param {Array<TemplateDescriptor>|Function} loadTemplates
  16543. * @param {EventBus} eventBus
  16544. * @param {ElementTemplates} elementTemplates
  16545. * @param {Moddle} moddle
  16546. */
  16547. class ElementTemplatesLoader$1 {
  16548. constructor(loadTemplates, eventBus, elementTemplates, moddle) {
  16549. this._loadTemplates = loadTemplates;
  16550. this._eventBus = eventBus;
  16551. this._elementTemplates = elementTemplates;
  16552. this._moddle = moddle;
  16553. eventBus.on('diagram.init', () => {
  16554. this.reload();
  16555. });
  16556. }
  16557. reload() {
  16558. const loadTemplates = this._loadTemplates; // no templates specified
  16559. if (minDash.isUndefined(loadTemplates)) {
  16560. return;
  16561. } // template loader function specified
  16562. if (minDash.isFunction(loadTemplates)) {
  16563. return loadTemplates((err, templates) => {
  16564. if (err) {
  16565. return this.templateErrors([err]);
  16566. }
  16567. this.setTemplates(templates);
  16568. });
  16569. } // templates array specified
  16570. if (loadTemplates.length) {
  16571. return this.setTemplates(loadTemplates);
  16572. }
  16573. }
  16574. setTemplates(templates) {
  16575. const elementTemplates = this._elementTemplates,
  16576. moddle = this._moddle;
  16577. const validator = new Validator$1(moddle).addAll(templates);
  16578. const errors = validator.getErrors(),
  16579. validTemplates = validator.getValidTemplates();
  16580. elementTemplates.set(validTemplates);
  16581. if (errors.length) {
  16582. this.templateErrors(errors);
  16583. }
  16584. this.templatesChanged();
  16585. }
  16586. templatesChanged() {
  16587. this._eventBus.fire('elementTemplates.changed');
  16588. }
  16589. templateErrors(errors) {
  16590. this._eventBus.fire('elementTemplates.errors', {
  16591. errors: errors
  16592. });
  16593. }
  16594. }
  16595. ElementTemplatesLoader$1.$inject = ['config.elementTemplates', 'eventBus', 'elementTemplates', 'moddle'];
  16596. class ElementTemplatesLoader extends ElementTemplatesLoader$1 {
  16597. constructor(loadTemplates, eventBus, elementTemplates, moddle) {
  16598. super(loadTemplates, eventBus, elementTemplates, moddle);
  16599. this._elementTemplates = elementTemplates;
  16600. }
  16601. setTemplates(templates) {
  16602. const elementTemplates = this._elementTemplates,
  16603. moddle = this._moddle;
  16604. const validator = new Validator(moddle).addAll(templates);
  16605. const errors = validator.getErrors(),
  16606. validTemplates = validator.getValidTemplates();
  16607. elementTemplates.set(validTemplates);
  16608. if (errors.length) {
  16609. this.templateErrors(errors);
  16610. }
  16611. this.templatesChanged();
  16612. }
  16613. }
  16614. ElementTemplatesLoader.$inject = ['config.elementTemplates', 'eventBus', 'elementTemplates', 'moddle'];
  16615. function unlinkTemplate$1(element, injector) {
  16616. const modeling = injector.get('modeling');
  16617. modeling.updateProperties(element, {
  16618. 'camunda:modelerTemplate': null,
  16619. 'camunda:modelerTemplateVersion': null
  16620. });
  16621. }
  16622. function removeTemplate(element, injector) {
  16623. const replace = injector.get('replace'),
  16624. selection = injector.get('selection');
  16625. const businessObject = ModelUtil.getBusinessObject(element);
  16626. const type = businessObject.$type,
  16627. eventDefinitionType = getEventDefinitionType(businessObject);
  16628. const newBusinessObject = createBlankBusinessObject(element, injector);
  16629. const newElement = replace.replaceElement(element, {
  16630. type: type,
  16631. businessObject: newBusinessObject,
  16632. eventDefinitionType: eventDefinitionType
  16633. });
  16634. selection.select(newElement);
  16635. }
  16636. function updateTemplate$1(element, newTemplate, injector) {
  16637. const elementTemplates = injector.get('elementTemplates');
  16638. return elementTemplates.applyTemplate(element, newTemplate);
  16639. }
  16640. function getVersionOrDateFromTemplate(template) {
  16641. const metadata = template.metadata,
  16642. version = template.version;
  16643. if (metadata) {
  16644. if (!minDash.isUndefined(metadata.created)) {
  16645. return toDateString(metadata.created);
  16646. } else if (!minDash.isUndefined(metadata.updated)) {
  16647. return toDateString(metadata.updated);
  16648. }
  16649. }
  16650. if (minDash.isUndefined(version)) {
  16651. return null;
  16652. }
  16653. return version;
  16654. } // helper ///////////
  16655. function getEventDefinitionType(businessObject) {
  16656. if (!businessObject.eventDefinitions) {
  16657. return null;
  16658. }
  16659. const eventDefinition = businessObject.eventDefinitions[0];
  16660. if (!eventDefinition) {
  16661. return null;
  16662. }
  16663. return eventDefinition.$type;
  16664. }
  16665. /**
  16666. * Example: 01.01.1900 01:01
  16667. *
  16668. * @param {number} timestamp
  16669. * @returns {string}
  16670. */
  16671. function toDateString(timestamp) {
  16672. const date = new Date(timestamp);
  16673. const year = date.getFullYear();
  16674. const month = withLeadingZeros(String(date.getMonth() + 1));
  16675. const day = withLeadingZeros(String(date.getDate()));
  16676. const hours = withLeadingZeros(String(date.getHours()));
  16677. const minutes = withLeadingZeros(String(date.getMinutes()));
  16678. return day + '.' + month + '.' + year + ' ' + hours + ':' + minutes;
  16679. }
  16680. function withLeadingZeros(string) {
  16681. return leftPad(string, 2, '0');
  16682. }
  16683. function leftPad(string, length, character) {
  16684. while (string.length < length) {
  16685. string = character + string;
  16686. }
  16687. return string;
  16688. }
  16689. function createBlankBusinessObject(element, injector) {
  16690. const bpmnFactory = injector.get('bpmnFactory'),
  16691. bpmnJs = injector.get('bpmnjs');
  16692. const bo = ModelUtil.getBusinessObject(element),
  16693. newBo = bpmnFactory.create(bo.$type),
  16694. label = LabelUtil.getLabel(element);
  16695. if (!label) {
  16696. return newBo;
  16697. }
  16698. if (ModelUtil.is(element, 'bpmn:Group')) {
  16699. const definitions = bpmnJs.getDefinitions();
  16700. const categoryValue = CategoryUtil.createCategoryValue(definitions, bpmnFactory);
  16701. newBo.categoryValueRef = categoryValue;
  16702. }
  16703. LabelUtil.setLabel({
  16704. businessObject: newBo
  16705. }, label);
  16706. return newBo;
  16707. }
  16708. function unlinkTemplate(element, injector) {
  16709. const modeling = injector.get('modeling'); // remove template attributes
  16710. modeling.updateProperties(element, {
  16711. 'zeebe:modelerTemplate': null,
  16712. 'zeebe:modelerTemplateVersion': null,
  16713. 'zeebe:modelerTemplateIcon': null
  16714. });
  16715. }
  16716. function updateTemplate(element, newTemplate, injector) {
  16717. const elementTemplates = injector.get('elementTemplates');
  16718. return elementTemplates.applyTemplate(element, newTemplate);
  16719. }
  16720. /**
  16721. * This Behavior checks if the new element's type is in
  16722. * the list of elements the template applies to and unlinks
  16723. * it if not.
  16724. */
  16725. class ReplaceBehavior$1 extends CommandInterceptor__default["default"] {
  16726. constructor(elementTemplates, injector) {
  16727. super(injector.get('eventBus'));
  16728. this.postExecuted('shape.replace', function (e) {
  16729. var context = e.context,
  16730. oldShape = context.oldShape,
  16731. oldBo = ModelUtil.getBusinessObject(oldShape),
  16732. newShape = context.newShape,
  16733. newBo = ModelUtil.getBusinessObject(newShape);
  16734. if (!oldBo.modelerTemplate) {
  16735. return;
  16736. }
  16737. const template = newBo.modelerTemplate;
  16738. const version = newBo.modelerTemplateVersion;
  16739. const elementTemplate = elementTemplates.get(template, version);
  16740. if (!elementTemplate) {
  16741. unlinkTemplate(newShape, injector);
  16742. return;
  16743. }
  16744. const {
  16745. appliesTo,
  16746. elementType
  16747. } = elementTemplate;
  16748. if (elementType) {
  16749. if (!ModelUtil.is(newShape, elementType.value)) {
  16750. unlinkTemplate(newShape, injector);
  16751. }
  16752. return;
  16753. }
  16754. const allowed = appliesTo.reduce((allowed, type) => {
  16755. return allowed || ModelUtil.is(newBo, type);
  16756. }, false);
  16757. if (!allowed) {
  16758. unlinkTemplate(newShape, injector);
  16759. }
  16760. });
  16761. }
  16762. }
  16763. ReplaceBehavior$1.$inject = ['elementTemplates', 'injector'];
  16764. function registerHandlers$1(commandStack, elementTemplates, eventBus) {
  16765. commandStack.registerHandler('propertiesPanel.zeebe.changeTemplate', ChangeElementTemplateHandler$1); // apply default element templates on shape creation
  16766. eventBus.on(['commandStack.shape.create.postExecuted'], function (context) {
  16767. applyDefaultTemplate$1(context.context.shape, elementTemplates, commandStack);
  16768. }); // apply default element templates on connection creation
  16769. eventBus.on(['commandStack.connection.create.postExecuted'], function (context) {
  16770. applyDefaultTemplate$1(context.context.connection, elementTemplates, commandStack);
  16771. });
  16772. }
  16773. registerHandlers$1.$inject = ['commandStack', 'elementTemplates', 'eventBus'];
  16774. var commandsModule$1 = {
  16775. __init__: [registerHandlers$1]
  16776. };
  16777. function applyDefaultTemplate$1(element, elementTemplates, commandStack) {
  16778. if (!elementTemplates.get(element) && elementTemplates.getDefault(element)) {
  16779. const command = 'propertiesPanel.zeebe.changeTemplate';
  16780. const commandContext = {
  16781. element: element,
  16782. newTemplate: elementTemplates.getDefault(element)
  16783. };
  16784. commandStack.execute(command, commandContext);
  16785. }
  16786. }
  16787. /**
  16788. * Validate the given template descriptors and
  16789. * return a list of errors.
  16790. *
  16791. * @param {Array<TemplateDescriptor>} descriptors
  16792. * @param {Moddle} moddle
  16793. *
  16794. * @return {Array<Error>}
  16795. */
  16796. function validate(descriptors, moddle) {
  16797. return new Validator(moddle).addAll(descriptors).getErrors();
  16798. }
  16799. class PropertyBindingProvider {
  16800. static create(element, options) {
  16801. const {
  16802. property
  16803. } = options;
  16804. const {
  16805. binding,
  16806. value
  16807. } = property;
  16808. const {
  16809. name
  16810. } = binding;
  16811. const businessObject = ModelUtil.getBusinessObject(element);
  16812. businessObject[name] = value;
  16813. }
  16814. }
  16815. class TaskDefinitionTypeBindingProvider {
  16816. static create(element, options) {
  16817. const {
  16818. property,
  16819. bpmnFactory
  16820. } = options;
  16821. const {
  16822. value
  16823. } = property;
  16824. const extensionElements = ModelUtil.getBusinessObject(element).get('extensionElements');
  16825. const taskDefinition = createTaskDefinitionWithType(value, bpmnFactory);
  16826. taskDefinition.$parent = extensionElements;
  16827. extensionElements.get('values').push(taskDefinition);
  16828. }
  16829. }
  16830. class InputBindingProvider {
  16831. static create(element, options) {
  16832. const {
  16833. property,
  16834. bpmnFactory
  16835. } = options;
  16836. const {
  16837. binding,
  16838. value
  16839. } = property;
  16840. const ioMapping = ensureExtension(element, 'zeebe:IoMapping', bpmnFactory);
  16841. if (!shouldUpdate(value, property)) {
  16842. return;
  16843. }
  16844. const input = createInputParameter$1(binding, value, bpmnFactory);
  16845. input.$parent = ioMapping;
  16846. ioMapping.get('inputParameters').push(input);
  16847. }
  16848. }
  16849. class OutputBindingProvider {
  16850. static create(element, options) {
  16851. const {
  16852. property,
  16853. bpmnFactory
  16854. } = options;
  16855. const {
  16856. binding,
  16857. value
  16858. } = property;
  16859. const ioMapping = ensureExtension(element, 'zeebe:IoMapping', bpmnFactory);
  16860. if (!shouldUpdate(value, property)) {
  16861. return;
  16862. }
  16863. const output = createOutputParameter$1(binding, value, bpmnFactory);
  16864. output.$parent = ioMapping;
  16865. ioMapping.get('outputParameters').push(output);
  16866. }
  16867. }
  16868. class TaskHeaderBindingProvider {
  16869. static create(element, options) {
  16870. const {
  16871. property,
  16872. bpmnFactory
  16873. } = options;
  16874. const {
  16875. binding,
  16876. value
  16877. } = property;
  16878. const taskHeaders = ensureExtension(element, 'zeebe:TaskHeaders', bpmnFactory);
  16879. const header = createTaskHeader(binding, value, bpmnFactory);
  16880. header.$parent = taskHeaders;
  16881. taskHeaders.get('values').push(header);
  16882. }
  16883. }
  16884. class TemplateElementFactory {
  16885. constructor(bpmnFactory, elementFactory, moddle) {
  16886. this._bpmnFactory = bpmnFactory;
  16887. this._elementFactory = elementFactory;
  16888. this._moddle = moddle;
  16889. this._providers = {
  16890. [PROPERTY_TYPE$1]: PropertyBindingProvider,
  16891. [ZEEBE_TASK_DEFINITION_TYPE_TYPE]: TaskDefinitionTypeBindingProvider,
  16892. [ZEBBE_INPUT_TYPE]: InputBindingProvider,
  16893. [ZEEBE_OUTPUT_TYPE]: OutputBindingProvider,
  16894. [ZEEBE_TASK_HEADER_TYPE]: TaskHeaderBindingProvider
  16895. };
  16896. }
  16897. /**
  16898. * Create an element based on an element template.
  16899. *
  16900. * @param {ElementTemplate} template
  16901. * @returns {djs.model.Base}
  16902. */
  16903. create(template) {
  16904. const {
  16905. appliesTo,
  16906. elementType,
  16907. properties
  16908. } = template;
  16909. const elementFactory = this._elementFactory;
  16910. const bpmnFactory = this._bpmnFactory;
  16911. const moddle = this._moddle;
  16912. const providers = this._providers; // (0) make sure template is valid
  16913. const errors = validate([template], moddle); // todo(pinussilvestrus): return validation errors
  16914. if (errors && errors.length) {
  16915. throw new Error('template is invalid');
  16916. }
  16917. const type = elementType && elementType.value || appliesTo[0]; // (1) create element from appliesTo
  16918. const element = elementFactory.createShape({
  16919. type
  16920. }); // (2) ensure extension elements
  16921. if (hasExtensionBindings(template)) {
  16922. this._ensureExtensionElements(element);
  16923. } // (3) apply template
  16924. this._setModelerTemplate(element, template); // (4) apply icon
  16925. if (hasIcon(template)) {
  16926. this._setModelerTemplateIcon(element, template);
  16927. } // (5) apply properties
  16928. properties.forEach(function (property) {
  16929. const {
  16930. binding
  16931. } = property;
  16932. const {
  16933. type: bindingType
  16934. } = binding;
  16935. const bindingProvider = providers[bindingType];
  16936. bindingProvider.create(element, {
  16937. property,
  16938. bpmnFactory
  16939. });
  16940. });
  16941. return element;
  16942. }
  16943. _ensureExtensionElements(element) {
  16944. const bpmnFactory = this._bpmnFactory;
  16945. const businessObject = ModelUtil.getBusinessObject(element);
  16946. let extensionElements = businessObject.get('extensionElements');
  16947. if (!extensionElements) {
  16948. extensionElements = bpmnFactory.create('bpmn:ExtensionElements', {
  16949. values: []
  16950. });
  16951. extensionElements.$parent = businessObject;
  16952. businessObject.set('extensionElements', extensionElements);
  16953. }
  16954. return extensionElements;
  16955. }
  16956. _setModelerTemplate(element, template) {
  16957. const {
  16958. id,
  16959. version
  16960. } = template;
  16961. const businessObject = ModelUtil.getBusinessObject(element);
  16962. businessObject.set('zeebe:modelerTemplate', id);
  16963. businessObject.set('zeebe:modelerTemplateVersion', version);
  16964. }
  16965. _setModelerTemplateIcon(element, template) {
  16966. const {
  16967. icon
  16968. } = template;
  16969. const {
  16970. contents
  16971. } = icon;
  16972. const businessObject = ModelUtil.getBusinessObject(element);
  16973. businessObject.set('zeebe:modelerTemplateIcon', contents);
  16974. }
  16975. }
  16976. TemplateElementFactory.$inject = ['bpmnFactory', 'elementFactory', 'moddle']; // helper ////////////////
  16977. function hasExtensionBindings(template) {
  16978. const {
  16979. properties
  16980. } = template; // find icon first
  16981. if (hasIcon(template)) {
  16982. return true;
  16983. }
  16984. return minDash.find(properties, function (property) {
  16985. const {
  16986. binding
  16987. } = property;
  16988. return EXTENSION_BINDING_TYPES$1.includes(binding.type);
  16989. });
  16990. }
  16991. function hasIcon(template) {
  16992. const {
  16993. icon
  16994. } = template;
  16995. return !!(icon && icon.contents);
  16996. }
  16997. var templateElementFactoryModule = {
  16998. __init__: ['templateElementFactory'],
  16999. templateElementFactory: ['type', TemplateElementFactory]
  17000. };
  17001. function createElementTemplatesGroup(props = {}) {
  17002. const {
  17003. getTemplateId: getTemplateId$1 = getTemplateId,
  17004. unlinkTemplate = unlinkTemplate$1,
  17005. updateTemplate = updateTemplate$1
  17006. } = props;
  17007. return function ElementTemplatesGroup(props) {
  17008. const {
  17009. id,
  17010. label,
  17011. element,
  17012. entries = []
  17013. } = props;
  17014. const [open, setOpen] = propertiesPanel.useLayoutState(['groups', id, 'open'], false);
  17015. const empty = !entries.length;
  17016. const toggleOpen = () => !empty && setOpen(!open);
  17017. return jsxRuntime.jsxs("div", {
  17018. class: "bio-properties-panel-group bio-properties-panel-templates-group",
  17019. "data-group-id": 'group-' + id,
  17020. children: [jsxRuntime.jsxs("div", {
  17021. class: classnames__default["default"]('bio-properties-panel-group-header', {
  17022. empty,
  17023. open: open && !empty
  17024. }),
  17025. onClick: toggleOpen,
  17026. children: [jsxRuntime.jsx("div", {
  17027. title: label,
  17028. class: "bio-properties-panel-group-header-title",
  17029. children: label
  17030. }), jsxRuntime.jsxs("div", {
  17031. class: "bio-properties-panel-group-header-buttons",
  17032. children: [jsxRuntime.jsx(TemplateGroupButtons, {
  17033. element: element,
  17034. getTemplateId: getTemplateId$1,
  17035. unlinkTemplate: unlinkTemplate,
  17036. updateTemplate: updateTemplate
  17037. }), !empty && jsxRuntime.jsx(SectionToggle, {
  17038. open: open
  17039. })]
  17040. })]
  17041. }), jsxRuntime.jsx("div", {
  17042. class: classnames__default["default"]('bio-properties-panel-group-entries', {
  17043. open: open && !empty
  17044. }),
  17045. children: entries.map(entry => {
  17046. const {
  17047. component: Component,
  17048. id
  17049. } = entry;
  17050. return preact.createElement(Component, { ...entry,
  17051. key: id,
  17052. element: element
  17053. });
  17054. })
  17055. })]
  17056. });
  17057. };
  17058. }
  17059. function SectionToggle({
  17060. open
  17061. }) {
  17062. return jsxRuntime.jsx(propertiesPanel.HeaderButton, {
  17063. title: "Toggle section",
  17064. class: "bio-properties-panel-arrow",
  17065. children: jsxRuntime.jsx(propertiesPanel.ArrowIcon, {
  17066. class: open ? 'bio-properties-panel-arrow-down' : 'bio-properties-panel-arrow-right'
  17067. })
  17068. });
  17069. }
  17070. /**
  17071. *
  17072. * @param {object} props
  17073. * @param {object} props.element
  17074. * @param {function} props.getTemplateId
  17075. * @param {function} props.unlinkTemplate
  17076. * @param {function} props.updateTemplate
  17077. */
  17078. function TemplateGroupButtons({
  17079. element,
  17080. getTemplateId,
  17081. unlinkTemplate,
  17082. updateTemplate
  17083. }) {
  17084. const elementTemplates = useService('elementTemplates');
  17085. const templateState = getTemplateState(elementTemplates, element, getTemplateId);
  17086. if (templateState.type === 'NO_TEMPLATE') {
  17087. return jsxRuntime.jsx(SelectEntryTemplate, {
  17088. element: element
  17089. });
  17090. } else if (templateState.type === 'KNOWN_TEMPLATE') {
  17091. return jsxRuntime.jsx(AppliedTemplate, {
  17092. element: element,
  17093. unlinkTemplate: unlinkTemplate
  17094. });
  17095. } else if (templateState.type === 'UNKNOWN_TEMPLATE') {
  17096. return jsxRuntime.jsx(UnknownTemplate, {
  17097. element: element,
  17098. unlinkTemplate: unlinkTemplate
  17099. });
  17100. } else if (templateState.type === 'OUTDATED_TEMPLATE') {
  17101. return jsxRuntime.jsx(OutdatedTemplate, {
  17102. element: element,
  17103. templateState: templateState,
  17104. unlinkTemplate: unlinkTemplate,
  17105. updateTemplate: updateTemplate
  17106. });
  17107. }
  17108. }
  17109. function SelectEntryTemplate({
  17110. element
  17111. }) {
  17112. const translate = useService('translate');
  17113. const eventBus = useService('eventBus');
  17114. const selectTemplate = () => eventBus.fire('elementTemplates.select', {
  17115. element
  17116. });
  17117. return jsxRuntime.jsxs(propertiesPanel.HeaderButton, {
  17118. title: "Select a template",
  17119. class: "bio-properties-panel-select-template-button",
  17120. onClick: selectTemplate,
  17121. children: [jsxRuntime.jsx(propertiesPanel.CreateIcon, {}), jsxRuntime.jsx("span", {
  17122. children: translate('Select')
  17123. })]
  17124. });
  17125. }
  17126. function AppliedTemplate({
  17127. element,
  17128. unlinkTemplate
  17129. }) {
  17130. const translate = useService('translate'),
  17131. injector = useService('injector');
  17132. const menuItems = [{
  17133. entry: translate('Unlink'),
  17134. action: () => unlinkTemplate(element, injector)
  17135. }, {
  17136. entry: jsxRuntime.jsx(RemoveTemplate, {}),
  17137. action: () => removeTemplate(element, injector)
  17138. }];
  17139. return jsxRuntime.jsx(propertiesPanel.DropdownButton, {
  17140. menuItems: menuItems,
  17141. class: "bio-properties-panel-applied-template-button",
  17142. children: jsxRuntime.jsxs(propertiesPanel.HeaderButton, {
  17143. children: [jsxRuntime.jsx("span", {
  17144. children: translate('Applied')
  17145. }), jsxRuntime.jsx(propertiesPanel.ArrowIcon, {
  17146. class: "bio-properties-panel-arrow-down"
  17147. })]
  17148. })
  17149. });
  17150. }
  17151. function RemoveTemplate() {
  17152. const translate = useService('translate');
  17153. return jsxRuntime.jsx("span", {
  17154. class: "bio-properties-panel-remove-template",
  17155. children: translate('Remove')
  17156. });
  17157. }
  17158. function UnknownTemplate({
  17159. element,
  17160. unlinkTemplate
  17161. }) {
  17162. const translate = useService('translate'),
  17163. injector = useService('injector');
  17164. const menuItems = [{
  17165. entry: jsxRuntime.jsx(NotFoundText, {})
  17166. }, {
  17167. separator: true
  17168. }, {
  17169. entry: translate('Unlink'),
  17170. action: () => unlinkTemplate(element, injector)
  17171. }, {
  17172. entry: jsxRuntime.jsx(RemoveTemplate, {}),
  17173. action: () => removeTemplate(element, injector)
  17174. }];
  17175. return jsxRuntime.jsx(propertiesPanel.DropdownButton, {
  17176. menuItems: menuItems,
  17177. class: "bio-properties-panel-template-not-found",
  17178. children: jsxRuntime.jsxs(propertiesPanel.HeaderButton, {
  17179. children: [jsxRuntime.jsx("span", {
  17180. children: translate('Not found')
  17181. }), jsxRuntime.jsx(propertiesPanel.ArrowIcon, {
  17182. class: "bio-properties-panel-arrow-down"
  17183. })]
  17184. })
  17185. });
  17186. }
  17187. function NotFoundText() {
  17188. const translate = useService('translate');
  17189. return jsxRuntime.jsx("div", {
  17190. class: "bio-properties-panel-template-not-found-text",
  17191. children: translate('The template applied was not found. Therefore, its properties cannot be shown. Unlink to access the data.')
  17192. });
  17193. }
  17194. /**
  17195. *
  17196. * @param {object} props
  17197. * @param {object} element
  17198. * @param {UnknownTemplate} templateState
  17199. * @param {function} unlinkTemplate
  17200. * @param {function} updateTemplate
  17201. */
  17202. function OutdatedTemplate({
  17203. element,
  17204. templateState,
  17205. unlinkTemplate,
  17206. updateTemplate
  17207. }) {
  17208. const {
  17209. newerTemplate
  17210. } = templateState;
  17211. const translate = useService('translate'),
  17212. injector = useService('injector');
  17213. const menuItems = [{
  17214. entry: jsxRuntime.jsx(UpdateAvailableText, {
  17215. newerTemplate: newerTemplate
  17216. })
  17217. }, {
  17218. separator: true
  17219. }, {
  17220. entry: translate('Update'),
  17221. action: () => updateTemplate(element, newerTemplate, injector)
  17222. }, {
  17223. entry: translate('Unlink'),
  17224. action: () => unlinkTemplate(element, injector)
  17225. }, {
  17226. entry: jsxRuntime.jsx(RemoveTemplate, {}),
  17227. action: () => removeTemplate(element, injector)
  17228. }];
  17229. return jsxRuntime.jsx(propertiesPanel.DropdownButton, {
  17230. menuItems: menuItems,
  17231. class: "bio-properties-panel-template-update-available",
  17232. children: jsxRuntime.jsxs(propertiesPanel.HeaderButton, {
  17233. children: [jsxRuntime.jsx("span", {
  17234. children: translate('Update available')
  17235. }), jsxRuntime.jsx(propertiesPanel.ArrowIcon, {
  17236. class: "bio-properties-panel-arrow-down"
  17237. })]
  17238. })
  17239. });
  17240. }
  17241. function UpdateAvailableText({
  17242. newerTemplate
  17243. }) {
  17244. const translate = useService('translate');
  17245. const text = translate('A new version of the template is available: {templateVersion}', {
  17246. templateVersion: getVersionOrDateFromTemplate(newerTemplate)
  17247. });
  17248. return jsxRuntime.jsx("div", {
  17249. class: "bio-properties-panel-template-update-available-text",
  17250. children: text
  17251. });
  17252. } // helper //////
  17253. /**
  17254. * Determine template state in the current element.
  17255. *
  17256. * @param {object} elementTemplates
  17257. * @param {object} element
  17258. * @param {function} getTemplateId
  17259. * @returns {TemplateState}
  17260. */
  17261. function getTemplateState(elementTemplates, element, getTemplateId) {
  17262. const templateId = getTemplateId(element),
  17263. template = elementTemplates.get(element);
  17264. if (!templateId) {
  17265. return {
  17266. type: 'NO_TEMPLATE'
  17267. };
  17268. }
  17269. if (!template) {
  17270. return {
  17271. type: 'UNKNOWN_TEMPLATE',
  17272. templateId
  17273. };
  17274. }
  17275. const newerTemplate = elementTemplates.getLatest(templateId)[0];
  17276. if (newerTemplate !== template) {
  17277. return {
  17278. type: 'OUTDATED_TEMPLATE',
  17279. template,
  17280. newerTemplate
  17281. };
  17282. }
  17283. return {
  17284. type: 'KNOWN_TEMPLATE',
  17285. template
  17286. };
  17287. }
  17288. function TemplateProps({
  17289. element,
  17290. elementTemplates
  17291. }) {
  17292. const template = elementTemplates.get(element);
  17293. if (!template) {
  17294. return [];
  17295. }
  17296. return [{
  17297. id: 'template-name',
  17298. component: TemplateName,
  17299. template
  17300. }, {
  17301. id: 'template-version',
  17302. component: TemplateVersion,
  17303. template
  17304. }, {
  17305. id: 'template-description',
  17306. component: TemplateDescription,
  17307. template
  17308. }].filter(entry => !!entry.component);
  17309. }
  17310. function TemplateName({
  17311. id,
  17312. template
  17313. }) {
  17314. const translate = useService('translate');
  17315. return jsxRuntime.jsx(TextEntry, {
  17316. id: id,
  17317. label: translate('Name'),
  17318. content: template.name
  17319. });
  17320. }
  17321. function TemplateVersion({
  17322. id,
  17323. template
  17324. }) {
  17325. const translate = useService('translate');
  17326. const version = getVersionOrDateFromTemplate(template);
  17327. return version ? jsxRuntime.jsx(TextEntry, {
  17328. id: id,
  17329. label: translate('Version'),
  17330. content: version
  17331. }) : null;
  17332. }
  17333. function TemplateDescription({
  17334. id,
  17335. template
  17336. }) {
  17337. const translate = useService('translate');
  17338. const {
  17339. description
  17340. } = template;
  17341. return description ? jsxRuntime.jsx(TextEntry, {
  17342. id: id,
  17343. label: translate('Description'),
  17344. content: template.description
  17345. }) : null;
  17346. }
  17347. function TextEntry({
  17348. id,
  17349. label,
  17350. content
  17351. }) {
  17352. return jsxRuntime.jsxs("div", {
  17353. "data-entry-id": id,
  17354. class: "bio-properties-panel-entry bio-properties-panel-text-entry",
  17355. children: [jsxRuntime.jsx("span", {
  17356. class: "bio-properties-panel-label",
  17357. children: label
  17358. }), jsxRuntime.jsx("span", {
  17359. class: "bio-properties-panel-text-entry__content",
  17360. children: content
  17361. })]
  17362. });
  17363. }
  17364. var e,
  17365. o = {};
  17366. function n(r, t, e) {
  17367. if (3 === r.nodeType) {
  17368. var o = "textContent" in r ? r.textContent : r.nodeValue || "";
  17369. if (!1 !== n.options.trim) {
  17370. var a = 0 === t || t === e.length - 1;
  17371. if ((!(o = o.match(/^[\s\n]+$/g) && "all" !== n.options.trim ? " " : o.replace(/(^[\s\n]+|[\s\n]+$)/g, "all" === n.options.trim || a ? "" : " ")) || " " === o) && e.length > 1 && a) return null;
  17372. }
  17373. return o;
  17374. }
  17375. if (1 !== r.nodeType) return null;
  17376. var p = String(r.nodeName).toLowerCase();
  17377. if ("script" === p && !n.options.allowScripts) return null;
  17378. var l,
  17379. s,
  17380. u = n.h(p, function (r) {
  17381. var t = r && r.length;
  17382. if (!t) return null;
  17383. for (var e = {}, o = 0; o < t; o++) {
  17384. var a = r[o],
  17385. i = a.name,
  17386. p = a.value;
  17387. "on" === i.substring(0, 2) && n.options.allowEvents && (p = new Function(p)), e[i] = p;
  17388. }
  17389. return e;
  17390. }(r.attributes), (s = (l = r.childNodes) && Array.prototype.map.call(l, n).filter(i)) && s.length ? s : null);
  17391. return n.visitor && n.visitor(u), u;
  17392. }
  17393. var a,
  17394. i = function (r) {
  17395. return r;
  17396. },
  17397. p = {};
  17398. function l(r) {
  17399. var t = (r.type || "").toLowerCase(),
  17400. e = l.map;
  17401. e && e.hasOwnProperty(t) ? (r.type = e[t], r.props = Object.keys(r.props || {}).reduce(function (t, e) {
  17402. var o;
  17403. return t[(o = e, o.replace(/-(.)/g, function (r, t) {
  17404. return t.toUpperCase();
  17405. }))] = r.props[e], t;
  17406. }, {})) : r.type = t.replace(/[^a-z0-9-]/i, "");
  17407. }
  17408. var Markup = (function (t) {
  17409. function i() {
  17410. t.apply(this, arguments);
  17411. }
  17412. return t && (i.__proto__ = t), (i.prototype = Object.create(t && t.prototype)).constructor = i, i.setReviver = function (r) {
  17413. a = r;
  17414. }, i.prototype.shouldComponentUpdate = function (r) {
  17415. var t = this.props;
  17416. return r.wrap !== t.wrap || r.type !== t.type || r.markup !== t.markup;
  17417. }, i.prototype.setComponents = function (r) {
  17418. if (this.map = {}, r) for (var t in r) if (r.hasOwnProperty(t)) {
  17419. var e = t.replace(/([A-Z]+)([A-Z][a-z0-9])|([a-z0-9]+)([A-Z])/g, "$1$3-$2$4").toLowerCase();
  17420. this.map[e] = r[t];
  17421. }
  17422. }, i.prototype.render = function (t) {
  17423. var i = t.wrap;
  17424. void 0 === i && (i = !0);
  17425. var s,
  17426. u = t.type,
  17427. c = t.markup,
  17428. m = t.components,
  17429. v = t.reviver,
  17430. f = t.onError,
  17431. d = t["allow-scripts"],
  17432. h = t["allow-events"],
  17433. y = t.trim,
  17434. w = function (r, t) {
  17435. var e = {};
  17436. for (var o in r) Object.prototype.hasOwnProperty.call(r, o) && -1 === t.indexOf(o) && (e[o] = r[o]);
  17437. return e;
  17438. }(t, ["wrap", "type", "markup", "components", "reviver", "onError", "allow-scripts", "allow-events", "trim"]),
  17439. C = v || this.reviver || this.constructor.prototype.reviver || a || preact.h;
  17440. this.setComponents(m);
  17441. var g = {
  17442. allowScripts: d,
  17443. allowEvents: h,
  17444. trim: y
  17445. };
  17446. try {
  17447. s = function (r, t, a, i, s) {
  17448. var u = function (r, t) {
  17449. var o,
  17450. n,
  17451. a,
  17452. i,
  17453. p = "html" === t ? "text/html" : "application/xml";
  17454. "html" === t ? (i = "body", a = "<!DOCTYPE html>\n<html><body>" + r + "</body></html>") : (i = "xml", a = '<?xml version="1.0" encoding="UTF-8"?>\n<xml>' + r + "</xml>");
  17455. try {
  17456. o = new DOMParser().parseFromString(a, p);
  17457. } catch (r) {
  17458. n = r;
  17459. }
  17460. if (o || "html" !== t || ((o = e || (e = function () {
  17461. if (document.implementation && document.implementation.createHTMLDocument) return document.implementation.createHTMLDocument("");
  17462. var r = document.createElement("iframe");
  17463. return r.style.cssText = "position:absolute; left:0; top:-999em; width:1px; height:1px; overflow:hidden;", r.setAttribute("sandbox", "allow-forms"), document.body.appendChild(r), r.contentWindow.document;
  17464. }())).open(), o.write(a), o.close()), o) {
  17465. var l = o.getElementsByTagName(i)[0],
  17466. s = l.firstChild;
  17467. return r && !s && (l.error = "Document parse failed."), s && "parsererror" === String(s.nodeName).toLowerCase() && (s.removeChild(s.firstChild), s.removeChild(s.lastChild), l.error = s.textContent || s.nodeValue || n || "Unknown error", l.removeChild(s)), l;
  17468. }
  17469. }(r, t);
  17470. if (u && u.error) throw new Error(u.error);
  17471. var c = u && u.body || u;
  17472. l.map = i || p;
  17473. var m = c && function (r, t, e, a) {
  17474. return n.visitor = t, n.h = e, n.options = a || o, n(r);
  17475. }(c, l, a, s);
  17476. return l.map = null, m && m.props && m.props.children || null;
  17477. }(c, u, C, this.map, g);
  17478. } catch (r) {
  17479. f ? f({
  17480. error: r
  17481. }) : "undefined" != typeof console && console.error && console.error("preact-markup: " + r);
  17482. }
  17483. if (!1 === i) return s || null;
  17484. var x = w.hasOwnProperty("className") ? "className" : "class",
  17485. b = w[x];
  17486. return b ? b.splice ? b.splice(0, 0, "markup") : "string" == typeof b ? w[x] += " markup" : "object" == typeof b && (b.markup = !0) : w[x] = "markup", C("div", w, s || null);
  17487. }, i;
  17488. })(preact.Component);
  17489. /**
  17490. * Copied from existing form-js#Sanitizer
  17491. * cf. https://github.com/bpmn-io/form-js/blob/master/packages/form-js-viewer/src/render/components/Sanitizer.js
  17492. */
  17493. const NODE_TYPE_TEXT = 3,
  17494. NODE_TYPE_ELEMENT = 1;
  17495. const ALLOWED_NODES = ['h1', 'h2', 'h3', 'h4', 'h5', 'span', 'em', 'a', 'p', 'div', 'ul', 'ol', 'li', 'hr', 'blockquote', 'img', 'pre', 'code', 'br', 'strong'];
  17496. const ALLOWED_ATTRIBUTES = ['align', 'alt', 'class', 'href', 'id', 'name', 'rel', 'target', 'src'];
  17497. const ALLOWED_URI_PATTERN = /^(?:(?:(?:f|ht)tps?|mailto|tel|callto|cid|xmpp):|[^a-z]|[a-z+.\-]+(?:[^a-z+.\-:]|$))/i; // eslint-disable-line no-useless-escape
  17498. const ATTR_WHITESPACE_PATTERN = /[\u0000-\u0020\u00A0\u1680\u180E\u2000-\u2029\u205F\u3000]/g; // eslint-disable-line no-control-regex
  17499. const FORM_ELEMENT = document.createElement('form');
  17500. /**
  17501. * Sanitize a HTML string and return the cleaned, safe version.
  17502. *
  17503. * @param {string} html
  17504. * @return {string}
  17505. */
  17506. function sanitizeHTML(html) {
  17507. const doc = new DOMParser().parseFromString(`<!DOCTYPE html>\n<html><body><div>${html}`, 'text/html');
  17508. doc.normalize();
  17509. const element = doc.body.firstChild;
  17510. if (element) {
  17511. sanitizeNode(
  17512. /** @type Element */
  17513. element);
  17514. return new XMLSerializer().serializeToString(element);
  17515. } else {
  17516. // handle the case that document parsing
  17517. // does not work at all, due to HTML gibberish
  17518. return '';
  17519. }
  17520. }
  17521. /**
  17522. * Recursively sanitize a HTML node, potentially
  17523. * removing it, its children or attributes.
  17524. *
  17525. * Inspired by https://github.com/developit/snarkdown/issues/70
  17526. * and https://github.com/cure53/DOMPurify. Simplified
  17527. * for our use-case.
  17528. *
  17529. * @param {Element} node
  17530. */
  17531. function sanitizeNode(node) {
  17532. // allow text nodes
  17533. if (node.nodeType === NODE_TYPE_TEXT) {
  17534. return;
  17535. } // disallow all other nodes but Element
  17536. if (node.nodeType !== NODE_TYPE_ELEMENT) {
  17537. return node.remove();
  17538. }
  17539. const lcTag = node.tagName.toLowerCase(); // disallow non-whitelisted tags
  17540. if (!ALLOWED_NODES.includes(lcTag)) {
  17541. return node.remove();
  17542. }
  17543. const attributes = node.attributes; // clean attributes
  17544. for (let i = attributes.length; i--;) {
  17545. const attribute = attributes[i];
  17546. const name = attribute.name;
  17547. const lcName = name.toLowerCase(); // normalize node value
  17548. const value = attribute.value.trim();
  17549. node.removeAttribute(name);
  17550. const valid = isValidAttribute(lcTag, lcName, value);
  17551. if (valid) {
  17552. node.setAttribute(name, value);
  17553. }
  17554. } // force noopener on target="_blank" links
  17555. if (lcTag === 'a' && node.getAttribute('target') === '_blank' && node.getAttribute('rel') !== 'noopener') {
  17556. node.setAttribute('rel', 'noopener');
  17557. }
  17558. for (let i = node.childNodes.length; i--;) {
  17559. sanitizeNode(
  17560. /** @type Element */
  17561. node.childNodes[i]);
  17562. }
  17563. }
  17564. /**
  17565. * Validates attributes for validity.
  17566. *
  17567. * @param {string} lcTag
  17568. * @param {string} lcName
  17569. * @param {string} value
  17570. * @return {boolean}
  17571. */
  17572. function isValidAttribute(lcTag, lcName, value) {
  17573. // disallow most attributes based on whitelist
  17574. if (!ALLOWED_ATTRIBUTES.includes(lcName)) {
  17575. return false;
  17576. } // disallow "DOM clobbering" / polution of document and wrapping form elements
  17577. if ((lcName === 'id' || lcName === 'name') && (value in document || value in FORM_ELEMENT)) {
  17578. return false;
  17579. }
  17580. if (lcName === 'target' && value !== '_blank') {
  17581. return false;
  17582. } // allow valid url links only
  17583. if (lcName === 'href' && !ALLOWED_URI_PATTERN.test(value.replace(ATTR_WHITESPACE_PATTERN, ''))) {
  17584. return false;
  17585. }
  17586. return true;
  17587. }
  17588. function PropertyDescription(props) {
  17589. const {
  17590. description
  17591. } = props;
  17592. return description && jsxRuntime.jsx(Markup, {
  17593. markup: sanitizeHTML(description),
  17594. trim: false
  17595. });
  17596. }
  17597. const DEFAULT_CUSTOM_GROUP$1 = {
  17598. id: 'ElementTemplates__CustomProperties',
  17599. label: 'Custom properties'
  17600. };
  17601. function CustomProperties$1(props) {
  17602. const {
  17603. element,
  17604. elementTemplate
  17605. } = props;
  17606. const groups = [];
  17607. const {
  17608. id,
  17609. properties,
  17610. groups: propertyGroups
  17611. } = elementTemplate; // (1) group properties by group id
  17612. const groupedProperties = groupByGroupId$1(properties);
  17613. const defaultProps = [];
  17614. minDash.forEach(groupedProperties, (properties, groupId) => {
  17615. const group = findCustomGroup$1(propertyGroups, groupId);
  17616. if (!group) {
  17617. return defaultProps.push(...properties);
  17618. }
  17619. addCustomGroup$1(groups, {
  17620. element,
  17621. id: `ElementTemplates__CustomProperties-${groupId}`,
  17622. label: group.label,
  17623. properties: properties,
  17624. templateId: `${id}-${groupId}`
  17625. });
  17626. }); // (2) add default custom props
  17627. if (defaultProps.length) {
  17628. addCustomGroup$1(groups, { ...DEFAULT_CUSTOM_GROUP$1,
  17629. element,
  17630. properties: defaultProps,
  17631. templateId: id
  17632. });
  17633. }
  17634. return groups;
  17635. }
  17636. function addCustomGroup$1(groups, props) {
  17637. const {
  17638. element,
  17639. id,
  17640. label,
  17641. properties,
  17642. templateId
  17643. } = props;
  17644. const customPropertiesGroup = {
  17645. id,
  17646. label,
  17647. component: propertiesPanel.Group,
  17648. entries: [],
  17649. shouldOpen: true
  17650. };
  17651. properties.forEach((property, index) => {
  17652. const entry = createCustomEntry$1(`custom-entry-${templateId}-${index}`, element, property);
  17653. if (entry) {
  17654. customPropertiesGroup.entries.push(entry);
  17655. }
  17656. });
  17657. if (customPropertiesGroup.entries.length) {
  17658. groups.push(customPropertiesGroup);
  17659. }
  17660. }
  17661. function createCustomEntry$1(id, element, property) {
  17662. let {
  17663. type,
  17664. feel
  17665. } = property;
  17666. if (!type) {
  17667. type = getDefaultType$1(property);
  17668. }
  17669. if (type === 'Boolean') {
  17670. return {
  17671. id,
  17672. component: BooleanProperty$1,
  17673. isEdited: propertiesPanel.isCheckboxEntryEdited,
  17674. property
  17675. };
  17676. }
  17677. if (type === 'Dropdown') {
  17678. return {
  17679. id,
  17680. component: DropdownProperty$1,
  17681. isEdited: propertiesPanel.isSelectEntryEdited,
  17682. property
  17683. };
  17684. }
  17685. if (type === 'String') {
  17686. if (feel) {
  17687. return {
  17688. id,
  17689. component: FeelProperty,
  17690. isEdited: propertiesPanel.isFeelEntryEdited,
  17691. property
  17692. };
  17693. }
  17694. return {
  17695. id,
  17696. component: StringProperty$1,
  17697. isEdited: propertiesPanel.isTextFieldEntryEdited,
  17698. property
  17699. };
  17700. }
  17701. if (type === 'Text') {
  17702. if (feel) {
  17703. return {
  17704. id,
  17705. component: FeelTextAreaProperty,
  17706. isEdited: propertiesPanel.isFeelEntryEdited,
  17707. property
  17708. };
  17709. }
  17710. return {
  17711. id,
  17712. component: TextAreaProperty$1,
  17713. isEdited: propertiesPanel.isTextAreaEntryEdited,
  17714. property
  17715. };
  17716. }
  17717. }
  17718. function getDefaultType$1(property) {
  17719. const {
  17720. binding
  17721. } = property;
  17722. const {
  17723. type
  17724. } = binding;
  17725. if ([PROPERTY_TYPE$1, ZEEBE_TASK_DEFINITION_TYPE_TYPE, ZEBBE_INPUT_TYPE, ZEEBE_OUTPUT_TYPE, ZEEBE_TASK_HEADER_TYPE].includes(type)) {
  17726. return 'String';
  17727. }
  17728. }
  17729. function BooleanProperty$1(props) {
  17730. const {
  17731. element,
  17732. id,
  17733. property
  17734. } = props;
  17735. const {
  17736. description,
  17737. editable,
  17738. label
  17739. } = property;
  17740. const bpmnFactory = useService('bpmnFactory'),
  17741. commandStack = useService('commandStack');
  17742. return propertiesPanel.CheckboxEntry({
  17743. element,
  17744. getValue: propertyGetter$1(element, property),
  17745. id,
  17746. label,
  17747. description: PropertyDescription({
  17748. description
  17749. }),
  17750. setValue: propertySetter$1(bpmnFactory, commandStack, element, property),
  17751. disabled: editable === false
  17752. });
  17753. }
  17754. function DropdownProperty$1(props) {
  17755. const {
  17756. element,
  17757. id,
  17758. property
  17759. } = props;
  17760. const {
  17761. description,
  17762. editable,
  17763. label
  17764. } = property;
  17765. const bpmnFactory = useService('bpmnFactory'),
  17766. commandStack = useService('commandStack');
  17767. const getOptions = () => {
  17768. const {
  17769. choices
  17770. } = property;
  17771. return choices.map(({
  17772. name,
  17773. value
  17774. }) => {
  17775. return {
  17776. label: name,
  17777. value
  17778. };
  17779. });
  17780. };
  17781. return propertiesPanel.SelectEntry({
  17782. element,
  17783. id,
  17784. label,
  17785. getOptions,
  17786. description: PropertyDescription({
  17787. description
  17788. }),
  17789. getValue: propertyGetter$1(element, property),
  17790. setValue: propertySetter$1(bpmnFactory, commandStack, element, property),
  17791. disabled: editable === false
  17792. });
  17793. }
  17794. function FeelTextAreaProperty(props) {
  17795. const {
  17796. element,
  17797. id,
  17798. property
  17799. } = props;
  17800. const {
  17801. description,
  17802. editable,
  17803. label,
  17804. feel
  17805. } = property;
  17806. const bpmnFactory = useService('bpmnFactory'),
  17807. commandStack = useService('commandStack'),
  17808. debounce = useService('debounceInput'),
  17809. translate = useService('translate');
  17810. return withVariableContext(propertiesPanel.FeelTextAreaEntry)({
  17811. debounce,
  17812. element,
  17813. getValue: propertyGetter$1(element, property),
  17814. id,
  17815. label,
  17816. feel,
  17817. description: PropertyDescription({
  17818. description
  17819. }),
  17820. setValue: propertySetter$1(bpmnFactory, commandStack, element, property),
  17821. validate: propertyValidator$1(translate, property),
  17822. disabled: editable === false
  17823. });
  17824. }
  17825. function FeelProperty(props) {
  17826. const {
  17827. element,
  17828. id,
  17829. property
  17830. } = props;
  17831. const {
  17832. description,
  17833. editable,
  17834. label,
  17835. feel
  17836. } = property;
  17837. const bpmnFactory = useService('bpmnFactory'),
  17838. commandStack = useService('commandStack'),
  17839. debounce = useService('debounceInput'),
  17840. translate = useService('translate');
  17841. return withVariableContext(propertiesPanel.FeelEntry)({
  17842. debounce,
  17843. element,
  17844. getValue: propertyGetter$1(element, property),
  17845. id,
  17846. label,
  17847. feel,
  17848. description: PropertyDescription({
  17849. description
  17850. }),
  17851. setValue: propertySetter$1(bpmnFactory, commandStack, element, property),
  17852. validate: propertyValidator$1(translate, property),
  17853. disabled: editable === false
  17854. });
  17855. }
  17856. function StringProperty$1(props) {
  17857. const {
  17858. element,
  17859. id,
  17860. property
  17861. } = props;
  17862. const {
  17863. description,
  17864. editable,
  17865. label,
  17866. feel
  17867. } = property;
  17868. const bpmnFactory = useService('bpmnFactory'),
  17869. commandStack = useService('commandStack'),
  17870. debounce = useService('debounceInput'),
  17871. translate = useService('translate');
  17872. return propertiesPanel.TextFieldEntry({
  17873. debounce,
  17874. element,
  17875. getValue: propertyGetter$1(element, property),
  17876. id,
  17877. label,
  17878. feel,
  17879. description: PropertyDescription({
  17880. description
  17881. }),
  17882. setValue: propertySetter$1(bpmnFactory, commandStack, element, property),
  17883. validate: propertyValidator$1(translate, property),
  17884. disabled: editable === false
  17885. });
  17886. }
  17887. function TextAreaProperty$1(props) {
  17888. const {
  17889. element,
  17890. id,
  17891. property
  17892. } = props;
  17893. const {
  17894. description,
  17895. editable,
  17896. label,
  17897. feel
  17898. } = property;
  17899. const bpmnFactory = useService('bpmnFactory'),
  17900. commandStack = useService('commandStack'),
  17901. debounce = useService('debounceInput');
  17902. return propertiesPanel.TextAreaEntry({
  17903. debounce,
  17904. element,
  17905. id,
  17906. label,
  17907. feel,
  17908. description: PropertyDescription({
  17909. description
  17910. }),
  17911. getValue: propertyGetter$1(element, property),
  17912. setValue: propertySetter$1(bpmnFactory, commandStack, element, property),
  17913. disabled: editable === false
  17914. });
  17915. }
  17916. function propertyGetter$1(element, property) {
  17917. return function getValue() {
  17918. return getPropertyValue$1(element, property);
  17919. };
  17920. }
  17921. function propertySetter$1(bpmnFactory, commandStack, element, property) {
  17922. return function getValue(value) {
  17923. return setPropertyValue(bpmnFactory, commandStack, element, property, value);
  17924. };
  17925. }
  17926. function propertyValidator$1(translate, property) {
  17927. return function validate(value) {
  17928. const {
  17929. constraints = {}
  17930. } = property;
  17931. const {
  17932. maxLength,
  17933. minLength,
  17934. notEmpty
  17935. } = constraints;
  17936. if (notEmpty && isEmptyString$1(value)) {
  17937. return translate('Must not be empty.');
  17938. }
  17939. if (maxLength && value.length > maxLength) {
  17940. return translate('Must have max length {maxLength}.', {
  17941. maxLength
  17942. });
  17943. }
  17944. if (minLength && value.length < minLength) {
  17945. return translate('Must have min length {minLength}.', {
  17946. minLength
  17947. });
  17948. }
  17949. let {
  17950. pattern
  17951. } = constraints;
  17952. if (pattern) {
  17953. let message;
  17954. if (!minDash.isString(pattern)) {
  17955. message = pattern.message;
  17956. pattern = pattern.value;
  17957. }
  17958. if (!matchesPattern$1(value, pattern)) {
  17959. return message || translate('Must match pattern {pattern}.', {
  17960. pattern
  17961. });
  17962. }
  17963. }
  17964. };
  17965. }
  17966. function isEmptyString$1(string) {
  17967. return !string || !string.trim().length;
  17968. }
  17969. function matchesPattern$1(string, pattern) {
  17970. return new RegExp(pattern).test(string);
  17971. }
  17972. function groupByGroupId$1(properties) {
  17973. return minDash.groupBy(properties, 'group');
  17974. }
  17975. function findCustomGroup$1(groups, id) {
  17976. return minDash.find(groups, g => g.id === id);
  17977. }
  17978. const LOWER_PRIORITY$1 = 300;
  17979. class ElementTemplatesPropertiesProvider$1 {
  17980. constructor(elementTemplates, propertiesPanel, injector) {
  17981. propertiesPanel.registerProvider(LOWER_PRIORITY$1, this);
  17982. this._elementTemplates = elementTemplates;
  17983. this._injector = injector;
  17984. }
  17985. getGroups(element) {
  17986. return groups => {
  17987. if (!this._shouldShowTemplateProperties(element)) {
  17988. return groups;
  17989. } // (0) Copy provided groups
  17990. groups = groups.slice();
  17991. const templatesGroup = {
  17992. element,
  17993. id: 'ElementTemplates__Template',
  17994. label: 'Template',
  17995. component: createElementTemplatesGroup({
  17996. getTemplateId: getTemplateId$1,
  17997. unlinkTemplate,
  17998. updateTemplate
  17999. }),
  18000. entries: TemplateProps({
  18001. element,
  18002. elementTemplates: this._elementTemplates
  18003. })
  18004. }; // (1) Add templates group
  18005. addGroupsAfter$1('documentation', groups, [templatesGroup]);
  18006. let elementTemplate = this._elementTemplates.get(element);
  18007. if (elementTemplate) {
  18008. elementTemplate = applyConditions(element, elementTemplate);
  18009. const templateSpecificGroups = [].concat(CustomProperties$1({
  18010. element,
  18011. elementTemplate
  18012. })); // (2) add template-specific properties groups
  18013. addGroupsAfter$1('ElementTemplates__Template', groups, templateSpecificGroups);
  18014. } // (3) apply entries visible
  18015. if (getTemplateId$1(element)) {
  18016. groups = filterWithEntriesVisible$1(elementTemplate || {}, groups);
  18017. }
  18018. return groups;
  18019. };
  18020. }
  18021. _shouldShowTemplateProperties(element) {
  18022. return getTemplateId$1(element) || this._elementTemplates.getAll(element).length;
  18023. }
  18024. }
  18025. ElementTemplatesPropertiesProvider$1.$inject = ['elementTemplates', 'propertiesPanel', 'injector']; // helper /////////////////////
  18026. /**
  18027. *
  18028. * @param {string} id
  18029. * @param {Array<{ id: string }} groups
  18030. * @param {Array<{ id: string }>} groupsToAdd
  18031. */
  18032. function addGroupsAfter$1(id, groups, groupsToAdd) {
  18033. const index = groups.findIndex(group => group.id === id);
  18034. if (index !== -1) {
  18035. groups.splice(index + 1, 0, ...groupsToAdd);
  18036. } else {
  18037. // add in the beginning if group with provided id is missing
  18038. groups.unshift(...groupsToAdd);
  18039. }
  18040. }
  18041. function filterWithEntriesVisible$1(template, groups) {
  18042. if (!template.entriesVisible) {
  18043. return groups.filter(group => {
  18044. return group.id === 'general' || group.id.startsWith('ElementTemplates__');
  18045. });
  18046. }
  18047. return groups;
  18048. }
  18049. var index$1 = {
  18050. __depends__: [commandsModule$1, templateElementFactoryModule, translateModule__default["default"], zeebePropertiesProviderModule],
  18051. __init__: ['elementTemplatesLoader', 'replaceBehavior', 'elementTemplatesPropertiesProvider', 'elementTemplatesConditionChecker'],
  18052. elementTemplates: ['type', ElementTemplates],
  18053. elementTemplatesLoader: ['type', ElementTemplatesLoader],
  18054. replaceBehavior: ['type', ReplaceBehavior$1],
  18055. elementTemplatesPropertiesProvider: ['type', ElementTemplatesPropertiesProvider$1],
  18056. elementTemplatesConditionChecker: ['type', ElementTemplatesConditionChecker]
  18057. };
  18058. /**
  18059. * This Behavior checks if the new element's type is in
  18060. * the list of elements the template applies to and unlinks
  18061. * it if not.
  18062. */
  18063. class ReplaceBehavior extends CommandInterceptor__default["default"] {
  18064. constructor(elementTemplates, injector) {
  18065. super(injector.get('eventBus'));
  18066. this.postExecuted('shape.replace', function (e) {
  18067. var context = e.context,
  18068. oldShape = context.oldShape,
  18069. oldBo = ModelUtil.getBusinessObject(oldShape),
  18070. newShape = context.newShape,
  18071. newBo = ModelUtil.getBusinessObject(newShape);
  18072. if (!oldBo.modelerTemplate) {
  18073. return;
  18074. }
  18075. const template = newBo.modelerTemplate;
  18076. const version = newBo.modelerTemplateVersion;
  18077. const elementTemplate = elementTemplates.get(template, version);
  18078. if (!elementTemplate) {
  18079. unlinkTemplate$1(newShape, injector);
  18080. return;
  18081. }
  18082. const {
  18083. appliesTo,
  18084. elementType
  18085. } = elementTemplate;
  18086. if (elementType) {
  18087. if (!ModelUtil.is(newShape, elementType.value)) {
  18088. unlinkTemplate$1(newShape, injector);
  18089. }
  18090. return;
  18091. }
  18092. const allowed = appliesTo.reduce((allowed, type) => {
  18093. return allowed || ModelUtil.is(newBo, type);
  18094. }, false);
  18095. if (!allowed) {
  18096. unlinkTemplate$1(newShape, injector);
  18097. }
  18098. });
  18099. }
  18100. }
  18101. ReplaceBehavior.$inject = ['elementTemplates', 'injector'];
  18102. /**
  18103. * Converts legacy scopes descriptor to newer supported array structure.
  18104. *
  18105. * For example, it transforms
  18106. *
  18107. * scopes: {
  18108. * 'camunda:Connector':
  18109. * { properties: []
  18110. * }
  18111. * }
  18112. *
  18113. * to
  18114. *
  18115. * scopes: [
  18116. * {
  18117. * type: 'camunda:Connector',
  18118. * properties: []
  18119. * }
  18120. * ]
  18121. *
  18122. * @param {ScopesDescriptor} scopes
  18123. *
  18124. * @returns {Array}
  18125. */
  18126. function handleLegacyScopes(scopes = []) {
  18127. const scopesAsArray = [];
  18128. if (!minDash.isObject(scopes)) {
  18129. return scopes;
  18130. }
  18131. minDash.forEach(minDash.keys(scopes), function (scopeName) {
  18132. scopesAsArray.push(minDash.assign({
  18133. type: scopeName
  18134. }, scopes[scopeName]));
  18135. });
  18136. return scopesAsArray;
  18137. }
  18138. /**
  18139. * Create an input parameter representing the given
  18140. * binding and value.
  18141. *
  18142. * @param {PropertyBinding} binding
  18143. * @param {String} value
  18144. * @param {BpmnFactory} bpmnFactory
  18145. *
  18146. * @return {ModdleElement}
  18147. */
  18148. function createInputParameter(binding, value, bpmnFactory) {
  18149. const {
  18150. name,
  18151. scriptFormat
  18152. } = binding;
  18153. let parameterValue, parameterDefinition;
  18154. if (scriptFormat) {
  18155. parameterDefinition = bpmnFactory.create('camunda:Script', {
  18156. scriptFormat,
  18157. value
  18158. });
  18159. } else {
  18160. parameterValue = value;
  18161. }
  18162. return bpmnFactory.create('camunda:InputParameter', {
  18163. name,
  18164. value: parameterValue,
  18165. definition: parameterDefinition
  18166. });
  18167. }
  18168. /**
  18169. * Create an output parameter representing the given
  18170. * binding and value.
  18171. *
  18172. * @param {PropertyBinding} binding
  18173. * @param {String} value
  18174. * @param {BpmnFactory} bpmnFactory
  18175. *
  18176. * @return {ModdleElement}
  18177. */
  18178. function createOutputParameter(binding, value, bpmnFactory) {
  18179. const {
  18180. scriptFormat,
  18181. source
  18182. } = binding;
  18183. let parameterValue, parameterDefinition;
  18184. if (scriptFormat) {
  18185. parameterDefinition = bpmnFactory.create('camunda:Script', {
  18186. scriptFormat,
  18187. value: source
  18188. });
  18189. } else {
  18190. parameterValue = source;
  18191. }
  18192. return bpmnFactory.create('camunda:OutputParameter', {
  18193. name: value,
  18194. value: parameterValue,
  18195. definition: parameterDefinition
  18196. });
  18197. }
  18198. /**
  18199. * Create camunda property from the given binding.
  18200. *
  18201. * @param {PropertyBinding} binding
  18202. * @param {String} value
  18203. * @param {BpmnFactory} bpmnFactory
  18204. *
  18205. * @return {ModdleElement}
  18206. */
  18207. function createCamundaProperty(binding, value = '', bpmnFactory) {
  18208. const {
  18209. name
  18210. } = binding;
  18211. return bpmnFactory.create('camunda:Property', {
  18212. name,
  18213. value
  18214. });
  18215. }
  18216. /**
  18217. * Create camunda:in element from given binding.
  18218. *
  18219. * @param {PropertyBinding} binding
  18220. * @param {String} value
  18221. * @param {BpmnFactory} bpmnFactory
  18222. *
  18223. * @return {ModdleElement}
  18224. */
  18225. function createCamundaIn(binding, value, bpmnFactory) {
  18226. const attrs = createCamundaInOutAttrs(binding, value);
  18227. return bpmnFactory.create('camunda:In', attrs);
  18228. }
  18229. /**
  18230. * Create camunda:in with businessKey element from given binding.
  18231. *
  18232. * @param {String} value
  18233. * @param {BpmnFactory} bpmnFactory
  18234. *
  18235. * @return {ModdleElement}
  18236. */
  18237. function createCamundaInWithBusinessKey(value, bpmnFactory) {
  18238. return bpmnFactory.create('camunda:In', {
  18239. businessKey: value
  18240. });
  18241. }
  18242. /**
  18243. * Create camunda:out element from given binding.
  18244. *
  18245. * @param {PropertyBinding} binding
  18246. * @param {String} value
  18247. * @param {BpmnFactory} bpmnFactory
  18248. *
  18249. * @return {ModdleElement}
  18250. */
  18251. function createCamundaOut(binding, value, bpmnFactory) {
  18252. const attrs = createCamundaInOutAttrs(binding, value);
  18253. return bpmnFactory.create('camunda:Out', attrs);
  18254. }
  18255. /**
  18256. * Create camunda:executionListener element containing an inline script from given binding.
  18257. *
  18258. * @param {PropertyBinding} binding
  18259. * @param {String} value
  18260. * @param {BpmnFactory} bpmnFactory
  18261. *
  18262. * @return {ModdleElement}
  18263. */
  18264. function createCamundaExecutionListenerScript(binding, value, bpmnFactory) {
  18265. const {
  18266. event,
  18267. scriptFormat
  18268. } = binding;
  18269. let parameterValue, parameterDefinition;
  18270. if (scriptFormat) {
  18271. parameterDefinition = bpmnFactory.create('camunda:Script', {
  18272. scriptFormat,
  18273. value
  18274. });
  18275. } else {
  18276. parameterValue = value;
  18277. }
  18278. return bpmnFactory.create('camunda:ExecutionListener', {
  18279. event,
  18280. value: parameterValue,
  18281. script: parameterDefinition
  18282. });
  18283. }
  18284. /**
  18285. * Create camunda:field element containing string or expression from given binding.
  18286. *
  18287. * @param {PropertyBinding} binding
  18288. * @param {String} value
  18289. * @param {BpmnFactory} bpmnFactory
  18290. *
  18291. * @return {ModdleElement}
  18292. */
  18293. function createCamundaFieldInjection(binding, value, bpmnFactory) {
  18294. const DEFAULT_PROPS = {
  18295. 'string': undefined,
  18296. 'expression': undefined,
  18297. 'name': undefined
  18298. };
  18299. const props = minDash.assign({}, DEFAULT_PROPS);
  18300. const {
  18301. expression,
  18302. name
  18303. } = binding;
  18304. if (!expression) {
  18305. props.string = value;
  18306. } else {
  18307. props.expression = value;
  18308. }
  18309. props.name = name;
  18310. return bpmnFactory.create('camunda:Field', props);
  18311. }
  18312. /**
  18313. * Create camunda:errorEventDefinition element containing expression and errorRef
  18314. * from given binding.
  18315. *
  18316. * @param {String} expression
  18317. * @param {ModdleElement} errorRef
  18318. * @param {ModdleElement} parent
  18319. * @param {BpmnFactory} bpmnFactory
  18320. *
  18321. * @return {ModdleElement}
  18322. */
  18323. function createCamundaErrorEventDefinition(expression, errorRef, parent, bpmnFactory) {
  18324. const errorEventDefinition = bpmnFactory.create('camunda:ErrorEventDefinition', {
  18325. errorRef,
  18326. expression
  18327. });
  18328. errorEventDefinition.$parent = parent;
  18329. return errorEventDefinition;
  18330. }
  18331. /**
  18332. * Create bpmn:error element containing a specific error id given by a binding.
  18333. *
  18334. * @param {String} bindingErrorRef
  18335. * @param {ModdleElement} parent
  18336. * @param {BpmnFactory} bpmnFactory
  18337. *
  18338. * @return { ModdleElement }
  18339. */
  18340. function createError(bindingErrorRef, parent, bpmnFactory) {
  18341. const error = bpmnFactory.create('bpmn:Error', {
  18342. // we need to later retrieve the error from a binding
  18343. id: nextId('Error_' + bindingErrorRef + '_')
  18344. });
  18345. error.$parent = parent;
  18346. return error;
  18347. } // helpers //////////
  18348. /**
  18349. * Create properties for camunda:in and camunda:out types.
  18350. */
  18351. function createCamundaInOutAttrs(binding, value) {
  18352. const properties = {};
  18353. const {
  18354. expression,
  18355. source,
  18356. sourceExpression,
  18357. target,
  18358. type,
  18359. variables
  18360. } = binding; // explicitly cover all conditions as specified here:
  18361. // https://github.com/camunda/camunda-modeler/blob/develop/docs/element-templates/README.md#camundain
  18362. if (type === 'camunda:in') {
  18363. if (target && !expression && !variables) {
  18364. properties.target = target;
  18365. properties.source = value;
  18366. } else if (target && expression === true && !variables) {
  18367. properties.target = target;
  18368. properties.sourceExpression = value;
  18369. } else if (!target && !expression && variables === 'local') {
  18370. properties.local = true;
  18371. properties.variables = 'all';
  18372. } else if (target && !expression && variables === 'local') {
  18373. properties.local = true;
  18374. properties.source = value;
  18375. properties.target = target;
  18376. } else if (target && expression && variables === 'local') {
  18377. properties.local = true;
  18378. properties.sourceExpression = value;
  18379. properties.target = target;
  18380. } else if (!target && !expression && variables === 'all') {
  18381. properties.variables = 'all';
  18382. } else {
  18383. throw new Error('invalid configuration for camunda:in element template binding');
  18384. }
  18385. } // explicitly cover all conditions as specified here:
  18386. // https://github.com/camunda/camunda-modeler/blob/develop/docs/element-templates/README.md#camundaout
  18387. if (type === 'camunda:out') {
  18388. if (source && !sourceExpression && !variables) {
  18389. properties.target = value;
  18390. properties.source = source;
  18391. } else if (!source && sourceExpression && !variables) {
  18392. properties.target = value;
  18393. properties.sourceExpression = sourceExpression;
  18394. } else if (!source && !sourceExpression && variables === 'all') {
  18395. properties.variables = 'all';
  18396. } else if (source && !sourceExpression && variables === 'local') {
  18397. properties.local = true;
  18398. properties.source = source;
  18399. properties.target = value;
  18400. } else if (!source && sourceExpression && variables === 'local') {
  18401. properties.local = true;
  18402. properties.sourceExpression = sourceExpression;
  18403. properties.target = value;
  18404. } else if (!source && !sourceExpression && variables === 'local') {
  18405. properties.local = true;
  18406. properties.variables = 'all';
  18407. } else {
  18408. throw new Error('invalid configuration for camunda:out element template binding');
  18409. }
  18410. }
  18411. return properties;
  18412. }
  18413. const CAMUNDA_SERVICE_TASK_LIKE = ['camunda:class', 'camunda:delegateExpression', 'camunda:expression'];
  18414. /**
  18415. * Applies an element template to an element. Sets `camunda:modelerTemplate` and
  18416. * `camunda:modelerTemplateVersion`.
  18417. */
  18418. class ChangeElementTemplateHandler {
  18419. constructor(bpmnFactory, bpmnReplace, commandStack, modeling) {
  18420. this._bpmnFactory = bpmnFactory;
  18421. this._bpmnReplace = bpmnReplace;
  18422. this._commandStack = commandStack;
  18423. this._modeling = modeling;
  18424. }
  18425. /**
  18426. * Change an element's template and update its properties as specified in `newTemplate`. Specify
  18427. * `oldTemplate` to update from one template to another. If `newTemplate` isn't specified the
  18428. * `camunda:modelerTemplate` and `camunda:modelerTemplateVersion` properties will be removed from
  18429. * the element.
  18430. *
  18431. * @param {Object} context
  18432. * @param {Object} context.element
  18433. * @param {Object} [context.oldTemplate]
  18434. * @param {Object} [context.newTemplate]
  18435. */
  18436. preExecute(context) {
  18437. const newTemplate = context.newTemplate,
  18438. oldTemplate = context.oldTemplate;
  18439. let element = context.element; // update camunda:modelerTemplate attribute
  18440. this._updateCamundaModelerTemplate(element, newTemplate);
  18441. if (newTemplate) {
  18442. element = context.element = this._updateTaskType(element, newTemplate); // update properties
  18443. this._updateProperties(element, oldTemplate, newTemplate); // update camunda:ExecutionListener properties
  18444. this._updateCamundaExecutionListenerProperties(element, newTemplate); // update camunda:Field properties
  18445. this._updateCamundaFieldProperties(element, oldTemplate, newTemplate); // update camunda:In and camunda:Out properties
  18446. this._updateCamundaInOutProperties(element, oldTemplate, newTemplate); // update camunda:InputParameter and camunda:OutputParameter properties
  18447. this._updateCamundaInputOutputParameterProperties(element, oldTemplate, newTemplate); // update camunda:Property properties
  18448. this._updateCamundaPropertyProperties(element, oldTemplate, newTemplate); // update camunda:ErrorEventDefinition properties
  18449. this._updateCamundaErrorEventDefinitionProperties(element, oldTemplate, newTemplate); // update properties for each scope
  18450. handleLegacyScopes(newTemplate.scopes).forEach(newScopeTemplate => {
  18451. this._updateScopeProperties(element, oldTemplate, newScopeTemplate, newTemplate);
  18452. });
  18453. }
  18454. }
  18455. _getOrCreateExtensionElements(element) {
  18456. const bpmnFactory = this._bpmnFactory,
  18457. modeling = this._modeling;
  18458. const businessObject = ModelUtil.getBusinessObject(element);
  18459. let extensionElements = businessObject.get('extensionElements');
  18460. if (!extensionElements) {
  18461. extensionElements = bpmnFactory.create('bpmn:ExtensionElements', {
  18462. values: []
  18463. });
  18464. extensionElements.$parent = businessObject;
  18465. modeling.updateProperties(element, {
  18466. extensionElements: extensionElements
  18467. });
  18468. }
  18469. return extensionElements;
  18470. }
  18471. /**
  18472. * Update `camunda:ErrorEventDefinition` properties of specified business object. Event
  18473. * definitions can only exist in `bpmn:ExtensionElements`.
  18474. *
  18475. * Ensures an bpmn:Error exists for the event definition.
  18476. *
  18477. * @param {djs.model.Base} element
  18478. * @param {Object} oldTemplate
  18479. * @param {Object} newTemplate
  18480. */
  18481. _updateCamundaErrorEventDefinitionProperties(element, oldTemplate, newTemplate) {
  18482. const bpmnFactory = this._bpmnFactory,
  18483. commandStack = this._commandStack;
  18484. const newProperties = newTemplate.properties.filter(newProperty => {
  18485. const newBinding = newProperty.binding,
  18486. newBindingType = newBinding.type;
  18487. return newBindingType === 'camunda:errorEventDefinition';
  18488. }); // (1) do not override if no updates
  18489. if (!newProperties.length) {
  18490. return;
  18491. }
  18492. const extensionElements = this._getOrCreateExtensionElements(element);
  18493. const oldErrorEventDefinitions = findExtensions(element, ['camunda:ErrorEventDefinition']);
  18494. newProperties.forEach(newProperty => {
  18495. const oldProperty = findOldProperty(oldTemplate, newProperty),
  18496. oldEventDefinition = oldProperty && findOldBusinessObject(extensionElements, oldProperty),
  18497. newBinding = newProperty.binding; // (2) update old event definitions
  18498. if (oldProperty && oldEventDefinition) {
  18499. if (!propertyChanged(oldEventDefinition, oldProperty)) {
  18500. commandStack.execute('element.updateModdleProperties', {
  18501. element,
  18502. moddleElement: oldEventDefinition,
  18503. properties: {
  18504. expression: newProperty.value
  18505. }
  18506. });
  18507. }
  18508. remove(oldErrorEventDefinitions, oldEventDefinition);
  18509. } // (3) create new event definition + error
  18510. else {
  18511. const rootElement = getRoot(ModelUtil.getBusinessObject(element)),
  18512. newError = createError(newBinding.errorRef, rootElement, bpmnFactory),
  18513. newEventDefinition = createCamundaErrorEventDefinition(newProperty.value, newError, extensionElements, bpmnFactory);
  18514. commandStack.execute('element.updateModdleProperties', {
  18515. element,
  18516. moddleElement: rootElement,
  18517. properties: {
  18518. rootElements: [...rootElement.get('rootElements'), newError]
  18519. }
  18520. });
  18521. commandStack.execute('element.updateModdleProperties', {
  18522. element,
  18523. moddleElement: extensionElements,
  18524. properties: {
  18525. values: [...extensionElements.get('values'), newEventDefinition]
  18526. }
  18527. });
  18528. }
  18529. }); // (4) remove old event definitions
  18530. if (oldErrorEventDefinitions.length) {
  18531. commandStack.execute('element.updateModdleProperties', {
  18532. element,
  18533. moddleElement: extensionElements,
  18534. properties: {
  18535. values: minDash.without(extensionElements.get('values'), value => oldErrorEventDefinitions.includes(value))
  18536. }
  18537. });
  18538. }
  18539. }
  18540. /**
  18541. * Update `camunda:ExecutionListener` properties of specified business object. Execution listeners
  18542. * will always be overridden. Execution listeners can only exist in `bpmn:ExtensionElements`.
  18543. *
  18544. * @param {djs.model.Base} element
  18545. * @param {Object} newTemplate
  18546. */
  18547. _updateCamundaExecutionListenerProperties(element, newTemplate) {
  18548. const bpmnFactory = this._bpmnFactory,
  18549. commandStack = this._commandStack;
  18550. const newProperties = newTemplate.properties.filter(newProperty => {
  18551. const newBinding = newProperty.binding,
  18552. newBindingType = newBinding.type;
  18553. return newBindingType === 'camunda:executionListener';
  18554. }); // (1) do not override old execution listeners if no new execution listeners specified
  18555. if (!newProperties.length) {
  18556. return;
  18557. }
  18558. const extensionElements = this._getOrCreateExtensionElements(element); // (2) remove old execution listeners
  18559. const oldExecutionListeners = findExtensions(element, ['camunda:ExecutionListener']); // (3) add new execution listeners
  18560. const newExecutionListeners = newProperties.map(newProperty => {
  18561. const newBinding = newProperty.binding,
  18562. propertyValue = newProperty.value;
  18563. return createCamundaExecutionListenerScript(newBinding, propertyValue, bpmnFactory);
  18564. });
  18565. commandStack.execute('element.updateModdleProperties', {
  18566. element,
  18567. moddleElement: extensionElements,
  18568. properties: {
  18569. values: [...minDash.without(extensionElements.get('values'), value => oldExecutionListeners.includes(value)), ...newExecutionListeners]
  18570. }
  18571. });
  18572. }
  18573. /**
  18574. * Update `camunda:Field` properties of specified business object.
  18575. * If business object is `camunda:ExecutionListener` or `camunda:TaskListener` `fields` property
  18576. * will be updated. Otherwise `extensionElements.values` property will be updated.
  18577. *
  18578. * @param {djs.model.Base} element
  18579. * @param {Object} oldTemplate
  18580. * @param {Object} newTemplate
  18581. * @param {ModdleElement} businessObject
  18582. */
  18583. _updateCamundaFieldProperties(element, oldTemplate, newTemplate, businessObject) {
  18584. const bpmnFactory = this._bpmnFactory,
  18585. commandStack = this._commandStack;
  18586. const newProperties = newTemplate.properties.filter(newProperty => {
  18587. const newBinding = newProperty.binding,
  18588. newBindingType = newBinding.type;
  18589. return newBindingType === 'camunda:field';
  18590. }); // (1) do not override old fields if no new fields specified
  18591. if (!newProperties.length) {
  18592. return;
  18593. }
  18594. if (!businessObject) {
  18595. businessObject = this._getOrCreateExtensionElements(element);
  18596. }
  18597. const propertyName = ModelingUtil.isAny(businessObject, ['camunda:ExecutionListener', 'camunda:TaskListener']) ? 'fields' : 'values';
  18598. const oldFields = findExtensions(element, ['camunda:Field']);
  18599. newProperties.forEach(newProperty => {
  18600. const oldProperty = findOldProperty(oldTemplate, newProperty),
  18601. oldField = oldProperty && findOldBusinessObject(businessObject, oldProperty),
  18602. newBinding = newProperty.binding; // (2) update old fields
  18603. if (oldProperty && oldField) {
  18604. if (!propertyChanged(oldField, oldProperty)) {
  18605. commandStack.execute('element.updateModdleProperties', {
  18606. element,
  18607. moddleElement: oldField,
  18608. properties: {
  18609. string: newProperty.value
  18610. }
  18611. });
  18612. }
  18613. remove(oldFields, oldField);
  18614. } // (3) add new fields
  18615. else {
  18616. const newCamundaFieldInjection = createCamundaFieldInjection(newBinding, newProperty.value, bpmnFactory);
  18617. commandStack.execute('element.updateModdleProperties', {
  18618. element,
  18619. moddleElement: businessObject,
  18620. properties: {
  18621. [propertyName]: [...businessObject.get(propertyName), newCamundaFieldInjection]
  18622. }
  18623. });
  18624. }
  18625. }); // (4) remove old fields
  18626. if (oldFields.length) {
  18627. commandStack.execute('element.updateModdleProperties', {
  18628. element,
  18629. moddleElement: businessObject,
  18630. properties: {
  18631. [propertyName]: minDash.without(businessObject.get(propertyName), value => oldFields.includes(value))
  18632. }
  18633. });
  18634. }
  18635. }
  18636. /**
  18637. * Update `camunda:In` and `camunda:Out` properties of specified business object. Only
  18638. * `bpmn:CallActivity` and events with `bpmn:SignalEventDefinition` can have ins. Only
  18639. * `camunda:CallActivity` can have outs.
  18640. *
  18641. * @param {djs.model.Base} element
  18642. * @param {Object} oldTemplate
  18643. * @param {Object} newTemplate
  18644. */
  18645. _updateCamundaInOutProperties(element, oldTemplate, newTemplate) {
  18646. const bpmnFactory = this._bpmnFactory,
  18647. commandStack = this._commandStack;
  18648. const newProperties = newTemplate.properties.filter(newProperty => {
  18649. const newBinding = newProperty.binding,
  18650. newBindingType = newBinding.type;
  18651. return newBindingType === 'camunda:in' || newBindingType === 'camunda:in:businessKey' || newBindingType === 'camunda:out';
  18652. }); // (1) do not override old fields if no new fields specified
  18653. if (!newProperties.length) {
  18654. return;
  18655. } // get extension elements of either signal event definition or call activity
  18656. const extensionElements = this._getOrCreateExtensionElements(getSignalEventDefinition(element) || element);
  18657. const oldInsAndOuts = findExtensions(extensionElements, ['camunda:In', 'camunda:Out']);
  18658. newProperties.forEach(newProperty => {
  18659. const oldProperty = findOldProperty(oldTemplate, newProperty),
  18660. oldBinding = oldProperty && oldProperty.binding,
  18661. oldInOurOut = oldProperty && findOldBusinessObject(extensionElements, oldProperty),
  18662. newPropertyValue = newProperty.value,
  18663. newBinding = newProperty.binding,
  18664. newBindingType = newBinding.type,
  18665. properties = {};
  18666. let newInOrOut; // (2) update old ins and outs
  18667. if (oldProperty && oldInOurOut) {
  18668. if (!propertyChanged(oldInOurOut, oldProperty)) {
  18669. if (newBindingType === 'camunda:in') {
  18670. if (newBinding.expression) {
  18671. properties['camunda:sourceExpression'] = newPropertyValue;
  18672. } else {
  18673. properties['camunda:source'] = newPropertyValue;
  18674. }
  18675. } else if (newBindingType === 'camunda:in:businessKey') {
  18676. properties['camunda:businessKey'] = newPropertyValue;
  18677. } else if (newBindingType === 'camunda:out') {
  18678. properties['camunda:target'] = newPropertyValue;
  18679. }
  18680. } // update camunda:local property if it changed
  18681. if (oldBinding.local && !newBinding.local || !oldBinding.local && newBinding.local) {
  18682. properties.local = newBinding.local;
  18683. }
  18684. if (minDash.keys(properties)) {
  18685. commandStack.execute('element.updateModdleProperties', {
  18686. element,
  18687. moddleElement: oldInOurOut,
  18688. properties
  18689. });
  18690. }
  18691. remove(oldInsAndOuts, oldInOurOut);
  18692. } // (3) add new ins and outs
  18693. else {
  18694. if (newBindingType === 'camunda:in') {
  18695. newInOrOut = createCamundaIn(newBinding, newPropertyValue, bpmnFactory);
  18696. } else if (newBindingType === 'camunda:out') {
  18697. newInOrOut = createCamundaOut(newBinding, newPropertyValue, bpmnFactory);
  18698. } else if (newBindingType === 'camunda:in:businessKey') {
  18699. newInOrOut = createCamundaInWithBusinessKey(newPropertyValue, bpmnFactory);
  18700. }
  18701. commandStack.execute('element.updateModdleProperties', {
  18702. element,
  18703. moddleElement: extensionElements,
  18704. properties: {
  18705. values: [...extensionElements.get('values'), newInOrOut]
  18706. }
  18707. });
  18708. }
  18709. }); // (4) remove old ins and outs
  18710. if (oldInsAndOuts.length) {
  18711. commandStack.execute('element.updateModdleProperties', {
  18712. element,
  18713. moddleElement: extensionElements,
  18714. properties: {
  18715. values: minDash.without(extensionElements.get('values'), value => oldInsAndOuts.includes(value))
  18716. }
  18717. });
  18718. }
  18719. }
  18720. /**
  18721. * Update `camunda:InputParameter` and `camunda:OutputParameter` properties of specified business
  18722. * object. Both can only exist in `camunda:InputOutput` which can exist in `bpmn:ExtensionElements`
  18723. * or `camunda:Connector`.
  18724. *
  18725. * @param {djs.model.Base} element
  18726. * @param {Object} oldTemplate
  18727. * @param {Object} newTemplate
  18728. */
  18729. _updateCamundaInputOutputParameterProperties(element, oldTemplate, newTemplate, businessObject) {
  18730. const bpmnFactory = this._bpmnFactory,
  18731. commandStack = this._commandStack;
  18732. const newProperties = newTemplate.properties.filter(newProperty => {
  18733. const newBinding = newProperty.binding,
  18734. newBindingType = newBinding.type;
  18735. return newBindingType === 'camunda:inputParameter' || newBindingType === 'camunda:outputParameter';
  18736. }); // (1) do not override old inputs and outputs if no new inputs and outputs specified
  18737. if (!newProperties.length) {
  18738. return;
  18739. }
  18740. if (!businessObject) {
  18741. businessObject = this._getOrCreateExtensionElements(element);
  18742. }
  18743. let inputOutput;
  18744. if (ModelUtil.is(businessObject, 'camunda:Connector')) {
  18745. inputOutput = businessObject.get('camunda:inputOutput');
  18746. if (!inputOutput) {
  18747. inputOutput = bpmnFactory.create('camunda:InputOutput');
  18748. commandStack.execute('element.updateModdleProperties', {
  18749. element,
  18750. moddleElement: businessObject,
  18751. properties: {
  18752. inputOutput
  18753. }
  18754. });
  18755. }
  18756. } else {
  18757. inputOutput = findExtension(businessObject, 'camunda:InputOutput');
  18758. if (!inputOutput) {
  18759. inputOutput = bpmnFactory.create('camunda:InputOutput');
  18760. commandStack.execute('element.updateModdleProperties', {
  18761. element,
  18762. moddleElement: businessObject,
  18763. properties: {
  18764. values: [...businessObject.get('values'), inputOutput]
  18765. }
  18766. });
  18767. }
  18768. }
  18769. const oldInputs = inputOutput.get('camunda:inputParameters') ? inputOutput.get('camunda:inputParameters').slice() : [];
  18770. const oldOutputs = inputOutput.get('camunda:outputParameters') ? inputOutput.get('camunda:outputParameters').slice() : [];
  18771. let propertyName;
  18772. newProperties.forEach(newProperty => {
  18773. const oldProperty = findOldProperty(oldTemplate, newProperty),
  18774. oldInputOrOutput = oldProperty && findOldBusinessObject(businessObject, oldProperty),
  18775. newPropertyValue = newProperty.value,
  18776. newBinding = newProperty.binding,
  18777. newBindingType = newBinding.type;
  18778. let newInputOrOutput, properties; // (2) update old inputs and outputs
  18779. if (oldProperty && oldInputOrOutput) {
  18780. if (!propertyChanged(oldInputOrOutput, oldProperty)) {
  18781. if (ModelUtil.is(oldInputOrOutput, 'camunda:InputParameter')) {
  18782. properties = {
  18783. value: newPropertyValue
  18784. };
  18785. } else {
  18786. properties = {
  18787. name: newPropertyValue
  18788. };
  18789. }
  18790. commandStack.execute('element.updateModdleProperties', {
  18791. element,
  18792. moddleElement: oldInputOrOutput,
  18793. properties
  18794. });
  18795. }
  18796. if (ModelUtil.is(oldInputOrOutput, 'camunda:InputParameter')) {
  18797. remove(oldInputs, oldInputOrOutput);
  18798. } else {
  18799. remove(oldOutputs, oldInputOrOutput);
  18800. }
  18801. } // (3) add new inputs and outputs
  18802. else {
  18803. if (newBindingType === 'camunda:inputParameter') {
  18804. propertyName = 'inputParameters';
  18805. newInputOrOutput = createInputParameter(newBinding, newPropertyValue, bpmnFactory);
  18806. } else {
  18807. propertyName = 'outputParameters';
  18808. newInputOrOutput = createOutputParameter(newBinding, newPropertyValue, bpmnFactory);
  18809. }
  18810. commandStack.execute('element.updateModdleProperties', {
  18811. element,
  18812. moddleElement: inputOutput,
  18813. properties: {
  18814. [propertyName]: [...inputOutput.get(propertyName), newInputOrOutput]
  18815. }
  18816. });
  18817. }
  18818. }); // (4) remove old inputs and outputs
  18819. if (oldInputs.length) {
  18820. commandStack.execute('element.updateModdleProperties', {
  18821. element,
  18822. moddleElement: inputOutput,
  18823. properties: {
  18824. inputParameters: minDash.without(inputOutput.get('inputParameters'), inputParameter => oldInputs.includes(inputParameter))
  18825. }
  18826. });
  18827. }
  18828. if (oldOutputs.length) {
  18829. commandStack.execute('element.updateModdleProperties', {
  18830. element,
  18831. moddleElement: inputOutput,
  18832. properties: {
  18833. outputParameters: minDash.without(inputOutput.get('outputParameters'), outputParameter => oldOutputs.includes(outputParameter))
  18834. }
  18835. });
  18836. }
  18837. }
  18838. _updateCamundaModelerTemplate(element, newTemplate) {
  18839. const modeling = this._modeling;
  18840. modeling.updateProperties(element, {
  18841. 'camunda:modelerTemplate': newTemplate && newTemplate.id,
  18842. 'camunda:modelerTemplateVersion': newTemplate && newTemplate.version
  18843. });
  18844. }
  18845. /**
  18846. * Update `camunda:Property` properties of specified business object. `camunda:Property` can only
  18847. * exist in `camunda:Properties`.
  18848. *
  18849. * @param {djs.model.Base} element
  18850. * @param {Object} oldTemplate
  18851. * @param {Object} newTemplate
  18852. * @param {ModdleElement} businessObject
  18853. */
  18854. _updateCamundaPropertyProperties(element, oldTemplate, newTemplate, businessObject) {
  18855. const bpmnFactory = this._bpmnFactory,
  18856. commandStack = this._commandStack;
  18857. const newProperties = newTemplate.properties.filter(newProperty => {
  18858. const newBinding = newProperty.binding,
  18859. newBindingType = newBinding.type;
  18860. return newBindingType === 'camunda:property';
  18861. }); // (1) do not override old properties if no new properties specified
  18862. if (!newProperties.length) {
  18863. return;
  18864. }
  18865. if (businessObject) {
  18866. businessObject = this._getOrCreateExtensionElements(businessObject);
  18867. } else {
  18868. businessObject = this._getOrCreateExtensionElements(element);
  18869. }
  18870. let camundaProperties = findExtension(businessObject, 'camunda:Properties');
  18871. if (!camundaProperties) {
  18872. camundaProperties = bpmnFactory.create('camunda:Properties');
  18873. commandStack.execute('element.updateModdleProperties', {
  18874. element,
  18875. moddleElement: businessObject,
  18876. properties: {
  18877. values: [...businessObject.get('values'), camundaProperties]
  18878. }
  18879. });
  18880. }
  18881. const oldCamundaProperties = camundaProperties.get('camunda:values') ? camundaProperties.get('camunda:values').slice() : [];
  18882. newProperties.forEach(newProperty => {
  18883. const oldProperty = findOldProperty(oldTemplate, newProperty),
  18884. oldCamundaProperty = oldProperty && findOldBusinessObject(businessObject, oldProperty),
  18885. newPropertyValue = newProperty.value,
  18886. newBinding = newProperty.binding; // (2) update old properties
  18887. if (oldProperty && oldCamundaProperty) {
  18888. if (!propertyChanged(oldCamundaProperty, oldProperty)) {
  18889. commandStack.execute('element.updateModdleProperties', {
  18890. element,
  18891. moddleElement: oldCamundaProperty,
  18892. properties: {
  18893. value: newPropertyValue
  18894. }
  18895. });
  18896. }
  18897. remove(oldCamundaProperties, oldCamundaProperty);
  18898. } // (3) add new properties
  18899. else {
  18900. const newCamundaProperty = createCamundaProperty(newBinding, newPropertyValue, bpmnFactory);
  18901. commandStack.execute('element.updateModdleProperties', {
  18902. element,
  18903. moddleElement: camundaProperties,
  18904. properties: {
  18905. values: [...camundaProperties.get('values'), newCamundaProperty]
  18906. }
  18907. });
  18908. }
  18909. }); // (4) remove old properties
  18910. if (oldCamundaProperties.length) {
  18911. commandStack.execute('element.updateModdleProperties', {
  18912. element,
  18913. moddleElement: camundaProperties,
  18914. properties: {
  18915. values: minDash.without(camundaProperties.get('values'), value => oldCamundaProperties.includes(value))
  18916. }
  18917. });
  18918. }
  18919. }
  18920. /**
  18921. * Update `bpmn:conditionExpression` property of specified element. Since condition expression is
  18922. * is not primitive it needs special handling.
  18923. *
  18924. * @param {djs.model.Base} element
  18925. * @param {Object} oldProperty
  18926. * @param {Object} newProperty
  18927. */
  18928. _updateConditionExpression(element, oldProperty, newProperty) {
  18929. const bpmnFactory = this._bpmnFactory,
  18930. commandStack = this._commandStack,
  18931. modeling = this._modeling;
  18932. const newBinding = newProperty.binding,
  18933. newPropertyValue = newProperty.value;
  18934. if (!oldProperty) {
  18935. modeling.updateProperties(element, {
  18936. conditionExpression: bpmnFactory.create('bpmn:FormalExpression', {
  18937. body: newPropertyValue,
  18938. language: newBinding.scriptFormat
  18939. })
  18940. });
  18941. return;
  18942. }
  18943. const oldBinding = oldProperty.binding,
  18944. oldPropertyValue = oldProperty.value;
  18945. const businessObject = ModelUtil.getBusinessObject(element),
  18946. conditionExpression = businessObject.get('bpmn:conditionExpression');
  18947. const properties = {};
  18948. if (conditionExpression.get('body') === oldPropertyValue) {
  18949. properties.body = newPropertyValue;
  18950. }
  18951. if (conditionExpression.get('language') === oldBinding.scriptFormat) {
  18952. properties.language = newBinding.scriptFormat;
  18953. }
  18954. if (!minDash.keys(properties).length) {
  18955. return;
  18956. }
  18957. commandStack.execute('element.updateModdleProperties', {
  18958. element,
  18959. moddleElement: conditionExpression,
  18960. properties
  18961. });
  18962. }
  18963. _updateProperties(element, oldTemplate, newTemplate, businessObject) {
  18964. const commandStack = this._commandStack;
  18965. const newProperties = newTemplate.properties.filter(newProperty => {
  18966. const newBinding = newProperty.binding,
  18967. newBindingType = newBinding.type;
  18968. return newBindingType === 'property';
  18969. });
  18970. if (!newProperties.length) {
  18971. return;
  18972. }
  18973. if (!businessObject) {
  18974. businessObject = ModelUtil.getBusinessObject(element);
  18975. }
  18976. newProperties.forEach(newProperty => {
  18977. const oldProperty = findOldProperty(oldTemplate, newProperty),
  18978. newBinding = newProperty.binding,
  18979. newBindingName = newBinding.name,
  18980. newPropertyValue = newProperty.value;
  18981. let changedElement, properties;
  18982. if (newBindingName === 'conditionExpression') {
  18983. this._updateConditionExpression(element, oldProperty, newProperty);
  18984. } else {
  18985. if (ModelUtil.is(businessObject, 'bpmn:Error')) {
  18986. changedElement = businessObject;
  18987. } else {
  18988. changedElement = element;
  18989. }
  18990. if (oldProperty && propertyChanged(changedElement, oldProperty)) {
  18991. return;
  18992. }
  18993. properties = {};
  18994. properties[newBindingName] = newPropertyValue; // only one of `camunda:class`, `camunda:delegateExpression` and `camunda:expression` can be set
  18995. // TODO(philippfromme): ensuring only one of these properties is set at a time should be
  18996. // implemented in a behavior and not in this handler and properties panel UI
  18997. if (CAMUNDA_SERVICE_TASK_LIKE.indexOf(newBindingName) !== -1) {
  18998. CAMUNDA_SERVICE_TASK_LIKE.forEach(camundaServiceTaskLikeProperty => {
  18999. if (camundaServiceTaskLikeProperty !== newBindingName) {
  19000. properties[camundaServiceTaskLikeProperty] = undefined;
  19001. }
  19002. });
  19003. }
  19004. commandStack.execute('element.updateModdleProperties', {
  19005. element,
  19006. moddleElement: businessObject,
  19007. properties
  19008. });
  19009. }
  19010. });
  19011. }
  19012. /**
  19013. * Update properties for a specified scope.
  19014. *
  19015. * @param {djs.model.Base} element
  19016. * @param {Object} oldTemplate
  19017. * @param {Object} newScopeTemplate
  19018. * @param {Object} newTemplate
  19019. */
  19020. _updateScopeProperties(element, oldTemplate, newScopeTemplate, newTemplate) {
  19021. const bpmnFactory = this._bpmnFactory,
  19022. commandStack = this._commandStack;
  19023. const scopeName = newScopeTemplate.type;
  19024. let scopeElement;
  19025. scopeElement = findOldScopeElement(element, newScopeTemplate, newTemplate);
  19026. if (!scopeElement) {
  19027. scopeElement = bpmnFactory.create(scopeName);
  19028. }
  19029. const oldScopeTemplate = findOldScopeTemplate(newScopeTemplate, oldTemplate); // update properties
  19030. this._updateProperties(element, oldScopeTemplate, newScopeTemplate, scopeElement); // update camunda:ExecutionListener properties
  19031. this._updateCamundaExecutionListenerProperties(element, newScopeTemplate); // update camunda:In and camunda:Out properties
  19032. this._updateCamundaInOutProperties(element, oldScopeTemplate, newScopeTemplate); // update camunda:InputParameter and camunda:OutputParameter properties
  19033. this._updateCamundaInputOutputParameterProperties(element, oldScopeTemplate, newScopeTemplate, scopeElement); // update camunda:Field properties
  19034. this._updateCamundaFieldProperties(element, oldScopeTemplate, newScopeTemplate, scopeElement); // update camunda:Property properties
  19035. this._updateCamundaPropertyProperties(element, oldScopeTemplate, newScopeTemplate, scopeElement); // assume that root elements were already created in root by referenced event definition binding
  19036. if (isRootElementScope(scopeName)) {
  19037. return;
  19038. }
  19039. const extensionElements = this._getOrCreateExtensionElements(element);
  19040. commandStack.execute('element.updateModdleProperties', {
  19041. element,
  19042. moddleElement: extensionElements,
  19043. properties: {
  19044. values: [...extensionElements.get('values'), scopeElement]
  19045. }
  19046. });
  19047. }
  19048. /**
  19049. * Replaces the element with the specified elementType
  19050. *
  19051. * @param {djs.model.Base} element
  19052. * @param {Object} newTemplate
  19053. */
  19054. _updateTaskType(element, newTemplate) {
  19055. // determine new task type
  19056. const newType = newTemplate.elementType;
  19057. if (!newType) {
  19058. return element;
  19059. } // don't replace Task that is already the correct type
  19060. if (element.$type === newType.value) {
  19061. return element;
  19062. }
  19063. return this._bpmnReplace.replaceElement(element, {
  19064. type: newType.value
  19065. });
  19066. }
  19067. }
  19068. ChangeElementTemplateHandler.$inject = ['bpmnFactory', 'bpmnReplace', 'commandStack', 'modeling']; // helpers //////////
  19069. /**
  19070. * Find old business object matching specified old property.
  19071. *
  19072. * @param {djs.model.Base|ModdleElement} element
  19073. * @param {Object} oldProperty
  19074. *
  19075. * @returns {ModdleElement}
  19076. */
  19077. function findOldBusinessObject(element, oldProperty) {
  19078. let businessObject = ModelUtil.getBusinessObject(element),
  19079. propertyName;
  19080. const oldBinding = oldProperty.binding,
  19081. oldBindingType = oldBinding.type;
  19082. if (oldBindingType === 'camunda:field') {
  19083. if (ModelingUtil.isAny(businessObject, ['camunda:ExecutionListener', 'camunda:TaskListener'])) {
  19084. propertyName = 'camunda:fields';
  19085. } else {
  19086. propertyName = 'bpmn:values';
  19087. }
  19088. if (!businessObject || !businessObject.get(propertyName) || !businessObject.get(propertyName).length) {
  19089. return;
  19090. }
  19091. return minDash.find(businessObject.get(propertyName), function (oldBusinessObject) {
  19092. return oldBusinessObject.get('camunda:name') === oldBinding.name;
  19093. });
  19094. }
  19095. if (oldBindingType === 'camunda:in') {
  19096. return minDash.find(businessObject.get('values'), function (oldBusinessObject) {
  19097. return oldBusinessObject.get('target') === oldBinding.target;
  19098. });
  19099. }
  19100. if (oldBindingType === 'camunda:in:businessKey') {
  19101. return minDash.find(businessObject.get('values'), function (oldBusinessObject) {
  19102. return minDash.isString(oldBusinessObject.get('businessKey'));
  19103. });
  19104. }
  19105. if (oldBindingType === 'camunda:out') {
  19106. return minDash.find(businessObject.get('values'), function (oldBusinessObject) {
  19107. return oldBusinessObject.get('source') === oldBinding.source || oldBusinessObject.get('sourceExpression') || oldBinding.sourceExpression;
  19108. });
  19109. }
  19110. if (oldBindingType === 'camunda:inputParameter' || oldBindingType === 'camunda:outputParameter') {
  19111. if (ModelUtil.is(businessObject, 'camunda:Connector')) {
  19112. businessObject = businessObject.get('camunda:inputOutput');
  19113. if (!businessObject) {
  19114. return;
  19115. }
  19116. } else {
  19117. businessObject = findExtension(businessObject, 'camunda:InputOutput');
  19118. if (!businessObject) {
  19119. return;
  19120. }
  19121. }
  19122. if (oldBindingType === 'camunda:inputParameter') {
  19123. return minDash.find(businessObject.get('camunda:inputParameters'), function (oldBusinessObject) {
  19124. return oldBusinessObject.get('camunda:name') === oldBinding.name;
  19125. });
  19126. } else {
  19127. return minDash.find(businessObject.get('camunda:outputParameters'), function (oldBusinessObject) {
  19128. if (oldBinding.scriptFormat) {
  19129. const definition = oldBusinessObject.get('camunda:definition');
  19130. return definition && definition.get('camunda:value') === oldBinding.source;
  19131. } else {
  19132. return oldBusinessObject.get('camunda:value') === oldBinding.source;
  19133. }
  19134. });
  19135. }
  19136. }
  19137. if (oldBindingType === 'camunda:property') {
  19138. if (!businessObject || !businessObject.get('values') || !businessObject.get('values').length) {
  19139. return;
  19140. }
  19141. businessObject = findExtension(businessObject, 'camunda:Properties');
  19142. if (!businessObject) {
  19143. return;
  19144. }
  19145. return minDash.find(businessObject.get('values'), function (oldBusinessObject) {
  19146. return oldBusinessObject.get('camunda:name') === oldBinding.name;
  19147. });
  19148. }
  19149. if (oldBindingType === 'camunda:errorEventDefinition') {
  19150. return findCamundaErrorEventDefinition(element, oldBinding.errorRef);
  19151. }
  19152. }
  19153. /**
  19154. * Find old property matching specified new property.
  19155. *
  19156. * @param {Object} oldTemplate
  19157. * @param {Object} newProperty
  19158. *
  19159. * @returns {Object}
  19160. */
  19161. function findOldProperty(oldTemplate, newProperty) {
  19162. if (!oldTemplate) {
  19163. return;
  19164. }
  19165. const oldProperties = oldTemplate.properties,
  19166. newBinding = newProperty.binding,
  19167. newBindingName = newBinding.name,
  19168. newBindingType = newBinding.type;
  19169. if (newBindingType === 'property') {
  19170. return minDash.find(oldProperties, function (oldProperty) {
  19171. const oldBinding = oldProperty.binding,
  19172. oldBindingName = oldBinding.name,
  19173. oldBindingType = oldBinding.type;
  19174. return oldBindingType === 'property' && oldBindingName === newBindingName;
  19175. });
  19176. }
  19177. if (newBindingType === 'camunda:field') {
  19178. return minDash.find(oldProperties, function (oldProperty) {
  19179. const oldBinding = oldProperty.binding,
  19180. oldBindingName = oldBinding.name,
  19181. oldBindingType = oldBinding.type;
  19182. return oldBindingType === 'camunda:field' && oldBindingName === newBindingName;
  19183. });
  19184. }
  19185. if (newBindingType === 'camunda:in') {
  19186. return minDash.find(oldProperties, function (oldProperty) {
  19187. const oldBinding = oldProperty.binding,
  19188. oldBindingType = oldBinding.type;
  19189. if (oldBindingType !== 'camunda:in') {
  19190. return;
  19191. } // always override if change from source to source expression or vice versa
  19192. if (oldBinding.expression && !newBinding.expression || !oldBinding.expression && newBinding.expression) {
  19193. return;
  19194. }
  19195. return oldBinding.target === newBinding.target;
  19196. });
  19197. }
  19198. if (newBindingType === 'camunda:in:businessKey') {
  19199. return minDash.find(oldProperties, function (oldProperty) {
  19200. const oldBinding = oldProperty.binding,
  19201. oldBindingType = oldBinding.type;
  19202. return oldBindingType === 'camunda:in:businessKey';
  19203. });
  19204. }
  19205. if (newBindingType === 'camunda:out') {
  19206. return minDash.find(oldProperties, function (oldProperty) {
  19207. const oldBinding = oldProperty.binding,
  19208. oldBindingType = oldBinding.type;
  19209. return oldBindingType === 'camunda:out' && (oldBinding.source === newBinding.source || oldBinding.sourceExpression === newBinding.sourceExpression);
  19210. });
  19211. }
  19212. if (newBindingType === 'camunda:inputParameter') {
  19213. return minDash.find(oldProperties, function (oldProperty) {
  19214. const oldBinding = oldProperty.binding,
  19215. oldBindingName = oldBinding.name,
  19216. oldBindingType = oldBinding.type;
  19217. if (oldBindingType !== 'camunda:inputParameter') {
  19218. return;
  19219. }
  19220. return oldBindingName === newBindingName && oldBinding.scriptFormat === newBinding.scriptFormat;
  19221. });
  19222. }
  19223. if (newBindingType === 'camunda:outputParameter') {
  19224. return minDash.find(oldProperties, function (oldProperty) {
  19225. const oldBinding = oldProperty.binding,
  19226. oldBindingType = oldBinding.type;
  19227. if (oldBindingType !== 'camunda:outputParameter') {
  19228. return;
  19229. }
  19230. return oldBinding.source === newBinding.source && oldBinding.scriptFormat === newBinding.scriptFormat;
  19231. });
  19232. }
  19233. if (newBindingType === 'camunda:property') {
  19234. return minDash.find(oldProperties, function (oldProperty) {
  19235. const oldBinding = oldProperty.binding,
  19236. oldBindingName = oldBinding.name,
  19237. oldBindingType = oldBinding.type;
  19238. return oldBindingType === 'camunda:property' && oldBindingName === newBindingName;
  19239. });
  19240. }
  19241. if (newBindingType === 'camunda:errorEventDefinition') {
  19242. return minDash.find(oldProperties, function (oldProperty) {
  19243. const newBindingRef = newBinding.errorRef,
  19244. oldBinding = oldProperty.binding,
  19245. oldBindingRef = oldBinding.errorRef,
  19246. oldBindingType = oldBinding.type;
  19247. return oldBindingType === 'camunda:errorEventDefinition' && oldBindingRef === newBindingRef;
  19248. });
  19249. }
  19250. }
  19251. function findOldScopeElement(element, scopeTemplate, template) {
  19252. const scopeName = scopeTemplate.type,
  19253. id = scopeTemplate.id;
  19254. if (scopeName === 'camunda:Connector') {
  19255. return findExtension(element, 'camunda:Connector');
  19256. }
  19257. if (scopeName === 'bpmn:Error') {
  19258. // (1) find by error event definition binding
  19259. const errorEventDefinitionBinding = findErrorEventDefinitionBinding(template, id);
  19260. if (!errorEventDefinitionBinding) {
  19261. return;
  19262. } // (2) find error event definition
  19263. const errorEventDefinition = findOldBusinessObject(element, errorEventDefinitionBinding);
  19264. if (!errorEventDefinition) {
  19265. return;
  19266. } // (3) retrieve referenced error
  19267. return errorEventDefinition.errorRef;
  19268. }
  19269. }
  19270. function isRootElementScope(scopeName) {
  19271. return ['bpmn:Error'].includes(scopeName);
  19272. }
  19273. function findOldScopeTemplate(scopeTemplate, oldTemplate) {
  19274. const scopeName = scopeTemplate.type,
  19275. scopeId = scopeTemplate.id,
  19276. scopes = oldTemplate && handleLegacyScopes(oldTemplate.scopes);
  19277. return scopes && minDash.find(scopes, function (scope) {
  19278. if (isRootElementScope(scopeName)) {
  19279. return scope.id === scopeId;
  19280. }
  19281. return scope.type === scopeName;
  19282. });
  19283. }
  19284. function findErrorEventDefinitionBinding(template, templateErrorId) {
  19285. return minDash.find(template.properties, function (property) {
  19286. return property.binding.errorRef === templateErrorId;
  19287. });
  19288. }
  19289. /**
  19290. * Check whether property was changed after being set by template.
  19291. *
  19292. * @param {djs.model.Base|ModdleElement} element
  19293. * @param {Object} oldProperty
  19294. *
  19295. * @returns {boolean}
  19296. */
  19297. function propertyChanged(element, oldProperty) {
  19298. const businessObject = ModelUtil.getBusinessObject(element);
  19299. const oldBinding = oldProperty.binding,
  19300. oldBindingName = oldBinding.name,
  19301. oldBindingType = oldBinding.type,
  19302. oldPropertyValue = oldProperty.value;
  19303. let conditionExpression, definition;
  19304. if (oldBindingType === 'property') {
  19305. if (oldBindingName === 'conditionExpression') {
  19306. conditionExpression = businessObject.get('bpmn:conditionExpression');
  19307. return conditionExpression.get('bpmn:body') !== oldPropertyValue;
  19308. }
  19309. return businessObject.get(oldBindingName) !== oldPropertyValue;
  19310. }
  19311. if (oldBindingType === 'camunda:field') {
  19312. return businessObject.get('camunda:string') !== oldPropertyValue;
  19313. }
  19314. if (oldBindingType === 'camunda:in') {
  19315. if (oldBinding.expression) {
  19316. return businessObject.get('sourceExpression') !== oldPropertyValue;
  19317. } else {
  19318. return businessObject.get('camunda:source') !== oldPropertyValue;
  19319. }
  19320. }
  19321. if (oldBindingType === 'camunda:in:businessKey') {
  19322. return businessObject.get('camunda:businessKey') !== oldPropertyValue;
  19323. }
  19324. if (oldBindingType === 'camunda:out') {
  19325. return businessObject.get('camunda:target') !== oldPropertyValue;
  19326. }
  19327. if (oldBindingType === 'camunda:inputParameter') {
  19328. if (oldBinding.scriptFormat) {
  19329. definition = businessObject.get('camunda:definition');
  19330. return definition && definition.get('camunda:value') !== oldPropertyValue;
  19331. } else {
  19332. return businessObject.get('camunda:value') !== oldPropertyValue;
  19333. }
  19334. }
  19335. if (oldBindingType === 'camunda:outputParameter') {
  19336. return businessObject.get('camunda:name') !== oldPropertyValue;
  19337. }
  19338. if (oldBindingType === 'camunda:property') {
  19339. return businessObject.get('camunda:value') !== oldPropertyValue;
  19340. }
  19341. if (oldBindingType === 'camunda:errorEventDefinition') {
  19342. return businessObject.get('expression') !== oldPropertyValue;
  19343. }
  19344. }
  19345. function remove(array, item) {
  19346. const index = array.indexOf(item);
  19347. if (minDash.isUndefined(index)) {
  19348. return array;
  19349. }
  19350. array.splice(index, 1);
  19351. return array;
  19352. }
  19353. function registerHandlers(commandStack, elementTemplates, eventBus) {
  19354. commandStack.registerHandler('propertiesPanel.camunda.changeTemplate', ChangeElementTemplateHandler); // apply default element templates on shape creation
  19355. eventBus.on(['commandStack.shape.create.postExecuted'], function (context) {
  19356. applyDefaultTemplate(context.context.shape, elementTemplates, commandStack);
  19357. }); // apply default element templates on connection creation
  19358. eventBus.on(['commandStack.connection.create.postExecuted'], function (context) {
  19359. applyDefaultTemplate(context.context.connection, elementTemplates, commandStack);
  19360. });
  19361. }
  19362. registerHandlers.$inject = ['commandStack', 'elementTemplates', 'eventBus'];
  19363. var commandsModule = {
  19364. __init__: [registerHandlers]
  19365. };
  19366. function applyDefaultTemplate(element, elementTemplates, commandStack) {
  19367. if (!elementTemplates.get(element) && elementTemplates.getDefault(element)) {
  19368. const command = 'propertiesPanel.camunda.changeTemplate';
  19369. const commandContext = {
  19370. element: element,
  19371. newTemplate: elementTemplates.getDefault(element)
  19372. };
  19373. commandStack.execute(command, commandContext);
  19374. }
  19375. }
  19376. const CAMUNDA_ERROR_EVENT_DEFINITION_TYPE$1 = 'camunda:errorEventDefinition';
  19377. const CAMUNDA_EXECUTION_LISTENER_TYPE = 'camunda:executionListener';
  19378. const CAMUNDA_FIELD_TYPE = 'camunda:field';
  19379. const CAMUNDA_IN_BUSINESS_KEY_TYPE = 'camunda:in:businessKey';
  19380. const CAMUNDA_IN_TYPE = 'camunda:in';
  19381. const CAMUNDA_INPUT_PARAMETER_TYPE$1 = 'camunda:inputParameter';
  19382. const CAMUNDA_OUT_TYPE = 'camunda:out';
  19383. const CAMUNDA_OUTPUT_PARAMETER_TYPE$1 = 'camunda:outputParameter';
  19384. const CAMUNDA_PROPERTY_TYPE = 'camunda:property';
  19385. const PROPERTY_TYPE = 'property';
  19386. const EXTENSION_BINDING_TYPES = [CAMUNDA_ERROR_EVENT_DEFINITION_TYPE$1, CAMUNDA_FIELD_TYPE, CAMUNDA_IN_TYPE, CAMUNDA_IN_BUSINESS_KEY_TYPE, CAMUNDA_INPUT_PARAMETER_TYPE$1, CAMUNDA_OUT_TYPE, CAMUNDA_OUTPUT_PARAMETER_TYPE$1, CAMUNDA_PROPERTY_TYPE];
  19387. const IO_BINDING_TYPES = [CAMUNDA_INPUT_PARAMETER_TYPE$1, CAMUNDA_OUTPUT_PARAMETER_TYPE$1];
  19388. const IN_OUT_BINDING_TYPES = [CAMUNDA_IN_BUSINESS_KEY_TYPE, CAMUNDA_IN_TYPE, CAMUNDA_OUT_TYPE];
  19389. const PRIMITIVE_MODDLE_TYPES = ['Boolean', 'Integer', 'String'];
  19390. const DEFAULT_CUSTOM_GROUP = {
  19391. id: 'ElementTemplates__CustomProperties',
  19392. label: 'Custom properties'
  19393. };
  19394. function CustomProperties(props) {
  19395. const {
  19396. element,
  19397. elementTemplate
  19398. } = props;
  19399. const groups = [];
  19400. const {
  19401. id,
  19402. properties,
  19403. groups: propertyGroups,
  19404. scopes
  19405. } = elementTemplate; // (1) group properties by group id
  19406. const groupedProperties = groupByGroupId(properties);
  19407. const defaultProps = [];
  19408. minDash.forEach(groupedProperties, (properties, groupId) => {
  19409. const group = findCustomGroup(propertyGroups, groupId);
  19410. if (!group) {
  19411. return defaultProps.push(...properties);
  19412. }
  19413. addCustomGroup(groups, {
  19414. element,
  19415. id: `ElementTemplates__CustomProperties-${groupId}`,
  19416. label: group.label,
  19417. properties: properties,
  19418. templateId: `${id}-${groupId}`
  19419. });
  19420. }); // (2) add default custom props
  19421. if (defaultProps.length) {
  19422. addCustomGroup(groups, { ...DEFAULT_CUSTOM_GROUP,
  19423. element,
  19424. properties: defaultProps,
  19425. templateId: id
  19426. });
  19427. } // (3) add custom scopes props
  19428. if (minDash.isArray(scopes)) {
  19429. scopes.forEach(scope => {
  19430. const {
  19431. properties,
  19432. type
  19433. } = scope;
  19434. const id = type.replace(/:/g, '-');
  19435. addCustomGroup(groups, {
  19436. element,
  19437. id: `ElementTemplates__CustomGroup-${id}`,
  19438. label: `Custom properties for scope <${type}>`,
  19439. properties,
  19440. templateId: id,
  19441. scope
  19442. });
  19443. });
  19444. }
  19445. return groups;
  19446. }
  19447. function addCustomGroup(groups, props) {
  19448. const {
  19449. element,
  19450. id,
  19451. label,
  19452. properties,
  19453. scope,
  19454. templateId
  19455. } = props;
  19456. const customPropertiesGroup = {
  19457. id,
  19458. label,
  19459. component: propertiesPanel.Group,
  19460. entries: [],
  19461. shouldOpen: true
  19462. };
  19463. properties.forEach((property, index) => {
  19464. const entry = createCustomEntry(`custom-entry-${templateId}-${index}`, element, property, scope);
  19465. if (entry) {
  19466. customPropertiesGroup.entries.push(entry);
  19467. }
  19468. });
  19469. if (customPropertiesGroup.entries.length) {
  19470. groups.push(customPropertiesGroup);
  19471. }
  19472. }
  19473. function createCustomEntry(id, element, property, scope) {
  19474. let {
  19475. type
  19476. } = property;
  19477. if (!type) {
  19478. type = getDefaultType(property);
  19479. }
  19480. if (type === 'Boolean') {
  19481. return {
  19482. id,
  19483. component: BooleanProperty,
  19484. isEdited: propertiesPanel.isCheckboxEntryEdited,
  19485. property,
  19486. scope
  19487. };
  19488. }
  19489. if (type === 'Dropdown') {
  19490. return {
  19491. id,
  19492. component: DropdownProperty,
  19493. isEdited: propertiesPanel.isSelectEntryEdited,
  19494. property,
  19495. scope
  19496. };
  19497. }
  19498. if (type === 'String') {
  19499. return {
  19500. id,
  19501. component: StringProperty,
  19502. isEdited: propertiesPanel.isTextFieldEntryEdited,
  19503. property,
  19504. scope
  19505. };
  19506. }
  19507. if (type === 'Text') {
  19508. return {
  19509. id,
  19510. component: TextAreaProperty,
  19511. isEdited: propertiesPanel.isTextAreaEntryEdited,
  19512. property,
  19513. scope
  19514. };
  19515. }
  19516. }
  19517. function getDefaultType(property) {
  19518. const {
  19519. binding
  19520. } = property;
  19521. const {
  19522. type
  19523. } = binding;
  19524. if ([PROPERTY_TYPE, CAMUNDA_PROPERTY_TYPE, CAMUNDA_IN_TYPE, CAMUNDA_IN_BUSINESS_KEY_TYPE, CAMUNDA_OUT_TYPE, CAMUNDA_FIELD_TYPE].includes(type)) {
  19525. return 'String';
  19526. }
  19527. if (type === CAMUNDA_EXECUTION_LISTENER_TYPE) {
  19528. return 'Hidden';
  19529. }
  19530. }
  19531. function BooleanProperty(props) {
  19532. const {
  19533. element,
  19534. id,
  19535. property,
  19536. scope
  19537. } = props;
  19538. const {
  19539. description,
  19540. editable,
  19541. label
  19542. } = property;
  19543. const bpmnFactory = useService('bpmnFactory'),
  19544. commandStack = useService('commandStack');
  19545. return propertiesPanel.CheckboxEntry({
  19546. element,
  19547. getValue: propertyGetter(element, property, scope),
  19548. id,
  19549. label,
  19550. description: PropertyDescription({
  19551. description
  19552. }),
  19553. setValue: propertySetter(bpmnFactory, commandStack, element, property, scope),
  19554. disabled: editable === false
  19555. });
  19556. }
  19557. function DropdownProperty(props) {
  19558. const {
  19559. element,
  19560. id,
  19561. property,
  19562. scope
  19563. } = props;
  19564. const {
  19565. description,
  19566. editable,
  19567. label
  19568. } = property;
  19569. const bpmnFactory = useService('bpmnFactory'),
  19570. commandStack = useService('commandStack');
  19571. const getOptions = () => {
  19572. const {
  19573. choices
  19574. } = property;
  19575. return choices.map(({
  19576. name,
  19577. value
  19578. }) => {
  19579. return {
  19580. label: name,
  19581. value
  19582. };
  19583. });
  19584. };
  19585. return propertiesPanel.SelectEntry({
  19586. element,
  19587. id,
  19588. label,
  19589. getOptions,
  19590. description: PropertyDescription({
  19591. description
  19592. }),
  19593. getValue: propertyGetter(element, property, scope),
  19594. setValue: propertySetter(bpmnFactory, commandStack, element, property, scope),
  19595. disabled: editable === false
  19596. });
  19597. }
  19598. function StringProperty(props) {
  19599. const {
  19600. element,
  19601. id,
  19602. property,
  19603. scope
  19604. } = props;
  19605. const {
  19606. description,
  19607. editable,
  19608. label
  19609. } = property;
  19610. const bpmnFactory = useService('bpmnFactory'),
  19611. commandStack = useService('commandStack'),
  19612. debounce = useService('debounceInput'),
  19613. translate = useService('translate');
  19614. return propertiesPanel.TextFieldEntry({
  19615. debounce,
  19616. element,
  19617. getValue: propertyGetter(element, property, scope),
  19618. id,
  19619. label,
  19620. description: PropertyDescription({
  19621. description
  19622. }),
  19623. setValue: propertySetter(bpmnFactory, commandStack, element, property, scope),
  19624. validate: propertyValidator(translate, property),
  19625. disabled: editable === false
  19626. });
  19627. }
  19628. function TextAreaProperty(props) {
  19629. const {
  19630. element,
  19631. id,
  19632. property,
  19633. scope
  19634. } = props;
  19635. const {
  19636. description,
  19637. editable,
  19638. label
  19639. } = property;
  19640. const bpmnFactory = useService('bpmnFactory'),
  19641. commandStack = useService('commandStack'),
  19642. debounce = useService('debounceInput');
  19643. return propertiesPanel.TextAreaEntry({
  19644. debounce,
  19645. element,
  19646. id,
  19647. label,
  19648. description: PropertyDescription({
  19649. description
  19650. }),
  19651. getValue: propertyGetter(element, property, scope),
  19652. setValue: propertySetter(bpmnFactory, commandStack, element, property, scope),
  19653. disabled: editable === false
  19654. });
  19655. }
  19656. function propertyGetter(element, property, scope) {
  19657. return function getValue() {
  19658. let businessObject = ModelUtil.getBusinessObject(element);
  19659. const {
  19660. binding,
  19661. value: defaultValue = ''
  19662. } = property;
  19663. const {
  19664. name,
  19665. type
  19666. } = binding;
  19667. if (scope) {
  19668. businessObject = getScopeBusinessObject(businessObject, scope);
  19669. if (!businessObject) {
  19670. return defaultValue;
  19671. }
  19672. } // property
  19673. if (type === 'property') {
  19674. const value = businessObject.get(name);
  19675. if (name === 'conditionExpression') {
  19676. if (value) {
  19677. return value.get('body');
  19678. }
  19679. return defaultValue;
  19680. } else {
  19681. if (!minDash.isUndefined(value)) {
  19682. return value;
  19683. }
  19684. return defaultValue;
  19685. }
  19686. } // camunda:ErrorEventDefinition
  19687. if (type === CAMUNDA_ERROR_EVENT_DEFINITION_TYPE$1) {
  19688. const {
  19689. errorRef
  19690. } = binding;
  19691. const errorEventDefinition = findCamundaErrorEventDefinition(businessObject, errorRef);
  19692. if (errorEventDefinition) {
  19693. return errorEventDefinition.get('camunda:expression');
  19694. } else {
  19695. return '';
  19696. }
  19697. } // camunda:Field
  19698. if (type === CAMUNDA_FIELD_TYPE) {
  19699. const camundaFields = findExtensions(businessObject, ['camunda:Field']);
  19700. const camundaField = camundaFields.find(camundaField => {
  19701. return camundaField.get('camunda:name') === name;
  19702. });
  19703. if (camundaField) {
  19704. return camundaField.get('camunda:string') || camundaField.get('camunda:expression');
  19705. } else {
  19706. return '';
  19707. }
  19708. } // camunda:Property
  19709. if (type === CAMUNDA_PROPERTY_TYPE) {
  19710. let camundaProperties;
  19711. if (scope) {
  19712. // TODO(philippfromme): as ony bpmn:Error and camunda:Connector are supported this code is practically dead
  19713. camundaProperties = businessObject.get('properties');
  19714. } else {
  19715. camundaProperties = findExtension(businessObject, 'camunda:Properties');
  19716. }
  19717. if (camundaProperties) {
  19718. const camundaProperty = findCamundaProperty(camundaProperties, binding);
  19719. if (camundaProperty) {
  19720. return camundaProperty.get('camunda:value');
  19721. }
  19722. }
  19723. return defaultValue;
  19724. }
  19725. if (IO_BINDING_TYPES.includes(type)) {
  19726. let inputOutput;
  19727. if (scope) {
  19728. inputOutput = businessObject.get('inputOutput');
  19729. } else {
  19730. inputOutput = findExtension(businessObject, 'camunda:InputOutput');
  19731. }
  19732. if (!inputOutput) {
  19733. return defaultValue;
  19734. } // camunda:InputParameter
  19735. if (type === CAMUNDA_INPUT_PARAMETER_TYPE$1) {
  19736. const inputParameter = findInputParameter(inputOutput, binding);
  19737. if (inputParameter) {
  19738. const {
  19739. scriptFormat
  19740. } = binding;
  19741. if (scriptFormat) {
  19742. const definition = inputParameter.get('camunda:definition');
  19743. if (definition) {
  19744. return definition.get('camunda:value');
  19745. }
  19746. } else {
  19747. return inputParameter.get('value') || '';
  19748. }
  19749. }
  19750. return defaultValue;
  19751. } // camunda:OutputParameter
  19752. if (type === CAMUNDA_OUTPUT_PARAMETER_TYPE$1) {
  19753. const outputParameter = findOutputParameter(inputOutput, binding);
  19754. if (outputParameter) {
  19755. return outputParameter.get('camunda:name');
  19756. }
  19757. return defaultValue;
  19758. }
  19759. } // camunda:In and camunda:Out
  19760. if (IN_OUT_BINDING_TYPES.includes(type)) {
  19761. const camundaInOut = findCamundaInOut(businessObject, binding);
  19762. if (camundaInOut) {
  19763. if (type === CAMUNDA_IN_BUSINESS_KEY_TYPE) {
  19764. return camundaInOut.get('camunda:businessKey');
  19765. } else if (type === CAMUNDA_OUT_TYPE) {
  19766. return camundaInOut.get('camunda:target');
  19767. } else if (type === CAMUNDA_IN_TYPE) {
  19768. const {
  19769. expression
  19770. } = binding;
  19771. if (expression) {
  19772. return camundaInOut.get('camunda:sourceExpression');
  19773. } else {
  19774. return camundaInOut.get('camunda:source');
  19775. }
  19776. }
  19777. }
  19778. return defaultValue;
  19779. } // should never throw as templates are validated beforehand
  19780. throw unknownBindingError(element, property);
  19781. };
  19782. }
  19783. function propertySetter(bpmnFactory, commandStack, element, property, scope) {
  19784. return function setValue(value) {
  19785. let businessObject = ModelUtil.getBusinessObject(element);
  19786. const {
  19787. binding
  19788. } = property;
  19789. const {
  19790. name,
  19791. type
  19792. } = binding;
  19793. const rootElement = getRoot(businessObject);
  19794. let extensionElements;
  19795. let propertyValue;
  19796. const commands = [];
  19797. if (EXTENSION_BINDING_TYPES.includes(type)) {
  19798. extensionElements = businessObject.get('extensionElements');
  19799. if (!extensionElements) {
  19800. extensionElements = createElement('bpmn:ExtensionElements', null, businessObject, bpmnFactory);
  19801. commands.push({
  19802. cmd: 'element.updateModdleProperties',
  19803. context: {
  19804. element,
  19805. moddleElement: businessObject,
  19806. properties: {
  19807. extensionElements
  19808. }
  19809. }
  19810. });
  19811. }
  19812. }
  19813. if (scope) {
  19814. businessObject = getScopeBusinessObject(businessObject, scope);
  19815. if (!businessObject) {
  19816. // bpmn:Error
  19817. if (scope.type === 'bpmn:Error') {
  19818. businessObject = createError(scope.id, rootElement, bpmnFactory);
  19819. commands.push({
  19820. cmd: 'element.updateModdleProperties',
  19821. context: {
  19822. element,
  19823. moddleElement: rootElement,
  19824. properties: {
  19825. rootElements: [...rootElement.get('rootElements'), businessObject]
  19826. }
  19827. }
  19828. });
  19829. } else {
  19830. businessObject = createElement(scope.type, null, element, bpmnFactory);
  19831. commands.push({
  19832. cmd: 'element.updateModdleProperties',
  19833. context: {
  19834. element,
  19835. moddleElement: extensionElements,
  19836. properties: {
  19837. values: [...extensionElements.get('values'), businessObject]
  19838. }
  19839. }
  19840. });
  19841. }
  19842. }
  19843. } // property
  19844. if (type === 'property') {
  19845. if (name === 'conditionExpression') {
  19846. const {
  19847. scriptFormat
  19848. } = binding;
  19849. propertyValue = createElement('bpmn:FormalExpression', {
  19850. body: value,
  19851. language: scriptFormat
  19852. }, businessObject, bpmnFactory);
  19853. } else {
  19854. const propertyDescriptor = businessObject.$descriptor.propertiesByName[name];
  19855. const {
  19856. type: propertyType
  19857. } = propertyDescriptor; // do not override non-primitive types
  19858. if (!PRIMITIVE_MODDLE_TYPES.includes(propertyType)) {
  19859. throw new Error(`cannot set property of type <${propertyType}>`);
  19860. }
  19861. if (propertyType === 'Boolean') {
  19862. propertyValue = !!value;
  19863. } else if (propertyType === 'Integer') {
  19864. propertyValue = parseInt(value, 10);
  19865. if (isNaN(propertyValue)) {
  19866. // do not set NaN value
  19867. propertyValue = undefined;
  19868. }
  19869. } else {
  19870. // make sure we don't remove the property
  19871. propertyValue = value || '';
  19872. }
  19873. }
  19874. if (!minDash.isUndefined(propertyValue)) {
  19875. commands.push({
  19876. cmd: 'element.updateModdleProperties',
  19877. context: {
  19878. element,
  19879. moddleElement: businessObject,
  19880. properties: {
  19881. [name]: propertyValue
  19882. }
  19883. }
  19884. });
  19885. }
  19886. } // camunda:ErrorEventDefinition
  19887. if (type === CAMUNDA_ERROR_EVENT_DEFINITION_TYPE$1) {
  19888. const {
  19889. errorRef
  19890. } = binding;
  19891. const oldCamundaErrorEventDefinition = findCamundaErrorEventDefinition(businessObject, errorRef);
  19892. if (oldCamundaErrorEventDefinition) {
  19893. commands.push({
  19894. cmd: 'element.updateModdleProperties',
  19895. context: {
  19896. element,
  19897. moddleElement: oldCamundaErrorEventDefinition,
  19898. properties: {
  19899. 'camunda:expression': value
  19900. }
  19901. }
  19902. });
  19903. } else {
  19904. const newError = createError(binding.errorRef, rootElement, bpmnFactory),
  19905. newCamundaErrorEventDefinition = createCamundaErrorEventDefinition(value, newError, extensionElements, bpmnFactory);
  19906. commands.push({
  19907. cmd: 'element.updateModdleProperties',
  19908. context: {
  19909. element,
  19910. moddleElement: rootElement,
  19911. properties: {
  19912. rootElements: [...rootElement.get('rootElements'), newError]
  19913. }
  19914. }
  19915. });
  19916. commands.push({
  19917. cmd: 'element.updateModdleProperties',
  19918. context: {
  19919. element,
  19920. moddleElement: extensionElements,
  19921. properties: {
  19922. values: [...extensionElements.get('values'), newCamundaErrorEventDefinition]
  19923. }
  19924. }
  19925. });
  19926. }
  19927. } // camunda:Field
  19928. if (type === CAMUNDA_FIELD_TYPE) {
  19929. const oldCamundaFields = findExtensions(businessObject, ['camunda:Field']);
  19930. const newCamundaFields = [];
  19931. if (oldCamundaFields.length) {
  19932. oldCamundaFields.forEach(camundaField => {
  19933. if (camundaField.name === name) {
  19934. newCamundaFields.push(createCamundaFieldInjection(binding, value, bpmnFactory));
  19935. } else {
  19936. newCamundaFields.push(camundaField);
  19937. }
  19938. });
  19939. } else {
  19940. newCamundaFields.push(createCamundaFieldInjection(binding, value, bpmnFactory));
  19941. }
  19942. const values = extensionElements.get('values').filter(value => !oldCamundaFields.includes(value));
  19943. commands.push({
  19944. cmd: 'element.updateModdleProperties',
  19945. context: {
  19946. element,
  19947. moddleElement: extensionElements,
  19948. properties: {
  19949. values: [...values, ...newCamundaFields]
  19950. }
  19951. }
  19952. });
  19953. } // camunda:Property
  19954. if (type === CAMUNDA_PROPERTY_TYPE) {
  19955. let camundaProperties;
  19956. if (scope) {
  19957. camundaProperties = businessObject.get('properties');
  19958. } else {
  19959. camundaProperties = findExtension(extensionElements, 'camunda:Properties');
  19960. }
  19961. if (!camundaProperties) {
  19962. camundaProperties = createElement('camunda:Properties', null, businessObject, bpmnFactory);
  19963. if (scope) {
  19964. commands.push({
  19965. cmd: 'element.updateModdleProperties',
  19966. context: {
  19967. element,
  19968. moddleElement: businessObject,
  19969. properties: {
  19970. properties: camundaProperties
  19971. }
  19972. }
  19973. });
  19974. } else {
  19975. commands.push({
  19976. cmd: 'element.updateModdleProperties',
  19977. context: {
  19978. element,
  19979. moddleElement: extensionElements,
  19980. properties: {
  19981. values: [...extensionElements.get('values'), camundaProperties]
  19982. }
  19983. }
  19984. });
  19985. }
  19986. }
  19987. const oldCamundaProperty = findCamundaProperty(camundaProperties, binding);
  19988. const newCamundaProperty = createCamundaProperty(binding, value, bpmnFactory);
  19989. const values = camundaProperties.get('values').filter(value => value !== oldCamundaProperty);
  19990. commands.push({
  19991. cmd: 'element.updateModdleProperties',
  19992. context: {
  19993. element,
  19994. moddleElement: camundaProperties,
  19995. properties: {
  19996. values: [...values, newCamundaProperty]
  19997. }
  19998. }
  19999. });
  20000. }
  20001. if (IO_BINDING_TYPES.includes(type)) {
  20002. let inputOutput;
  20003. if (scope) {
  20004. inputOutput = businessObject.get('inputOutput');
  20005. } else {
  20006. inputOutput = findExtension(extensionElements, 'camunda:InputOutput');
  20007. }
  20008. if (!inputOutput) {
  20009. inputOutput = createElement('camunda:InputOutput', null, businessObject, bpmnFactory);
  20010. if (scope) {
  20011. commands.push({
  20012. cmd: 'element.updateModdleProperties',
  20013. context: {
  20014. element,
  20015. moddleElement: businessObject,
  20016. properties: {
  20017. inputOutput
  20018. }
  20019. }
  20020. });
  20021. } else {
  20022. commands.push({
  20023. cmd: 'element.updateModdleProperties',
  20024. context: {
  20025. element,
  20026. moddleElement: extensionElements,
  20027. properties: {
  20028. values: [...extensionElements.get('values'), inputOutput]
  20029. }
  20030. }
  20031. });
  20032. }
  20033. } // camunda:InputParameter
  20034. if (type === CAMUNDA_INPUT_PARAMETER_TYPE$1) {
  20035. const oldCamundaInputParameter = findInputParameter(inputOutput, binding);
  20036. const newCamundaInputParameter = createInputParameter(binding, value, bpmnFactory);
  20037. const values = inputOutput.get('camunda:inputParameters').filter(value => value !== oldCamundaInputParameter);
  20038. commands.push({
  20039. cmd: 'element.updateModdleProperties',
  20040. context: {
  20041. element,
  20042. moddleElement: inputOutput,
  20043. properties: {
  20044. 'camunda:inputParameters': [...values, newCamundaInputParameter]
  20045. }
  20046. }
  20047. });
  20048. } // camunda:OutputParameter
  20049. if (type === CAMUNDA_OUTPUT_PARAMETER_TYPE$1) {
  20050. const oldCamundaOutputParameter = findOutputParameter(inputOutput, binding);
  20051. const newCamundaOutputParameter = createOutputParameter(binding, value, bpmnFactory);
  20052. const values = inputOutput.get('camunda:outputParameters').filter(value => value !== oldCamundaOutputParameter);
  20053. commands.push({
  20054. cmd: 'element.updateModdleProperties',
  20055. context: {
  20056. element,
  20057. moddleElement: inputOutput,
  20058. properties: {
  20059. 'camunda:outputParameters': [...values, newCamundaOutputParameter]
  20060. }
  20061. }
  20062. });
  20063. }
  20064. } // camunda:In and camunda:Out
  20065. if (IN_OUT_BINDING_TYPES.includes(type)) {
  20066. const oldCamundaInOut = findCamundaInOut(businessObject, binding);
  20067. let newCamundaInOut;
  20068. if (type === CAMUNDA_IN_TYPE) {
  20069. newCamundaInOut = createCamundaIn(binding, value, bpmnFactory);
  20070. } else if (type === CAMUNDA_OUT_TYPE) {
  20071. newCamundaInOut = createCamundaOut(binding, value, bpmnFactory);
  20072. } else {
  20073. newCamundaInOut = createCamundaInWithBusinessKey(value, bpmnFactory);
  20074. }
  20075. const values = extensionElements.get('values').filter(value => value !== oldCamundaInOut);
  20076. commands.push({
  20077. cmd: 'element.updateModdleProperties',
  20078. context: {
  20079. element,
  20080. moddleElement: extensionElements,
  20081. properties: {
  20082. values: [...values, newCamundaInOut]
  20083. }
  20084. }
  20085. });
  20086. }
  20087. if (commands.length) {
  20088. commandStack.execute('properties-panel.multi-command-executor', commands);
  20089. return;
  20090. } // should never throw as templates are validated beforehand
  20091. throw unknownBindingError(element, property);
  20092. };
  20093. }
  20094. function propertyValidator(translate, property) {
  20095. return function validate(value) {
  20096. const {
  20097. constraints = {}
  20098. } = property;
  20099. const {
  20100. maxLength,
  20101. minLength,
  20102. notEmpty
  20103. } = constraints;
  20104. if (notEmpty && isEmptyString(value)) {
  20105. return translate('Must not be empty.');
  20106. }
  20107. if (maxLength && value.length > maxLength) {
  20108. return translate('Must have max length {maxLength}.', {
  20109. maxLength
  20110. });
  20111. }
  20112. if (minLength && value.length < minLength) {
  20113. return translate('Must have min length {minLength}.', {
  20114. minLength
  20115. });
  20116. }
  20117. let {
  20118. pattern
  20119. } = constraints;
  20120. if (pattern) {
  20121. let message;
  20122. if (!minDash.isString(pattern)) {
  20123. message = pattern.message;
  20124. pattern = pattern.value;
  20125. }
  20126. if (!matchesPattern(value, pattern)) {
  20127. return message || translate('Must match pattern {pattern}.', {
  20128. pattern
  20129. });
  20130. }
  20131. }
  20132. };
  20133. }
  20134. function getScopeBusinessObject(businessObject, scope) {
  20135. const {
  20136. id,
  20137. type
  20138. } = scope;
  20139. if (type === 'bpmn:Error') {
  20140. // retrieve error through referenced error event definition
  20141. const errorEventDefinition = findCamundaErrorEventDefinition(businessObject, id);
  20142. if (errorEventDefinition) {
  20143. return errorEventDefinition.get('errorRef');
  20144. }
  20145. }
  20146. return findExtension(businessObject, type);
  20147. }
  20148. function unknownBindingError(element, property) {
  20149. const businessObject = ModelUtil.getBusinessObject(element);
  20150. const id = businessObject.get('id');
  20151. const {
  20152. binding
  20153. } = property;
  20154. const {
  20155. type
  20156. } = binding;
  20157. return new Error(`unknown binding <${type}> for element <${id}>, this should never happen`);
  20158. }
  20159. function isEmptyString(string) {
  20160. return !string || !string.trim().length;
  20161. }
  20162. function matchesPattern(string, pattern) {
  20163. return new RegExp(pattern).test(string);
  20164. }
  20165. function groupByGroupId(properties) {
  20166. return minDash.groupBy(properties, 'group');
  20167. }
  20168. function findCustomGroup(groups, id) {
  20169. return minDash.find(groups, g => g.id === id);
  20170. }
  20171. function ErrorProperties(props) {
  20172. const {
  20173. element,
  20174. index,
  20175. property
  20176. } = props;
  20177. const {
  20178. binding,
  20179. label
  20180. } = property;
  20181. const {
  20182. errorRef
  20183. } = binding;
  20184. const businessObject = ModelUtil.getBusinessObject(element),
  20185. errorEventDefinitions = findExtensions(businessObject, ['camunda:ErrorEventDefinition']);
  20186. if (!errorEventDefinitions.length) {
  20187. return;
  20188. }
  20189. const errorEventDefinition = findCamundaErrorEventDefinition(element, errorRef);
  20190. const id = `${element.id}-errorEventDefinition-${index}`;
  20191. let entries = [];
  20192. entries = Error$1({
  20193. idPrefix: id,
  20194. element,
  20195. errorEventDefinition
  20196. }); // (1) remove global error referenced entry
  20197. // entries.shift();
  20198. entries = removeEntry$1(entries, '-errorRef'); // (2) remove throw expression input
  20199. // entries.pop();
  20200. entries = removeEntry$1(entries, '-expression'); // (3) add disabled throw expression input
  20201. entries.push({
  20202. id: `${id}-expression`,
  20203. component: Expression,
  20204. errorEventDefinition,
  20205. property
  20206. });
  20207. const item = {
  20208. id,
  20209. label: label || getErrorLabel(errorEventDefinition),
  20210. entries
  20211. };
  20212. return item;
  20213. }
  20214. function Expression(props) {
  20215. const {
  20216. errorEventDefinition,
  20217. id
  20218. } = props;
  20219. const translate = useService('translate');
  20220. const debounce = useService('debounceInput');
  20221. const setValue = () => {};
  20222. const getValue = () => {
  20223. return errorEventDefinition.get('camunda:expression');
  20224. };
  20225. return propertiesPanel.TextFieldEntry({
  20226. element: errorEventDefinition,
  20227. id,
  20228. label: translate('Throw expression'),
  20229. getValue,
  20230. setValue,
  20231. debounce,
  20232. disabled: true
  20233. });
  20234. }
  20235. function removeEntry$1(entries, suffix) {
  20236. const entry = entries.find(({
  20237. id
  20238. }) => id.endsWith(suffix));
  20239. return minDash.without(entries, entry);
  20240. }
  20241. function InputProperties(props) {
  20242. const {
  20243. element,
  20244. index,
  20245. property
  20246. } = props;
  20247. const {
  20248. binding,
  20249. description,
  20250. label
  20251. } = property;
  20252. const {
  20253. name
  20254. } = binding;
  20255. const businessObject = ModelUtil.getBusinessObject(element),
  20256. inputOutput = findExtension(businessObject, 'camunda:InputOutput');
  20257. const inputParameter = inputOutput && findInputParameter(inputOutput, binding);
  20258. const id = `${element.id}-inputParameter-${index}`;
  20259. let entries = [];
  20260. if (inputParameter) {
  20261. entries = InputOutputParameter({
  20262. idPrefix: id,
  20263. element,
  20264. parameter: inputParameter
  20265. }); // (1) remove name entry
  20266. entries = removeEntry(entries, '-name');
  20267. } // (2) add local variable assignment entry
  20268. entries.unshift({
  20269. id: `${id}-local-variable-assignment`,
  20270. component: LocalVariableAssignment,
  20271. inputParameter,
  20272. property
  20273. }); // (3) add description entry
  20274. if (description) {
  20275. entries.unshift({
  20276. id: `${id}-description`,
  20277. component: Description$1,
  20278. text: description
  20279. });
  20280. } // @barmac: binding#name is required so there is no third option
  20281. const item = {
  20282. id,
  20283. label: label || name,
  20284. entries
  20285. };
  20286. return item;
  20287. } // TODO(philippfromme): add text entry to properties-panel
  20288. function Description$1(props) {
  20289. const {
  20290. id,
  20291. text
  20292. } = props;
  20293. return jsxRuntime.jsx("div", {
  20294. class: "bio-properties-panel-entry",
  20295. "data-entry-id": id,
  20296. children: jsxRuntime.jsx("div", {
  20297. class: "bio-properties-panel-description",
  20298. children: jsxRuntime.jsx(PropertyDescription, {
  20299. description: text
  20300. })
  20301. })
  20302. });
  20303. }
  20304. function LocalVariableAssignment(props) {
  20305. const {
  20306. element,
  20307. id,
  20308. property,
  20309. inputParameter
  20310. } = props;
  20311. const {
  20312. binding
  20313. } = property;
  20314. const bpmnFactory = useService('bpmnFactory'),
  20315. modeling = useService('modeling'),
  20316. translate = useService('translate');
  20317. const getValue = () => {
  20318. return inputParameter;
  20319. };
  20320. const setValue = value => {
  20321. if (value) {
  20322. addInputParameter(element, property, bpmnFactory, modeling);
  20323. } else {
  20324. removeInputParameter(element, binding, modeling);
  20325. }
  20326. };
  20327. return propertiesPanel.ToggleSwitchEntry({
  20328. id,
  20329. label: translate('Local variable assignment'),
  20330. switcherLabel: inputParameter ? translate('On') : translate('Off'),
  20331. description: inputParameter ? '' : translate('Parameter won\'t be created as local variable.'),
  20332. getValue,
  20333. setValue
  20334. });
  20335. }
  20336. function addInputParameter(element, property, bpmnFactory, modeling) {
  20337. const {
  20338. binding,
  20339. value
  20340. } = property;
  20341. const businessObject = ModelUtil.getBusinessObject(element);
  20342. const extensionElements = businessObject.get('extensionElements');
  20343. const inputOutput = findExtension(businessObject, 'camunda:InputOutput');
  20344. let updatedBusinessObject, update;
  20345. if (!extensionElements) {
  20346. updatedBusinessObject = businessObject;
  20347. const extensionElements = createExtensionElements$1(businessObject, bpmnFactory),
  20348. inputOutput = createInputOutput$1(binding, value, bpmnFactory, extensionElements);
  20349. extensionElements.values.push(inputOutput);
  20350. update = {
  20351. extensionElements
  20352. };
  20353. } else if (!inputOutput) {
  20354. updatedBusinessObject = extensionElements;
  20355. const inputOutput = createInputOutput$1(binding, value, bpmnFactory, extensionElements);
  20356. update = {
  20357. values: extensionElements.get('values').concat(inputOutput)
  20358. };
  20359. } else {
  20360. updatedBusinessObject = inputOutput;
  20361. const inputParameter = createInputParameter(binding, value, bpmnFactory);
  20362. inputParameter.$parent = inputOutput;
  20363. update = {
  20364. inputParameters: inputOutput.get('camunda:inputParameters').concat(inputParameter)
  20365. };
  20366. }
  20367. modeling.updateModdleProperties(element, updatedBusinessObject, update);
  20368. }
  20369. function removeInputParameter(element, binding, modeling) {
  20370. const businessObject = ModelUtil.getBusinessObject(element);
  20371. const inputOutput = findExtension(businessObject, 'camunda:InputOutput'),
  20372. inputParameters = inputOutput.get('camunda:inputParameters');
  20373. const inputParameter = findInputParameter(inputOutput, binding);
  20374. modeling.updateModdleProperties(element, inputOutput, {
  20375. inputParameters: minDash.without(inputParameters, inputParameter)
  20376. });
  20377. }
  20378. function removeEntry(entries, suffix) {
  20379. const entry = entries.find(({
  20380. id
  20381. }) => id.endsWith(suffix));
  20382. return minDash.without(entries, entry);
  20383. }
  20384. function createExtensionElements$1(businessObject, bpmnFactory) {
  20385. return createElement('bpmn:ExtensionElements', {
  20386. values: []
  20387. }, businessObject, bpmnFactory);
  20388. }
  20389. function createInputOutput$1(binding, value, bpmnFactory, extensionElements) {
  20390. const inputParameter = createInputParameter(binding, value, bpmnFactory);
  20391. const inputOutput = createElement('camunda:InputOutput', {
  20392. inputParameters: [inputParameter],
  20393. outputParameters: []
  20394. }, extensionElements, bpmnFactory);
  20395. inputParameter.$parent = inputOutput;
  20396. return inputOutput;
  20397. }
  20398. function OutputProperties(props) {
  20399. const {
  20400. element,
  20401. index,
  20402. injector,
  20403. property
  20404. } = props;
  20405. const {
  20406. binding,
  20407. description,
  20408. label
  20409. } = property;
  20410. const {
  20411. name
  20412. } = binding;
  20413. const businessObject = ModelUtil.getBusinessObject(element),
  20414. inputOutput = findExtension(businessObject, 'camunda:InputOutput');
  20415. const translate = injector.get('translate');
  20416. const outputParameter = inputOutput && findOutputParameter(inputOutput, binding);
  20417. const id = `${element.id}-outputParameter-${index}`;
  20418. let entries = []; // (1) add description entry
  20419. if (description) {
  20420. entries.push({
  20421. id: `${id}-description`,
  20422. component: Description,
  20423. text: description
  20424. });
  20425. } // (2) add local variable assignment entry
  20426. entries.push({
  20427. id: `${id}-local-variable-assignment`,
  20428. component: ProcessVariableAssignment,
  20429. outputParameter,
  20430. property
  20431. });
  20432. if (outputParameter) {
  20433. // (3) add assign to process variable entry
  20434. entries.push({
  20435. id: `${id}-assign-to-process-variable`,
  20436. component: AssignToProcessVariable,
  20437. property
  20438. });
  20439. }
  20440. const item = {
  20441. id,
  20442. label: label || name || translate('<unnamed>'),
  20443. entries
  20444. };
  20445. return item;
  20446. } // TODO(philippfromme): add text entry to properties-panel
  20447. function Description(props) {
  20448. const {
  20449. id,
  20450. text
  20451. } = props;
  20452. return jsxRuntime.jsx("div", {
  20453. class: "bio-properties-panel-entry",
  20454. "data-entry-id": id,
  20455. children: jsxRuntime.jsx("div", {
  20456. class: "bio-properties-panel-description",
  20457. children: jsxRuntime.jsx(PropertyDescription, {
  20458. description: text
  20459. })
  20460. })
  20461. });
  20462. }
  20463. function ProcessVariableAssignment(props) {
  20464. const {
  20465. element,
  20466. id,
  20467. property,
  20468. outputParameter
  20469. } = props;
  20470. const {
  20471. binding
  20472. } = property;
  20473. const bpmnFactory = useService('bpmnFactory'),
  20474. modeling = useService('modeling'),
  20475. translate = useService('translate');
  20476. const getValue = () => {
  20477. return outputParameter;
  20478. };
  20479. const setValue = value => {
  20480. if (value) {
  20481. addOutputParameter(element, property, bpmnFactory, modeling);
  20482. } else {
  20483. removeOutputParameter(element, binding, modeling);
  20484. }
  20485. };
  20486. return propertiesPanel.ToggleSwitchEntry({
  20487. id,
  20488. label: translate('Process variable assignment'),
  20489. switcherLabel: outputParameter ? translate('On') : translate('Off'),
  20490. description: outputParameter ? '' : translate('Parameter won\'t be available in process scope.'),
  20491. getValue,
  20492. setValue
  20493. });
  20494. }
  20495. function AssignToProcessVariable(props) {
  20496. const {
  20497. element,
  20498. id,
  20499. property
  20500. } = props;
  20501. const {
  20502. binding
  20503. } = property;
  20504. const inputOutput = findExtension(element, 'camunda:InputOutput'),
  20505. outputParameter = findOutputParameter(inputOutput, binding);
  20506. const commandStack = useService('commandStack'),
  20507. debounce = useService('debounceInput'),
  20508. translate = useService('translate');
  20509. const setValue = value => {
  20510. commandStack.execute('element.updateModdleProperties', {
  20511. element,
  20512. moddleElement: outputParameter,
  20513. properties: {
  20514. name: value
  20515. }
  20516. });
  20517. };
  20518. const getValue = () => {
  20519. return outputParameter.get('camunda:name');
  20520. };
  20521. const validate = value => {
  20522. if (!value) {
  20523. return translate('Process variable name must not be empty.');
  20524. } else if (containsSpace(value)) {
  20525. return translate('Process variable name must not contain spaces.');
  20526. }
  20527. };
  20528. return propertiesPanel.TextFieldEntry({
  20529. debounce,
  20530. element: outputParameter,
  20531. id,
  20532. label: translate('Assign to process variable'),
  20533. getValue,
  20534. setValue,
  20535. validate
  20536. });
  20537. }
  20538. function addOutputParameter(element, property, bpmnFactory, modeling) {
  20539. const {
  20540. binding,
  20541. value
  20542. } = property;
  20543. const businessObject = ModelUtil.getBusinessObject(element);
  20544. const extensionElements = businessObject.get('extensionElements');
  20545. const inputOutput = findExtension(businessObject, 'camunda:InputOutput');
  20546. let updatedBusinessObject, update;
  20547. if (!extensionElements) {
  20548. updatedBusinessObject = businessObject;
  20549. const extensionElements = createExtensionElements(businessObject, bpmnFactory),
  20550. inputOutput = createInputOutput(binding, value, bpmnFactory, extensionElements);
  20551. extensionElements.values.push(inputOutput);
  20552. update = {
  20553. extensionElements
  20554. };
  20555. } else if (!inputOutput) {
  20556. updatedBusinessObject = extensionElements;
  20557. const inputOutput = createInputOutput(binding, value, bpmnFactory, extensionElements);
  20558. update = {
  20559. values: extensionElements.get('values').concat(inputOutput)
  20560. };
  20561. } else {
  20562. updatedBusinessObject = inputOutput;
  20563. const outputParameter = createOutputParameter(binding, value, bpmnFactory);
  20564. outputParameter.$parent = inputOutput;
  20565. update = {
  20566. outputParameters: inputOutput.get('camunda:outputParameters').concat(outputParameter)
  20567. };
  20568. }
  20569. modeling.updateModdleProperties(element, updatedBusinessObject, update);
  20570. }
  20571. function removeOutputParameter(element, binding, modeling) {
  20572. const businessObject = ModelUtil.getBusinessObject(element);
  20573. const inputOutput = findExtension(businessObject, 'camunda:InputOutput'),
  20574. outputParameters = inputOutput.get('camunda:outputParameters');
  20575. const outputParameter = findOutputParameter(inputOutput, binding);
  20576. modeling.updateModdleProperties(element, inputOutput, {
  20577. outputParameters: minDash.without(outputParameters, outputParameter)
  20578. });
  20579. }
  20580. function createExtensionElements(businessObject, bpmnFactory) {
  20581. return createElement('bpmn:ExtensionElements', {
  20582. values: []
  20583. }, businessObject, bpmnFactory);
  20584. }
  20585. function createInputOutput(binding, value, bpmnFactory, extensionElements) {
  20586. const outputParameter = createOutputParameter(binding, value, bpmnFactory);
  20587. const inputOutput = createElement('camunda:InputOutput', {
  20588. inputParameters: [],
  20589. outputParameters: [outputParameter]
  20590. }, extensionElements, bpmnFactory);
  20591. outputParameter.$parent = inputOutput;
  20592. return inputOutput;
  20593. }
  20594. const CAMUNDA_ERROR_EVENT_DEFINITION_TYPE = 'camunda:errorEventDefinition',
  20595. CAMUNDA_INPUT_PARAMETER_TYPE = 'camunda:inputParameter',
  20596. CAMUNDA_OUTPUT_PARAMETER_TYPE = 'camunda:outputParameter';
  20597. const LOWER_PRIORITY = 300;
  20598. class ElementTemplatesPropertiesProvider {
  20599. constructor(elementTemplates, propertiesPanel, injector) {
  20600. propertiesPanel.registerProvider(LOWER_PRIORITY, this);
  20601. this._elementTemplates = elementTemplates;
  20602. this._injector = injector;
  20603. }
  20604. getGroups(element) {
  20605. return groups => {
  20606. const injector = this._injector;
  20607. if (!this._shouldShowTemplateProperties(element)) {
  20608. return groups;
  20609. } // (0) Copy provided groups
  20610. groups = groups.slice();
  20611. const templatesGroup = {
  20612. element,
  20613. id: 'ElementTemplates__Template',
  20614. label: 'Template',
  20615. component: createElementTemplatesGroup(),
  20616. entries: TemplateProps({
  20617. element,
  20618. elementTemplates: this._elementTemplates
  20619. })
  20620. }; // (1) Add templates group
  20621. addGroupsAfter('documentation', groups, [templatesGroup]);
  20622. const elementTemplate = this._elementTemplates.get(element);
  20623. if (elementTemplate) {
  20624. const templateSpecificGroups = [].concat(createInputGroup(element, elementTemplate, injector) || [], createOutputGroup(element, elementTemplate, injector) || [], createErrorGroup(element, elementTemplate, injector) || [], CustomProperties({
  20625. element,
  20626. elementTemplate
  20627. })); // (2) add template-specific properties groups
  20628. addGroupsAfter('ElementTemplates__Template', groups, templateSpecificGroups);
  20629. } // (3) apply entries visible
  20630. if (getTemplateId(element)) {
  20631. groups = filterWithEntriesVisible(elementTemplate || {}, groups);
  20632. }
  20633. return groups;
  20634. };
  20635. }
  20636. _shouldShowTemplateProperties(element) {
  20637. return getTemplateId(element) || this._elementTemplates.getAll(element).length;
  20638. }
  20639. }
  20640. ElementTemplatesPropertiesProvider.$inject = ['elementTemplates', 'propertiesPanel', 'injector']; // helper /////////////////////
  20641. function createInputGroup(element, elementTemplate, injector) {
  20642. const translate = injector.get('translate');
  20643. const group = {
  20644. label: translate('Inputs'),
  20645. id: 'ElementTemplates__Input',
  20646. component: propertiesPanel.ListGroup,
  20647. items: []
  20648. };
  20649. const properties = elementTemplate.properties.filter(({
  20650. binding,
  20651. type
  20652. }) => {
  20653. return !type && binding.type === CAMUNDA_INPUT_PARAMETER_TYPE;
  20654. });
  20655. properties.forEach((property, index) => {
  20656. const item = InputProperties({
  20657. element,
  20658. index,
  20659. property
  20660. });
  20661. if (item) {
  20662. group.items.push(item);
  20663. }
  20664. }); // remove if empty
  20665. if (!group.items.length) {
  20666. return null;
  20667. }
  20668. return group;
  20669. }
  20670. function createOutputGroup(element, elementTemplate, injector) {
  20671. const translate = injector.get('translate');
  20672. const group = {
  20673. label: translate('Outputs'),
  20674. id: 'ElementTemplates__Output',
  20675. component: propertiesPanel.ListGroup,
  20676. items: []
  20677. };
  20678. const properties = elementTemplate.properties.filter(({
  20679. binding,
  20680. type
  20681. }) => {
  20682. return !type && binding.type === CAMUNDA_OUTPUT_PARAMETER_TYPE;
  20683. });
  20684. properties.forEach((property, index) => {
  20685. const item = OutputProperties({
  20686. element,
  20687. index,
  20688. property,
  20689. injector
  20690. });
  20691. if (item) {
  20692. group.items.push(item);
  20693. }
  20694. }); // remove if empty
  20695. if (!group.items.length) {
  20696. return null;
  20697. }
  20698. return group;
  20699. }
  20700. function createErrorGroup(element, elementTemplate, injector) {
  20701. const translate = injector.get('translate');
  20702. const group = {
  20703. label: translate('Errors'),
  20704. id: 'ElementTemplates__Error',
  20705. component: propertiesPanel.ListGroup,
  20706. items: []
  20707. };
  20708. const properties = elementTemplate.properties.filter(({
  20709. binding,
  20710. type
  20711. }) => {
  20712. return !type && binding.type === CAMUNDA_ERROR_EVENT_DEFINITION_TYPE;
  20713. });
  20714. properties.forEach((property, index) => {
  20715. const item = ErrorProperties({
  20716. element,
  20717. index,
  20718. property
  20719. });
  20720. if (item) {
  20721. group.items.push(item);
  20722. }
  20723. }); // remove if empty
  20724. if (!group.items.length) {
  20725. return null;
  20726. }
  20727. return group;
  20728. }
  20729. /**
  20730. *
  20731. * @param {string} id
  20732. * @param {Array<{ id: string }} groups
  20733. * @param {Array<{ id: string }>} groupsToAdd
  20734. */
  20735. function addGroupsAfter(id, groups, groupsToAdd) {
  20736. const index = groups.findIndex(group => group.id === id);
  20737. if (index !== -1) {
  20738. groups.splice(index + 1, 0, ...groupsToAdd);
  20739. } else {
  20740. // add in the beginning if group with provided id is missing
  20741. groups.unshift(...groupsToAdd);
  20742. }
  20743. }
  20744. function filterWithEntriesVisible(template, groups) {
  20745. if (!template.entriesVisible) {
  20746. return groups.filter(group => {
  20747. return group.id === 'general' || group.id.startsWith('ElementTemplates__');
  20748. });
  20749. }
  20750. return groups;
  20751. }
  20752. var index = {
  20753. __depends__: [commandsModule, translateModule__default["default"], camundaPlatformPropertiesProviderModule],
  20754. __init__: ['elementTemplatesLoader', 'replaceBehavior', 'elementTemplatesPropertiesProvider'],
  20755. elementTemplates: ['type', ElementTemplates$1],
  20756. elementTemplatesLoader: ['type', ElementTemplatesLoader$1],
  20757. replaceBehavior: ['type', ReplaceBehavior],
  20758. elementTemplatesPropertiesProvider: ['type', ElementTemplatesPropertiesProvider]
  20759. };
  20760. /* eslint-disable react-hooks/rules-of-hooks */
  20761. const DescriptionProvider = {
  20762. assignmentDefinitionAssignee: element => {
  20763. const translate = useService('translate');
  20764. return jsxRuntime.jsx("a", {
  20765. href: "https://docs.camunda.io/docs/components/modeler/bpmn/user-tasks/#assignments",
  20766. target: "_blank",
  20767. rel: "noopener",
  20768. title: translate('User task documentation'),
  20769. children: translate('How to configure a user task')
  20770. });
  20771. },
  20772. conditionExpression: element => {
  20773. const translate = useService('translate');
  20774. return jsxRuntime.jsx("a", {
  20775. href: "https://docs.camunda.io/docs/components/modeler/bpmn/exclusive-gateways/#conditions",
  20776. target: "_blank",
  20777. rel: "noopener",
  20778. title: translate('Conditions documentation'),
  20779. children: translate('How to define conditions')
  20780. });
  20781. },
  20782. decisionId: element => {
  20783. const translate = useService('translate');
  20784. return jsxRuntime.jsx("a", {
  20785. href: "https://docs.camunda.io/docs/components/modeler/bpmn/business-rule-tasks/#defining-a-task",
  20786. target: "_blank",
  20787. rel: "noopener",
  20788. title: translate('Business rule task documentation'),
  20789. children: translate('How to configure a business rule task')
  20790. });
  20791. },
  20792. formType: element => {
  20793. const translate = useService('translate');
  20794. return jsxRuntime.jsx("a", {
  20795. href: "https://docs.camunda.io/docs/components/modeler/bpmn/user-tasks/#user-task-forms",
  20796. target: "_blank",
  20797. rel: "noopener",
  20798. title: translate('User task form documentation'),
  20799. children: translate('How to link a form')
  20800. });
  20801. },
  20802. messageSubscriptionCorrelationKey: element => {
  20803. const translate = useService('translate');
  20804. if (ModelUtil.is(element, 'bpmn:ReceiveTask')) {
  20805. return jsxRuntime.jsx("a", {
  20806. href: "https://docs.camunda.io/docs/components/modeler/bpmn/receive-tasks/#messages",
  20807. target: "_blank",
  20808. rel: "noopener",
  20809. title: translate('Receive task documentation'),
  20810. children: translate('How to configure a receive task')
  20811. });
  20812. }
  20813. return jsxRuntime.jsx("a", {
  20814. href: "https://docs.camunda.io/docs/components/modeler/bpmn/message-events/#messages",
  20815. target: "_blank",
  20816. rel: "noopener",
  20817. title: translate('Message event documentation'),
  20818. children: translate('How to configure a message event')
  20819. });
  20820. },
  20821. messageName: element => {
  20822. const translate = useService('translate');
  20823. if (ModelUtil.is(element, 'bpmn:StartEvent') && !isInEventSubProcess(element)) {
  20824. return jsxRuntime.jsx("a", {
  20825. href: "https://docs.camunda.io/docs/components/modeler/bpmn/message-events/#messages",
  20826. target: "_blank",
  20827. rel: "noopener",
  20828. title: translate('Message event documentation'),
  20829. children: translate('How to configure a message event')
  20830. });
  20831. }
  20832. },
  20833. targetProcessId: element => {
  20834. const translate = useService('translate');
  20835. return jsxRuntime.jsx("a", {
  20836. href: "https://docs.camunda.io/docs/components/modeler/bpmn/call-activities/",
  20837. target: "_blank",
  20838. rel: "noopener",
  20839. title: translate('Call activity documentation'),
  20840. children: translate('How to call another process')
  20841. });
  20842. },
  20843. taskDefinitionType: element => {
  20844. const translate = useService('translate');
  20845. if (ModelUtil.is(element, 'bpmn:ServiceTask')) {
  20846. return jsxRuntime.jsx("a", {
  20847. href: "https://docs.camunda.io/docs/components/modeler/bpmn/service-tasks/#task-definition",
  20848. target: "_blank",
  20849. rel: "noopener",
  20850. title: translate('Service task documentation'),
  20851. children: translate('How to configure a service task')
  20852. });
  20853. }
  20854. if (ModelUtil.is(element, 'bpmn:BusinessRuleTask')) {
  20855. return jsxRuntime.jsx("a", {
  20856. href: "https://docs.camunda.io/docs/components/modeler/bpmn/business-rule-tasks/#defining-a-task",
  20857. target: "_blank",
  20858. rel: "noopener",
  20859. title: translate('Business rule task documentation'),
  20860. children: translate('How to configure a business rule task')
  20861. });
  20862. }
  20863. if (ModelUtil.is(element, 'bpmn:ScriptTask')) {
  20864. return jsxRuntime.jsx("a", {
  20865. href: "https://docs.camunda.io/docs/components/modeler/bpmn/script-tasks/#defining-a-task",
  20866. target: "_blank",
  20867. rel: "noopener",
  20868. title: translate('Script task documentation'),
  20869. children: translate('How to configure a script task')
  20870. });
  20871. }
  20872. if (ModelUtil.is(element, 'bpmn:SendTask')) {
  20873. return jsxRuntime.jsx("a", {
  20874. href: "https://docs.camunda.io/docs/components/modeler/bpmn/send-tasks/#defining-a-task",
  20875. target: "_blank",
  20876. rel: "noopener",
  20877. title: translate('Send task documentation'),
  20878. children: translate('How to configure a send task')
  20879. });
  20880. }
  20881. if (ModelUtil.is(element, 'bpmn:ThrowEvent')) {
  20882. return jsxRuntime.jsx("a", {
  20883. href: "https://docs.camunda.io/docs/components/modeler/bpmn/message-events/#message-throw-events",
  20884. target: "_blank",
  20885. rel: "noopener",
  20886. title: translate('Message throw event documentation'),
  20887. children: translate('How to configure a message throw event')
  20888. });
  20889. }
  20890. },
  20891. 'multiInstance-inputCollection': element => {
  20892. const translate = useService('translate');
  20893. return jsxRuntime.jsx("a", {
  20894. href: "https://docs.camunda.io/docs/components/modeler/bpmn/multi-instance/#defining-the-collection-to-iterate-over",
  20895. target: "_blank",
  20896. rel: "noopener",
  20897. title: translate('Multi instance documentation'),
  20898. children: translate('How to configure a multi instance activity')
  20899. });
  20900. },
  20901. errorCode: element => {
  20902. const translate = useService('translate');
  20903. return jsxRuntime.jsx("a", {
  20904. href: "https://docs.camunda.io/docs/components/modeler/bpmn/error-events/#defining-the-error",
  20905. target: "_blank",
  20906. rel: "noopener",
  20907. title: translate('Error event documentation'),
  20908. children: translate('How to configure an error event')
  20909. });
  20910. }
  20911. };
  20912. function isInEventSubProcess(element) {
  20913. const bo = ModelUtil.getBusinessObject(element),
  20914. parent = bo.$parent;
  20915. return ModelUtil.is(parent, 'bpmn:SubProcess') && parent.triggeredByEvent;
  20916. }
  20917. exports.BpmnPropertiesPanelModule = index$3;
  20918. exports.BpmnPropertiesProviderModule = index$2;
  20919. exports.CamundaPlatformPropertiesProviderModule = camundaPlatformPropertiesProviderModule;
  20920. exports.CloudElementTemplatesPropertiesProviderModule = index$1;
  20921. exports.CloudElementTemplatesValidator = Validator;
  20922. exports.ElementTemplatesPropertiesProviderModule = index;
  20923. exports.ZeebeDescriptionProvider = DescriptionProvider;
  20924. exports.ZeebePropertiesProviderModule = zeebePropertiesProviderModule;
  20925. exports.useService = useService;
  20926. //# sourceMappingURL=index.js.map