vue-color.js 217 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798991001011021031041051061071081091101111121131141151161171181191201211221231241251261271281291301311321331341351361371381391401411421431441451461471481491501511521531541551561571581591601611621631641651661671681691701711721731741751761771781791801811821831841851861871881891901911921931941951961971981992002012022032042052062072082092102112122132142152162172182192202212222232242252262272282292302312322332342352362372382392402412422432442452462472482492502512522532542552562572582592602612622632642652662672682692702712722732742752762772782792802812822832842852862872882892902912922932942952962972982993003013023033043053063073083093103113123133143153163173183193203213223233243253263273283293303313323333343353363373383393403413423433443453463473483493503513523533543553563573583593603613623633643653663673683693703713723733743753763773783793803813823833843853863873883893903913923933943953963973983994004014024034044054064074084094104114124134144154164174184194204214224234244254264274284294304314324334344354364374384394404414424434444454464474484494504514524534544554564574584594604614624634644654664674684694704714724734744754764774784794804814824834844854864874884894904914924934944954964974984995005015025035045055065075085095105115125135145155165175185195205215225235245255265275285295305315325335345355365375385395405415425435445455465475485495505515525535545555565575585595605615625635645655665675685695705715725735745755765775785795805815825835845855865875885895905915925935945955965975985996006016026036046056066076086096106116126136146156166176186196206216226236246256266276286296306316326336346356366376386396406416426436446456466476486496506516526536546556566576586596606616626636646656666676686696706716726736746756766776786796806816826836846856866876886896906916926936946956966976986997007017027037047057067077087097107117127137147157167177187197207217227237247257267277287297307317327337347357367377387397407417427437447457467477487497507517527537547557567577587597607617627637647657667677687697707717727737747757767777787797807817827837847857867877887897907917927937947957967977987998008018028038048058068078088098108118128138148158168178188198208218228238248258268278288298308318328338348358368378388398408418428438448458468478488498508518528538548558568578588598608618628638648658668678688698708718728738748758768778788798808818828838848858868878888898908918928938948958968978988999009019029039049059069079089099109119129139149159169179189199209219229239249259269279289299309319329339349359369379389399409419429439449459469479489499509519529539549559569579589599609619629639649659669679689699709719729739749759769779789799809819829839849859869879889899909919929939949959969979989991000100110021003100410051006100710081009101010111012101310141015101610171018101910201021102210231024102510261027102810291030103110321033103410351036103710381039104010411042104310441045104610471048104910501051105210531054105510561057105810591060106110621063106410651066106710681069107010711072107310741075107610771078107910801081108210831084108510861087108810891090109110921093109410951096109710981099110011011102110311041105110611071108110911101111111211131114111511161117111811191120112111221123112411251126112711281129113011311132113311341135113611371138113911401141114211431144114511461147114811491150115111521153115411551156115711581159116011611162116311641165116611671168116911701171117211731174117511761177117811791180118111821183118411851186118711881189119011911192119311941195119611971198119912001201120212031204120512061207120812091210121112121213121412151216121712181219122012211222122312241225122612271228122912301231123212331234123512361237123812391240124112421243124412451246124712481249125012511252125312541255125612571258125912601261126212631264126512661267126812691270127112721273127412751276127712781279128012811282128312841285128612871288128912901291129212931294129512961297129812991300130113021303130413051306130713081309131013111312131313141315131613171318131913201321132213231324132513261327132813291330133113321333133413351336133713381339134013411342134313441345134613471348134913501351135213531354135513561357135813591360136113621363136413651366136713681369137013711372137313741375137613771378137913801381138213831384138513861387138813891390139113921393139413951396139713981399140014011402140314041405140614071408140914101411141214131414141514161417141814191420142114221423142414251426142714281429143014311432143314341435143614371438143914401441144214431444144514461447144814491450145114521453145414551456145714581459146014611462146314641465146614671468146914701471147214731474147514761477147814791480148114821483148414851486148714881489149014911492149314941495149614971498149915001501150215031504150515061507150815091510151115121513151415151516151715181519152015211522152315241525152615271528152915301531153215331534153515361537153815391540154115421543154415451546154715481549155015511552155315541555155615571558155915601561156215631564156515661567156815691570157115721573157415751576157715781579158015811582158315841585158615871588158915901591159215931594159515961597159815991600160116021603160416051606160716081609161016111612161316141615161616171618161916201621162216231624162516261627162816291630163116321633163416351636163716381639164016411642164316441645164616471648164916501651165216531654165516561657165816591660166116621663166416651666166716681669167016711672167316741675167616771678167916801681168216831684168516861687168816891690169116921693169416951696169716981699170017011702170317041705170617071708170917101711171217131714171517161717171817191720172117221723172417251726172717281729173017311732173317341735173617371738173917401741174217431744174517461747174817491750175117521753175417551756175717581759176017611762176317641765176617671768176917701771177217731774177517761777177817791780178117821783178417851786178717881789179017911792179317941795179617971798179918001801180218031804180518061807180818091810181118121813181418151816181718181819182018211822182318241825182618271828182918301831183218331834183518361837183818391840184118421843184418451846184718481849185018511852185318541855185618571858185918601861186218631864186518661867186818691870187118721873187418751876187718781879188018811882188318841885188618871888188918901891189218931894189518961897189818991900190119021903190419051906190719081909191019111912191319141915191619171918191919201921192219231924192519261927192819291930193119321933193419351936193719381939194019411942194319441945194619471948194919501951195219531954195519561957195819591960196119621963196419651966196719681969197019711972197319741975197619771978197919801981198219831984198519861987198819891990199119921993199419951996199719981999200020012002200320042005200620072008200920102011201220132014201520162017201820192020202120222023202420252026202720282029203020312032203320342035203620372038203920402041204220432044204520462047204820492050205120522053205420552056205720582059206020612062206320642065206620672068206920702071207220732074207520762077207820792080208120822083208420852086208720882089209020912092209320942095209620972098209921002101210221032104210521062107210821092110211121122113211421152116211721182119212021212122212321242125212621272128212921302131213221332134213521362137213821392140214121422143214421452146214721482149215021512152215321542155215621572158215921602161216221632164216521662167216821692170217121722173217421752176217721782179218021812182218321842185218621872188218921902191219221932194219521962197219821992200220122022203220422052206220722082209221022112212221322142215221622172218221922202221222222232224222522262227222822292230223122322233223422352236223722382239224022412242224322442245224622472248224922502251225222532254225522562257225822592260226122622263226422652266226722682269227022712272227322742275227622772278227922802281228222832284228522862287228822892290229122922293229422952296229722982299230023012302230323042305230623072308230923102311231223132314231523162317231823192320232123222323232423252326232723282329233023312332233323342335233623372338233923402341234223432344234523462347234823492350235123522353235423552356235723582359236023612362236323642365236623672368236923702371237223732374237523762377237823792380238123822383238423852386238723882389239023912392239323942395239623972398239924002401240224032404240524062407240824092410241124122413241424152416241724182419242024212422242324242425242624272428242924302431243224332434243524362437243824392440244124422443244424452446244724482449245024512452245324542455245624572458245924602461246224632464246524662467246824692470247124722473247424752476247724782479248024812482248324842485248624872488248924902491249224932494249524962497249824992500250125022503250425052506250725082509251025112512251325142515251625172518251925202521252225232524252525262527252825292530253125322533253425352536253725382539254025412542254325442545254625472548254925502551255225532554255525562557255825592560256125622563256425652566256725682569257025712572257325742575257625772578257925802581258225832584258525862587258825892590259125922593259425952596259725982599260026012602260326042605260626072608260926102611261226132614261526162617261826192620262126222623262426252626262726282629263026312632263326342635263626372638263926402641264226432644264526462647264826492650265126522653265426552656265726582659266026612662266326642665266626672668266926702671267226732674267526762677267826792680268126822683268426852686268726882689269026912692269326942695269626972698269927002701270227032704270527062707270827092710271127122713271427152716271727182719272027212722272327242725272627272728272927302731273227332734273527362737273827392740274127422743274427452746274727482749275027512752275327542755275627572758275927602761276227632764276527662767276827692770277127722773277427752776277727782779278027812782278327842785278627872788278927902791279227932794279527962797279827992800280128022803280428052806280728082809281028112812281328142815281628172818281928202821282228232824282528262827282828292830283128322833283428352836283728382839284028412842284328442845284628472848284928502851285228532854285528562857285828592860286128622863286428652866286728682869287028712872287328742875287628772878287928802881288228832884288528862887288828892890289128922893289428952896289728982899290029012902290329042905290629072908290929102911291229132914291529162917291829192920292129222923292429252926292729282929293029312932293329342935293629372938293929402941294229432944294529462947294829492950295129522953295429552956295729582959296029612962296329642965296629672968296929702971297229732974297529762977297829792980298129822983298429852986298729882989299029912992299329942995299629972998299930003001300230033004300530063007300830093010301130123013301430153016301730183019302030213022302330243025302630273028302930303031303230333034303530363037303830393040304130423043304430453046304730483049305030513052305330543055305630573058305930603061306230633064306530663067306830693070307130723073307430753076307730783079308030813082308330843085308630873088308930903091309230933094309530963097309830993100310131023103310431053106310731083109311031113112311331143115311631173118311931203121312231233124312531263127312831293130313131323133313431353136313731383139314031413142314331443145314631473148314931503151315231533154315531563157315831593160316131623163316431653166316731683169317031713172317331743175317631773178317931803181318231833184318531863187318831893190319131923193319431953196319731983199320032013202320332043205320632073208320932103211321232133214321532163217321832193220322132223223322432253226322732283229323032313232323332343235323632373238323932403241324232433244324532463247324832493250325132523253325432553256325732583259326032613262326332643265326632673268326932703271327232733274327532763277327832793280328132823283328432853286328732883289329032913292329332943295329632973298329933003301330233033304330533063307330833093310331133123313331433153316331733183319332033213322332333243325332633273328332933303331333233333334333533363337333833393340334133423343334433453346334733483349335033513352335333543355335633573358335933603361336233633364336533663367336833693370337133723373337433753376337733783379338033813382338333843385338633873388338933903391339233933394339533963397339833993400340134023403340434053406340734083409341034113412341334143415341634173418341934203421342234233424342534263427342834293430343134323433343434353436343734383439344034413442344334443445344634473448344934503451345234533454345534563457345834593460346134623463346434653466346734683469347034713472347334743475347634773478347934803481348234833484348534863487348834893490349134923493349434953496349734983499350035013502350335043505350635073508350935103511351235133514351535163517351835193520352135223523352435253526352735283529353035313532353335343535353635373538353935403541354235433544354535463547354835493550355135523553355435553556355735583559356035613562356335643565356635673568356935703571357235733574357535763577357835793580358135823583358435853586358735883589359035913592359335943595359635973598359936003601360236033604360536063607360836093610361136123613361436153616361736183619362036213622362336243625362636273628362936303631363236333634363536363637363836393640364136423643364436453646364736483649365036513652365336543655365636573658365936603661366236633664366536663667366836693670367136723673367436753676367736783679368036813682368336843685368636873688368936903691369236933694369536963697369836993700370137023703370437053706370737083709371037113712371337143715371637173718371937203721372237233724372537263727372837293730373137323733373437353736373737383739374037413742374337443745374637473748374937503751375237533754375537563757375837593760376137623763376437653766376737683769377037713772377337743775377637773778377937803781378237833784378537863787378837893790379137923793379437953796379737983799380038013802380338043805380638073808380938103811381238133814381538163817381838193820382138223823382438253826382738283829383038313832383338343835383638373838383938403841384238433844384538463847384838493850385138523853385438553856385738583859386038613862386338643865386638673868386938703871387238733874387538763877387838793880388138823883388438853886388738883889389038913892389338943895389638973898389939003901390239033904390539063907390839093910391139123913391439153916391739183919392039213922392339243925392639273928392939303931393239333934393539363937393839393940394139423943394439453946394739483949395039513952395339543955395639573958395939603961396239633964396539663967396839693970397139723973397439753976397739783979398039813982398339843985398639873988398939903991399239933994399539963997399839994000400140024003400440054006400740084009401040114012401340144015401640174018401940204021402240234024402540264027402840294030403140324033403440354036403740384039404040414042404340444045404640474048404940504051405240534054405540564057405840594060406140624063406440654066406740684069407040714072407340744075407640774078407940804081408240834084408540864087408840894090409140924093409440954096409740984099410041014102410341044105410641074108410941104111411241134114411541164117411841194120412141224123412441254126412741284129413041314132413341344135413641374138413941404141414241434144414541464147414841494150415141524153415441554156415741584159416041614162416341644165416641674168416941704171417241734174417541764177417841794180418141824183418441854186418741884189419041914192419341944195419641974198419942004201420242034204420542064207420842094210421142124213421442154216421742184219422042214222422342244225422642274228422942304231423242334234423542364237423842394240424142424243424442454246424742484249425042514252425342544255425642574258425942604261426242634264426542664267426842694270427142724273427442754276427742784279428042814282428342844285428642874288428942904291429242934294429542964297429842994300430143024303430443054306430743084309431043114312431343144315431643174318431943204321432243234324432543264327432843294330433143324333433443354336433743384339434043414342434343444345434643474348434943504351435243534354435543564357435843594360436143624363436443654366436743684369437043714372437343744375437643774378437943804381438243834384438543864387438843894390439143924393439443954396439743984399440044014402440344044405440644074408440944104411441244134414441544164417441844194420442144224423442444254426442744284429443044314432443344344435443644374438443944404441444244434444444544464447444844494450445144524453445444554456445744584459446044614462446344644465446644674468446944704471447244734474447544764477447844794480448144824483448444854486448744884489449044914492449344944495449644974498449945004501450245034504450545064507450845094510451145124513451445154516451745184519452045214522452345244525452645274528452945304531453245334534453545364537453845394540454145424543454445454546454745484549455045514552455345544555455645574558455945604561456245634564456545664567456845694570457145724573457445754576457745784579458045814582458345844585458645874588458945904591459245934594459545964597459845994600460146024603460446054606460746084609461046114612461346144615461646174618461946204621462246234624462546264627462846294630463146324633463446354636463746384639464046414642464346444645464646474648464946504651465246534654465546564657465846594660466146624663466446654666466746684669467046714672467346744675467646774678467946804681468246834684468546864687468846894690469146924693469446954696469746984699470047014702470347044705470647074708470947104711471247134714471547164717471847194720472147224723472447254726472747284729473047314732473347344735473647374738473947404741474247434744474547464747474847494750475147524753475447554756475747584759476047614762476347644765476647674768476947704771477247734774477547764777477847794780478147824783478447854786478747884789479047914792479347944795479647974798479948004801480248034804480548064807480848094810481148124813481448154816481748184819482048214822482348244825482648274828482948304831483248334834483548364837483848394840484148424843484448454846484748484849485048514852485348544855485648574858485948604861486248634864486548664867486848694870487148724873487448754876487748784879488048814882488348844885488648874888488948904891489248934894489548964897489848994900490149024903490449054906490749084909491049114912491349144915491649174918491949204921492249234924492549264927492849294930493149324933493449354936493749384939494049414942494349444945494649474948494949504951495249534954495549564957495849594960496149624963496449654966496749684969497049714972497349744975497649774978497949804981498249834984498549864987498849894990499149924993499449954996499749984999500050015002500350045005500650075008500950105011501250135014501550165017501850195020502150225023502450255026502750285029503050315032503350345035503650375038503950405041504250435044504550465047504850495050505150525053505450555056505750585059506050615062506350645065506650675068506950705071507250735074507550765077507850795080508150825083508450855086508750885089509050915092509350945095509650975098509951005101510251035104510551065107510851095110511151125113511451155116511751185119512051215122512351245125512651275128512951305131513251335134513551365137513851395140514151425143514451455146514751485149515051515152515351545155515651575158515951605161516251635164516551665167516851695170517151725173517451755176517751785179518051815182518351845185518651875188518951905191519251935194519551965197519851995200520152025203520452055206520752085209521052115212521352145215521652175218521952205221522252235224522552265227522852295230523152325233523452355236523752385239524052415242524352445245524652475248524952505251525252535254525552565257525852595260526152625263526452655266526752685269527052715272527352745275527652775278527952805281528252835284528552865287528852895290529152925293529452955296529752985299530053015302530353045305530653075308530953105311531253135314531553165317531853195320532153225323532453255326532753285329533053315332533353345335533653375338533953405341534253435344534553465347534853495350535153525353535453555356535753585359536053615362536353645365536653675368536953705371537253735374537553765377537853795380538153825383538453855386538753885389539053915392539353945395539653975398539954005401540254035404540554065407540854095410541154125413541454155416541754185419542054215422542354245425542654275428542954305431543254335434543554365437543854395440544154425443544454455446544754485449545054515452545354545455545654575458545954605461546254635464546554665467546854695470547154725473547454755476547754785479548054815482548354845485548654875488548954905491549254935494549554965497549854995500550155025503550455055506550755085509551055115512551355145515551655175518551955205521552255235524552555265527552855295530553155325533553455355536553755385539554055415542554355445545554655475548554955505551555255535554555555565557555855595560556155625563556455655566556755685569557055715572557355745575557655775578557955805581558255835584558555865587558855895590559155925593559455955596559755985599560056015602560356045605560656075608560956105611561256135614561556165617561856195620562156225623562456255626562756285629563056315632563356345635563656375638563956405641564256435644564556465647564856495650565156525653565456555656565756585659566056615662566356645665566656675668566956705671567256735674567556765677567856795680568156825683568456855686568756885689569056915692569356945695569656975698569957005701570257035704570557065707570857095710571157125713571457155716571757185719572057215722572357245725572657275728572957305731573257335734573557365737573857395740574157425743574457455746574757485749575057515752575357545755575657575758575957605761576257635764576557665767576857695770577157725773577457755776577757785779578057815782578357845785578657875788578957905791579257935794579557965797579857995800580158025803580458055806580758085809581058115812581358145815581658175818581958205821582258235824582558265827582858295830583158325833583458355836583758385839584058415842584358445845584658475848584958505851585258535854585558565857585858595860586158625863586458655866586758685869587058715872587358745875587658775878587958805881588258835884588558865887588858895890589158925893589458955896589758985899590059015902590359045905590659075908590959105911591259135914591559165917591859195920592159225923592459255926592759285929593059315932593359345935593659375938593959405941594259435944594559465947594859495950595159525953595459555956595759585959596059615962596359645965596659675968596959705971597259735974597559765977597859795980598159825983598459855986598759885989599059915992599359945995599659975998599960006001600260036004600560066007600860096010601160126013601460156016601760186019602060216022602360246025602660276028602960306031603260336034603560366037603860396040604160426043604460456046604760486049605060516052605360546055605660576058605960606061606260636064606560666067606860696070607160726073607460756076607760786079608060816082608360846085608660876088608960906091609260936094609560966097609860996100610161026103610461056106610761086109611061116112611361146115611661176118611961206121612261236124612561266127612861296130613161326133613461356136613761386139614061416142614361446145614661476148614961506151615261536154615561566157615861596160616161626163616461656166616761686169617061716172617361746175617661776178617961806181618261836184618561866187618861896190619161926193619461956196619761986199620062016202620362046205620662076208620962106211621262136214621562166217621862196220622162226223622462256226622762286229623062316232623362346235623662376238623962406241624262436244624562466247624862496250625162526253625462556256625762586259626062616262626362646265626662676268626962706271627262736274627562766277627862796280628162826283628462856286628762886289629062916292629362946295629662976298629963006301630263036304
  1. (function webpackUniversalModuleDefinition(root, factory) {
  2. if(typeof exports === 'object' && typeof module === 'object')
  3. module.exports = factory();
  4. else if(typeof define === 'function' && define.amd)
  5. define([], factory);
  6. else if(typeof exports === 'object')
  7. exports["VueColor"] = factory();
  8. else
  9. root["VueColor"] = factory();
  10. })(typeof self !== 'undefined' ? self : this, function() {
  11. return /******/ (function(modules) { // webpackBootstrap
  12. /******/ // The module cache
  13. /******/ var installedModules = {};
  14. /******/
  15. /******/ // The require function
  16. /******/ function __webpack_require__(moduleId) {
  17. /******/
  18. /******/ // Check if module is in cache
  19. /******/ if(installedModules[moduleId]) {
  20. /******/ return installedModules[moduleId].exports;
  21. /******/ }
  22. /******/ // Create a new module (and put it into the cache)
  23. /******/ var module = installedModules[moduleId] = {
  24. /******/ i: moduleId,
  25. /******/ l: false,
  26. /******/ exports: {}
  27. /******/ };
  28. /******/
  29. /******/ // Execute the module function
  30. /******/ modules[moduleId].call(module.exports, module, module.exports, __webpack_require__);
  31. /******/
  32. /******/ // Flag the module as loaded
  33. /******/ module.l = true;
  34. /******/
  35. /******/ // Return the exports of the module
  36. /******/ return module.exports;
  37. /******/ }
  38. /******/
  39. /******/
  40. /******/ // expose the modules object (__webpack_modules__)
  41. /******/ __webpack_require__.m = modules;
  42. /******/
  43. /******/ // expose the module cache
  44. /******/ __webpack_require__.c = installedModules;
  45. /******/
  46. /******/ // define getter function for harmony exports
  47. /******/ __webpack_require__.d = function(exports, name, getter) {
  48. /******/ if(!__webpack_require__.o(exports, name)) {
  49. /******/ Object.defineProperty(exports, name, {
  50. /******/ configurable: false,
  51. /******/ enumerable: true,
  52. /******/ get: getter
  53. /******/ });
  54. /******/ }
  55. /******/ };
  56. /******/
  57. /******/ // getDefaultExport function for compatibility with non-harmony modules
  58. /******/ __webpack_require__.n = function(module) {
  59. /******/ var getter = module && module.__esModule ?
  60. /******/ function getDefault() { return module['default']; } :
  61. /******/ function getModuleExports() { return module; };
  62. /******/ __webpack_require__.d(getter, 'a', getter);
  63. /******/ return getter;
  64. /******/ };
  65. /******/
  66. /******/ // Object.prototype.hasOwnProperty.call
  67. /******/ __webpack_require__.o = function(object, property) { return Object.prototype.hasOwnProperty.call(object, property); };
  68. /******/
  69. /******/ // __webpack_public_path__
  70. /******/ __webpack_require__.p = "";
  71. /******/
  72. /******/ // Load entry module and return exports
  73. /******/ return __webpack_require__(__webpack_require__.s = 22);
  74. /******/ })
  75. /************************************************************************/
  76. /******/ ([
  77. /* 0 */
  78. /***/ (function(module, exports) {
  79. /*
  80. MIT License http://www.opensource.org/licenses/mit-license.php
  81. Author Tobias Koppers @sokra
  82. */
  83. // css base code, injected by the css-loader
  84. module.exports = function(useSourceMap) {
  85. var list = [];
  86. // return the list of modules as css string
  87. list.toString = function toString() {
  88. return this.map(function (item) {
  89. var content = cssWithMappingToString(item, useSourceMap);
  90. if(item[2]) {
  91. return "@media " + item[2] + "{" + content + "}";
  92. } else {
  93. return content;
  94. }
  95. }).join("");
  96. };
  97. // import a list of modules into the list
  98. list.i = function(modules, mediaQuery) {
  99. if(typeof modules === "string")
  100. modules = [[null, modules, ""]];
  101. var alreadyImportedModules = {};
  102. for(var i = 0; i < this.length; i++) {
  103. var id = this[i][0];
  104. if(typeof id === "number")
  105. alreadyImportedModules[id] = true;
  106. }
  107. for(i = 0; i < modules.length; i++) {
  108. var item = modules[i];
  109. // skip already imported module
  110. // this implementation is not 100% perfect for weird media query combinations
  111. // when a module is imported multiple times with different media queries.
  112. // I hope this will never occur (Hey this way we have smaller bundles)
  113. if(typeof item[0] !== "number" || !alreadyImportedModules[item[0]]) {
  114. if(mediaQuery && !item[2]) {
  115. item[2] = mediaQuery;
  116. } else if(mediaQuery) {
  117. item[2] = "(" + item[2] + ") and (" + mediaQuery + ")";
  118. }
  119. list.push(item);
  120. }
  121. }
  122. };
  123. return list;
  124. };
  125. function cssWithMappingToString(item, useSourceMap) {
  126. var content = item[1] || '';
  127. var cssMapping = item[3];
  128. if (!cssMapping) {
  129. return content;
  130. }
  131. if (useSourceMap && typeof btoa === 'function') {
  132. var sourceMapping = toComment(cssMapping);
  133. var sourceURLs = cssMapping.sources.map(function (source) {
  134. return '/*# sourceURL=' + cssMapping.sourceRoot + source + ' */'
  135. });
  136. return [content].concat(sourceURLs).concat([sourceMapping]).join('\n');
  137. }
  138. return [content].join('\n');
  139. }
  140. // Adapted from convert-source-map (MIT)
  141. function toComment(sourceMap) {
  142. // eslint-disable-next-line no-undef
  143. var base64 = btoa(unescape(encodeURIComponent(JSON.stringify(sourceMap))));
  144. var data = 'sourceMappingURL=data:application/json;charset=utf-8;base64,' + base64;
  145. return '/*# ' + data + ' */';
  146. }
  147. /***/ }),
  148. /* 1 */
  149. /***/ (function(module, exports, __webpack_require__) {
  150. /*
  151. MIT License http://www.opensource.org/licenses/mit-license.php
  152. Author Tobias Koppers @sokra
  153. Modified by Evan You @yyx990803
  154. */
  155. var hasDocument = typeof document !== 'undefined'
  156. if (typeof DEBUG !== 'undefined' && DEBUG) {
  157. if (!hasDocument) {
  158. throw new Error(
  159. 'vue-style-loader cannot be used in a non-browser environment. ' +
  160. "Use { target: 'node' } in your Webpack config to indicate a server-rendering environment."
  161. ) }
  162. }
  163. var listToStyles = __webpack_require__(26)
  164. /*
  165. type StyleObject = {
  166. id: number;
  167. parts: Array<StyleObjectPart>
  168. }
  169. type StyleObjectPart = {
  170. css: string;
  171. media: string;
  172. sourceMap: ?string
  173. }
  174. */
  175. var stylesInDom = {/*
  176. [id: number]: {
  177. id: number,
  178. refs: number,
  179. parts: Array<(obj?: StyleObjectPart) => void>
  180. }
  181. */}
  182. var head = hasDocument && (document.head || document.getElementsByTagName('head')[0])
  183. var singletonElement = null
  184. var singletonCounter = 0
  185. var isProduction = false
  186. var noop = function () {}
  187. var options = null
  188. var ssrIdKey = 'data-vue-ssr-id'
  189. // Force single-tag solution on IE6-9, which has a hard limit on the # of <style>
  190. // tags it will allow on a page
  191. var isOldIE = typeof navigator !== 'undefined' && /msie [6-9]\b/.test(navigator.userAgent.toLowerCase())
  192. module.exports = function (parentId, list, _isProduction, _options) {
  193. isProduction = _isProduction
  194. options = _options || {}
  195. var styles = listToStyles(parentId, list)
  196. addStylesToDom(styles)
  197. return function update (newList) {
  198. var mayRemove = []
  199. for (var i = 0; i < styles.length; i++) {
  200. var item = styles[i]
  201. var domStyle = stylesInDom[item.id]
  202. domStyle.refs--
  203. mayRemove.push(domStyle)
  204. }
  205. if (newList) {
  206. styles = listToStyles(parentId, newList)
  207. addStylesToDom(styles)
  208. } else {
  209. styles = []
  210. }
  211. for (var i = 0; i < mayRemove.length; i++) {
  212. var domStyle = mayRemove[i]
  213. if (domStyle.refs === 0) {
  214. for (var j = 0; j < domStyle.parts.length; j++) {
  215. domStyle.parts[j]()
  216. }
  217. delete stylesInDom[domStyle.id]
  218. }
  219. }
  220. }
  221. }
  222. function addStylesToDom (styles /* Array<StyleObject> */) {
  223. for (var i = 0; i < styles.length; i++) {
  224. var item = styles[i]
  225. var domStyle = stylesInDom[item.id]
  226. if (domStyle) {
  227. domStyle.refs++
  228. for (var j = 0; j < domStyle.parts.length; j++) {
  229. domStyle.parts[j](item.parts[j])
  230. }
  231. for (; j < item.parts.length; j++) {
  232. domStyle.parts.push(addStyle(item.parts[j]))
  233. }
  234. if (domStyle.parts.length > item.parts.length) {
  235. domStyle.parts.length = item.parts.length
  236. }
  237. } else {
  238. var parts = []
  239. for (var j = 0; j < item.parts.length; j++) {
  240. parts.push(addStyle(item.parts[j]))
  241. }
  242. stylesInDom[item.id] = { id: item.id, refs: 1, parts: parts }
  243. }
  244. }
  245. }
  246. function createStyleElement () {
  247. var styleElement = document.createElement('style')
  248. styleElement.type = 'text/css'
  249. head.appendChild(styleElement)
  250. return styleElement
  251. }
  252. function addStyle (obj /* StyleObjectPart */) {
  253. var update, remove
  254. var styleElement = document.querySelector('style[' + ssrIdKey + '~="' + obj.id + '"]')
  255. if (styleElement) {
  256. if (isProduction) {
  257. // has SSR styles and in production mode.
  258. // simply do nothing.
  259. return noop
  260. } else {
  261. // has SSR styles but in dev mode.
  262. // for some reason Chrome can't handle source map in server-rendered
  263. // style tags - source maps in <style> only works if the style tag is
  264. // created and inserted dynamically. So we remove the server rendered
  265. // styles and inject new ones.
  266. styleElement.parentNode.removeChild(styleElement)
  267. }
  268. }
  269. if (isOldIE) {
  270. // use singleton mode for IE9.
  271. var styleIndex = singletonCounter++
  272. styleElement = singletonElement || (singletonElement = createStyleElement())
  273. update = applyToSingletonTag.bind(null, styleElement, styleIndex, false)
  274. remove = applyToSingletonTag.bind(null, styleElement, styleIndex, true)
  275. } else {
  276. // use multi-style-tag mode in all other cases
  277. styleElement = createStyleElement()
  278. update = applyToTag.bind(null, styleElement)
  279. remove = function () {
  280. styleElement.parentNode.removeChild(styleElement)
  281. }
  282. }
  283. update(obj)
  284. return function updateStyle (newObj /* StyleObjectPart */) {
  285. if (newObj) {
  286. if (newObj.css === obj.css &&
  287. newObj.media === obj.media &&
  288. newObj.sourceMap === obj.sourceMap) {
  289. return
  290. }
  291. update(obj = newObj)
  292. } else {
  293. remove()
  294. }
  295. }
  296. }
  297. var replaceText = (function () {
  298. var textStore = []
  299. return function (index, replacement) {
  300. textStore[index] = replacement
  301. return textStore.filter(Boolean).join('\n')
  302. }
  303. })()
  304. function applyToSingletonTag (styleElement, index, remove, obj) {
  305. var css = remove ? '' : obj.css
  306. if (styleElement.styleSheet) {
  307. styleElement.styleSheet.cssText = replaceText(index, css)
  308. } else {
  309. var cssNode = document.createTextNode(css)
  310. var childNodes = styleElement.childNodes
  311. if (childNodes[index]) styleElement.removeChild(childNodes[index])
  312. if (childNodes.length) {
  313. styleElement.insertBefore(cssNode, childNodes[index])
  314. } else {
  315. styleElement.appendChild(cssNode)
  316. }
  317. }
  318. }
  319. function applyToTag (styleElement, obj) {
  320. var css = obj.css
  321. var media = obj.media
  322. var sourceMap = obj.sourceMap
  323. if (media) {
  324. styleElement.setAttribute('media', media)
  325. }
  326. if (options.ssrId) {
  327. styleElement.setAttribute(ssrIdKey, obj.id)
  328. }
  329. if (sourceMap) {
  330. // https://developer.chrome.com/devtools/docs/javascript-debugging
  331. // this makes source maps inside style tags work properly in Chrome
  332. css += '\n/*# sourceURL=' + sourceMap.sources[0] + ' */'
  333. // http://stackoverflow.com/a/26603875
  334. css += '\n/*# sourceMappingURL=data:application/json;base64,' + btoa(unescape(encodeURIComponent(JSON.stringify(sourceMap)))) + ' */'
  335. }
  336. if (styleElement.styleSheet) {
  337. styleElement.styleSheet.cssText = css
  338. } else {
  339. while (styleElement.firstChild) {
  340. styleElement.removeChild(styleElement.firstChild)
  341. }
  342. styleElement.appendChild(document.createTextNode(css))
  343. }
  344. }
  345. /***/ }),
  346. /* 2 */
  347. /***/ (function(module, exports) {
  348. /* globals __VUE_SSR_CONTEXT__ */
  349. // IMPORTANT: Do NOT use ES2015 features in this file.
  350. // This module is a runtime utility for cleaner component module output and will
  351. // be included in the final webpack user bundle.
  352. module.exports = function normalizeComponent (
  353. rawScriptExports,
  354. compiledTemplate,
  355. functionalTemplate,
  356. injectStyles,
  357. scopeId,
  358. moduleIdentifier /* server only */
  359. ) {
  360. var esModule
  361. var scriptExports = rawScriptExports = rawScriptExports || {}
  362. // ES6 modules interop
  363. var type = typeof rawScriptExports.default
  364. if (type === 'object' || type === 'function') {
  365. esModule = rawScriptExports
  366. scriptExports = rawScriptExports.default
  367. }
  368. // Vue.extend constructor export interop
  369. var options = typeof scriptExports === 'function'
  370. ? scriptExports.options
  371. : scriptExports
  372. // render functions
  373. if (compiledTemplate) {
  374. options.render = compiledTemplate.render
  375. options.staticRenderFns = compiledTemplate.staticRenderFns
  376. options._compiled = true
  377. }
  378. // functional template
  379. if (functionalTemplate) {
  380. options.functional = true
  381. }
  382. // scopedId
  383. if (scopeId) {
  384. options._scopeId = scopeId
  385. }
  386. var hook
  387. if (moduleIdentifier) { // server build
  388. hook = function (context) {
  389. // 2.3 injection
  390. context =
  391. context || // cached call
  392. (this.$vnode && this.$vnode.ssrContext) || // stateful
  393. (this.parent && this.parent.$vnode && this.parent.$vnode.ssrContext) // functional
  394. // 2.2 with runInNewContext: true
  395. if (!context && typeof __VUE_SSR_CONTEXT__ !== 'undefined') {
  396. context = __VUE_SSR_CONTEXT__
  397. }
  398. // inject component styles
  399. if (injectStyles) {
  400. injectStyles.call(this, context)
  401. }
  402. // register component module identifier for async chunk inferrence
  403. if (context && context._registeredComponents) {
  404. context._registeredComponents.add(moduleIdentifier)
  405. }
  406. }
  407. // used by ssr in case component is cached and beforeCreate
  408. // never gets called
  409. options._ssrRegister = hook
  410. } else if (injectStyles) {
  411. hook = injectStyles
  412. }
  413. if (hook) {
  414. var functional = options.functional
  415. var existing = functional
  416. ? options.render
  417. : options.beforeCreate
  418. if (!functional) {
  419. // inject component registration as beforeCreate hook
  420. options.beforeCreate = existing
  421. ? [].concat(existing, hook)
  422. : [hook]
  423. } else {
  424. // for template-only hot-reload because in that case the render fn doesn't
  425. // go through the normalizer
  426. options._injectStyles = hook
  427. // register for functioal component in vue file
  428. options.render = function renderWithStyleInjection (h, context) {
  429. hook.call(context)
  430. return existing(h, context)
  431. }
  432. }
  433. }
  434. return {
  435. esModule: esModule,
  436. exports: scriptExports,
  437. options: options
  438. }
  439. }
  440. /***/ }),
  441. /* 3 */
  442. /***/ (function(module, exports, __webpack_require__) {
  443. "use strict";
  444. Object.defineProperty(exports, "__esModule", {
  445. value: true
  446. });
  447. var _tinycolor = __webpack_require__(27);
  448. var _tinycolor2 = _interopRequireDefault(_tinycolor);
  449. function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
  450. function _colorChange(data, oldHue) {
  451. var alpha = data && data.a;
  452. var color;
  453. if (data && data.hsl) {
  454. color = (0, _tinycolor2.default)(data.hsl);
  455. } else if (data && data.hex && data.hex.length > 0) {
  456. color = (0, _tinycolor2.default)(data.hex);
  457. } else {
  458. color = (0, _tinycolor2.default)(data);
  459. }
  460. if (color && (color._a === undefined || color._a === null)) {
  461. color.setAlpha(alpha || 1);
  462. }
  463. var hsl = color.toHsl();
  464. var hsv = color.toHsv();
  465. if (hsl.s === 0) {
  466. hsv.h = hsl.h = data.h || data.hsl && data.hsl.h || oldHue || 0;
  467. }
  468. return {
  469. hsl: hsl,
  470. hex: color.toHexString().toUpperCase(),
  471. hex8: color.toHex8String().toUpperCase(),
  472. hexT: Number(color.toHexTString()),
  473. rgba: color.toRgb(),
  474. hsv: hsv,
  475. oldHue: data.h || oldHue || hsl.h,
  476. source: data.source,
  477. a: data.a || color.getAlpha()
  478. };
  479. }
  480. exports.default = {
  481. props: ['value'],
  482. data: function data() {
  483. return {
  484. val: _colorChange(this.value)
  485. };
  486. },
  487. computed: {
  488. colors: {
  489. get: function get() {
  490. return this.val;
  491. },
  492. set: function set(newVal) {
  493. this.val = newVal;
  494. this.$emit('input', newVal);
  495. }
  496. }
  497. },
  498. watch: {
  499. value: function value(newVal) {
  500. this.val = _colorChange(newVal);
  501. }
  502. },
  503. methods: {
  504. colorChange: function colorChange(data, oldHue) {
  505. this.oldHue = this.colors.hsl.h;
  506. this.colors = _colorChange(data, oldHue || this.oldHue);
  507. },
  508. isValidHex: function isValidHex(hex) {
  509. return (0, _tinycolor2.default)(hex).isValid();
  510. },
  511. simpleCheckForValidColor: function simpleCheckForValidColor(data) {
  512. var keysToCheck = ['r', 'g', 'b', 'a', 'h', 's', 'l', 'v'];
  513. var checked = 0;
  514. var passed = 0;
  515. for (var i = 0; i < keysToCheck.length; i++) {
  516. var letter = keysToCheck[i];
  517. if (data[letter]) {
  518. checked++;
  519. if (!isNaN(data[letter])) {
  520. passed++;
  521. }
  522. }
  523. }
  524. if (checked === passed) {
  525. return data;
  526. }
  527. },
  528. paletteUpperCase: function paletteUpperCase(palette) {
  529. return palette.map(function (c) {
  530. return c.toUpperCase();
  531. });
  532. },
  533. isTransparent: function isTransparent(color) {
  534. return (0, _tinycolor2.default)(color).getAlpha() === 0;
  535. }
  536. }
  537. };
  538. /***/ }),
  539. /* 4 */
  540. /***/ (function(module, __webpack_exports__, __webpack_require__) {
  541. "use strict";
  542. Object.defineProperty(__webpack_exports__, "__esModule", { value: true });
  543. /* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__babel_loader_node_modules_vue_loader_lib_selector_type_script_index_0_EditableInput_vue__ = __webpack_require__(10);
  544. /* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__babel_loader_node_modules_vue_loader_lib_selector_type_script_index_0_EditableInput_vue___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_0__babel_loader_node_modules_vue_loader_lib_selector_type_script_index_0_EditableInput_vue__);
  545. /* harmony namespace reexport (unknown) */ for(var __WEBPACK_IMPORT_KEY__ in __WEBPACK_IMPORTED_MODULE_0__babel_loader_node_modules_vue_loader_lib_selector_type_script_index_0_EditableInput_vue__) if(__WEBPACK_IMPORT_KEY__ !== 'default') (function(key) { __webpack_require__.d(__webpack_exports__, key, function() { return __WEBPACK_IMPORTED_MODULE_0__babel_loader_node_modules_vue_loader_lib_selector_type_script_index_0_EditableInput_vue__[key]; }) }(__WEBPACK_IMPORT_KEY__));
  546. /* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__node_modules_vue_loader_lib_template_compiler_index_id_data_v_441174dc_hasScoped_false_buble_transforms_node_modules_vue_loader_lib_selector_type_template_index_0_EditableInput_vue__ = __webpack_require__(30);
  547. var disposed = false
  548. function injectStyle (ssrContext) {
  549. if (disposed) return
  550. __webpack_require__(28)
  551. }
  552. var normalizeComponent = __webpack_require__(2)
  553. /* script */
  554. /* template */
  555. /* template functional */
  556. var __vue_template_functional__ = false
  557. /* styles */
  558. var __vue_styles__ = injectStyle
  559. /* scopeId */
  560. var __vue_scopeId__ = null
  561. /* moduleIdentifier (server only) */
  562. var __vue_module_identifier__ = null
  563. var Component = normalizeComponent(
  564. __WEBPACK_IMPORTED_MODULE_0__babel_loader_node_modules_vue_loader_lib_selector_type_script_index_0_EditableInput_vue___default.a,
  565. __WEBPACK_IMPORTED_MODULE_1__node_modules_vue_loader_lib_template_compiler_index_id_data_v_441174dc_hasScoped_false_buble_transforms_node_modules_vue_loader_lib_selector_type_template_index_0_EditableInput_vue__["a" /* default */],
  566. __vue_template_functional__,
  567. __vue_styles__,
  568. __vue_scopeId__,
  569. __vue_module_identifier__
  570. )
  571. Component.options.__file = "src/components/common/EditableInput.vue"
  572. /* hot reload */
  573. if (false) {(function () {
  574. var hotAPI = require("vue-loader/node_modules/vue-hot-reload-api")
  575. hotAPI.install(require("vue"), false)
  576. if (!hotAPI.compatible) return
  577. module.hot.accept()
  578. if (!module.hot.data) {
  579. hotAPI.createRecord("data-v-441174dc", Component.options)
  580. } else {
  581. hotAPI.reload("data-v-441174dc", Component.options)
  582. }
  583. module.hot.dispose(function (data) {
  584. disposed = true
  585. })
  586. })()}
  587. /* harmony default export */ __webpack_exports__["default"] = (Component.exports);
  588. /***/ }),
  589. /* 5 */
  590. /***/ (function(module, __webpack_exports__, __webpack_require__) {
  591. "use strict";
  592. Object.defineProperty(__webpack_exports__, "__esModule", { value: true });
  593. /* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__babel_loader_node_modules_vue_loader_lib_selector_type_script_index_0_Hue_vue__ = __webpack_require__(14);
  594. /* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__babel_loader_node_modules_vue_loader_lib_selector_type_script_index_0_Hue_vue___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_0__babel_loader_node_modules_vue_loader_lib_selector_type_script_index_0_Hue_vue__);
  595. /* harmony namespace reexport (unknown) */ for(var __WEBPACK_IMPORT_KEY__ in __WEBPACK_IMPORTED_MODULE_0__babel_loader_node_modules_vue_loader_lib_selector_type_script_index_0_Hue_vue__) if(__WEBPACK_IMPORT_KEY__ !== 'default') (function(key) { __webpack_require__.d(__webpack_exports__, key, function() { return __WEBPACK_IMPORTED_MODULE_0__babel_loader_node_modules_vue_loader_lib_selector_type_script_index_0_Hue_vue__[key]; }) }(__WEBPACK_IMPORT_KEY__));
  596. /* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__node_modules_vue_loader_lib_template_compiler_index_id_data_v_7b9aea78_hasScoped_false_buble_transforms_node_modules_vue_loader_lib_selector_type_template_index_0_Hue_vue__ = __webpack_require__(45);
  597. var disposed = false
  598. function injectStyle (ssrContext) {
  599. if (disposed) return
  600. __webpack_require__(43)
  601. }
  602. var normalizeComponent = __webpack_require__(2)
  603. /* script */
  604. /* template */
  605. /* template functional */
  606. var __vue_template_functional__ = false
  607. /* styles */
  608. var __vue_styles__ = injectStyle
  609. /* scopeId */
  610. var __vue_scopeId__ = null
  611. /* moduleIdentifier (server only) */
  612. var __vue_module_identifier__ = null
  613. var Component = normalizeComponent(
  614. __WEBPACK_IMPORTED_MODULE_0__babel_loader_node_modules_vue_loader_lib_selector_type_script_index_0_Hue_vue___default.a,
  615. __WEBPACK_IMPORTED_MODULE_1__node_modules_vue_loader_lib_template_compiler_index_id_data_v_7b9aea78_hasScoped_false_buble_transforms_node_modules_vue_loader_lib_selector_type_template_index_0_Hue_vue__["a" /* default */],
  616. __vue_template_functional__,
  617. __vue_styles__,
  618. __vue_scopeId__,
  619. __vue_module_identifier__
  620. )
  621. Component.options.__file = "src/components/common/Hue.vue"
  622. /* hot reload */
  623. if (false) {(function () {
  624. var hotAPI = require("vue-loader/node_modules/vue-hot-reload-api")
  625. hotAPI.install(require("vue"), false)
  626. if (!hotAPI.compatible) return
  627. module.hot.accept()
  628. if (!module.hot.data) {
  629. hotAPI.createRecord("data-v-7b9aea78", Component.options)
  630. } else {
  631. hotAPI.reload("data-v-7b9aea78", Component.options)
  632. }
  633. module.hot.dispose(function (data) {
  634. disposed = true
  635. })
  636. })()}
  637. /* harmony default export */ __webpack_exports__["default"] = (Component.exports);
  638. /***/ }),
  639. /* 6 */
  640. /***/ (function(module, __webpack_exports__, __webpack_require__) {
  641. "use strict";
  642. Object.defineProperty(__webpack_exports__, "__esModule", { value: true });
  643. /* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__babel_loader_node_modules_vue_loader_lib_selector_type_script_index_0_Saturation_vue__ = __webpack_require__(17);
  644. /* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__babel_loader_node_modules_vue_loader_lib_selector_type_script_index_0_Saturation_vue___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_0__babel_loader_node_modules_vue_loader_lib_selector_type_script_index_0_Saturation_vue__);
  645. /* harmony namespace reexport (unknown) */ for(var __WEBPACK_IMPORT_KEY__ in __WEBPACK_IMPORTED_MODULE_0__babel_loader_node_modules_vue_loader_lib_selector_type_script_index_0_Saturation_vue__) if(__WEBPACK_IMPORT_KEY__ !== 'default') (function(key) { __webpack_require__.d(__webpack_exports__, key, function() { return __WEBPACK_IMPORTED_MODULE_0__babel_loader_node_modules_vue_loader_lib_selector_type_script_index_0_Saturation_vue__[key]; }) }(__WEBPACK_IMPORT_KEY__));
  646. /* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__node_modules_vue_loader_lib_template_compiler_index_id_data_v_ba139894_hasScoped_false_buble_transforms_node_modules_vue_loader_lib_selector_type_template_index_0_Saturation_vue__ = __webpack_require__(60);
  647. var disposed = false
  648. function injectStyle (ssrContext) {
  649. if (disposed) return
  650. __webpack_require__(55)
  651. }
  652. var normalizeComponent = __webpack_require__(2)
  653. /* script */
  654. /* template */
  655. /* template functional */
  656. var __vue_template_functional__ = false
  657. /* styles */
  658. var __vue_styles__ = injectStyle
  659. /* scopeId */
  660. var __vue_scopeId__ = null
  661. /* moduleIdentifier (server only) */
  662. var __vue_module_identifier__ = null
  663. var Component = normalizeComponent(
  664. __WEBPACK_IMPORTED_MODULE_0__babel_loader_node_modules_vue_loader_lib_selector_type_script_index_0_Saturation_vue___default.a,
  665. __WEBPACK_IMPORTED_MODULE_1__node_modules_vue_loader_lib_template_compiler_index_id_data_v_ba139894_hasScoped_false_buble_transforms_node_modules_vue_loader_lib_selector_type_template_index_0_Saturation_vue__["a" /* default */],
  666. __vue_template_functional__,
  667. __vue_styles__,
  668. __vue_scopeId__,
  669. __vue_module_identifier__
  670. )
  671. Component.options.__file = "src/components/common/Saturation.vue"
  672. /* hot reload */
  673. if (false) {(function () {
  674. var hotAPI = require("vue-loader/node_modules/vue-hot-reload-api")
  675. hotAPI.install(require("vue"), false)
  676. if (!hotAPI.compatible) return
  677. module.hot.accept()
  678. if (!module.hot.data) {
  679. hotAPI.createRecord("data-v-ba139894", Component.options)
  680. } else {
  681. hotAPI.reload("data-v-ba139894", Component.options)
  682. }
  683. module.hot.dispose(function (data) {
  684. disposed = true
  685. })
  686. })()}
  687. /* harmony default export */ __webpack_exports__["default"] = (Component.exports);
  688. /***/ }),
  689. /* 7 */
  690. /***/ (function(module, __webpack_exports__, __webpack_require__) {
  691. "use strict";
  692. Object.defineProperty(__webpack_exports__, "__esModule", { value: true });
  693. /* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__babel_loader_node_modules_vue_loader_lib_selector_type_script_index_0_Alpha_vue__ = __webpack_require__(18);
  694. /* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__babel_loader_node_modules_vue_loader_lib_selector_type_script_index_0_Alpha_vue___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_0__babel_loader_node_modules_vue_loader_lib_selector_type_script_index_0_Alpha_vue__);
  695. /* harmony namespace reexport (unknown) */ for(var __WEBPACK_IMPORT_KEY__ in __WEBPACK_IMPORTED_MODULE_0__babel_loader_node_modules_vue_loader_lib_selector_type_script_index_0_Alpha_vue__) if(__WEBPACK_IMPORT_KEY__ !== 'default') (function(key) { __webpack_require__.d(__webpack_exports__, key, function() { return __WEBPACK_IMPORTED_MODULE_0__babel_loader_node_modules_vue_loader_lib_selector_type_script_index_0_Alpha_vue__[key]; }) }(__WEBPACK_IMPORT_KEY__));
  696. /* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__node_modules_vue_loader_lib_template_compiler_index_id_data_v_1af1f1ac_hasScoped_false_buble_transforms_node_modules_vue_loader_lib_selector_type_template_index_0_Alpha_vue__ = __webpack_require__(66);
  697. var disposed = false
  698. function injectStyle (ssrContext) {
  699. if (disposed) return
  700. __webpack_require__(61)
  701. }
  702. var normalizeComponent = __webpack_require__(2)
  703. /* script */
  704. /* template */
  705. /* template functional */
  706. var __vue_template_functional__ = false
  707. /* styles */
  708. var __vue_styles__ = injectStyle
  709. /* scopeId */
  710. var __vue_scopeId__ = null
  711. /* moduleIdentifier (server only) */
  712. var __vue_module_identifier__ = null
  713. var Component = normalizeComponent(
  714. __WEBPACK_IMPORTED_MODULE_0__babel_loader_node_modules_vue_loader_lib_selector_type_script_index_0_Alpha_vue___default.a,
  715. __WEBPACK_IMPORTED_MODULE_1__node_modules_vue_loader_lib_template_compiler_index_id_data_v_1af1f1ac_hasScoped_false_buble_transforms_node_modules_vue_loader_lib_selector_type_template_index_0_Alpha_vue__["a" /* default */],
  716. __vue_template_functional__,
  717. __vue_styles__,
  718. __vue_scopeId__,
  719. __vue_module_identifier__
  720. )
  721. Component.options.__file = "src/components/common/Alpha.vue"
  722. /* hot reload */
  723. if (false) {(function () {
  724. var hotAPI = require("vue-loader/node_modules/vue-hot-reload-api")
  725. hotAPI.install(require("vue"), false)
  726. if (!hotAPI.compatible) return
  727. module.hot.accept()
  728. if (!module.hot.data) {
  729. hotAPI.createRecord("data-v-1af1f1ac", Component.options)
  730. } else {
  731. hotAPI.reload("data-v-1af1f1ac", Component.options)
  732. }
  733. module.hot.dispose(function (data) {
  734. disposed = true
  735. })
  736. })()}
  737. /* harmony default export */ __webpack_exports__["default"] = (Component.exports);
  738. /***/ }),
  739. /* 8 */
  740. /***/ (function(module, __webpack_exports__, __webpack_require__) {
  741. "use strict";
  742. Object.defineProperty(__webpack_exports__, "__esModule", { value: true });
  743. /* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__babel_loader_node_modules_vue_loader_lib_selector_type_script_index_0_Checkboard_vue__ = __webpack_require__(19);
  744. /* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__babel_loader_node_modules_vue_loader_lib_selector_type_script_index_0_Checkboard_vue___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_0__babel_loader_node_modules_vue_loader_lib_selector_type_script_index_0_Checkboard_vue__);
  745. /* harmony namespace reexport (unknown) */ for(var __WEBPACK_IMPORT_KEY__ in __WEBPACK_IMPORTED_MODULE_0__babel_loader_node_modules_vue_loader_lib_selector_type_script_index_0_Checkboard_vue__) if(__WEBPACK_IMPORT_KEY__ !== 'default') (function(key) { __webpack_require__.d(__webpack_exports__, key, function() { return __WEBPACK_IMPORTED_MODULE_0__babel_loader_node_modules_vue_loader_lib_selector_type_script_index_0_Checkboard_vue__[key]; }) }(__WEBPACK_IMPORT_KEY__));
  746. /* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__node_modules_vue_loader_lib_template_compiler_index_id_data_v_5b6dc0c2_hasScoped_false_buble_transforms_node_modules_vue_loader_lib_selector_type_template_index_0_Checkboard_vue__ = __webpack_require__(65);
  747. var disposed = false
  748. function injectStyle (ssrContext) {
  749. if (disposed) return
  750. __webpack_require__(63)
  751. }
  752. var normalizeComponent = __webpack_require__(2)
  753. /* script */
  754. /* template */
  755. /* template functional */
  756. var __vue_template_functional__ = false
  757. /* styles */
  758. var __vue_styles__ = injectStyle
  759. /* scopeId */
  760. var __vue_scopeId__ = null
  761. /* moduleIdentifier (server only) */
  762. var __vue_module_identifier__ = null
  763. var Component = normalizeComponent(
  764. __WEBPACK_IMPORTED_MODULE_0__babel_loader_node_modules_vue_loader_lib_selector_type_script_index_0_Checkboard_vue___default.a,
  765. __WEBPACK_IMPORTED_MODULE_1__node_modules_vue_loader_lib_template_compiler_index_id_data_v_5b6dc0c2_hasScoped_false_buble_transforms_node_modules_vue_loader_lib_selector_type_template_index_0_Checkboard_vue__["a" /* default */],
  766. __vue_template_functional__,
  767. __vue_styles__,
  768. __vue_scopeId__,
  769. __vue_module_identifier__
  770. )
  771. Component.options.__file = "src/components/common/Checkboard.vue"
  772. /* hot reload */
  773. if (false) {(function () {
  774. var hotAPI = require("vue-loader/node_modules/vue-hot-reload-api")
  775. hotAPI.install(require("vue"), false)
  776. if (!hotAPI.compatible) return
  777. module.hot.accept()
  778. if (!module.hot.data) {
  779. hotAPI.createRecord("data-v-5b6dc0c2", Component.options)
  780. } else {
  781. hotAPI.reload("data-v-5b6dc0c2", Component.options)
  782. }
  783. module.hot.dispose(function (data) {
  784. disposed = true
  785. })
  786. })()}
  787. /* harmony default export */ __webpack_exports__["default"] = (Component.exports);
  788. /***/ }),
  789. /* 9 */
  790. /***/ (function(module, exports, __webpack_require__) {
  791. "use strict";
  792. Object.defineProperty(exports, "__esModule", {
  793. value: true
  794. });
  795. var _color = __webpack_require__(3);
  796. var _color2 = _interopRequireDefault(_color);
  797. var _EditableInput = __webpack_require__(4);
  798. var _EditableInput2 = _interopRequireDefault(_EditableInput);
  799. function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
  800. var defaultColors = ['#4D4D4D', '#999999', '#FFFFFF', '#F44E3B', '#FE9200', '#FCDC00', '#DBDF00', '#A4DD00', '#68CCCA', '#73D8FF', '#AEA1FF', '#FDA1FF', '#333333', '#808080', '#CCCCCC', '#D33115', '#E27300', '#FCC400', '#B0BC00', '#68BC00', '#16A5A5', '#009CE0', '#7B64FF', '#FA28FF', '#000000', '#666666', '#B3B3B3', '#9F0500', '#C45100', '#FB9E00', '#808900', '#194D33', '#0C797D', '#0062B1', '#653294', '#AB149E'];
  801. exports.default = {
  802. name: 'Compact',
  803. mixins: [_color2.default],
  804. props: {
  805. palette: {
  806. type: Array,
  807. default: function _default() {
  808. return defaultColors;
  809. }
  810. }
  811. },
  812. components: {
  813. 'ed-in': _EditableInput2.default
  814. },
  815. computed: {
  816. pick: function pick() {
  817. return this.colors.hex.toUpperCase();
  818. }
  819. },
  820. methods: {
  821. handlerClick: function handlerClick(c) {
  822. this.colorChange({
  823. hex: c,
  824. source: 'hex'
  825. });
  826. }
  827. }
  828. };
  829. /***/ }),
  830. /* 10 */
  831. /***/ (function(module, exports, __webpack_require__) {
  832. "use strict";
  833. Object.defineProperty(exports, "__esModule", {
  834. value: true
  835. });
  836. exports.default = {
  837. name: 'editableInput',
  838. props: {
  839. label: String,
  840. labelText: String,
  841. desc: String,
  842. value: [String, Number],
  843. max: Number,
  844. min: Number,
  845. arrowOffset: {
  846. type: Number,
  847. default: 1
  848. }
  849. },
  850. computed: {
  851. val: {
  852. get: function get() {
  853. return this.value;
  854. },
  855. set: function set(v) {
  856. if (!(this.max === undefined) && +v > this.max) {
  857. this.$refs.input.value = this.max;
  858. } else {
  859. return v;
  860. }
  861. }
  862. },
  863. labelId: function labelId() {
  864. return 'input__label__' + this.label + '__' + Math.random().toString().slice(2, 5);
  865. },
  866. labelSpanText: function labelSpanText() {
  867. return this.labelText || this.label;
  868. }
  869. },
  870. methods: {
  871. update: function update(e) {
  872. this.handleChange(e.target.value);
  873. },
  874. handleChange: function handleChange(newVal) {
  875. var data = {};
  876. data[this.label] = newVal;
  877. if (data.hex === undefined && data['#'] === undefined) {
  878. this.$emit('change', data);
  879. } else if (newVal.length > 5) {
  880. this.$emit('change', data);
  881. }
  882. },
  883. handleKeyDown: function handleKeyDown(e) {
  884. var val = this.val;
  885. var number = Number(val);
  886. if (number) {
  887. var amount = this.arrowOffset || 1;
  888. if (e.keyCode === 38) {
  889. val = number + amount;
  890. this.handleChange(val);
  891. e.preventDefault();
  892. }
  893. if (e.keyCode === 40) {
  894. val = number - amount;
  895. this.handleChange(val);
  896. e.preventDefault();
  897. }
  898. }
  899. }
  900. }
  901. };
  902. /***/ }),
  903. /* 11 */
  904. /***/ (function(module, exports, __webpack_require__) {
  905. "use strict";
  906. Object.defineProperty(exports, "__esModule", {
  907. value: true
  908. });
  909. var _color = __webpack_require__(3);
  910. var _color2 = _interopRequireDefault(_color);
  911. function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
  912. var defaultColors = ['#FFFFFF', '#F2F2F2', '#E6E6E6', '#D9D9D9', '#CCCCCC', '#BFBFBF', '#B3B3B3', '#A6A6A6', '#999999', '#8C8C8C', '#808080', '#737373', '#666666', '#595959', '#4D4D4D', '#404040', '#333333', '#262626', '#0D0D0D', '#000000'];
  913. exports.default = {
  914. name: 'Grayscale',
  915. mixins: [_color2.default],
  916. props: {
  917. palette: {
  918. type: Array,
  919. default: function _default() {
  920. return defaultColors;
  921. }
  922. }
  923. },
  924. components: {},
  925. computed: {
  926. pick: function pick() {
  927. return this.colors.hex.toUpperCase();
  928. }
  929. },
  930. methods: {
  931. handlerClick: function handlerClick(c) {
  932. this.colorChange({
  933. hex: c,
  934. source: 'hex'
  935. });
  936. }
  937. }
  938. };
  939. /***/ }),
  940. /* 12 */
  941. /***/ (function(module, exports, __webpack_require__) {
  942. "use strict";
  943. Object.defineProperty(exports, "__esModule", {
  944. value: true
  945. });
  946. var _EditableInput = __webpack_require__(4);
  947. var _EditableInput2 = _interopRequireDefault(_EditableInput);
  948. var _color = __webpack_require__(3);
  949. var _color2 = _interopRequireDefault(_color);
  950. function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
  951. exports.default = {
  952. name: 'Material',
  953. mixins: [_color2.default],
  954. components: {
  955. 'ed-in': _EditableInput2.default
  956. },
  957. methods: {
  958. onChange: function onChange(data) {
  959. if (!data) {
  960. return;
  961. }
  962. if (data.hex) {
  963. this.isValidHex(data.hex) && this.colorChange({
  964. hex: data.hex,
  965. source: 'hex'
  966. });
  967. } else if (data.r || data.g || data.b) {
  968. this.colorChange({
  969. r: data.r || this.colors.rgba.r,
  970. g: data.g || this.colors.rgba.g,
  971. b: data.b || this.colors.rgba.b,
  972. a: data.a || this.colors.rgba.a,
  973. source: 'rgba'
  974. });
  975. }
  976. }
  977. }
  978. };
  979. /***/ }),
  980. /* 13 */
  981. /***/ (function(module, exports, __webpack_require__) {
  982. "use strict";
  983. Object.defineProperty(exports, "__esModule", {
  984. value: true
  985. });
  986. var _color = __webpack_require__(3);
  987. var _color2 = _interopRequireDefault(_color);
  988. var _Hue = __webpack_require__(5);
  989. var _Hue2 = _interopRequireDefault(_Hue);
  990. function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
  991. exports.default = {
  992. name: 'Slider',
  993. mixins: [_color2.default],
  994. props: {
  995. swatches: {
  996. type: Array,
  997. default: function _default() {
  998. return ['.80', '.65', '.50', '.35', '.20'];
  999. }
  1000. }
  1001. },
  1002. components: {
  1003. hue: _Hue2.default
  1004. },
  1005. computed: {
  1006. activeOffset: function activeOffset() {
  1007. var hasBlack = this.swatches.includes('0');
  1008. var hasWhite = this.swatches.includes('1');
  1009. var hsl = this.colors.hsl;
  1010. if (Math.round(hsl.s * 100) / 100 === 0.50) {
  1011. return Math.round(hsl.l * 100) / 100;
  1012. } else if (hasBlack && hsl.l === 0) {
  1013. return 0;
  1014. } else if (hasWhite && hsl.l === 1) {
  1015. return 1;
  1016. }
  1017. return -1;
  1018. }
  1019. },
  1020. methods: {
  1021. hueChange: function hueChange(data) {
  1022. this.colorChange(data);
  1023. },
  1024. handleSwClick: function handleSwClick(index, offset) {
  1025. this.colorChange({
  1026. h: this.colors.hsl.h,
  1027. s: 0.5,
  1028. l: offset,
  1029. source: 'hsl'
  1030. });
  1031. }
  1032. }
  1033. };
  1034. /***/ }),
  1035. /* 14 */
  1036. /***/ (function(module, exports, __webpack_require__) {
  1037. "use strict";
  1038. Object.defineProperty(exports, "__esModule", {
  1039. value: true
  1040. });
  1041. exports.default = {
  1042. name: 'Hue',
  1043. props: {
  1044. value: Object,
  1045. direction: {
  1046. type: String,
  1047. default: 'horizontal'
  1048. }
  1049. },
  1050. data: function data() {
  1051. return {
  1052. oldHue: 0,
  1053. pullDirection: ''
  1054. };
  1055. },
  1056. computed: {
  1057. colors: function colors() {
  1058. var h = this.value.hsl.h;
  1059. if (h !== 0 && h - this.oldHue > 0) this.pullDirection = 'right';
  1060. if (h !== 0 && h - this.oldHue < 0) this.pullDirection = 'left';
  1061. this.oldHue = h;
  1062. return this.value;
  1063. },
  1064. directionClass: function directionClass() {
  1065. return {
  1066. 'vc-hue--horizontal': this.direction === 'horizontal',
  1067. 'vc-hue--vertical': this.direction === 'vertical'
  1068. };
  1069. },
  1070. pointerTop: function pointerTop() {
  1071. if (this.direction === 'vertical') {
  1072. if (this.colors.hsl.h === 0 && this.pullDirection === 'right') return 0;
  1073. return -(this.colors.hsl.h * 100 / 360) + 100 + '%';
  1074. } else {
  1075. return 0;
  1076. }
  1077. },
  1078. pointerLeft: function pointerLeft() {
  1079. if (this.direction === 'vertical') {
  1080. return 0;
  1081. } else {
  1082. if (this.colors.hsl.h === 0 && this.pullDirection === 'right') return '100%';
  1083. return this.colors.hsl.h * 100 / 360 + '%';
  1084. }
  1085. }
  1086. },
  1087. methods: {
  1088. handleChange: function handleChange(e, skip) {
  1089. !skip && e.preventDefault();
  1090. var container = this.$refs.container;
  1091. var containerWidth = container.clientWidth;
  1092. var containerHeight = container.clientHeight;
  1093. var xOffset = container.getBoundingClientRect().left + window.pageXOffset;
  1094. var yOffset = container.getBoundingClientRect().top + window.pageYOffset;
  1095. var pageX = e.pageX || (e.touches ? e.touches[0].pageX : 0);
  1096. var pageY = e.pageY || (e.touches ? e.touches[0].pageY : 0);
  1097. var left = pageX - xOffset;
  1098. var top = pageY - yOffset;
  1099. var h;
  1100. var percent;
  1101. if (this.direction === 'vertical') {
  1102. if (top < 0) {
  1103. h = 360;
  1104. } else if (top > containerHeight) {
  1105. h = 0;
  1106. } else {
  1107. percent = -(top * 100 / containerHeight) + 100;
  1108. h = 360 * percent / 100;
  1109. }
  1110. if (this.colors.hsl.h !== h) {
  1111. this.$emit('change', {
  1112. h: h,
  1113. s: this.colors.hsl.s,
  1114. l: this.colors.hsl.l,
  1115. a: this.colors.hsl.a,
  1116. source: 'hsl'
  1117. });
  1118. }
  1119. } else {
  1120. if (left < 0) {
  1121. h = 0;
  1122. } else if (left > containerWidth) {
  1123. h = 360;
  1124. } else {
  1125. percent = left * 100 / containerWidth;
  1126. h = 360 * percent / 100;
  1127. }
  1128. if (this.colors.hsl.h !== h) {
  1129. this.$emit('change', {
  1130. h: h,
  1131. s: this.colors.hsl.s,
  1132. l: this.colors.hsl.l,
  1133. a: this.colors.hsl.a,
  1134. source: 'hsl'
  1135. });
  1136. }
  1137. }
  1138. },
  1139. handleMouseDown: function handleMouseDown(e) {
  1140. this.handleChange(e, true);
  1141. window.addEventListener('mousemove', this.handleChange);
  1142. window.addEventListener('mouseup', this.handleMouseUp);
  1143. },
  1144. handleMouseUp: function handleMouseUp(e) {
  1145. this.unbindEventListeners();
  1146. },
  1147. unbindEventListeners: function unbindEventListeners() {
  1148. window.removeEventListener('mousemove', this.handleChange);
  1149. window.removeEventListener('mouseup', this.handleMouseUp);
  1150. }
  1151. }
  1152. };
  1153. /***/ }),
  1154. /* 15 */
  1155. /***/ (function(module, exports, __webpack_require__) {
  1156. "use strict";
  1157. Object.defineProperty(exports, "__esModule", {
  1158. value: true
  1159. });
  1160. var _materialColors = __webpack_require__(50);
  1161. var _materialColors2 = _interopRequireDefault(_materialColors);
  1162. var _color = __webpack_require__(3);
  1163. var _color2 = _interopRequireDefault(_color);
  1164. function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
  1165. var colorMap = ['red', 'pink', 'purple', 'deepPurple', 'indigo', 'blue', 'lightBlue', 'cyan', 'teal', 'green', 'lightGreen', 'lime', 'yellow', 'amber', 'orange', 'deepOrange', 'brown', 'blueGrey', 'black'];
  1166. var colorLevel = ['900', '700', '500', '300', '100'];
  1167. var defaultColors = function () {
  1168. var colors = [];
  1169. colorMap.forEach(function (type) {
  1170. var typeColor = [];
  1171. if (type.toLowerCase() === 'black' || type.toLowerCase() === 'white') {
  1172. typeColor = typeColor.concat(['#000000', '#FFFFFF']);
  1173. } else {
  1174. colorLevel.forEach(function (level) {
  1175. var color = _materialColors2.default[type][level];
  1176. typeColor.push(color.toUpperCase());
  1177. });
  1178. }
  1179. colors.push(typeColor);
  1180. });
  1181. return colors;
  1182. }();
  1183. exports.default = {
  1184. name: 'Swatches',
  1185. mixins: [_color2.default],
  1186. props: {
  1187. palette: {
  1188. type: Array,
  1189. default: function _default() {
  1190. return defaultColors;
  1191. }
  1192. }
  1193. },
  1194. computed: {
  1195. pick: function pick() {
  1196. return this.colors.hex;
  1197. }
  1198. },
  1199. methods: {
  1200. equal: function equal(color) {
  1201. return color.toLowerCase() === this.colors.hex.toLowerCase();
  1202. },
  1203. handlerClick: function handlerClick(c) {
  1204. this.colorChange({
  1205. hex: c,
  1206. source: 'hex'
  1207. });
  1208. }
  1209. }
  1210. };
  1211. /***/ }),
  1212. /* 16 */
  1213. /***/ (function(module, exports, __webpack_require__) {
  1214. "use strict";
  1215. Object.defineProperty(exports, "__esModule", {
  1216. value: true
  1217. });
  1218. var _color = __webpack_require__(3);
  1219. var _color2 = _interopRequireDefault(_color);
  1220. var _EditableInput = __webpack_require__(4);
  1221. var _EditableInput2 = _interopRequireDefault(_EditableInput);
  1222. var _Saturation = __webpack_require__(6);
  1223. var _Saturation2 = _interopRequireDefault(_Saturation);
  1224. var _Hue = __webpack_require__(5);
  1225. var _Hue2 = _interopRequireDefault(_Hue);
  1226. var _Alpha = __webpack_require__(7);
  1227. var _Alpha2 = _interopRequireDefault(_Alpha);
  1228. function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
  1229. exports.default = {
  1230. name: 'Photoshop',
  1231. mixins: [_color2.default],
  1232. props: {
  1233. head: {
  1234. type: String,
  1235. default: 'Color Picker'
  1236. },
  1237. disableFields: {
  1238. type: Boolean,
  1239. default: false
  1240. },
  1241. hasResetButton: {
  1242. type: Boolean,
  1243. default: false
  1244. },
  1245. acceptLabel: {
  1246. type: String,
  1247. default: 'OK'
  1248. },
  1249. cancelLabel: {
  1250. type: String,
  1251. default: 'Cancel'
  1252. },
  1253. resetLabel: {
  1254. type: String,
  1255. default: 'Reset'
  1256. },
  1257. newLabel: {
  1258. type: String,
  1259. default: 'new'
  1260. },
  1261. currentLabel: {
  1262. type: String,
  1263. default: 'current'
  1264. }
  1265. },
  1266. components: {
  1267. saturation: _Saturation2.default,
  1268. hue: _Hue2.default,
  1269. alpha: _Alpha2.default,
  1270. 'ed-in': _EditableInput2.default
  1271. },
  1272. data: function data() {
  1273. return {
  1274. currentColor: '#FFF'
  1275. };
  1276. },
  1277. computed: {
  1278. hsv: function hsv() {
  1279. var hsv = this.colors.hsv;
  1280. return {
  1281. h: hsv.h.toFixed(),
  1282. s: (hsv.s * 100).toFixed(),
  1283. v: (hsv.v * 100).toFixed()
  1284. };
  1285. },
  1286. hex: function hex() {
  1287. var hex = this.colors.hex;
  1288. return hex && hex.replace('#', '');
  1289. }
  1290. },
  1291. created: function created() {
  1292. this.currentColor = this.colors.hex;
  1293. },
  1294. methods: {
  1295. childChange: function childChange(data) {
  1296. this.colorChange(data);
  1297. },
  1298. inputChange: function inputChange(data) {
  1299. if (!data) {
  1300. return;
  1301. }
  1302. if (data['#']) {
  1303. this.isValidHex(data['#']) && this.colorChange({
  1304. hex: data['#'],
  1305. source: 'hex'
  1306. });
  1307. } else if (data.r || data.g || data.b || data.a) {
  1308. this.colorChange({
  1309. r: data.r || this.colors.rgba.r,
  1310. g: data.g || this.colors.rgba.g,
  1311. b: data.b || this.colors.rgba.b,
  1312. a: data.a || this.colors.rgba.a,
  1313. source: 'rgba'
  1314. });
  1315. } else if (data.h || data.s || data.v) {
  1316. this.colorChange({
  1317. h: data.h || this.colors.hsv.h,
  1318. s: data.s / 100 || this.colors.hsv.s,
  1319. v: data.v / 100 || this.colors.hsv.v,
  1320. source: 'hsv'
  1321. });
  1322. }
  1323. },
  1324. clickCurrentColor: function clickCurrentColor() {
  1325. this.colorChange({
  1326. hex: this.currentColor,
  1327. source: 'hex'
  1328. });
  1329. },
  1330. handleAccept: function handleAccept() {
  1331. this.$emit('ok');
  1332. },
  1333. handleCancel: function handleCancel() {
  1334. this.$emit('cancel');
  1335. },
  1336. handleReset: function handleReset() {
  1337. this.$emit('reset');
  1338. }
  1339. }
  1340. };
  1341. /***/ }),
  1342. /* 17 */
  1343. /***/ (function(module, exports, __webpack_require__) {
  1344. "use strict";
  1345. Object.defineProperty(exports, "__esModule", {
  1346. value: true
  1347. });
  1348. var _clamp = __webpack_require__(57);
  1349. var _clamp2 = _interopRequireDefault(_clamp);
  1350. var _lodash = __webpack_require__(58);
  1351. var _lodash2 = _interopRequireDefault(_lodash);
  1352. function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
  1353. exports.default = {
  1354. name: 'Saturation',
  1355. props: {
  1356. value: Object
  1357. },
  1358. computed: {
  1359. colors: function colors() {
  1360. return this.value;
  1361. },
  1362. bgColor: function bgColor() {
  1363. return 'hsl(' + this.colors.hsv.h + ', 100%, 50%)';
  1364. },
  1365. pointerTop: function pointerTop() {
  1366. return -(this.colors.hsv.v * 100) + 1 + 100 + '%';
  1367. },
  1368. pointerLeft: function pointerLeft() {
  1369. return this.colors.hsv.s * 100 + '%';
  1370. }
  1371. },
  1372. methods: {
  1373. throttle: (0, _lodash2.default)(function (fn, data) {
  1374. fn(data);
  1375. }, 20, {
  1376. 'leading': true,
  1377. 'trailing': false
  1378. }),
  1379. handleChange: function handleChange(e, skip) {
  1380. !skip && e.preventDefault();
  1381. var container = this.$refs.container;
  1382. var containerWidth = container.clientWidth;
  1383. var containerHeight = container.clientHeight;
  1384. var xOffset = container.getBoundingClientRect().left + window.pageXOffset;
  1385. var yOffset = container.getBoundingClientRect().top + window.pageYOffset;
  1386. var pageX = e.pageX || (e.touches ? e.touches[0].pageX : 0);
  1387. var pageY = e.pageY || (e.touches ? e.touches[0].pageY : 0);
  1388. var left = (0, _clamp2.default)(pageX - xOffset, 0, containerWidth);
  1389. var top = (0, _clamp2.default)(pageY - yOffset, 0, containerHeight);
  1390. var saturation = left / containerWidth;
  1391. var bright = (0, _clamp2.default)(-(top / containerHeight) + 1, 0.05, 1);
  1392. this.throttle(this.onChange, {
  1393. h: this.colors.hsv.h,
  1394. s: saturation,
  1395. v: bright,
  1396. a: this.colors.hsv.a,
  1397. source: 'hsva'
  1398. });
  1399. },
  1400. onChange: function onChange(param) {
  1401. this.$emit('change', param);
  1402. },
  1403. handleMouseDown: function handleMouseDown(e) {
  1404. window.addEventListener('mousemove', this.handleChange);
  1405. window.addEventListener('mouseup', this.handleChange);
  1406. window.addEventListener('mouseup', this.handleMouseUp);
  1407. },
  1408. handleMouseUp: function handleMouseUp(e) {
  1409. this.unbindEventListeners();
  1410. },
  1411. unbindEventListeners: function unbindEventListeners() {
  1412. window.removeEventListener('mousemove', this.handleChange);
  1413. window.removeEventListener('mouseup', this.handleChange);
  1414. window.removeEventListener('mouseup', this.handleMouseUp);
  1415. }
  1416. }
  1417. };
  1418. /***/ }),
  1419. /* 18 */
  1420. /***/ (function(module, exports, __webpack_require__) {
  1421. "use strict";
  1422. Object.defineProperty(exports, "__esModule", {
  1423. value: true
  1424. });
  1425. var _Checkboard = __webpack_require__(8);
  1426. var _Checkboard2 = _interopRequireDefault(_Checkboard);
  1427. function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
  1428. exports.default = {
  1429. name: 'Alpha',
  1430. props: {
  1431. value: Object,
  1432. onChange: Function
  1433. },
  1434. components: {
  1435. checkboard: _Checkboard2.default
  1436. },
  1437. computed: {
  1438. colors: function colors() {
  1439. return this.value;
  1440. },
  1441. gradientColor: function gradientColor() {
  1442. var rgba = this.colors.rgba;
  1443. var rgbStr = [rgba.r, rgba.g, rgba.b].join(',');
  1444. return '-webkit-linear-gradient(right, rgba(' + rgbStr + ', 0) 0%, rgba(' + rgbStr + ', 1) 100%)';
  1445. }
  1446. },
  1447. methods: {
  1448. handleChange: function handleChange(e, skip) {
  1449. !skip && e.preventDefault();
  1450. var container = this.$refs.container;
  1451. var containerWidth = container.clientWidth;
  1452. var xOffset = container.getBoundingClientRect().left + window.pageXOffset;
  1453. var pageX = e.pageX || (e.touches ? e.touches[0].pageX : 0);
  1454. var left = pageX - xOffset;
  1455. var a;
  1456. if (left < 0) {
  1457. a = 0.01;
  1458. } else if (left > containerWidth) {
  1459. a = 1;
  1460. } else {
  1461. a = Math.round(left * 100 / containerWidth) / 100;
  1462. }
  1463. if (this.colors.a !== a) {
  1464. this.$emit('change', {
  1465. h: this.colors.hsl.h,
  1466. s: this.colors.hsl.s,
  1467. l: this.colors.hsl.l,
  1468. a: a,
  1469. source: 'rgba'
  1470. });
  1471. }
  1472. },
  1473. handleMouseDown: function handleMouseDown(e) {
  1474. this.handleChange(e, true);
  1475. window.addEventListener('mousemove', this.handleChange);
  1476. window.addEventListener('mouseup', this.handleMouseUp);
  1477. },
  1478. handleMouseUp: function handleMouseUp() {
  1479. this.unbindEventListeners();
  1480. },
  1481. unbindEventListeners: function unbindEventListeners() {
  1482. window.removeEventListener('mousemove', this.handleChange);
  1483. window.removeEventListener('mouseup', this.handleMouseUp);
  1484. }
  1485. }
  1486. };
  1487. /***/ }),
  1488. /* 19 */
  1489. /***/ (function(module, exports, __webpack_require__) {
  1490. "use strict";
  1491. Object.defineProperty(exports, "__esModule", {
  1492. value: true
  1493. });
  1494. var _checkboardCache = {};
  1495. exports.default = {
  1496. name: 'Checkboard',
  1497. props: {
  1498. size: {
  1499. type: [Number, String],
  1500. default: 8
  1501. },
  1502. white: {
  1503. type: String,
  1504. default: '#fff'
  1505. },
  1506. grey: {
  1507. type: String,
  1508. default: '#e6e6e6'
  1509. }
  1510. },
  1511. computed: {
  1512. bgStyle: function bgStyle() {
  1513. return {
  1514. 'background-image': 'url(' + getCheckboard(this.white, this.grey, this.size) + ')'
  1515. };
  1516. }
  1517. }
  1518. };
  1519. function renderCheckboard(c1, c2, size) {
  1520. if (typeof document === 'undefined') {
  1521. return null;
  1522. }
  1523. var canvas = document.createElement('canvas');
  1524. canvas.width = canvas.height = size * 2;
  1525. var ctx = canvas.getContext('2d');
  1526. if (!ctx) {
  1527. return null;
  1528. }
  1529. ctx.fillStyle = c1;
  1530. ctx.fillRect(0, 0, canvas.width, canvas.height);
  1531. ctx.fillStyle = c2;
  1532. ctx.fillRect(0, 0, size, size);
  1533. ctx.translate(size, size);
  1534. ctx.fillRect(0, 0, size, size);
  1535. return canvas.toDataURL();
  1536. }
  1537. function getCheckboard(c1, c2, size) {
  1538. var key = c1 + ',' + c2 + ',' + size;
  1539. if (_checkboardCache[key]) {
  1540. return _checkboardCache[key];
  1541. } else {
  1542. var checkboard = renderCheckboard(c1, c2, size);
  1543. _checkboardCache[key] = checkboard;
  1544. return checkboard;
  1545. }
  1546. }
  1547. /***/ }),
  1548. /* 20 */
  1549. /***/ (function(module, exports, __webpack_require__) {
  1550. "use strict";
  1551. Object.defineProperty(exports, "__esModule", {
  1552. value: true
  1553. });
  1554. var _color = __webpack_require__(3);
  1555. var _color2 = _interopRequireDefault(_color);
  1556. var _EditableInput = __webpack_require__(4);
  1557. var _EditableInput2 = _interopRequireDefault(_EditableInput);
  1558. var _Saturation = __webpack_require__(6);
  1559. var _Saturation2 = _interopRequireDefault(_Saturation);
  1560. var _Hue = __webpack_require__(5);
  1561. var _Hue2 = _interopRequireDefault(_Hue);
  1562. var _Alpha = __webpack_require__(7);
  1563. var _Alpha2 = _interopRequireDefault(_Alpha);
  1564. var _Checkboard = __webpack_require__(8);
  1565. var _Checkboard2 = _interopRequireDefault(_Checkboard);
  1566. function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
  1567. var presetColors = ['#D0021B', '#F5A623', '#F8E71C', '#8B572A', '#7ED321', '#417505', '#BD10E0', '#9013FE', '#4A90E2', '#50E3C2', '#B8E986', '#000000', '#4A4A4A', '#9B9B9B', '#FFFFFF', 'rgba(0,0,0,0)'];
  1568. exports.default = {
  1569. name: 'Sketch',
  1570. mixins: [_color2.default],
  1571. components: {
  1572. saturation: _Saturation2.default,
  1573. hue: _Hue2.default,
  1574. alpha: _Alpha2.default,
  1575. 'ed-in': _EditableInput2.default,
  1576. checkboard: _Checkboard2.default
  1577. },
  1578. props: {
  1579. presetColors: {
  1580. type: Array,
  1581. default: function _default() {
  1582. return presetColors;
  1583. }
  1584. },
  1585. disableAlpha: {
  1586. type: Boolean,
  1587. default: false
  1588. },
  1589. disableFields: {
  1590. type: Boolean,
  1591. default: false
  1592. }
  1593. },
  1594. computed: {
  1595. hex: function hex() {
  1596. var hex = void 0;
  1597. if (this.colors.a < 1) {
  1598. hex = this.colors.hex8;
  1599. } else {
  1600. hex = this.colors.hex;
  1601. }
  1602. return hex.replace('#', '');
  1603. },
  1604. activeColor: function activeColor() {
  1605. var rgba = this.colors.rgba;
  1606. return 'rgba(' + [rgba.r, rgba.g, rgba.b, rgba.a].join(',') + ')';
  1607. }
  1608. },
  1609. methods: {
  1610. handlePreset: function handlePreset(c) {
  1611. this.colorChange({
  1612. hex: c,
  1613. source: 'hex'
  1614. });
  1615. },
  1616. childChange: function childChange(data) {
  1617. this.colorChange(data);
  1618. },
  1619. inputChange: function inputChange(data) {
  1620. if (!data) {
  1621. return;
  1622. }
  1623. if (data.hex) {
  1624. this.isValidHex(data.hex) && this.colorChange({
  1625. hex: data.hex,
  1626. source: 'hex'
  1627. });
  1628. } else if (data.r || data.g || data.b || data.a) {
  1629. this.colorChange({
  1630. r: data.r || this.colors.rgba.r,
  1631. g: data.g || this.colors.rgba.g,
  1632. b: data.b || this.colors.rgba.b,
  1633. a: data.a || this.colors.rgba.a,
  1634. source: 'rgba'
  1635. });
  1636. }
  1637. }
  1638. }
  1639. };
  1640. /***/ }),
  1641. /* 21 */
  1642. /***/ (function(module, exports, __webpack_require__) {
  1643. "use strict";
  1644. Object.defineProperty(exports, "__esModule", {
  1645. value: true
  1646. });
  1647. var _color = __webpack_require__(3);
  1648. var _color2 = _interopRequireDefault(_color);
  1649. var _EditableInput = __webpack_require__(4);
  1650. var _EditableInput2 = _interopRequireDefault(_EditableInput);
  1651. var _Saturation = __webpack_require__(6);
  1652. var _Saturation2 = _interopRequireDefault(_Saturation);
  1653. var _Hue = __webpack_require__(5);
  1654. var _Hue2 = _interopRequireDefault(_Hue);
  1655. var _Alpha = __webpack_require__(7);
  1656. var _Alpha2 = _interopRequireDefault(_Alpha);
  1657. var _Checkboard = __webpack_require__(8);
  1658. var _Checkboard2 = _interopRequireDefault(_Checkboard);
  1659. function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
  1660. exports.default = {
  1661. name: 'Chrome',
  1662. mixins: [_color2.default],
  1663. props: {
  1664. disableAlpha: {
  1665. type: Boolean,
  1666. default: false
  1667. },
  1668. disableFields: {
  1669. type: Boolean,
  1670. default: false
  1671. }
  1672. },
  1673. components: {
  1674. saturation: _Saturation2.default,
  1675. hue: _Hue2.default,
  1676. alpha: _Alpha2.default,
  1677. 'ed-in': _EditableInput2.default,
  1678. checkboard: _Checkboard2.default
  1679. },
  1680. data: function data() {
  1681. return {
  1682. fieldsIndex: 0,
  1683. highlight: false
  1684. };
  1685. },
  1686. computed: {
  1687. hsl: function hsl() {
  1688. var _colors$hsl = this.colors.hsl,
  1689. h = _colors$hsl.h,
  1690. s = _colors$hsl.s,
  1691. l = _colors$hsl.l;
  1692. return {
  1693. h: h.toFixed(),
  1694. s: (s * 100).toFixed() + '%',
  1695. l: (l * 100).toFixed() + '%'
  1696. };
  1697. },
  1698. activeColor: function activeColor() {
  1699. var rgba = this.colors.rgba;
  1700. return 'rgba(' + [rgba.r, rgba.g, rgba.b, rgba.a].join(',') + ')';
  1701. },
  1702. hasAlpha: function hasAlpha() {
  1703. return this.colors.a < 1;
  1704. }
  1705. },
  1706. methods: {
  1707. childChange: function childChange(data) {
  1708. this.colorChange(data);
  1709. },
  1710. inputChange: function inputChange(data) {
  1711. if (!data) {
  1712. return;
  1713. }
  1714. if (data.hex) {
  1715. this.isValidHex(data.hex) && this.colorChange({
  1716. hex: data.hex,
  1717. source: 'hex'
  1718. });
  1719. } else if (data.r || data.g || data.b || data.a) {
  1720. this.colorChange({
  1721. r: data.r || this.colors.rgba.r,
  1722. g: data.g || this.colors.rgba.g,
  1723. b: data.b || this.colors.rgba.b,
  1724. a: data.a || this.colors.rgba.a,
  1725. source: 'rgba'
  1726. });
  1727. } else if (data.h || data.s || data.l) {
  1728. var s = data.s ? data.s.replace('%', '') / 100 : this.colors.hsl.s;
  1729. var l = data.l ? data.l.replace('%', '') / 100 : this.colors.hsl.l;
  1730. this.colorChange({
  1731. h: data.h || this.colors.hsl.h,
  1732. s: s,
  1733. l: l,
  1734. source: 'hsl'
  1735. });
  1736. }
  1737. },
  1738. toggleViews: function toggleViews() {
  1739. if (this.fieldsIndex >= 2) {
  1740. this.fieldsIndex = 0;
  1741. return;
  1742. }
  1743. this.fieldsIndex++;
  1744. },
  1745. showHighlight: function showHighlight() {
  1746. this.highlight = true;
  1747. },
  1748. hideHighlight: function hideHighlight() {
  1749. this.highlight = false;
  1750. }
  1751. }
  1752. };
  1753. /***/ }),
  1754. /* 22 */
  1755. /***/ (function(module, exports, __webpack_require__) {
  1756. "use strict";
  1757. var _Compact = __webpack_require__(23);
  1758. var _Compact2 = _interopRequireDefault(_Compact);
  1759. var _Grayscale = __webpack_require__(32);
  1760. var _Grayscale2 = _interopRequireDefault(_Grayscale);
  1761. var _Material = __webpack_require__(36);
  1762. var _Material2 = _interopRequireDefault(_Material);
  1763. var _Slider = __webpack_require__(40);
  1764. var _Slider2 = _interopRequireDefault(_Slider);
  1765. var _Swatches = __webpack_require__(47);
  1766. var _Swatches2 = _interopRequireDefault(_Swatches);
  1767. var _Photoshop = __webpack_require__(52);
  1768. var _Photoshop2 = _interopRequireDefault(_Photoshop);
  1769. var _Sketch = __webpack_require__(68);
  1770. var _Sketch2 = _interopRequireDefault(_Sketch);
  1771. var _Chrome = __webpack_require__(72);
  1772. var _Chrome2 = _interopRequireDefault(_Chrome);
  1773. var _Alpha = __webpack_require__(7);
  1774. var _Alpha2 = _interopRequireDefault(_Alpha);
  1775. var _Checkboard = __webpack_require__(8);
  1776. var _Checkboard2 = _interopRequireDefault(_Checkboard);
  1777. var _EditableInput = __webpack_require__(4);
  1778. var _EditableInput2 = _interopRequireDefault(_EditableInput);
  1779. var _Hue = __webpack_require__(5);
  1780. var _Hue2 = _interopRequireDefault(_Hue);
  1781. var _Saturation = __webpack_require__(6);
  1782. var _Saturation2 = _interopRequireDefault(_Saturation);
  1783. var _color = __webpack_require__(3);
  1784. var _color2 = _interopRequireDefault(_color);
  1785. function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
  1786. var VueColor = {
  1787. version: '2.7.0',
  1788. Compact: _Compact2.default,
  1789. Grayscale: _Grayscale2.default,
  1790. Material: _Material2.default,
  1791. Slider: _Slider2.default,
  1792. Swatches: _Swatches2.default,
  1793. Photoshop: _Photoshop2.default,
  1794. Sketch: _Sketch2.default,
  1795. Chrome: _Chrome2.default,
  1796. Alpha: _Alpha2.default,
  1797. Checkboard: _Checkboard2.default,
  1798. EditableInput: _EditableInput2.default,
  1799. Hue: _Hue2.default,
  1800. Saturation: _Saturation2.default,
  1801. ColorMixin: _color2.default
  1802. };
  1803. module.exports = VueColor;
  1804. /***/ }),
  1805. /* 23 */
  1806. /***/ (function(module, __webpack_exports__, __webpack_require__) {
  1807. "use strict";
  1808. Object.defineProperty(__webpack_exports__, "__esModule", { value: true });
  1809. /* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__babel_loader_node_modules_vue_loader_lib_selector_type_script_index_0_Compact_vue__ = __webpack_require__(9);
  1810. /* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__babel_loader_node_modules_vue_loader_lib_selector_type_script_index_0_Compact_vue___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_0__babel_loader_node_modules_vue_loader_lib_selector_type_script_index_0_Compact_vue__);
  1811. /* harmony namespace reexport (unknown) */ for(var __WEBPACK_IMPORT_KEY__ in __WEBPACK_IMPORTED_MODULE_0__babel_loader_node_modules_vue_loader_lib_selector_type_script_index_0_Compact_vue__) if(__WEBPACK_IMPORT_KEY__ !== 'default') (function(key) { __webpack_require__.d(__webpack_exports__, key, function() { return __WEBPACK_IMPORTED_MODULE_0__babel_loader_node_modules_vue_loader_lib_selector_type_script_index_0_Compact_vue__[key]; }) }(__WEBPACK_IMPORT_KEY__));
  1812. /* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__node_modules_vue_loader_lib_template_compiler_index_id_data_v_648423a3_hasScoped_false_buble_transforms_node_modules_vue_loader_lib_selector_type_template_index_0_Compact_vue__ = __webpack_require__(31);
  1813. var disposed = false
  1814. function injectStyle (ssrContext) {
  1815. if (disposed) return
  1816. __webpack_require__(24)
  1817. }
  1818. var normalizeComponent = __webpack_require__(2)
  1819. /* script */
  1820. /* template */
  1821. /* template functional */
  1822. var __vue_template_functional__ = false
  1823. /* styles */
  1824. var __vue_styles__ = injectStyle
  1825. /* scopeId */
  1826. var __vue_scopeId__ = null
  1827. /* moduleIdentifier (server only) */
  1828. var __vue_module_identifier__ = null
  1829. var Component = normalizeComponent(
  1830. __WEBPACK_IMPORTED_MODULE_0__babel_loader_node_modules_vue_loader_lib_selector_type_script_index_0_Compact_vue___default.a,
  1831. __WEBPACK_IMPORTED_MODULE_1__node_modules_vue_loader_lib_template_compiler_index_id_data_v_648423a3_hasScoped_false_buble_transforms_node_modules_vue_loader_lib_selector_type_template_index_0_Compact_vue__["a" /* default */],
  1832. __vue_template_functional__,
  1833. __vue_styles__,
  1834. __vue_scopeId__,
  1835. __vue_module_identifier__
  1836. )
  1837. Component.options.__file = "src/components/Compact.vue"
  1838. /* hot reload */
  1839. if (false) {(function () {
  1840. var hotAPI = require("vue-loader/node_modules/vue-hot-reload-api")
  1841. hotAPI.install(require("vue"), false)
  1842. if (!hotAPI.compatible) return
  1843. module.hot.accept()
  1844. if (!module.hot.data) {
  1845. hotAPI.createRecord("data-v-648423a3", Component.options)
  1846. } else {
  1847. hotAPI.reload("data-v-648423a3", Component.options)
  1848. }
  1849. module.hot.dispose(function (data) {
  1850. disposed = true
  1851. })
  1852. })()}
  1853. /* harmony default export */ __webpack_exports__["default"] = (Component.exports);
  1854. /***/ }),
  1855. /* 24 */
  1856. /***/ (function(module, exports, __webpack_require__) {
  1857. // style-loader: Adds some css to the DOM by adding a <style> tag
  1858. // load the styles
  1859. var content = __webpack_require__(25);
  1860. if(typeof content === 'string') content = [[module.i, content, '']];
  1861. if(content.locals) module.exports = content.locals;
  1862. // add the styles to the DOM
  1863. var update = __webpack_require__(1)("6ce8a5a8", content, false, {});
  1864. // Hot Module Replacement
  1865. if(false) {
  1866. // When the styles change, update the <style> tags
  1867. if(!content.locals) {
  1868. module.hot.accept("!!../../node_modules/css-loader/index.js?{\"minimize\":false,\"sourceMap\":false}!../../node_modules/vue-loader/lib/style-compiler/index.js?{\"vue\":true,\"id\":\"data-v-648423a3\",\"scoped\":false,\"hasInlineConfig\":false}!../../node_modules/vue-loader/lib/selector.js?type=styles&index=0!./Compact.vue", function() {
  1869. var newContent = require("!!../../node_modules/css-loader/index.js?{\"minimize\":false,\"sourceMap\":false}!../../node_modules/vue-loader/lib/style-compiler/index.js?{\"vue\":true,\"id\":\"data-v-648423a3\",\"scoped\":false,\"hasInlineConfig\":false}!../../node_modules/vue-loader/lib/selector.js?type=styles&index=0!./Compact.vue");
  1870. if(typeof newContent === 'string') newContent = [[module.id, newContent, '']];
  1871. update(newContent);
  1872. });
  1873. }
  1874. // When the module is disposed, remove the <style> tags
  1875. module.hot.dispose(function() { update(); });
  1876. }
  1877. /***/ }),
  1878. /* 25 */
  1879. /***/ (function(module, exports, __webpack_require__) {
  1880. exports = module.exports = __webpack_require__(0)(false);
  1881. // imports
  1882. // module
  1883. exports.push([module.i, "\n.vc-compact {\n padding-top: 5px;\n padding-left: 5px;\n width: 240px;\n border-radius: 2px;\n box-shadow: 0 2px 10px rgba(0,0,0,.12), 0 2px 5px rgba(0,0,0,.16);\n background-color: #fff;\n}\n.vc-compact-colors {\n overflow: hidden;\n padding: 0;\n margin: 0;\n}\n.vc-compact-color-item {\n list-style: none;\n width: 15px;\n height: 15px;\n float: left;\n margin-right: 5px;\n margin-bottom: 5px;\n position: relative;\n cursor: pointer;\n}\n.vc-compact-color-item--white {\n box-shadow: inset 0 0 0 1px #ddd;\n}\n.vc-compact-color-item--white .vc-compact-dot {\n background: #000;\n}\n.vc-compact-dot {\n position: absolute;\n top: 5px;\n right: 5px;\n bottom: 5px;\n left: 5px;\n border-radius: 50%;\n opacity: 1;\n background: #fff;\n}\n", ""]);
  1884. // exports
  1885. /***/ }),
  1886. /* 26 */
  1887. /***/ (function(module, exports) {
  1888. /**
  1889. * Translates the list format produced by css-loader into something
  1890. * easier to manipulate.
  1891. */
  1892. module.exports = function listToStyles (parentId, list) {
  1893. var styles = []
  1894. var newStyles = {}
  1895. for (var i = 0; i < list.length; i++) {
  1896. var item = list[i]
  1897. var id = item[0]
  1898. var css = item[1]
  1899. var media = item[2]
  1900. var sourceMap = item[3]
  1901. var part = {
  1902. id: parentId + ':' + i,
  1903. css: css,
  1904. media: media,
  1905. sourceMap: sourceMap
  1906. }
  1907. if (!newStyles[id]) {
  1908. styles.push(newStyles[id] = { id: id, parts: [part] })
  1909. } else {
  1910. newStyles[id].parts.push(part)
  1911. }
  1912. }
  1913. return styles
  1914. }
  1915. /***/ }),
  1916. /* 27 */
  1917. /***/ (function(module, exports, __webpack_require__) {
  1918. var __WEBPACK_AMD_DEFINE_RESULT__;// TinyColor v1.4.1
  1919. // https://github.com/bgrins/TinyColor
  1920. // Brian Grinstead, MIT License
  1921. (function(Math) {
  1922. var trimLeft = /^\s+/,
  1923. trimRight = /\s+$/,
  1924. tinyCounter = 0,
  1925. mathRound = Math.round,
  1926. mathMin = Math.min,
  1927. mathMax = Math.max,
  1928. mathRandom = Math.random;
  1929. function tinycolor (color, opts) {
  1930. color = (color) ? color : '';
  1931. opts = opts || { };
  1932. // If input is already a tinycolor, return itself
  1933. if (color instanceof tinycolor) {
  1934. return color;
  1935. }
  1936. // If we are called as a function, call using new instead
  1937. if (!(this instanceof tinycolor)) {
  1938. return new tinycolor(color, opts);
  1939. }
  1940. var rgb = inputToRGB(color);
  1941. this._originalInput = color,
  1942. this._r = rgb.r,
  1943. this._g = rgb.g,
  1944. this._b = rgb.b,
  1945. this._a = rgb.a,
  1946. this._roundA = mathRound(100*this._a) / 100,
  1947. this._format = opts.format || rgb.format;
  1948. this._gradientType = opts.gradientType;
  1949. // Don't let the range of [0,255] come back in [0,1].
  1950. // Potentially lose a little bit of precision here, but will fix issues where
  1951. // .5 gets interpreted as half of the total, instead of half of 1
  1952. // If it was supposed to be 128, this was already taken care of by `inputToRgb`
  1953. if (this._r < 1) { this._r = mathRound(this._r); }
  1954. if (this._g < 1) { this._g = mathRound(this._g); }
  1955. if (this._b < 1) { this._b = mathRound(this._b); }
  1956. this._ok = rgb.ok;
  1957. this._tc_id = tinyCounter++;
  1958. }
  1959. tinycolor.prototype = {
  1960. isDark: function() {
  1961. return this.getBrightness() < 128;
  1962. },
  1963. isLight: function() {
  1964. return !this.isDark();
  1965. },
  1966. isValid: function() {
  1967. return this._ok;
  1968. },
  1969. getOriginalInput: function() {
  1970. return this._originalInput;
  1971. },
  1972. getFormat: function() {
  1973. return this._format;
  1974. },
  1975. getAlpha: function() {
  1976. return this._a;
  1977. },
  1978. getBrightness: function() {
  1979. //http://www.w3.org/TR/AERT#color-contrast
  1980. var rgb = this.toRgb();
  1981. return (rgb.r * 299 + rgb.g * 587 + rgb.b * 114) / 1000;
  1982. },
  1983. getLuminance: function() {
  1984. //http://www.w3.org/TR/2008/REC-WCAG20-20081211/#relativeluminancedef
  1985. var rgb = this.toRgb();
  1986. var RsRGB, GsRGB, BsRGB, R, G, B;
  1987. RsRGB = rgb.r/255;
  1988. GsRGB = rgb.g/255;
  1989. BsRGB = rgb.b/255;
  1990. if (RsRGB <= 0.03928) {R = RsRGB / 12.92;} else {R = Math.pow(((RsRGB + 0.055) / 1.055), 2.4);}
  1991. if (GsRGB <= 0.03928) {G = GsRGB / 12.92;} else {G = Math.pow(((GsRGB + 0.055) / 1.055), 2.4);}
  1992. if (BsRGB <= 0.03928) {B = BsRGB / 12.92;} else {B = Math.pow(((BsRGB + 0.055) / 1.055), 2.4);}
  1993. return (0.2126 * R) + (0.7152 * G) + (0.0722 * B);
  1994. },
  1995. setAlpha: function(value) {
  1996. this._a = boundAlpha(value);
  1997. this._roundA = mathRound(100*this._a) / 100;
  1998. return this;
  1999. },
  2000. toHsv: function() {
  2001. var hsv = rgbToHsv(this._r, this._g, this._b);
  2002. return { h: hsv.h * 360, s: hsv.s, v: hsv.v, a: this._a };
  2003. },
  2004. toHsvString: function() {
  2005. var hsv = rgbToHsv(this._r, this._g, this._b);
  2006. var h = mathRound(hsv.h * 360), s = mathRound(hsv.s * 100), v = mathRound(hsv.v * 100);
  2007. return (this._a == 1) ?
  2008. "hsv(" + h + ", " + s + "%, " + v + "%)" :
  2009. "hsva(" + h + ", " + s + "%, " + v + "%, "+ this._roundA + ")";
  2010. },
  2011. toHsl: function() {
  2012. var hsl = rgbToHsl(this._r, this._g, this._b);
  2013. return { h: hsl.h * 360, s: hsl.s, l: hsl.l, a: this._a };
  2014. },
  2015. toHslString: function() {
  2016. var hsl = rgbToHsl(this._r, this._g, this._b);
  2017. var h = mathRound(hsl.h * 360), s = mathRound(hsl.s * 100), l = mathRound(hsl.l * 100);
  2018. return (this._a == 1) ?
  2019. "hsl(" + h + ", " + s + "%, " + l + "%)" :
  2020. "hsla(" + h + ", " + s + "%, " + l + "%, "+ this._roundA + ")";
  2021. },
  2022. toHex: function(allow3Char) {
  2023. return rgbToHex(this._r, this._g, this._b, allow3Char);
  2024. },
  2025. toHexString: function(allow3Char) {
  2026. return '#' + this.toHex(allow3Char);
  2027. },
  2028. toHex8: function(allow4Char) {
  2029. return rgbaToHex(this._r, this._g, this._b, this._a, allow4Char);
  2030. },
  2031. toHex8String: function(allow4Char) {
  2032. return '#' + this.toHex8(allow4Char);
  2033. },
  2034. toHexT: function() {
  2035. return rgbaToArgbHex(this._r, this._g, this._b, this._a);
  2036. },
  2037. toHexTString: function() {
  2038. return '0x' + this.toHexT();
  2039. },
  2040. toRgb: function() {
  2041. return { r: mathRound(this._r), g: mathRound(this._g), b: mathRound(this._b), a: this._a };
  2042. },
  2043. toRgbString: function() {
  2044. return (this._a == 1) ?
  2045. "rgb(" + mathRound(this._r) + ", " + mathRound(this._g) + ", " + mathRound(this._b) + ")" :
  2046. "rgba(" + mathRound(this._r) + ", " + mathRound(this._g) + ", " + mathRound(this._b) + ", " + this._roundA + ")";
  2047. },
  2048. toPercentageRgb: function() {
  2049. return { r: mathRound(bound01(this._r, 255) * 100) + "%", g: mathRound(bound01(this._g, 255) * 100) + "%", b: mathRound(bound01(this._b, 255) * 100) + "%", a: this._a };
  2050. },
  2051. toPercentageRgbString: function() {
  2052. return (this._a == 1) ?
  2053. "rgb(" + mathRound(bound01(this._r, 255) * 100) + "%, " + mathRound(bound01(this._g, 255) * 100) + "%, " + mathRound(bound01(this._b, 255) * 100) + "%)" :
  2054. "rgba(" + mathRound(bound01(this._r, 255) * 100) + "%, " + mathRound(bound01(this._g, 255) * 100) + "%, " + mathRound(bound01(this._b, 255) * 100) + "%, " + this._roundA + ")";
  2055. },
  2056. toName: function() {
  2057. if (this._a === 0) {
  2058. return "transparent";
  2059. }
  2060. if (this._a < 1) {
  2061. return false;
  2062. }
  2063. return hexNames[rgbToHex(this._r, this._g, this._b, true)] || false;
  2064. },
  2065. toFilter: function(secondColor) {
  2066. var hex8String = '#' + rgbaToArgbHex(this._r, this._g, this._b, this._a);
  2067. var secondHex8String = hex8String;
  2068. var gradientType = this._gradientType ? "GradientType = 1, " : "";
  2069. if (secondColor) {
  2070. var s = tinycolor(secondColor);
  2071. secondHex8String = '#' + rgbaToArgbHex(s._r, s._g, s._b, s._a);
  2072. }
  2073. return "progid:DXImageTransform.Microsoft.gradient("+gradientType+"startColorstr="+hex8String+",endColorstr="+secondHex8String+")";
  2074. },
  2075. toString: function(format) {
  2076. var formatSet = !!format;
  2077. format = format || this._format;
  2078. var formattedString = false;
  2079. var hasAlpha = this._a < 1 && this._a >= 0;
  2080. var needsAlphaFormat = !formatSet && hasAlpha && (format === "hex" || format === "hex6" || format === "hex3" || format === "hex4" || format === "hex8" || format === "name");
  2081. if (needsAlphaFormat) {
  2082. // Special case for "transparent", all other non-alpha formats
  2083. // will return rgba when there is transparency.
  2084. if (format === "name" && this._a === 0) {
  2085. return this.toName();
  2086. }
  2087. return this.toRgbString();
  2088. }
  2089. if (format === "rgb") {
  2090. formattedString = this.toRgbString();
  2091. }
  2092. if (format === "prgb") {
  2093. formattedString = this.toPercentageRgbString();
  2094. }
  2095. if (format === "hex" || format === "hex6") {
  2096. formattedString = this.toHexString();
  2097. }
  2098. if (format === "hex3") {
  2099. formattedString = this.toHexString(true);
  2100. }
  2101. if (format === "hex4") {
  2102. formattedString = this.toHex8String(true);
  2103. }
  2104. if (format === "hex8") {
  2105. formattedString = this.toHex8String();
  2106. }
  2107. if (format === "name") {
  2108. formattedString = this.toName();
  2109. }
  2110. if (format === "hsl") {
  2111. formattedString = this.toHslString();
  2112. }
  2113. if (format === "hsv") {
  2114. formattedString = this.toHsvString();
  2115. }
  2116. return formattedString || this.toHexString();
  2117. },
  2118. clone: function() {
  2119. return tinycolor(this.toString());
  2120. },
  2121. _applyModification: function(fn, args) {
  2122. var color = fn.apply(null, [this].concat([].slice.call(args)));
  2123. this._r = color._r;
  2124. this._g = color._g;
  2125. this._b = color._b;
  2126. this.setAlpha(color._a);
  2127. return this;
  2128. },
  2129. lighten: function() {
  2130. return this._applyModification(lighten, arguments);
  2131. },
  2132. brighten: function() {
  2133. return this._applyModification(brighten, arguments);
  2134. },
  2135. darken: function() {
  2136. return this._applyModification(darken, arguments);
  2137. },
  2138. desaturate: function() {
  2139. return this._applyModification(desaturate, arguments);
  2140. },
  2141. saturate: function() {
  2142. return this._applyModification(saturate, arguments);
  2143. },
  2144. greyscale: function() {
  2145. return this._applyModification(greyscale, arguments);
  2146. },
  2147. spin: function() {
  2148. return this._applyModification(spin, arguments);
  2149. },
  2150. _applyCombination: function(fn, args) {
  2151. return fn.apply(null, [this].concat([].slice.call(args)));
  2152. },
  2153. analogous: function() {
  2154. return this._applyCombination(analogous, arguments);
  2155. },
  2156. complement: function() {
  2157. return this._applyCombination(complement, arguments);
  2158. },
  2159. monochromatic: function() {
  2160. return this._applyCombination(monochromatic, arguments);
  2161. },
  2162. splitcomplement: function() {
  2163. return this._applyCombination(splitcomplement, arguments);
  2164. },
  2165. triad: function() {
  2166. return this._applyCombination(triad, arguments);
  2167. },
  2168. tetrad: function() {
  2169. return this._applyCombination(tetrad, arguments);
  2170. }
  2171. };
  2172. // If input is an object, force 1 into "1.0" to handle ratios properly
  2173. // String input requires "1.0" as input, so 1 will be treated as 1
  2174. tinycolor.fromRatio = function(color, opts) {
  2175. if (typeof color == "object") {
  2176. var newColor = {};
  2177. for (var i in color) {
  2178. if (color.hasOwnProperty(i)) {
  2179. if (i === "a") {
  2180. newColor[i] = color[i];
  2181. }
  2182. else {
  2183. newColor[i] = convertToPercentage(color[i]);
  2184. }
  2185. }
  2186. }
  2187. color = newColor;
  2188. }
  2189. return tinycolor(color, opts);
  2190. };
  2191. // Given a string or object, convert that input to RGB
  2192. // Possible string inputs:
  2193. //
  2194. // "red"
  2195. // "#f00" or "f00"
  2196. // "#ff0000" or "ff0000"
  2197. // "#ff000000" or "ff000000"
  2198. // "rgb 255 0 0" or "rgb (255, 0, 0)"
  2199. // "rgb 1.0 0 0" or "rgb (1, 0, 0)"
  2200. // "rgba (255, 0, 0, 1)" or "rgba 255, 0, 0, 1"
  2201. // "rgba (1.0, 0, 0, 1)" or "rgba 1.0, 0, 0, 1"
  2202. // "hsl(0, 100%, 50%)" or "hsl 0 100% 50%"
  2203. // "hsla(0, 100%, 50%, 1)" or "hsla 0 100% 50%, 1"
  2204. // "hsv(0, 100%, 100%)" or "hsv 0 100% 100%"
  2205. //
  2206. function inputToRGB(color) {
  2207. var rgb = { r: 0, g: 0, b: 0 };
  2208. var a = 1;
  2209. var s = null;
  2210. var v = null;
  2211. var l = null;
  2212. var ok = false;
  2213. var format = false;
  2214. if (typeof color == "string") {
  2215. color = stringInputToObject(color);
  2216. }
  2217. if (typeof color == "object") {
  2218. if (isValidCSSUnit(color.r) && isValidCSSUnit(color.g) && isValidCSSUnit(color.b)) {
  2219. rgb = rgbToRgb(color.r, color.g, color.b);
  2220. ok = true;
  2221. format = String(color.r).substr(-1) === "%" ? "prgb" : "rgb";
  2222. }
  2223. else if (isValidCSSUnit(color.h) && isValidCSSUnit(color.s) && isValidCSSUnit(color.v)) {
  2224. s = convertToPercentage(color.s);
  2225. v = convertToPercentage(color.v);
  2226. rgb = hsvToRgb(color.h, s, v);
  2227. ok = true;
  2228. format = "hsv";
  2229. }
  2230. else if (isValidCSSUnit(color.h) && isValidCSSUnit(color.s) && isValidCSSUnit(color.l)) {
  2231. s = convertToPercentage(color.s);
  2232. l = convertToPercentage(color.l);
  2233. rgb = hslToRgb(color.h, s, l);
  2234. ok = true;
  2235. format = "hsl";
  2236. }
  2237. if (color.hasOwnProperty("a")) {
  2238. a = color.a;
  2239. }
  2240. }
  2241. a = boundAlpha(a);
  2242. return {
  2243. ok: ok,
  2244. format: color.format || format,
  2245. r: mathMin(255, mathMax(rgb.r, 0)),
  2246. g: mathMin(255, mathMax(rgb.g, 0)),
  2247. b: mathMin(255, mathMax(rgb.b, 0)),
  2248. a: a
  2249. };
  2250. }
  2251. // Conversion Functions
  2252. // --------------------
  2253. // `rgbToHsl`, `rgbToHsv`, `hslToRgb`, `hsvToRgb` modified from:
  2254. // <http://mjijackson.com/2008/02/rgb-to-hsl-and-rgb-to-hsv-color-model-conversion-algorithms-in-javascript>
  2255. // `rgbToRgb`
  2256. // Handle bounds / percentage checking to conform to CSS color spec
  2257. // <http://www.w3.org/TR/css3-color/>
  2258. // *Assumes:* r, g, b in [0, 255] or [0, 1]
  2259. // *Returns:* { r, g, b } in [0, 255]
  2260. function rgbToRgb(r, g, b){
  2261. return {
  2262. r: bound01(r, 255) * 255,
  2263. g: bound01(g, 255) * 255,
  2264. b: bound01(b, 255) * 255
  2265. };
  2266. }
  2267. // `rgbToHsl`
  2268. // Converts an RGB color value to HSL.
  2269. // *Assumes:* r, g, and b are contained in [0, 255] or [0, 1]
  2270. // *Returns:* { h, s, l } in [0,1]
  2271. function rgbToHsl(r, g, b) {
  2272. r = bound01(r, 255);
  2273. g = bound01(g, 255);
  2274. b = bound01(b, 255);
  2275. var max = mathMax(r, g, b), min = mathMin(r, g, b);
  2276. var h, s, l = (max + min) / 2;
  2277. if(max == min) {
  2278. h = s = 0; // achromatic
  2279. }
  2280. else {
  2281. var d = max - min;
  2282. s = l > 0.5 ? d / (2 - max - min) : d / (max + min);
  2283. switch(max) {
  2284. case r: h = (g - b) / d + (g < b ? 6 : 0); break;
  2285. case g: h = (b - r) / d + 2; break;
  2286. case b: h = (r - g) / d + 4; break;
  2287. }
  2288. h /= 6;
  2289. }
  2290. return { h: h, s: s, l: l };
  2291. }
  2292. // `hslToRgb`
  2293. // Converts an HSL color value to RGB.
  2294. // *Assumes:* h is contained in [0, 1] or [0, 360] and s and l are contained [0, 1] or [0, 100]
  2295. // *Returns:* { r, g, b } in the set [0, 255]
  2296. function hslToRgb(h, s, l) {
  2297. var r, g, b;
  2298. h = bound01(h, 360);
  2299. s = bound01(s, 100);
  2300. l = bound01(l, 100);
  2301. function hue2rgb(p, q, t) {
  2302. if(t < 0) t += 1;
  2303. if(t > 1) t -= 1;
  2304. if(t < 1/6) return p + (q - p) * 6 * t;
  2305. if(t < 1/2) return q;
  2306. if(t < 2/3) return p + (q - p) * (2/3 - t) * 6;
  2307. return p;
  2308. }
  2309. if(s === 0) {
  2310. r = g = b = l; // achromatic
  2311. }
  2312. else {
  2313. var q = l < 0.5 ? l * (1 + s) : l + s - l * s;
  2314. var p = 2 * l - q;
  2315. r = hue2rgb(p, q, h + 1/3);
  2316. g = hue2rgb(p, q, h);
  2317. b = hue2rgb(p, q, h - 1/3);
  2318. }
  2319. return { r: r * 255, g: g * 255, b: b * 255 };
  2320. }
  2321. // `rgbToHsv`
  2322. // Converts an RGB color value to HSV
  2323. // *Assumes:* r, g, and b are contained in the set [0, 255] or [0, 1]
  2324. // *Returns:* { h, s, v } in [0,1]
  2325. function rgbToHsv(r, g, b) {
  2326. r = bound01(r, 255);
  2327. g = bound01(g, 255);
  2328. b = bound01(b, 255);
  2329. var max = mathMax(r, g, b), min = mathMin(r, g, b);
  2330. var h, s, v = max;
  2331. var d = max - min;
  2332. s = max === 0 ? 0 : d / max;
  2333. if(max == min) {
  2334. h = 0; // achromatic
  2335. }
  2336. else {
  2337. switch(max) {
  2338. case r: h = (g - b) / d + (g < b ? 6 : 0); break;
  2339. case g: h = (b - r) / d + 2; break;
  2340. case b: h = (r - g) / d + 4; break;
  2341. }
  2342. h /= 6;
  2343. }
  2344. return { h: h, s: s, v: v };
  2345. }
  2346. // `hsvToRgb`
  2347. // Converts an HSV color value to RGB.
  2348. // *Assumes:* h is contained in [0, 1] or [0, 360] and s and v are contained in [0, 1] or [0, 100]
  2349. // *Returns:* { r, g, b } in the set [0, 255]
  2350. function hsvToRgb(h, s, v) {
  2351. h = bound01(h, 360) * 6;
  2352. s = bound01(s, 100);
  2353. v = bound01(v, 100);
  2354. var i = Math.floor(h),
  2355. f = h - i,
  2356. p = v * (1 - s),
  2357. q = v * (1 - f * s),
  2358. t = v * (1 - (1 - f) * s),
  2359. mod = i % 6,
  2360. r = [v, q, p, p, t, v][mod],
  2361. g = [t, v, v, q, p, p][mod],
  2362. b = [p, p, t, v, v, q][mod];
  2363. return { r: r * 255, g: g * 255, b: b * 255 };
  2364. }
  2365. // `rgbToHex`
  2366. // Converts an RGB color to hex
  2367. // Assumes r, g, and b are contained in the set [0, 255]
  2368. // Returns a 3 or 6 character hex
  2369. function rgbToHex(r, g, b, allow3Char) {
  2370. var hex = [
  2371. pad2(mathRound(r).toString(16)),
  2372. pad2(mathRound(g).toString(16)),
  2373. pad2(mathRound(b).toString(16))
  2374. ];
  2375. // Return a 3 character hex if possible
  2376. if (allow3Char && hex[0].charAt(0) == hex[0].charAt(1) && hex[1].charAt(0) == hex[1].charAt(1) && hex[2].charAt(0) == hex[2].charAt(1)) {
  2377. return hex[0].charAt(0) + hex[1].charAt(0) + hex[2].charAt(0);
  2378. }
  2379. return hex.join("");
  2380. }
  2381. // `rgbaToHex`
  2382. // Converts an RGBA color plus alpha transparency to hex
  2383. // Assumes r, g, b are contained in the set [0, 255] and
  2384. // a in [0, 1]. Returns a 4 or 8 character rgba hex
  2385. function rgbaToHex(r, g, b, a, allow4Char) {
  2386. var hex = [
  2387. pad2(mathRound(r).toString(16)),
  2388. pad2(mathRound(g).toString(16)),
  2389. pad2(mathRound(b).toString(16)),
  2390. pad2(convertDecimalToHex(a))
  2391. ];
  2392. // Return a 4 character hex if possible
  2393. if (allow4Char && hex[0].charAt(0) == hex[0].charAt(1) && hex[1].charAt(0) == hex[1].charAt(1) && hex[2].charAt(0) == hex[2].charAt(1) && hex[3].charAt(0) == hex[3].charAt(1)) {
  2394. return hex[0].charAt(0) + hex[1].charAt(0) + hex[2].charAt(0) + hex[3].charAt(0);
  2395. }
  2396. return hex.join("");
  2397. }
  2398. // `rgbaToArgbHex`
  2399. // Converts an RGBA color to an ARGB Hex8 string
  2400. // Rarely used, but required for "toFilter()"
  2401. function rgbaToArgbHex(r, g, b, a) {
  2402. var hex = [
  2403. pad2(convertDecimalToHex(a)),
  2404. pad2(mathRound(r).toString(16)),
  2405. pad2(mathRound(g).toString(16)),
  2406. pad2(mathRound(b).toString(16))
  2407. ];
  2408. return hex.join("");
  2409. }
  2410. // `equals`
  2411. // Can be called with any tinycolor input
  2412. tinycolor.equals = function (color1, color2) {
  2413. if (!color1 || !color2) { return false; }
  2414. return tinycolor(color1).toRgbString() == tinycolor(color2).toRgbString();
  2415. };
  2416. tinycolor.random = function() {
  2417. return tinycolor.fromRatio({
  2418. r: mathRandom(),
  2419. g: mathRandom(),
  2420. b: mathRandom()
  2421. });
  2422. };
  2423. // Modification Functions
  2424. // ----------------------
  2425. // Thanks to less.js for some of the basics here
  2426. // <https://github.com/cloudhead/less.js/blob/master/lib/less/functions.js>
  2427. function desaturate(color, amount) {
  2428. amount = (amount === 0) ? 0 : (amount || 10);
  2429. var hsl = tinycolor(color).toHsl();
  2430. hsl.s -= amount / 100;
  2431. hsl.s = clamp01(hsl.s);
  2432. return tinycolor(hsl);
  2433. }
  2434. function saturate(color, amount) {
  2435. amount = (amount === 0) ? 0 : (amount || 10);
  2436. var hsl = tinycolor(color).toHsl();
  2437. hsl.s += amount / 100;
  2438. hsl.s = clamp01(hsl.s);
  2439. return tinycolor(hsl);
  2440. }
  2441. function greyscale(color) {
  2442. return tinycolor(color).desaturate(100);
  2443. }
  2444. function lighten (color, amount) {
  2445. amount = (amount === 0) ? 0 : (amount || 10);
  2446. var hsl = tinycolor(color).toHsl();
  2447. hsl.l += amount / 100;
  2448. hsl.l = clamp01(hsl.l);
  2449. return tinycolor(hsl);
  2450. }
  2451. function brighten(color, amount) {
  2452. amount = (amount === 0) ? 0 : (amount || 10);
  2453. var rgb = tinycolor(color).toRgb();
  2454. rgb.r = mathMax(0, mathMin(255, rgb.r - mathRound(255 * - (amount / 100))));
  2455. rgb.g = mathMax(0, mathMin(255, rgb.g - mathRound(255 * - (amount / 100))));
  2456. rgb.b = mathMax(0, mathMin(255, rgb.b - mathRound(255 * - (amount / 100))));
  2457. return tinycolor(rgb);
  2458. }
  2459. function darken (color, amount) {
  2460. amount = (amount === 0) ? 0 : (amount || 10);
  2461. var hsl = tinycolor(color).toHsl();
  2462. hsl.l -= amount / 100;
  2463. hsl.l = clamp01(hsl.l);
  2464. return tinycolor(hsl);
  2465. }
  2466. // Spin takes a positive or negative amount within [-360, 360] indicating the change of hue.
  2467. // Values outside of this range will be wrapped into this range.
  2468. function spin(color, amount) {
  2469. var hsl = tinycolor(color).toHsl();
  2470. var hue = (hsl.h + amount) % 360;
  2471. hsl.h = hue < 0 ? 360 + hue : hue;
  2472. return tinycolor(hsl);
  2473. }
  2474. // Combination Functions
  2475. // ---------------------
  2476. // Thanks to jQuery xColor for some of the ideas behind these
  2477. // <https://github.com/infusion/jQuery-xcolor/blob/master/jquery.xcolor.js>
  2478. function complement(color) {
  2479. var hsl = tinycolor(color).toHsl();
  2480. hsl.h = (hsl.h + 180) % 360;
  2481. return tinycolor(hsl);
  2482. }
  2483. function triad(color) {
  2484. var hsl = tinycolor(color).toHsl();
  2485. var h = hsl.h;
  2486. return [
  2487. tinycolor(color),
  2488. tinycolor({ h: (h + 120) % 360, s: hsl.s, l: hsl.l }),
  2489. tinycolor({ h: (h + 240) % 360, s: hsl.s, l: hsl.l })
  2490. ];
  2491. }
  2492. function tetrad(color) {
  2493. var hsl = tinycolor(color).toHsl();
  2494. var h = hsl.h;
  2495. return [
  2496. tinycolor(color),
  2497. tinycolor({ h: (h + 90) % 360, s: hsl.s, l: hsl.l }),
  2498. tinycolor({ h: (h + 180) % 360, s: hsl.s, l: hsl.l }),
  2499. tinycolor({ h: (h + 270) % 360, s: hsl.s, l: hsl.l })
  2500. ];
  2501. }
  2502. function splitcomplement(color) {
  2503. var hsl = tinycolor(color).toHsl();
  2504. var h = hsl.h;
  2505. return [
  2506. tinycolor(color),
  2507. tinycolor({ h: (h + 72) % 360, s: hsl.s, l: hsl.l}),
  2508. tinycolor({ h: (h + 216) % 360, s: hsl.s, l: hsl.l})
  2509. ];
  2510. }
  2511. function analogous(color, results, slices) {
  2512. results = results || 6;
  2513. slices = slices || 30;
  2514. var hsl = tinycolor(color).toHsl();
  2515. var part = 360 / slices;
  2516. var ret = [tinycolor(color)];
  2517. for (hsl.h = ((hsl.h - (part * results >> 1)) + 720) % 360; --results; ) {
  2518. hsl.h = (hsl.h + part) % 360;
  2519. ret.push(tinycolor(hsl));
  2520. }
  2521. return ret;
  2522. }
  2523. function monochromatic(color, results) {
  2524. results = results || 6;
  2525. var hsv = tinycolor(color).toHsv();
  2526. var h = hsv.h, s = hsv.s, v = hsv.v;
  2527. var ret = [];
  2528. var modification = 1 / results;
  2529. while (results--) {
  2530. ret.push(tinycolor({ h: h, s: s, v: v}));
  2531. v = (v + modification) % 1;
  2532. }
  2533. return ret;
  2534. }
  2535. // Utility Functions
  2536. // ---------------------
  2537. tinycolor.mix = function(color1, color2, amount) {
  2538. amount = (amount === 0) ? 0 : (amount || 50);
  2539. var rgb1 = tinycolor(color1).toRgb();
  2540. var rgb2 = tinycolor(color2).toRgb();
  2541. var p = amount / 100;
  2542. var rgba = {
  2543. r: ((rgb2.r - rgb1.r) * p) + rgb1.r,
  2544. g: ((rgb2.g - rgb1.g) * p) + rgb1.g,
  2545. b: ((rgb2.b - rgb1.b) * p) + rgb1.b,
  2546. a: ((rgb2.a - rgb1.a) * p) + rgb1.a
  2547. };
  2548. return tinycolor(rgba);
  2549. };
  2550. // Readability Functions
  2551. // ---------------------
  2552. // <http://www.w3.org/TR/2008/REC-WCAG20-20081211/#contrast-ratiodef (WCAG Version 2)
  2553. // `contrast`
  2554. // Analyze the 2 colors and returns the color contrast defined by (WCAG Version 2)
  2555. tinycolor.readability = function(color1, color2) {
  2556. var c1 = tinycolor(color1);
  2557. var c2 = tinycolor(color2);
  2558. return (Math.max(c1.getLuminance(),c2.getLuminance())+0.05) / (Math.min(c1.getLuminance(),c2.getLuminance())+0.05);
  2559. };
  2560. // `isReadable`
  2561. // Ensure that foreground and background color combinations meet WCAG2 guidelines.
  2562. // The third argument is an optional Object.
  2563. // the 'level' property states 'AA' or 'AAA' - if missing or invalid, it defaults to 'AA';
  2564. // the 'size' property states 'large' or 'small' - if missing or invalid, it defaults to 'small'.
  2565. // If the entire object is absent, isReadable defaults to {level:"AA",size:"small"}.
  2566. // *Example*
  2567. // tinycolor.isReadable("#000", "#111") => false
  2568. // tinycolor.isReadable("#000", "#111",{level:"AA",size:"large"}) => false
  2569. tinycolor.isReadable = function(color1, color2, wcag2) {
  2570. var readability = tinycolor.readability(color1, color2);
  2571. var wcag2Parms, out;
  2572. out = false;
  2573. wcag2Parms = validateWCAG2Parms(wcag2);
  2574. switch (wcag2Parms.level + wcag2Parms.size) {
  2575. case "AAsmall":
  2576. case "AAAlarge":
  2577. out = readability >= 4.5;
  2578. break;
  2579. case "AAlarge":
  2580. out = readability >= 3;
  2581. break;
  2582. case "AAAsmall":
  2583. out = readability >= 7;
  2584. break;
  2585. }
  2586. return out;
  2587. };
  2588. // `mostReadable`
  2589. // Given a base color and a list of possible foreground or background
  2590. // colors for that base, returns the most readable color.
  2591. // Optionally returns Black or White if the most readable color is unreadable.
  2592. // *Example*
  2593. // tinycolor.mostReadable(tinycolor.mostReadable("#123", ["#124", "#125"],{includeFallbackColors:false}).toHexString(); // "#112255"
  2594. // tinycolor.mostReadable(tinycolor.mostReadable("#123", ["#124", "#125"],{includeFallbackColors:true}).toHexString(); // "#ffffff"
  2595. // tinycolor.mostReadable("#a8015a", ["#faf3f3"],{includeFallbackColors:true,level:"AAA",size:"large"}).toHexString(); // "#faf3f3"
  2596. // tinycolor.mostReadable("#a8015a", ["#faf3f3"],{includeFallbackColors:true,level:"AAA",size:"small"}).toHexString(); // "#ffffff"
  2597. tinycolor.mostReadable = function(baseColor, colorList, args) {
  2598. var bestColor = null;
  2599. var bestScore = 0;
  2600. var readability;
  2601. var includeFallbackColors, level, size ;
  2602. args = args || {};
  2603. includeFallbackColors = args.includeFallbackColors ;
  2604. level = args.level;
  2605. size = args.size;
  2606. for (var i= 0; i < colorList.length ; i++) {
  2607. readability = tinycolor.readability(baseColor, colorList[i]);
  2608. if (readability > bestScore) {
  2609. bestScore = readability;
  2610. bestColor = tinycolor(colorList[i]);
  2611. }
  2612. }
  2613. if (tinycolor.isReadable(baseColor, bestColor, {"level":level,"size":size}) || !includeFallbackColors) {
  2614. return bestColor;
  2615. }
  2616. else {
  2617. args.includeFallbackColors=false;
  2618. return tinycolor.mostReadable(baseColor,["#fff", "#000"],args);
  2619. }
  2620. };
  2621. // Big List of Colors
  2622. // ------------------
  2623. // <http://www.w3.org/TR/css3-color/#svg-color>
  2624. var names = tinycolor.names = {
  2625. aliceblue: "f0f8ff",
  2626. antiquewhite: "faebd7",
  2627. aqua: "0ff",
  2628. aquamarine: "7fffd4",
  2629. azure: "f0ffff",
  2630. beige: "f5f5dc",
  2631. bisque: "ffe4c4",
  2632. black: "000",
  2633. blanchedalmond: "ffebcd",
  2634. blue: "00f",
  2635. blueviolet: "8a2be2",
  2636. brown: "a52a2a",
  2637. burlywood: "deb887",
  2638. burntsienna: "ea7e5d",
  2639. cadetblue: "5f9ea0",
  2640. chartreuse: "7fff00",
  2641. chocolate: "d2691e",
  2642. coral: "ff7f50",
  2643. cornflowerblue: "6495ed",
  2644. cornsilk: "fff8dc",
  2645. crimson: "dc143c",
  2646. cyan: "0ff",
  2647. darkblue: "00008b",
  2648. darkcyan: "008b8b",
  2649. darkgoldenrod: "b8860b",
  2650. darkgray: "a9a9a9",
  2651. darkgreen: "006400",
  2652. darkgrey: "a9a9a9",
  2653. darkkhaki: "bdb76b",
  2654. darkmagenta: "8b008b",
  2655. darkolivegreen: "556b2f",
  2656. darkorange: "ff8c00",
  2657. darkorchid: "9932cc",
  2658. darkred: "8b0000",
  2659. darksalmon: "e9967a",
  2660. darkseagreen: "8fbc8f",
  2661. darkslateblue: "483d8b",
  2662. darkslategray: "2f4f4f",
  2663. darkslategrey: "2f4f4f",
  2664. darkturquoise: "00ced1",
  2665. darkviolet: "9400d3",
  2666. deeppink: "ff1493",
  2667. deepskyblue: "00bfff",
  2668. dimgray: "696969",
  2669. dimgrey: "696969",
  2670. dodgerblue: "1e90ff",
  2671. firebrick: "b22222",
  2672. floralwhite: "fffaf0",
  2673. forestgreen: "228b22",
  2674. fuchsia: "f0f",
  2675. gainsboro: "dcdcdc",
  2676. ghostwhite: "f8f8ff",
  2677. gold: "ffd700",
  2678. goldenrod: "daa520",
  2679. gray: "808080",
  2680. green: "008000",
  2681. greenyellow: "adff2f",
  2682. grey: "808080",
  2683. honeydew: "f0fff0",
  2684. hotpink: "ff69b4",
  2685. indianred: "cd5c5c",
  2686. indigo: "4b0082",
  2687. ivory: "fffff0",
  2688. khaki: "f0e68c",
  2689. lavender: "e6e6fa",
  2690. lavenderblush: "fff0f5",
  2691. lawngreen: "7cfc00",
  2692. lemonchiffon: "fffacd",
  2693. lightblue: "add8e6",
  2694. lightcoral: "f08080",
  2695. lightcyan: "e0ffff",
  2696. lightgoldenrodyellow: "fafad2",
  2697. lightgray: "d3d3d3",
  2698. lightgreen: "90ee90",
  2699. lightgrey: "d3d3d3",
  2700. lightpink: "ffb6c1",
  2701. lightsalmon: "ffa07a",
  2702. lightseagreen: "20b2aa",
  2703. lightskyblue: "87cefa",
  2704. lightslategray: "789",
  2705. lightslategrey: "789",
  2706. lightsteelblue: "b0c4de",
  2707. lightyellow: "ffffe0",
  2708. lime: "0f0",
  2709. limegreen: "32cd32",
  2710. linen: "faf0e6",
  2711. magenta: "f0f",
  2712. maroon: "800000",
  2713. mediumaquamarine: "66cdaa",
  2714. mediumblue: "0000cd",
  2715. mediumorchid: "ba55d3",
  2716. mediumpurple: "9370db",
  2717. mediumseagreen: "3cb371",
  2718. mediumslateblue: "7b68ee",
  2719. mediumspringgreen: "00fa9a",
  2720. mediumturquoise: "48d1cc",
  2721. mediumvioletred: "c71585",
  2722. midnightblue: "191970",
  2723. mintcream: "f5fffa",
  2724. mistyrose: "ffe4e1",
  2725. moccasin: "ffe4b5",
  2726. navajowhite: "ffdead",
  2727. navy: "000080",
  2728. oldlace: "fdf5e6",
  2729. olive: "808000",
  2730. olivedrab: "6b8e23",
  2731. orange: "ffa500",
  2732. orangered: "ff4500",
  2733. orchid: "da70d6",
  2734. palegoldenrod: "eee8aa",
  2735. palegreen: "98fb98",
  2736. paleturquoise: "afeeee",
  2737. palevioletred: "db7093",
  2738. papayawhip: "ffefd5",
  2739. peachpuff: "ffdab9",
  2740. peru: "cd853f",
  2741. pink: "ffc0cb",
  2742. plum: "dda0dd",
  2743. powderblue: "b0e0e6",
  2744. purple: "800080",
  2745. rebeccapurple: "663399",
  2746. red: "f00",
  2747. rosybrown: "bc8f8f",
  2748. royalblue: "4169e1",
  2749. saddlebrown: "8b4513",
  2750. salmon: "fa8072",
  2751. sandybrown: "f4a460",
  2752. seagreen: "2e8b57",
  2753. seashell: "fff5ee",
  2754. sienna: "a0522d",
  2755. silver: "c0c0c0",
  2756. skyblue: "87ceeb",
  2757. slateblue: "6a5acd",
  2758. slategray: "708090",
  2759. slategrey: "708090",
  2760. snow: "fffafa",
  2761. springgreen: "00ff7f",
  2762. steelblue: "4682b4",
  2763. tan: "d2b48c",
  2764. teal: "008080",
  2765. thistle: "d8bfd8",
  2766. tomato: "ff6347",
  2767. turquoise: "40e0d0",
  2768. violet: "ee82ee",
  2769. wheat: "f5deb3",
  2770. white: "fff",
  2771. whitesmoke: "f5f5f5",
  2772. yellow: "ff0",
  2773. yellowgreen: "9acd32"
  2774. };
  2775. // Make it easy to access colors via `hexNames[hex]`
  2776. var hexNames = tinycolor.hexNames = flip(names);
  2777. // Utilities
  2778. // ---------
  2779. // `{ 'name1': 'val1' }` becomes `{ 'val1': 'name1' }`
  2780. function flip(o) {
  2781. var flipped = { };
  2782. for (var i in o) {
  2783. if (o.hasOwnProperty(i)) {
  2784. flipped[o[i]] = i;
  2785. }
  2786. }
  2787. return flipped;
  2788. }
  2789. // Return a valid alpha value [0,1] with all invalid values being set to 1
  2790. function boundAlpha(a) {
  2791. a = parseFloat(a);
  2792. if (isNaN(a) || a < 0 || a > 1) {
  2793. a = 1;
  2794. }
  2795. return a;
  2796. }
  2797. // Take input from [0, n] and return it as [0, 1]
  2798. function bound01(n, max) {
  2799. if (isOnePointZero(n)) { n = "100%"; }
  2800. var processPercent = isPercentage(n);
  2801. n = mathMin(max, mathMax(0, parseFloat(n)));
  2802. // Automatically convert percentage into number
  2803. if (processPercent) {
  2804. n = parseInt(n * max, 10) / 100;
  2805. }
  2806. // Handle floating point rounding errors
  2807. if ((Math.abs(n - max) < 0.000001)) {
  2808. return 1;
  2809. }
  2810. // Convert into [0, 1] range if it isn't already
  2811. return (n % max) / parseFloat(max);
  2812. }
  2813. // Force a number between 0 and 1
  2814. function clamp01(val) {
  2815. return mathMin(1, mathMax(0, val));
  2816. }
  2817. // Parse a base-16 hex value into a base-10 integer
  2818. function parseIntFromHex(val) {
  2819. return parseInt(val, 16);
  2820. }
  2821. // Need to handle 1.0 as 100%, since once it is a number, there is no difference between it and 1
  2822. // <http://stackoverflow.com/questions/7422072/javascript-how-to-detect-number-as-a-decimal-including-1-0>
  2823. function isOnePointZero(n) {
  2824. return typeof n == "string" && n.indexOf('.') != -1 && parseFloat(n) === 1;
  2825. }
  2826. // Check to see if string passed in is a percentage
  2827. function isPercentage(n) {
  2828. return typeof n === "string" && n.indexOf('%') != -1;
  2829. }
  2830. // Force a hex value to have 2 characters
  2831. function pad2(c) {
  2832. return c.length == 1 ? '0' + c : '' + c;
  2833. }
  2834. // Replace a decimal with it's percentage value
  2835. function convertToPercentage(n) {
  2836. if (n <= 1) {
  2837. n = (n * 100) + "%";
  2838. }
  2839. return n;
  2840. }
  2841. // Converts a decimal to a hex value
  2842. function convertDecimalToHex(d) {
  2843. return Math.round(parseFloat(d) * 255).toString(16);
  2844. }
  2845. // Converts a hex value to a decimal
  2846. function convertHexToDecimal(h) {
  2847. return (parseIntFromHex(h) / 255);
  2848. }
  2849. var matchers = (function() {
  2850. // <http://www.w3.org/TR/css3-values/#integers>
  2851. var CSS_INTEGER = "[-\\+]?\\d+%?";
  2852. // <http://www.w3.org/TR/css3-values/#number-value>
  2853. var CSS_NUMBER = "[-\\+]?\\d*\\.\\d+%?";
  2854. // Allow positive/negative integer/number. Don't capture the either/or, just the entire outcome.
  2855. var CSS_UNIT = "(?:" + CSS_NUMBER + ")|(?:" + CSS_INTEGER + ")";
  2856. // Actual matching.
  2857. // Parentheses and commas are optional, but not required.
  2858. // Whitespace can take the place of commas or opening paren
  2859. var PERMISSIVE_MATCH3 = "[\\s|\\(]+(" + CSS_UNIT + ")[,|\\s]+(" + CSS_UNIT + ")[,|\\s]+(" + CSS_UNIT + ")\\s*\\)?";
  2860. var PERMISSIVE_MATCH4 = "[\\s|\\(]+(" + CSS_UNIT + ")[,|\\s]+(" + CSS_UNIT + ")[,|\\s]+(" + CSS_UNIT + ")[,|\\s]+(" + CSS_UNIT + ")\\s*\\)?";
  2861. return {
  2862. CSS_UNIT: new RegExp(CSS_UNIT),
  2863. rgb: new RegExp("rgb" + PERMISSIVE_MATCH3),
  2864. rgba: new RegExp("rgba" + PERMISSIVE_MATCH4),
  2865. hsl: new RegExp("hsl" + PERMISSIVE_MATCH3),
  2866. hsla: new RegExp("hsla" + PERMISSIVE_MATCH4),
  2867. hsv: new RegExp("hsv" + PERMISSIVE_MATCH3),
  2868. hsva: new RegExp("hsva" + PERMISSIVE_MATCH4),
  2869. hex3: /^#?([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})$/,
  2870. hex6: /^#?([0-9a-fA-F]{2})([0-9a-fA-F]{2})([0-9a-fA-F]{2})$/,
  2871. hex4: /^#?([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})$/,
  2872. hex8: /^#?([0-9a-fA-F]{2})([0-9a-fA-F]{2})([0-9a-fA-F]{2})([0-9a-fA-F]{2})$/
  2873. };
  2874. })();
  2875. // `isValidCSSUnit`
  2876. // Take in a single string / number and check to see if it looks like a CSS unit
  2877. // (see `matchers` above for definition).
  2878. function isValidCSSUnit(color) {
  2879. return !!matchers.CSS_UNIT.exec(color);
  2880. }
  2881. // `stringInputToObject`
  2882. // Permissive string parsing. Take in a number of formats, and output an object
  2883. // based on detected format. Returns `{ r, g, b }` or `{ h, s, l }` or `{ h, s, v}`
  2884. function stringInputToObject(color) {
  2885. color = color.replace(trimLeft,'').replace(trimRight, '').toLowerCase();
  2886. var named = false;
  2887. if (names[color]) {
  2888. color = names[color];
  2889. named = true;
  2890. }
  2891. else if (color == 'transparent') {
  2892. return { r: 0, g: 0, b: 0, a: 0, format: "name" };
  2893. }
  2894. // Try to match string input using regular expressions.
  2895. // Keep most of the number bounding out of this function - don't worry about [0,1] or [0,100] or [0,360]
  2896. // Just return an object and let the conversion functions handle that.
  2897. // This way the result will be the same whether the tinycolor is initialized with string or object.
  2898. var match;
  2899. if ((match = matchers.rgb.exec(color))) {
  2900. return { r: match[1], g: match[2], b: match[3] };
  2901. }
  2902. if ((match = matchers.rgba.exec(color))) {
  2903. return { r: match[1], g: match[2], b: match[3], a: match[4] };
  2904. }
  2905. if ((match = matchers.hsl.exec(color))) {
  2906. return { h: match[1], s: match[2], l: match[3] };
  2907. }
  2908. if ((match = matchers.hsla.exec(color))) {
  2909. return { h: match[1], s: match[2], l: match[3], a: match[4] };
  2910. }
  2911. if ((match = matchers.hsv.exec(color))) {
  2912. return { h: match[1], s: match[2], v: match[3] };
  2913. }
  2914. if ((match = matchers.hsva.exec(color))) {
  2915. return { h: match[1], s: match[2], v: match[3], a: match[4] };
  2916. }
  2917. if ((match = matchers.hex8.exec(color))) {
  2918. return {
  2919. r: parseIntFromHex(match[1]),
  2920. g: parseIntFromHex(match[2]),
  2921. b: parseIntFromHex(match[3]),
  2922. a: convertHexToDecimal(match[4]),
  2923. format: named ? "name" : "hex8"
  2924. };
  2925. }
  2926. if ((match = matchers.hex6.exec(color))) {
  2927. return {
  2928. r: parseIntFromHex(match[1]),
  2929. g: parseIntFromHex(match[2]),
  2930. b: parseIntFromHex(match[3]),
  2931. format: named ? "name" : "hex"
  2932. };
  2933. }
  2934. if ((match = matchers.hex4.exec(color))) {
  2935. return {
  2936. r: parseIntFromHex(match[1] + '' + match[1]),
  2937. g: parseIntFromHex(match[2] + '' + match[2]),
  2938. b: parseIntFromHex(match[3] + '' + match[3]),
  2939. a: convertHexToDecimal(match[4] + '' + match[4]),
  2940. format: named ? "name" : "hex8"
  2941. };
  2942. }
  2943. if ((match = matchers.hex3.exec(color))) {
  2944. return {
  2945. r: parseIntFromHex(match[1] + '' + match[1]),
  2946. g: parseIntFromHex(match[2] + '' + match[2]),
  2947. b: parseIntFromHex(match[3] + '' + match[3]),
  2948. format: named ? "name" : "hex"
  2949. };
  2950. }
  2951. return false;
  2952. }
  2953. function validateWCAG2Parms(parms) {
  2954. // return valid WCAG2 parms for isReadable.
  2955. // If input parms are invalid, return {"level":"AA", "size":"small"}
  2956. var level, size;
  2957. parms = parms || {"level":"AA", "size":"small"};
  2958. level = (parms.level || "AA").toUpperCase();
  2959. size = (parms.size || "small").toLowerCase();
  2960. if (level !== "AA" && level !== "AAA") {
  2961. level = "AA";
  2962. }
  2963. if (size !== "small" && size !== "large") {
  2964. size = "small";
  2965. }
  2966. return {"level":level, "size":size};
  2967. }
  2968. // Node: Export function
  2969. if (typeof module !== "undefined" && module.exports) {
  2970. module.exports = tinycolor;
  2971. }
  2972. // AMD/requirejs: Define the module
  2973. else if (true) {
  2974. !(__WEBPACK_AMD_DEFINE_RESULT__ = (function () {return tinycolor;}).call(exports, __webpack_require__, exports, module),
  2975. __WEBPACK_AMD_DEFINE_RESULT__ !== undefined && (module.exports = __WEBPACK_AMD_DEFINE_RESULT__));
  2976. }
  2977. // Browser: Expose to window
  2978. else {
  2979. window.tinycolor = tinycolor;
  2980. }
  2981. })(Math);
  2982. /***/ }),
  2983. /* 28 */
  2984. /***/ (function(module, exports, __webpack_require__) {
  2985. // style-loader: Adds some css to the DOM by adding a <style> tag
  2986. // load the styles
  2987. var content = __webpack_require__(29);
  2988. if(typeof content === 'string') content = [[module.i, content, '']];
  2989. if(content.locals) module.exports = content.locals;
  2990. // add the styles to the DOM
  2991. var update = __webpack_require__(1)("0f73e73c", content, false, {});
  2992. // Hot Module Replacement
  2993. if(false) {
  2994. // When the styles change, update the <style> tags
  2995. if(!content.locals) {
  2996. module.hot.accept("!!../../../node_modules/css-loader/index.js?{\"minimize\":false,\"sourceMap\":false}!../../../node_modules/vue-loader/lib/style-compiler/index.js?{\"vue\":true,\"id\":\"data-v-441174dc\",\"scoped\":false,\"hasInlineConfig\":false}!../../../node_modules/vue-loader/lib/selector.js?type=styles&index=0!./EditableInput.vue", function() {
  2997. var newContent = require("!!../../../node_modules/css-loader/index.js?{\"minimize\":false,\"sourceMap\":false}!../../../node_modules/vue-loader/lib/style-compiler/index.js?{\"vue\":true,\"id\":\"data-v-441174dc\",\"scoped\":false,\"hasInlineConfig\":false}!../../../node_modules/vue-loader/lib/selector.js?type=styles&index=0!./EditableInput.vue");
  2998. if(typeof newContent === 'string') newContent = [[module.id, newContent, '']];
  2999. update(newContent);
  3000. });
  3001. }
  3002. // When the module is disposed, remove the <style> tags
  3003. module.hot.dispose(function() { update(); });
  3004. }
  3005. /***/ }),
  3006. /* 29 */
  3007. /***/ (function(module, exports, __webpack_require__) {
  3008. exports = module.exports = __webpack_require__(0)(false);
  3009. // imports
  3010. // module
  3011. exports.push([module.i, "\n.vc-editable-input {\n position: relative;\n}\n.vc-input__input {\n padding: 0;\n border: 0;\n outline: none;\n}\n.vc-input__label {\n text-transform: capitalize;\n}\n", ""]);
  3012. // exports
  3013. /***/ }),
  3014. /* 30 */
  3015. /***/ (function(module, __webpack_exports__, __webpack_require__) {
  3016. "use strict";
  3017. var render = function() {
  3018. var _vm = this
  3019. var _h = _vm.$createElement
  3020. var _c = _vm._self._c || _h
  3021. return _c("div", { staticClass: "vc-editable-input" }, [
  3022. _c("input", {
  3023. directives: [
  3024. { name: "model", rawName: "v-model", value: _vm.val, expression: "val" }
  3025. ],
  3026. ref: "input",
  3027. staticClass: "vc-input__input",
  3028. attrs: { "aria-labelledby": _vm.labelId },
  3029. domProps: { value: _vm.val },
  3030. on: {
  3031. keydown: _vm.handleKeyDown,
  3032. input: [
  3033. function($event) {
  3034. if ($event.target.composing) {
  3035. return
  3036. }
  3037. _vm.val = $event.target.value
  3038. },
  3039. _vm.update
  3040. ]
  3041. }
  3042. }),
  3043. _vm._v(" "),
  3044. _c(
  3045. "span",
  3046. {
  3047. staticClass: "vc-input__label",
  3048. attrs: { for: _vm.label, id: _vm.labelId }
  3049. },
  3050. [_vm._v(_vm._s(_vm.labelSpanText))]
  3051. ),
  3052. _vm._v(" "),
  3053. _c("span", { staticClass: "vc-input__desc" }, [_vm._v(_vm._s(_vm.desc))])
  3054. ])
  3055. }
  3056. var staticRenderFns = []
  3057. render._withStripped = true
  3058. var esExports = { render: render, staticRenderFns: staticRenderFns }
  3059. /* harmony default export */ __webpack_exports__["a"] = (esExports);
  3060. if (false) {
  3061. module.hot.accept()
  3062. if (module.hot.data) {
  3063. require("vue-loader/node_modules/vue-hot-reload-api") .rerender("data-v-441174dc", esExports)
  3064. }
  3065. }
  3066. /***/ }),
  3067. /* 31 */
  3068. /***/ (function(module, __webpack_exports__, __webpack_require__) {
  3069. "use strict";
  3070. var render = function() {
  3071. var _vm = this
  3072. var _h = _vm.$createElement
  3073. var _c = _vm._self._c || _h
  3074. return _c(
  3075. "div",
  3076. {
  3077. staticClass: "vc-compact",
  3078. attrs: { role: "application", "aria-label": "Compact color picker" }
  3079. },
  3080. [
  3081. _c(
  3082. "ul",
  3083. { staticClass: "vc-compact-colors", attrs: { role: "listbox" } },
  3084. _vm._l(_vm.paletteUpperCase(_vm.palette), function(c) {
  3085. return _c(
  3086. "li",
  3087. {
  3088. key: c,
  3089. staticClass: "vc-compact-color-item",
  3090. class: { "vc-compact-color-item--white": c === "#FFFFFF" },
  3091. style: { background: c },
  3092. attrs: {
  3093. role: "option",
  3094. "aria-label": "color:" + c,
  3095. "aria-selected": c === _vm.pick
  3096. },
  3097. on: {
  3098. click: function($event) {
  3099. _vm.handlerClick(c)
  3100. }
  3101. }
  3102. },
  3103. [
  3104. _c("div", {
  3105. directives: [
  3106. {
  3107. name: "show",
  3108. rawName: "v-show",
  3109. value: c === _vm.pick,
  3110. expression: "c === pick"
  3111. }
  3112. ],
  3113. staticClass: "vc-compact-dot"
  3114. })
  3115. ]
  3116. )
  3117. })
  3118. )
  3119. ]
  3120. )
  3121. }
  3122. var staticRenderFns = []
  3123. render._withStripped = true
  3124. var esExports = { render: render, staticRenderFns: staticRenderFns }
  3125. /* harmony default export */ __webpack_exports__["a"] = (esExports);
  3126. if (false) {
  3127. module.hot.accept()
  3128. if (module.hot.data) {
  3129. require("vue-loader/node_modules/vue-hot-reload-api") .rerender("data-v-648423a3", esExports)
  3130. }
  3131. }
  3132. /***/ }),
  3133. /* 32 */
  3134. /***/ (function(module, __webpack_exports__, __webpack_require__) {
  3135. "use strict";
  3136. Object.defineProperty(__webpack_exports__, "__esModule", { value: true });
  3137. /* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__babel_loader_node_modules_vue_loader_lib_selector_type_script_index_0_Grayscale_vue__ = __webpack_require__(11);
  3138. /* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__babel_loader_node_modules_vue_loader_lib_selector_type_script_index_0_Grayscale_vue___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_0__babel_loader_node_modules_vue_loader_lib_selector_type_script_index_0_Grayscale_vue__);
  3139. /* harmony namespace reexport (unknown) */ for(var __WEBPACK_IMPORT_KEY__ in __WEBPACK_IMPORTED_MODULE_0__babel_loader_node_modules_vue_loader_lib_selector_type_script_index_0_Grayscale_vue__) if(__WEBPACK_IMPORT_KEY__ !== 'default') (function(key) { __webpack_require__.d(__webpack_exports__, key, function() { return __WEBPACK_IMPORTED_MODULE_0__babel_loader_node_modules_vue_loader_lib_selector_type_script_index_0_Grayscale_vue__[key]; }) }(__WEBPACK_IMPORT_KEY__));
  3140. /* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__node_modules_vue_loader_lib_template_compiler_index_id_data_v_ad047d72_hasScoped_false_buble_transforms_node_modules_vue_loader_lib_selector_type_template_index_0_Grayscale_vue__ = __webpack_require__(35);
  3141. var disposed = false
  3142. function injectStyle (ssrContext) {
  3143. if (disposed) return
  3144. __webpack_require__(33)
  3145. }
  3146. var normalizeComponent = __webpack_require__(2)
  3147. /* script */
  3148. /* template */
  3149. /* template functional */
  3150. var __vue_template_functional__ = false
  3151. /* styles */
  3152. var __vue_styles__ = injectStyle
  3153. /* scopeId */
  3154. var __vue_scopeId__ = null
  3155. /* moduleIdentifier (server only) */
  3156. var __vue_module_identifier__ = null
  3157. var Component = normalizeComponent(
  3158. __WEBPACK_IMPORTED_MODULE_0__babel_loader_node_modules_vue_loader_lib_selector_type_script_index_0_Grayscale_vue___default.a,
  3159. __WEBPACK_IMPORTED_MODULE_1__node_modules_vue_loader_lib_template_compiler_index_id_data_v_ad047d72_hasScoped_false_buble_transforms_node_modules_vue_loader_lib_selector_type_template_index_0_Grayscale_vue__["a" /* default */],
  3160. __vue_template_functional__,
  3161. __vue_styles__,
  3162. __vue_scopeId__,
  3163. __vue_module_identifier__
  3164. )
  3165. Component.options.__file = "src/components/Grayscale.vue"
  3166. /* hot reload */
  3167. if (false) {(function () {
  3168. var hotAPI = require("vue-loader/node_modules/vue-hot-reload-api")
  3169. hotAPI.install(require("vue"), false)
  3170. if (!hotAPI.compatible) return
  3171. module.hot.accept()
  3172. if (!module.hot.data) {
  3173. hotAPI.createRecord("data-v-ad047d72", Component.options)
  3174. } else {
  3175. hotAPI.reload("data-v-ad047d72", Component.options)
  3176. }
  3177. module.hot.dispose(function (data) {
  3178. disposed = true
  3179. })
  3180. })()}
  3181. /* harmony default export */ __webpack_exports__["default"] = (Component.exports);
  3182. /***/ }),
  3183. /* 33 */
  3184. /***/ (function(module, exports, __webpack_require__) {
  3185. // style-loader: Adds some css to the DOM by adding a <style> tag
  3186. // load the styles
  3187. var content = __webpack_require__(34);
  3188. if(typeof content === 'string') content = [[module.i, content, '']];
  3189. if(content.locals) module.exports = content.locals;
  3190. // add the styles to the DOM
  3191. var update = __webpack_require__(1)("21ddbb74", content, false, {});
  3192. // Hot Module Replacement
  3193. if(false) {
  3194. // When the styles change, update the <style> tags
  3195. if(!content.locals) {
  3196. module.hot.accept("!!../../node_modules/css-loader/index.js?{\"minimize\":false,\"sourceMap\":false}!../../node_modules/vue-loader/lib/style-compiler/index.js?{\"vue\":true,\"id\":\"data-v-ad047d72\",\"scoped\":false,\"hasInlineConfig\":false}!../../node_modules/vue-loader/lib/selector.js?type=styles&index=0!./Grayscale.vue", function() {
  3197. var newContent = require("!!../../node_modules/css-loader/index.js?{\"minimize\":false,\"sourceMap\":false}!../../node_modules/vue-loader/lib/style-compiler/index.js?{\"vue\":true,\"id\":\"data-v-ad047d72\",\"scoped\":false,\"hasInlineConfig\":false}!../../node_modules/vue-loader/lib/selector.js?type=styles&index=0!./Grayscale.vue");
  3198. if(typeof newContent === 'string') newContent = [[module.id, newContent, '']];
  3199. update(newContent);
  3200. });
  3201. }
  3202. // When the module is disposed, remove the <style> tags
  3203. module.hot.dispose(function() { update(); });
  3204. }
  3205. /***/ }),
  3206. /* 34 */
  3207. /***/ (function(module, exports, __webpack_require__) {
  3208. exports = module.exports = __webpack_require__(0)(false);
  3209. // imports
  3210. // module
  3211. exports.push([module.i, "\n.vc-grayscale {\n width: 125px;\n border-radius: 2px;\n box-shadow: 0 2px 15px rgba(0,0,0,.12), 0 2px 10px rgba(0,0,0,.16);\n background-color: #fff;\n}\n.vc-grayscale-colors {\n border-radius: 2px;\n overflow: hidden;\n padding: 0;\n margin: 0;\n}\n.vc-grayscale-color-item {\n list-style: none;\n width: 25px;\n height: 25px;\n float: left;\n position: relative;\n cursor: pointer;\n}\n.vc-grayscale-color-item--white .vc-grayscale-dot {\n background: #000;\n}\n.vc-grayscale-dot {\n position: absolute;\n top: 50%;\n left: 50%;\n width: 6px;\n height: 6px;\n margin: -3px 0 0 -2px;\n border-radius: 50%;\n opacity: 1;\n background: #fff;\n}\n", ""]);
  3212. // exports
  3213. /***/ }),
  3214. /* 35 */
  3215. /***/ (function(module, __webpack_exports__, __webpack_require__) {
  3216. "use strict";
  3217. var render = function() {
  3218. var _vm = this
  3219. var _h = _vm.$createElement
  3220. var _c = _vm._self._c || _h
  3221. return _c(
  3222. "div",
  3223. {
  3224. staticClass: "vc-grayscale",
  3225. attrs: { role: "application", "aria-label": "Grayscale color picker" }
  3226. },
  3227. [
  3228. _c(
  3229. "ul",
  3230. { staticClass: "vc-grayscale-colors", attrs: { role: "listbox" } },
  3231. _vm._l(_vm.paletteUpperCase(_vm.palette), function(c) {
  3232. return _c(
  3233. "li",
  3234. {
  3235. key: c,
  3236. staticClass: "vc-grayscale-color-item",
  3237. class: { "vc-grayscale-color-item--white": c == "#FFFFFF" },
  3238. style: { background: c },
  3239. attrs: {
  3240. role: "option",
  3241. "aria-label": "Color:" + c,
  3242. "aria-selected": c === _vm.pick
  3243. },
  3244. on: {
  3245. click: function($event) {
  3246. _vm.handlerClick(c)
  3247. }
  3248. }
  3249. },
  3250. [
  3251. _c("div", {
  3252. directives: [
  3253. {
  3254. name: "show",
  3255. rawName: "v-show",
  3256. value: c === _vm.pick,
  3257. expression: "c === pick"
  3258. }
  3259. ],
  3260. staticClass: "vc-grayscale-dot"
  3261. })
  3262. ]
  3263. )
  3264. })
  3265. )
  3266. ]
  3267. )
  3268. }
  3269. var staticRenderFns = []
  3270. render._withStripped = true
  3271. var esExports = { render: render, staticRenderFns: staticRenderFns }
  3272. /* harmony default export */ __webpack_exports__["a"] = (esExports);
  3273. if (false) {
  3274. module.hot.accept()
  3275. if (module.hot.data) {
  3276. require("vue-loader/node_modules/vue-hot-reload-api") .rerender("data-v-ad047d72", esExports)
  3277. }
  3278. }
  3279. /***/ }),
  3280. /* 36 */
  3281. /***/ (function(module, __webpack_exports__, __webpack_require__) {
  3282. "use strict";
  3283. Object.defineProperty(__webpack_exports__, "__esModule", { value: true });
  3284. /* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__babel_loader_node_modules_vue_loader_lib_selector_type_script_index_0_Material_vue__ = __webpack_require__(12);
  3285. /* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__babel_loader_node_modules_vue_loader_lib_selector_type_script_index_0_Material_vue___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_0__babel_loader_node_modules_vue_loader_lib_selector_type_script_index_0_Material_vue__);
  3286. /* harmony namespace reexport (unknown) */ for(var __WEBPACK_IMPORT_KEY__ in __WEBPACK_IMPORTED_MODULE_0__babel_loader_node_modules_vue_loader_lib_selector_type_script_index_0_Material_vue__) if(__WEBPACK_IMPORT_KEY__ !== 'default') (function(key) { __webpack_require__.d(__webpack_exports__, key, function() { return __WEBPACK_IMPORTED_MODULE_0__babel_loader_node_modules_vue_loader_lib_selector_type_script_index_0_Material_vue__[key]; }) }(__WEBPACK_IMPORT_KEY__));
  3287. /* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__node_modules_vue_loader_lib_template_compiler_index_id_data_v_ac92cc52_hasScoped_false_buble_transforms_node_modules_vue_loader_lib_selector_type_template_index_0_Material_vue__ = __webpack_require__(39);
  3288. var disposed = false
  3289. function injectStyle (ssrContext) {
  3290. if (disposed) return
  3291. __webpack_require__(37)
  3292. }
  3293. var normalizeComponent = __webpack_require__(2)
  3294. /* script */
  3295. /* template */
  3296. /* template functional */
  3297. var __vue_template_functional__ = false
  3298. /* styles */
  3299. var __vue_styles__ = injectStyle
  3300. /* scopeId */
  3301. var __vue_scopeId__ = null
  3302. /* moduleIdentifier (server only) */
  3303. var __vue_module_identifier__ = null
  3304. var Component = normalizeComponent(
  3305. __WEBPACK_IMPORTED_MODULE_0__babel_loader_node_modules_vue_loader_lib_selector_type_script_index_0_Material_vue___default.a,
  3306. __WEBPACK_IMPORTED_MODULE_1__node_modules_vue_loader_lib_template_compiler_index_id_data_v_ac92cc52_hasScoped_false_buble_transforms_node_modules_vue_loader_lib_selector_type_template_index_0_Material_vue__["a" /* default */],
  3307. __vue_template_functional__,
  3308. __vue_styles__,
  3309. __vue_scopeId__,
  3310. __vue_module_identifier__
  3311. )
  3312. Component.options.__file = "src/components/Material.vue"
  3313. /* hot reload */
  3314. if (false) {(function () {
  3315. var hotAPI = require("vue-loader/node_modules/vue-hot-reload-api")
  3316. hotAPI.install(require("vue"), false)
  3317. if (!hotAPI.compatible) return
  3318. module.hot.accept()
  3319. if (!module.hot.data) {
  3320. hotAPI.createRecord("data-v-ac92cc52", Component.options)
  3321. } else {
  3322. hotAPI.reload("data-v-ac92cc52", Component.options)
  3323. }
  3324. module.hot.dispose(function (data) {
  3325. disposed = true
  3326. })
  3327. })()}
  3328. /* harmony default export */ __webpack_exports__["default"] = (Component.exports);
  3329. /***/ }),
  3330. /* 37 */
  3331. /***/ (function(module, exports, __webpack_require__) {
  3332. // style-loader: Adds some css to the DOM by adding a <style> tag
  3333. // load the styles
  3334. var content = __webpack_require__(38);
  3335. if(typeof content === 'string') content = [[module.i, content, '']];
  3336. if(content.locals) module.exports = content.locals;
  3337. // add the styles to the DOM
  3338. var update = __webpack_require__(1)("1ff3af73", content, false, {});
  3339. // Hot Module Replacement
  3340. if(false) {
  3341. // When the styles change, update the <style> tags
  3342. if(!content.locals) {
  3343. module.hot.accept("!!../../node_modules/css-loader/index.js?{\"minimize\":false,\"sourceMap\":false}!../../node_modules/vue-loader/lib/style-compiler/index.js?{\"vue\":true,\"id\":\"data-v-ac92cc52\",\"scoped\":false,\"hasInlineConfig\":false}!../../node_modules/vue-loader/lib/selector.js?type=styles&index=0!./Material.vue", function() {
  3344. var newContent = require("!!../../node_modules/css-loader/index.js?{\"minimize\":false,\"sourceMap\":false}!../../node_modules/vue-loader/lib/style-compiler/index.js?{\"vue\":true,\"id\":\"data-v-ac92cc52\",\"scoped\":false,\"hasInlineConfig\":false}!../../node_modules/vue-loader/lib/selector.js?type=styles&index=0!./Material.vue");
  3345. if(typeof newContent === 'string') newContent = [[module.id, newContent, '']];
  3346. update(newContent);
  3347. });
  3348. }
  3349. // When the module is disposed, remove the <style> tags
  3350. module.hot.dispose(function() { update(); });
  3351. }
  3352. /***/ }),
  3353. /* 38 */
  3354. /***/ (function(module, exports, __webpack_require__) {
  3355. exports = module.exports = __webpack_require__(0)(false);
  3356. // imports
  3357. // module
  3358. exports.push([module.i, "\n.vc-material {\n width: 98px;\n height: 98px;\n padding: 16px;\n font-family: \"Roboto\";\n position: relative;\n border-radius: 2px;\n box-shadow: 0 2px 10px rgba(0,0,0,.12), 0 2px 5px rgba(0,0,0,.16);\n background-color: #fff;\n}\n.vc-material .vc-input__input {\n width: 100%;\n margin-top: 12px;\n font-size: 15px;\n color: #333;\n height: 30px;\n}\n.vc-material .vc-input__label {\n position: absolute;\n top: 0;\n left: 0;\n font-size: 11px;\n color: #999;\n text-transform: capitalize;\n}\n.vc-material-hex {\n border-bottom-width: 2px;\n border-bottom-style: solid;\n}\n.vc-material-split {\n display: flex;\n margin-right: -10px;\n padding-top: 11px;\n}\n.vc-material-third {\n flex: 1;\n padding-right: 10px;\n}\n", ""]);
  3359. // exports
  3360. /***/ }),
  3361. /* 39 */
  3362. /***/ (function(module, __webpack_exports__, __webpack_require__) {
  3363. "use strict";
  3364. var render = function() {
  3365. var _vm = this
  3366. var _h = _vm.$createElement
  3367. var _c = _vm._self._c || _h
  3368. return _c(
  3369. "div",
  3370. {
  3371. staticClass: "vc-material",
  3372. attrs: { role: "application", "aria-label": "Material color picker" }
  3373. },
  3374. [
  3375. _c("ed-in", {
  3376. staticClass: "vc-material-hex",
  3377. style: { borderColor: _vm.colors.hex },
  3378. attrs: { label: "hex" },
  3379. on: { change: _vm.onChange },
  3380. model: {
  3381. value: _vm.colors.hex,
  3382. callback: function($$v) {
  3383. _vm.$set(_vm.colors, "hex", $$v)
  3384. },
  3385. expression: "colors.hex"
  3386. }
  3387. }),
  3388. _vm._v(" "),
  3389. _c("div", { staticClass: "vc-material-split" }, [
  3390. _c(
  3391. "div",
  3392. { staticClass: "vc-material-third" },
  3393. [
  3394. _c("ed-in", {
  3395. attrs: { label: "r" },
  3396. on: { change: _vm.onChange },
  3397. model: {
  3398. value: _vm.colors.rgba.r,
  3399. callback: function($$v) {
  3400. _vm.$set(_vm.colors.rgba, "r", $$v)
  3401. },
  3402. expression: "colors.rgba.r"
  3403. }
  3404. })
  3405. ],
  3406. 1
  3407. ),
  3408. _vm._v(" "),
  3409. _c(
  3410. "div",
  3411. { staticClass: "vc-material-third" },
  3412. [
  3413. _c("ed-in", {
  3414. attrs: { label: "g" },
  3415. on: { change: _vm.onChange },
  3416. model: {
  3417. value: _vm.colors.rgba.g,
  3418. callback: function($$v) {
  3419. _vm.$set(_vm.colors.rgba, "g", $$v)
  3420. },
  3421. expression: "colors.rgba.g"
  3422. }
  3423. })
  3424. ],
  3425. 1
  3426. ),
  3427. _vm._v(" "),
  3428. _c(
  3429. "div",
  3430. { staticClass: "vc-material-third" },
  3431. [
  3432. _c("ed-in", {
  3433. attrs: { label: "b" },
  3434. on: { change: _vm.onChange },
  3435. model: {
  3436. value: _vm.colors.rgba.b,
  3437. callback: function($$v) {
  3438. _vm.$set(_vm.colors.rgba, "b", $$v)
  3439. },
  3440. expression: "colors.rgba.b"
  3441. }
  3442. })
  3443. ],
  3444. 1
  3445. )
  3446. ])
  3447. ],
  3448. 1
  3449. )
  3450. }
  3451. var staticRenderFns = []
  3452. render._withStripped = true
  3453. var esExports = { render: render, staticRenderFns: staticRenderFns }
  3454. /* harmony default export */ __webpack_exports__["a"] = (esExports);
  3455. if (false) {
  3456. module.hot.accept()
  3457. if (module.hot.data) {
  3458. require("vue-loader/node_modules/vue-hot-reload-api") .rerender("data-v-ac92cc52", esExports)
  3459. }
  3460. }
  3461. /***/ }),
  3462. /* 40 */
  3463. /***/ (function(module, __webpack_exports__, __webpack_require__) {
  3464. "use strict";
  3465. Object.defineProperty(__webpack_exports__, "__esModule", { value: true });
  3466. /* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__babel_loader_node_modules_vue_loader_lib_selector_type_script_index_0_Slider_vue__ = __webpack_require__(13);
  3467. /* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__babel_loader_node_modules_vue_loader_lib_selector_type_script_index_0_Slider_vue___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_0__babel_loader_node_modules_vue_loader_lib_selector_type_script_index_0_Slider_vue__);
  3468. /* harmony namespace reexport (unknown) */ for(var __WEBPACK_IMPORT_KEY__ in __WEBPACK_IMPORTED_MODULE_0__babel_loader_node_modules_vue_loader_lib_selector_type_script_index_0_Slider_vue__) if(__WEBPACK_IMPORT_KEY__ !== 'default') (function(key) { __webpack_require__.d(__webpack_exports__, key, function() { return __WEBPACK_IMPORTED_MODULE_0__babel_loader_node_modules_vue_loader_lib_selector_type_script_index_0_Slider_vue__[key]; }) }(__WEBPACK_IMPORT_KEY__));
  3469. /* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__node_modules_vue_loader_lib_template_compiler_index_id_data_v_2dedc691_hasScoped_false_buble_transforms_node_modules_vue_loader_lib_selector_type_template_index_0_Slider_vue__ = __webpack_require__(46);
  3470. var disposed = false
  3471. function injectStyle (ssrContext) {
  3472. if (disposed) return
  3473. __webpack_require__(41)
  3474. }
  3475. var normalizeComponent = __webpack_require__(2)
  3476. /* script */
  3477. /* template */
  3478. /* template functional */
  3479. var __vue_template_functional__ = false
  3480. /* styles */
  3481. var __vue_styles__ = injectStyle
  3482. /* scopeId */
  3483. var __vue_scopeId__ = null
  3484. /* moduleIdentifier (server only) */
  3485. var __vue_module_identifier__ = null
  3486. var Component = normalizeComponent(
  3487. __WEBPACK_IMPORTED_MODULE_0__babel_loader_node_modules_vue_loader_lib_selector_type_script_index_0_Slider_vue___default.a,
  3488. __WEBPACK_IMPORTED_MODULE_1__node_modules_vue_loader_lib_template_compiler_index_id_data_v_2dedc691_hasScoped_false_buble_transforms_node_modules_vue_loader_lib_selector_type_template_index_0_Slider_vue__["a" /* default */],
  3489. __vue_template_functional__,
  3490. __vue_styles__,
  3491. __vue_scopeId__,
  3492. __vue_module_identifier__
  3493. )
  3494. Component.options.__file = "src/components/Slider.vue"
  3495. /* hot reload */
  3496. if (false) {(function () {
  3497. var hotAPI = require("vue-loader/node_modules/vue-hot-reload-api")
  3498. hotAPI.install(require("vue"), false)
  3499. if (!hotAPI.compatible) return
  3500. module.hot.accept()
  3501. if (!module.hot.data) {
  3502. hotAPI.createRecord("data-v-2dedc691", Component.options)
  3503. } else {
  3504. hotAPI.reload("data-v-2dedc691", Component.options)
  3505. }
  3506. module.hot.dispose(function (data) {
  3507. disposed = true
  3508. })
  3509. })()}
  3510. /* harmony default export */ __webpack_exports__["default"] = (Component.exports);
  3511. /***/ }),
  3512. /* 41 */
  3513. /***/ (function(module, exports, __webpack_require__) {
  3514. // style-loader: Adds some css to the DOM by adding a <style> tag
  3515. // load the styles
  3516. var content = __webpack_require__(42);
  3517. if(typeof content === 'string') content = [[module.i, content, '']];
  3518. if(content.locals) module.exports = content.locals;
  3519. // add the styles to the DOM
  3520. var update = __webpack_require__(1)("7982aa43", content, false, {});
  3521. // Hot Module Replacement
  3522. if(false) {
  3523. // When the styles change, update the <style> tags
  3524. if(!content.locals) {
  3525. module.hot.accept("!!../../node_modules/css-loader/index.js?{\"minimize\":false,\"sourceMap\":false}!../../node_modules/vue-loader/lib/style-compiler/index.js?{\"vue\":true,\"id\":\"data-v-2dedc691\",\"scoped\":false,\"hasInlineConfig\":false}!../../node_modules/vue-loader/lib/selector.js?type=styles&index=0!./Slider.vue", function() {
  3526. var newContent = require("!!../../node_modules/css-loader/index.js?{\"minimize\":false,\"sourceMap\":false}!../../node_modules/vue-loader/lib/style-compiler/index.js?{\"vue\":true,\"id\":\"data-v-2dedc691\",\"scoped\":false,\"hasInlineConfig\":false}!../../node_modules/vue-loader/lib/selector.js?type=styles&index=0!./Slider.vue");
  3527. if(typeof newContent === 'string') newContent = [[module.id, newContent, '']];
  3528. update(newContent);
  3529. });
  3530. }
  3531. // When the module is disposed, remove the <style> tags
  3532. module.hot.dispose(function() { update(); });
  3533. }
  3534. /***/ }),
  3535. /* 42 */
  3536. /***/ (function(module, exports, __webpack_require__) {
  3537. exports = module.exports = __webpack_require__(0)(false);
  3538. // imports
  3539. // module
  3540. exports.push([module.i, "\n.vc-slider {\n position: relative;\n width: 410px;\n}\n.vc-slider-hue-warp {\n height: 12px;\n position: relative;\n}\n.vc-slider-hue-warp .vc-hue-picker {\n width: 14px;\n height: 14px;\n border-radius: 6px;\n transform: translate(-7px, -2px);\n background-color: rgb(248, 248, 248);\n box-shadow: 0 1px 4px 0 rgba(0, 0, 0, 0.37);\n}\n.vc-slider-swatches {\n display: flex;\n margin-top: 20px;\n}\n.vc-slider-swatch {\n margin-right: 1px;\n flex: 1;\n width: 20%;\n}\n.vc-slider-swatch:first-child {\n margin-right: 1px;\n}\n.vc-slider-swatch:first-child .vc-slider-swatch-picker {\n border-radius: 2px 0px 0px 2px;\n}\n.vc-slider-swatch:last-child {\n margin-right: 0;\n}\n.vc-slider-swatch:last-child .vc-slider-swatch-picker {\n border-radius: 0px 2px 2px 0px;\n}\n.vc-slider-swatch-picker {\n cursor: pointer;\n height: 12px;\n}\n.vc-slider-swatch-picker--active {\n transform: scaleY(1.8);\n border-radius: 3.6px/2px;\n}\n.vc-slider-swatch-picker--white {\n box-shadow: inset 0 0 0 1px #ddd;\n}\n.vc-slider-swatch-picker--active.vc-slider-swatch-picker--white {\n box-shadow: inset 0 0 0 0.6px #ddd;\n}\n", ""]);
  3541. // exports
  3542. /***/ }),
  3543. /* 43 */
  3544. /***/ (function(module, exports, __webpack_require__) {
  3545. // style-loader: Adds some css to the DOM by adding a <style> tag
  3546. // load the styles
  3547. var content = __webpack_require__(44);
  3548. if(typeof content === 'string') content = [[module.i, content, '']];
  3549. if(content.locals) module.exports = content.locals;
  3550. // add the styles to the DOM
  3551. var update = __webpack_require__(1)("7c5f1a1c", content, false, {});
  3552. // Hot Module Replacement
  3553. if(false) {
  3554. // When the styles change, update the <style> tags
  3555. if(!content.locals) {
  3556. module.hot.accept("!!../../../node_modules/css-loader/index.js?{\"minimize\":false,\"sourceMap\":false}!../../../node_modules/vue-loader/lib/style-compiler/index.js?{\"vue\":true,\"id\":\"data-v-7b9aea78\",\"scoped\":false,\"hasInlineConfig\":false}!../../../node_modules/vue-loader/lib/selector.js?type=styles&index=0!./Hue.vue", function() {
  3557. var newContent = require("!!../../../node_modules/css-loader/index.js?{\"minimize\":false,\"sourceMap\":false}!../../../node_modules/vue-loader/lib/style-compiler/index.js?{\"vue\":true,\"id\":\"data-v-7b9aea78\",\"scoped\":false,\"hasInlineConfig\":false}!../../../node_modules/vue-loader/lib/selector.js?type=styles&index=0!./Hue.vue");
  3558. if(typeof newContent === 'string') newContent = [[module.id, newContent, '']];
  3559. update(newContent);
  3560. });
  3561. }
  3562. // When the module is disposed, remove the <style> tags
  3563. module.hot.dispose(function() { update(); });
  3564. }
  3565. /***/ }),
  3566. /* 44 */
  3567. /***/ (function(module, exports, __webpack_require__) {
  3568. exports = module.exports = __webpack_require__(0)(false);
  3569. // imports
  3570. // module
  3571. exports.push([module.i, "\n.vc-hue {\n position: absolute;\n top: 0px;\n right: 0px;\n bottom: 0px;\n left: 0px;\n border-radius: 2px;\n}\n.vc-hue--horizontal {\n background: -webkit-linear-gradient(0deg, #f00 0%, #ff0 17%, #0f0 33%, #0ff 50%, #00f 67%, #f0f 83%, #f00 100%);\n}\n.vc-hue--vertical {\n background: -webkit-linear-gradient(top, #f00 0%, #ff0 17%, #0f0 33%, #0ff 50%, #00f 67%, #f0f 83%, #f00 100%);\n}\n.vc-hue-container {\n cursor: pointer;\n margin: 0 2px;\n position: relative;\n height: 100%;\n}\n.vc-hue-pointer {\n z-index: 2;\n position: absolute;\n}\n.vc-hue-picker {\n cursor: pointer;\n margin-top: 1px;\n width: 4px;\n border-radius: 1px;\n height: 8px;\n box-shadow: 0 0 2px rgba(0, 0, 0, .6);\n background: #fff;\n transform: translateX(-2px) ;\n}\n", ""]);
  3572. // exports
  3573. /***/ }),
  3574. /* 45 */
  3575. /***/ (function(module, __webpack_exports__, __webpack_require__) {
  3576. "use strict";
  3577. var render = function() {
  3578. var _vm = this
  3579. var _h = _vm.$createElement
  3580. var _c = _vm._self._c || _h
  3581. return _c("div", { class: ["vc-hue", _vm.directionClass] }, [
  3582. _c(
  3583. "div",
  3584. {
  3585. ref: "container",
  3586. staticClass: "vc-hue-container",
  3587. attrs: {
  3588. role: "slider",
  3589. "aria-valuenow": _vm.colors.hsl.h,
  3590. "aria-valuemin": "0",
  3591. "aria-valuemax": "360"
  3592. },
  3593. on: {
  3594. mousedown: _vm.handleMouseDown,
  3595. touchmove: _vm.handleChange,
  3596. touchstart: _vm.handleChange
  3597. }
  3598. },
  3599. [
  3600. _c(
  3601. "div",
  3602. {
  3603. staticClass: "vc-hue-pointer",
  3604. style: { top: _vm.pointerTop, left: _vm.pointerLeft },
  3605. attrs: { role: "presentation" }
  3606. },
  3607. [_c("div", { staticClass: "vc-hue-picker" })]
  3608. )
  3609. ]
  3610. )
  3611. ])
  3612. }
  3613. var staticRenderFns = []
  3614. render._withStripped = true
  3615. var esExports = { render: render, staticRenderFns: staticRenderFns }
  3616. /* harmony default export */ __webpack_exports__["a"] = (esExports);
  3617. if (false) {
  3618. module.hot.accept()
  3619. if (module.hot.data) {
  3620. require("vue-loader/node_modules/vue-hot-reload-api") .rerender("data-v-7b9aea78", esExports)
  3621. }
  3622. }
  3623. /***/ }),
  3624. /* 46 */
  3625. /***/ (function(module, __webpack_exports__, __webpack_require__) {
  3626. "use strict";
  3627. var render = function() {
  3628. var _vm = this
  3629. var _h = _vm.$createElement
  3630. var _c = _vm._self._c || _h
  3631. return _c(
  3632. "div",
  3633. {
  3634. staticClass: "vc-slider",
  3635. attrs: { role: "application", "aria-label": "Slider color picker" }
  3636. },
  3637. [
  3638. _c(
  3639. "div",
  3640. { staticClass: "vc-slider-hue-warp" },
  3641. [
  3642. _c("hue", {
  3643. on: { change: _vm.hueChange },
  3644. model: {
  3645. value: _vm.colors,
  3646. callback: function($$v) {
  3647. _vm.colors = $$v
  3648. },
  3649. expression: "colors"
  3650. }
  3651. })
  3652. ],
  3653. 1
  3654. ),
  3655. _vm._v(" "),
  3656. _c(
  3657. "div",
  3658. { staticClass: "vc-slider-swatches", attrs: { role: "group" } },
  3659. _vm._l(_vm.swatches, function(offset, index) {
  3660. return _c(
  3661. "div",
  3662. {
  3663. key: index,
  3664. staticClass: "vc-slider-swatch",
  3665. attrs: {
  3666. "data-index": index,
  3667. "aria-label": "color:" + _vm.colors.hex,
  3668. role: "button"
  3669. },
  3670. on: {
  3671. click: function($event) {
  3672. _vm.handleSwClick(index, offset)
  3673. }
  3674. }
  3675. },
  3676. [
  3677. _c("div", {
  3678. staticClass: "vc-slider-swatch-picker",
  3679. class: {
  3680. "vc-slider-swatch-picker--active": offset == _vm.activeOffset,
  3681. "vc-slider-swatch-picker--white": offset === "1"
  3682. },
  3683. style: {
  3684. background:
  3685. "hsl(" + _vm.colors.hsl.h + ", 50%, " + offset * 100 + "%)"
  3686. }
  3687. })
  3688. ]
  3689. )
  3690. })
  3691. )
  3692. ]
  3693. )
  3694. }
  3695. var staticRenderFns = []
  3696. render._withStripped = true
  3697. var esExports = { render: render, staticRenderFns: staticRenderFns }
  3698. /* harmony default export */ __webpack_exports__["a"] = (esExports);
  3699. if (false) {
  3700. module.hot.accept()
  3701. if (module.hot.data) {
  3702. require("vue-loader/node_modules/vue-hot-reload-api") .rerender("data-v-2dedc691", esExports)
  3703. }
  3704. }
  3705. /***/ }),
  3706. /* 47 */
  3707. /***/ (function(module, __webpack_exports__, __webpack_require__) {
  3708. "use strict";
  3709. Object.defineProperty(__webpack_exports__, "__esModule", { value: true });
  3710. /* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__babel_loader_node_modules_vue_loader_lib_selector_type_script_index_0_Swatches_vue__ = __webpack_require__(15);
  3711. /* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__babel_loader_node_modules_vue_loader_lib_selector_type_script_index_0_Swatches_vue___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_0__babel_loader_node_modules_vue_loader_lib_selector_type_script_index_0_Swatches_vue__);
  3712. /* harmony namespace reexport (unknown) */ for(var __WEBPACK_IMPORT_KEY__ in __WEBPACK_IMPORTED_MODULE_0__babel_loader_node_modules_vue_loader_lib_selector_type_script_index_0_Swatches_vue__) if(__WEBPACK_IMPORT_KEY__ !== 'default') (function(key) { __webpack_require__.d(__webpack_exports__, key, function() { return __WEBPACK_IMPORTED_MODULE_0__babel_loader_node_modules_vue_loader_lib_selector_type_script_index_0_Swatches_vue__[key]; }) }(__WEBPACK_IMPORT_KEY__));
  3713. /* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__node_modules_vue_loader_lib_template_compiler_index_id_data_v_2395c5cc_hasScoped_false_buble_transforms_node_modules_vue_loader_lib_selector_type_template_index_0_Swatches_vue__ = __webpack_require__(51);
  3714. var disposed = false
  3715. function injectStyle (ssrContext) {
  3716. if (disposed) return
  3717. __webpack_require__(48)
  3718. }
  3719. var normalizeComponent = __webpack_require__(2)
  3720. /* script */
  3721. /* template */
  3722. /* template functional */
  3723. var __vue_template_functional__ = false
  3724. /* styles */
  3725. var __vue_styles__ = injectStyle
  3726. /* scopeId */
  3727. var __vue_scopeId__ = null
  3728. /* moduleIdentifier (server only) */
  3729. var __vue_module_identifier__ = null
  3730. var Component = normalizeComponent(
  3731. __WEBPACK_IMPORTED_MODULE_0__babel_loader_node_modules_vue_loader_lib_selector_type_script_index_0_Swatches_vue___default.a,
  3732. __WEBPACK_IMPORTED_MODULE_1__node_modules_vue_loader_lib_template_compiler_index_id_data_v_2395c5cc_hasScoped_false_buble_transforms_node_modules_vue_loader_lib_selector_type_template_index_0_Swatches_vue__["a" /* default */],
  3733. __vue_template_functional__,
  3734. __vue_styles__,
  3735. __vue_scopeId__,
  3736. __vue_module_identifier__
  3737. )
  3738. Component.options.__file = "src/components/Swatches.vue"
  3739. /* hot reload */
  3740. if (false) {(function () {
  3741. var hotAPI = require("vue-loader/node_modules/vue-hot-reload-api")
  3742. hotAPI.install(require("vue"), false)
  3743. if (!hotAPI.compatible) return
  3744. module.hot.accept()
  3745. if (!module.hot.data) {
  3746. hotAPI.createRecord("data-v-2395c5cc", Component.options)
  3747. } else {
  3748. hotAPI.reload("data-v-2395c5cc", Component.options)
  3749. }
  3750. module.hot.dispose(function (data) {
  3751. disposed = true
  3752. })
  3753. })()}
  3754. /* harmony default export */ __webpack_exports__["default"] = (Component.exports);
  3755. /***/ }),
  3756. /* 48 */
  3757. /***/ (function(module, exports, __webpack_require__) {
  3758. // style-loader: Adds some css to the DOM by adding a <style> tag
  3759. // load the styles
  3760. var content = __webpack_require__(49);
  3761. if(typeof content === 'string') content = [[module.i, content, '']];
  3762. if(content.locals) module.exports = content.locals;
  3763. // add the styles to the DOM
  3764. var update = __webpack_require__(1)("10f839a2", content, false, {});
  3765. // Hot Module Replacement
  3766. if(false) {
  3767. // When the styles change, update the <style> tags
  3768. if(!content.locals) {
  3769. module.hot.accept("!!../../node_modules/css-loader/index.js?{\"minimize\":false,\"sourceMap\":false}!../../node_modules/vue-loader/lib/style-compiler/index.js?{\"vue\":true,\"id\":\"data-v-2395c5cc\",\"scoped\":false,\"hasInlineConfig\":false}!../../node_modules/vue-loader/lib/selector.js?type=styles&index=0!./Swatches.vue", function() {
  3770. var newContent = require("!!../../node_modules/css-loader/index.js?{\"minimize\":false,\"sourceMap\":false}!../../node_modules/vue-loader/lib/style-compiler/index.js?{\"vue\":true,\"id\":\"data-v-2395c5cc\",\"scoped\":false,\"hasInlineConfig\":false}!../../node_modules/vue-loader/lib/selector.js?type=styles&index=0!./Swatches.vue");
  3771. if(typeof newContent === 'string') newContent = [[module.id, newContent, '']];
  3772. update(newContent);
  3773. });
  3774. }
  3775. // When the module is disposed, remove the <style> tags
  3776. module.hot.dispose(function() { update(); });
  3777. }
  3778. /***/ }),
  3779. /* 49 */
  3780. /***/ (function(module, exports, __webpack_require__) {
  3781. exports = module.exports = __webpack_require__(0)(false);
  3782. // imports
  3783. // module
  3784. exports.push([module.i, "\n.vc-swatches {\n width: 320px;\n height: 240px;\n overflow-y: scroll;\n background-color: #fff;\n box-shadow: 0 2px 10px rgba(0,0,0,.12), 0 2px 5px rgba(0,0,0,.16);\n}\n.vc-swatches-box {\n padding: 16px 0 6px 16px;\n overflow: hidden;\n}\n.vc-swatches-color-group {\n padding-bottom: 10px;\n width: 40px;\n float: left;\n margin-right: 10px;\n}\n.vc-swatches-color-it {\n box-sizing: border-box;\n width: 40px;\n height: 24px;\n cursor: pointer;\n background: #880e4f;\n margin-bottom: 1px;\n overflow: hidden;\n -ms-border-radius: 2px 2px 0 0;\n -moz-border-radius: 2px 2px 0 0;\n -o-border-radius: 2px 2px 0 0;\n -webkit-border-radius: 2px 2px 0 0;\n border-radius: 2px 2px 0 0;\n}\n.vc-swatches-color--white {\n border: 1px solid #DDD;\n}\n.vc-swatches-pick {\n fill: rgb(255, 255, 255);\n margin-left: 8px;\n display: block;\n}\n.vc-swatches-color--white .vc-swatches-pick {\n fill: rgb(51, 51, 51);\n}\n", ""]);
  3785. // exports
  3786. /***/ }),
  3787. /* 50 */
  3788. /***/ (function(module, __webpack_exports__, __webpack_require__) {
  3789. "use strict";
  3790. Object.defineProperty(__webpack_exports__, "__esModule", { value: true });
  3791. /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "red", function() { return red; });
  3792. /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "pink", function() { return pink; });
  3793. /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "purple", function() { return purple; });
  3794. /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "deepPurple", function() { return deepPurple; });
  3795. /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "indigo", function() { return indigo; });
  3796. /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "blue", function() { return blue; });
  3797. /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "lightBlue", function() { return lightBlue; });
  3798. /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "cyan", function() { return cyan; });
  3799. /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "teal", function() { return teal; });
  3800. /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "green", function() { return green; });
  3801. /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "lightGreen", function() { return lightGreen; });
  3802. /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "lime", function() { return lime; });
  3803. /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "yellow", function() { return yellow; });
  3804. /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "amber", function() { return amber; });
  3805. /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "orange", function() { return orange; });
  3806. /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "deepOrange", function() { return deepOrange; });
  3807. /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "brown", function() { return brown; });
  3808. /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "grey", function() { return grey; });
  3809. /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "blueGrey", function() { return blueGrey; });
  3810. /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "darkText", function() { return darkText; });
  3811. /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "lightText", function() { return lightText; });
  3812. /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "darkIcons", function() { return darkIcons; });
  3813. /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "lightIcons", function() { return lightIcons; });
  3814. /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "white", function() { return white; });
  3815. /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "black", function() { return black; });
  3816. var red = {"50":"#ffebee","100":"#ffcdd2","200":"#ef9a9a","300":"#e57373","400":"#ef5350","500":"#f44336","600":"#e53935","700":"#d32f2f","800":"#c62828","900":"#b71c1c","a100":"#ff8a80","a200":"#ff5252","a400":"#ff1744","a700":"#d50000"};
  3817. var pink = {"50":"#fce4ec","100":"#f8bbd0","200":"#f48fb1","300":"#f06292","400":"#ec407a","500":"#e91e63","600":"#d81b60","700":"#c2185b","800":"#ad1457","900":"#880e4f","a100":"#ff80ab","a200":"#ff4081","a400":"#f50057","a700":"#c51162"};
  3818. var purple = {"50":"#f3e5f5","100":"#e1bee7","200":"#ce93d8","300":"#ba68c8","400":"#ab47bc","500":"#9c27b0","600":"#8e24aa","700":"#7b1fa2","800":"#6a1b9a","900":"#4a148c","a100":"#ea80fc","a200":"#e040fb","a400":"#d500f9","a700":"#aa00ff"};
  3819. var deepPurple = {"50":"#ede7f6","100":"#d1c4e9","200":"#b39ddb","300":"#9575cd","400":"#7e57c2","500":"#673ab7","600":"#5e35b1","700":"#512da8","800":"#4527a0","900":"#311b92","a100":"#b388ff","a200":"#7c4dff","a400":"#651fff","a700":"#6200ea"};
  3820. var indigo = {"50":"#e8eaf6","100":"#c5cae9","200":"#9fa8da","300":"#7986cb","400":"#5c6bc0","500":"#3f51b5","600":"#3949ab","700":"#303f9f","800":"#283593","900":"#1a237e","a100":"#8c9eff","a200":"#536dfe","a400":"#3d5afe","a700":"#304ffe"};
  3821. var blue = {"50":"#e3f2fd","100":"#bbdefb","200":"#90caf9","300":"#64b5f6","400":"#42a5f5","500":"#2196f3","600":"#1e88e5","700":"#1976d2","800":"#1565c0","900":"#0d47a1","a100":"#82b1ff","a200":"#448aff","a400":"#2979ff","a700":"#2962ff"};
  3822. var lightBlue = {"50":"#e1f5fe","100":"#b3e5fc","200":"#81d4fa","300":"#4fc3f7","400":"#29b6f6","500":"#03a9f4","600":"#039be5","700":"#0288d1","800":"#0277bd","900":"#01579b","a100":"#80d8ff","a200":"#40c4ff","a400":"#00b0ff","a700":"#0091ea"};
  3823. var cyan = {"50":"#e0f7fa","100":"#b2ebf2","200":"#80deea","300":"#4dd0e1","400":"#26c6da","500":"#00bcd4","600":"#00acc1","700":"#0097a7","800":"#00838f","900":"#006064","a100":"#84ffff","a200":"#18ffff","a400":"#00e5ff","a700":"#00b8d4"};
  3824. var teal = {"50":"#e0f2f1","100":"#b2dfdb","200":"#80cbc4","300":"#4db6ac","400":"#26a69a","500":"#009688","600":"#00897b","700":"#00796b","800":"#00695c","900":"#004d40","a100":"#a7ffeb","a200":"#64ffda","a400":"#1de9b6","a700":"#00bfa5"};
  3825. var green = {"50":"#e8f5e9","100":"#c8e6c9","200":"#a5d6a7","300":"#81c784","400":"#66bb6a","500":"#4caf50","600":"#43a047","700":"#388e3c","800":"#2e7d32","900":"#1b5e20","a100":"#b9f6ca","a200":"#69f0ae","a400":"#00e676","a700":"#00c853"};
  3826. var lightGreen = {"50":"#f1f8e9","100":"#dcedc8","200":"#c5e1a5","300":"#aed581","400":"#9ccc65","500":"#8bc34a","600":"#7cb342","700":"#689f38","800":"#558b2f","900":"#33691e","a100":"#ccff90","a200":"#b2ff59","a400":"#76ff03","a700":"#64dd17"};
  3827. var lime = {"50":"#f9fbe7","100":"#f0f4c3","200":"#e6ee9c","300":"#dce775","400":"#d4e157","500":"#cddc39","600":"#c0ca33","700":"#afb42b","800":"#9e9d24","900":"#827717","a100":"#f4ff81","a200":"#eeff41","a400":"#c6ff00","a700":"#aeea00"};
  3828. var yellow = {"50":"#fffde7","100":"#fff9c4","200":"#fff59d","300":"#fff176","400":"#ffee58","500":"#ffeb3b","600":"#fdd835","700":"#fbc02d","800":"#f9a825","900":"#f57f17","a100":"#ffff8d","a200":"#ffff00","a400":"#ffea00","a700":"#ffd600"};
  3829. var amber = {"50":"#fff8e1","100":"#ffecb3","200":"#ffe082","300":"#ffd54f","400":"#ffca28","500":"#ffc107","600":"#ffb300","700":"#ffa000","800":"#ff8f00","900":"#ff6f00","a100":"#ffe57f","a200":"#ffd740","a400":"#ffc400","a700":"#ffab00"};
  3830. var orange = {"50":"#fff3e0","100":"#ffe0b2","200":"#ffcc80","300":"#ffb74d","400":"#ffa726","500":"#ff9800","600":"#fb8c00","700":"#f57c00","800":"#ef6c00","900":"#e65100","a100":"#ffd180","a200":"#ffab40","a400":"#ff9100","a700":"#ff6d00"};
  3831. var deepOrange = {"50":"#fbe9e7","100":"#ffccbc","200":"#ffab91","300":"#ff8a65","400":"#ff7043","500":"#ff5722","600":"#f4511e","700":"#e64a19","800":"#d84315","900":"#bf360c","a100":"#ff9e80","a200":"#ff6e40","a400":"#ff3d00","a700":"#dd2c00"};
  3832. var brown = {"50":"#efebe9","100":"#d7ccc8","200":"#bcaaa4","300":"#a1887f","400":"#8d6e63","500":"#795548","600":"#6d4c41","700":"#5d4037","800":"#4e342e","900":"#3e2723"};
  3833. var grey = {"50":"#fafafa","100":"#f5f5f5","200":"#eeeeee","300":"#e0e0e0","400":"#bdbdbd","500":"#9e9e9e","600":"#757575","700":"#616161","800":"#424242","900":"#212121"};
  3834. var blueGrey = {"50":"#eceff1","100":"#cfd8dc","200":"#b0bec5","300":"#90a4ae","400":"#78909c","500":"#607d8b","600":"#546e7a","700":"#455a64","800":"#37474f","900":"#263238"};
  3835. var darkText = {"primary":"rgba(0, 0, 0, 0.87)","secondary":"rgba(0, 0, 0, 0.54)","disabled":"rgba(0, 0, 0, 0.38)","dividers":"rgba(0, 0, 0, 0.12)"};
  3836. var lightText = {"primary":"rgba(255, 255, 255, 1)","secondary":"rgba(255, 255, 255, 0.7)","disabled":"rgba(255, 255, 255, 0.5)","dividers":"rgba(255, 255, 255, 0.12)"};
  3837. var darkIcons = {"active":"rgba(0, 0, 0, 0.54)","inactive":"rgba(0, 0, 0, 0.38)"};
  3838. var lightIcons = {"active":"rgba(255, 255, 255, 1)","inactive":"rgba(255, 255, 255, 0.5)"};
  3839. var white = "#ffffff";
  3840. var black = "#000000";
  3841. /* harmony default export */ __webpack_exports__["default"] = ({
  3842. red: red,
  3843. pink: pink,
  3844. purple: purple,
  3845. deepPurple: deepPurple,
  3846. indigo: indigo,
  3847. blue: blue,
  3848. lightBlue: lightBlue,
  3849. cyan: cyan,
  3850. teal: teal,
  3851. green: green,
  3852. lightGreen: lightGreen,
  3853. lime: lime,
  3854. yellow: yellow,
  3855. amber: amber,
  3856. orange: orange,
  3857. deepOrange: deepOrange,
  3858. brown: brown,
  3859. grey: grey,
  3860. blueGrey: blueGrey,
  3861. darkText: darkText,
  3862. lightText: lightText,
  3863. darkIcons: darkIcons,
  3864. lightIcons: lightIcons,
  3865. white: white,
  3866. black: black
  3867. });
  3868. /***/ }),
  3869. /* 51 */
  3870. /***/ (function(module, __webpack_exports__, __webpack_require__) {
  3871. "use strict";
  3872. var render = function() {
  3873. var _vm = this
  3874. var _h = _vm.$createElement
  3875. var _c = _vm._self._c || _h
  3876. return _c(
  3877. "div",
  3878. {
  3879. staticClass: "vc-swatches",
  3880. attrs: {
  3881. role: "application",
  3882. "aria-label": "Swatches color picker",
  3883. "data-pick": _vm.pick
  3884. }
  3885. },
  3886. [
  3887. _c(
  3888. "div",
  3889. { staticClass: "vc-swatches-box", attrs: { role: "listbox" } },
  3890. _vm._l(_vm.palette, function(group, $idx) {
  3891. return _c(
  3892. "div",
  3893. { key: $idx, staticClass: "vc-swatches-color-group" },
  3894. _vm._l(group, function(c) {
  3895. return _c(
  3896. "div",
  3897. {
  3898. key: c,
  3899. class: [
  3900. "vc-swatches-color-it",
  3901. { "vc-swatches-color--white": c === "#FFFFFF" }
  3902. ],
  3903. style: { background: c },
  3904. attrs: {
  3905. role: "option",
  3906. "aria-label": "Color:" + c,
  3907. "aria-selected": _vm.equal(c),
  3908. "data-color": c
  3909. },
  3910. on: {
  3911. click: function($event) {
  3912. _vm.handlerClick(c)
  3913. }
  3914. }
  3915. },
  3916. [
  3917. _c(
  3918. "div",
  3919. {
  3920. directives: [
  3921. {
  3922. name: "show",
  3923. rawName: "v-show",
  3924. value: _vm.equal(c),
  3925. expression: "equal(c)"
  3926. }
  3927. ],
  3928. staticClass: "vc-swatches-pick"
  3929. },
  3930. [
  3931. _c(
  3932. "svg",
  3933. {
  3934. staticStyle: { width: "24px", height: "24px" },
  3935. attrs: { viewBox: "0 0 24 24" }
  3936. },
  3937. [
  3938. _c("path", {
  3939. attrs: {
  3940. d:
  3941. "M21,7L9,19L3.5,13.5L4.91,12.09L9,16.17L19.59,5.59L21,7Z"
  3942. }
  3943. })
  3944. ]
  3945. )
  3946. ]
  3947. )
  3948. ]
  3949. )
  3950. })
  3951. )
  3952. })
  3953. )
  3954. ]
  3955. )
  3956. }
  3957. var staticRenderFns = []
  3958. render._withStripped = true
  3959. var esExports = { render: render, staticRenderFns: staticRenderFns }
  3960. /* harmony default export */ __webpack_exports__["a"] = (esExports);
  3961. if (false) {
  3962. module.hot.accept()
  3963. if (module.hot.data) {
  3964. require("vue-loader/node_modules/vue-hot-reload-api") .rerender("data-v-2395c5cc", esExports)
  3965. }
  3966. }
  3967. /***/ }),
  3968. /* 52 */
  3969. /***/ (function(module, __webpack_exports__, __webpack_require__) {
  3970. "use strict";
  3971. Object.defineProperty(__webpack_exports__, "__esModule", { value: true });
  3972. /* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__babel_loader_node_modules_vue_loader_lib_selector_type_script_index_0_Photoshop_vue__ = __webpack_require__(16);
  3973. /* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__babel_loader_node_modules_vue_loader_lib_selector_type_script_index_0_Photoshop_vue___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_0__babel_loader_node_modules_vue_loader_lib_selector_type_script_index_0_Photoshop_vue__);
  3974. /* harmony namespace reexport (unknown) */ for(var __WEBPACK_IMPORT_KEY__ in __WEBPACK_IMPORTED_MODULE_0__babel_loader_node_modules_vue_loader_lib_selector_type_script_index_0_Photoshop_vue__) if(__WEBPACK_IMPORT_KEY__ !== 'default') (function(key) { __webpack_require__.d(__webpack_exports__, key, function() { return __WEBPACK_IMPORTED_MODULE_0__babel_loader_node_modules_vue_loader_lib_selector_type_script_index_0_Photoshop_vue__[key]; }) }(__WEBPACK_IMPORT_KEY__));
  3975. /* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__node_modules_vue_loader_lib_template_compiler_index_id_data_v_797d57b0_hasScoped_false_buble_transforms_node_modules_vue_loader_lib_selector_type_template_index_0_Photoshop_vue__ = __webpack_require__(67);
  3976. var disposed = false
  3977. function injectStyle (ssrContext) {
  3978. if (disposed) return
  3979. __webpack_require__(53)
  3980. }
  3981. var normalizeComponent = __webpack_require__(2)
  3982. /* script */
  3983. /* template */
  3984. /* template functional */
  3985. var __vue_template_functional__ = false
  3986. /* styles */
  3987. var __vue_styles__ = injectStyle
  3988. /* scopeId */
  3989. var __vue_scopeId__ = null
  3990. /* moduleIdentifier (server only) */
  3991. var __vue_module_identifier__ = null
  3992. var Component = normalizeComponent(
  3993. __WEBPACK_IMPORTED_MODULE_0__babel_loader_node_modules_vue_loader_lib_selector_type_script_index_0_Photoshop_vue___default.a,
  3994. __WEBPACK_IMPORTED_MODULE_1__node_modules_vue_loader_lib_template_compiler_index_id_data_v_797d57b0_hasScoped_false_buble_transforms_node_modules_vue_loader_lib_selector_type_template_index_0_Photoshop_vue__["a" /* default */],
  3995. __vue_template_functional__,
  3996. __vue_styles__,
  3997. __vue_scopeId__,
  3998. __vue_module_identifier__
  3999. )
  4000. Component.options.__file = "src/components/Photoshop.vue"
  4001. /* hot reload */
  4002. if (false) {(function () {
  4003. var hotAPI = require("vue-loader/node_modules/vue-hot-reload-api")
  4004. hotAPI.install(require("vue"), false)
  4005. if (!hotAPI.compatible) return
  4006. module.hot.accept()
  4007. if (!module.hot.data) {
  4008. hotAPI.createRecord("data-v-797d57b0", Component.options)
  4009. } else {
  4010. hotAPI.reload("data-v-797d57b0", Component.options)
  4011. }
  4012. module.hot.dispose(function (data) {
  4013. disposed = true
  4014. })
  4015. })()}
  4016. /* harmony default export */ __webpack_exports__["default"] = (Component.exports);
  4017. /***/ }),
  4018. /* 53 */
  4019. /***/ (function(module, exports, __webpack_require__) {
  4020. // style-loader: Adds some css to the DOM by adding a <style> tag
  4021. // load the styles
  4022. var content = __webpack_require__(54);
  4023. if(typeof content === 'string') content = [[module.i, content, '']];
  4024. if(content.locals) module.exports = content.locals;
  4025. // add the styles to the DOM
  4026. var update = __webpack_require__(1)("080365d4", content, false, {});
  4027. // Hot Module Replacement
  4028. if(false) {
  4029. // When the styles change, update the <style> tags
  4030. if(!content.locals) {
  4031. module.hot.accept("!!../../node_modules/css-loader/index.js?{\"minimize\":false,\"sourceMap\":false}!../../node_modules/vue-loader/lib/style-compiler/index.js?{\"vue\":true,\"id\":\"data-v-797d57b0\",\"scoped\":false,\"hasInlineConfig\":false}!../../node_modules/vue-loader/lib/selector.js?type=styles&index=0!./Photoshop.vue", function() {
  4032. var newContent = require("!!../../node_modules/css-loader/index.js?{\"minimize\":false,\"sourceMap\":false}!../../node_modules/vue-loader/lib/style-compiler/index.js?{\"vue\":true,\"id\":\"data-v-797d57b0\",\"scoped\":false,\"hasInlineConfig\":false}!../../node_modules/vue-loader/lib/selector.js?type=styles&index=0!./Photoshop.vue");
  4033. if(typeof newContent === 'string') newContent = [[module.id, newContent, '']];
  4034. update(newContent);
  4035. });
  4036. }
  4037. // When the module is disposed, remove the <style> tags
  4038. module.hot.dispose(function() { update(); });
  4039. }
  4040. /***/ }),
  4041. /* 54 */
  4042. /***/ (function(module, exports, __webpack_require__) {
  4043. exports = module.exports = __webpack_require__(0)(false);
  4044. // imports
  4045. // module
  4046. exports.push([module.i, "\n.vc-photoshop {\n background: #DCDCDC;\n border-radius: 4px;\n box-shadow: 0 0 0 1px rgba(0,0,0,.25), 0 8px 16px rgba(0,0,0,.15);\n box-sizing: initial;\n width: 513px;\n font-family: Roboto;\n}\n.vc-photoshop__disable-fields {\n width: 390px;\n}\n.vc-ps-head {\n background-image: -webkit-linear-gradient(-180deg, #F0F0F0 0%, #D4D4D4 100%);\n border-bottom: 1px solid #B1B1B1;\n box-shadow: inset 0 1px 0 0 rgba(255,255,255,.2), inset 0 -1px 0 0 rgba(0,0,0,.02);\n height: 23px;\n line-height: 24px;\n border-radius: 4px 4px 0 0;\n font-size: 13px;\n color: #4D4D4D;\n text-align: center;\n}\n.vc-ps-body {\n padding: 15px;\n display: flex;\n}\n.vc-ps-saturation-wrap {\n width: 256px;\n height: 256px;\n position: relative;\n border: 2px solid #B3B3B3;\n border-bottom: 2px solid #F0F0F0;\n overflow: hidden;\n}\n.vc-ps-saturation-wrap .vc-saturation-circle {\n width: 12px;\n height: 12px;\n}\n.vc-ps-hue-wrap {\n position: relative;\n height: 256px;\n width: 19px;\n margin-left: 10px;\n border: 2px solid #B3B3B3;\n border-bottom: 2px solid #F0F0F0;\n}\n.vc-ps-hue-pointer {\n position: relative;\n}\n.vc-ps-hue-pointer--left,\n.vc-ps-hue-pointer--right {\n position: absolute;\n width: 0;\n height: 0;\n border-style: solid;\n border-width: 5px 0 5px 8px;\n border-color: transparent transparent transparent #555;\n}\n.vc-ps-hue-pointer--left:after,\n.vc-ps-hue-pointer--right:after {\n content: \"\";\n width: 0;\n height: 0;\n border-style: solid;\n border-width: 4px 0 4px 6px;\n border-color: transparent transparent transparent #fff;\n position: absolute;\n top: 1px;\n left: 1px;\n transform: translate(-8px, -5px);\n}\n.vc-ps-hue-pointer--left {\n transform: translate(-13px, -4px);\n}\n.vc-ps-hue-pointer--right {\n transform: translate(20px, -4px) rotate(180deg);\n}\n.vc-ps-controls {\n width: 180px;\n margin-left: 10px;\n display: flex;\n}\n.vc-ps-controls__disable-fields {\n width: auto;\n}\n.vc-ps-actions {\n margin-left: 20px;\n flex: 1;\n}\n.vc-ps-ac-btn {\n cursor: pointer;\n background-image: -webkit-linear-gradient(-180deg, #FFFFFF 0%, #E6E6E6 100%);\n border: 1px solid #878787;\n border-radius: 2px;\n height: 20px;\n box-shadow: 0 1px 0 0 #EAEAEA;\n font-size: 14px;\n color: #000;\n line-height: 20px;\n text-align: center;\n margin-bottom: 10px;\n}\n.vc-ps-previews {\n width: 60px;\n}\n.vc-ps-previews__swatches {\n border: 1px solid #B3B3B3;\n border-bottom: 1px solid #F0F0F0;\n margin-bottom: 2px;\n margin-top: 1px;\n}\n.vc-ps-previews__pr-color {\n height: 34px;\n box-shadow: inset 1px 0 0 #000, inset -1px 0 0 #000, inset 0 1px 0 #000;\n}\n.vc-ps-previews__label {\n font-size: 14px;\n color: #000;\n text-align: center;\n}\n.vc-ps-fields {\n padding-top: 5px;\n padding-bottom: 9px;\n width: 80px;\n position: relative;\n}\n.vc-ps-fields .vc-input__input {\n margin-left: 40%;\n width: 40%;\n height: 18px;\n border: 1px solid #888888;\n box-shadow: inset 0 1px 1px rgba(0,0,0,.1), 0 1px 0 0 #ECECEC;\n margin-bottom: 5px;\n font-size: 13px;\n padding-left: 3px;\n margin-right: 10px;\n}\n.vc-ps-fields .vc-input__label, .vc-ps-fields .vc-input__desc {\n top: 0;\n text-transform: uppercase;\n font-size: 13px;\n height: 18px;\n line-height: 22px;\n position: absolute;\n}\n.vc-ps-fields .vc-input__label {\n left: 0;\n width: 34px;\n}\n.vc-ps-fields .vc-input__desc {\n right: 0;\n width: 0;\n}\n.vc-ps-fields__divider {\n height: 5px;\n}\n.vc-ps-fields__hex .vc-input__input {\n margin-left: 20%;\n width: 80%;\n height: 18px;\n border: 1px solid #888888;\n box-shadow: inset 0 1px 1px rgba(0,0,0,.1), 0 1px 0 0 #ECECEC;\n margin-bottom: 6px;\n font-size: 13px;\n padding-left: 3px;\n}\n.vc-ps-fields__hex .vc-input__label {\n position: absolute;\n top: 0;\n left: 0;\n width: 14px;\n text-transform: uppercase;\n font-size: 13px;\n height: 18px;\n line-height: 22px;\n}\n", ""]);
  4047. // exports
  4048. /***/ }),
  4049. /* 55 */
  4050. /***/ (function(module, exports, __webpack_require__) {
  4051. // style-loader: Adds some css to the DOM by adding a <style> tag
  4052. // load the styles
  4053. var content = __webpack_require__(56);
  4054. if(typeof content === 'string') content = [[module.i, content, '']];
  4055. if(content.locals) module.exports = content.locals;
  4056. // add the styles to the DOM
  4057. var update = __webpack_require__(1)("b5380e52", content, false, {});
  4058. // Hot Module Replacement
  4059. if(false) {
  4060. // When the styles change, update the <style> tags
  4061. if(!content.locals) {
  4062. module.hot.accept("!!../../../node_modules/css-loader/index.js?{\"minimize\":false,\"sourceMap\":false}!../../../node_modules/vue-loader/lib/style-compiler/index.js?{\"vue\":true,\"id\":\"data-v-ba139894\",\"scoped\":false,\"hasInlineConfig\":false}!../../../node_modules/vue-loader/lib/selector.js?type=styles&index=0!./Saturation.vue", function() {
  4063. var newContent = require("!!../../../node_modules/css-loader/index.js?{\"minimize\":false,\"sourceMap\":false}!../../../node_modules/vue-loader/lib/style-compiler/index.js?{\"vue\":true,\"id\":\"data-v-ba139894\",\"scoped\":false,\"hasInlineConfig\":false}!../../../node_modules/vue-loader/lib/selector.js?type=styles&index=0!./Saturation.vue");
  4064. if(typeof newContent === 'string') newContent = [[module.id, newContent, '']];
  4065. update(newContent);
  4066. });
  4067. }
  4068. // When the module is disposed, remove the <style> tags
  4069. module.hot.dispose(function() { update(); });
  4070. }
  4071. /***/ }),
  4072. /* 56 */
  4073. /***/ (function(module, exports, __webpack_require__) {
  4074. exports = module.exports = __webpack_require__(0)(false);
  4075. // imports
  4076. // module
  4077. exports.push([module.i, "\n.vc-saturation,\n.vc-saturation--white,\n.vc-saturation--black {\n cursor: pointer;\n position: absolute;\n top: 0;\n left: 0;\n right: 0;\n bottom: 0;\n}\n.vc-saturation--white {\n background: -webkit-linear-gradient(left, #fff, rgba(255,255,255,0));\n}\n.vc-saturation--black {\n background: -webkit-linear-gradient(bottom, #000, rgba(0,0,0,0));\n}\n.vc-saturation-pointer {\n cursor: pointer;\n position: absolute;\n}\n.vc-saturation-circle {\n cursor: head;\n width: 4px;\n height: 4px;\n box-shadow: 0 0 0 1.5px #fff, inset 0 0 1px 1px rgba(0,0,0,.3), 0 0 1px 2px rgba(0,0,0,.4);\n border-radius: 50%;\n transform: translate(-2px, -2px);\n}\n", ""]);
  4078. // exports
  4079. /***/ }),
  4080. /* 57 */
  4081. /***/ (function(module, exports) {
  4082. module.exports = clamp
  4083. function clamp(value, min, max) {
  4084. return min < max
  4085. ? (value < min ? min : value > max ? max : value)
  4086. : (value < max ? max : value > min ? min : value)
  4087. }
  4088. /***/ }),
  4089. /* 58 */
  4090. /***/ (function(module, exports, __webpack_require__) {
  4091. /* WEBPACK VAR INJECTION */(function(global) {/**
  4092. * lodash (Custom Build) <https://lodash.com/>
  4093. * Build: `lodash modularize exports="npm" -o ./`
  4094. * Copyright jQuery Foundation and other contributors <https://jquery.org/>
  4095. * Released under MIT license <https://lodash.com/license>
  4096. * Based on Underscore.js 1.8.3 <http://underscorejs.org/LICENSE>
  4097. * Copyright Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors
  4098. */
  4099. /** Used as the `TypeError` message for "Functions" methods. */
  4100. var FUNC_ERROR_TEXT = 'Expected a function';
  4101. /** Used as references for various `Number` constants. */
  4102. var NAN = 0 / 0;
  4103. /** `Object#toString` result references. */
  4104. var symbolTag = '[object Symbol]';
  4105. /** Used to match leading and trailing whitespace. */
  4106. var reTrim = /^\s+|\s+$/g;
  4107. /** Used to detect bad signed hexadecimal string values. */
  4108. var reIsBadHex = /^[-+]0x[0-9a-f]+$/i;
  4109. /** Used to detect binary string values. */
  4110. var reIsBinary = /^0b[01]+$/i;
  4111. /** Used to detect octal string values. */
  4112. var reIsOctal = /^0o[0-7]+$/i;
  4113. /** Built-in method references without a dependency on `root`. */
  4114. var freeParseInt = parseInt;
  4115. /** Detect free variable `global` from Node.js. */
  4116. var freeGlobal = typeof global == 'object' && global && global.Object === Object && global;
  4117. /** Detect free variable `self`. */
  4118. var freeSelf = typeof self == 'object' && self && self.Object === Object && self;
  4119. /** Used as a reference to the global object. */
  4120. var root = freeGlobal || freeSelf || Function('return this')();
  4121. /** Used for built-in method references. */
  4122. var objectProto = Object.prototype;
  4123. /**
  4124. * Used to resolve the
  4125. * [`toStringTag`](http://ecma-international.org/ecma-262/7.0/#sec-object.prototype.tostring)
  4126. * of values.
  4127. */
  4128. var objectToString = objectProto.toString;
  4129. /* Built-in method references for those with the same name as other `lodash` methods. */
  4130. var nativeMax = Math.max,
  4131. nativeMin = Math.min;
  4132. /**
  4133. * Gets the timestamp of the number of milliseconds that have elapsed since
  4134. * the Unix epoch (1 January 1970 00:00:00 UTC).
  4135. *
  4136. * @static
  4137. * @memberOf _
  4138. * @since 2.4.0
  4139. * @category Date
  4140. * @returns {number} Returns the timestamp.
  4141. * @example
  4142. *
  4143. * _.defer(function(stamp) {
  4144. * console.log(_.now() - stamp);
  4145. * }, _.now());
  4146. * // => Logs the number of milliseconds it took for the deferred invocation.
  4147. */
  4148. var now = function() {
  4149. return root.Date.now();
  4150. };
  4151. /**
  4152. * Creates a debounced function that delays invoking `func` until after `wait`
  4153. * milliseconds have elapsed since the last time the debounced function was
  4154. * invoked. The debounced function comes with a `cancel` method to cancel
  4155. * delayed `func` invocations and a `flush` method to immediately invoke them.
  4156. * Provide `options` to indicate whether `func` should be invoked on the
  4157. * leading and/or trailing edge of the `wait` timeout. The `func` is invoked
  4158. * with the last arguments provided to the debounced function. Subsequent
  4159. * calls to the debounced function return the result of the last `func`
  4160. * invocation.
  4161. *
  4162. * **Note:** If `leading` and `trailing` options are `true`, `func` is
  4163. * invoked on the trailing edge of the timeout only if the debounced function
  4164. * is invoked more than once during the `wait` timeout.
  4165. *
  4166. * If `wait` is `0` and `leading` is `false`, `func` invocation is deferred
  4167. * until to the next tick, similar to `setTimeout` with a timeout of `0`.
  4168. *
  4169. * See [David Corbacho's article](https://css-tricks.com/debouncing-throttling-explained-examples/)
  4170. * for details over the differences between `_.debounce` and `_.throttle`.
  4171. *
  4172. * @static
  4173. * @memberOf _
  4174. * @since 0.1.0
  4175. * @category Function
  4176. * @param {Function} func The function to debounce.
  4177. * @param {number} [wait=0] The number of milliseconds to delay.
  4178. * @param {Object} [options={}] The options object.
  4179. * @param {boolean} [options.leading=false]
  4180. * Specify invoking on the leading edge of the timeout.
  4181. * @param {number} [options.maxWait]
  4182. * The maximum time `func` is allowed to be delayed before it's invoked.
  4183. * @param {boolean} [options.trailing=true]
  4184. * Specify invoking on the trailing edge of the timeout.
  4185. * @returns {Function} Returns the new debounced function.
  4186. * @example
  4187. *
  4188. * // Avoid costly calculations while the window size is in flux.
  4189. * jQuery(window).on('resize', _.debounce(calculateLayout, 150));
  4190. *
  4191. * // Invoke `sendMail` when clicked, debouncing subsequent calls.
  4192. * jQuery(element).on('click', _.debounce(sendMail, 300, {
  4193. * 'leading': true,
  4194. * 'trailing': false
  4195. * }));
  4196. *
  4197. * // Ensure `batchLog` is invoked once after 1 second of debounced calls.
  4198. * var debounced = _.debounce(batchLog, 250, { 'maxWait': 1000 });
  4199. * var source = new EventSource('/stream');
  4200. * jQuery(source).on('message', debounced);
  4201. *
  4202. * // Cancel the trailing debounced invocation.
  4203. * jQuery(window).on('popstate', debounced.cancel);
  4204. */
  4205. function debounce(func, wait, options) {
  4206. var lastArgs,
  4207. lastThis,
  4208. maxWait,
  4209. result,
  4210. timerId,
  4211. lastCallTime,
  4212. lastInvokeTime = 0,
  4213. leading = false,
  4214. maxing = false,
  4215. trailing = true;
  4216. if (typeof func != 'function') {
  4217. throw new TypeError(FUNC_ERROR_TEXT);
  4218. }
  4219. wait = toNumber(wait) || 0;
  4220. if (isObject(options)) {
  4221. leading = !!options.leading;
  4222. maxing = 'maxWait' in options;
  4223. maxWait = maxing ? nativeMax(toNumber(options.maxWait) || 0, wait) : maxWait;
  4224. trailing = 'trailing' in options ? !!options.trailing : trailing;
  4225. }
  4226. function invokeFunc(time) {
  4227. var args = lastArgs,
  4228. thisArg = lastThis;
  4229. lastArgs = lastThis = undefined;
  4230. lastInvokeTime = time;
  4231. result = func.apply(thisArg, args);
  4232. return result;
  4233. }
  4234. function leadingEdge(time) {
  4235. // Reset any `maxWait` timer.
  4236. lastInvokeTime = time;
  4237. // Start the timer for the trailing edge.
  4238. timerId = setTimeout(timerExpired, wait);
  4239. // Invoke the leading edge.
  4240. return leading ? invokeFunc(time) : result;
  4241. }
  4242. function remainingWait(time) {
  4243. var timeSinceLastCall = time - lastCallTime,
  4244. timeSinceLastInvoke = time - lastInvokeTime,
  4245. result = wait - timeSinceLastCall;
  4246. return maxing ? nativeMin(result, maxWait - timeSinceLastInvoke) : result;
  4247. }
  4248. function shouldInvoke(time) {
  4249. var timeSinceLastCall = time - lastCallTime,
  4250. timeSinceLastInvoke = time - lastInvokeTime;
  4251. // Either this is the first call, activity has stopped and we're at the
  4252. // trailing edge, the system time has gone backwards and we're treating
  4253. // it as the trailing edge, or we've hit the `maxWait` limit.
  4254. return (lastCallTime === undefined || (timeSinceLastCall >= wait) ||
  4255. (timeSinceLastCall < 0) || (maxing && timeSinceLastInvoke >= maxWait));
  4256. }
  4257. function timerExpired() {
  4258. var time = now();
  4259. if (shouldInvoke(time)) {
  4260. return trailingEdge(time);
  4261. }
  4262. // Restart the timer.
  4263. timerId = setTimeout(timerExpired, remainingWait(time));
  4264. }
  4265. function trailingEdge(time) {
  4266. timerId = undefined;
  4267. // Only invoke if we have `lastArgs` which means `func` has been
  4268. // debounced at least once.
  4269. if (trailing && lastArgs) {
  4270. return invokeFunc(time);
  4271. }
  4272. lastArgs = lastThis = undefined;
  4273. return result;
  4274. }
  4275. function cancel() {
  4276. if (timerId !== undefined) {
  4277. clearTimeout(timerId);
  4278. }
  4279. lastInvokeTime = 0;
  4280. lastArgs = lastCallTime = lastThis = timerId = undefined;
  4281. }
  4282. function flush() {
  4283. return timerId === undefined ? result : trailingEdge(now());
  4284. }
  4285. function debounced() {
  4286. var time = now(),
  4287. isInvoking = shouldInvoke(time);
  4288. lastArgs = arguments;
  4289. lastThis = this;
  4290. lastCallTime = time;
  4291. if (isInvoking) {
  4292. if (timerId === undefined) {
  4293. return leadingEdge(lastCallTime);
  4294. }
  4295. if (maxing) {
  4296. // Handle invocations in a tight loop.
  4297. timerId = setTimeout(timerExpired, wait);
  4298. return invokeFunc(lastCallTime);
  4299. }
  4300. }
  4301. if (timerId === undefined) {
  4302. timerId = setTimeout(timerExpired, wait);
  4303. }
  4304. return result;
  4305. }
  4306. debounced.cancel = cancel;
  4307. debounced.flush = flush;
  4308. return debounced;
  4309. }
  4310. /**
  4311. * Creates a throttled function that only invokes `func` at most once per
  4312. * every `wait` milliseconds. The throttled function comes with a `cancel`
  4313. * method to cancel delayed `func` invocations and a `flush` method to
  4314. * immediately invoke them. Provide `options` to indicate whether `func`
  4315. * should be invoked on the leading and/or trailing edge of the `wait`
  4316. * timeout. The `func` is invoked with the last arguments provided to the
  4317. * throttled function. Subsequent calls to the throttled function return the
  4318. * result of the last `func` invocation.
  4319. *
  4320. * **Note:** If `leading` and `trailing` options are `true`, `func` is
  4321. * invoked on the trailing edge of the timeout only if the throttled function
  4322. * is invoked more than once during the `wait` timeout.
  4323. *
  4324. * If `wait` is `0` and `leading` is `false`, `func` invocation is deferred
  4325. * until to the next tick, similar to `setTimeout` with a timeout of `0`.
  4326. *
  4327. * See [David Corbacho's article](https://css-tricks.com/debouncing-throttling-explained-examples/)
  4328. * for details over the differences between `_.throttle` and `_.debounce`.
  4329. *
  4330. * @static
  4331. * @memberOf _
  4332. * @since 0.1.0
  4333. * @category Function
  4334. * @param {Function} func The function to throttle.
  4335. * @param {number} [wait=0] The number of milliseconds to throttle invocations to.
  4336. * @param {Object} [options={}] The options object.
  4337. * @param {boolean} [options.leading=true]
  4338. * Specify invoking on the leading edge of the timeout.
  4339. * @param {boolean} [options.trailing=true]
  4340. * Specify invoking on the trailing edge of the timeout.
  4341. * @returns {Function} Returns the new throttled function.
  4342. * @example
  4343. *
  4344. * // Avoid excessively updating the position while scrolling.
  4345. * jQuery(window).on('scroll', _.throttle(updatePosition, 100));
  4346. *
  4347. * // Invoke `renewToken` when the click event is fired, but not more than once every 5 minutes.
  4348. * var throttled = _.throttle(renewToken, 300000, { 'trailing': false });
  4349. * jQuery(element).on('click', throttled);
  4350. *
  4351. * // Cancel the trailing throttled invocation.
  4352. * jQuery(window).on('popstate', throttled.cancel);
  4353. */
  4354. function throttle(func, wait, options) {
  4355. var leading = true,
  4356. trailing = true;
  4357. if (typeof func != 'function') {
  4358. throw new TypeError(FUNC_ERROR_TEXT);
  4359. }
  4360. if (isObject(options)) {
  4361. leading = 'leading' in options ? !!options.leading : leading;
  4362. trailing = 'trailing' in options ? !!options.trailing : trailing;
  4363. }
  4364. return debounce(func, wait, {
  4365. 'leading': leading,
  4366. 'maxWait': wait,
  4367. 'trailing': trailing
  4368. });
  4369. }
  4370. /**
  4371. * Checks if `value` is the
  4372. * [language type](http://www.ecma-international.org/ecma-262/7.0/#sec-ecmascript-language-types)
  4373. * of `Object`. (e.g. arrays, functions, objects, regexes, `new Number(0)`, and `new String('')`)
  4374. *
  4375. * @static
  4376. * @memberOf _
  4377. * @since 0.1.0
  4378. * @category Lang
  4379. * @param {*} value The value to check.
  4380. * @returns {boolean} Returns `true` if `value` is an object, else `false`.
  4381. * @example
  4382. *
  4383. * _.isObject({});
  4384. * // => true
  4385. *
  4386. * _.isObject([1, 2, 3]);
  4387. * // => true
  4388. *
  4389. * _.isObject(_.noop);
  4390. * // => true
  4391. *
  4392. * _.isObject(null);
  4393. * // => false
  4394. */
  4395. function isObject(value) {
  4396. var type = typeof value;
  4397. return !!value && (type == 'object' || type == 'function');
  4398. }
  4399. /**
  4400. * Checks if `value` is object-like. A value is object-like if it's not `null`
  4401. * and has a `typeof` result of "object".
  4402. *
  4403. * @static
  4404. * @memberOf _
  4405. * @since 4.0.0
  4406. * @category Lang
  4407. * @param {*} value The value to check.
  4408. * @returns {boolean} Returns `true` if `value` is object-like, else `false`.
  4409. * @example
  4410. *
  4411. * _.isObjectLike({});
  4412. * // => true
  4413. *
  4414. * _.isObjectLike([1, 2, 3]);
  4415. * // => true
  4416. *
  4417. * _.isObjectLike(_.noop);
  4418. * // => false
  4419. *
  4420. * _.isObjectLike(null);
  4421. * // => false
  4422. */
  4423. function isObjectLike(value) {
  4424. return !!value && typeof value == 'object';
  4425. }
  4426. /**
  4427. * Checks if `value` is classified as a `Symbol` primitive or object.
  4428. *
  4429. * @static
  4430. * @memberOf _
  4431. * @since 4.0.0
  4432. * @category Lang
  4433. * @param {*} value The value to check.
  4434. * @returns {boolean} Returns `true` if `value` is a symbol, else `false`.
  4435. * @example
  4436. *
  4437. * _.isSymbol(Symbol.iterator);
  4438. * // => true
  4439. *
  4440. * _.isSymbol('abc');
  4441. * // => false
  4442. */
  4443. function isSymbol(value) {
  4444. return typeof value == 'symbol' ||
  4445. (isObjectLike(value) && objectToString.call(value) == symbolTag);
  4446. }
  4447. /**
  4448. * Converts `value` to a number.
  4449. *
  4450. * @static
  4451. * @memberOf _
  4452. * @since 4.0.0
  4453. * @category Lang
  4454. * @param {*} value The value to process.
  4455. * @returns {number} Returns the number.
  4456. * @example
  4457. *
  4458. * _.toNumber(3.2);
  4459. * // => 3.2
  4460. *
  4461. * _.toNumber(Number.MIN_VALUE);
  4462. * // => 5e-324
  4463. *
  4464. * _.toNumber(Infinity);
  4465. * // => Infinity
  4466. *
  4467. * _.toNumber('3.2');
  4468. * // => 3.2
  4469. */
  4470. function toNumber(value) {
  4471. if (typeof value == 'number') {
  4472. return value;
  4473. }
  4474. if (isSymbol(value)) {
  4475. return NAN;
  4476. }
  4477. if (isObject(value)) {
  4478. var other = typeof value.valueOf == 'function' ? value.valueOf() : value;
  4479. value = isObject(other) ? (other + '') : other;
  4480. }
  4481. if (typeof value != 'string') {
  4482. return value === 0 ? value : +value;
  4483. }
  4484. value = value.replace(reTrim, '');
  4485. var isBinary = reIsBinary.test(value);
  4486. return (isBinary || reIsOctal.test(value))
  4487. ? freeParseInt(value.slice(2), isBinary ? 2 : 8)
  4488. : (reIsBadHex.test(value) ? NAN : +value);
  4489. }
  4490. module.exports = throttle;
  4491. /* WEBPACK VAR INJECTION */}.call(exports, __webpack_require__(59)))
  4492. /***/ }),
  4493. /* 59 */
  4494. /***/ (function(module, exports) {
  4495. var g;
  4496. // This works in non-strict mode
  4497. g = (function() {
  4498. return this;
  4499. })();
  4500. try {
  4501. // This works if eval is allowed (see CSP)
  4502. g = g || Function("return this")() || (1,eval)("this");
  4503. } catch(e) {
  4504. // This works if the window reference is available
  4505. if(typeof window === "object")
  4506. g = window;
  4507. }
  4508. // g can still be undefined, but nothing to do about it...
  4509. // We return undefined, instead of nothing here, so it's
  4510. // easier to handle this case. if(!global) { ...}
  4511. module.exports = g;
  4512. /***/ }),
  4513. /* 60 */
  4514. /***/ (function(module, __webpack_exports__, __webpack_require__) {
  4515. "use strict";
  4516. var render = function() {
  4517. var _vm = this
  4518. var _h = _vm.$createElement
  4519. var _c = _vm._self._c || _h
  4520. return _c(
  4521. "div",
  4522. {
  4523. ref: "container",
  4524. staticClass: "vc-saturation",
  4525. style: { background: _vm.bgColor },
  4526. on: {
  4527. mousedown: _vm.handleMouseDown,
  4528. touchmove: _vm.handleChange,
  4529. touchstart: _vm.handleChange
  4530. }
  4531. },
  4532. [
  4533. _c("div", { staticClass: "vc-saturation--white" }),
  4534. _vm._v(" "),
  4535. _c("div", { staticClass: "vc-saturation--black" }),
  4536. _vm._v(" "),
  4537. _c(
  4538. "div",
  4539. {
  4540. staticClass: "vc-saturation-pointer",
  4541. style: { top: _vm.pointerTop, left: _vm.pointerLeft }
  4542. },
  4543. [_c("div", { staticClass: "vc-saturation-circle" })]
  4544. )
  4545. ]
  4546. )
  4547. }
  4548. var staticRenderFns = []
  4549. render._withStripped = true
  4550. var esExports = { render: render, staticRenderFns: staticRenderFns }
  4551. /* harmony default export */ __webpack_exports__["a"] = (esExports);
  4552. if (false) {
  4553. module.hot.accept()
  4554. if (module.hot.data) {
  4555. require("vue-loader/node_modules/vue-hot-reload-api") .rerender("data-v-ba139894", esExports)
  4556. }
  4557. }
  4558. /***/ }),
  4559. /* 61 */
  4560. /***/ (function(module, exports, __webpack_require__) {
  4561. // style-loader: Adds some css to the DOM by adding a <style> tag
  4562. // load the styles
  4563. var content = __webpack_require__(62);
  4564. if(typeof content === 'string') content = [[module.i, content, '']];
  4565. if(content.locals) module.exports = content.locals;
  4566. // add the styles to the DOM
  4567. var update = __webpack_require__(1)("4dc1b086", content, false, {});
  4568. // Hot Module Replacement
  4569. if(false) {
  4570. // When the styles change, update the <style> tags
  4571. if(!content.locals) {
  4572. module.hot.accept("!!../../../node_modules/css-loader/index.js?{\"minimize\":false,\"sourceMap\":false}!../../../node_modules/vue-loader/lib/style-compiler/index.js?{\"vue\":true,\"id\":\"data-v-1af1f1ac\",\"scoped\":false,\"hasInlineConfig\":false}!../../../node_modules/vue-loader/lib/selector.js?type=styles&index=0!./Alpha.vue", function() {
  4573. var newContent = require("!!../../../node_modules/css-loader/index.js?{\"minimize\":false,\"sourceMap\":false}!../../../node_modules/vue-loader/lib/style-compiler/index.js?{\"vue\":true,\"id\":\"data-v-1af1f1ac\",\"scoped\":false,\"hasInlineConfig\":false}!../../../node_modules/vue-loader/lib/selector.js?type=styles&index=0!./Alpha.vue");
  4574. if(typeof newContent === 'string') newContent = [[module.id, newContent, '']];
  4575. update(newContent);
  4576. });
  4577. }
  4578. // When the module is disposed, remove the <style> tags
  4579. module.hot.dispose(function() { update(); });
  4580. }
  4581. /***/ }),
  4582. /* 62 */
  4583. /***/ (function(module, exports, __webpack_require__) {
  4584. exports = module.exports = __webpack_require__(0)(false);
  4585. // imports
  4586. // module
  4587. exports.push([module.i, "\n.vc-alpha {\n position: absolute;\n top: 0px;\n right: 0px;\n bottom: 0px;\n left: 0px;\n}\n.vc-alpha-checkboard-wrap {\n position: absolute;\n top: 0px;\n right: 0px;\n bottom: 0px;\n left: 0px;\n overflow: hidden;\n}\n.vc-alpha-gradient {\n position: absolute;\n top: 0px;\n right: 0px;\n bottom: 0px;\n left: 0px;\n}\n.vc-alpha-container {\n cursor: pointer;\n position: relative;\n z-index: 2;\n height: 100%;\n margin: 0 3px;\n}\n.vc-alpha-pointer {\n z-index: 2;\n position: absolute;\n}\n.vc-alpha-picker {\n cursor: pointer;\n width: 4px;\n border-radius: 1px;\n height: 8px;\n box-shadow: 0 0 2px rgba(0, 0, 0, .6);\n background: #fff;\n margin-top: 1px;\n transform: translateX(-2px);\n}\n", ""]);
  4588. // exports
  4589. /***/ }),
  4590. /* 63 */
  4591. /***/ (function(module, exports, __webpack_require__) {
  4592. // style-loader: Adds some css to the DOM by adding a <style> tag
  4593. // load the styles
  4594. var content = __webpack_require__(64);
  4595. if(typeof content === 'string') content = [[module.i, content, '']];
  4596. if(content.locals) module.exports = content.locals;
  4597. // add the styles to the DOM
  4598. var update = __webpack_require__(1)("7e15c05b", content, false, {});
  4599. // Hot Module Replacement
  4600. if(false) {
  4601. // When the styles change, update the <style> tags
  4602. if(!content.locals) {
  4603. module.hot.accept("!!../../../node_modules/css-loader/index.js?{\"minimize\":false,\"sourceMap\":false}!../../../node_modules/vue-loader/lib/style-compiler/index.js?{\"vue\":true,\"id\":\"data-v-5b6dc0c2\",\"scoped\":false,\"hasInlineConfig\":false}!../../../node_modules/vue-loader/lib/selector.js?type=styles&index=0!./Checkboard.vue", function() {
  4604. var newContent = require("!!../../../node_modules/css-loader/index.js?{\"minimize\":false,\"sourceMap\":false}!../../../node_modules/vue-loader/lib/style-compiler/index.js?{\"vue\":true,\"id\":\"data-v-5b6dc0c2\",\"scoped\":false,\"hasInlineConfig\":false}!../../../node_modules/vue-loader/lib/selector.js?type=styles&index=0!./Checkboard.vue");
  4605. if(typeof newContent === 'string') newContent = [[module.id, newContent, '']];
  4606. update(newContent);
  4607. });
  4608. }
  4609. // When the module is disposed, remove the <style> tags
  4610. module.hot.dispose(function() { update(); });
  4611. }
  4612. /***/ }),
  4613. /* 64 */
  4614. /***/ (function(module, exports, __webpack_require__) {
  4615. exports = module.exports = __webpack_require__(0)(false);
  4616. // imports
  4617. // module
  4618. exports.push([module.i, "\n.vc-checkerboard {\n position: absolute;\n top: 0px;\n right: 0px;\n bottom: 0px;\n left: 0px;\n background-size: contain;\n}\n", ""]);
  4619. // exports
  4620. /***/ }),
  4621. /* 65 */
  4622. /***/ (function(module, __webpack_exports__, __webpack_require__) {
  4623. "use strict";
  4624. var render = function() {
  4625. var _vm = this
  4626. var _h = _vm.$createElement
  4627. var _c = _vm._self._c || _h
  4628. return _c("div", { staticClass: "vc-checkerboard", style: _vm.bgStyle })
  4629. }
  4630. var staticRenderFns = []
  4631. render._withStripped = true
  4632. var esExports = { render: render, staticRenderFns: staticRenderFns }
  4633. /* harmony default export */ __webpack_exports__["a"] = (esExports);
  4634. if (false) {
  4635. module.hot.accept()
  4636. if (module.hot.data) {
  4637. require("vue-loader/node_modules/vue-hot-reload-api") .rerender("data-v-5b6dc0c2", esExports)
  4638. }
  4639. }
  4640. /***/ }),
  4641. /* 66 */
  4642. /***/ (function(module, __webpack_exports__, __webpack_require__) {
  4643. "use strict";
  4644. var render = function() {
  4645. var _vm = this
  4646. var _h = _vm.$createElement
  4647. var _c = _vm._self._c || _h
  4648. return _c("div", { staticClass: "vc-alpha" }, [
  4649. _c(
  4650. "div",
  4651. { staticClass: "vc-alpha-checkboard-wrap" },
  4652. [_c("checkboard")],
  4653. 1
  4654. ),
  4655. _vm._v(" "),
  4656. _c("div", {
  4657. staticClass: "vc-alpha-gradient",
  4658. style: { background: _vm.gradientColor }
  4659. }),
  4660. _vm._v(" "),
  4661. _c(
  4662. "div",
  4663. {
  4664. ref: "container",
  4665. staticClass: "vc-alpha-container",
  4666. on: {
  4667. mousedown: _vm.handleMouseDown,
  4668. touchmove: _vm.handleChange,
  4669. touchstart: _vm.handleChange
  4670. }
  4671. },
  4672. [
  4673. _c(
  4674. "div",
  4675. {
  4676. staticClass: "vc-alpha-pointer",
  4677. style: { left: _vm.colors.a * 100 + "%" }
  4678. },
  4679. [_c("div", { staticClass: "vc-alpha-picker" })]
  4680. )
  4681. ]
  4682. )
  4683. ])
  4684. }
  4685. var staticRenderFns = []
  4686. render._withStripped = true
  4687. var esExports = { render: render, staticRenderFns: staticRenderFns }
  4688. /* harmony default export */ __webpack_exports__["a"] = (esExports);
  4689. if (false) {
  4690. module.hot.accept()
  4691. if (module.hot.data) {
  4692. require("vue-loader/node_modules/vue-hot-reload-api") .rerender("data-v-1af1f1ac", esExports)
  4693. }
  4694. }
  4695. /***/ }),
  4696. /* 67 */
  4697. /***/ (function(module, __webpack_exports__, __webpack_require__) {
  4698. "use strict";
  4699. var render = function() {
  4700. var _vm = this
  4701. var _h = _vm.$createElement
  4702. var _c = _vm._self._c || _h
  4703. return _c(
  4704. "div",
  4705. {
  4706. class: [
  4707. "vc-photoshop",
  4708. _vm.disableFields ? "vc-photoshop__disable-fields" : ""
  4709. ],
  4710. attrs: { role: "application", "aria-label": "PhotoShop color picker" }
  4711. },
  4712. [
  4713. _c("div", { staticClass: "vc-ps-head", attrs: { role: "heading" } }, [
  4714. _vm._v(_vm._s(_vm.head))
  4715. ]),
  4716. _vm._v(" "),
  4717. _c("div", { staticClass: "vc-ps-body" }, [
  4718. _c(
  4719. "div",
  4720. { staticClass: "vc-ps-saturation-wrap" },
  4721. [
  4722. _c("saturation", {
  4723. on: { change: _vm.childChange },
  4724. model: {
  4725. value: _vm.colors,
  4726. callback: function($$v) {
  4727. _vm.colors = $$v
  4728. },
  4729. expression: "colors"
  4730. }
  4731. })
  4732. ],
  4733. 1
  4734. ),
  4735. _vm._v(" "),
  4736. _c(
  4737. "div",
  4738. { staticClass: "vc-ps-hue-wrap" },
  4739. [
  4740. _c(
  4741. "hue",
  4742. {
  4743. attrs: { direction: "vertical" },
  4744. on: { change: _vm.childChange },
  4745. model: {
  4746. value: _vm.colors,
  4747. callback: function($$v) {
  4748. _vm.colors = $$v
  4749. },
  4750. expression: "colors"
  4751. }
  4752. },
  4753. [
  4754. _c("div", { staticClass: "vc-ps-hue-pointer" }, [
  4755. _c("i", { staticClass: "vc-ps-hue-pointer--left" }),
  4756. _c("i", { staticClass: "vc-ps-hue-pointer--right" })
  4757. ])
  4758. ]
  4759. )
  4760. ],
  4761. 1
  4762. ),
  4763. _vm._v(" "),
  4764. _c(
  4765. "div",
  4766. {
  4767. class: [
  4768. "vc-ps-controls",
  4769. _vm.disableFields ? "vc-ps-controls__disable-fields" : ""
  4770. ]
  4771. },
  4772. [
  4773. _c("div", { staticClass: "vc-ps-previews" }, [
  4774. _c("div", { staticClass: "vc-ps-previews__label" }, [
  4775. _vm._v(_vm._s(_vm.newLabel))
  4776. ]),
  4777. _vm._v(" "),
  4778. _c("div", { staticClass: "vc-ps-previews__swatches" }, [
  4779. _c("div", {
  4780. staticClass: "vc-ps-previews__pr-color",
  4781. style: { background: _vm.colors.hex },
  4782. attrs: { "aria-label": "New color is " + _vm.colors.hex }
  4783. }),
  4784. _vm._v(" "),
  4785. _c("div", {
  4786. staticClass: "vc-ps-previews__pr-color",
  4787. style: { background: _vm.currentColor },
  4788. attrs: {
  4789. "aria-label": "Current color is " + _vm.currentColor
  4790. },
  4791. on: { click: _vm.clickCurrentColor }
  4792. })
  4793. ]),
  4794. _vm._v(" "),
  4795. _c("div", { staticClass: "vc-ps-previews__label" }, [
  4796. _vm._v(_vm._s(_vm.currentLabel))
  4797. ])
  4798. ]),
  4799. _vm._v(" "),
  4800. !_vm.disableFields
  4801. ? _c("div", { staticClass: "vc-ps-actions" }, [
  4802. _c(
  4803. "div",
  4804. {
  4805. staticClass: "vc-ps-ac-btn",
  4806. attrs: { role: "button", "aria-label": _vm.acceptLabel },
  4807. on: { click: _vm.handleAccept }
  4808. },
  4809. [_vm._v(_vm._s(_vm.acceptLabel))]
  4810. ),
  4811. _vm._v(" "),
  4812. _c(
  4813. "div",
  4814. {
  4815. staticClass: "vc-ps-ac-btn",
  4816. attrs: { role: "button", "aria-label": _vm.cancelLabel },
  4817. on: { click: _vm.handleCancel }
  4818. },
  4819. [_vm._v(_vm._s(_vm.cancelLabel))]
  4820. ),
  4821. _vm._v(" "),
  4822. _c(
  4823. "div",
  4824. { staticClass: "vc-ps-fields" },
  4825. [
  4826. _c("ed-in", {
  4827. attrs: { label: "h", desc: "°", value: _vm.hsv.h },
  4828. on: { change: _vm.inputChange }
  4829. }),
  4830. _vm._v(" "),
  4831. _c("ed-in", {
  4832. attrs: {
  4833. label: "s",
  4834. desc: "%",
  4835. value: _vm.hsv.s,
  4836. max: 100
  4837. },
  4838. on: { change: _vm.inputChange }
  4839. }),
  4840. _vm._v(" "),
  4841. _c("ed-in", {
  4842. attrs: {
  4843. label: "v",
  4844. desc: "%",
  4845. value: _vm.hsv.v,
  4846. max: 100
  4847. },
  4848. on: { change: _vm.inputChange }
  4849. }),
  4850. _vm._v(" "),
  4851. _c("div", { staticClass: "vc-ps-fields__divider" }),
  4852. _vm._v(" "),
  4853. _c("ed-in", {
  4854. attrs: { label: "r", value: _vm.colors.rgba.r },
  4855. on: { change: _vm.inputChange }
  4856. }),
  4857. _vm._v(" "),
  4858. _c("ed-in", {
  4859. attrs: { label: "g", value: _vm.colors.rgba.g },
  4860. on: { change: _vm.inputChange }
  4861. }),
  4862. _vm._v(" "),
  4863. _c("ed-in", {
  4864. attrs: { label: "b", value: _vm.colors.rgba.b },
  4865. on: { change: _vm.inputChange }
  4866. }),
  4867. _vm._v(" "),
  4868. _c("div", { staticClass: "vc-ps-fields__divider" }),
  4869. _vm._v(" "),
  4870. _c("ed-in", {
  4871. staticClass: "vc-ps-fields__hex",
  4872. attrs: { label: "#", value: _vm.hex },
  4873. on: { change: _vm.inputChange }
  4874. })
  4875. ],
  4876. 1
  4877. ),
  4878. _vm._v(" "),
  4879. _vm.hasResetButton
  4880. ? _c(
  4881. "div",
  4882. {
  4883. staticClass: "vc-ps-ac-btn",
  4884. attrs: { "aria-label": "reset" },
  4885. on: { click: _vm.handleReset }
  4886. },
  4887. [_vm._v(_vm._s(_vm.resetLabel))]
  4888. )
  4889. : _vm._e()
  4890. ])
  4891. : _vm._e()
  4892. ]
  4893. )
  4894. ])
  4895. ]
  4896. )
  4897. }
  4898. var staticRenderFns = []
  4899. render._withStripped = true
  4900. var esExports = { render: render, staticRenderFns: staticRenderFns }
  4901. /* harmony default export */ __webpack_exports__["a"] = (esExports);
  4902. if (false) {
  4903. module.hot.accept()
  4904. if (module.hot.data) {
  4905. require("vue-loader/node_modules/vue-hot-reload-api") .rerender("data-v-797d57b0", esExports)
  4906. }
  4907. }
  4908. /***/ }),
  4909. /* 68 */
  4910. /***/ (function(module, __webpack_exports__, __webpack_require__) {
  4911. "use strict";
  4912. Object.defineProperty(__webpack_exports__, "__esModule", { value: true });
  4913. /* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__babel_loader_node_modules_vue_loader_lib_selector_type_script_index_0_Sketch_vue__ = __webpack_require__(20);
  4914. /* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__babel_loader_node_modules_vue_loader_lib_selector_type_script_index_0_Sketch_vue___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_0__babel_loader_node_modules_vue_loader_lib_selector_type_script_index_0_Sketch_vue__);
  4915. /* harmony namespace reexport (unknown) */ for(var __WEBPACK_IMPORT_KEY__ in __WEBPACK_IMPORTED_MODULE_0__babel_loader_node_modules_vue_loader_lib_selector_type_script_index_0_Sketch_vue__) if(__WEBPACK_IMPORT_KEY__ !== 'default') (function(key) { __webpack_require__.d(__webpack_exports__, key, function() { return __WEBPACK_IMPORTED_MODULE_0__babel_loader_node_modules_vue_loader_lib_selector_type_script_index_0_Sketch_vue__[key]; }) }(__WEBPACK_IMPORT_KEY__));
  4916. /* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__node_modules_vue_loader_lib_template_compiler_index_id_data_v_4491bbdc_hasScoped_false_buble_transforms_node_modules_vue_loader_lib_selector_type_template_index_0_Sketch_vue__ = __webpack_require__(71);
  4917. var disposed = false
  4918. function injectStyle (ssrContext) {
  4919. if (disposed) return
  4920. __webpack_require__(69)
  4921. }
  4922. var normalizeComponent = __webpack_require__(2)
  4923. /* script */
  4924. /* template */
  4925. /* template functional */
  4926. var __vue_template_functional__ = false
  4927. /* styles */
  4928. var __vue_styles__ = injectStyle
  4929. /* scopeId */
  4930. var __vue_scopeId__ = null
  4931. /* moduleIdentifier (server only) */
  4932. var __vue_module_identifier__ = null
  4933. var Component = normalizeComponent(
  4934. __WEBPACK_IMPORTED_MODULE_0__babel_loader_node_modules_vue_loader_lib_selector_type_script_index_0_Sketch_vue___default.a,
  4935. __WEBPACK_IMPORTED_MODULE_1__node_modules_vue_loader_lib_template_compiler_index_id_data_v_4491bbdc_hasScoped_false_buble_transforms_node_modules_vue_loader_lib_selector_type_template_index_0_Sketch_vue__["a" /* default */],
  4936. __vue_template_functional__,
  4937. __vue_styles__,
  4938. __vue_scopeId__,
  4939. __vue_module_identifier__
  4940. )
  4941. Component.options.__file = "src/components/Sketch.vue"
  4942. /* hot reload */
  4943. if (false) {(function () {
  4944. var hotAPI = require("vue-loader/node_modules/vue-hot-reload-api")
  4945. hotAPI.install(require("vue"), false)
  4946. if (!hotAPI.compatible) return
  4947. module.hot.accept()
  4948. if (!module.hot.data) {
  4949. hotAPI.createRecord("data-v-4491bbdc", Component.options)
  4950. } else {
  4951. hotAPI.reload("data-v-4491bbdc", Component.options)
  4952. }
  4953. module.hot.dispose(function (data) {
  4954. disposed = true
  4955. })
  4956. })()}
  4957. /* harmony default export */ __webpack_exports__["default"] = (Component.exports);
  4958. /***/ }),
  4959. /* 69 */
  4960. /***/ (function(module, exports, __webpack_require__) {
  4961. // style-loader: Adds some css to the DOM by adding a <style> tag
  4962. // load the styles
  4963. var content = __webpack_require__(70);
  4964. if(typeof content === 'string') content = [[module.i, content, '']];
  4965. if(content.locals) module.exports = content.locals;
  4966. // add the styles to the DOM
  4967. var update = __webpack_require__(1)("612c6604", content, false, {});
  4968. // Hot Module Replacement
  4969. if(false) {
  4970. // When the styles change, update the <style> tags
  4971. if(!content.locals) {
  4972. module.hot.accept("!!../../node_modules/css-loader/index.js?{\"minimize\":false,\"sourceMap\":false}!../../node_modules/vue-loader/lib/style-compiler/index.js?{\"vue\":true,\"id\":\"data-v-4491bbdc\",\"scoped\":false,\"hasInlineConfig\":false}!../../node_modules/vue-loader/lib/selector.js?type=styles&index=0!./Sketch.vue", function() {
  4973. var newContent = require("!!../../node_modules/css-loader/index.js?{\"minimize\":false,\"sourceMap\":false}!../../node_modules/vue-loader/lib/style-compiler/index.js?{\"vue\":true,\"id\":\"data-v-4491bbdc\",\"scoped\":false,\"hasInlineConfig\":false}!../../node_modules/vue-loader/lib/selector.js?type=styles&index=0!./Sketch.vue");
  4974. if(typeof newContent === 'string') newContent = [[module.id, newContent, '']];
  4975. update(newContent);
  4976. });
  4977. }
  4978. // When the module is disposed, remove the <style> tags
  4979. module.hot.dispose(function() { update(); });
  4980. }
  4981. /***/ }),
  4982. /* 70 */
  4983. /***/ (function(module, exports, __webpack_require__) {
  4984. exports = module.exports = __webpack_require__(0)(false);
  4985. // imports
  4986. // module
  4987. exports.push([module.i, "\n.vc-sketch {\n position: relative;\n width: 200px;\n padding: 10px 10px 0;\n box-sizing: initial;\n background: #fff;\n border-radius: 4px;\n box-shadow: 0 0 0 1px rgba(0, 0, 0, .15), 0 8px 16px rgba(0, 0, 0, .15);\n}\n.vc-sketch-saturation-wrap {\n width: 100%;\n padding-bottom: 75%;\n position: relative;\n overflow: hidden;\n}\n.vc-sketch-controls {\n display: flex;\n}\n.vc-sketch-sliders {\n padding: 4px 0;\n flex: 1;\n}\n.vc-sketch-sliders .vc-hue,\n.vc-sketch-sliders .vc-alpha-gradient {\n border-radius: 2px;\n}\n.vc-sketch-hue-wrap {\n position: relative;\n height: 10px;\n}\n.vc-sketch-alpha-wrap {\n position: relative;\n height: 10px;\n margin-top: 4px;\n overflow: hidden;\n}\n.vc-sketch-color-wrap {\n width: 24px;\n height: 24px;\n position: relative;\n margin-top: 4px;\n margin-left: 4px;\n border-radius: 3px;\n}\n.vc-sketch-active-color {\n position: absolute;\n top: 0;\n left: 0;\n right: 0;\n bottom: 0;\n border-radius: 2px;\n box-shadow: inset 0 0 0 1px rgba(0, 0, 0, .15), inset 0 0 4px rgba(0, 0, 0, .25);\n z-index: 2;\n}\n.vc-sketch-color-wrap .vc-checkerboard {\n background-size: auto;\n}\n.vc-sketch-field {\n display: flex;\n padding-top: 4px;\n}\n.vc-sketch-field .vc-input__input {\n width: 90%;\n padding: 4px 0 3px 10%;\n border: none;\n box-shadow: inset 0 0 0 1px #ccc;\n font-size: 10px;\n}\n.vc-sketch-field .vc-input__label {\n display: block;\n text-align: center;\n font-size: 11px;\n color: #222;\n padding-top: 3px;\n padding-bottom: 4px;\n text-transform: capitalize;\n}\n.vc-sketch-field--single {\n flex: 1;\n padding-left: 6px;\n}\n.vc-sketch-field--double {\n flex: 2;\n}\n.vc-sketch-presets {\n margin-right: -10px;\n margin-left: -10px;\n padding-left: 10px;\n padding-top: 10px;\n border-top: 1px solid #eee;\n}\n.vc-sketch-presets-color {\n border-radius: 3px;\n overflow: hidden;\n position: relative;\n display: inline-block;\n margin: 0 10px 10px 0;\n vertical-align: top;\n cursor: pointer;\n width: 16px;\n height: 16px;\n box-shadow: inset 0 0 0 1px rgba(0, 0, 0, .15);\n}\n.vc-sketch-presets-color .vc-checkerboard {\n box-shadow: inset 0 0 0 1px rgba(0, 0, 0, .15);\n border-radius: 3px;\n}\n.vc-sketch__disable-alpha .vc-sketch-color-wrap {\n height: 10px;\n}\n", ""]);
  4988. // exports
  4989. /***/ }),
  4990. /* 71 */
  4991. /***/ (function(module, __webpack_exports__, __webpack_require__) {
  4992. "use strict";
  4993. var render = function() {
  4994. var _vm = this
  4995. var _h = _vm.$createElement
  4996. var _c = _vm._self._c || _h
  4997. return _c(
  4998. "div",
  4999. {
  5000. class: ["vc-sketch", _vm.disableAlpha ? "vc-sketch__disable-alpha" : ""],
  5001. attrs: { role: "application", "aria-label": "Sketch color picker" }
  5002. },
  5003. [
  5004. _c(
  5005. "div",
  5006. { staticClass: "vc-sketch-saturation-wrap" },
  5007. [
  5008. _c("saturation", {
  5009. on: { change: _vm.childChange },
  5010. model: {
  5011. value: _vm.colors,
  5012. callback: function($$v) {
  5013. _vm.colors = $$v
  5014. },
  5015. expression: "colors"
  5016. }
  5017. })
  5018. ],
  5019. 1
  5020. ),
  5021. _vm._v(" "),
  5022. _c("div", { staticClass: "vc-sketch-controls" }, [
  5023. _c("div", { staticClass: "vc-sketch-sliders" }, [
  5024. _c(
  5025. "div",
  5026. { staticClass: "vc-sketch-hue-wrap" },
  5027. [
  5028. _c("hue", {
  5029. on: { change: _vm.childChange },
  5030. model: {
  5031. value: _vm.colors,
  5032. callback: function($$v) {
  5033. _vm.colors = $$v
  5034. },
  5035. expression: "colors"
  5036. }
  5037. })
  5038. ],
  5039. 1
  5040. ),
  5041. _vm._v(" "),
  5042. !_vm.disableAlpha
  5043. ? _c(
  5044. "div",
  5045. { staticClass: "vc-sketch-alpha-wrap" },
  5046. [
  5047. _c("alpha", {
  5048. on: { change: _vm.childChange },
  5049. model: {
  5050. value: _vm.colors,
  5051. callback: function($$v) {
  5052. _vm.colors = $$v
  5053. },
  5054. expression: "colors"
  5055. }
  5056. })
  5057. ],
  5058. 1
  5059. )
  5060. : _vm._e()
  5061. ]),
  5062. _vm._v(" "),
  5063. _c(
  5064. "div",
  5065. { staticClass: "vc-sketch-color-wrap" },
  5066. [
  5067. _c("div", {
  5068. staticClass: "vc-sketch-active-color",
  5069. style: { background: _vm.activeColor },
  5070. attrs: { "aria-label": "Current color is " + _vm.activeColor }
  5071. }),
  5072. _vm._v(" "),
  5073. _c("checkboard")
  5074. ],
  5075. 1
  5076. )
  5077. ]),
  5078. _vm._v(" "),
  5079. !_vm.disableFields
  5080. ? _c("div", { staticClass: "vc-sketch-field" }, [
  5081. _c(
  5082. "div",
  5083. { staticClass: "vc-sketch-field--double" },
  5084. [
  5085. _c("ed-in", {
  5086. attrs: { label: "hex", value: _vm.hex },
  5087. on: { change: _vm.inputChange }
  5088. })
  5089. ],
  5090. 1
  5091. ),
  5092. _vm._v(" "),
  5093. _c(
  5094. "div",
  5095. { staticClass: "vc-sketch-field--single" },
  5096. [
  5097. _c("ed-in", {
  5098. attrs: { label: "r", value: _vm.colors.rgba.r },
  5099. on: { change: _vm.inputChange }
  5100. })
  5101. ],
  5102. 1
  5103. ),
  5104. _vm._v(" "),
  5105. _c(
  5106. "div",
  5107. { staticClass: "vc-sketch-field--single" },
  5108. [
  5109. _c("ed-in", {
  5110. attrs: { label: "g", value: _vm.colors.rgba.g },
  5111. on: { change: _vm.inputChange }
  5112. })
  5113. ],
  5114. 1
  5115. ),
  5116. _vm._v(" "),
  5117. _c(
  5118. "div",
  5119. { staticClass: "vc-sketch-field--single" },
  5120. [
  5121. _c("ed-in", {
  5122. attrs: { label: "b", value: _vm.colors.rgba.b },
  5123. on: { change: _vm.inputChange }
  5124. })
  5125. ],
  5126. 1
  5127. ),
  5128. _vm._v(" "),
  5129. !_vm.disableAlpha
  5130. ? _c(
  5131. "div",
  5132. { staticClass: "vc-sketch-field--single" },
  5133. [
  5134. _c("ed-in", {
  5135. attrs: {
  5136. label: "a",
  5137. value: _vm.colors.a,
  5138. "arrow-offset": 0.01,
  5139. max: 1
  5140. },
  5141. on: { change: _vm.inputChange }
  5142. })
  5143. ],
  5144. 1
  5145. )
  5146. : _vm._e()
  5147. ])
  5148. : _vm._e(),
  5149. _vm._v(" "),
  5150. _c(
  5151. "div",
  5152. {
  5153. staticClass: "vc-sketch-presets",
  5154. attrs: {
  5155. role: "group",
  5156. "aria-label": "A color preset, pick one to set as current color"
  5157. }
  5158. },
  5159. [
  5160. _vm._l(_vm.presetColors, function(c) {
  5161. return [
  5162. !_vm.isTransparent(c)
  5163. ? _c("div", {
  5164. key: c,
  5165. staticClass: "vc-sketch-presets-color",
  5166. style: { background: c },
  5167. attrs: { "aria-label": "Color:" + c },
  5168. on: {
  5169. click: function($event) {
  5170. _vm.handlePreset(c)
  5171. }
  5172. }
  5173. })
  5174. : _c(
  5175. "div",
  5176. {
  5177. key: c,
  5178. staticClass: "vc-sketch-presets-color",
  5179. attrs: { "aria-label": "Color:" + c },
  5180. on: {
  5181. click: function($event) {
  5182. _vm.handlePreset(c)
  5183. }
  5184. }
  5185. },
  5186. [_c("checkboard")],
  5187. 1
  5188. )
  5189. ]
  5190. })
  5191. ],
  5192. 2
  5193. )
  5194. ]
  5195. )
  5196. }
  5197. var staticRenderFns = []
  5198. render._withStripped = true
  5199. var esExports = { render: render, staticRenderFns: staticRenderFns }
  5200. /* harmony default export */ __webpack_exports__["a"] = (esExports);
  5201. if (false) {
  5202. module.hot.accept()
  5203. if (module.hot.data) {
  5204. require("vue-loader/node_modules/vue-hot-reload-api") .rerender("data-v-4491bbdc", esExports)
  5205. }
  5206. }
  5207. /***/ }),
  5208. /* 72 */
  5209. /***/ (function(module, __webpack_exports__, __webpack_require__) {
  5210. "use strict";
  5211. Object.defineProperty(__webpack_exports__, "__esModule", { value: true });
  5212. /* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__babel_loader_node_modules_vue_loader_lib_selector_type_script_index_0_Chrome_vue__ = __webpack_require__(21);
  5213. /* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__babel_loader_node_modules_vue_loader_lib_selector_type_script_index_0_Chrome_vue___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_0__babel_loader_node_modules_vue_loader_lib_selector_type_script_index_0_Chrome_vue__);
  5214. /* harmony namespace reexport (unknown) */ for(var __WEBPACK_IMPORT_KEY__ in __WEBPACK_IMPORTED_MODULE_0__babel_loader_node_modules_vue_loader_lib_selector_type_script_index_0_Chrome_vue__) if(__WEBPACK_IMPORT_KEY__ !== 'default') (function(key) { __webpack_require__.d(__webpack_exports__, key, function() { return __WEBPACK_IMPORTED_MODULE_0__babel_loader_node_modules_vue_loader_lib_selector_type_script_index_0_Chrome_vue__[key]; }) }(__WEBPACK_IMPORT_KEY__));
  5215. /* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__node_modules_vue_loader_lib_template_compiler_index_id_data_v_dbf8a8ac_hasScoped_false_buble_transforms_node_modules_vue_loader_lib_selector_type_template_index_0_Chrome_vue__ = __webpack_require__(75);
  5216. var disposed = false
  5217. function injectStyle (ssrContext) {
  5218. if (disposed) return
  5219. __webpack_require__(73)
  5220. }
  5221. var normalizeComponent = __webpack_require__(2)
  5222. /* script */
  5223. /* template */
  5224. /* template functional */
  5225. var __vue_template_functional__ = false
  5226. /* styles */
  5227. var __vue_styles__ = injectStyle
  5228. /* scopeId */
  5229. var __vue_scopeId__ = null
  5230. /* moduleIdentifier (server only) */
  5231. var __vue_module_identifier__ = null
  5232. var Component = normalizeComponent(
  5233. __WEBPACK_IMPORTED_MODULE_0__babel_loader_node_modules_vue_loader_lib_selector_type_script_index_0_Chrome_vue___default.a,
  5234. __WEBPACK_IMPORTED_MODULE_1__node_modules_vue_loader_lib_template_compiler_index_id_data_v_dbf8a8ac_hasScoped_false_buble_transforms_node_modules_vue_loader_lib_selector_type_template_index_0_Chrome_vue__["a" /* default */],
  5235. __vue_template_functional__,
  5236. __vue_styles__,
  5237. __vue_scopeId__,
  5238. __vue_module_identifier__
  5239. )
  5240. Component.options.__file = "src/components/Chrome.vue"
  5241. /* hot reload */
  5242. if (false) {(function () {
  5243. var hotAPI = require("vue-loader/node_modules/vue-hot-reload-api")
  5244. hotAPI.install(require("vue"), false)
  5245. if (!hotAPI.compatible) return
  5246. module.hot.accept()
  5247. if (!module.hot.data) {
  5248. hotAPI.createRecord("data-v-dbf8a8ac", Component.options)
  5249. } else {
  5250. hotAPI.reload("data-v-dbf8a8ac", Component.options)
  5251. }
  5252. module.hot.dispose(function (data) {
  5253. disposed = true
  5254. })
  5255. })()}
  5256. /* harmony default export */ __webpack_exports__["default"] = (Component.exports);
  5257. /***/ }),
  5258. /* 73 */
  5259. /***/ (function(module, exports, __webpack_require__) {
  5260. // style-loader: Adds some css to the DOM by adding a <style> tag
  5261. // load the styles
  5262. var content = __webpack_require__(74);
  5263. if(typeof content === 'string') content = [[module.i, content, '']];
  5264. if(content.locals) module.exports = content.locals;
  5265. // add the styles to the DOM
  5266. var update = __webpack_require__(1)("1cd16048", content, false, {});
  5267. // Hot Module Replacement
  5268. if(false) {
  5269. // When the styles change, update the <style> tags
  5270. if(!content.locals) {
  5271. module.hot.accept("!!../../node_modules/css-loader/index.js?{\"minimize\":false,\"sourceMap\":false}!../../node_modules/vue-loader/lib/style-compiler/index.js?{\"vue\":true,\"id\":\"data-v-dbf8a8ac\",\"scoped\":false,\"hasInlineConfig\":false}!../../node_modules/vue-loader/lib/selector.js?type=styles&index=0!./Chrome.vue", function() {
  5272. var newContent = require("!!../../node_modules/css-loader/index.js?{\"minimize\":false,\"sourceMap\":false}!../../node_modules/vue-loader/lib/style-compiler/index.js?{\"vue\":true,\"id\":\"data-v-dbf8a8ac\",\"scoped\":false,\"hasInlineConfig\":false}!../../node_modules/vue-loader/lib/selector.js?type=styles&index=0!./Chrome.vue");
  5273. if(typeof newContent === 'string') newContent = [[module.id, newContent, '']];
  5274. update(newContent);
  5275. });
  5276. }
  5277. // When the module is disposed, remove the <style> tags
  5278. module.hot.dispose(function() { update(); });
  5279. }
  5280. /***/ }),
  5281. /* 74 */
  5282. /***/ (function(module, exports, __webpack_require__) {
  5283. exports = module.exports = __webpack_require__(0)(false);
  5284. // imports
  5285. // module
  5286. exports.push([module.i, "\n.vc-chrome {\n background: #fff;\n border-radius: 2px;\n box-shadow: 0 0 2px rgba(0,0,0,.3), 0 4px 8px rgba(0,0,0,.3);\n box-sizing: initial;\n width: 225px;\n font-family: Menlo;\n background-color: #fff;\n}\n.vc-chrome-controls {\n display: flex;\n}\n.vc-chrome-color-wrap {\n position: relative;\n width: 36px;\n}\n.vc-chrome-active-color {\n position: relative;\n width: 30px;\n height: 30px;\n border-radius: 15px;\n overflow: hidden;\n z-index: 1;\n}\n.vc-chrome-color-wrap .vc-checkerboard {\n width: 30px;\n height: 30px;\n border-radius: 15px;\n background-size: auto;\n}\n.vc-chrome-sliders {\n flex: 1;\n}\n.vc-chrome-fields-wrap {\n display: flex;\n padding-top: 16px;\n}\n.vc-chrome-fields {\n display: flex;\n margin-left: -6px;\n flex: 1;\n}\n.vc-chrome-field {\n padding-left: 6px;\n width: 100%;\n}\n.vc-chrome-toggle-btn {\n width: 32px;\n text-align: right;\n position: relative;\n}\n.vc-chrome-toggle-icon {\n margin-right: -4px;\n margin-top: 12px;\n cursor: pointer;\n position: relative;\n z-index: 2;\n}\n.vc-chrome-toggle-icon-highlight {\n position: absolute;\n width: 24px;\n height: 28px;\n background: #eee;\n border-radius: 4px;\n top: 10px;\n left: 12px;\n}\n.vc-chrome-hue-wrap {\n position: relative;\n height: 10px;\n margin-bottom: 8px;\n}\n.vc-chrome-alpha-wrap {\n position: relative;\n height: 10px;\n}\n.vc-chrome-hue-wrap .vc-hue {\n border-radius: 2px;\n}\n.vc-chrome-alpha-wrap .vc-alpha-gradient {\n border-radius: 2px;\n}\n.vc-chrome-hue-wrap .vc-hue-picker, .vc-chrome-alpha-wrap .vc-alpha-picker {\n width: 12px;\n height: 12px;\n border-radius: 6px;\n transform: translate(-6px, -2px);\n background-color: rgb(248, 248, 248);\n box-shadow: 0 1px 4px 0 rgba(0, 0, 0, 0.37);\n}\n.vc-chrome-body {\n padding: 16px 16px 12px;\n background-color: #fff;\n}\n.vc-chrome-saturation-wrap {\n width: 100%;\n padding-bottom: 55%;\n position: relative;\n border-radius: 2px 2px 0 0;\n overflow: hidden;\n}\n.vc-chrome-saturation-wrap .vc-saturation-circle {\n width: 12px;\n height: 12px;\n}\n.vc-chrome-fields .vc-input__input {\n font-size: 11px;\n color: #333;\n width: 100%;\n border-radius: 2px;\n border: none;\n box-shadow: inset 0 0 0 1px #dadada;\n height: 21px;\n text-align: center;\n}\n.vc-chrome-fields .vc-input__label {\n text-transform: uppercase;\n font-size: 11px;\n line-height: 11px;\n color: #969696;\n text-align: center;\n display: block;\n margin-top: 12px;\n}\n.vc-chrome__disable-alpha .vc-chrome-active-color {\n width: 18px;\n height: 18px;\n}\n.vc-chrome__disable-alpha .vc-chrome-color-wrap {\n width: 30px;\n}\n.vc-chrome__disable-alpha .vc-chrome-hue-wrap {\n margin-top: 4px;\n margin-bottom: 4px;\n}\n", ""]);
  5287. // exports
  5288. /***/ }),
  5289. /* 75 */
  5290. /***/ (function(module, __webpack_exports__, __webpack_require__) {
  5291. "use strict";
  5292. var render = function() {
  5293. var _vm = this
  5294. var _h = _vm.$createElement
  5295. var _c = _vm._self._c || _h
  5296. return _c(
  5297. "div",
  5298. {
  5299. class: ["vc-chrome", _vm.disableAlpha ? "vc-chrome__disable-alpha" : ""],
  5300. attrs: { role: "application", "aria-label": "Chrome color picker" }
  5301. },
  5302. [
  5303. _c(
  5304. "div",
  5305. { staticClass: "vc-chrome-saturation-wrap" },
  5306. [
  5307. _c("saturation", {
  5308. on: { change: _vm.childChange },
  5309. model: {
  5310. value: _vm.colors,
  5311. callback: function($$v) {
  5312. _vm.colors = $$v
  5313. },
  5314. expression: "colors"
  5315. }
  5316. })
  5317. ],
  5318. 1
  5319. ),
  5320. _vm._v(" "),
  5321. _c("div", { staticClass: "vc-chrome-body" }, [
  5322. _c("div", { staticClass: "vc-chrome-controls" }, [
  5323. _c(
  5324. "div",
  5325. { staticClass: "vc-chrome-color-wrap" },
  5326. [
  5327. _vm._v(" "),
  5328. !_vm.disableAlpha ? _c("checkboard") : _vm._e()
  5329. ],
  5330. 1
  5331. ),
  5332. _vm._v(" "),
  5333. _c("div", { staticClass: "vc-chrome-sliders" }, [
  5334. _c(
  5335. "div",
  5336. { staticClass: "vc-chrome-hue-wrap" },
  5337. [
  5338. _c("hue", {
  5339. on: { change: _vm.childChange },
  5340. model: {
  5341. value: _vm.colors,
  5342. callback: function($$v) {
  5343. _vm.colors = $$v
  5344. },
  5345. expression: "colors"
  5346. }
  5347. })
  5348. ],
  5349. 1
  5350. ),
  5351. _vm._v(" "),
  5352. !_vm.disableAlpha
  5353. ? _c(
  5354. "div",
  5355. { staticClass: "vc-chrome-alpha-wrap" },
  5356. [
  5357. _c("alpha", {
  5358. on: { change: _vm.childChange },
  5359. model: {
  5360. value: _vm.colors,
  5361. callback: function($$v) {
  5362. _vm.colors = $$v
  5363. },
  5364. expression: "colors"
  5365. }
  5366. })
  5367. ],
  5368. 1
  5369. )
  5370. : _vm._e()
  5371. ])
  5372. ]),
  5373. _vm._v(" "),
  5374. !_vm.disableFields
  5375. ? _c("div", { staticClass: "vc-chrome-fields-wrap" }, [
  5376. _c(
  5377. "div",
  5378. {
  5379. directives: [
  5380. {
  5381. name: "show",
  5382. rawName: "v-show",
  5383. value: _vm.fieldsIndex === 0,
  5384. expression: "fieldsIndex === 0"
  5385. }
  5386. ],
  5387. staticClass: "vc-chrome-fields"
  5388. },
  5389. [
  5390. _c(
  5391. "div",
  5392. { staticClass: "vc-chrome-field" },
  5393. [
  5394. !_vm.hasAlpha
  5395. ? _c("ed-in", {
  5396. attrs: { label: "hex", value: _vm.colors.hex },
  5397. on: { change: _vm.inputChange }
  5398. })
  5399. : _vm._e(),
  5400. _vm._v(" "),
  5401. _vm.hasAlpha
  5402. ? _c("ed-in", {
  5403. attrs: { label: "hex", value: _vm.colors.hex8 },
  5404. on: { change: _vm.inputChange }
  5405. })
  5406. : _vm._e()
  5407. ],
  5408. 1
  5409. )
  5410. ]
  5411. ),
  5412. _vm._v(" "),
  5413. _c(
  5414. "div",
  5415. {
  5416. directives: [
  5417. {
  5418. name: "show",
  5419. rawName: "v-show",
  5420. value: _vm.fieldsIndex === 1,
  5421. expression: "fieldsIndex === 1"
  5422. }
  5423. ],
  5424. staticClass: "vc-chrome-fields"
  5425. },
  5426. [
  5427. _c(
  5428. "div",
  5429. { staticClass: "vc-chrome-field" },
  5430. [
  5431. _c("ed-in", {
  5432. attrs: { label: "r", value: _vm.colors.rgba.r },
  5433. on: { change: _vm.inputChange }
  5434. })
  5435. ],
  5436. 1
  5437. ),
  5438. _vm._v(" "),
  5439. _c(
  5440. "div",
  5441. { staticClass: "vc-chrome-field" },
  5442. [
  5443. _c("ed-in", {
  5444. attrs: { label: "g", value: _vm.colors.rgba.g },
  5445. on: { change: _vm.inputChange }
  5446. })
  5447. ],
  5448. 1
  5449. ),
  5450. _vm._v(" "),
  5451. _c(
  5452. "div",
  5453. { staticClass: "vc-chrome-field" },
  5454. [
  5455. _c("ed-in", {
  5456. attrs: { label: "b", value: _vm.colors.rgba.b },
  5457. on: { change: _vm.inputChange }
  5458. })
  5459. ],
  5460. 1
  5461. ),
  5462. _vm._v(" "),
  5463. !_vm.disableAlpha
  5464. ? _c(
  5465. "div",
  5466. { staticClass: "vc-chrome-field" },
  5467. [
  5468. _c("ed-in", {
  5469. attrs: {
  5470. label: "a",
  5471. value: _vm.colors.a,
  5472. "arrow-offset": 0.01,
  5473. max: 1
  5474. },
  5475. on: { change: _vm.inputChange }
  5476. })
  5477. ],
  5478. 1
  5479. )
  5480. : _vm._e()
  5481. ]
  5482. ),
  5483. _vm._v(" "),
  5484. _c(
  5485. "div",
  5486. {
  5487. directives: [
  5488. {
  5489. name: "show",
  5490. rawName: "v-show",
  5491. value: _vm.fieldsIndex === 2,
  5492. expression: "fieldsIndex === 2"
  5493. }
  5494. ],
  5495. staticClass: "vc-chrome-fields"
  5496. },
  5497. [
  5498. _c(
  5499. "div",
  5500. { staticClass: "vc-chrome-field" },
  5501. [
  5502. _c("ed-in", {
  5503. attrs: { label: "h", value: _vm.hsl.h },
  5504. on: { change: _vm.inputChange }
  5505. })
  5506. ],
  5507. 1
  5508. ),
  5509. _vm._v(" "),
  5510. _c(
  5511. "div",
  5512. { staticClass: "vc-chrome-field" },
  5513. [
  5514. _c("ed-in", {
  5515. attrs: { label: "s", value: _vm.hsl.s },
  5516. on: { change: _vm.inputChange }
  5517. })
  5518. ],
  5519. 1
  5520. ),
  5521. _vm._v(" "),
  5522. _c(
  5523. "div",
  5524. { staticClass: "vc-chrome-field" },
  5525. [
  5526. _c("ed-in", {
  5527. attrs: { label: "l", value: _vm.hsl.l },
  5528. on: { change: _vm.inputChange }
  5529. })
  5530. ],
  5531. 1
  5532. ),
  5533. _vm._v(" "),
  5534. !_vm.disableAlpha
  5535. ? _c(
  5536. "div",
  5537. { staticClass: "vc-chrome-field" },
  5538. [
  5539. _c("ed-in", {
  5540. attrs: {
  5541. label: "a",
  5542. value: _vm.colors.a,
  5543. "arrow-offset": 0.01,
  5544. max: 1
  5545. },
  5546. on: { change: _vm.inputChange }
  5547. })
  5548. ],
  5549. 1
  5550. )
  5551. : _vm._e()
  5552. ]
  5553. ),
  5554. _vm._v(" "),
  5555. _c(
  5556. "div",
  5557. {
  5558. staticClass: "vc-chrome-toggle-btn",
  5559. attrs: {
  5560. role: "button",
  5561. "aria-label": "Change another color definition"
  5562. }
  5563. }
  5564. )
  5565. ])
  5566. : _vm._e()
  5567. ])
  5568. ]
  5569. )
  5570. }
  5571. var staticRenderFns = []
  5572. render._withStripped = true
  5573. var esExports = { render: render, staticRenderFns: staticRenderFns }
  5574. /* harmony default export */ __webpack_exports__["a"] = (esExports);
  5575. if (false) {
  5576. module.hot.accept()
  5577. if (module.hot.data) {
  5578. require("vue-loader/node_modules/vue-hot-reload-api") .rerender("data-v-dbf8a8ac", esExports)
  5579. }
  5580. }
  5581. /***/ })
  5582. /******/ ]);
  5583. });